Merge pull request #7 from RedikultsevEvg/PrimitivePropsEdit
Primitive props edit
@@ -1,12 +1,18 @@
|
||||
using FieldVisualizer.InfraStructures.Enums;
|
||||
using FieldVisualizer.InfraStructures.Exceptions;
|
||||
using FieldVisualizer.InfraStructures.Exceptions;
|
||||
using FieldVisualizer.InfraStructures.Strings;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace FieldVisualizer.Entities.ColorMaps.Factories
|
||||
{
|
||||
public enum ColorMapsTypes
|
||||
{
|
||||
LiraSpectrum = 0, //Lira
|
||||
FullSpectrum = 1, //StaDiCon
|
||||
RedToWhite = 2,
|
||||
RedToBlue = 3,
|
||||
BlueToWhite = 4,
|
||||
}
|
||||
/// <summary>
|
||||
/// Factory for creating of different color maps
|
||||
/// </summary>
|
||||
@@ -18,13 +24,39 @@ namespace FieldVisualizer.Entities.ColorMaps.Factories
|
||||
if (mapsTypes == ColorMapsTypes.RedToWhite) { return GetRedToWhite(); }
|
||||
if (mapsTypes == ColorMapsTypes.RedToBlue) { return GetRedToBlue(); }
|
||||
if (mapsTypes == ColorMapsTypes.BlueToWhite) { return GetBlueToWhite(); }
|
||||
if (mapsTypes == ColorMapsTypes.LiraSpectrum) { return GetLiraSpectrum(); }
|
||||
else { throw new FieldVisulizerException(ErrorStrings.ColorMapTypeIsUnknown); }
|
||||
}
|
||||
|
||||
private static IColorMap GetLiraSpectrum()
|
||||
{
|
||||
ColorMap colorMap = new()
|
||||
{
|
||||
Name = "LiraSpectrumColorMap"
|
||||
};
|
||||
List<Color> colors = new();
|
||||
byte Alpha = 0xff;
|
||||
colors.AddRange(new Color[]{
|
||||
Color.FromArgb(Alpha, 0, 0, 128) ,//Dark Blue
|
||||
Color.FromArgb(Alpha, 0, 0, 255) ,//Blue
|
||||
Color.FromArgb(Alpha, 0, 128, 255) ,//Blue
|
||||
Color.FromArgb(Alpha, 0, 200, 255) ,//Blue
|
||||
Color.FromArgb(Alpha, 60, 255, 255) ,//Light Blue
|
||||
Color.FromArgb(Alpha, 255, 255, 128) ,//Light Yellow
|
||||
Color.FromArgb(Alpha, 255, 255, 0) ,//Yellow
|
||||
Color.FromArgb(Alpha, 255, 215, 0) ,//Gold
|
||||
Color.FromArgb(Alpha, 255, 128, 0) ,//Orange Red
|
||||
Color.FromArgb(Alpha, 255, 0, 0) ,//Red
|
||||
});
|
||||
colorMap.Colors = colors;
|
||||
return colorMap;
|
||||
}
|
||||
private static IColorMap GetFullSpectrum()
|
||||
{
|
||||
ColorMap colorMap = new ColorMap();
|
||||
colorMap.Name = "FullSpectrumColorMap";
|
||||
ColorMap colorMap = new()
|
||||
{
|
||||
Name = "FullSpectrumColorMap"
|
||||
};
|
||||
List<Color> colors = new List<Color>();
|
||||
byte Alpha = 0xff;
|
||||
colors.AddRange(new Color[]{
|
||||
@@ -43,7 +75,6 @@ namespace FieldVisualizer.Entities.ColorMaps.Factories
|
||||
colorMap.Colors = colors;
|
||||
return colorMap;
|
||||
}
|
||||
|
||||
private static IColorMap GetRedToWhite()
|
||||
{
|
||||
ColorMap colorMap = new ColorMap();
|
||||
@@ -57,7 +88,6 @@ namespace FieldVisualizer.Entities.ColorMaps.Factories
|
||||
colorMap.Colors = colors;
|
||||
return colorMap;
|
||||
}
|
||||
|
||||
private static IColorMap GetRedToBlue()
|
||||
{
|
||||
ColorMap colorMap = new ColorMap();
|
||||
@@ -71,7 +101,6 @@ namespace FieldVisualizer.Entities.ColorMaps.Factories
|
||||
colorMap.Colors = colors;
|
||||
return colorMap;
|
||||
}
|
||||
|
||||
private static IColorMap GetBlueToWhite()
|
||||
{
|
||||
ColorMap colorMap = new ColorMap();
|
||||
|
||||
13
FieldVisualizer/Entities/ColorMaps/IValueColorArray.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace FieldVisualizer.Entities.ColorMaps
|
||||
{
|
||||
public interface IValueColorArray
|
||||
{
|
||||
double AverageValue { get; set; }
|
||||
Color BottomColor { get; set; }
|
||||
double BottomValue { get; set; }
|
||||
Color TopColor { get; set; }
|
||||
double TopValue { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace FieldVisualizer.Entities.ColorMaps
|
||||
{
|
||||
/// <summary>
|
||||
/// Colored range for building color legend
|
||||
/// </summary>
|
||||
public interface IValueColorRange
|
||||
{
|
||||
/// <summary>
|
||||
/// Flag of activity
|
||||
/// </summary>
|
||||
bool IsActive { get; set; }
|
||||
double BottomValue { get; set; }
|
||||
double AverageValue { get; set; }
|
||||
double TopValue {get;set;}
|
||||
Color BottomColor { get; set; }
|
||||
Color TopColor { get; set; }
|
||||
IValueColorArray ExactValues { get; }
|
||||
IValueColorArray RoundedValues { get; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
33
FieldVisualizer/Entities/ColorMaps/ValueColorArray.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace FieldVisualizer.Entities.ColorMaps
|
||||
{
|
||||
public class ValueColorArray : IValueColorArray
|
||||
{
|
||||
/// <summary>
|
||||
/// Minimum value of range
|
||||
/// </summary>
|
||||
public double BottomValue { get; set; }
|
||||
/// <summary>
|
||||
/// Average value of range
|
||||
/// </summary>
|
||||
public double AverageValue { get; set; }
|
||||
/// <summary>
|
||||
/// Maximum value of range
|
||||
/// </summary>
|
||||
public double TopValue { get; set; }
|
||||
/// <summary>
|
||||
/// Color correspondent to minimum value
|
||||
/// </summary>
|
||||
public Color BottomColor { get; set; }
|
||||
/// <summary>
|
||||
/// Color correspondent to maximum value
|
||||
/// </summary>
|
||||
public Color TopColor { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace FieldVisualizer.Entities.ColorMaps
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public class ValueColorRange : IValueColorRange
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public bool IsActive { get; set; }
|
||||
public double BottomValue { get; set; }
|
||||
public double AverageValue { get; set; }
|
||||
public double TopValue { get; set; }
|
||||
public Color BottomColor { get; set; }
|
||||
public Color TopColor { get; set; }
|
||||
|
||||
public IValueColorArray ExactValues { get; private set; } = new ValueColorArray();
|
||||
|
||||
public IValueColorArray RoundedValues { get; private set; } = new ValueColorArray();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,4 +8,12 @@
|
||||
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="InfraStructures\Enums\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\StructureHelperCommon\StructureHelperCommon.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace FieldVisualizer.InfraStructures.Enums
|
||||
{
|
||||
public enum ColorMapsTypes
|
||||
{
|
||||
FullSpectrum = 0,
|
||||
RedToWhite = 1,
|
||||
RedToBlue = 2,
|
||||
BlueToWhite = 3
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
using FieldVisualizer.Entities.ColorMaps;
|
||||
using FieldVisualizer.Entities.Values;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
@@ -10,54 +12,132 @@ namespace FieldVisualizer.Services.ColorServices
|
||||
public static class ColorOperations
|
||||
{
|
||||
const byte Alpha = 0xff;
|
||||
public static Color GetColorByValue(IValueRange range, IColorMap map, double val)
|
||||
{
|
||||
if (range.TopValue == range.BottomValue || map.Colors.Count == 0) { return map.Colors[0]; }
|
||||
double minVal = range.BottomValue - 1e-15d*(Math.Abs(range.BottomValue));
|
||||
double maxVal = range.TopValue + 1e-15d * (Math.Abs(range.TopValue));
|
||||
if (val > maxVal || val < minVal) { return Colors.Gray; }
|
||||
if (val == minVal) { return map.Colors[0]; }
|
||||
if (val == maxVal) { return map.Colors[map.Colors.Count - 1]; }
|
||||
|
||||
double valPerc = (val - minVal) / (maxVal - minVal);// value%
|
||||
if (valPerc >= 1d)
|
||||
{ return map.Colors[map.Colors.Count - 1]; }
|
||||
double colorPerc = 1d / (map.Colors.Count - 1d); // % of each block of color. the last is the "100% Color"
|
||||
double blockOfColor = valPerc / colorPerc;// the integer part repersents how many block to skip
|
||||
int blockIdx = (int)Math.Truncate(blockOfColor);// Idx of
|
||||
double valPercResidual = valPerc - (blockIdx * colorPerc);//remove the part represented of block
|
||||
double percOfColor = valPercResidual / colorPerc;// % of color of this block that will be filled
|
||||
|
||||
Color cTarget = map.Colors[blockIdx];
|
||||
Color cNext = map.Colors[blockIdx + 1];
|
||||
|
||||
var deltaR = cNext.R - cTarget.R;
|
||||
var deltaG = cNext.G - cTarget.G;
|
||||
var deltaB = cNext.B - cTarget.B;
|
||||
|
||||
var R = cTarget.R + (deltaR * percOfColor);
|
||||
var G = cTarget.G + (deltaG * percOfColor);
|
||||
var B = cTarget.B + (deltaB * percOfColor);
|
||||
|
||||
Color c = map.Colors[0];
|
||||
c = Color.FromArgb(Alpha, (byte)R, (byte)G, (byte)B);
|
||||
return c;
|
||||
}
|
||||
static IMathRoundLogic roundLogic = new SmartRoundLogic();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="fullRange"></param>
|
||||
/// <param name="valueRanges"></param>
|
||||
/// <param name="colorMap"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<IValueColorRange> GetValueColorRanges(IValueRange fullRange, IEnumerable<IValueRange> valueRanges, IColorMap colorMap)
|
||||
{
|
||||
var colorRanges = new List<IValueColorRange>();
|
||||
foreach (var valueRange in valueRanges)
|
||||
{
|
||||
IValueColorRange valueColorRange = new ValueColorRange();
|
||||
valueColorRange.IsActive = true;
|
||||
valueColorRange.BottomValue = valueRange.BottomValue;
|
||||
valueColorRange.AverageValue = (valueRange.BottomValue + valueRange.TopValue) / 2;
|
||||
valueColorRange.TopValue = valueRange.TopValue;
|
||||
valueColorRange.BottomColor = GetColorByValue(fullRange, colorMap, valueColorRange.BottomValue);
|
||||
valueColorRange.TopColor = GetColorByValue(fullRange, colorMap, valueColorRange.TopValue);
|
||||
var valueColorRange = new ValueColorRange
|
||||
{
|
||||
IsActive = true,
|
||||
};
|
||||
valueColorRange.ExactValues.BottomValue = valueRange.BottomValue;
|
||||
valueColorRange.ExactValues.AverageValue = (valueRange.BottomValue + valueRange.TopValue) / 2;
|
||||
valueColorRange.ExactValues.TopValue = valueRange.TopValue;
|
||||
valueColorRange.ExactValues.BottomColor = GetColorByValue(fullRange, colorMap, valueColorRange.ExactValues.BottomValue);
|
||||
valueColorRange.ExactValues.TopColor = GetColorByValue(fullRange, colorMap, valueColorRange.ExactValues.TopValue);
|
||||
valueColorRange.RoundedValues.BottomValue = roundLogic.RoundValue(valueColorRange.ExactValues.BottomValue);
|
||||
valueColorRange.RoundedValues.AverageValue = roundLogic.RoundValue(valueColorRange.ExactValues.AverageValue);
|
||||
valueColorRange.RoundedValues.TopValue = roundLogic.RoundValue(valueColorRange.ExactValues.TopValue);
|
||||
colorRanges.Add(valueColorRange);
|
||||
}
|
||||
return colorRanges;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns color by value, range of value an color map
|
||||
/// </summary>
|
||||
/// <param name="range">Range of valoue</param>
|
||||
/// <param name="map">Color map</param>
|
||||
/// <param name="val">Value</param>
|
||||
/// <returns></returns>
|
||||
public static Color GetColorByValue(IValueRange range, IColorMap map, double val)
|
||||
{
|
||||
CheckColorMap(map);
|
||||
if (range.TopValue == range.BottomValue || map.Colors.Count == 1) //if range width is zero or map contain just 1 color
|
||||
{
|
||||
return map.Colors[0];
|
||||
}
|
||||
var valueRange = GetExtendedRange(range);
|
||||
if (val >= valueRange.TopValue || val <= valueRange.BottomValue)
|
||||
{
|
||||
return GetColorValueIsOutOfRange(valueRange, map, val);
|
||||
}
|
||||
return GetColorValueIsInRange(valueRange, map, val);
|
||||
}
|
||||
|
||||
private static Color GetColorValueIsOutOfRange(IValueRange range, IColorMap map, double val)
|
||||
{
|
||||
if (val > range.TopValue || val < range.BottomValue)
|
||||
{
|
||||
return Colors.Gray;
|
||||
}
|
||||
if (val == range.BottomValue)
|
||||
{
|
||||
return map.Colors[0];
|
||||
}
|
||||
if (val == range.TopValue)
|
||||
{
|
||||
return map.Colors[^1];
|
||||
}
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect);
|
||||
}
|
||||
|
||||
private static Color GetColorValueIsInRange(IValueRange range, IColorMap map, double val)
|
||||
{
|
||||
var deltaVal = val - range.BottomValue;
|
||||
var rangeWidth = range.TopValue - range.BottomValue;
|
||||
var valPerc = deltaVal / rangeWidth; // percent of value on the distance from minValue to maxValue
|
||||
if (valPerc >= 1d)
|
||||
{
|
||||
return map.Colors[^1];
|
||||
}
|
||||
double colorPerc = 1d / (map.Colors.Count - 1d); // % of each block of color. the last is the "100% Color"
|
||||
double blockOfColor = valPerc / colorPerc;// the integer part represents how many block to skip
|
||||
int blockIdx = (int)Math.Truncate(blockOfColor);// Idx of
|
||||
double valPercResidual = valPerc - (blockIdx * colorPerc);//remove the part represented of block
|
||||
double percOfColor = valPercResidual / colorPerc;// % of color of this block that will be filled
|
||||
|
||||
//in some cases due to accuracy of double type percent of color may be less than zero
|
||||
if (percOfColor <= 0d)
|
||||
{
|
||||
return map.Colors[blockIdx];
|
||||
}
|
||||
Color c = GetColorByColorMap(map, blockIdx, percOfColor);
|
||||
return c;
|
||||
}
|
||||
|
||||
private static IValueRange GetExtendedRange(IValueRange range)
|
||||
{
|
||||
var minVal = range.BottomValue - 1e-15d * Math.Abs(range.BottomValue);
|
||||
var maxVal = range.TopValue + 1e-15d * Math.Abs(range.TopValue);
|
||||
return new ValueRange()
|
||||
{
|
||||
BottomValue = minVal,
|
||||
TopValue = maxVal
|
||||
};
|
||||
}
|
||||
|
||||
private static Color GetColorByColorMap(IColorMap map, int blockIdx, double percOfColor)
|
||||
{
|
||||
Color cTarget = map.Colors[blockIdx];
|
||||
Color cNext = map.Colors[blockIdx + 1];
|
||||
|
||||
var deltaRed = cNext.R - cTarget.R;
|
||||
var deltaGreen = cNext.G - cTarget.G;
|
||||
var deltaBlue = cNext.B - cTarget.B;
|
||||
|
||||
var Red = cTarget.R + (deltaRed * percOfColor);
|
||||
var Green = cTarget.G + (deltaGreen * percOfColor);
|
||||
var Blue = cTarget.B + (deltaBlue * percOfColor);
|
||||
|
||||
Color c = Color.FromArgb(Alpha, (byte)Red, (byte)Green, (byte)Blue);
|
||||
return c;
|
||||
}
|
||||
|
||||
private static void CheckColorMap(IColorMap map)
|
||||
{
|
||||
if (map.Colors.Count == 0)
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + ": Color map is empty");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,29 @@
|
||||
using FieldVisualizer.Entities.ColorMaps.Factories;
|
||||
using FieldVisualizer.Entities.ColorMaps;
|
||||
using FieldVisualizer.Entities.Values.Primitives;
|
||||
using FieldVisualizer.Entities.ColorMaps;
|
||||
using FieldVisualizer.Entities.ColorMaps.Factories;
|
||||
using FieldVisualizer.Entities.Values;
|
||||
using FieldVisualizer.Entities.Values.Primitives;
|
||||
using FieldVisualizer.Infrastructure.Commands;
|
||||
using FieldVisualizer.InfraStructures.Enums;
|
||||
using FieldVisualizer.InfraStructures.Exceptions;
|
||||
using FieldVisualizer.InfraStructures.Strings;
|
||||
using FieldVisualizer.Services.ColorServices;
|
||||
using FieldVisualizer.Services.PrimitiveServices;
|
||||
using FieldVisualizer.Services.ValueRanges;
|
||||
using FieldVisualizer.Windows.UserControls;
|
||||
using StructureHelperCommon.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
using FieldVisualizer.Windows.UserControls;
|
||||
using System.ComponentModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace FieldVisualizer.ViewModels.FieldViewerViewModels
|
||||
{
|
||||
public class FieldViewerViewModel : ViewModelBase, IDataErrorInfo
|
||||
{
|
||||
private IMathRoundLogic roundLogic = new SmartRoundLogic() { DigitQuant = 3 };
|
||||
public ICommand RebuildCommand { get; }
|
||||
public ICommand ZoomInCommand { get; }
|
||||
public ICommand ZoomOutCommand { get; }
|
||||
@@ -164,8 +161,8 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels
|
||||
private ColorMapsTypes _ColorMapType;
|
||||
private IColorMap _ColorMap;
|
||||
private IValueRange valueRange;
|
||||
private IEnumerable<IValueRange> _ValueRanges;
|
||||
private IEnumerable<IValueColorRange> _ValueColorRanges;
|
||||
private IEnumerable<IValueRange> valueRanges;
|
||||
private IEnumerable<IValueColorRange> valueColorRanges;
|
||||
private bool setMinValue;
|
||||
private bool setMaxValue;
|
||||
private double crossLineX;
|
||||
@@ -177,7 +174,7 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels
|
||||
|
||||
public FieldViewerViewModel()
|
||||
{
|
||||
_ColorMapType = ColorMapsTypes.FullSpectrum;
|
||||
_ColorMapType = ColorMapsTypes.LiraSpectrum;
|
||||
RebuildCommand = new RelayCommand(o => ProcessPrimitives(), o => PrimitiveValidation());
|
||||
ZoomInCommand = new RelayCommand(o => Zoom(1.2), o => PrimitiveValidation());
|
||||
ZoomOutCommand = new RelayCommand(o => Zoom(0.8), o => PrimitiveValidation());
|
||||
@@ -195,7 +192,7 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels
|
||||
if ((PrimitiveSet is null) == false)
|
||||
{
|
||||
ProcessPrimitives();
|
||||
Legend.ValueColorRanges = _ValueColorRanges;
|
||||
Legend.ValueColorRanges = valueColorRanges;
|
||||
Legend.Refresh();
|
||||
}
|
||||
}
|
||||
@@ -262,14 +259,14 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels
|
||||
{
|
||||
SolidColorBrush brush = new SolidColorBrush();
|
||||
brush.Color = ColorOperations.GetColorByValue(valueRange, _ColorMap, valuePrimitive.Value);
|
||||
foreach (var valueRange in _ValueColorRanges)
|
||||
foreach (var valueRange in valueColorRanges)
|
||||
{
|
||||
if (valuePrimitive.Value >= valueRange.BottomValue & valuePrimitive.Value <= valueRange.TopValue & (!valueRange.IsActive))
|
||||
if (valuePrimitive.Value >= valueRange.ExactValues.BottomValue & valuePrimitive.Value <= valueRange.ExactValues.TopValue & (!valueRange.IsActive))
|
||||
{
|
||||
brush.Color = Colors.Gray;
|
||||
}
|
||||
}
|
||||
shape.ToolTip = valuePrimitive.Value;
|
||||
shape.ToolTip = roundLogic.RoundValue(valuePrimitive.Value);
|
||||
shape.Tag = valuePrimitive;
|
||||
shape.Fill = brush;
|
||||
Canvas.SetLeft(shape, valuePrimitive.CenterX - addX - dX);
|
||||
@@ -306,10 +303,24 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels
|
||||
{
|
||||
UserValueRange.TopValue = UserValueRange.BottomValue;
|
||||
}
|
||||
if (SetMinValue) { valueRange.BottomValue = UserValueRange.BottomValue; } else { UserValueRange.BottomValue = valueRange.BottomValue; }
|
||||
if (SetMaxValue) { valueRange.TopValue = UserValueRange.TopValue; } else { UserValueRange.TopValue = valueRange.TopValue; }
|
||||
_ValueRanges = ValueRangeOperations.DivideValueRange(valueRange, RangeNumber);
|
||||
_ValueColorRanges = ColorOperations.GetValueColorRanges(valueRange, _ValueRanges, _ColorMap);
|
||||
if (SetMinValue == true)
|
||||
{
|
||||
valueRange.BottomValue = UserValueRange.BottomValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
UserValueRange.BottomValue = valueRange.BottomValue;
|
||||
}
|
||||
if (SetMaxValue == true)
|
||||
{
|
||||
valueRange.TopValue = UserValueRange.TopValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
UserValueRange.TopValue = valueRange.TopValue;
|
||||
}
|
||||
valueRanges = ValueRangeOperations.DivideValueRange(valueRange, RangeNumber);
|
||||
valueColorRanges = ColorOperations.GetValueColorRanges(valueRange, valueRanges, _ColorMap);
|
||||
}
|
||||
private void SetCrossLine(object commandParameter)
|
||||
{
|
||||
|
||||
@@ -1,23 +1,7 @@
|
||||
using FieldVisualizer.Entities.ColorMaps;
|
||||
using FieldVisualizer.Entities.ColorMaps.Factories;
|
||||
using FieldVisualizer.Entities.Values;
|
||||
using FieldVisualizer.Entities.Values.Primitives;
|
||||
using FieldVisualizer.Infrastructure.Commands;
|
||||
using FieldVisualizer.InfraStructures.Enums;
|
||||
using FieldVisualizer.InfraStructures.Exceptions;
|
||||
using FieldVisualizer.InfraStructures.Strings;
|
||||
using FieldVisualizer.Services.ColorServices;
|
||||
using FieldVisualizer.Services.PrimitiveServices;
|
||||
using FieldVisualizer.Services.ValueRanges;
|
||||
using FieldVisualizer.Entities.Values.Primitives;
|
||||
using FieldVisualizer.ViewModels.FieldViewerViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace FieldVisualizer.Windows.UserControls
|
||||
{
|
||||
@@ -39,17 +23,6 @@ namespace FieldVisualizer.Windows.UserControls
|
||||
viewModel.Legend = LegendViewer;
|
||||
}
|
||||
|
||||
//public FieldViewer(FieldViewerViewModel vm)
|
||||
//{
|
||||
// InitializeComponent();
|
||||
// viewModel = vm;
|
||||
// this.DataContext = viewModel;
|
||||
// PrimitiveSet = viewModel.PrimitiveSet;
|
||||
// viewModel.WorkPlaneBox = WorkPlaneBox;
|
||||
// viewModel.WorkPlaneCanvas = WorkPlaneCanvas;
|
||||
// viewModel.Legend = LegendViewer;
|
||||
//}
|
||||
|
||||
public IPrimitiveSet PrimitiveSet { get => viewModel.PrimitiveSet; set { viewModel.PrimitiveSet = value; } }
|
||||
|
||||
internal void Refresh()
|
||||
|
||||
@@ -20,23 +20,23 @@
|
||||
<ColumnDefinition Width="10"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox Name="ActiveCheckBox" Grid.Column="0" IsChecked="{Binding Path=IsActive}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<Rectangle Grid.Column="1" Margin="0,2,0,2" ToolTip="{Binding Path=BottomValue}">
|
||||
<Rectangle Grid.Column="1" Margin="0,2,0,2" ToolTip="{Binding Path=RoundedValues.BottomValue}">
|
||||
<Rectangle.Fill>
|
||||
<SolidColorBrush Color="{Binding Path=BottomColor}"/>
|
||||
<SolidColorBrush Color="{Binding Path=ExactValues.BottomColor}"/>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<Rectangle Grid.Column="2" Margin="0,2,0,2">
|
||||
<Rectangle.Fill>
|
||||
<LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
|
||||
<GradientStop Color="{Binding Path=BottomColor}"/>
|
||||
<GradientStop Color="{Binding Path=TopColor}" Offset="1"/>
|
||||
<GradientStop Color="{Binding Path=ExactValues.BottomColor}"/>
|
||||
<GradientStop Color="{Binding Path=ExactValues.TopColor}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="#FF868686" Text="{Binding AverageValue}"/>
|
||||
<Rectangle Grid.Column="3" Margin="0,2,0,2" ToolTip="{Binding Path=TopValue}">
|
||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="#FF868686" Text="{Binding RoundedValues.AverageValue}"/>
|
||||
<Rectangle Grid.Column="3" Margin="0,2,0,2" ToolTip="{Binding Path=RoundedValues.TopValue}">
|
||||
<Rectangle.Fill>
|
||||
<SolidColorBrush Color="{Binding Path=TopColor}"/>
|
||||
<SolidColorBrush Color="{Binding Path=ExactValues.TopColor}"/>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
</Grid>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
xmlns:FieldViewerControl="clr-namespace:FieldVisualizer.Windows.UserControls"
|
||||
xmlns:local="clr-namespace:FieldVisualizer.Windows"
|
||||
mc:Ignorable="d"
|
||||
Title="FieldViewer" Height="800" Width="1200" WindowStartupLocation="CenterOwner">
|
||||
Title="FieldViewer" Height="800" Width="1200" MinHeight="400" MinWidth="800" MaxHeight="1000" MaxWidth="1500" WindowStartupLocation="CenterScreen" ShowInTaskbar="False">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300"/>
|
||||
|
||||
@@ -14,6 +14,9 @@ EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StructureHelperLogics", "StructureHelperLogics\StructureHelperLogics.csproj", "{C9192AE7-EE6D-409C-A05C-3549D78CBB34}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FieldVisualizer", "FieldVisualizer\FieldVisualizer.csproj", "{6CAC5B83-81F3-47C2-92A1-0F94A58491C2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{F1548BD2-7FE8-46C2-9BC4-9BA813A5C59A} = {F1548BD2-7FE8-46C2-9BC4-9BA813A5C59A}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
<ResourceDictionary Source="Infrastructure/UI/Resources/ShapeEditTemplates.xaml"/>
|
||||
<ResourceDictionary Source="Infrastructure/UI/Resources/PrimitiveToolTips.xaml"/>
|
||||
<ResourceDictionary Source="Infrastructure/UI/Resources/ITemEditPanels.xaml"/>
|
||||
<ResourceDictionary Source="Infrastructure/UI/Resources/ForceTemplates.xaml"/>
|
||||
<ResourceDictionary Source="Infrastructure/UI/Resources/IconDictionary.xaml"/>
|
||||
<ResourceDictionary Source="Infrastructure/UI/Resources/GraphsTemplates.xaml"/>
|
||||
<ResourceDictionary Source="Infrastructure/UI/Resources/LimitCurveTemplates.xaml"/>
|
||||
<ResourceDictionary Source="Infrastructure/UI/Resources/ServiceColors.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
|
||||
@@ -22,15 +22,15 @@ namespace StructureHelper
|
||||
builder.RegisterType<PrimitiveRepository>().As<IPrimitiveRepository>().SingleInstance();
|
||||
builder.RegisterType<UnitSystemService>().AsSelf().SingleInstance();
|
||||
builder.RegisterType<CalculationService>().AsSelf().SingleInstance();
|
||||
builder.RegisterType<MainModel>().AsSelf().SingleInstance();
|
||||
builder.RegisterType<MainViewModel>().AsSelf().SingleInstance();
|
||||
builder.RegisterType<CrossSectionModel>().AsSelf().SingleInstance();
|
||||
builder.RegisterType<CrossSectionViewModel>().AsSelf().SingleInstance();
|
||||
|
||||
builder.RegisterType<MainView>().AsSelf();
|
||||
builder.RegisterType<CrossSectionView>().AsSelf();
|
||||
|
||||
Container = builder.Build();
|
||||
Scope = Container.Resolve<ILifetimeScope>();
|
||||
|
||||
var window = Scope.Resolve<MainView>();
|
||||
var window = Scope.Resolve<CrossSectionView>();
|
||||
window.Show();
|
||||
}
|
||||
|
||||
|
||||
7
StructureHelper/Documentation/License.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Copyright (c) 2023 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
7
StructureHelper/Documentation/LicenseRus.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Copyright (c) 2023 Редикульцев Евгений, Екатеринбург, Россия
|
||||
|
||||
Данная лицензия разрешает лицам, получившим копию данного программного обеспечения и сопутствующей документации (далее — Программное обеспечение), безвозмездно использовать Программное обеспечение без ограничений, включая неограниченное право на использование, копирование, изменение, слияние, публикацию, распространение, сублицензирование и/или продажу копий Программного обеспечения, а также лицам, которым предоставляется данное Программное обеспечение, при соблюдении следующих условий:
|
||||
|
||||
Указанное выше уведомление об авторском праве и данные условия должны быть включены во все копии или значимые части данного Программного обеспечения.
|
||||
|
||||
ДАННОЕ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, ЯВНО ВЫРАЖЕННЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ ГАРАНТИИ ТОВАРНОЙ ПРИГОДНОСТИ, СООТВЕТСТВИЯ ПО ЕГО КОНКРЕТНОМУ НАЗНАЧЕНИЮ И ОТСУТСТВИЯ НАРУШЕНИЙ, НО НЕ ОГРАНИЧИВАЯСЬ ИМИ. НИ В КАКОМ СЛУЧАЕ АВТОРЫ ИЛИ ПРАВООБЛАДАТЕЛИ НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ПО КАКИМ-ЛИБО ИСКАМ, ЗА УЩЕРБ ИЛИ ПО ИНЫМ ТРЕБОВАНИЯМ, В ТОМ ЧИСЛЕ, ПРИ ДЕЙСТВИИ КОНТРАКТА, ДЕЛИКТЕ ИЛИ ИНОЙ СИТУАЦИИ, ВОЗНИКШИМ ИЗ-ЗА ИСПОЛЬЗОВАНИЯ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ ИЛИ ИНЫХ ДЕЙСТВИЙ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ.
|
||||
BIN
StructureHelper/Documentation/Manuals/UserManual.docx
Normal file
BIN
StructureHelper/Documentation/Manuals/UserManual.pdf
Normal file
14
StructureHelper/Infrastructure/Enums/ActionType.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Infrastructure.Enums
|
||||
{
|
||||
public enum ActionType
|
||||
{
|
||||
ForceCombination,
|
||||
ForceCombinationByFactor
|
||||
}
|
||||
}
|
||||
16
StructureHelper/Infrastructure/Enums/CalculatorTypes.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Infrastructure.Enums
|
||||
{
|
||||
public enum CalculatorTypes
|
||||
{
|
||||
ForceCalculator,
|
||||
LimitCurveCalculator,
|
||||
CrackCalculator,
|
||||
FireCalculator
|
||||
}
|
||||
}
|
||||
17
StructureHelper/Infrastructure/Enums/MaterialType.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Infrastructure.Enums
|
||||
{
|
||||
internal enum MaterialType
|
||||
{
|
||||
Concrete,
|
||||
Reinforcement,
|
||||
Elastic,
|
||||
CarbonFiber,
|
||||
GlassFiber
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,8 @@
|
||||
public enum PrimitiveType
|
||||
{
|
||||
Point,
|
||||
Rectangle
|
||||
Rectangle,
|
||||
Circle,
|
||||
Reinforcement
|
||||
}
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using StructureHelper.Infrastructure.UI.Converters.Units;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Strings;
|
||||
using StructureHelperCommon.Services.Units;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Infrastructure.UI.Converters
|
||||
{
|
||||
internal static class CommonOperation
|
||||
{
|
||||
private static IEnumerable<IUnit> units = UnitsFactory.GetUnitCollection();
|
||||
|
||||
public static double ConvertToDoubleChangeComma(string s)
|
||||
{
|
||||
double result;
|
||||
if (!double.TryParse(s, NumberStyles.Any, CultureInfo.CurrentCulture, out result) &&
|
||||
!double.TryParse(s, NumberStyles.Any, CultureInfo.GetCultureInfo("en-US"), out result) &&
|
||||
!double.TryParse(s, NumberStyles.Any, CultureInfo.InvariantCulture, out result))
|
||||
{
|
||||
throw new StructureHelperException($"{ErrorStrings.IncorrectValue}: {s}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static IStringDoublePair DivideIntoStringDoublePair(string s)
|
||||
{
|
||||
s = s.Replace(" ", "");
|
||||
string digitPattern = @"^[-]?[+]?\d+(\.?|\,?)\d*";
|
||||
string textPattern = @"[0-9]|\.|\,";
|
||||
string caracterPattern = "[a-z]+$";
|
||||
string target = "";
|
||||
Regex regexText = new Regex(textPattern);
|
||||
string textString = regexText.Replace(s, target);
|
||||
var textMatch = Regex.Match(textString, caracterPattern, RegexOptions.IgnoreCase);
|
||||
if (textMatch.Success) {textString = textMatch.Value.ToLower();}
|
||||
var match = Regex.Match(s, digitPattern);
|
||||
if (match.Success)
|
||||
{
|
||||
string digitString = match.Value;
|
||||
double digit = ConvertToDoubleChangeComma(digitString);
|
||||
return new StringDoublePair() { Digit = digit, Text = textString };
|
||||
}
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect);
|
||||
}
|
||||
|
||||
public static IUnit GetUnit(UnitTypes unitType, string unitName)
|
||||
{
|
||||
return units.Where(u => u.UnitType == unitType & u.Name == unitName).Single();
|
||||
}
|
||||
|
||||
public static string Convert(IUnit unit, string unitName, object value)
|
||||
{
|
||||
double val;
|
||||
if (value != null) { val = (double)value; }
|
||||
else { throw new Exception($"{unitName} value is null"); }
|
||||
val *= unit.Multiplyer;
|
||||
string strValue = $"{val} {unit.Name}";
|
||||
return strValue;
|
||||
}
|
||||
|
||||
public static double ConvertBack(UnitTypes unitType, IUnit unit, object value)
|
||||
{
|
||||
double val;
|
||||
double multy;
|
||||
double coefficient = unit.Multiplyer;
|
||||
var strVal = value as string;
|
||||
IStringDoublePair pair = DivideIntoStringDoublePair(strVal);
|
||||
try
|
||||
{
|
||||
multy = GetMultiplyer(unitType, pair.Text);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
multy = coefficient;
|
||||
}
|
||||
val = pair.Digit / multy;
|
||||
return val;
|
||||
}
|
||||
|
||||
private static double GetMultiplyer(UnitTypes unitType, string unitName)
|
||||
{
|
||||
try
|
||||
{
|
||||
return units.Where(u => u.UnitType == unitType & u.Name == unitName).Single().Multiplyer;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Infrastructure.UI.Converters
|
||||
{
|
||||
internal interface IStringDoublePair
|
||||
{
|
||||
double Digit { get; }
|
||||
string Text { get; }
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace StructureHelper.Infrastructure.UI.Converters.Units
|
||||
internal class Area : UnitBase
|
||||
{
|
||||
public override UnitTypes UnitType { get => UnitTypes.Area; }
|
||||
public override IUnit CurrentUnit { get => CommonOperation.GetUnit(UnitType, "mm2"); }
|
||||
public override IUnit CurrentUnit { get => UnitLogic.GetUnit(UnitType, "mm2"); }
|
||||
public override string UnitName { get => "Area"; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Services;
|
||||
using StructureHelperCommon.Services.Units;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Infrastructure.UI.Converters.Units
|
||||
{
|
||||
internal class CrackWidth : UnitBase
|
||||
{
|
||||
public CrackWidth()
|
||||
{
|
||||
OperationLogic = new ConvertUnitLogic()
|
||||
{
|
||||
MathRoundLogic = new FixedRoundLogic()
|
||||
{
|
||||
DigitQuant = 3
|
||||
}
|
||||
};
|
||||
}
|
||||
public override UnitTypes UnitType { get => UnitTypes.Length; }
|
||||
public override IUnit CurrentUnit { get => UnitLogic.GetUnit(UnitType, "mm"); }
|
||||
public override string UnitName { get => "Length"; }
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ namespace StructureHelper.Infrastructure.UI.Converters.Units
|
||||
internal class Curvature : UnitBase
|
||||
{
|
||||
public override UnitTypes UnitType { get => UnitTypes.Curvature; }
|
||||
public override IUnit CurrentUnit { get => CommonOperation.GetUnit(UnitType, "1/mm"); }
|
||||
public override IUnit CurrentUnit { get => UnitLogic.GetUnit(UnitType, "1/mm"); }
|
||||
public override string UnitName { get => "Curvature"; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace StructureHelper.Infrastructure.UI.Converters.Units
|
||||
internal class Force : UnitBase
|
||||
{
|
||||
public override UnitTypes UnitType { get => UnitTypes.Force; }
|
||||
public override IUnit CurrentUnit { get => CommonOperation.GetUnit(UnitType, "kN"); }
|
||||
public override IUnit CurrentUnit { get => UnitLogic.GetUnit(UnitType, "kN"); }
|
||||
public override string UnitName { get => "Force"; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,13 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Strings;
|
||||
using StructureHelperCommon.Services.Units;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace StructureHelper.Infrastructure.UI.Converters.Units
|
||||
{
|
||||
internal class Length : UnitBase
|
||||
{
|
||||
|
||||
public override UnitTypes UnitType { get => UnitTypes.Length; }
|
||||
public override IUnit CurrentUnit { get => CommonOperation.GetUnit(UnitType, "mm"); }
|
||||
public override IUnit CurrentUnit { get => UnitLogic.GetUnit(UnitType, "mm"); }
|
||||
public override string UnitName { get => "Length"; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace StructureHelper.Infrastructure.UI.Converters.Units
|
||||
internal class Moment : UnitBase
|
||||
{
|
||||
public override UnitTypes UnitType { get => UnitTypes.Moment; }
|
||||
public override IUnit CurrentUnit { get => CommonOperation.GetUnit(UnitType, "kNm"); }
|
||||
public override IUnit CurrentUnit { get => UnitLogic.GetUnit(UnitType, "kNm"); }
|
||||
public override string UnitName { get => "Moment"; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Strings;
|
||||
using StructureHelperCommon.Services.Units;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
@@ -12,6 +12,8 @@ namespace StructureHelper.Infrastructure.UI.Converters.Units
|
||||
{
|
||||
internal class PlainDouble : IValueConverter
|
||||
{
|
||||
IConvertUnitLogic operationLogic = new ConvertUnitLogic();
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
try
|
||||
@@ -28,7 +30,7 @@ namespace StructureHelper.Infrastructure.UI.Converters.Units
|
||||
{
|
||||
try
|
||||
{
|
||||
return CommonOperation.ConvertToDoubleChangeComma((string)value);
|
||||
return ProcessString.ConvertCommaToCultureSettings((string)value);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Services;
|
||||
using StructureHelperCommon.Services.Units;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -12,8 +13,19 @@ namespace StructureHelper.Infrastructure.UI.Converters.Units
|
||||
{
|
||||
internal class Stress : UnitBase
|
||||
{
|
||||
|
||||
public override UnitTypes UnitType { get => UnitTypes.Stress; }
|
||||
public override IUnit CurrentUnit { get => CommonOperation.GetUnit(UnitType, "MPa"); }
|
||||
public override IUnit CurrentUnit { get => UnitLogic.GetUnit(UnitType, "MPa"); }
|
||||
public override string UnitName { get => "Stress"; }
|
||||
public Stress()
|
||||
{
|
||||
OperationLogic = new ConvertUnitLogic()
|
||||
{
|
||||
MathRoundLogic = new SmartRoundLogic()
|
||||
{
|
||||
DigitQuant = 3
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Parameters;
|
||||
using StructureHelperCommon.Services;
|
||||
using StructureHelperCommon.Services.Units;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -14,19 +17,61 @@ namespace StructureHelper.Infrastructure.UI.Converters.Units
|
||||
{
|
||||
internal abstract class UnitBase : IValueConverter
|
||||
{
|
||||
IMathRoundLogic roundLogic = new DirectRoundLogic();
|
||||
public IConvertUnitLogic OperationLogic { get; set; } = new ConvertUnitLogic();
|
||||
public IGetUnitLogic UnitLogic { get; set; } = new GetUnitLogic();
|
||||
public abstract UnitTypes UnitType { get; }
|
||||
public abstract IUnit CurrentUnit { get; }
|
||||
public abstract string UnitName { get;}
|
||||
/// <summary>
|
||||
/// From variable to user
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="targetType"></param>
|
||||
/// <param name="parameter"></param>
|
||||
/// <param name="culture"></param>
|
||||
/// <returns></returns>
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return CommonOperation.Convert(CurrentUnit, UnitName, value);
|
||||
var pair = OperationLogic.Convert(CurrentUnit, UnitName, value);
|
||||
var result = pair.Value;
|
||||
if (parameter is not null)
|
||||
{
|
||||
if (parameter is string paramString)
|
||||
{
|
||||
var logic = new ProcessDoublePairLogic() { DigitPlace = DigitPlace.Any };
|
||||
var paramPair = logic.GetValuePairByString(paramString);
|
||||
string paramTextPart = paramPair.Text.ToLower();
|
||||
int paramValuePart = (int)paramPair.Value;
|
||||
if (paramTextPart == "smart")
|
||||
{
|
||||
roundLogic = new SmartRoundLogic() { DigitQuant = paramValuePart };
|
||||
}
|
||||
|
||||
else if (paramTextPart == "fixed")
|
||||
{
|
||||
roundLogic = new FixedRoundLogic() { DigitQuant = paramValuePart };
|
||||
}
|
||||
result = roundLogic.RoundValue(result);
|
||||
}
|
||||
}
|
||||
string strValue = $"{result} {pair.Text}";
|
||||
return strValue;
|
||||
}
|
||||
/// <summary>
|
||||
/// From user to variable
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="targetType"></param>
|
||||
/// <param name="parameter"></param>
|
||||
/// <param name="culture"></param>
|
||||
/// <returns></returns>
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
try
|
||||
{
|
||||
return CommonOperation.ConvertBack(UnitType, CurrentUnit, value);
|
||||
double result = OperationLogic.ConvertBack(UnitType, CurrentUnit, value);
|
||||
|
||||
return result;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Infrastructure.UI.Converters.Units
|
||||
{
|
||||
internal static class UnitConstatnts
|
||||
internal static class UnitConstants
|
||||
{
|
||||
public static double Length = 1e3d;
|
||||
public static double Force = 1e-3d;
|
||||
@@ -0,0 +1,64 @@
|
||||
using StructureHelper.Infrastructure.UI.Converters.Units;
|
||||
using StructureHelper.Windows.ViewModels.NdmCrossSections;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Infrastructure.UI.DataContexts
|
||||
{
|
||||
public class CircleViewPrimitive : PrimitiveBase, IHasCenter
|
||||
{
|
||||
ICirclePrimitive primitive;
|
||||
public double Diameter
|
||||
{
|
||||
get
|
||||
{
|
||||
return primitive.Diameter;
|
||||
}
|
||||
set
|
||||
{
|
||||
primitive.Diameter = value;
|
||||
RefreshPlacement();
|
||||
}
|
||||
}
|
||||
|
||||
public double PrimitiveLeft => DeltaX - Diameter / 2d;
|
||||
public double PrimitiveTop => DeltaY - Diameter / 2d;
|
||||
|
||||
public CircleViewPrimitive(INdmPrimitive primitive) : base(primitive)
|
||||
{
|
||||
if (primitive is not ICirclePrimitive)
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $"\nExpected: {nameof(ICirclePrimitive)}, But was: {nameof(primitive)}");
|
||||
}
|
||||
var circle = primitive as ICirclePrimitive;
|
||||
this.primitive = circle;
|
||||
DivisionViewModel = new HasDivisionViewModel(circle);
|
||||
}
|
||||
|
||||
public override INdmPrimitive GetNdmPrimitive()
|
||||
{
|
||||
return primitive;
|
||||
}
|
||||
|
||||
private void RefreshPlacement()
|
||||
{
|
||||
OnPropertyChanged(nameof(Diameter));
|
||||
OnPropertyChanged(nameof(CenterX));
|
||||
OnPropertyChanged(nameof(CenterY));
|
||||
OnPropertyChanged(nameof(PrimitiveLeft));
|
||||
OnPropertyChanged(nameof(PrimitiveTop));
|
||||
}
|
||||
public override void Refresh()
|
||||
{
|
||||
OnPropertyChanged(nameof(Diameter));
|
||||
OnPropertyChanged(nameof(PrimitiveLeft));
|
||||
OnPropertyChanged(nameof(PrimitiveTop));
|
||||
base.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Infrastructure.UI.DataContexts
|
||||
{
|
||||
internal static class ViewPrimitiveFactory
|
||||
{
|
||||
// to do public static PrimitiveBase GetViewPrimitive() { }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using StructureHelper.Windows.ViewModels.NdmCrossSections;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -8,7 +9,6 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
|
||||
{
|
||||
internal interface IHasDivision
|
||||
{
|
||||
int NdmMinDivision { get; set; }
|
||||
double NdmMaxSize { get; set; }
|
||||
HasDivisionViewModel HasDivisionViewModel { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
using StructureHelper.Infrastructure.Enums;
|
||||
using StructureHelper.Services.Primitives;
|
||||
using StructureHelper.UnitSystem.Systems;
|
||||
using StructureHelper.Windows.MainWindow;
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using StructureHelperLogics.Models.Primitives;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Infrastructure.UI.DataContexts
|
||||
{
|
||||
internal class LineViewPrimitive : PrimitiveBase
|
||||
{
|
||||
public LineViewPrimitive(ILinePrimitive primitive) : base(primitive)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//public LineViewPrimitive(double x, double y, MainViewModel ownerVM) : base(x, y, ownerVM)
|
||||
//{
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,11 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
|
||||
{
|
||||
return primitive;
|
||||
}
|
||||
|
||||
public override void Refresh()
|
||||
{
|
||||
RefreshPlacement();
|
||||
base.Refresh();
|
||||
}
|
||||
private void RefreshPlacement()
|
||||
{
|
||||
OnPropertyChanged(nameof(Area));
|
||||
|
||||
@@ -1,27 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Documents;
|
||||
using StructureHelper.Models.Materials;
|
||||
using StructureHelper.Services.Primitives;
|
||||
using StructureHelper.Windows.MainWindow;
|
||||
using StructureHelper.Windows.ViewModels.NdmCrossSections;
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using System;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using StructureHelper.Infrastructure.Enums;
|
||||
using StructureHelper.Infrastructure.UI.Converters.Units;
|
||||
using StructureHelper.Models.Materials;
|
||||
using StructureHelper.Services.Primitives;
|
||||
using StructureHelper.UnitSystem.Systems;
|
||||
using StructureHelper.Windows.MainWindow;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Strings;
|
||||
using StructureHelperLogics.Models.Materials;
|
||||
using StructureHelperCommon.Services.ColorServices;
|
||||
using StructureHelperLogics.Models.Primitives;
|
||||
using System.Windows.Controls;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
|
||||
namespace StructureHelper.Infrastructure.UI.DataContexts
|
||||
{
|
||||
public abstract class PrimitiveBase : ViewModelBase
|
||||
public abstract class PrimitiveBase : ViewModelBase, IObserver<IRectangleShape>
|
||||
{
|
||||
#region Поля
|
||||
private IPrimitiveRepository primitiveRepository;
|
||||
@@ -34,6 +23,7 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
|
||||
#endregion
|
||||
|
||||
#region Свойства
|
||||
public HasDivisionViewModel DivisionViewModel { get; set; }
|
||||
public INdmPrimitive NdmPrimitive
|
||||
{
|
||||
get => primitive;
|
||||
@@ -51,52 +41,61 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
|
||||
}
|
||||
public double CenterX
|
||||
{
|
||||
get => primitive.CenterX;
|
||||
get => primitive.Center.X;
|
||||
set
|
||||
{
|
||||
primitive.CenterX = value;
|
||||
primitive.Center.X = value;
|
||||
OnPropertyChanged(nameof(CenterX));
|
||||
}
|
||||
}
|
||||
public double CenterY
|
||||
{
|
||||
get => primitive.CenterY;
|
||||
get => primitive.Center.Y;
|
||||
set
|
||||
{
|
||||
primitive.CenterY = value;
|
||||
primitive.Center.Y = value;
|
||||
OnPropertyChanged(nameof(CenterY));
|
||||
OnPropertyChanged(nameof(InvertedCenterY));
|
||||
}
|
||||
}
|
||||
public double InvertedCenterY => - CenterY;
|
||||
public double PrestrainKx
|
||||
{ get => primitive.UsersPrestrain.Kx;
|
||||
public bool Triangulate
|
||||
{
|
||||
get => primitive.Triangulate;
|
||||
set
|
||||
{
|
||||
primitive.UsersPrestrain.Kx = value;
|
||||
primitive.Triangulate = value;
|
||||
OnPropertyChanged(nameof(Triangulate));
|
||||
}
|
||||
}
|
||||
public double InvertedCenterY => - CenterY;
|
||||
public double PrestrainKx
|
||||
{ get => primitive.UsersPrestrain.Mx;
|
||||
set
|
||||
{
|
||||
primitive.UsersPrestrain.Mx = value;
|
||||
OnPropertyChanged(nameof(PrestrainKx));
|
||||
}
|
||||
}
|
||||
public double PrestrainKy
|
||||
{ get => primitive.UsersPrestrain.Ky;
|
||||
{ get => primitive.UsersPrestrain.My;
|
||||
set
|
||||
{
|
||||
primitive.UsersPrestrain.Ky = value;
|
||||
primitive.UsersPrestrain.My = value;
|
||||
OnPropertyChanged(nameof(PrestrainKy));
|
||||
}
|
||||
}
|
||||
public double PrestrainEpsZ
|
||||
{ get => primitive.UsersPrestrain.EpsZ;
|
||||
{ get => primitive.UsersPrestrain.Nz;
|
||||
set
|
||||
{
|
||||
primitive.UsersPrestrain.EpsZ = value;
|
||||
primitive.UsersPrestrain.Nz = value;
|
||||
OnPropertyChanged(nameof(PrestrainEpsZ));
|
||||
}
|
||||
}
|
||||
|
||||
public double AutoPrestrainKx => primitive.AutoPrestrain.Kx;
|
||||
public double AutoPrestrainKy => primitive.AutoPrestrain.Ky;
|
||||
public double AutoPrestrainEpsZ => primitive.AutoPrestrain.EpsZ;
|
||||
public double AutoPrestrainKx => primitive.AutoPrestrain.Mx;
|
||||
public double AutoPrestrainKy => primitive.AutoPrestrain.My;
|
||||
public double AutoPrestrainEpsZ => primitive.AutoPrestrain.Nz;
|
||||
|
||||
public IHeadMaterial HeadMaterial
|
||||
{
|
||||
@@ -239,30 +238,45 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
|
||||
this.primitive = primitive;
|
||||
}
|
||||
|
||||
public void RegisterDeltas(double dx, double dy)
|
||||
{
|
||||
DeltaX = dx;
|
||||
DeltaY = dy;
|
||||
}
|
||||
|
||||
public MainViewModel OwnerVM { get; private set; }
|
||||
public CrossSectionViewModel OwnerVM { get; private set; }
|
||||
|
||||
public double DeltaX { get; private set; }
|
||||
public double DeltaY { get; private set; }
|
||||
|
||||
public virtual INdmPrimitive GetNdmPrimitive()
|
||||
{
|
||||
RefreshNdmPrimitive();
|
||||
//RefreshNdmPrimitive();
|
||||
return primitive;
|
||||
}
|
||||
|
||||
public virtual void RefreshNdmPrimitive()
|
||||
public virtual void Refresh()
|
||||
{
|
||||
OnPropertyChanged(nameof(Name));
|
||||
OnPropertyChanged(nameof(Color));
|
||||
OnPropertyChanged(nameof(CenterX));
|
||||
OnPropertyChanged(nameof(CenterY));
|
||||
OnPropertyChanged(nameof(InvertedCenterY));
|
||||
OnPropertyChanged(nameof(SetMaterialColor));
|
||||
OnPropertyChanged(nameof(Triangulate));
|
||||
OnPropertyChanged(nameof(PrimitiveWidth));
|
||||
OnPropertyChanged(nameof(PrimitiveHeight));
|
||||
}
|
||||
|
||||
public void RefreshColor()
|
||||
public void OnCompleted()
|
||||
{
|
||||
OnPropertyChanged(nameof(Color));
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnError(Exception error)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnNext(IRectangleShape value)
|
||||
{
|
||||
DeltaX = value.Width / 2d;
|
||||
DeltaY = value.Height / 2d;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Strings;
|
||||
using StructureHelperLogics.Models.Primitives;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using System;
|
||||
@@ -17,21 +16,37 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
|
||||
public static ObservableCollection<PrimitiveBase> ConvertNdmPrimitivesToPrimitiveBase(IEnumerable<INdmPrimitive> primitives)
|
||||
{
|
||||
ObservableCollection<PrimitiveBase> viewItems = new ObservableCollection<PrimitiveBase>();
|
||||
foreach (var item in primitives)
|
||||
foreach (var primitive in primitives)
|
||||
{
|
||||
if (item is IPointPrimitive)
|
||||
{
|
||||
var point = item as IPointPrimitive;
|
||||
viewItems.Add(new PointViewPrimitive(point));
|
||||
}
|
||||
else if (item is IRectanglePrimitive)
|
||||
{
|
||||
var rect = item as IRectanglePrimitive;
|
||||
viewItems.Add(new RectangleViewPrimitive(rect));
|
||||
}
|
||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown);
|
||||
viewItems.Add(ConvertNdmPrimitiveToPrimitiveBase(primitive));
|
||||
}
|
||||
return viewItems;
|
||||
}
|
||||
public static PrimitiveBase ConvertNdmPrimitiveToPrimitiveBase(INdmPrimitive primitive)
|
||||
{
|
||||
PrimitiveBase viewItem;
|
||||
if (primitive is IRectanglePrimitive)
|
||||
{
|
||||
var rect = primitive as IRectanglePrimitive;
|
||||
viewItem = new RectangleViewPrimitive(rect);
|
||||
}
|
||||
else if (primitive is ICirclePrimitive)
|
||||
{
|
||||
var circle = primitive as ICirclePrimitive;
|
||||
viewItem = new CircleViewPrimitive(circle);
|
||||
}
|
||||
else if (primitive is IPointPrimitive & primitive is not RebarPrimitive)
|
||||
{
|
||||
var point = primitive as IPointPrimitive;
|
||||
viewItem = new PointViewPrimitive(point);
|
||||
}
|
||||
else if (primitive is RebarPrimitive)
|
||||
{
|
||||
var point = primitive as RebarPrimitive;
|
||||
viewItem = new ReinforcementViewPrimitive(point);
|
||||
}
|
||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + $". Actual type: {primitive.GetType()}");
|
||||
return viewItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
using StructureHelper.Infrastructure.Enums;
|
||||
using StructureHelper.UnitSystem.Systems;
|
||||
using StructureHelper.Windows.MainWindow;
|
||||
using StructureHelperLogics.Models.Materials;
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using System;
|
||||
using StructureHelperLogics.Models.Primitives;
|
||||
using StructureHelper.Windows.ViewModels.NdmCrossSections;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
|
||||
namespace StructureHelper.Infrastructure.UI.DataContexts
|
||||
{
|
||||
public class RectangleViewPrimitive : PrimitiveBase, IHasDivision, IHasCenter
|
||||
public class RectangleViewPrimitive : PrimitiveBase, IHasCenter
|
||||
{
|
||||
private IRectanglePrimitive primitive;
|
||||
|
||||
@@ -42,30 +36,18 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
|
||||
{
|
||||
get => DeltaY - primitive.Height / 2d;
|
||||
}
|
||||
public int NdmMinDivision
|
||||
{
|
||||
get => primitive.NdmMinDivision;
|
||||
set
|
||||
{
|
||||
primitive.NdmMinDivision = value;
|
||||
OnPropertyChanged(nameof(NdmMinDivision));
|
||||
}
|
||||
}
|
||||
public double NdmMaxSize
|
||||
{
|
||||
get => primitive.NdmMaxSize;
|
||||
set
|
||||
{
|
||||
primitive.NdmMaxSize = value;
|
||||
OnPropertyChanged(nameof(NdmMaxSize));
|
||||
}
|
||||
}
|
||||
|
||||
public RectangleViewPrimitive(IRectanglePrimitive _primitive) : base(_primitive)
|
||||
{
|
||||
primitive = _primitive;
|
||||
DivisionViewModel = new HasDivisionViewModel(primitive);
|
||||
}
|
||||
public override void Refresh()
|
||||
{
|
||||
OnPropertyChanged(nameof(PrimitiveLeft));
|
||||
OnPropertyChanged(nameof(PrimitiveTop));
|
||||
base.Refresh();
|
||||
}
|
||||
|
||||
public override INdmPrimitive GetNdmPrimitive()
|
||||
{
|
||||
return primitive;
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Infrastructure.UI.DataContexts
|
||||
{
|
||||
public class ReinforcementViewPrimitive : PointViewPrimitive, IHasHostPrimitive
|
||||
{
|
||||
RebarPrimitive primitive;
|
||||
|
||||
public INdmPrimitive HostPrimitive
|
||||
{
|
||||
get => primitive.HostPrimitive;
|
||||
set
|
||||
{
|
||||
primitive.HostPrimitive = value;
|
||||
OnPropertyChanged(nameof(HostPrimitive));
|
||||
}
|
||||
}
|
||||
|
||||
public ReinforcementViewPrimitive(RebarPrimitive _primitive) : base(_primitive)
|
||||
{
|
||||
primitive = _primitive;
|
||||
}
|
||||
public override void Refresh()
|
||||
{
|
||||
OnPropertyChanged(nameof(HostPrimitive));
|
||||
base.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,10 +7,9 @@
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:mouseEventTriggers="clr-namespace:StructureHelper.Infrastructure.UI.Triggers.MouseEventTriggers"
|
||||
xmlns:dataContexts="clr-namespace:StructureHelper.Infrastructure.UI.DataContexts"
|
||||
xmlns:userControls="clr-namespace:StructureHelper.Infrastructure.UI.UserControls"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel>
|
||||
<Ellipse Style="{StaticResource EllipseStyle}" d:DataContext="{d:DesignInstance dataContexts:PointViewPrimitive}">
|
||||
<Ellipse Style="{StaticResource EllipseStyle}" d:DataContext="{d:DesignInstance dataContexts:PointViewPrimitive}" Tag ="{Binding}">
|
||||
<Ellipse.ToolTip>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -43,6 +42,5 @@
|
||||
</TransformGroup>
|
||||
</Ellipse.RenderTransform>
|
||||
</Ellipse>
|
||||
<userControls:PrimitivePopup Type="Rectangle" IsOpen="{Binding ParamsPanelVisibilty}" d:DataContext="{d:DesignInstance dataContexts:PrimitiveBase}"/>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:infrastructure="clr-namespace:StructureHelper.Infrastructure"
|
||||
xmlns:mouseEventTriggers="clr-namespace:StructureHelper.Infrastructure.UI.Triggers.MouseEventTriggers"
|
||||
xmlns:userControls="clr-namespace:StructureHelper.Infrastructure.UI.UserControls"
|
||||
xmlns:dataContexts="clr-namespace:StructureHelper.Infrastructure.UI.DataContexts"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance dataContexts:RectangleViewPrimitive}">
|
||||
@@ -52,6 +51,5 @@
|
||||
</Rectangle.RenderTransform>
|
||||
</Rectangle>
|
||||
</Grid>
|
||||
<userControls:PrimitivePopup IsOpen="{Binding ParamsPanelVisibilty}"/>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
||||
BIN
StructureHelper/Infrastructure/UI/Icons/Graphs/32px_crack.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
StructureHelper/Infrastructure/UI/Icons/Graphs/32px_fire.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
StructureHelper/Infrastructure/UI/Icons/Graphs/32px_graph_1.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
StructureHelper/Infrastructure/UI/Icons/Graphs/32px_graph_2.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
BIN
StructureHelper/Infrastructure/UI/Icons/Objects/Beam32.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
BIN
StructureHelper/Infrastructure/UI/Icons/Objects/Slab32.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
StructureHelper/Infrastructure/UI/Icons/actions/32px_delete.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
StructureHelper/Infrastructure/UI/Icons/actions/32px_edit.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
BIN
StructureHelper/Infrastructure/UI/Icons/analysis/Analysis32.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
BIN
StructureHelper/Infrastructure/UI/Icons/geometry/Circle32.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
StructureHelper/Infrastructure/UI/Icons/geometry/Point32.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
StructureHelper/Infrastructure/UI/Icons/geometry/Rebar32.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
StructureHelper/Infrastructure/UI/Icons/geometry/Rectangle32.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
BIN
StructureHelper/Infrastructure/UI/Icons/settings/32px_tools.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
BIN
StructureHelper/Infrastructure/UI/Resources/32px_add beam.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
BIN
StructureHelper/Infrastructure/UI/Resources/32px_edit.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
StructureHelper/Infrastructure/UI/Resources/Beam32.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
@@ -50,4 +50,172 @@
|
||||
</Style.Setters>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ToolButton" TargetType="Button">
|
||||
<Style.Resources>
|
||||
<Style TargetType="Image">
|
||||
<Setter Property="Width" Value="32"/>
|
||||
<Setter Property="Height" Value="32"/>
|
||||
<Setter Property="Margin" Value="-2"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" Value="0.25"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style TargetType="Viewbox">
|
||||
<Setter Property="Margin" Value="-2"/>
|
||||
<Setter Property="Width" Value="32"/>
|
||||
<Setter Property="Height" Value="32"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Stretch" Value="UniformToFill"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" Value="0.25"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Style.Resources>
|
||||
<Setter Property="Width" Value="32"/>
|
||||
<Setter Property="Height" Value="32"/>
|
||||
<Setter Property="Margin" Value="2,0,2,0"/>
|
||||
<Setter Property="Background" Value="#FFA19BC3"/>
|
||||
<Setter Property="BorderBrush" Value="Black"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ButtonImage16" TargetType="Image">
|
||||
<Setter Property="Height" Value="16"/>
|
||||
<Setter Property="Width" Value="16"/>
|
||||
</Style>
|
||||
<Style x:Key="ButtonImage32" TargetType="Image">
|
||||
<Setter Property="Height" Value="32"/>
|
||||
<Setter Property="Width" Value="32"/>
|
||||
</Style>
|
||||
|
||||
<Color x:Key="ButtonLight" A="255" B="255" G="255" R="255"/>
|
||||
<Color x:Key="CalculatorColor" A="255" B="149" G="149" R="211"/>
|
||||
<Color x:Key="CalculatorFrameColor" A="255" B="109" G="109" R="166"/>
|
||||
<Color x:Key="ResultColor" A="255" B="200" G="200" R="200"/>
|
||||
<Color x:Key="ResultFrameColor" A="255" B="100" G="100" R="100"/>
|
||||
<SolidColorBrush x:Key="CalculatorCanvas" Color="{DynamicResource CalculatorColor}"/>
|
||||
<SolidColorBrush x:Key="CalculatorFrame" Color="{DynamicResource CalculatorFrameColor}"/>
|
||||
<SolidColorBrush x:Key="ResultCanvas" Color="{DynamicResource ResultColor}"/>
|
||||
<SolidColorBrush x:Key="ResultFrame" Color="{DynamicResource ResultFrameColor}"/>
|
||||
|
||||
<Style x:Key="ButtonCanvas" TargetType="Canvas">
|
||||
<Setter Property="Width" Value="32"/>
|
||||
<Setter Property="Height" Value="32"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ButtonCalculatorCanvas" TargetType="Canvas" BasedOn="{StaticResource ButtonCanvas}">
|
||||
<Setter Property="Background" Value="{DynamicResource CalculatorCanvas}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ButtonResultCanvas" TargetType="Canvas" BasedOn="{StaticResource ButtonCanvas}">
|
||||
<Setter Property="Background" Value="{DynamicResource ResultCanvas}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ButtonRect" TargetType="Rectangle">
|
||||
<Setter Property="Margin" Value="3"/>
|
||||
<Setter Property="Width" Value="26"/>
|
||||
<Setter Property="Height" Value="26"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="StrokeThickness" Value="1"/>
|
||||
</Style>
|
||||
|
||||
|
||||
<DataTemplate x:Key="OkCancelButtons">
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Style="{StaticResource CancelButton}" Command="{Binding CancelCommand}"/>
|
||||
<Button Style="{StaticResource OkButton}" Command="{Binding OkCommand}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="ButtonCalculatorRectangle">
|
||||
<Rectangle Style="{DynamicResource ButtonRect}" Stroke="{DynamicResource CalculatorFrame}">
|
||||
<Rectangle.Fill>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="{DynamicResource ButtonLight}" Offset="0.2"/>
|
||||
<GradientStop Color="{DynamicResource CalculatorColor}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="ButtonResultRectangle">
|
||||
<Rectangle Style="{DynamicResource ButtonRect}" Stroke="{DynamicResource ResultFrame}">
|
||||
<Rectangle.Fill>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="{DynamicResource ButtonLight}" Offset="0.2"/>
|
||||
<GradientStop Color="{DynamicResource ResultColor}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="DiagramCalculator">
|
||||
<Canvas Style="{DynamicResource ButtonCalculatorCanvas}">
|
||||
<Canvas.Children>
|
||||
<ContentControl ContentTemplate="{DynamicResource ButtonCalculatorRectangle}"/>
|
||||
<Line Margin="4" X1="0" Y1="20" X2="25" Y2="20" StrokeThickness="1.5" Stroke="{DynamicResource CalculatorFrame}"/>
|
||||
<Line Margin="4" X1="4" Y1="0" X2="4" Y2="25" StrokeThickness="1.5" Stroke="{DynamicResource CalculatorFrame}"/>
|
||||
<Path Margin="4" Data="M 0 5 l 4 -4 l 7 4 l 7 6 l 2 4 l -2 7 l -2 2 " Stroke="{DynamicResource CalculatorFrame}"/>
|
||||
<TextBlock Margin="4,2,0,0" Text="M-N" Foreground="Black" FontSize="10" HorizontalAlignment="Stretch" FontWeight="Bold" />
|
||||
</Canvas.Children>
|
||||
</Canvas>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CrackCalculator">
|
||||
<Canvas Style="{DynamicResource ButtonCalculatorCanvas}">
|
||||
<Canvas.Children>
|
||||
<ContentControl ContentTemplate="{DynamicResource ButtonCalculatorRectangle}"/>
|
||||
<Path Margin="4" Data="M 0 0 l 25 0 l 0 20
|
||||
l -4 0
|
||||
l -1 -5 l 1 -5 l -2 5 l -2 5
|
||||
l -3 0
|
||||
l 0 -5 l 0 -10 l -2 10 l -2 5
|
||||
l -3 0
|
||||
l -1 -5 l 1 -5 l -2 5 l -2 5
|
||||
l -4 0" Fill="{DynamicResource CalculatorFrame}"/>
|
||||
<TextBlock Margin="4,2,0,0" Text="Crc" Foreground="White" FontSize="10" HorizontalAlignment="Stretch" FontWeight="Bold" />
|
||||
</Canvas.Children>
|
||||
</Canvas>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CalculatorRun">
|
||||
<Canvas Style="{DynamicResource ButtonCalculatorCanvas}">
|
||||
<Canvas.Children>
|
||||
<ContentControl ContentTemplate="{DynamicResource ButtonCalculatorRectangle}"/>
|
||||
<Path Margin="4" Data="M 4 2 l 12 10 l -12 10 l 0 -20" Fill="{DynamicResource CalculatorFrame}"/>
|
||||
</Canvas.Children>
|
||||
</Canvas>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="IsoFieldResult">
|
||||
<Canvas Style="{DynamicResource ButtonResultCanvas}">
|
||||
<Canvas.Children>
|
||||
<ContentControl ContentTemplate="{DynamicResource ButtonResultRectangle}"/>
|
||||
<Path Margin="4" Data="M 0 0 h 20 A 20 20 90 0 1 0 24 z" Fill="Gray"/>
|
||||
<Path Margin="4" Data="M 0 0 h 16 A 16 16 90 0 1 0 18 z" Fill="DarkGray"/>
|
||||
<Path Margin="4" Data="M 0 0 h 10 A 10 10 90 0 1 0 10 z" Fill="LightGray"/>
|
||||
</Canvas.Children>
|
||||
</Canvas>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="ShowRebarsResult">
|
||||
<Canvas Style="{DynamicResource ButtonResultCanvas}">
|
||||
<Canvas.Children>
|
||||
<ContentControl ContentTemplate="{DynamicResource ButtonResultRectangle}"/>
|
||||
<Rectangle Canvas.Left="8" Canvas.Top="6" Width="16" Height="21" Fill="LightGray" Stroke ="Black"/>
|
||||
<Ellipse Canvas.Left="10" Canvas.Top="21" Width="4" Height="4" Fill="DarkGray" Stroke ="Black"/>
|
||||
<Ellipse Canvas.Left="18" Canvas.Top="21" Width="4" Height="4" Fill="DarkGray" Stroke ="Black"/>
|
||||
</Canvas.Children>
|
||||
</Canvas>
|
||||
</DataTemplate>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -12,4 +12,6 @@
|
||||
<convertersUnits:Moment x:Key="MomentConverter"/>
|
||||
<convertersUnits:Stress x:Key="StressConverter"/>
|
||||
<convertersUnits:Curvature x:Key="Curvature"/>
|
||||
<convertersUnits:CrackWidth x:Key="CrackWidth"/>
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
</ResourceDictionary>
|
||||
27
StructureHelper/Infrastructure/UI/Resources/Cracks.xaml
Normal file
@@ -0,0 +1,27 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<DataTemplate x:Key="CrackTextBox">
|
||||
<TextBlock Grid.Row="0" Text="{Binding CrackWidth, Converter={StaticResource LengthConverter}}" HorizontalAlignment="Right">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsCrackLessThanUltimate}" Value="false">
|
||||
<Setter Property="Background" Value="{StaticResource WarningColorBrush}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="CrackGrid">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ContentControl ContentTemplate="{StaticResource CrackTextBox}" Content="{Binding LongTermResult}"/>
|
||||
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource CrackTextBox}" Content="{Binding ShortTermResult}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,47 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<DataTemplate x:Key="ForceActionTemplate">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Name"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding Name}"/>
|
||||
<TextBlock Grid.Row="1" Text="Set force into initial Gravity Center"/>
|
||||
<CheckBox Grid.Row="1" Grid.Column="1" Margin="3,5,3,5" IsChecked="{Binding SetInGravityCenter}"/>
|
||||
<TextBlock Grid.Row="2" Text="Center X"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding CenterX}" IsEnabled="{Binding CoordEnable}"/>
|
||||
<TextBlock Grid.Row="3" Text="Center Y"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding CenterY}" IsEnabled="{Binding CoordEnable}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="CombinationListTemplate">
|
||||
<Grid Grid.Row="1" DataContext="{Binding DesignForces}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<DataGrid x:Name="ForceGrid" Style="{StaticResource ItemsDataGrid}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridComboBoxColumn Header="Limit state" Width="80" MinWidth="70" SelectedItemBinding="{Binding LimitState}" ItemsSource="{Binding Source={StaticResource LimitStateEnum}}"/>
|
||||
<DataGridComboBoxColumn Header="Duration" Width="80" MinWidth="70" SelectedItemBinding="{Binding CalcTerm}" ItemsSource="{Binding Source={StaticResource CalcTermEnum}}"/>
|
||||
<DataGridTextColumn Header="Moment Mx" Width="85" Binding="{Binding ForceTuple.Mx, Converter={StaticResource MomentConverter}, ValidatesOnExceptions=True}"/>
|
||||
<DataGridTextColumn Header="Moment My" Width="85" Binding="{Binding ForceTuple.My, Converter={StaticResource MomentConverter}, ValidatesOnExceptions=True}"/>
|
||||
<DataGridTextColumn Header="Force Nz" Width="85" Binding="{Binding ForceTuple.Nz, Converter={StaticResource ForceConverter}, ValidatesOnExceptions=True}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<StackPanel Grid.Column="1">
|
||||
<Button Style="{StaticResource AddButton}"/>
|
||||
<Button Style="{StaticResource DeleteButton}"/>
|
||||
<Button Style="{StaticResource CopyButton}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,24 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<DataTemplate x:Key="LineVisualProperties">
|
||||
<GroupBox Header="Line properties">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Line smoothness" Margin="0,5,0,5"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Slider x:Name="slider" Width="195" Minimum="0" Maximum="{Binding MaxLineSmoothness}" Value="{Binding LineSmoothness}"/>
|
||||
<TextBox Width="40" Text="{Binding LineSmoothness,Converter={StaticResource PlainDouble}, ValidatesOnDataErrors=True}"/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="Stroke thickness" Margin="0,5,0,5"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Slider x:Name="StrokeSlider" Width="195" Minimum="0" Maximum="{Binding MaxStrokeSize}" Value="{Binding StrokeSize}"/>
|
||||
<TextBox Width="40" Text="{Binding StrokeSize,Converter={StaticResource PlainDouble}, ValidatesOnDataErrors=True}"/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="Filling opacity" Margin="0,5,0,5"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Slider x:Name="OpacitySlider" Width="195" Minimum="0" Maximum="1" Value="{Binding Opacity}" TickFrequency="0.05" />
|
||||
<TextBox Width="40" Text="{Binding Opacity,Converter={StaticResource PlainDouble}, ValidatesOnDataErrors=True}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,9 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:System="clr-namespace:System;assembly=System.Runtime">
|
||||
<!-- Define bitmap resources -->
|
||||
|
||||
|
||||
<!-- Primitive templates -->
|
||||
<BitmapImage x:Key="Beam32" CacheOption="OnLoad" UriSource="/Infrastructure/UI/Icons/Objects/Beam32.png"/>
|
||||
</ResourceDictionary>
|
||||
@@ -8,7 +8,13 @@
|
||||
<ColumnDefinition Width="60"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ListBox ItemsSource="{Binding SourceItems}" SelectedItem="{Binding SelectedSourceItem}" ItemTemplate="{Binding ItemDataDemplate}"/>
|
||||
<ListBox ItemsSource="{Binding SourceItems}"
|
||||
SelectedItem="{Binding SelectedSourceItem}"
|
||||
ItemTemplate="{Binding ItemDataDemplate}">
|
||||
<!--<InputBindingCollection>
|
||||
<MouseBinding Gesture="LeftDoubleClick" Command="{Binding AddSelected}"/>
|
||||
</InputBindingCollection>-->
|
||||
</ListBox>
|
||||
<StackPanel Grid.Column="1">
|
||||
<Button Content="Add all" Command="{Binding AddAll}"/>
|
||||
<Button Content="Clear all" Command="{Binding ClearAll}"/>
|
||||
@@ -16,7 +22,49 @@
|
||||
<Button Content="<<" Command="{Binding RemoveSelected}"/>
|
||||
</StackPanel>
|
||||
<ListBox Grid.Column="2" ItemsSource="{Binding TargetItems}"
|
||||
SelectedItem="{Binding SelectedTargetItem}" ItemTemplate="{Binding ItemDataDemplate}"/>
|
||||
SelectedItem="{Binding SelectedTargetItem}"
|
||||
ItemTemplate="{Binding ItemDataDemplate}"
|
||||
>
|
||||
<!--<InputBindingCollection>
|
||||
<MouseBinding Gesture="LeftDoubleClick" Command="{Binding RemoveSelected}"/>
|
||||
</InputBindingCollection>-->
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="SelectItems">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Height="25" Orientation="Horizontal" HorizontalAlignment="Right" Visibility="{Binding ShowButtons, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<Button Content="Select All" Command="{Binding SelectAllCommand}"/>
|
||||
<Button Content="Unselect All" Command="{Binding UnSelectAllCommand}"/>
|
||||
<Button Content="Invert Selection" Command="{Binding InvertSelectionCommand}"/>
|
||||
</StackPanel>
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Visible">
|
||||
<ListBox ItemsSource="{Binding CollectionItems}" SelectedItem="SelectedItem" HorizontalAlignment="Stretch">
|
||||
<ListBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="Select All" Command="{Binding SelectAllCommand}"/>
|
||||
<MenuItem Header="UnSelect All" Command="{Binding UnSelectAllCommand}"/>
|
||||
<MenuItem Header="Unvert Selection" Command="{Binding InvertSelectionCommand}"/>
|
||||
</ContextMenu>
|
||||
</ListBox.ContextMenu>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="22"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox IsChecked="{Binding IsSelected}"/>
|
||||
<ContentControl Grid.Column="1" ContentTemplate="{StaticResource ColoredItemTemplate}" Content="{Binding Item}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,100 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:uc="clr-namespace:StructureHelper.Windows.UserControls">
|
||||
|
||||
<DataTemplate x:Key="SurroundData">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="215"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="35,0,0,0" Text="Logic"/>
|
||||
<ComboBox Grid.Column="1" ItemsSource="{Binding Logics}" SelectedItem="{Binding Logic}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}">
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
|
||||
<GroupBox Header="{Binding YLabel}">
|
||||
<Grid Margin="30,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="120"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Maximum"/>
|
||||
<TextBlock Grid.Row="1" Text="Minimum"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding YMax, Converter={StaticResource PlainDouble}, ValidatesOnDataErrors=True}"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding YMin, Converter={StaticResource PlainDouble}, ValidatesOnDataErrors=True}"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" Text="{Binding YUnitLabel}"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding YUnitLabel}"/>
|
||||
<!--<uc:MultiplyDouble Margin="2,2,2,2" Grid.Column="3" Grid.Row="0" ValueChanged="YmaxChanged"/>
|
||||
<uc:MultiplyDouble Margin="2,2,2,2" Grid.Column="3" Grid.Row="1" ValueChanged="YminChanged"/>-->
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<GroupBox Header="{Binding XLabel}">
|
||||
<Grid Margin="30,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="120"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Maximum"/>
|
||||
<TextBlock Grid.Row="1" Text="Minimum"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding XMax, Converter={StaticResource PlainDouble}, ValidatesOnDataErrors=True}"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding XMin, Converter={StaticResource PlainDouble}, ValidatesOnDataErrors=True}"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" Text="{Binding XUnitLabel}"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding XUnitLabel}"/>
|
||||
<!--<uc:MultiplyDouble Margin="2,2,2,2" Grid.Column="3" Grid.Row="0" ValueChanged="XmaxChanged"/>
|
||||
<uc:MultiplyDouble Margin="2,2,2,2" Grid.Column="3" Grid.Row="1" ValueChanged="XminChanged"/>-->
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<GroupBox Header="{Binding ZLabel}">
|
||||
<Grid Margin="30,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="120"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Constant value"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding ConstZ, Converter={StaticResource PlainDouble}, ValidatesOnDataErrors=True}"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" Text="{Binding ZUnitLabel}"/>
|
||||
<!--<uc:MultiplyDouble Margin="2,2,2,2" Grid.Column="3" ValueChanged="ConstZChanged"/>-->
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<Grid Margin="35,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="120"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Point count"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding PointCount, ValidatesOnDataErrors=True}"/>
|
||||
<!--<uc:MultiplyDouble Margin="2" Grid.Column="3" ValueChanged="PointCountChanged"/>-->
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
</ResourceDictionary>
|
||||
172
StructureHelper/Infrastructure/UI/Resources/Materials.xaml
Normal file
@@ -0,0 +1,172 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<DataTemplate x:Key="LibraryMaterial">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Material Code"/>
|
||||
<ComboBox Height="25" VerticalAlignment="Top" ItemsSource="{Binding CodeList}" SelectedItem="{Binding CodeEntity}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}">
|
||||
<!--<ToolTip>
|
||||
<StackPanel>
|
||||
<TextBlock FontWeight="Bold" Text="Code short name:"/>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
<TextBlock FontWeight="Bold" Text="Full name:"/>
|
||||
<TextBlock Text="{Binding FullName}"/>
|
||||
</StackPanel>
|
||||
</ToolTip>-->
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<TextBlock Text="Material Kind"/>
|
||||
<ComboBox Height="25" VerticalAlignment="Top" ItemsSource="{Binding MaterialLibrary}" SelectedItem="{Binding MaterialEntity}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<TextBlock Text="Material Model"/>
|
||||
<ComboBox Height="25" VerticalAlignment="Top" ItemsSource="{Binding MaterialLogics}" SelectedItem="{Binding MaterialLogic}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="SafetyFactors">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="200"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Content="Show Safety Factors" Command="{Binding DataContext.ShowSafetyFactors, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Window}}"/>
|
||||
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource MaterialSafetyFactors}" Content="{Binding DataContext, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Window}}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CarbonProperties">
|
||||
<Expander Header="Fiber Cohesion Properties" IsExpanded="False">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="180"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="30"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="ULS Concrete Strength"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding ULSConcreteStrength, Converter={StaticResource StressConverter}, ValidatesOnExceptions=True}"/>
|
||||
<TextBlock Grid.Row="1" Text="Total Layers Thickness"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding SumThickness, Converter={StaticResource LengthConverter}, ValidatesOnExceptions=True}"/>
|
||||
<TextBlock Grid.Row="2" Text="GammaF2 Factor"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="1" IsEnabled="False" Text="{Binding GammaF2, Converter={StaticResource PlainDouble}, ValidatesOnExceptions=True}"/>
|
||||
</Grid>
|
||||
</Expander>
|
||||
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="DirectSafetyFactors">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="200"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Content="Show Safety Factors" Command="{Binding ShowSafetyFactors}"/>
|
||||
<Button Grid.Row="1" Content="Show Partial Factors" Command="{Binding ShowPartialFactors}"/>
|
||||
<ContentControl Grid.Row="2" ContentTemplate="{StaticResource MaterialSafetyFactors}" Content="{Binding}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="ConcreteLibMaterial">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Library material"/>
|
||||
<ComboBox Height="25" VerticalAlignment="Top" ItemsSource="{Binding LibConcreteMaterials}" SelectedItem="{Binding SelectedLibMaterial}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ContentControl ContentTemplate="{StaticResource SafetyFactors}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="ConcreteMaterial">
|
||||
<StackPanel>
|
||||
<ContentControl ContentTemplate="{StaticResource LibraryMaterial}" Content="{Binding}"/>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="22"/>
|
||||
<RowDefinition Height="22"/>
|
||||
<RowDefinition Height="22"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="Tension for ULS"/>
|
||||
<TextBlock Grid.Row="1" Text="Tension for SLS"/>
|
||||
<TextBlock Grid.Row="2" Text="Relative humidity"/>
|
||||
<CheckBox Grid.Column="1" IsChecked="{Binding TensionForULS}"/>
|
||||
<CheckBox Grid.Column="1" Grid.Row="1" IsChecked="{Binding TensionForSLS}"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Humidity}"/>
|
||||
</Grid>
|
||||
<Button Content="Show Safety Factors" Command="{Binding ShowSafetyFactors}"/>
|
||||
<ContentControl ContentTemplate="{StaticResource MaterialSafetyFactors}" Content="{Binding SafetyFactors}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="ReinforcementMaterial">
|
||||
<StackPanel>
|
||||
<ContentControl ContentTemplate="{StaticResource LibraryMaterial}" Content="{Binding}"/>
|
||||
<Button Content="Show Safety Factors" Command="{Binding ShowSafetyFactors}"/>
|
||||
<ContentControl ContentTemplate="{StaticResource MaterialSafetyFactors}" Content="{Binding SafetyFactors}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="ReinforcementLibMaterial">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Library material"/>
|
||||
<ComboBox Height="25" VerticalAlignment="Top" ItemsSource="{Binding LibReinforcementMaterials}" SelectedItem="{Binding SelectedLibMaterial}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ContentControl ContentTemplate="{StaticResource SafetyFactors}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="ElasticMaterial">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="180"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Elastic material"/>
|
||||
<TextBlock Grid.Row="1" Text="Young's modulus"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Modulus, Converter={StaticResource StressConverter}, ValidatesOnExceptions=True}"/>
|
||||
<TextBlock Grid.Row="2" Text="Compressive strength"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding CompressiveStrength, Converter={StaticResource StressConverter}, ValidatesOnExceptions=True}"/>
|
||||
<TextBlock Grid.Row="3" Text="Tensile strength"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding TensileStrength, Converter={StaticResource StressConverter}, ValidatesOnExceptions=True}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,7 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Color x:Key="ErrorColor" R="255" G="192" B="203" A="100" />
|
||||
<Color x:Key="WarningColor" R="255" G="255" B="0" A="100" />
|
||||
<SolidColorBrush x:Key="ErrorColorBrush" Color="{DynamicResource ErrorColor}"/>
|
||||
<SolidColorBrush x:Key="WarningColorBrush" Color="{DynamicResource WarningColor}"/>
|
||||
</ResourceDictionary>
|
||||
@@ -18,4 +18,19 @@
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Margin="1" Text="{Binding Height, Converter={StaticResource LengthConverter}, ValidatesOnDataErrors=True}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="CircleShapeEdit">
|
||||
<DataTemplate.Resources>
|
||||
</DataTemplate.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="22"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="100"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="Diameter"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Margin="1" Style="{StaticResource ValidatedError}" Text="{Binding Diameter, Converter={StaticResource LengthConverter}, ValidatesOnDataErrors=True}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
@@ -1,59 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using StructureHelper.Infrastructure;
|
||||
using StructureHelper.Models.Materials;
|
||||
|
||||
namespace StructureHelper.MaterialCatalogWindow
|
||||
{
|
||||
public class MaterialCatalogModel
|
||||
{
|
||||
public NamedList<MaterialDefinitionBase> ConcreteDefinitions;
|
||||
public NamedList<MaterialDefinitionBase> RebarDefinitions;
|
||||
|
||||
public List<NamedList<MaterialDefinitionBase>> Materials;
|
||||
|
||||
public MaterialCatalogModel()
|
||||
{
|
||||
InitializeMaterialCollections();
|
||||
Materials = new List<NamedList<MaterialDefinitionBase>>();
|
||||
Materials.Add(ConcreteDefinitions);
|
||||
Materials.Add(RebarDefinitions);
|
||||
}
|
||||
|
||||
public void InitializeMaterialCollections()
|
||||
{
|
||||
InitializeConcreteDefinitions();
|
||||
InitializeRebarDefinitions();
|
||||
}
|
||||
|
||||
private void InitializeRebarDefinitions()
|
||||
{
|
||||
RebarDefinitions = new NamedList<MaterialDefinitionBase>
|
||||
{
|
||||
new RebarDefinition("S240", 2, 240, 240, 1.15, 1.15),
|
||||
new RebarDefinition("S400", 2, 400, 400, 1.15, 1.15),
|
||||
new RebarDefinition("S500", 2, 500, 500, 1.15, 1.15)
|
||||
};
|
||||
RebarDefinitions.Name = "Арматура";
|
||||
}
|
||||
|
||||
private void InitializeConcreteDefinitions()
|
||||
{
|
||||
ConcreteDefinitions = new NamedList<MaterialDefinitionBase>
|
||||
{
|
||||
new ConcreteDefinition("C10", 0, 10, 0, 1.3, 1.5),
|
||||
new ConcreteDefinition("C15", 0, 15, 0, 1.3, 1.5),
|
||||
new ConcreteDefinition("C20", 0, 20, 0, 1.3, 1.5),
|
||||
new ConcreteDefinition("C25", 0, 25, 0, 1.3, 1.5),
|
||||
new ConcreteDefinition("C30", 0, 30, 0, 1.3, 1.5),
|
||||
new ConcreteDefinition("C35", 0, 35, 0, 1.3, 1.5),
|
||||
new ConcreteDefinition("C40", 0, 40, 0, 1.3, 1.5),
|
||||
new ConcreteDefinition("C45", 0, 45, 0, 1.3, 1.5),
|
||||
new ConcreteDefinition("C50", 0, 50, 0, 1.3, 1.5),
|
||||
new ConcreteDefinition("C60", 0, 60, 0, 1.3, 1.5),
|
||||
new ConcreteDefinition("C70", 0, 70, 0, 1.3, 1.5),
|
||||
new ConcreteDefinition("C80", 0, 80, 0, 1.3, 1.5)
|
||||
};
|
||||
ConcreteDefinitions.Name = "Бетон";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
<Window x:Class="StructureHelper.MaterialCatalogWindow.MaterialCatalogView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:StructureHelper"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance local:MaterialCatalogViewModel}"
|
||||
Title="Справочник материалов" Height="900" Width="1100">
|
||||
<Window.Resources>
|
||||
<DataTemplate x:Key="RebarYoungModulusTemplate">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0" Text="{Binding YoungModulus}"/>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text=" x 10^11"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="CompressiveStrengthTemplate">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0" Text="{Binding CompressiveStrength}"/>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text=" x 10^6"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="TensileStrengthTemplate">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0" Text="{Binding TensileStrength}"/>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text=" x 10^6"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="MaterialClassTemplate">
|
||||
<TextBox VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0" Text="{Binding MaterialClass}"/>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="MaterialCoefInCompressTemplate">
|
||||
<TextBox VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0" Text="{Binding MaterialCoefInCompress}"/>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="MaterialCoefInTensionTemplate">
|
||||
<TextBox VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0" Text="{Binding MaterialCoefInTension}"/>
|
||||
</DataTemplate>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="40"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Margin="10">
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10,20,10,10" Text="Бетон" FontSize="16"/>
|
||||
<DataGrid ItemsSource="{Binding ConcreteDefinitions}" AutoGenerateColumns="False" SelectedItem="{Binding SelectedMaterial}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Header="Класс" CellTemplate="{StaticResource MaterialClassTemplate}"/>
|
||||
<DataGridTextColumn Header="Модуль упругости" Binding="{Binding YoungModulus, StringFormat={}{0} x 10^6}" IsReadOnly="True"/>
|
||||
<DataGridTemplateColumn Header="Нормативная прочность на сжатие" CellTemplate="{StaticResource CompressiveStrengthTemplate}"/>
|
||||
<DataGridTextColumn Header="Нормативная прочность на растяжение" Binding="{Binding TensileStrength, StringFormat={}{0} x 10^3}" IsReadOnly="True"/>
|
||||
<DataGridTemplateColumn Header="Коэффициент надежности при сжатии" CellTemplate="{StaticResource MaterialCoefInCompressTemplate}"/>
|
||||
<DataGridTemplateColumn Header="Коэффициент надежности при растяжении" CellTemplate="{StaticResource MaterialCoefInTensionTemplate}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10,20,10,10" Text="Арматура" FontSize="16"/>
|
||||
<DataGrid ItemsSource="{Binding RebarDefinitions}" AutoGenerateColumns="False" SelectedItem="{Binding SelectedMaterial}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Header="Класс" CellTemplate="{StaticResource MaterialClassTemplate}"/>
|
||||
<DataGridTemplateColumn Header="Модуль упругости" CellTemplate="{StaticResource RebarYoungModulusTemplate}"/>
|
||||
<DataGridTemplateColumn Header="Нормативная прочность на сжатие" CellTemplate="{StaticResource CompressiveStrengthTemplate}"/>
|
||||
<DataGridTemplateColumn Header="Нормативная прочность на растяжение" CellTemplate="{StaticResource TensileStrengthTemplate}"/>
|
||||
<DataGridTemplateColumn Header="Коэффициент надежности при сжатии" CellTemplate="{StaticResource MaterialCoefInCompressTemplate}"/>
|
||||
<DataGridTemplateColumn Header="Коэффициент надежности при растяжении" CellTemplate="{StaticResource MaterialCoefInTensionTemplate}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="300"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Content="Добавить материал" Margin="10" Command="{Binding AddMaterial}"/>
|
||||
<Button Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Content="Выбрать материал" Margin="10" Command="{Binding SelectMaterial}" Visibility="{Binding SelectMaterialButtonVisibility}"/>
|
||||
<Button Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Left" Content="Сохранить справочник" Margin="10" Command="{Binding SaveCatalog}"/>
|
||||
<Button Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right" Content="Загрузить справочник" Margin="10" Command="{Binding LoadCatalog}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -1,19 +0,0 @@
|
||||
using StructureHelper.Infrastructure.UI.DataContexts;
|
||||
using System.Windows;
|
||||
|
||||
namespace StructureHelper.MaterialCatalogWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для MaterialCatalogView.xaml
|
||||
/// </summary>
|
||||
public partial class MaterialCatalogView : Window
|
||||
{
|
||||
public MaterialCatalogView(bool isMaterialCanBeSelected = false, PrimitiveBase primitive = null)
|
||||
{
|
||||
var materialCatalogModel = new MaterialCatalogModel();
|
||||
var materialCatalogViewModel = new MaterialCatalogViewModel(materialCatalogModel, this, isMaterialCanBeSelected, primitive);
|
||||
DataContext = materialCatalogViewModel;
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Input;
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelper.Infrastructure;
|
||||
using StructureHelper.Infrastructure.UI.DataContexts;
|
||||
using StructureHelper.Models.Materials;
|
||||
using StructureHelper.Properties;
|
||||
using StructureHelper.Windows.AddMaterialWindow;
|
||||
using OpenFileDialog = System.Windows.Forms.OpenFileDialog;
|
||||
using SaveFileDialog = System.Windows.Forms.SaveFileDialog;
|
||||
|
||||
namespace StructureHelper.MaterialCatalogWindow
|
||||
{
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class MaterialCatalogViewModel : INotifyPropertyChanged
|
||||
{
|
||||
private MaterialCatalogModel materialCatalogModel;
|
||||
private MaterialCatalogView materialCatalogView;
|
||||
|
||||
[JsonProperty]
|
||||
public ObservableCollection<MaterialDefinitionBase> ConcreteDefinitions { get; set; }
|
||||
[JsonProperty]
|
||||
public ObservableCollection<MaterialDefinitionBase> RebarDefinitions { get; set; }
|
||||
public ICommand AddMaterial { get; }
|
||||
public ICommand SaveCatalog { get; }
|
||||
public ICommand LoadCatalog { get; }
|
||||
public ICommand SelectMaterial { get; }
|
||||
|
||||
private MaterialDefinitionBase selectedMaterial;
|
||||
public MaterialDefinitionBase SelectedMaterial
|
||||
{
|
||||
get => selectedMaterial;
|
||||
set
|
||||
{
|
||||
selectedMaterial = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private bool isMaterialCanBeSelected;
|
||||
|
||||
public bool IsMaterialCanBeSelected
|
||||
{
|
||||
get => isMaterialCanBeSelected;
|
||||
set
|
||||
{
|
||||
isMaterialCanBeSelected = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(SelectMaterialButtonVisibility));
|
||||
}
|
||||
}
|
||||
|
||||
public Visibility SelectMaterialButtonVisibility => IsMaterialCanBeSelected ? Visibility.Visible : Visibility.Hidden;
|
||||
public MaterialCatalogViewModel() { }
|
||||
|
||||
public MaterialCatalogViewModel(MaterialCatalogModel materialCatalogModel, MaterialCatalogView materialCatalogView, bool isMaterialCanBeSelected, PrimitiveBase primitive = null)
|
||||
{
|
||||
this.materialCatalogModel = materialCatalogModel;
|
||||
this.materialCatalogView = materialCatalogView;
|
||||
IsMaterialCanBeSelected = isMaterialCanBeSelected;
|
||||
|
||||
ConcreteDefinitions = new ObservableCollection<MaterialDefinitionBase>(materialCatalogModel.ConcreteDefinitions);
|
||||
RebarDefinitions = new ObservableCollection<MaterialDefinitionBase>(materialCatalogModel.RebarDefinitions);
|
||||
|
||||
AddMaterial = new RelayCommand(o =>
|
||||
{
|
||||
AddMaterialView addMaterialView = new AddMaterialView(this.materialCatalogModel, this);
|
||||
addMaterialView.ShowDialog();
|
||||
OnPropertyChanged(nameof(ConcreteDefinitions));
|
||||
OnPropertyChanged(nameof(RebarDefinitions));
|
||||
});
|
||||
SaveCatalog = new RelayCommand(o =>
|
||||
{
|
||||
string json = JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
SaveFileDialog saveDialog = new SaveFileDialog();
|
||||
saveDialog.InitialDirectory = @"C:\";
|
||||
saveDialog.Filter = "json files (*.json)|*.json|All files(*.*)|*.*";
|
||||
string path = null;
|
||||
if (saveDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
path = saveDialog.FileName;
|
||||
File.WriteAllText(path, json);
|
||||
}
|
||||
});
|
||||
LoadCatalog = new RelayCommand(o =>
|
||||
{
|
||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||
openFileDialog.InitialDirectory = @"C:\";
|
||||
openFileDialog.Filter = "json files (*.json)|*.json|All files(*.*)|*.*";
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var path = openFileDialog.FileName;
|
||||
var content = File.ReadAllText(path);
|
||||
var vm = JsonConvert.DeserializeObject<MaterialCatalogViewModel>(content);
|
||||
ConcreteDefinitions = vm.ConcreteDefinitions;
|
||||
OnPropertyChanged(nameof(ConcreteDefinitions));
|
||||
RebarDefinitions = vm.RebarDefinitions;
|
||||
OnPropertyChanged(nameof(RebarDefinitions));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
[NotifyPropertyChangedInvocator]
|
||||
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
|
||||
using System;
|
||||
|
||||
namespace StructureHelper.Models.Calculators
|
||||
{
|
||||
internal class LimitCurveVisualCalculator : ISaveable, ICalculator
|
||||
{
|
||||
private LimitCurvesResult result;
|
||||
|
||||
public Guid Id { get; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public IResult Result => result;
|
||||
|
||||
public IShiftTraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
public void Run()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
using StructureHelper.Infrastructure.UI.DataContexts;
|
||||
using StructureHelper.Models.Materials;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperLogics.Models.Primitives;
|
||||
using StructureHelperLogics.Models.Templates.RCs;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Models.Primitives.Factories
|
||||
{
|
||||
internal static class PrimitiveFactory
|
||||
{
|
||||
public static IEnumerable<PrimitiveBase> GetRectangleRCElement(RectangleBeamTemplate template, IHeadMaterial concrete, IHeadMaterial reinforcement)
|
||||
{
|
||||
List<PrimitiveBase> primitives = new List<PrimitiveBase>();
|
||||
var rect = template.Shape as StructureHelperCommon.Models.Shapes.RectangleShape;
|
||||
var width = rect.Width;
|
||||
var height = rect.Height;
|
||||
var area1 = Math.PI * template.BottomDiameter * template.BottomDiameter / 4d;
|
||||
var area2 = Math.PI * template.TopDiameter * template.TopDiameter / 4d;
|
||||
var gap = template.CoverGap;
|
||||
|
||||
double[] xs = new double[] { -width / 2 + gap, width / 2 - gap };
|
||||
double[] ys = new double[] { -height / 2 + gap, height / 2 - gap };
|
||||
|
||||
var rectangle = new RectanglePrimitive() { Width = width, Height = height, Name = "Concrete block" };
|
||||
primitives.Add(new RectangleViewPrimitive(rectangle) { HeadMaterial = concrete});
|
||||
var point = new PointPrimitive() { CenterX = xs[0], CenterY = ys[0], Area = area1};
|
||||
var viewPoint = new PointViewPrimitive(point) { HeadMaterial = reinforcement, Name = "Left bottom point" };
|
||||
viewPoint.RegisterDeltas(xs[0], ys[0]);
|
||||
primitives.Add(viewPoint);
|
||||
point = new PointPrimitive() {CenterX = xs[1], CenterY = ys[0], Area = area1 };
|
||||
viewPoint = new PointViewPrimitive(point) { HeadMaterial = reinforcement, Name = "Right bottom point" };
|
||||
primitives.Add(viewPoint);
|
||||
point = new PointPrimitive() { CenterX = xs[0], CenterY = ys[1], Area = area2 };
|
||||
viewPoint = new PointViewPrimitive(point) { HeadMaterial = reinforcement, Name = "Left top point" };
|
||||
primitives.Add(viewPoint);
|
||||
point = new PointPrimitive() { CenterX = xs[1], CenterY = ys[1], Area = area2 };
|
||||
viewPoint = new PointViewPrimitive(point) { HeadMaterial = reinforcement, Name = "Right top point" };
|
||||
viewPoint.RegisterDeltas(xs[1], ys[1]);
|
||||
primitives.Add(viewPoint);
|
||||
|
||||
if (template.WidthCount > 2)
|
||||
{
|
||||
int count = template.WidthCount - 1;
|
||||
double dist = (xs[1] - xs[0]) / count;
|
||||
for (int i = 1; i < count; i++)
|
||||
{
|
||||
point = new PointPrimitive() {CenterX = xs[0] + dist * i, CenterY = ys[0], Area = area1 };
|
||||
viewPoint = new PointViewPrimitive(point) { HeadMaterial = reinforcement, Name = $"Bottom point {i}" };
|
||||
primitives.Add(viewPoint);
|
||||
|
||||
point = new PointPrimitive() { CenterX = xs[0] + dist * i, CenterY = ys[1], Area = area2 };
|
||||
viewPoint = new PointViewPrimitive(point) { HeadMaterial = reinforcement, Name = $"Top point {i}" };
|
||||
primitives.Add(viewPoint);
|
||||
}
|
||||
}
|
||||
if (template.HeightCount > 2)
|
||||
{
|
||||
int count = template.HeightCount - 1;
|
||||
double dist = (ys[1] - ys[0]) / count;
|
||||
for (int i = 1; i < count; i++)
|
||||
{
|
||||
point = new PointPrimitive() {CenterX = xs[0], CenterY = ys[0] + dist * i, Area = area1 };
|
||||
viewPoint = new PointViewPrimitive(point) { HeadMaterial = reinforcement, Name = $"Left point {i}" };
|
||||
primitives.Add(viewPoint);
|
||||
|
||||
point = new PointPrimitive() { CenterX = xs[1], CenterY = ys[0] + dist * i, Area = area1 };
|
||||
viewPoint = new PointViewPrimitive(point) { HeadMaterial = reinforcement, Name = $"Right point {i}" };
|
||||
primitives.Add(viewPoint);
|
||||
}
|
||||
}
|
||||
return primitives;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>bin\Release\net6.0-windows7.0\win-x64\publish\win-x64\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<_TargetId>Folder</_TargetId>
|
||||
<TargetFramework>net6.0-windows7.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
<PublishTrimmed>false</PublishTrimmed>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<History>True|2024-03-11T15:33:14.1457807Z;True|2024-03-10T19:11:27.6834663+05:00;True|2024-02-02T12:22:50.1454015+05:00;True|2023-02-25T13:37:39.2738786+05:00;False|2023-02-25T13:37:24.0284261+05:00;True|2023-02-25T13:34:01.6858860+05:00;True|2023-02-25T13:31:18.8295711+05:00;False|2023-02-25T13:25:21.5807199+05:00;False|2023-02-25T13:24:41.7164398+05:00;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||