-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathApp.xaml
204 lines (204 loc) · 11.2 KB
/
App.xaml
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
<Application
x:Class="StarsectorToolbox.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:I18n="clr-namespace:StarsectorToolbox.Langs"
xmlns:pu="https://opensource.panuon.com/wpf-ui"
x:ClassModifier="internal"
StartupUri="Views/Main/MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<pu:GlobalSettings x:Key="Settings">
<pu:GlobalSettings.Themes>
<pu:ApplicationTheme Key="Light" ResourceDictionary="pack://application:,,,/Themes/Light.xaml" />
<pu:ApplicationTheme Key="Dark" ResourceDictionary="pack://application:,,,/Themes/Dark.xaml" />
</pu:GlobalSettings.Themes>
</pu:GlobalSettings>
</ResourceDictionary>
<ResourceDictionary Source="pack://application:,,,/Converters.xaml" />
<ResourceDictionary Source="pack://application:,,,/Themes/SystemColor.xaml" />
<ResourceDictionary Source="pack://application:,,,/Styles/FontStyles.xaml" />
<ResourceDictionary Source="pack://application:,,,/Themes/Dark.xaml" />
<ResourceDictionary Source="pack://application:,,,/Panuon.WPF.UI;component/Control.xaml" />
<ResourceDictionary Source="pack://application:,,,/Styles/ControlStyles.xaml" />
<ResourceDictionary Source="pack://application:,,,/Styles/ControlViewStyles.xaml" />
<ResourceDictionary>
<pu:MessageBoxXSettings
x:Key="MessageBoxXSettings"
CancelButtonContent="{x:Static I18n:MessageBoxXI18nRes.CANCEL}"
NoButtonContent="{x:Static I18n:MessageBoxXI18nRes.NO}"
OKButtonContent="{x:Static I18n:MessageBoxXI18nRes.OK}"
YesButtonContent="{x:Static I18n:MessageBoxXI18nRes.YES}">
<pu:MessageBoxXSettings.WindowXStyle>
<Style BasedOn="{StaticResource {x:Static pu:MessageBoxX.WindowXStyleKey}}" TargetType="pu:WindowX">
<Setter Property="Topmost" Value="True" />
<Setter Property="Width" Value="NaN" />
<Setter Property="Height" Value="NaN" />
<Setter Property="MinWidth" Value="300" />
<Setter Property="MinHeight" Value="200" />
<Setter Property="MaxWidth" Value="1280" />
<Setter Property="MaxHeight" Value="720" />
<Setter Property="SizeToContent" Value="WidthAndHeight" />
<Setter Property="Background" Value="{DynamicResource BackgroundColor}" />
<Setter Property="Foreground" Value="{DynamicResource FontColor}" />
<Setter Property="pu:WindowX.BorderThickness" Value="0" />
<Setter Property="pu:WindowX.DisableDragMove" Value="False" />
<Setter Property="pu:WindowXModalDialog.ButtonPanelHorizontalAlignment" Value="Center" />
<Setter Property="pu:WindowXCaption.Height" Value="30" />
<Setter Property="pu:WindowXCaption.Buttons" Value="None" />
<Setter Property="pu:WindowXCaption.ShadowColor" Value="{DynamicResource ShadowColor}" />
<Setter Property="pu:WindowXCaption.Background" Value="{DynamicResource WindowGlassBrush}" />
</Style>
</pu:MessageBoxXSettings.WindowXStyle>
<pu:MessageBoxXSettings.ButtonStyle>
<Style BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
<Setter Property="Width" Value="60" />
<Setter Property="Margin" Value="20,0,20,0" />
</Style>
</pu:MessageBoxXSettings.ButtonStyle>
<pu:MessageBoxXSettings.ContentTemplate>
<DataTemplate>
<StackPanel Margin="10,10,10,0" VerticalAlignment="Center">
<Grid>
<pu:StateControl
HorizontalAlignment="Left"
VerticalAlignment="Center"
CurrentState="{Binding MessageBoxIcon}"
FontFamily="/Panuon.WPF.UI;component/Resources/Fonts/#PanuonIcon"
FontSize="64"
FontWeight="Bold"
IsHitTestVisible="False">
<pu:StateItem State="Info">
<TextBlock Foreground="#80BEE8" Text="" />
</pu:StateItem>
<pu:StateItem State="Question">
<TextBlock Foreground="#80BEE8" Text="" />
</pu:StateItem>
<pu:StateItem State="Warning">
<TextBlock Foreground="#F9D01A" Text="" />
</pu:StateItem>
<pu:StateItem State="Error">
<TextBlock Foreground="#FF5656" Text="" />
</pu:StateItem>
<pu:StateItem State="Success">
<TextBlock Foreground="#75CD43" Text="" />
</pu:StateItem>
</pu:StateControl>
<ScrollViewer>
<TextBox
Margin="100,0,0,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{x:Null}"
BorderBrush="{x:Null}"
Foreground="{DynamicResource FontColor}"
IsReadOnly="True"
Text="{Binding Message}"
TextWrapping="Wrap" />
</ScrollViewer>
</Grid>
<!--<CheckBox
Margin="0,10,0,0"
Content="{Binding CheckBoxMessage}"
IsChecked="{Binding CheckBoxIsIsChecked}">
<CheckBox.Style>
<Style BasedOn="{StaticResource CheckBoxBaseStyle}" TargetType="CheckBox">
<Setter Property="Visibility" Value="Collapsed" />
<Style.Triggers>
<DataTrigger Binding="{Binding ShowCheckBox}" Value="True">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
</Style.Triggers>
</Style>
</CheckBox.Style>
</CheckBox>-->
</StackPanel>
</DataTemplate>
</pu:MessageBoxXSettings.ContentTemplate>
</pu:MessageBoxXSettings>
<pu:PendingBoxSettings x:Key="pendingSettings">
<pu:PendingBoxSettings.WindowStyle>
<Style BasedOn="{StaticResource {x:Static pu:PendingBox.WindowStyleKey}}" TargetType="Window">
<Setter Property="Width" Value="NaN" />
<Setter Property="Height" Value="NaN" />
<Setter Property="MinWidth" Value="300" />
<Setter Property="MinHeight" Value="200" />
<Setter Property="MaxWidth" Value="1280" />
<Setter Property="MaxHeight" Value="720" />
<Setter Property="SizeToContent" Value="WidthAndHeight" />
<Setter Property="Background" Value="{DynamicResource BackgroundColor}" />
<Setter Property="Foreground" Value="{DynamicResource FontColor}" />
<Setter Property="BorderThickness" Value="0" />
</Style>
</pu:PendingBoxSettings.WindowStyle>
<pu:PendingBoxSettings.SpinStyle>
<Style BasedOn="{StaticResource {x:Static pu:PendingBox.SpinStyleKey}}" TargetType="pu:Spin">
<Setter Property="SpinStyle" Value="Ring2" />
<Setter Property="Width" Value="50" />
<Setter Property="Height" Value="50" />
<Setter Property="Margin" Value="0,0,0,10" />
<Setter Property="GlyphSize" Value="6" />
<Setter Property="GlyphBrush" Value="{DynamicResource WindowGlassBrush}" />
</Style>
</pu:PendingBoxSettings.SpinStyle>
<pu:PendingBoxSettings.ContentTemplate>
<DataTemplate>
<Grid VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<pu:Spin x:Name="PART_Spin" />
<TextBlock
x:Name="PART_CaptionTextBlock"
Grid.Row="1"
Margin="0,5,0,0"
TextAlignment="Center" />
<TextBlock
x:Name="PART_MessageTextBlock"
Grid.Row="2"
Margin="10,5,10,0"
TextAlignment="Center"
TextWrapping="Wrap" />
<Button
x:Name="PART_CancelButton"
Grid.Row="3"
Margin="0,10,0,0"
HorizontalAlignment="Center"
Style="{x:Null}"
Visibility="Collapsed" />
</Grid>
</DataTemplate>
</pu:PendingBoxSettings.ContentTemplate>
<pu:PendingBoxSettings.CancelButtonStyle>
<Style TargetType="Button">
<Setter Property="MinHeight" Value="32" />
<Setter Property="MinWidth" Value="32" />
<Setter Property="Padding" Value="5" />
<Setter Property="Margin" Value="5" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FontSize" Value="{DynamicResource BodyFontSize}" />
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}" />
<Setter Property="Foreground" Value="{DynamicResource FontColor}" />
<Setter Property="Background" Value="{DynamicResource ButtonColor}" />
<Setter Property="pu:ButtonHelper.HoverBackground" Value="{DynamicResource HoverColor}" />
<Setter Property="pu:ButtonHelper.ClickBackground" Value="{DynamicResource ClickColor}" />
<Setter Property="pu:ButtonHelper.CornerRadius" Value="4,4,4,4" />
<Setter Property="pu:ButtonHelper.HoverShadowColor" Value="{DynamicResource ShadowColor}" />
<Setter Property="pu:ButtonHelper.ClickEffect" Value="Sink" />
<Setter Property="pu:ToolTipHelper.Background" Value="{DynamicResource BackgroundColor}" />
<Setter Property="pu:ToolTipHelper.Foreground" Value="{DynamicResource FontColor}" />
<Setter Property="pu:ToolTipHelper.ShadowColor" Value="{DynamicResource ShadowColor}" />
<Setter Property="pu:ToolTipHelper.FontSize" Value="{DynamicResource ToolTipFontSize}" />
</Style>
</pu:PendingBoxSettings.CancelButtonStyle>
</pu:PendingBoxSettings>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>