VelocityCtrlPanelV3.xaml 16.5 KB
Newer Older
1
<UserControl x:Class="FLY.DownBlowing.UI.Client.UiModule.VelocityCtrlPanelV3"
2 3 4 5 6 7 8 9 10
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:FLY.DownBlowing.UI.Client.UiModule" 
             xmlns:flyctrl="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
             xmlns:i="http://schemas.microsoft.com/xaml/behaviors" 
             xmlns:ut="clr-namespace:FLY.DownBlowing.UI.Client.UnitTests"
             mc:Ignorable="d" 
11
             Unloaded="UserControl_Unloaded" Loaded="UserControl_Loaded">
12 13 14 15 16
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="WinderPanelStyle.xaml"/>
            </ResourceDictionary.MergedDictionaries>
17
            
18 19
        </ResourceDictionary>
    </UserControl.Resources>
20 21 22 23
    <Grid d:DataContext="{StaticResource downBlowingSystemUt}">
        <Grid x:Name="grid_winderAccessory" DataContext="{Binding WinderAccessory}"/>
        <Grid x:Name="grid_winder" DataContext="{Binding WIOs[0]}"/>
        <Border DataContext="{Binding ElementName=grid_winderAccessory,Path=DataContext}" Style="{StaticResource Styles.Module.Border}" 
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
                Background="{StaticResource Color_background}">
            <Grid Margin="10" Grid.IsSharedSizeScope="True">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="auto" SharedSizeGroup="A" MinWidth="150"/>
                    <ColumnDefinition Width="auto" SharedSizeGroup="A"/>
                    <ColumnDefinition Width="auto" SharedSizeGroup="A"/>
                    <ColumnDefinition Width="auto" />
                    <ColumnDefinition Width="auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto" />
                    <RowDefinition SharedSizeGroup="B"/>
                    <RowDefinition SharedSizeGroup="B"/>
                    <RowDefinition SharedSizeGroup="B"/>
                    <RowDefinition SharedSizeGroup="B"/>

                </Grid.RowDefinitions>
                <!--背景-->
                <Rectangle Fill="{StaticResource Color_table_alter_row}" Grid.ColumnSpan="6" Grid.Row="1"/>
                <Rectangle Fill="{StaticResource Color_table_alter_row}" Grid.ColumnSpan="6" Grid.Row="3"/>

                <Border Grid.RowSpan="5" Grid.Column="1" BorderThickness="1" BorderBrush="{StaticResource Color_table_border}"/>
                <Border Grid.RowSpan="5" Grid.Column="2" BorderThickness="1" BorderBrush="{StaticResource Color_table_border}"/>
                <Border Grid.RowSpan="5" Grid.Column="3" BorderThickness="1" BorderBrush="{StaticResource Color_table_border}"/>
                <Border Grid.RowSpan="5" Grid.Column="4" BorderThickness="1" BorderBrush="{StaticResource Color_table_border}"/>
                <Border Grid.RowSpan="5" Grid.Column="5" BorderThickness="1" BorderBrush="{StaticResource Color_table_border}"/>
                <Border Grid.RowSpan="5" Grid.Column="1" Grid.ColumnSpan="5" BorderThickness="1" BorderBrush="{StaticResource Color_table_border}"/>

                <Rectangle Style="{StaticResource RectStyle_RowHeaderEditBackground}" Grid.Column="1" />
                <Rectangle Style="{StaticResource RectStyle_RowHeaderBackground}"  Grid.Column="2"/>
                <Rectangle Style="{StaticResource RectStyle_RowHeaderBackground}"  Grid.Column="3"/>
                <Rectangle Style="{StaticResource RectStyle_RowHeaderEditBackground}"  Grid.Column="4"/>
                <Rectangle Style="{StaticResource RectStyle_RowHeaderEditBackground}"  Grid.Column="5"/>

                <Rectangle Style="{StaticResource RectStyle_RowHeaderEditBackground}" Grid.Row="1" />
                <Rectangle Style="{StaticResource RectStyle_RowHeaderEditBackground}" Grid.Row="2" />
                <Rectangle Style="{StaticResource RectStyle_RowHeaderEditBackground}" Grid.Row="3" />
                <Rectangle Style="{StaticResource RectStyle_RowHeaderEditBackground}" Grid.Row="4" />

                <!--列标题-->
                <TextBlock Text="设定张力" Grid.Column="1" Style="{StaticResource TextBlockStyle_Header}"/>
                <TextBlock Text="当前张力" Grid.Column="2" Style="{StaticResource TextBlockStyle_Header}"/>
                <TextBlock Text="电机电流" Grid.Column="3" Style="{StaticResource TextBlockStyle_Header}"/>
                <TextBlock Text="控制开关" Grid.Column="4" Style="{StaticResource TextBlockStyle_Header}" />
                <TextBlock Text="压辊控制" Grid.Column="5" Style="{StaticResource TextBlockStyle_Header}" />
                <!--行标题-->
                <TextBlock Text="一牵引" Grid.Row="1" Style="{StaticResource TextBlockStyle_RowHeader}"/>
                <TextBlock Text="二牵引" Grid.Row="2" Style="{StaticResource TextBlockStyle_RowHeader}"/>
                <TextBlock Text="三牵引" Grid.Row="3" Style="{StaticResource TextBlockStyle_RowHeader}" />
                <TextBlock Text="外收卷" Grid.Row="4" Style="{StaticResource TextBlockStyle_RowHeader}"/>

                <!--一牵引-->
                <StackPanel Style="{StaticResource SpStyle_ReadOnly}" Grid.Column="3" Grid.Row="1" >
                    <TextBlock  Style="{StaticResource Styles.Text.FieldContent}" 
                                Foreground="{StaticResource Color_text}"
                                Text="{Binding T1Current,StringFormat={}{0:0.#}}"/>
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" 
                               Foreground="{StaticResource Color_unit}"
                               Text="A"/>
                </StackPanel>

                <flyctrl:NoToggleButton Style="{StaticResource NoToggleButtonStyle}" Grid.Column="4" Grid.Row="1" 
                                                IsChecked="{Binding IsT1On}"
                                                OffLabel="停止" OffBrush="{StaticResource Color_off}"
                                                OnLabel="运行" OnBrush="{StaticResource Color_on}"
                                               >
                    <i:Interaction.Behaviors>
                        <!--状态切换-->
