-
-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathMain.xaml
174 lines (168 loc) · 11.3 KB
/
Main.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
<controls:MetroWindow
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:l="clr-namespace:Gu.Wpf.Localization;assembly=Gu.Wpf.Localization"
xmlns:SLM="clr-namespace:Steam_Library_Manager"
xmlns:Enums="clr-namespace:Steam_Library_Manager.Definitions.Enums"
xmlns:Forms="clr-namespace:Steam_Library_Manager.Forms"
xmlns:p="clr-namespace:Steam_Library_Manager.Properties"
mc:Ignorable="d"
x:Name="MainForm" x:Class="Steam_Library_Manager.Main"
Title="Steam Library Manager" Icon="/Steam Library Manager;component/Resources/slm-icon.ico" Height="800" Width="985" MinHeight="800" MinWidth="985"
Loaded="MainForm_Loaded" Closing="MainForm_ClosingAsync"
ShowTitleBar="False" GlowBrush="Black" NonActiveGlowBrush="Black" BorderBrush="{DynamicResource AccentColorBrush}" BorderThickness="1"
RightWindowCommandsOverlayBehavior="Always" SaveWindowPosition="True" WindowTransitionsEnabled="False">
<controls:MetroWindow.RightWindowCommands>
<controls:WindowCommands>
<Button Content="{l:Static p:Resources.Forms_Main_Donate}" Click="RightWindowCommands_DonateButton_Click">
<Button.ToolTip>
<ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold" Text="Donate" />
<TextBlock Text="Opens a webpage with available donation methods. Thank you for your support!" />
</StackPanel>
</ToolTip>
</Button.ToolTip>
</Button>
<Button Content="{l:Static p:Resources.Forms_Main_Translate}" Click="RightWindowCommands_TranslateFormButton_Click">
<Button.ToolTip>
<ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold" Text="Translate SLM" />
<TextBlock Text="Opens Crowdin project page of SLM which you can contribute to translation of SLM." />
</StackPanel>
</ToolTip>
</Button.ToolTip>
</Button>
<Button Content="{l:Static p:Resources.Forms_Main_Discord}" Click="RightWindowCommands_DiscordButton_Click">
<Button.ToolTip>
<ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold" Text="Discord Group" />
<TextBlock Text="Opens the invitation link for SLM's Discord Group on your favorite web browser." />
</StackPanel>
</ToolTip>
</Button.ToolTip>
</Button>
</controls:WindowCommands>
</controls:MetroWindow.RightWindowCommands>
<Grid>
<controls:FlyoutsControl Panel.ZIndex="3" VerticalAlignment="Stretch" HorizontalAlignment="Left" Margin="0,-30,0,0">
<controls:Flyout x:Name="createLibraryFlyout" Position="Left" Width="300" IsOpen="False" Theme="Adapt" Header="Create Library" IsOpenChanged="CreateLibraryFlyout_IsOpenChanged">
<StackPanel Orientation="Vertical" Margin="15">
<TextBlock Text="Selected Path:" HorizontalAlignment="Stretch" Margin="0,5" />
<TextBlock x:Name="createLibrary_Path" HorizontalAlignment="Stretch" Margin="0,5" />
<Button Click="CreateLibrary_PathSelectionButtonClick" Content="Select" Height="35" Margin="0,5" Style="{StaticResource AccentedSquareButtonStyle}" />
<ComboBox Name="createLibrary_Type" controls:TextBoxHelper.Watermark="Library Type" controls:TextBoxHelper.UseFloatingWatermark="True" HorizontalAlignment="Stretch" Height="40" Margin="0, 10"
ItemsSource="{SLM:EnumBindingSource {x:Type Enums:LibraryType}}" BorderBrush="{DynamicResource AccentColorBrush}" SelectionChanged="CreateLibrary_Type_SelectionChanged">
<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}">
<Setter Property="Height" Value="30" />
</Style>
</ComboBox.ItemContainerStyle>
<ComboBox.ToolTip>
<ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold" Text="Library Type" />
<TextBlock Text="Select a library type you would like to create of." />
</StackPanel>
</ToolTip>
</ComboBox.ToolTip>
</ComboBox>
<TextBlock Text="Selected Library Type:" HorizontalAlignment="Stretch" Margin="0,5" />
<TextBlock x:Name="createLibrary_TypeText" HorizontalAlignment="Stretch" Margin="0,5" />
<Button Click="CreateLibraryButton_Click" Content="Create Library" Height="40" Margin="0,10" Style="{StaticResource AccentedSquareButtonStyle}" />
<TextBlock x:Name="createLibrary_ResultText" HorizontalAlignment="Stretch" Margin="0,10" />
</StackPanel>
</controls:Flyout>
</controls:FlyoutsControl>
<Grid Margin="15, 0, 0, 0" HorizontalAlignment="Left" VerticalAlignment="Top">
<TextBlock Margin="0, -20, 0, 0" FontSize="40" FontWeight="Light" Foreground="{DynamicResource AccentColorBrush}">
Steam Library Manager
</TextBlock>
</Grid>
<!-- Grid: Quick settings -->
<WrapPanel x:Name="QuickSettings" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,10,0" Panel.ZIndex="1">
<!-- App Sorting Method -->
<ComboBox controls:TextBoxHelper.Watermark="{l:Static p:Resources.Forms_Settings_SortGamesBy}" controls:TextBoxHelper.UseFloatingWatermark="True" HorizontalAlignment="Right"
VerticalContentAlignment="Center" VerticalAlignment="Top" Width="140" Height="40" SelectedItem="{Binding Setting_AppSortingMethod}" Margin="5, 0"
ItemsSource="{SLM:EnumBindingSource {x:Type Enums:AppSortingMethod}}" SelectionChanged="AppSortingMethod_SelectionChanged" BorderBrush="{DynamicResource AccentColorBrush}">
<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}">
<Setter Property="Height" Value="30" />
</Style>
</ComboBox.ItemContainerStyle>
<ComboBox.ToolTip>
<ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold" Text="Sorting Method for Game Panel" />
<TextBlock Text="Lets you select a sorting method for the game panel." />
</StackPanel>
</ToolTip>
</ComboBox.ToolTip>
</ComboBox>
<!-- App listing method -->
<ComboBox controls:TextBoxHelper.Watermark="{l:Static p:Resources.Forms_Settings_GameListMethod}" controls:TextBoxHelper.UseFloatingWatermark="True" HorizontalAlignment="Right"
VerticalContentAlignment="Center" VerticalAlignment="Top" Width="160" Height="40" SelectedItem="{Binding Setting_LibraryStyle}"
ItemsSource="{SLM:EnumBindingSource {x:Type Enums:LibraryStyle}}" BorderBrush="{DynamicResource AccentColorBrush}">
<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}">
<Setter Property="Height" Value="30" />
</Style>
</ComboBox.ItemContainerStyle>
<ComboBox.ToolTip>
<ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold" Text="View Method for Game Panel" />
<TextBlock Text="Lets you switch between Grid and List View for Game Panel" />
</StackPanel>
</ToolTip>
</ComboBox.ToolTip>
</ComboBox>
</WrapPanel>
<controls:MetroTabControl controls:TabControlHelper.Underlined="TabPanel" controls:TabControlHelper.UnderlineBrush="{DynamicResource AccentColorBrush}" Margin="10, 40, 10, 10" Panel.ZIndex="0">
<!-- Tab: Library -->
<controls:MetroTabItem Header="{l:Static p:Resources.Forms_Main_TabHeader_Library}" IsSelected="True">
<Grid>
<Forms:HamburgerMenuControl x:Name="HamburgerMenuControl" Panel.ZIndex="2" />
<Grid Name="HomeContent" Panel.ZIndex="0" Visibility="Collapsed">
<WebBrowser Source="https://revoland.github.io/Steam-Library-Manager/home/index" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="55,10,0,0" />
</Grid>
<Grid Name="LibraryTabContent" Visibility="Collapsed">
<Forms:LibraryView x:Name="LibraryView" />
<!-- ListView: App Panel -->
<Forms:AppView x:Name="AppView" />
<!-- TextBox: Search -->
<TextBox controls:TextBoxHelper.Watermark="{l:Static p:Resources.Forms_Main_SearchInLibrary}" controls:TextBoxHelper.UseFloatingWatermark="True"
controls:TextBoxHelper.ClearTextButton="True" Margin="205,0,0,10" VerticalContentAlignment="Center" TextWrapping="Wrap" Height="35" VerticalAlignment="Bottom"
Text="{SLM:SettingBinding SearchText}" TextChanged="TextBox_TextChanged" BorderBrush="{DynamicResource AccentColorBrush}">
<TextBox.ToolTip>
<ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold" Text="Search for..." />
<TextBlock Text="Lets you search for a game by it's name or appid." />
</StackPanel>
</ToolTip>
</TextBox.ToolTip>
</TextBox>
</Grid>
</Grid>
</controls:MetroTabItem>
<!-- Tab: Task Manager -->
<controls:MetroTabItem Header="{l:Static p:Resources.Forms_Main_TabHeader_TaskManager}">
<Forms:TaskManagerView x:Name="TaskManagerView" />
</controls:MetroTabItem>
<!-- Tab: Library Cleaner -->
<controls:MetroTabItem Header="{l:Static p:Resources.Forms_Main_TabHeader_LibraryCleaner}">
<Forms:LibraryCleanerView x:Name="LibraryCleanerView" />
</controls:MetroTabItem>
<!-- Tab: Settings -->
<controls:MetroTabItem Header="{l:Static p:Resources.Forms_Main_TabHeader_Settings}" Name="TabItem_Settings">
<Forms:SettingsView x:Name="SettingsView" />
</controls:MetroTabItem>
</controls:MetroTabControl>
</Grid>
</controls:MetroWindow>