88 xmlns : resources =" clr-namespace:NETworkManager.Properties"
99 xmlns : networkManager =" clr-namespace:NETworkManager"
1010 xmlns : converters =" clr-namespace:NETworkManager.Converters;assembly=NETworkManager.Converters"
11+ xmlns : iconPacks =" http://metro.mahapps.com/winfx/xaml/iconpacks"
1112 mc : Ignorable =" d" d : DataContext =" {d:DesignInstance networkManager:StatusWindow}"
12- Title = " {x:Static resources:Resources.NETworkManager_ProjectName} "
13+ TitleAlignment = " Left "
1314 Style =" {DynamicResource DefaultWindow}"
14- Deactivated =" MetroWindow_Deactivated"
15- Height =" 280" Width =" 950"
15+ Deactivated =" MetroWindow_Deactivated"
1616 Topmost =" True"
1717 ShowInTaskbar =" False"
18+ Width =" 950"
19+ Height =" 241"
1820 ResizeMode =" NoResize"
1921 IsWindowDraggable =" False"
2022 ShowMinButton =" False"
2123 ShowMaxRestoreButton =" False"
22- ShowCloseButton =" False "
23- ShowTitleBar =" False "
24+ ShowCloseButton =" True "
25+ ShowTitleBar =" True "
2426 Closing =" MetroWindow_Closing" >
2527 <mah : MetroWindow .Resources>
2628 <converters : BooleanToVisibilityCollapsedConverter x : Key =" BooleanToVisibilityCollapsedConverter" />
29+ <converters : TimeToStrokeDashOffsetConverter x : Key =" TimeToStrokeDashOffsetConverter" />
2730 </mah : MetroWindow .Resources>
28- <Grid Margin =" 10" >
29- <Grid >
30- <Grid .RowDefinitions>
31- <RowDefinition Height =" *" />
32- <RowDefinition Height =" 10" />
33- <RowDefinition Height =" Auto" />
34- </Grid .RowDefinitions>
35- <ContentControl x : Name =" ContentControlNetworkConnection" Grid.Row=" 0" />
36- <Grid Grid.Row=" 2" >
37- <Grid .ColumnDefinitions>
38- <ColumnDefinition Width =" *" />
39- <ColumnDefinition Width =" 10" />
40- <ColumnDefinition Width =" Auto" />
41- </Grid .ColumnDefinitions>
42- <mah : MetroProgressBar Grid.Column=" 0" Minimum =" 0" Maximum =" {Binding TimeMax}" Value =" {Binding Time}"
43- Visibility =" {Binding ShowTime, Converter={StaticResource BooleanToVisibilityCollapsedConverter}}"
44- VerticalAlignment =" Bottom" HorizontalAlignment =" Left" Width =" 150" />
45- <StackPanel Grid.Column=" 2" Orientation =" Horizontal" HorizontalAlignment =" Right" >
46- <Button Content =" {x:Static localization:Strings.Reload}" Command =" {Binding ReloadCommand}"
47- Style =" {StaticResource DefaultButton}" Margin =" 0,0,10,0" />
48- <Button Content =" {x:Static localization:Strings.Show}" Command =" {Binding ShowMainWindowCommand}"
49- Style =" {StaticResource DefaultButton}" Margin =" 0,0,10,0" />
50- <Button Content =" {x:Static localization:Strings.Close}" Command =" {Binding CloseCommand}"
51- Style =" {StaticResource DefaultButton}" />
52- </StackPanel >
31+ <mah : MetroWindow .LeftWindowCommands>
32+ <mah : WindowCommands ShowSeparators =" False" >
33+ <!-- Countdown progress ring -->
34+ <Grid Width =" 20" Height =" 20"
35+ Visibility =" {Binding ShowTime, Converter={StaticResource BooleanToVisibilityCollapsedConverter}}"
36+ VerticalAlignment =" Center"
37+ Margin =" 10,0,0,0" >
38+ <!-- Track (background ring) -->
39+ <Ellipse StrokeThickness =" 2.5"
40+ Stroke =" {DynamicResource MahApps.Brushes.Accent}"
41+ Opacity =" 0.2" />
42+ <!-- Foreground arc that shrinks as time counts down -->
43+ <Ellipse StrokeThickness =" 2.5"
44+ Stroke =" {DynamicResource MahApps.Brushes.Accent}"
45+ StrokeDashCap =" Round"
46+ StrokeDashArray =" 22 100"
47+ RenderTransformOrigin =" 0.5,0.5" >
48+ <Ellipse .RenderTransform>
49+ <RotateTransform Angle =" -90" />
50+ </Ellipse .RenderTransform>
51+ <Ellipse .StrokeDashOffset>
52+ <MultiBinding Converter =" {StaticResource TimeToStrokeDashOffsetConverter}"
53+ ConverterParameter =" 22.0" >
54+ <Binding Path =" Time" />
55+ <Binding Path =" TimeMax" />
56+ </MultiBinding >
57+ </Ellipse .StrokeDashOffset>
58+ </Ellipse >
5359 </Grid >
54- </Grid >
55- </Grid >
60+ </mah : WindowCommands >
61+ </mah : MetroWindow .LeftWindowCommands>
62+ <mah : MetroWindow .RightWindowCommands>
63+ <mah : WindowCommands ShowSeparators =" False" >
64+ <Button Command =" {Binding Path=ReloadCommand}"
65+ ToolTip =" {x:Static Member=localization:Strings.ToolTip_RunCommandWithHotKey}"
66+ Cursor =" Hand"
67+ Focusable =" False"
68+ Margin =" 0,0,5,0" >
69+ <StackPanel Orientation =" Horizontal" >
70+ <Rectangle Width =" 16" Height =" 16"
71+ Fill =" {Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}" >
72+ <Rectangle .OpacityMask>
73+ <VisualBrush Stretch =" Uniform" Visual =" {iconPacks:Material Kind=Refresh}" />
74+ </Rectangle .OpacityMask>
75+ </Rectangle >
76+ </StackPanel >
77+ </Button >
78+ <Button Command =" {Binding Path=ShowMainWindowCommand}"
79+ ToolTip =" {x:Static Member=localization:Strings.ToolTip_RunCommandWithHotKey}"
80+ Cursor =" Hand"
81+ Focusable =" False"
82+ Margin =" 0,0,5,0" >
83+ <StackPanel Orientation =" Horizontal" >
84+ <Rectangle Width =" 16" Height =" 16"
85+ Fill =" {Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}" >
86+ <Rectangle .OpacityMask>
87+ <VisualBrush Stretch =" Uniform" Visual =" {iconPacks:Material Kind=OpenInNew}" />
88+ </Rectangle .OpacityMask>
89+ </Rectangle >
90+ </StackPanel >
91+ </Button >
92+ </mah : WindowCommands >
93+ </mah : MetroWindow .RightWindowCommands>
94+ <ContentControl Margin =" 10,5,10,10" x : Name =" ContentControlNetworkConnection" />
5695</mah : MetroWindow >
0 commit comments