93
                        <flyctrl:ResetBehavior Binding="{Binding IsT1OnSet}"/>
94 95 96 97 98 99 100 101 102 103
                    </i:Interaction.Behaviors>
                </flyctrl:NoToggleButton>

                <flyctrl:NoToggleButton Style="{StaticResource NoToggleButtonStyle}" Grid.Column="5" Grid.Row="1" 
                                                IsChecked="{Binding IsT1CalenderRollerClosed}"
                                                OffLabel="分离" OffBrush="{StaticResource Color_off}"
                                                OnLabel="压合" OnBrush="{StaticResource Color_on}"
                                               >
                    <i:Interaction.Behaviors>
                        <!--状态切换-->
104
                        <flyctrl:ResetBehavior Binding="{Binding IsT1CalenderRollerClosedSet}"/>
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
                    </i:Interaction.Behaviors>
                </flyctrl:NoToggleButton>
                <!--二牵引-->
                <StackPanel Style="{StaticResource SpStyle_Editable}" Grid.Column="1" Grid.Row="2" >
                    <TextBox Style="{StaticResource Styles.Text.FieldContent.Input}"
                             Background="Transparent"
                             Foreground="{StaticResource Color_text_activity}"
                             Text="{Binding T2TensionSet,StringFormat={}{0:0.#}}"  />
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" 
                               Foreground="{StaticResource Color_unit}"
                               Text="kg"/>
                </StackPanel>

                <StackPanel Style="{StaticResource SpStyle_ReadOnly}" Grid.Column="2" Grid.Row="2" >
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent}" 
                               Foreground="{StaticResource Color_text}"
121
                               Text="{Binding T2Tension,StringFormat={}{0:0.0}}"  />
122 123 124 125 126 127 128 129
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" 
                               Foreground="{StaticResource Color_unit}"
                               Text="kg"/>
                </StackPanel>

                <StackPanel Style="{StaticResource SpStyle_ReadOnly}" Grid.Column="3" Grid.Row="2" >
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent}" 
                               Foreground="{StaticResource Color_text}"
130
                               Text="{Binding T2Current,StringFormat={}{0:0.0}}"  />
131 132 133 134 135 136 137 138 139 140 141 142
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" 
                               Foreground="{StaticResource Color_unit}"
                               Text="A"/>
                </StackPanel>

                <flyctrl:NoToggleButton Style="{StaticResource NoToggleButtonStyle}" Grid.Column="4" Grid.Row="2" 
                                                IsChecked="{Binding IsT2On}"
                                                OffLabel="停止" OffBrush="{StaticResource Color_off}"
                                                OnLabel="运行" OnBrush="{StaticResource Color_on}"
                                                >
                    <i:Interaction.Behaviors>
                        <!--状态切换-->
143
                        <flyctrl:ResetBehavior Binding="{Binding IsT2OnSet}"/>
144 145 146 147 148 149 150 151 152 153
                    </i:Interaction.Behaviors>
                </flyctrl:NoToggleButton>

                <flyctrl:NoToggleButton Style="{StaticResource NoToggleButtonStyle}" Grid.Column="5" Grid.Row="2" 
                                                IsChecked="{Binding IsT2CalenderRollerClosed}"
                                                OffLabel="分离" OffBrush="{StaticResource Color_off}"
                                                OnLabel="压合" OnBrush="{StaticResource Color_on}"
                                               >
                    <i:Interaction.Behaviors>
                        <!--状态切换-->
154
                        <flyctrl:ResetBehavior Binding="{Binding IsT2CalenderRollerClosedSet}"/>
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
                    </i:Interaction.Behaviors>
                </flyctrl:NoToggleButton>
                <!--内收卷-->
                <StackPanel Style="{StaticResource SpStyle_Editable}" Grid.Column="1" Grid.Row="3" >
                    <TextBox  Style="{StaticResource Styles.Text.FieldContent.Input}"
                             Background="Transparent"
                              Foreground="{StaticResource Color_text_activity}"
                              Text="{Binding T3TensionSet,StringFormat={}{0:0.#}}" />
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" 
                               Foreground="{StaticResource Color_unit}"
                               Text="kg"/>
                </StackPanel>

                <StackPanel Style="{StaticResource SpStyle_ReadOnly}" Grid.Column="2" Grid.Row="3" >
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent}" 
                               Foreground="{StaticResource Color_text}"
171
                               Text="{Binding T3Tension,StringFormat={}{0:0.0}}"  />
172 173 174 175 176 177 178 179
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" 
                               Foreground="{StaticResource Color_unit}"
                               Text="kg"/>
                </StackPanel>

                <StackPanel Style="{StaticResource SpStyle_ReadOnly}" Grid.Column="3" Grid.Row="3" >
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent}" 
                               Foreground="{StaticResource Color_text}"
180
                               Text="{Binding T3Current,StringFormat={}{0:0.0}}"  />
181 182 183 184 185 186 187 188 189 190 191 192 193
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" 
                               Foreground="{StaticResource Color_unit}"
                               Text="A"/>
                </StackPanel>


                <flyctrl:NoToggleButton Style="{StaticResource NoToggleButtonStyle}" Grid.Column="4" Grid.Row="3" 
                                                IsChecked="{Binding IsT3On}"
                                                OffLabel="停止" OffBrush="{StaticResource Color_off}"
                                                OnLabel="运行" OnBrush="{StaticResource Color_on}"
                                                >
                    <i:Interaction.Behaviors>
                        <!--状态切换-->
194
                        <flyctrl:ResetBehavior Binding="{Binding IsT3OnSet}"/>
195 196 197 198 199 200 201 202 203 204
                    </i:Interaction.Behaviors>
                </flyctrl:NoToggleButton>

                <flyctrl:NoToggleButton Style="{StaticResource NoToggleButtonStyle}" Grid.Column="5" Grid.Row="3" 
                                                IsChecked="{Binding IsT3CalenderRollerClosed}"
                                                OffLabel="分离" OffBrush="{StaticResource Color_off}"
                                                OnLabel="压合" OnBrush="{StaticResource Color_on}"
                                               >
                    <i:Interaction.Behaviors>
                        <!--状态切换-->
205
                        <flyctrl:ResetBehavior Binding="{Binding IsT3CalenderRollerClosedSet}"/>
206 207 208
                    </i:Interaction.Behaviors>
                </flyctrl:NoToggleButton>
                <!--外收卷-->
209
                <StackPanel Style="{StaticResource SpStyle_Editable}" Grid.Column="1" Grid.Row="4" DataContext="{Binding ElementName=grid_winder,Path=DataContext}" >
210 211 212
                    <TextBox  Style="{StaticResource Styles.Text.FieldContent.Input}"
                             Background="Transparent"
                              Foreground="{StaticResource Color_text_activity}"
213
                              Text="{Binding TensionSet,StringFormat={}{0:0.#}}" />
214 215 216 217 218
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" 
                               Foreground="{StaticResource Color_unit}"
                               Text="kg"/>
                </StackPanel>

219
                <StackPanel Style="{StaticResource SpStyle_ReadOnly}" Grid.Column="2" Grid.Row="4" DataContext="{Binding ElementName=grid_winder,Path=DataContext}" >
220 221
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent}" 
                               Foreground="{StaticResource Color_text}"
222
                               Text="{Binding Tension,StringFormat={}{0:0.0}}"  />
223 224 225 226 227
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" 
                               Foreground="{StaticResource Color_unit}"
                               Text="kg"/>
                </StackPanel>

228
                <StackPanel Style="{StaticResource SpStyle_ReadOnly}" Grid.Column="3" Grid.Row="4" DataContext="{Binding ElementName=grid_winder,Path=DataContext}" >
229 230
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent}" 
                               Foreground="{StaticResource Color_text}"
231
                               Text="{Binding Current,StringFormat={}{0:0.0}}"  />
232 233 234 235 236
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" 
                               Foreground="{StaticResource Color_unit}"
                               Text="A"/>
                </StackPanel>

237 238
                <flyctrl:NoToggleButton Style="{StaticResource NoToggleButtonStyle}" Grid.Column="4" Grid.Row="4" DataContext="{Binding ElementName=grid_winder,Path=DataContext}" 
                                                IsChecked="{Binding IsOn}"
239 240 241 242 243
                                                OffLabel="停止" OffBrush="{StaticResource Color_off}"
                                                OnLabel="运行" OnBrush="{StaticResource Color_on}"
                                                >
                    <i:Interaction.Behaviors>
                        <!--状态切换-->
244
                        <flyctrl:ResetBehavior Binding="{Binding IsOnSet}"/>
245 246 247 248 249 250
                    </i:Interaction.Behaviors>
                </flyctrl:NoToggleButton>
            </Grid>
        </Border>
    </Grid>
</UserControl>