Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hemei
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
潘栩锋
hemei
Commits
0d19fe78
Commit
0d19fe78
authored
Jul 21, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 称重MainGraph 也变成 MainGraphV4模式
parent
a0a202b4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
521 deletions
+8
-521
MainGraph.xaml
...t.FLY.Weight/FLY.Weight.UI.Client/UIModule/MainGraph.xaml
+3
-379
MainGraph.xaml.cs
...LY.Weight/FLY.Weight.UI.Client/UIModule/MainGraph.xaml.cs
+5
-141
MainGraphV4.xaml.cs
....Weight/FLY.Weight.UI.Client/UiModule/MainGraphV4.xaml.cs
+0
-1
No files found.
Project.FLY.Weight/FLY.Weight.UI.Client/UIModule/MainGraph.xaml
View file @
0d19fe78
...
@@ -23,252 +23,13 @@
...
@@ -23,252 +23,13 @@
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<Border Margin="5" CornerRadius="5" Background="{StaticResource Color_theme_background}">
<local:UcTotalFlow x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<StackPanel Orientation="Horizontal">
<Viewbox Margin="15,5">
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_ratio_Click" Margin="30,5">
<StackPanel Orientation="Horizontal">
<control:PieChart Margin="10" Width="120" Height="120"
ItemValueBinding="CurrentFlow" ItemColorBinding="Color"
ItemsSource="{Binding Items}"
/>
<StackPanel Orientation="Vertical" VerticalAlignment="Bottom">
<StackPanel Margin="3" >
<StackPanel Orientation="Horizontal">
<TextBlock Text="总流量" Style="{StaticResource TextBlockStyle_title_activity}" Margin="3,0"/>
<TextBlock>
<Run Text="{Binding Accessory.TotalFlowSetting,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text_activity}" FontSize="30"/>
<Run Text="kg/h" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<TextBlock>
<Run Text="{Binding Accessory.TotalFlow,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text_activity}" FontSize="72" />
<Run Text="kg/h" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
</StackPanel>
</StackPanel>
</Button>
</Viewbox>
<Viewbox Margin="15,5" MaxHeight="90" Style="{StaticResource ViewerStyle}">
<StackPanel Orientation="Horizontal" >
<control:PieChart Width="60" Height="60" Margin="10"
ItemValueBinding="CumulativeProduction" ItemColorBinding="Color"
ItemsSource="{Binding Items}"
/>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0*" />
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="累计总产量" Style="{StaticResource TextBlockStyle_title}" Grid.ColumnSpan="2" Margin="0,0,0,40.5" Grid.RowSpan="2" />
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" HorizontalAlignment="Right" Grid.Column="2" Grid.RowSpan="2" VerticalAlignment="Top" Click="button_clear_Click">
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Grid Width="50" Height="50">
<Ellipse Fill="White" Stretch="Uniform"/>
<Path Data="{StaticResource Geometry_close-circle}" Fill="Red" Stretch="Uniform" />
</Grid>
<TextBlock Text="清空" Padding="2" Background="Red" Foreground="White" FontSize="15" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,-10"/>
</Grid>
</Button>
<TextBlock Grid.Row="1" Grid.RowSpan="2" VerticalAlignment="Bottom" Grid.ColumnSpan="2" Margin="0,0,0,-0.64">
<Run Text="{Binding Accessory.TotalProduction,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text}" FontSize="50" />
</TextBlock>
<TextBlock Grid.Row="2" Grid.Column="2" Margin="0,0.5,0,0.36" >
<Run Text="kg" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</Grid>
</StackPanel>
</Viewbox>
<Viewbox Margin="15,5" Style="{StaticResource ViewerStyle}">
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<TextBlock Text="上卷" Style="{StaticResource TextBlockStyle_title}" FontSize="{StaticResource FontSize_title}" Margin="3,0"/>
<TextBlock >
<Run Text="{Binding Accessory.ALast,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text}" FontSize="{StaticResource FontSize_context_min}"/>
<Run Text="kg" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<!--
<StackPanel Orientation="Horizontal">
<TextBlock Text="当前" Style="{StaticResource TextBlockStyle_title}" FontSize="{StaticResource FontSize_title}" Margin="3,0"/>
<TextBlock>
<Run Text="{Binding Accessory.ACurrentLen,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text}" FontSize="{StaticResource FontSize_context_min}" />
<Run Text="m" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
-->
</StackPanel>
<TextBlock Text="内收卷" Grid.Column="1" FontSize="35" Margin="3,0" Padding="4,0" Background="#FF636363" Foreground="White"/>
<Grid Grid.Row="1" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" >
<TextBlock Text="当前" Style="{StaticResource TextBlockStyle_title}" FontSize="{StaticResource FontSize_title}" Margin="3,0"/>
<TextBlock >
<Run Text="{Binding Accessory.ACurrent,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text}" FontSize="{StaticResource FontSize_context_max}" />
<Run Text="kg" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<Button Grid.Column="1" Style="{StaticResource ButtonStyle_empty}" Background="Transparent" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-5,0,0" Click="button_aclear_Click">
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Grid Width="50" Height="50">
<Ellipse Fill="White" Stretch="Uniform"/>
<Path Data="{StaticResource Geometry_close-circle}" Fill="Red" Stretch="Uniform" />
</Grid>
<TextBlock Text="清空" Padding="2" Background="Red" Foreground="White" FontSize="15" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,-10"/>
</Grid>
</Button>
</Grid>
</Grid>
</Viewbox>
<Viewbox Margin="15,5" Style="{StaticResource ViewerStyle}">
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<TextBlock Text="上卷" Style="{StaticResource TextBlockStyle_title}" FontSize="{StaticResource FontSize_title}" Margin="3,0"/>
<TextBlock >
<Run Text="{Binding Accessory.BLast,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text}" FontSize="{StaticResource FontSize_context_min}"/>
<Run Text="kg" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<!--
<StackPanel Orientation="Horizontal">
<TextBlock Text="当前" Style="{StaticResource TextBlockStyle_title}" FontSize="{StaticResource FontSize_title}" Margin="3,0"/>
<TextBlock>
<Run Text="{Binding Accessory.BCurrentLen,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text}" FontSize="{StaticResource FontSize_context_min}" />
<Run Text="m" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
-->
</StackPanel>
<TextBlock Text="外收卷" Grid.Column="1" FontSize="35" Margin="3,0" Padding="4,0" Background="#FF636363" Foreground="White"/>
<Grid Grid.Row="1" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" >
<TextBlock Text="当前" Style="{StaticResource TextBlockStyle_title}" FontSize="{StaticResource FontSize_title}" Margin="3,0"/>
<TextBlock >
<Run Text="{Binding Accessory.BCurrent,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text}" FontSize="{StaticResource FontSize_context_max}" />
<Run Text="kg" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<Button Grid.Column="1" Style="{StaticResource ButtonStyle_empty}" Background="Transparent" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-5,0,0" Click="button_bclear_Click">
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Grid Width="50" Height="50">
<Ellipse Fill="White" Stretch="Uniform"/>
<Path Data="{StaticResource Geometry_close-circle}" Fill="Red" Stretch="Uniform" />
</Grid>
<TextBlock Text="清空" Padding="2" Background="Red" Foreground="White" FontSize="15" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,-10"/>
</Grid>
</Button>
</Grid>
</Grid>
</Viewbox>
</StackPanel>
</Border>
<Grid Grid.Row="1">
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<Border CornerRadius="5" Margin="5" Background="{StaticResource Color_theme_background}" >
<local:UcThickness x:Name="ucThickness" Margin="{StaticResource ControlMargin}"/>
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_thickness_Click" >
<StackPanel Margin="4" Width="180">
<StackPanel Margin="3" >
<TextBlock Text="吹膜宽度" Style="{StaticResource TextBlockStyle_title_activity}"/>
<TextBlock >
<Run Text="{Binding Accessory.TotalFilmWidth,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text_activity}" />
<Run Text="mm" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<StackPanel Margin="3" >
<TextBlock Text="边料不回收" Style="{StaticResource TextBlockStyle_title_activity}"/>
<ToggleButton Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding Accessory.IsRimNoRecycle}" HorizontalAlignment="Left" IsEnabled="False"/>
</StackPanel>
<StackPanel Margin="3" >
<TextBlock Text="切边" Style="{StaticResource TextBlockStyle_title_activity}"/>
<TextBlock >
<Run Text="{Binding Accessory.RimWidth,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text_activity}" />
<Run Text="mm" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<StackPanel Margin="3" Background="#FF636363" >
<TextBlock Text="收卷宽度" Style="{StaticResource TextBlockStyle_title}" Foreground="White"/>
<TextBlock >
<Run Text="{Binding Accessory.ActFilmWidth,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text}" Foreground="White"/>
<Run Text="mm" Style="{StaticResource RunStyle_unit}" Foreground="White"/>
</TextBlock>
</StackPanel>
<StackPanel Margin="3" >
<TextBlock Text="设置厚度" Style="{StaticResource TextBlockStyle_title_activity}"/>
<TextBlock >
<Run Text="{Binding Accessory.SetThickness,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text_activity}" />
<Run Text="um" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<StackPanel Margin="3" Background="#FF636363">
<TextBlock Text="理论线速度" Style="{StaticResource TextBlockStyle_title}" Foreground="White"/>
<TextBlock >
<Run Text="{Binding Accessory.TargetVelocity,StringFormat={}{0:F1}}" Style="{StaticResource RunStyle_text}" Foreground="White"/>
<Run Text="m/min" Style="{StaticResource RunStyle_unit}" Foreground="White"/>
</TextBlock>
</StackPanel>
<StackPanel Margin="3" >
<TextBlock Text="当前线速度" Style="{StaticResource TextBlockStyle_title}" />
<TextBlock >
<Run Text="{Binding Accessory.CurrentVelocity,StringFormat={}{0:F1}}" Style="{StaticResource RunStyle_text}" />
<Run Text="m/min" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
</StackPanel>
</Button>
</Border>
<ItemsControl x:Name="itemsControl" Grid.Column="1" ItemsSource="{Binding Items}">
<ItemsControl x:Name="itemsControl" Grid.Column="1" ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<ItemsPanelTemplate>
...
@@ -277,144 +38,7 @@
...
@@ -277,144 +38,7 @@
</ItemsControl.ItemsPanel>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<ItemsControl.ItemTemplate>
<DataTemplate>
<DataTemplate>
<local:UcWeighterItem Margin="5" WeightSystemService="{Binding DataContext,ElementName=root_grid}"/>
<Border CornerRadius="5" Margin="5" Background="{StaticResource Color_theme_background}" >
<StackPanel Margin="4">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Button Margin="6,0,0,0" Grid.RowSpan="2" Style="{StaticResource ButtonStyle_empty}"
Background="Transparent" Click="button_ingredient_Click"
Tag="{Binding .}"
>
<Border Width="100" Height="300" Background="{Binding Color}" Margin="3">
<TextBlock Text="{Binding Number}" Width="100" Height="100" FontSize="100" FontWeight="Bold" FontFamily="Arial Black" Foreground="{StaticResource Color_theme_background}" Margin="-10,0,0,0" VerticalAlignment="Top" HorizontalAlignment="Left">
<TextBlock.Clip>
<RectangleGeometry Rect="10,0,90,100"/>
</TextBlock.Clip>
</TextBlock>
</Border>
</Button>
<StackPanel Margin="3" Grid.Column="1" >
<StackPanel Orientation="Horizontal">
<TextBlock Text="产量" Style="{StaticResource TextBlockStyle_title}" Margin="3,0"/>
<TextBlock >
<Run Text="{Binding FlowSetting,StringFormat={}{0:F0}}" Style="{StaticResource RunStyle_text}" FontSize="30" />
<Run Text="kg/h" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<Viewbox Width="200" Height="72" HorizontalAlignment="Left">
<TextBlock >
<Run Text="{Binding CurrentFlow,StringFormat={}{0:F1}}" Style="{StaticResource RunStyle_text}" FontSize="60" />
<Run Text="kg/h" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</Viewbox>
</StackPanel>
<Button Grid.Row="1" Grid.Column="1" Margin="3" Height="200" Style="{StaticResource ButtonStyle_empty}"
Background="Transparent" Click="button_ratio_Click"
Tag="{Binding .}"
>
<Grid>
<Viewbox >
<control:PercentRing2
Ratio="{Binding ScrewPDisp}"
Total="{StaticResource d100}"
ColorText="{DynamicResource Color_text}"
ColorUnit="{DynamicResource Color_unit}"
/>
</Viewbox>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" >
<TextBlock HorizontalAlignment="Center">
<Run Text="{Binding ScrewPSet,StringFormat={}{0:F1}}" Style="{StaticResource RunStyle_text_activity}" FontSize="30" />
<Run Text="%" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
<TextBlock>
<Run Text="{Binding ScrewPDisp,StringFormat={}{0:F1}}" Style="{StaticResource RunStyle_text}" FontSize="60" />
<Run Text="%" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
</Grid>
</Button>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<StackPanel Margin="3" Grid.Row="1" >
<TextBlock Text="料斗重量" Style="{StaticResource TextBlockStyle_title}"/>
<TextBlock >
<Run Text="{Binding MixBucketWeight,StringFormat={}{0:F4}}" Style="{StaticResource RunStyle_text}" FontSize="36"/>
<Run Text="kg" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<StackPanel Margin="3" Grid.Row="2" >
<TextBlock Text="失重仓重量" Style="{StaticResource TextBlockStyle_title}"/>
<TextBlock >
<Run Text="{Binding BinWeight,StringFormat={}{0:F3}}" Style="{StaticResource RunStyle_text}" />
<Run Text="kg" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
<StackPanel Margin="3" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" >
<TextBlock Text="配料" Style="{StaticResource TextBlockStyle_title_activity}"/>
<ToggleButton Style="{StaticResource ToggleButtonStyle_switch}" IsChecked="{Binding MixIsOn}"/>
</StackPanel>
<StackPanel Margin="3" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" >
<TextBlock Text="卸料阀" Style="{StaticResource TextBlockStyle_title_activity}"/>
<ToggleButton Style="{StaticResource ToggleButtonStyle_switch}" IsChecked="{Binding BucketValveIsOpen}"/>
</StackPanel>
<StackPanel Grid.Row="3" >
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_frequency_Click"
Tag="{Binding .}"
>
<StackPanel Margin="3" >
<TextBlock Text="运行频率" Style="{StaticResource TextBlockStyle_title_activity}"/>
<TextBlock >
<Run Text="{Binding ScrewMotorFreq,StringFormat={}{0:F1}}" Style="{StaticResource RunStyle_text_activity}" />
<Run Text="Hz" Style="{StaticResource RunStyle_unit}" />
</TextBlock>
</StackPanel>
</Button>
</StackPanel>
<StackPanel Grid.Row="3" Grid.Column="1" Orientation="Vertical" >
<StackPanel Margin="3" Grid.Row="4" VerticalAlignment="Center" >
<TextBlock Text="螺杆操作" Style="{StaticResource TextBlockStyle_title_activity}"/>
<ToggleButton Name="togglebutton_screw" Style="{StaticResource ToggleButtonStyle_switch}" HorizontalAlignment="Left" IsChecked="{Binding ScrewMotorIsOn}"/>
</StackPanel>
<StackPanel Margin="3" Grid.Row="4" Grid.Column="1" VerticalAlignment="Center" Visibility="{Binding IsChecked,Converter={StaticResource ResourceKey=visbilityconv},ConverterParameter=Hidden, ElementName=togglebutton_screw}">
<TextBlock Text="螺杆模式" Style="{StaticResource TextBlockStyle_title_activity}"/>
<ToggleButton Style="{StaticResource ToggleButtonStyle_mode}" HorizontalAlignment="Left" IsChecked="{Binding ScrewIsAutoMode}"/>
</StackPanel>
</StackPanel>
</Grid>
</StackPanel>
</Border>
</DataTemplate>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl.ItemTemplate>
...
...
Project.FLY.Weight/FLY.Weight.UI.Client/UIModule/MainGraph.xaml.cs
View file @
0d19fe78
...
@@ -31,7 +31,6 @@ namespace FLY.Weight.UI.Client.UiModule
...
@@ -31,7 +31,6 @@ namespace FLY.Weight.UI.Client.UiModule
IUnityContainer
container
;
IUnityContainer
container
;
IWeightSystemService
weightSystemService
;
IWeightSystemService
weightSystemService
;
SetPLCUpdatePlan
setPlan_accessory
;
List
<
SetPLCUpdatePlan
>
setPlan_items
=
new
List
<
SetPLCUpdatePlan
>();
List
<
SetPLCUpdatePlan
>
setPlan_items
=
new
List
<
SetPLCUpdatePlan
>();
public
MainGraph
()
public
MainGraph
()
{
{
...
@@ -45,42 +44,18 @@ namespace FLY.Weight.UI.Client.UiModule
...
@@ -45,42 +44,18 @@ namespace FLY.Weight.UI.Client.UiModule
IWeightSystemService
weightSystemService
)
IWeightSystemService
weightSystemService
)
{
{
this
.
container
=
container
;
this
.
container
=
container
;
ucTotalFlow
.
Init
(
weightSystemService
);
ucThickness
.
Init
(
weightSystemService
);
this
.
weightSystemService
=
weightSystemService
;
this
.
weightSystemService
=
weightSystemService
;
root_grid
.
DataContext
=
this
.
weightSystemService
;
root_grid
.
DataContext
=
this
.
weightSystemService
;
setPlan_accessory
=
new
SetPLCUpdatePlan
(
this
.
weightSystemService
.
PLCos
,
this
.
weightSystemService
.
Accessory
,
new
string
[]
{
"TotalFlowSetting"
,
"TotalFlow"
,
"TotalProduction"
,
"ALast"
,
"ACurrent"
,
"ACurrentLen"
,
"AClear"
,
"BLast"
,
"BCurrent"
,
"BCurrentLen"
,
"BClear"
,
"TotalFilmWidth"
,
"IsRimNoRecycle"
,
"RimWidth"
,
"ActFilmWidth"
,
"SetThickness"
,
"TargetVelocity"
,
"CurrentVelocity"
});
for
(
int
i
=
0
;
i
<
this
.
weightSystemService
.
Items
.
Count
();
i
++)
for
(
int
i
=
0
;
i
<
this
.
weightSystemService
.
Items
.
Count
();
i
++)
{
{
SetPLCUpdatePlan
plan
=
new
SetPLCUpdatePlan
(
SetPLCUpdatePlan
plan
=
new
SetPLCUpdatePlan
(
this
.
weightSystemService
.
PLCos
,
this
.
weightSystemService
.
PLCos
,
this
.
weightSystemService
.
Items
[
i
],
this
.
weightSystemService
.
Items
[
i
],
item_update_propertynames
);
UcWeighterItem
.
item_update_propertynames
);
setPlan_items
.
Add
(
plan
);
setPlan_items
.
Add
(
plan
);
}
}
if
(
weightSystemService
is
WeightSystemServiceClient
)
{
if
(
weightSystemService
is
WeightSystemServiceClient
)
{
...
@@ -111,123 +86,12 @@ namespace FLY.Weight.UI.Client.UiModule
...
@@ -111,123 +86,12 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan
plan
=
new
SetPLCUpdatePlan
(
SetPLCUpdatePlan
plan
=
new
SetPLCUpdatePlan
(
weightSystemService
.
PLCos
,
weightSystemService
.
PLCos
,
weightSystemService
.
Items
[
start_idx
+
i
],
weightSystemService
.
Items
[
start_idx
+
i
],
item_update_propertynames
);
UcWeighterItem
.
item_update_propertynames
);
setPlan_items
.
Add
(
plan
);
setPlan_items
.
Add
(
plan
);
}
}
}
}
}
}
string
[]
item_update_propertynames
=
new
string
[]
{
"CurrentFlow"
,
"CumulativeProduction"
,
"FlowSetting"
,
"CurrentFlow"
,
"ScrewPDisp"
,
"ScrewPSet"
,
"ScrewPDisp"
,
"MixBucketWeight"
,
"BinWeight"
,
"MixIsOn"
,
"BucketValveIsOpen"
,
"ScrewMotorFreq"
,
"ScrewMotorIsOn"
,
"ScrewIsAutoMode"
,
"ScrewManualFreq"
};
private
async
void
button_frequency_Click
(
object
sender
,
RoutedEventArgs
e
)
{
WdFrequency
w
=
new
WdFrequency
();
var
weight
=
((
Button
)
sender
).
Tag
as
FLY
.
Weight
.
Common
.
WeighterC
;
w
.
FrequencySet
=
weight
.
ScrewManualFreq
;
w
.
Owner
=
FLY
.
ControlLibrary
.
COMMON
.
GetWindow
(
this
);
if
(
w
.
ShowDialog
()==
true
)
{
//TODO
weight
.
ScrewManualFreq
=
(
float
)
w
.
FrequencySet
;
weight
.
ScrewManualFreqIsSet
=
true
;
//不用写下降沿!!!!!
}
}
private
void
button_ratio_Click
(
object
sender
,
RoutedEventArgs
e
)
{
WdRatioSet
w
=
new
WdRatioSet
();
w
.
Owner
=
FLY
.
ControlLibrary
.
COMMON
.
GetWindow
(
this
);
w
.
Init
(
weightSystemService
);
w
.
ShowDialog
();
}
private
void
button_info_Click
(
object
sender
,
RoutedEventArgs
e
)
{
PgMenu
p
=
new
PgMenu
();
container
.
BuildUp
(
p
);
MultiLayout
.
FlyLayoutManager
.
NavigationService
.
Navigate
(
p
);
}
private
void
button_clear_Click
(
object
sender
,
RoutedEventArgs
e
)
{
foreach
(
FLY
.
Weight
.
Common
.
WeighterC
weight
in
weightSystemService
.
Items
)
{
weight
.
ClearProduction
=
true
;
}
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
""
,
"清空成功"
,
TimeSpan
.
FromSeconds
(
2
));
}
private
void
button_ingredient_Click
(
object
sender
,
RoutedEventArgs
e
)
{
WdIngredient
w
=
new
WdIngredient
();
var
weight
=
((
Button
)
sender
).
Tag
as
WeighterC
;
w
.
Init
(
container
,
weight
,
weightSystemService
);
w
.
Owner
=
FLY
.
ControlLibrary
.
COMMON
.
GetWindow
(
this
);
w
.
ShowDialog
();
}
private
void
button_thickness_Click
(
object
sender
,
RoutedEventArgs
e
)
{
WdThickness
w
=
new
WdThickness
();
if
(
weightSystemService
.
Items
.
Count
()
<
1
)
return
;
w
.
SetThickness
=
(
int
)
weightSystemService
.
Accessory
.
SetThickness
;
w
.
FilmWidth
=
(
int
)
weightSystemService
.
Accessory
.
TotalFilmWidth
;
w
.
RimWidth
=
(
int
)
weightSystemService
.
Accessory
.
RimWidth
;
w
.
IsRimNoRecycle
=
weightSystemService
.
Accessory
.
IsRimNoRecycle
;
w
.
Owner
=
FLY
.
ControlLibrary
.
COMMON
.
GetWindow
(
this
);
if
(
w
.
ShowDialog
()
==
true
)
{
weightSystemService
.
Accessory
.
SetThickness
=
w
.
SetThickness
;
weightSystemService
.
Accessory
.
TotalFilmWidth
=
w
.
FilmWidth
;
weightSystemService
.
Accessory
.
RimWidth
=
w
.
RimWidth
;
weightSystemService
.
Accessory
.
IsRimNoRecycle
=
w
.
IsRimNoRecycle
;
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
""
,
"厚度参数设置成功"
,
TimeSpan
.
FromSeconds
(
2
));
}
}
private
void
button_aclear_Click
(
object
sender
,
RoutedEventArgs
e
)
{
if
(
weightSystemService
.
ItemsCnt
>
0
)
{
weightSystemService
.
Accessory
.
AClear
=
true
;
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
""
,
"清空成功"
,
TimeSpan
.
FromSeconds
(
2
));
}
}
private
void
button_bclear_Click
(
object
sender
,
RoutedEventArgs
e
)
{
if
(
weightSystemService
.
ItemsCnt
>
0
)
{
weightSystemService
.
Accessory
.
BClear
=
true
;
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
""
,
"清空成功"
,
TimeSpan
.
FromSeconds
(
2
));
}
}
}
}
...
...
Project.FLY.Weight/FLY.Weight.UI.Client/UiModule/MainGraphV4.xaml.cs
View file @
0d19fe78
...
@@ -31,7 +31,6 @@ namespace FLY.Weight.UI.Client.UiModule
...
@@ -31,7 +31,6 @@ namespace FLY.Weight.UI.Client.UiModule
IUnityContainer
container
;
IUnityContainer
container
;
IWeightSystemService
weightSystemService
;
IWeightSystemService
weightSystemService
;
SetPLCUpdatePlan
setPlan_accessory
;
List
<
SetPLCUpdatePlan
>
setPlan_items
=
new
List
<
SetPLCUpdatePlan
>();
List
<
SetPLCUpdatePlan
>
setPlan_items
=
new
List
<
SetPLCUpdatePlan
>();
public
MainGraphV4
()
public
MainGraphV4
()
{
{
...
...
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