-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSaveSclWindow.xaml
More file actions
168 lines (161 loc) · 10.1 KB
/
Copy pathSaveSclWindow.xaml
File metadata and controls
168 lines (161 loc) · 10.1 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
<Window x:Class="ArIED61850Tester.SaveSclWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Save SCL" Height="420" Width="590" MinHeight="420" MinWidth="590"
WindowStartupLocation="CenterOwner" ResizeMode="NoResize"
Background="{StaticResource Bg}"
FontFamily="Aptos, Segoe UI Variable Text, Segoe UI, Calibri"
Icon="Assets/app-icon.ico" Loaded="Window_Loaded">
<Window.Resources>
<LinearGradientBrush x:Key="EditionToggleSelected" StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#3B82F6" Offset="0"/>
<GradientStop Color="#4F46E5" Offset="1"/>
</LinearGradientBrush>
<Style x:Key="EditionToggleButton" TargetType="ToggleButton">
<Setter Property="Height" Value="44"/>
<Setter Property="Background" Value="#F8FAFD"/>
<Setter Property="BorderBrush" Value="#D7E1EF"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="#475467"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="FontSize" Value="13.2"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Focusable" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border x:Name="Chrome" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="14">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Chrome" Property="BorderBrush" Value="#9FB7D8"/>
<Setter TargetName="Chrome" Property="Background" Value="#F1F6FE"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Chrome" Property="Background" Value="{StaticResource EditionToggleSelected}"/>
<Setter TargetName="Chrome" Property="BorderBrush" Value="#779BEE"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
<Trigger Property="IsPressed" Value="True"><Setter TargetName="Chrome" Property="Opacity" Value="0.82"/></Trigger>
<Trigger Property="IsKeyboardFocused" Value="True"><Setter TargetName="Chrome" Property="BorderThickness" Value="2"/></Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border CornerRadius="24" BorderBrush="#D5E1F0" BorderThickness="1" Padding="24" Effect="{StaticResource CardShadow}">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#FFFFFF" Offset="0"/>
<GradientStop Color="#F3F7FF" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Width="48" Height="48" CornerRadius="16" Margin="0,0,14,0">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#DBEAFE" Offset="0"/>
<GradientStop Color="#E0E7FF" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Viewbox Width="23" Height="23" HorizontalAlignment="Center" VerticalAlignment="Center">
<Path Data="{StaticResource LucideFileOutput}" Style="{StaticResource LucideIcon}"/>
</Viewbox>
</Border>
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<TextBlock Text="Save SCL" FontSize="21" FontWeight="SemiBold" Foreground="{StaticResource Ink}"/>
<TextBlock Text="Export a clean interoperable IEC 61850 model" Margin="0,4,0,0"
FontSize="12.5" Foreground="{StaticResource Muted}"/>
</StackPanel>
</Grid>
<Grid Grid.Row="1" Margin="0,22,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="12"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
<Border Background="#F8FAFD" BorderBrush="#D9E3F1" BorderThickness="1" CornerRadius="14" Padding="14,11">
<StackPanel>
<TextBlock Text="IED" FontSize="10.5" FontWeight="SemiBold" Foreground="#77859B"/>
<TextBlock Text="{Binding IedName}" Margin="0,4,0,0" FontSize="13.2" FontWeight="SemiBold"
Foreground="{StaticResource Ink}" TextTrimming="CharacterEllipsis"/>
</StackPanel>
</Border>
<Border Grid.Column="2" Background="#F8FAFD" BorderBrush="#D9E3F1" BorderThickness="1" CornerRadius="14" Padding="14,11">
<StackPanel>
<TextBlock Text="SOURCE" FontSize="10.5" FontWeight="SemiBold" Foreground="#77859B"/>
<TextBlock Text="{Binding SourceDescription}" Margin="0,4,0,0" FontSize="13.2"
Foreground="{StaticResource Ink}" TextTrimming="CharacterEllipsis"/>
</StackPanel>
</Border>
</Grid>
<StackPanel Grid.Row="2" Margin="0,22,0,0">
<TextBlock Text="IEC 61850 edition" FontSize="12.2" FontWeight="SemiBold" Foreground="#475467" Margin="1,0,0,8"/>
<Border x:Name="EditionIndicator" Width="390" Height="52" HorizontalAlignment="Left"
Background="#EEF3FA" BorderBrush="#D7E1EF" BorderThickness="1" CornerRadius="18" Padding="4">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="6"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ToggleButton x:Name="Edition2Toggle" Grid.Column="0" Content="Edition 2"
Style="{StaticResource EditionToggleButton}" Click="Edition2_Click"/>
<ToggleButton x:Name="Edition1Toggle" Grid.Column="2" Content="Edition 1"
Style="{StaticResource EditionToggleButton}" Click="Edition1_Click"/>
</Grid>
</Border>
<TextBlock Text="{Binding EditionHint}" Margin="2,10,0,0" FontSize="11.7"
Foreground="{StaticResource Muted}" TextWrapping="Wrap"/>
</StackPanel>
<Border Grid.Row="3" Margin="0,18,0,0" Background="#EEF4FF" BorderBrush="#D5E3FA" BorderThickness="1"
CornerRadius="12" Padding="12,9">
<StackPanel Orientation="Horizontal">
<Viewbox Width="15" Height="15" Margin="0,0,8,0" VerticalAlignment="Center">
<Path Data="{StaticResource LucideSave}" Style="{StaticResource LucideIcon}" StrokeThickness="1.8"/>
</Viewbox>
<TextBlock Text="JSON evidence and a Markdown summary are saved beside the SCL file."
FontSize="11.5" Foreground="#4B5F7B" VerticalAlignment="Center"/>
</StackPanel>
</Border>
</Grid>
</Border>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,16,0,0">
<Button Style="{StaticResource SoftButton}" IsCancel="True" MinWidth="108" Margin="0,0,10,0">
<StackPanel Orientation="Horizontal">
<Viewbox Width="15" Height="15" Margin="0,0,7,0">
<Path Data="{StaticResource LucideX}" Style="{StaticResource LucideIcon}" Stroke="#52647E"/>
</Viewbox>
<TextBlock Text="Cancel"/>
</StackPanel>
</Button>
<Button Style="{StaticResource PrimaryButton}" IsDefault="True" MinWidth="126" Click="Save_Click">
<StackPanel Orientation="Horizontal">
<Viewbox Width="15" Height="15" Margin="0,0,7,0">
<Path Data="{StaticResource LucideSave}" Style="{StaticResource LucideIcon}" Stroke="White"/>
</Viewbox>
<TextBlock Text="Save SCL"/>
</StackPanel>
</Button>
</StackPanel>
</Grid>
</Window>