Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
thick-casting
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
thick-casting
Commits
944e758a
Commit
944e758a
authored
Apr 09, 2022
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 自动模头图表的Y轴可以设置。
添加 自动模头的对位分析 可以快速查找加热量不同的图
parent
3be7f334
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
173 additions
and
97 deletions
+173
-97
PgHeatAnalyse.xaml
...asting.AutoDie.UI.Client/PgHeatAnalyse/PgHeatAnalyse.xaml
+27
-20
PgHeatAnalyseVm.cs
...asting.AutoDie.UI.Client/PgHeatAnalyse/PgHeatAnalyseVm.cs
+26
-1
UcThickHeat.xaml
...mCasting.AutoDie.UI.Client/PgHeatAnalyse/UcThickHeat.xaml
+2
-2
UcThickHeatVm.cs
...mCasting.AutoDie.UI.Client/PgHeatAnalyse/UcThickHeatVm.cs
+38
-32
PgSetup.xaml
...ng.AutoDie/FLY.FilmCasting.AutoDie.UI.Client/PgSetup.xaml
+7
-0
PgSetup.xaml.cs
...AutoDie/FLY.FilmCasting.AutoDie.UI.Client/PgSetup.xaml.cs
+8
-2
Styles.xaml
...oDie/FLY.FilmCasting.AutoDie.UI.Client/Themes/Styles.xaml
+21
-2
AutoDieGraph.xaml
...AutoDie.UI.Client/UiModule/AutoDieGraph/AutoDieGraph.xaml
+7
-14
AutoDieGraphVm.cs
...AutoDie.UI.Client/UiModule/AutoDieGraph/AutoDieGraphVm.cs
+15
-22
HeatCellServiceClient.cs
...e/FLY.FilmCasting.AutoDie/Client/HeatCellServiceClient.cs
+6
-0
IHeatCellService.cs
...oDie/FLY.FilmCasting.AutoDie/IService/IHeatCellService.cs
+6
-1
HeatCell.cs
...asting.AutoDie/FLY.FilmCasting.AutoDie/Server/HeatCell.cs
+10
-1
No files found.
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie.UI.Client/PgHeatAnalyse/PgHeatAnalyse.xaml
View file @
944e758a
...
...
@@ -36,7 +36,16 @@
<Button Style="{StaticResource Styles.TitleBar.BackButton2}" Command="BrowseBack"/>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Style="{StaticResource Styles.TitleBar.Text}" Text="对位分析"/>
<TextBlock Style="{StaticResource Styles.TitleBar.Text.Sub}" Text="加热与厚度"/>
<StackPanel>
<StackPanel Orientation="Horizontal" >
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="有效数据" Foreground="LightGray"/>
<ToggleButton Style="{StaticResource CheckStyle}" HorizontalAlignment="Left" IsChecked="{Binding IsMoveByTakeEffect}" Width="30" Height="auto" Foreground="White" Background="#02FFFFFF" />
</StackPanel>
<StackPanel Orientation="Horizontal" >
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="模头改变" Foreground="LightGray"/>
<ToggleButton Style="{StaticResource CheckStyle}" HorizontalAlignment="Left" IsChecked="{Binding IsMoveByDiffCTime}" Width="30" Height="auto" Foreground="White" Background="#02FFFFFF" />
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
...
...
@@ -88,14 +97,6 @@
<lvc:CartesianChart Height="300" Margin="5,2,2,2"
DisableAnimations="True" Hoverable="False" DataTooltip="{x:Null}" >
<lvc:CartesianChart.Series>
<!--<lvc1:Column2Series
PointGeometry="{x:Null}"
StrokeThickness ="1"
Stroke="Black"
Fill="{StaticResource Brushes.PreHeat}"
Values="{Binding HeatDiffs}"
Configuration="{Binding MapperHeats}"/>-->
<lvc1:Column2Series
PointGeometry="{x:Null}"
StrokeThickness ="1"
...
...
@@ -103,14 +104,6 @@
Fill="{StaticResource Brushes.PreHeat}"
Values="{Binding HeatDiffEffects}"
Configuration="{Binding MapperHeats}"/>
<!--<lvc:LineSeries
PointGeometry="{x:Null}"
StrokeThickness ="3"
Stroke="{StaticResource Brushes.Heat}"
Fill="Transparent"
Values="{Binding HeatDiffEffects}"
Configuration="{Binding MapperHeats}"/>-->
<lvc:LineSeries
PointGeometry="{x:Null}"
StrokeThickness ="3"
...
...
@@ -136,9 +129,9 @@
<lvc:CartesianChart.AxisY>
<lvc:Axis Foreground="{StaticResource Brushes.AxisLabel}"
LabelFormatter="{Binding YFormatter}" FontFamily="Courier New"
MinValue="
-100" MaxValue="100
">
MinValue="
{Binding YMinOffset}" MaxValue="{Binding YMaxOffset}
">
<lvc:Axis.Separator>
<lvc:Separator Stroke="{StaticResource Brushes.AxisSeparator}" Step="
10
"/>
<lvc:Separator Stroke="{StaticResource Brushes.AxisSeparator}" Step="
{Binding YStepOffset}
"/>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisY>
...
...
@@ -153,6 +146,20 @@
Command="{Binding ApplyCmd}"/>
<WrapPanel Orientation="Horizontal">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="最大功率" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding MaxHeat}"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="%" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="增量界面显示范围" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding RangeOfOffset}"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="%" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" >
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="加热效果" />
<StackPanel Orientation="Horizontal">
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie.UI.Client/PgHeatAnalyse/PgHeatAnalyseVm.cs
View file @
944e758a
...
...
@@ -22,6 +22,13 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
#
region
图表控制
public
Func
<
double
,
string
>
YFormatter
{
get
;
private
set
;
}
public
int
XMax
{
get
;
protected
set
;
}
public
double
YMax
=>
MaxHeat
;
public
double
YMin
=>
0
;
public
double
YStep
=>
MaxHeat
/
10
;
public
double
YStepOffset
=>
RangeOfOffset
/
10
;
public
double
YMaxOffset
=>
RangeOfOffset
/
2
;
public
double
YMinOffset
=>
-
RangeOfOffset
/
2
;
#
endregion
...
...
@@ -43,6 +50,11 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
/// 比例因子
/// </summary>
public
double
Kp
{
get
;
set
;
}
=
3
;
public
int
MaxHeat
{
get
;
set
;
}
=
100
;
public
int
RangeOfOffset
{
get
;
set
;
}
=
50
;
public
bool
IsMoveByTakeEffect
{
get
;
set
;
}
=
true
;
public
bool
IsMoveByDiffCTime
{
get
;
set
;
}
=
true
;
/// <summary>
/// 复位区号
...
...
@@ -163,6 +175,14 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
this
.
heatCell
,
nameof
(
this
.
heatCell
.
Kp
),
this
,
nameof
(
Kp
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
heatCell
,
nameof
(
this
.
heatCell
.
MaxHeat
),
this
,
nameof
(
MaxHeat
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
heatCell
,
nameof
(
this
.
heatCell
.
RangeOfOffset
),
this
,
nameof
(
RangeOfOffset
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
heatBuf
,
nameof
(
this
.
heatBuf
.
HeatEffectCurve
),
this
,
nameof
(
HeatEffectCurve
));
...
...
@@ -188,8 +208,11 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
for
(
int
i
=
0
;
i
<
2
;
i
++)
{
ucThickHeatVms
[
i
]
=
new
UcThickHeatVm
();
ucThickHeatVms
[
i
].
Init
(
$"记录
{
i
+
1
}
"
,
bulkDbService
,
0
-
i
,
Kp
);
ucThickHeatVms
[
i
].
Init
(
$"记录
{
i
+
1
}
"
,
bulkDbService
,
0
-
i
,
Kp
,
MaxHeat
);
Misc
.
BindingOperations
.
SetBinding
(
this
,
nameof
(
Kp
),
ucThickHeatVms
[
i
],
nameof
(
UcThickHeatVm
.
Kp
));
Misc
.
BindingOperations
.
SetBinding
(
this
,
nameof
(
MaxHeat
),
ucThickHeatVms
[
i
],
nameof
(
UcThickHeatVm
.
MaxHeat
));
Misc
.
BindingOperations
.
SetBinding
(
this
,
nameof
(
IsMoveByTakeEffect
),
ucThickHeatVms
[
i
],
nameof
(
UcThickHeatVm
.
IsMoveByTakeEffect
));
Misc
.
BindingOperations
.
SetBinding
(
this
,
nameof
(
IsMoveByDiffCTime
),
ucThickHeatVms
[
i
],
nameof
(
UcThickHeatVm
.
IsMoveByDiffCTime
));
ucThickHeatVms
[
i
].
FrameUpdated
+=
PgHeatAnalyseVm_FrameUpdated
;
}
...
...
@@ -488,6 +511,8 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
heatBuf
.
Apply
();
heatCell
.
Kp
=
Kp
;
heatCell
.
MaxHeat
=
MaxHeat
;
heatCell
.
RangeOfOffset
=
RangeOfOffset
;
heatCell
.
Apply
();
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
"通知"
,
"应用成功"
,
TimeSpan
.
FromSeconds
(
2
));
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie.UI.Client/PgHeatAnalyse/UcThickHeat.xaml
View file @
944e758a
...
...
@@ -63,9 +63,9 @@
<lvc:CartesianChart.AxisY>
<lvc:Axis Foreground="{StaticResource Brushes.AxisLabel}"
LabelFormatter="{Binding YFormatter}" FontFamily="Courier New"
MinValue="
0" MaxValue="100
">
MinValue="
{Binding YMin}" MaxValue="{Binding YMax}
">
<lvc:Axis.Separator>
<lvc:Separator Stroke="{StaticResource Brushes.AxisSeparator}" Step="
10
"/>
<lvc:Separator Stroke="{StaticResource Brushes.AxisSeparator}" Step="
{Binding YStep}
"/>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisY>
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie.UI.Client/PgHeatAnalyse/UcThickHeatVm.cs
View file @
944e758a
...
...
@@ -23,6 +23,11 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
#
region
图表控制
public
Func
<
double
,
string
>
YFormatter
{
get
;
protected
set
;
}
public
int
XMax
{
get
;
set
;
}
=
88
;
public
double
YMax
=>
MaxHeat
;
public
double
YMin
=>
0
;
public
double
YStep
=>
MaxHeat
/
10
;
#
endregion
/// <summary>
...
...
@@ -32,6 +37,16 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
public
ChartValues
<
int
>
Heats
{
get
;
}
=
new
ChartValues
<
int
>();
public
double
Kp
{
get
;
set
;
}
=
3
;
public
int
MaxHeat
{
get
;
set
;
}
=
100
;
/// <summary>
/// 急速移动,功能: 移动到下一个数据有效
/// </summary>
public
bool
IsMoveByTakeEffect
{
get
;
set
;
}
=
true
;
/// <summary>
/// 急速移动,功能: 移动到下一个加热不同
/// </summary>
public
bool
IsMoveByDiffCTime
{
get
;
set
;
}
=
true
;
public
object
MapperHeats
{
get
;
private
set
;
}
...
...
@@ -154,12 +169,15 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
public
void
Init
(
string
title
,
IBulkDbService
bulkDbService
,
int
number
,
double
kp
)
int
number
,
double
kp
,
int
maxHeat
)
{
this
.
bulkDbService
=
bulkDbService
;
Title
=
title
;
Kp
=
kp
;
MaxHeat
=
maxHeat
;
Misc
.
BindingOperations
.
SetBinding
(
bulkDbService
,
nameof
(
bulkDbService
.
LastId
),
this
,
nameof
(
LastId
));
Number
=
number
;
UpdateFrame
();
...
...
@@ -183,7 +201,7 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
{
PollModule
.
Current
.
Poll_JustOnce
(()
=>
{
_updateFrame
(
);
bulkDbService
.
GetFrame
(
Number
,
my_GetFrameReponse
,
null
);
},
this
,
MARKNO_UPDATEFRAME
);
}
...
...
@@ -227,29 +245,7 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
FrameUpdated
?.
Invoke
();
}
void
_updateFrame
()
{
if
(
IsGetStableFrame
)
{
IsGetStableFrame
=
false
;
bulkDbService
.
GetStableFrame
(
Number
,
IsPre
,
(
asyncContext
,
retData
)
=>
{
var
reponce
=
retData
as
GetStableFrameReponse
;
SetFrame
(
reponce
.
thickHeat
);
},
null
);
}
else
{
bulkDbService
.
GetFrame
(
Number
,
(
asyncContext
,
retData
)
=>
{
var
reponce
=
retData
as
GetFrameReponse
;
SetFrame
(
reponce
.
thickHeat
);
},
null
);
}
}
private
void
Next
()
{
if
(
Number
<
bulkDbService
.
LastId
)
...
...
@@ -259,14 +255,14 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
{
Number
--;
}
bool
IsGetStableFrame
;
bool
IsPre
;
bool
IsSkipNumberChanged
;
private
void
NextStable
()
{
IsGetStableFrame
=
true
;
IsPre
=
false
;
Number
++;
PollModule
.
Current
.
Poll_JustOnce
(()
=>
{
bulkDbService
.
GetFrameAdv
(
Number
,
false
,
IsMoveByTakeEffect
,
IsMoveByDiffCTime
,
my_GetFrameReponse
,
null
);
},
this
,
MARKNO_UPDATEFRAME
);
}
private
void
Newest
()
{
...
...
@@ -274,12 +270,22 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
}
private
void
PreStable
()
{
IsGetStableFrame
=
true
;
IsPre
=
true
;
Number
--;
PollModule
.
Current
.
Poll_JustOnce
(()
=>
{
bulkDbService
.
GetFrameAdv
(
Number
,
true
,
IsMoveByTakeEffect
,
IsMoveByDiffCTime
,
my_GetFrameReponse
,
null
);
},
this
,
MARKNO_UPDATEFRAME
);
}
void
my_GetFrameReponse
(
object
asyncContext
,
object
retData
)
{
var
reponse
=
retData
as
GetFrameReponse
;
if
(
reponse
.
thickHeat
!=
null
)
SetFrame
(
reponse
.
thickHeat
);
else
IsVaild
=
false
;
FrameUpdated
?.
Invoke
();
}
/// <summary>
/// 以指定分区表 导出厚度%
/// </summary>
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie.UI.Client/PgSetup.xaml
View file @
944e758a
...
...
@@ -95,6 +95,13 @@
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="%" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="增量界面显示范围" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding RangeOfOffset}"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="%" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="步进" />
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie.UI.Client/PgSetup.xaml.cs
View file @
944e758a
...
...
@@ -73,7 +73,12 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
/// <summary>
/// 最大功率
/// </summary>
public
int
MaxHeat
{
get
;
set
;
}
public
int
MaxHeat
{
get
;
set
;
}
=
100
;
/// <summary>
/// 偏移量界面的显示范围
/// </summary>
public
int
RangeOfOffset
{
get
;
set
;
}
=
50
;
/// <summary>
/// 混合数
...
...
@@ -126,6 +131,7 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
Misc
.
BindingOperations
.
SetBinding
(
this
.
HeatCell
,
nameof
(
IHeatCellService
.
CtrlLine
),
this
,
nameof
(
CtrlLine
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
HeatCell
,
nameof
(
IHeatCellService
.
Kp
),
this
,
nameof
(
Kp
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
HeatCell
,
nameof
(
IHeatCellService
.
MaxHeat
),
this
,
nameof
(
MaxHeat
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
HeatCell
,
nameof
(
IHeatCellService
.
RangeOfOffset
),
this
,
nameof
(
RangeOfOffset
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
Feedback
,
nameof
(
IFeedbackHeatService
.
Step
),
this
,
nameof
(
Step
));
Misc
.
BindingOperations
.
SetBinding
(
this
.
Feedback
,
nameof
(
IFeedbackHeatService
.
HasCheck
),
this
,
nameof
(
HasCheck
));
...
...
@@ -223,7 +229,7 @@ namespace FLY.FilmCasting.AutoDie.UI.Client
HeatCell
.
CtrlLine
=
this
.
CtrlLine
;
HeatCell
.
Kp
=
this
.
Kp
;
HeatCell
.
MaxHeat
=
this
.
MaxHeat
;
HeatCell
.
RangeOfOffset
=
this
.
RangeOfOffset
;
Feedback
.
Step
=
this
.
Step
;
Feedback
.
HasCheckFilmVelocity
=
this
.
HasCheckFilmVelocity
;
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie.UI.Client/Themes/Styles.xaml
View file @
944e758a
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
>
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Dictionary_MyConv.xaml"/>
...
...
@@ -54,4 +53,24 @@
<SolidColorBrush x:Key="Badges.AccentBackground">#99008BE5</SolidColorBrush>
<SolidColorBrush x:Key="Badges.AccentForeground">White</SolidColorBrush>
<Style TargetType="{x:Type ToggleButton}" x:Key="CheckStyle" >
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Background="{TemplateBinding Background}" CornerRadius="2" >
<iconPacks:PackIconMaterial x:Name="icon" Kind="CheckboxBlankOutline" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="icon" Property="Kind" Value="CheckboxMarkedOutline"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
\ No newline at end of file
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie.UI.Client/UiModule/AutoDieGraph/AutoDieGraph.xaml
View file @
944e758a
...
...
@@ -50,11 +50,11 @@ xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" xmlns:lvc1="clr
</ResourceDictionary>
</UserControl.Resources>
<Border Style="{StaticResource
BorderStyle_module
}" >
<Border Style="{StaticResource
Styles.Module.Border
}" >
<Grid Name="grid" d:DataContext="{StaticResource viewModel}">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition
Height="258*"
/>
<RowDefinition />
</Grid.RowDefinitions>
<Border Background="#F0579aab" Height="20" VerticalAlignment="Top" CornerRadius="3,3,0,0"/>
<Grid>
...
...
@@ -279,13 +279,6 @@ xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" xmlns:lvc1="clr
Fill="Transparent"
Values="{Binding ThickPercents}"
Configuration="{Binding MapperThickPercents}"/>
<!--<lvc:ScatterSeries
PointGeometry="{StaticResource Geometry.Close}"
StrokeThickness ="1"
Stroke="{StaticResource Brushes.Thick}"
Fill="{StaticResource WhiteBrush}"
Values="{Binding ThickPercents}"
Configuration="{Binding MapperThickPercentsWithIsStable}"/>-->
</lvc:CartesianChart.Series>
<lvc:CartesianChart.AxisX>
<lvc:Axis Foreground="{StaticResource Brushes.AxisLabel}"
...
...
@@ -304,10 +297,10 @@ xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" xmlns:lvc1="clr
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis Foreground="{StaticResource Brushes.AxisLabel}"
LabelFormatter="{Binding YFormatter}"
MinValue="
-50" MaxValue="50" FontFamily="Courier New
" >
LabelFormatter="{Binding YFormatter}"
FontFamily="Courier New"
MinValue="
{Binding YMinOffset}" MaxValue="{Binding YMaxOffset}
" >
<lvc:Axis.Separator>
<lvc:Separator Stroke="{StaticResource Brushes.AxisSeparator}" Step="
10
"/>
<lvc:Separator Stroke="{StaticResource Brushes.AxisSeparator}" Step="
{Binding YStepOffset}
"/>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisY>
...
...
@@ -349,9 +342,9 @@ xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" xmlns:lvc1="clr
<lvc:CartesianChart.AxisY>
<lvc:Axis Foreground="{StaticResource Brushes.AxisLabel}"
LabelFormatter="{Binding YFormatter}"
MinValue="
0" MaxValue="100" FontFamily="Courier New"
>
MinValue="
{Binding YMin}" MaxValue="{Binding YMax}" FontFamily="Courier New"
>
<lvc:Axis.Separator>
<lvc:Separator Stroke="{StaticResource Brushes.AxisSeparator}" Step="
10
"/>
<lvc:Separator Stroke="{StaticResource Brushes.AxisSeparator}" Step="
{Binding YStep}
"/>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisY>
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie.UI.Client/UiModule/AutoDieGraph/AutoDieGraphVm.cs
View file @
944e758a
...
...
@@ -20,6 +20,14 @@ namespace FLY.FilmCasting.AutoDie.UI.Client.UiModule
public
Func
<
double
,
string
>
YFormatter
{
get
;
private
set
;
}
public
double
XMax
{
get
;
protected
set
;
}
=
double
.
NaN
;
public
double
XMin
{
get
;
protected
set
;
}
=
double
.
NaN
;
public
double
YMax
=>
MaxHeat
;
public
double
YMin
=>
0
;
public
double
YStep
=>
MaxHeat
/
10
;
public
double
YStepOffset
=>
RangeOfOffset
/
10
;
public
double
YMaxOffset
=>
RangeOfOffset
/
2
;
public
double
YMinOffset
=>
-
RangeOfOffset
/
2
;
#
endregion
/// <summary>
...
...
@@ -37,12 +45,13 @@ namespace FLY.FilmCasting.AutoDie.UI.Client.UiModule
[
PropertyChanged
.
DependsOn
(
nameof
(
Kp
))]
public
object
MapperThickPercents
{
get
;
private
set
;
}
[
PropertyChanged
.
DependsOn
(
nameof
(
Kp
))]
public
object
MapperThickPercentsWithIsStable
{
get
;
private
set
;
}
public
object
Mapper
{
get
;
private
set
;
}
public
int
MaxHeat
{
get
;
set
;
}
=
100
;
public
int
RangeOfOffset
{
get
;
set
;
}
=
50
;
public
double
Kp
{
get
;
protected
set
;
}
=
3
;
/// <summary>
/// 当前选择加热通道
/// </summary>
...
...
@@ -75,7 +84,7 @@ namespace FLY.FilmCasting.AutoDie.UI.Client.UiModule
YFormatter
=
(
y
)
=>
{
string
text
=
y
+
"%"
;
string
text
=
Math
.
Round
(
y
)
+
"%"
;
return
$"
{
text
,
6
}
"
;
};
...
...
@@ -117,23 +126,6 @@ namespace FLY.FilmCasting.AutoDie.UI.Client.UiModule
return
value
*
Kp
;
});
MapperThickPercentsWithIsStable
=
Mappers
.
Xy
<
double
>()
.
X
((
value
,
index
)
=>
{
return
index
+
1
;
})
.
Y
((
value
,
index
)
=>
{
if
(
index
<
IsStables
.
Count
()
&&
index
>=
0
)
{
if
(!
IsStables
[
index
])
{
return
value
*
Kp
;
}
}
return
double
.
NaN
;
});
Mapper
=
Mappers
.
Xy
<
int
>()
.
X
((
value
,
index
)
=>
...
...
@@ -189,7 +181,8 @@ namespace FLY.FilmCasting.AutoDie.UI.Client.UiModule
Misc
.
BindingOperations
.
SetBinding
(
mHeatCell
,
nameof
(
mHeatCell
.
Kp
),
this
,
nameof
(
Kp
));
Misc
.
BindingOperations
.
SetBinding
(
mHeatCell
,
nameof
(
mHeatCell
.
MaxHeat
),
this
,
nameof
(
MaxHeat
));
Misc
.
BindingOperations
.
SetBinding
(
mHeatCell
,
nameof
(
mHeatCell
.
RangeOfOffset
),
this
,
nameof
(
RangeOfOffset
));
this
.
btnClearH
=
button_clear_h
;
LPress
.
Init
(
btnClearH
);
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie/Client/HeatCellServiceClient.cs
View file @
944e758a
...
...
@@ -42,6 +42,12 @@ namespace FLY.FilmCasting.AutoDie.Client
/// 最大加热量 默认100%
/// </summary>
public
int
MaxHeat
{
get
;
set
;
}
/// <summary>
/// 偏移量界面的显示范围
/// </summary>
public
int
RangeOfOffset
{
get
;
set
;
}
#
endregion
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie/IService/IHeatCellService.cs
View file @
944e758a
...
...
@@ -31,10 +31,15 @@ namespace FLY.FilmCasting.AutoDie.IService
int
CtrlLine
{
get
;
set
;
}
/// <summary>
/// 最大加热量 默认100%
/// 最大加热量 默认100%
, 也是 当前量界面的显示范围
/// </summary>
int
MaxHeat
{
get
;
set
;
}
/// <summary>
/// 偏移量界面的显示范围
/// </summary>
int
RangeOfOffset
{
get
;
set
;
}
#
endregion
#
region
状态
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie/Server/HeatCell.cs
View file @
944e758a
...
...
@@ -49,7 +49,10 @@ namespace FLY.FilmCasting.AutoDie.Server
/// 最大加热量 默认100%
/// </summary>
public
int
MaxHeat
{
get
;
set
;
}
=
100
;
/// <summary>
/// 偏移量界面的显示范围
/// </summary>
public
int
RangeOfOffset
{
get
;
set
;
}
=
50
;
#
endregion
#
region
状态
...
...
@@ -136,6 +139,7 @@ namespace FLY.FilmCasting.AutoDie.Server
{
CtrlLine
=
2
;
}
}
public
void
Init
(
HeatBuf
heatBuf
)
{
...
...
@@ -624,6 +628,11 @@ namespace FLY.FilmCasting.AutoDie.Server
/// </summary>
public
int
MaxHeat
=
100
;
/// <summary>
/// 偏移量界面的显示范围
/// </summary>
public
int
RangeOfOffset
=
50
;
/// <summary>
/// 平滑的阀值,只有超出阀值,才平滑
/// </summary>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment