Commit 2d79dd84 authored by 潘栩锋's avatar 潘栩锋 🚴

Merge branch 'dev7.0-blowing' of…

Merge branch 'dev7.0-blowing' of http://private.flyautomation.net:82/panruising/thick_public into dev7.0-blowing
parents 3e83221f b2c7eba0
......@@ -10,7 +10,7 @@
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Width" Value="110"/>
<Setter Property="Width" Value="82"/>
<Setter Property="OffBrush" Value="{StaticResource Color_theme_static}" />
<Setter Property="OnBrush" Value="{StaticResource Color_theme_activity}" />
<Setter Property="OffLabel" Value="{Binding Content,RelativeSource={RelativeSource Mode=Self}}" />
......@@ -18,11 +18,11 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="flyctrl:NoToggleButton">
<Border x:Name="canvas" Height="55" Width="{TemplateBinding Width}" Background="{TemplateBinding OffBrush}">
<Border x:Name="canvas" Width="{TemplateBinding Width}" Background="{TemplateBinding OffBrush}">
<Grid>
<Rectangle x:Name="Path_block" Height="45" Width="24" Margin="5" Fill="White" HorizontalAlignment="Left"/>
<StackPanel x:Name="SP_Text" Orientation="Horizontal" Margin="20,15" HorizontalAlignment="Right">
<TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Property=OffLabel}" Foreground="White" FontSize="24" FontFamily="Microsoft Sans Serif"/>
<Rectangle x:Name="Path_block" Height="33" Width="18" Margin="5" Fill="White" HorizontalAlignment="Left"/>
<StackPanel x:Name="SP_Text" Orientation="Horizontal" Margin="15,0" HorizontalAlignment="Right" VerticalAlignment="Center">
<TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Property=OffLabel}" Foreground="White" FontSize="18" FontFamily="Global Sans Serif"/>
</StackPanel>
</Grid>
</Border>
......
......@@ -9,7 +9,7 @@
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Width" Value="110"/>
<Setter Property="Width" Value="82"/>
<Setter Property="OffBrush" Value="{StaticResource Color_theme_static}" />
<Setter Property="OnBrush" Value="{StaticResource Color_theme_activity}" />
<Setter Property="OffLabel" Value="{Binding Content,RelativeSource={RelativeSource Mode=Self}}" />
......@@ -17,11 +17,11 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="flyctrl:ToggleButtonOnOff">
<Border x:Name="canvas" Height="55" Width="{TemplateBinding Width}" Background="{TemplateBinding OffBrush}">
<Border x:Name="canvas" Width="{TemplateBinding Width}" Background="{TemplateBinding OffBrush}">
<Grid>
<Rectangle x:Name="Path_block" Height="45" Width="24" Margin="5" Fill="White" HorizontalAlignment="Left"/>
<StackPanel x:Name="SP_Text" Orientation="Horizontal" Margin="20,15" HorizontalAlignment="Right">
<TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Property=OffLabel}" Foreground="White" FontSize="24" FontFamily="Microsoft Sans Serif"/>
<Rectangle x:Name="Path_block" Height="33" Width="18" Margin="5" Fill="White" HorizontalAlignment="Left"/>
<StackPanel x:Name="SP_Text" Orientation="Horizontal" Margin="15,0" HorizontalAlignment="Right" VerticalAlignment="Center">
<TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Property=OffLabel}" Foreground="White" FontSize="18" FontFamily="Global Sans Serif"/>
</StackPanel>
</Grid>
</Border>
......
......@@ -177,7 +177,7 @@ namespace Misc
private string path;
public event UiParamDictionaryValueChangedHandler ValueChanged;
public ParamDictionary(string path = "paramDict.json")
public ParamDictionary(string path = @"layout\paramDict.json")
{
this.path = path;
Load();
......@@ -214,6 +214,17 @@ namespace Misc
try
{
string json = Newtonsoft.Json.JsonConvert.SerializeObject(cells, Newtonsoft.Json.Formatting.Indented);
//创建文件夹
string dirpath = Path.GetDirectoryName(path);
if (!string.IsNullOrEmpty(dirpath))
{
if (!Directory.Exists(dirpath))
{
Directory.CreateDirectory(dirpath);
}
}
File.WriteAllText(path, json);
}
catch (Exception e)
......
......@@ -70,17 +70,37 @@ namespace FLY.Thick.Base.Server
{
CorrectWay = CurveCorrectWay.OnePointIsScale;
Flag = CurveType.E;
//Curves = new CurveCell[] {
// new CurveCell() { AD = 57564, Value = 0 },
// new CurveCell() { AD = 30850, Value = 88 },
// new CurveCell() { AD = 19000, Value = 176 },
// new CurveCell() { AD = 12528, Value = 264 },
// new CurveCell() { AD = 8409, Value = 352 },
// new CurveCell() { AD = 5650, Value = 440 },
// new CurveCell() { AD = 3779, Value = 528 },
// new CurveCell() { AD = 2513, Value = 616 },
// new CurveCell() { AD = 1660, Value = 704 }
//};
Curves = new CurveCell[] {
new CurveCell() { AD = 57564, Value = 0 },
new CurveCell() { AD = 30850, Value = 88 },
new CurveCell() { AD = 19000, Value = 176 },
new CurveCell() { AD = 12528, Value = 264 },
new CurveCell() { AD = 8409, Value = 352 },
new CurveCell() { AD = 5650, Value = 440 },
new CurveCell() { AD = 3779, Value = 528 },
new CurveCell() { AD = 2513, Value = 616 },
new CurveCell() { AD = 1660, Value = 704 }
};
new CurveCell() { Value = 0, AD = 50300 },
new CurveCell() { Value = 19, AD = 46505 },
new CurveCell() { Value = 38, AD = 42999 },
new CurveCell() { Value = 58, AD = 39698 },
new CurveCell() { Value = 78, AD = 36646 },
new CurveCell() { Value = 98, AD = 33894 },
new CurveCell() { Value = 118, AD = 31229 },
new CurveCell() { Value = 137, AD = 28934 },
new CurveCell() { Value = 156, AD = 26818 },
new CurveCell() { Value = 175, AD = 24908 },
new CurveCell() { Value = 194, AD = 23220 },
new CurveCell() { Value = 213, AD = 21558 },
new CurveCell() { Value = 232, AD = 20057 },
new CurveCell() { Value = 251, AD = 18606 },
new CurveCell() { Value = 271, AD = 17283 },
new CurveCell() { Value = 290, AD = 16035 }
};
}
public void Apply(CurveCorrectWay correctWay, CurveType flag, CurveCell2[] curves)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment