-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRcbExportFilterWindow.xaml
More file actions
255 lines (245 loc) · 16.3 KB
/
Copy pathRcbExportFilterWindow.xaml
File metadata and controls
255 lines (245 loc) · 16.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<Window x:Class="ArIED61850Tester.RcbExportFilterWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="RCB Export Filter — Legacy SAS" Height="720" Width="1040" MinHeight="680" MinWidth="960"
WindowStartupLocation="CenterOwner" ResizeMode="CanResizeWithGrip"
Background="{StaticResource AppBackgroundGradient}"
FontFamily="Aptos, Segoe UI Variable Text, Segoe UI, Calibri"
Icon="Assets/app-icon.ico" Loaded="Window_Loaded">
<Window.Resources>
<SolidColorBrush x:Key="RcbInk" Color="#20304A"/>
<SolidColorBrush x:Key="RcbMuted" Color="#66758B"/>
<SolidColorBrush x:Key="RcbLine" Color="#D8E2F0"/>
<Style x:Key="RcbTableHeader" TargetType="DataGridColumnHeader">
<Setter Property="Height" Value="42"/>
<Setter Property="Padding" Value="12,0"/>
<Setter Property="Background" Value="#EDF3FA"/>
<Setter Property="Foreground" Value="#52647D"/>
<Setter Property="FontSize" Value="11.5"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="BorderBrush" Value="#D7E2F0"/>
<Setter Property="BorderThickness" Value="0,0,1,1"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<Style x:Key="RcbDataGridCell" TargetType="DataGridCell">
<Setter Property="Padding" Value="12,9"/>
<Setter Property="BorderBrush" Value="#E4EAF3"/>
<Setter Property="BorderThickness" Value="0,0,1,1"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Foreground" Value="{StaticResource RcbInk}"/>
<Setter Property="FontSize" Value="12.2"/>
<Setter Property="Background" Value="Transparent"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#EAF2FF"/>
<Setter Property="Foreground" Value="{StaticResource RcbInk}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="RcbDataGridRow" TargetType="DataGridRow">
<Setter Property="MinHeight" Value="58"/>
<Setter Property="Background" Value="#FFFFFF"/>
<Setter Property="BorderThickness" Value="0"/>
<Style.Triggers>
<Trigger Property="AlternationIndex" Value="1"><Setter Property="Background" Value="#FAFCFF"/></Trigger>
<DataTrigger Binding="{Binding IsSelectable}" Value="False"><Setter Property="Opacity" Value="0.72"/></DataTrigger>
<Trigger Property="IsMouseOver" Value="True"><Setter Property="Background" Value="#F1F6FE"/></Trigger>
<Trigger Property="IsSelected" Value="True"><Setter Property="Background" Value="#EAF2FF"/></Trigger>
</Style.Triggers>
</Style>
<Style x:Key="RcbCheckBox" TargetType="CheckBox">
<Setter Property="Width" Value="20"/>
<Setter Property="Height" Value="20"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Cursor" Value="Hand"/>
</Style>
</Window.Resources>
<Grid Margin="18">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="12"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="12"/>
<RowDefinition Height="*"/>
<RowDefinition Height="12"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="14"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" Background="#FFFFFF" BorderBrush="#D4E0EF" BorderThickness="1"
CornerRadius="22" Padding="20,17" Effect="{StaticResource CardShadow}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Border Width="52" Height="52" CornerRadius="17" Margin="0,0,15,0">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#DBEAFE" Offset="0"/>
<GradientStop Color="#E0E7FF" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Grid Width="27" Height="27" HorizontalAlignment="Center" VerticalAlignment="Center">
<Path Data="M7,5 H21 M7,12 H21 M7,19 H21" Stroke="#315DBF" StrokeThickness="2"
StrokeStartLineCap="Round" StrokeEndLineCap="Round"/>
<Path Data="M1.5,5 L2.8,6.3 L5.2,3.7 M1.5,12 L2.8,13.3 L5.2,10.7 M1.5,19 L2.8,20.3 L5.2,17.7"
Stroke="#315DBF" StrokeThickness="1.8" StrokeStartLineCap="Round" StrokeEndLineCap="Round"/>
</Grid>
</Border>
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal">
<TextBlock Text="RCB Export Filter" FontSize="22" FontWeight="SemiBold" Foreground="{StaticResource RcbInk}"/>
<Border Background="#EEF4FF" BorderBrush="#CBDCF8" BorderThickness="1" CornerRadius="10"
Padding="8,3" Margin="10,0,0,0" VerticalAlignment="Center"
Visibility="{Binding MockBadgeVisibility}">
<TextBlock Text="UX MOCK" FontSize="9.8" FontWeight="Bold" Foreground="#315DBF"/>
</Border>
</StackPanel>
<TextBlock Text="Keep exactly one report control block for deterministic import into legacy SAS"
Margin="0,4,0,0" FontSize="12.6" Foreground="{StaticResource RcbMuted}"/>
</StackPanel>
<StackPanel Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Center">
<TextBlock Text="LEGACY SAS MODE" FontSize="10.4" FontWeight="Bold" Foreground="#8A5B0A" HorizontalAlignment="Right"/>
<TextBlock Text="Exactly 1 RCB will be retained" Margin="0,4,0,0" FontSize="12.2"
FontWeight="SemiBold" Foreground="#7A4D00" HorizontalAlignment="Right"/>
</StackPanel>
</Grid>
</Border>
<Border Grid.Row="2" Background="#F9FBFE" BorderBrush="#D7E2F0" BorderThickness="1"
CornerRadius="16" Padding="14,12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.1*"/>
<ColumnDefinition Width="1.1*"/>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel>
<TextBlock Text="IED" FontSize="10.3" FontWeight="SemiBold" Foreground="#7A889C"/>
<TextBlock Text="{Binding IedName}" Margin="0,3,0,0" FontSize="13.2" FontWeight="SemiBold" Foreground="{StaticResource RcbInk}"/>
</StackPanel>
<StackPanel Grid.Column="1">
<TextBlock Text="ENDPOINT" FontSize="10.3" FontWeight="SemiBold" Foreground="#7A889C"/>
<TextBlock Text="{Binding Endpoint}" Margin="0,3,0,0" FontSize="13.2" Foreground="{StaticResource RcbInk}"/>
</StackPanel>
<StackPanel Grid.Column="2">
<TextBlock Text="AVAILABILITY" FontSize="10.3" FontWeight="SemiBold" Foreground="#7A889C"/>
<StackPanel Orientation="Horizontal" Margin="0,3,0,0">
<Ellipse Width="7" Height="7" Fill="#16A34A" VerticalAlignment="Center" Margin="0,0,6,0"/>
<TextBlock Text="{Binding AvailabilityCheckedText}" FontSize="12.6" Foreground="{StaticResource RcbInk}"/>
</StackPanel>
</StackPanel>
<Button Grid.Column="3" x:Name="CheckAvailabilityButton" Style="{StaticResource SoftButton}"
Padding="13,8" Click="CheckAvailability_Click">
<StackPanel Orientation="Horizontal">
<Path Data="M18,8 A7,7 0 1 0 19,13 M18,3 V8 H13" Width="16" Height="16"
Stretch="Uniform" Stroke="#315DBF" StrokeThickness="1.8" Fill="Transparent"
StrokeStartLineCap="Round" StrokeEndLineCap="Round" Margin="0,0,7,0"/>
<TextBlock x:Name="CheckAvailabilityText" Text="Check Availability"/>
</StackPanel>
</Button>
</Grid>
</Border>
<Border Grid.Row="4" Background="#FFFFFF" BorderBrush="#D4E0EF" BorderThickness="1" CornerRadius="18" ClipToBounds="True">
<DataGrid x:Name="RcbGrid" ItemsSource="{Binding Rows}" SelectedItem="{Binding SelectedRow, Mode=TwoWay}"
AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False"
CanUserSortColumns="False" HeadersVisibility="Column" GridLinesVisibility="None"
RowHeaderWidth="0" AlternationCount="2" SelectionMode="Single" SelectionUnit="FullRow"
Background="Transparent" BorderThickness="0" ColumnHeaderStyle="{StaticResource RcbTableHeader}"
CellStyle="{StaticResource RcbDataGridCell}" RowStyle="{StaticResource RcbDataGridRow}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<DataGrid.Columns>
<DataGridTemplateColumn Header="SELECT" Width="74">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox Style="{StaticResource RcbCheckBox}" IsChecked="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding IsSelectable}" Checked="RcbCheckBox_Checked" Unchecked="RcbCheckBox_Unchecked"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="REPORT CONTROL BLOCK" Width="2.1*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Name}" FontWeight="SemiBold" Foreground="{StaticResource RcbInk}"/>
<TextBlock Text="{Binding Reference}" Margin="0,3,0,0" FontSize="10.5" Foreground="#7A889C"
TextTrimming="CharacterEllipsis" ToolTip="{Binding Reference}"/>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="TYPE" Width="1.05*" Binding="{Binding Type}"/>
<DataGridTemplateColumn Header="DATASET" Width="2.1*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding DataSetName}" FontWeight="SemiBold" Foreground="{StaticResource RcbInk}"/>
<TextBlock Text="{Binding DataSetDetail}" Margin="0,3,0,0" FontSize="10.5" Foreground="#7A889C"/>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="MEMBERS" Width="100" Binding="{Binding MemberCountText}"/>
<DataGridTemplateColumn Header="STATUS" Width="1.25*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" ToolTip="{Binding Reason}">
<TextBlock Text="{Binding StatusGlyph}" FontFamily="Segoe UI Emoji" FontSize="15" VerticalAlignment="Center"/>
<TextBlock Text="{Binding StatusText}" Margin="7,0,0,0" FontWeight="SemiBold"
Foreground="{Binding StatusBrush}" VerticalAlignment="Center"/>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Border>
<Grid Grid.Row="6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="18"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Style="{StaticResource SoftButton}" Padding="12,8" Click="ClearAll_Click"><TextBlock Text="Clear All"/></Button>
<Button Grid.Column="2" Style="{StaticResource SoftButton}" Padding="12,8" Click="SelectAvailable_Click"><TextBlock Text="Select First Available"/></Button>
<Border Grid.Column="4" Background="#EEF4FF" BorderBrush="#D3E1F8" BorderThickness="1" CornerRadius="14" Padding="14,10">
<Grid>
<Grid.ColumnDefinitions><ColumnDefinition Width="*"/><ColumnDefinition Width="Auto"/></Grid.ColumnDefinitions>
<StackPanel>
<TextBlock Text="EXPORT PREVIEW" FontSize="10.2" FontWeight="Bold" Foreground="#617696"/>
<TextBlock Text="{Binding SelectionSummary}" Margin="0,4,0,0" FontSize="12.6" FontWeight="SemiBold" Foreground="{StaticResource RcbInk}"/>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Right">
<TextBlock Text="{Binding RemovalSummary}" FontSize="11.8" FontWeight="SemiBold" Foreground="#315DBF" HorizontalAlignment="Right"/>
<TextBlock Text="Original file remains unchanged" Margin="0,4,0,0" FontSize="10.5" Foreground="#6A7B91" HorizontalAlignment="Right"/>
</StackPanel>
</Grid>
</Border>
</Grid>
<Grid Grid.Row="8">
<Grid.ColumnDefinitions><ColumnDefinition Width="*"/><ColumnDefinition Width="Auto"/></Grid.ColumnDefinitions>
<StackPanel VerticalAlignment="Center">
<TextBlock Text="{Binding SafetyText}" FontSize="11.2" Foreground="#6A7B91"/>
<TextBlock x:Name="MockStatusText" Text="Select one available RCB, then continue to SCL edition selection."
Margin="0,3,0,0" FontSize="11.2" Foreground="#315DBF"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Style="{StaticResource SoftButton}" IsCancel="True" MinWidth="104" Margin="0,0,10,0"><TextBlock Text="Cancel"/></Button>
<Button x:Name="ExportButton" Style="{StaticResource PrimaryButton}" MinWidth="156" Click="Export_Click" IsDefault="True">
<StackPanel Orientation="Horizontal">
<Path Data="M5,3 H15 L19,7 V21 H5 Z M15,3 V8 H19 M9,13 H15 M9,17 H15" Width="16" Height="16"
Stretch="Uniform" Stroke="White" StrokeThickness="1.6" Fill="Transparent"
StrokeStartLineCap="Round" StrokeEndLineCap="Round" Margin="0,0,7,0"/>
<TextBlock Text="Export Selected RCB"/>
</StackPanel>
</Button>
</StackPanel>
</Grid>
</Grid>
</Window>