-
-
Notifications
You must be signed in to change notification settings - Fork 109
Expand file tree
/
Copy pathSettingsPage.xaml
More file actions
165 lines (143 loc) · 9.85 KB
/
SettingsPage.xaml
File metadata and controls
165 lines (143 loc) · 9.85 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
<pages:ReloadedIIPage x:Class="Reloaded.Mod.Launcher.Pages.BaseSubpages.SettingsPage"
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:converters="clr-namespace:Reloaded.Mod.Launcher.Converters"
xmlns:pages="clr-namespace:Reloaded.Mod.Launcher.Pages"
xmlns:system="clr-namespace:System;assembly=System.Runtime"
mc:Ignorable="d"
d:DesignHeight="600"
d:DesignWidth="900"
AllowDrop="True"
Title="{DynamicResource TitleLoaderSettings}">
<ScrollViewer Focusable="False">
<Grid Margin="{DynamicResource PageMargin}" DataContext="{Binding ViewModel, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}">
<Grid.Resources>
<Thickness x:Key="BannerMargin">75,0,75,0</Thickness>
<Style x:Key="SocialIcon" TargetType="{x:Type Image}" BasedOn="{StaticResource HighQualityImage}">
<Setter Property="Height" Value="48"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="Margin" Value="{DynamicResource ListEntryItemMarginSmall}"/>
<Setter Property="ToolTipService.InitialShowDelay" Value="0" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource ReloadedFocusVisual}"/>
</Style>
<system:Double x:Key="ComboBoxWidth">133</system:Double>
<GridLength x:Key="SettingsGridWidth">200</GridLength>
<system:Double x:Key="ButtonWidth">250</system:Double>
</Grid.Resources>
<StackPanel VerticalAlignment="Center" Margin="{DynamicResource PanelMargin}" >
<!-- Banner and Build Date -->
<Image x:Name="Banner"
Style="{DynamicResource HighQualityImage}"
MaxWidth="600"
Source="{DynamicResource ReloadedNoBrackets}"
StretchDirection="Both"
Margin="{DynamicResource BannerMargin}"/>
<TextBlock DockPanel.Dock="Bottom"
HorizontalAlignment="Center"
Style="{DynamicResource BuildTextBlock}"
Text="{Binding Path=Copyright, UpdateSourceTrigger=PropertyChanged, FallbackValue='Sewer56 ~ 2019 | 2019-06-14T10:59:22'}"/>
<!-- Docs / User Guide -->
<StackPanel Orientation="Horizontal" Margin="{DynamicResource CommonItemVerticalMargin}" HorizontalAlignment="Center">
<Image Source="{DynamicResource IconInfo}"
Style="{DynamicResource SocialIcon}"
ToolTip="{DynamicResource FirstLaunchLineUserguide}"
Focusable="True"
PreviewMouseDown="Documents_PreviewMouseDown" />
<Image Source="{DynamicResource IconDiscord}"
Style="{DynamicResource SocialIcon}"
ToolTip="{DynamicResource LoaderSettingsDiscord}"
Focusable="True"
PreviewMouseDown="Discord_PreviewMouseDown" />
<Image Source="{DynamicResource IconTwitter}"
Style="{DynamicResource SocialIcon}"
ToolTip="{DynamicResource LoaderSettingsTwitter}"
Focusable="True"
PreviewMouseDown="Twitter_PreviewMouseDown" />
<Image Source="{DynamicResource IconSponsor}"
Style="{DynamicResource SocialIcon}"
ToolTip="{DynamicResource LoaderSettingsDonate}"
Focusable="True"
PreviewMouseDown="Donate_PreviewMouseDown" />
</StackPanel>
<!-- Actions: Tutorial, Controller, Logs, Configs -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button Style="{DynamicResource DefaultButton}"
Click="Tutorial_Click"
Content="{DynamicResource TitleFirstLaunchEx}"
Margin="{DynamicResource CommonItemHorizontalMargin}" />
<Button Style="{DynamicResource DefaultButton}"
Click="ControllerConfig_Click"
Content="{DynamicResource LoaderSettingsControllerBtn}"
Margin="{DynamicResource CommonItemHorizontalMargin}" />
<!-- Open Log Files -->
<Button Style="{DynamicResource DefaultButton}"
Margin="{DynamicResource CommonItemCombinedMargin}"
Content="{DynamicResource LoaderSettingsConfigLog}"
PreviewMouseDown="LogFiles_PreviewMouseDown"/>
<!-- Open Config File -->
<Button Style="{DynamicResource DefaultButton}"
Margin="{DynamicResource CommonItemCombinedMargin}"
Content="{DynamicResource LoaderSettingsConfigFile}"
PreviewMouseDown="ConfigFile_PreviewMouseDown"/>
</StackPanel>
<!-- Bottom Row: Statistics and Warning -->
<TextBlock Text="{DynamicResource LoaderSettingsWarning}"
HorizontalAlignment="Center"
TextWrapping="Wrap"
FontSize="{DynamicResource FontSizeLarge}"
Style="{DynamicResource TextblockWithColourChange}"
Margin="{DynamicResource CommonItemVerticalMargin}"/>
<!-- Settings -->
<DockPanel HorizontalAlignment="Stretch" LastChildFill="False">
<!-- Show Console -->
<CheckBox DockPanel.Dock="Left" HorizontalAlignment="Center"
Margin="{DynamicResource CommonItemCombinedMargin}"
IsChecked="{Binding LoaderConfig.ShowConsole}"
Content="{DynamicResource LoaderSettingsShowConsole}"
Style="{DynamicResource DefaultCheckBox}" />
<!-- Theme -->
<ComboBox DockPanel.Dock="Right" VerticalAlignment="Center" HorizontalAlignment="Center"
Margin="{DynamicResource CommonItemCombinedMargin}"
IsSynchronizedWithCurrentItem="True"
SelectedItem="{Binding ThemeSelector.File, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
ItemsSource="{Binding ThemeSelector.Files, UpdateSourceTrigger=PropertyChanged}"
MaxWidth="{StaticResource ComboBoxWidth}" Width="{StaticResource ComboBoxWidth}"
AutomationProperties.Name="{DynamicResource LoaderSettingsConfigTheme}"
SelectionChanged="ThemeChanged"
PreviewMouseDown="ThemeDropdown_PreviewMouseDown">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={x:Static converters:FilePathToFileConverter.Instance}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock DockPanel.Dock="Right" VerticalAlignment="Center" HorizontalAlignment="Center"
Margin="{DynamicResource CommonItemCombinedMargin}"
Text="{DynamicResource LoaderSettingsConfigTheme}"
Style="{DynamicResource TextblockWithColourChange}"/>
<!-- Language -->
<ComboBox DockPanel.Dock="Right" VerticalAlignment="Center" HorizontalAlignment="Center"
Margin="{DynamicResource CommonItemCombinedMargin}"
IsSynchronizedWithCurrentItem="True"
SelectedItem="{Binding LanguageSelector.File, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
ItemsSource="{Binding LanguageSelector.Files, UpdateSourceTrigger=PropertyChanged}"
MaxWidth="{StaticResource ComboBoxWidth}" Width="{StaticResource ComboBoxWidth}"
AutomationProperties.Name="{DynamicResource LoaderSettingsConfigLanguage}"
SelectionChanged="LanguageChanged">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={x:Static converters:FilePathToFileConverter.Instance}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock DockPanel.Dock="Right" VerticalAlignment="Center" HorizontalAlignment="Center"
Margin="{DynamicResource CommonItemCombinedMargin}"
Text="{DynamicResource LoaderSettingsConfigLanguage}"
Style="{DynamicResource TextblockWithColourChange}"/>
</DockPanel>
</StackPanel>
</Grid>
</ScrollViewer>
</pages:ReloadedIIPage>