|
@@ -1,59 +1,31 @@
|
|
|
-<Window xmlns="https://github.com/avaloniaui"
|
|
|
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
- xmlns:vm="using:VeloeMinecraftLauncher.ViewModels"
|
|
|
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
- xmlns:titlebars="using:VeloeMinecraftLauncher.Views.TitleBar"
|
|
|
- xmlns:utils="using:VeloeMinecraftLauncher.Utils"
|
|
|
- xmlns:controls="using:VeloeMinecraftLauncher.Controls"
|
|
|
- mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="450"
|
|
|
- Width="600" Height="450"
|
|
|
- MaxWidth="600" MaxHeight="450"
|
|
|
- x:Class="VeloeMinecraftLauncher.Views.SettingsWindow"
|
|
|
- Icon="/Assets/avalonia-logo.ico"
|
|
|
- Title="Settings"
|
|
|
- TransparencyLevelHint="AcrylicBlur"
|
|
|
- Background="Transparent"
|
|
|
- CanResize="False"
|
|
|
- ExtendClientAreaToDecorationsHint="True"
|
|
|
- ExtendClientAreaChromeHints="NoChrome"
|
|
|
- ExtendClientAreaTitleBarHeightHint="-1">
|
|
|
-
|
|
|
- <Window.Styles>
|
|
|
+<UserControl xmlns="https://github.com/avaloniaui"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
+ xmlns:vm="using:VeloeMinecraftLauncher.ViewModels"
|
|
|
+ xmlns:utils="using:VeloeMinecraftLauncher.Utils"
|
|
|
+ xmlns:controls="using:VeloeMinecraftLauncher.Controls"
|
|
|
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="320"
|
|
|
+ x:Class="VeloeMinecraftLauncher.Views.SettingsView">
|
|
|
+ <UserControl.Styles>
|
|
|
<Style Selector="TabItem">
|
|
|
<Setter Property="FontSize" Value="16"/>
|
|
|
</Style>
|
|
|
- </Window.Styles>
|
|
|
+ </UserControl.Styles>
|
|
|
<Design.DataContext>
|
|
|
- <vm:SettingsWindowViewModel/>
|
|
|
+ <vm:SettingsViewModel/>
|
|
|
</Design.DataContext>
|
|
|
<Panel>
|
|
|
- <ExperimentalAcrylicBorder IsHitTestVisible="False">
|
|
|
- <ExperimentalAcrylicBorder.Material>
|
|
|
- <ExperimentalAcrylicMaterial
|
|
|
- BackgroundSource="Digger"
|
|
|
- TintColor="{Binding InterfaceColor}"
|
|
|
- TintOpacity="1"
|
|
|
- MaterialOpacity="{Binding MaterialOpacity}" />
|
|
|
- </ExperimentalAcrylicBorder.Material>
|
|
|
- </ExperimentalAcrylicBorder>
|
|
|
<DockPanel>
|
|
|
- <titlebars:TitleBarWindow
|
|
|
- IsSeamless="False"
|
|
|
- IsIconVisible="False"
|
|
|
- IsMaximizeVisible="False"
|
|
|
- TitleText="Settings"
|
|
|
- DockPanel.Dock="Top">
|
|
|
- </titlebars:TitleBarWindow>
|
|
|
<TabControl
|
|
|
- HorizontalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
DockPanel.Dock="Top">
|
|
|
<TabItem
|
|
|
Header="Game"
|
|
|
VerticalContentAlignment="Center">
|
|
|
- <Grid
|
|
|
- Margin="10 0 10 5"
|
|
|
- ShowGridLines="false"
|
|
|
+ <Grid
|
|
|
+ Margin="10 0 10 5"
|
|
|
+ ShowGridLines="false"
|
|
|
RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto, Auto">
|
|
|
<Grid.ColumnDefinitions>
|
|
|
<ColumnDefinition Width="250"></ColumnDefinition>
|
|
@@ -61,54 +33,54 @@
|
|
|
<ColumnDefinition Width="70"></ColumnDefinition>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
- <CheckBox
|
|
|
- Grid.Row="1" Grid.Column="0"
|
|
|
- IsChecked="true"
|
|
|
+ <CheckBox
|
|
|
+ Grid.Row="1" Grid.Column="0"
|
|
|
+ IsChecked="true"
|
|
|
IsEnabled="False">
|
|
|
Set path to minecraft folder
|
|
|
</CheckBox>
|
|
|
- <TextBox
|
|
|
- Grid.Row="1" Grid.Column="1"
|
|
|
- Margin="5"
|
|
|
- Text="{Binding MinecraftFolderPath}"
|
|
|
+ <TextBox
|
|
|
+ Grid.Row="1" Grid.Column="1"
|
|
|
+ Margin="5"
|
|
|
+ Text="{Binding MinecraftFolderPath}"
|
|
|
IsEnabled="{Binding SetMinecraftFolder}"/>
|
|
|
- <Button
|
|
|
- Grid.Row="1" Grid.Column="2"
|
|
|
- Content="Open"
|
|
|
+ <Button
|
|
|
+ Grid.Row="1" Grid.Column="2"
|
|
|
+ Content="Open"
|
|
|
Command="{Binding OpenMinecraftPathDialog}"
|
|
|
- CommandParameter="{Binding $parent[Window]}"
|
|
|
- HorizontalAlignment="Stretch"
|
|
|
+ CommandParameter="{Binding $parent[Window]}"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
HorizontalContentAlignment="Center"/>
|
|
|
|
|
|
- <CheckBox
|
|
|
- Grid.Row="2"
|
|
|
- Grid.Column="0"
|
|
|
+ <CheckBox
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="0"
|
|
|
IsChecked="{Binding UseCustomJava}">
|
|
|
Use custom java
|
|
|
</CheckBox>
|
|
|
- <TextBox
|
|
|
- Grid.Row="2" Grid.Column="1"
|
|
|
- Margin="5"
|
|
|
+ <TextBox
|
|
|
+ Grid.Row="2" Grid.Column="1"
|
|
|
+ Margin="5"
|
|
|
Text="{Binding JavaPath, Mode=TwoWay}"
|
|
|
IsEnabled="{Binding UseCustomJava}" />
|
|
|
- <Button
|
|
|
- Grid.Row="2" Grid.Column="2"
|
|
|
- Content="Open"
|
|
|
- Command="{Binding OpenJavaPathDialog}"
|
|
|
- CommandParameter="{Binding $parent[Window]}"
|
|
|
- IsEnabled="{Binding UseCustomJava}"
|
|
|
- HorizontalAlignment="Stretch"
|
|
|
+ <Button
|
|
|
+ Grid.Row="2" Grid.Column="2"
|
|
|
+ Content="Open"
|
|
|
+ Command="{Binding OpenJavaPathDialog}"
|
|
|
+ CommandParameter="{Binding $parent[Window]}"
|
|
|
+ IsEnabled="{Binding UseCustomJava}"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
HorizontalContentAlignment="Center"/>
|
|
|
|
|
|
- <CheckBox Grid.Row="3" Grid.Column="0"
|
|
|
- IsChecked="{Binding FullScreen}">Fullscreen mode</CheckBox>
|
|
|
-
|
|
|
- <CheckBox
|
|
|
- Grid.Row="4" Grid.Column="0"
|
|
|
+ <CheckBox Grid.Row="3" Grid.Column="0"
|
|
|
+ IsChecked="{Binding FullScreen}">Fullscreen mode</CheckBox>
|
|
|
+
|
|
|
+ <CheckBox
|
|
|
+ Grid.Row="4" Grid.Column="0"
|
|
|
IsChecked="{Binding CustomSize}">Set game resolution</CheckBox>
|
|
|
-
|
|
|
- <StackPanel
|
|
|
- Grid.Row="4" Grid.Column="1"
|
|
|
+
|
|
|
+ <StackPanel
|
|
|
+ Grid.Row="4" Grid.Column="1"
|
|
|
Orientation="Horizontal">
|
|
|
<NumericUpDown
|
|
|
Margin="5"
|
|
@@ -151,33 +123,33 @@
|
|
|
</MultiBinding>
|
|
|
</NumericUpDown.IsEnabled>
|
|
|
</NumericUpDown>
|
|
|
- </StackPanel>
|
|
|
+ </StackPanel>
|
|
|
|
|
|
- <CheckBox
|
|
|
+ <CheckBox
|
|
|
Grid.Row="5" Grid.Column="0" IsChecked="{Binding SetMaxRam}">Set max RAM</CheckBox>
|
|
|
- <StackPanel
|
|
|
- Grid.Row="5" Grid.Column="1"
|
|
|
+ <StackPanel
|
|
|
+ Grid.Row="5" Grid.Column="1"
|
|
|
Orientation="Horizontal">
|
|
|
- <NumericUpDown
|
|
|
- Grid.Row="5" Grid.Column="1"
|
|
|
- Margin="5"
|
|
|
- Name="MaxRamEdit"
|
|
|
- Value="{Binding MaxRam}"
|
|
|
+ <NumericUpDown
|
|
|
+ Grid.Row="5" Grid.Column="1"
|
|
|
+ Margin="5"
|
|
|
+ Name="MaxRamEdit"
|
|
|
+ Value="{Binding MaxRam}"
|
|
|
ParsingNumberStyle="Integer"
|
|
|
MaxWidth="200"
|
|
|
Minimum="256"
|
|
|
Maximum="{Binding $parent[Window].MaxRam}"
|
|
|
Theme="{StaticResource FixDataValidation}"
|
|
|
ClipValueToMinMax ="True"
|
|
|
- ShowButtonSpinner="False"
|
|
|
- IsEnabled="{Binding SetMaxRam}"
|
|
|
+ ShowButtonSpinner="False"
|
|
|
+ IsEnabled="{Binding SetMaxRam}"
|
|
|
HorizontalAlignment="Left"
|
|
|
VerticalAlignment="Top"/>
|
|
|
<TextBlock VerticalAlignment="Center">MB</TextBlock>
|
|
|
</StackPanel>
|
|
|
- <CheckBox
|
|
|
- Grid.Row="6" Grid.ColumnSpan="2"
|
|
|
- IsChecked="{Binding CheckAssets}"
|
|
|
+ <CheckBox
|
|
|
+ Grid.Row="6" Grid.ColumnSpan="2"
|
|
|
+ IsChecked="{Binding CheckAssets}"
|
|
|
IsEnabled="True">
|
|
|
Check vanilla game files before start
|
|
|
</CheckBox>
|
|
@@ -187,101 +159,99 @@
|
|
|
IsEnabled="True">
|
|
|
Hide launcher on game start
|
|
|
</CheckBox>
|
|
|
+ <Button
|
|
|
+ Grid.Row="7" Grid.Column="2"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ Content="Save"
|
|
|
+ Command="{Binding SaveSettings}"
|
|
|
+ IsEnabled="{Binding IsValid}"/>
|
|
|
</Grid>
|
|
|
</TabItem>
|
|
|
<TabItem
|
|
|
Header="Log"
|
|
|
VerticalContentAlignment="Center">
|
|
|
- <Grid
|
|
|
- Margin="10 0 10 5"
|
|
|
- ShowGridLines="false"
|
|
|
- RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto">
|
|
|
-
|
|
|
+ <Grid
|
|
|
+ Margin="10 0 10 5"
|
|
|
+ ShowGridLines="false"
|
|
|
+ RowDefinitions="Auto, Auto, Auto, Auto, Auto, *">
|
|
|
+
|
|
|
<Grid.ColumnDefinitions>
|
|
|
<ColumnDefinition Width="250"></ColumnDefinition>
|
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
|
<ColumnDefinition Width="70"></ColumnDefinition>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
-
|
|
|
- <TextBlock
|
|
|
+
|
|
|
+ <TextBlock
|
|
|
Grid.Row="1" Grid.Column="0"
|
|
|
VerticalAlignment="Center" Text="Console log event level"/>
|
|
|
- <ComboBox
|
|
|
- Grid.Row="1" Grid.Column="1"
|
|
|
- Margin="5"
|
|
|
- ItemsSource="{Binding LogEventLevels}"
|
|
|
- PlaceholderText="Select level"
|
|
|
- SelectedItem="{Binding ConsoleLogEventLevel}"
|
|
|
+ <ComboBox
|
|
|
+ Grid.Row="1" Grid.Column="1"
|
|
|
+ Margin="5"
|
|
|
+ ItemsSource="{Binding LogEventLevels}"
|
|
|
+ PlaceholderText="Select level"
|
|
|
+ SelectedItem="{Binding ConsoleLogEventLevel}"
|
|
|
HorizontalAlignment="Stretch"/>
|
|
|
-
|
|
|
- <TextBlock
|
|
|
+
|
|
|
+ <TextBlock
|
|
|
Grid.Row="2" Grid.Column="0"
|
|
|
VerticalAlignment="Center">File log event level</TextBlock>
|
|
|
- <ComboBox
|
|
|
- Grid.Row="2" Grid.Column="1"
|
|
|
- Margin="5"
|
|
|
- ItemsSource="{Binding LogEventLevels}"
|
|
|
- PlaceholderText="Select level"
|
|
|
- SelectedItem="{Binding FileLogEventLevel}"
|
|
|
+ <ComboBox
|
|
|
+ Grid.Row="2" Grid.Column="1"
|
|
|
+ Margin="5"
|
|
|
+ ItemsSource="{Binding LogEventLevels}"
|
|
|
+ PlaceholderText="Select level"
|
|
|
+ SelectedItem="{Binding FileLogEventLevel}"
|
|
|
HorizontalAlignment="Stretch"/>
|
|
|
-
|
|
|
- <CheckBox
|
|
|
- Grid.Row="3" Grid.Column="0"
|
|
|
+
|
|
|
+ <CheckBox
|
|
|
+ Grid.Row="3" Grid.Column="0"
|
|
|
IsChecked="{Binding SetMaxLog}">Set max log size</CheckBox>
|
|
|
<StackPanel
|
|
|
Grid.Row="3" Grid.Column="1"
|
|
|
Orientation="Horizontal">
|
|
|
<NumericUpDown
|
|
|
- Margin="5"
|
|
|
- Name="MaxLogEdit"
|
|
|
- Value="{Binding MaxLog}"
|
|
|
+ Margin="5"
|
|
|
+ Name="MaxLogEdit"
|
|
|
+ Value="{Binding MaxLog}"
|
|
|
MaxWidth="200"
|
|
|
- ParsingNumberStyle="Integer"
|
|
|
- IsEnabled="{Binding SetMaxLog}"
|
|
|
- Minimum="1"
|
|
|
+ ParsingNumberStyle="Integer"
|
|
|
+ IsEnabled="{Binding SetMaxLog}"
|
|
|
+ Minimum="1"
|
|
|
Maximum="1048576"
|
|
|
Theme="{StaticResource FixDataValidation}"
|
|
|
- ClipValueToMinMax ="True"
|
|
|
- ShowButtonSpinner="False"
|
|
|
- HorizontalAlignment="Left"
|
|
|
+ ClipValueToMinMax ="True"
|
|
|
+ ShowButtonSpinner="False"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
VerticalAlignment="Top"/>
|
|
|
<TextBlock VerticalAlignment="Center">KB</TextBlock>
|
|
|
</StackPanel>
|
|
|
- <DockPanel
|
|
|
+ <DockPanel
|
|
|
Grid.Row="4" Grid.ColumnSpan="3">
|
|
|
<Button
|
|
|
DockPanel.Dock="Right"
|
|
|
Content="Open log"
|
|
|
Command="{Binding OpenLogFile}"/>
|
|
|
- <CheckBox
|
|
|
+ <CheckBox
|
|
|
DockPanel.Dock="Left"
|
|
|
IsChecked="{Binding GameLogToLauncher}">Show game log in launcher (performace issues)</CheckBox>
|
|
|
</DockPanel>
|
|
|
+ <DockPanel
|
|
|
+ Grid.Row="5" Grid.ColumnSpan="3">
|
|
|
+ <Button
|
|
|
+ DockPanel.Dock="Right"
|
|
|
+ Content="Save"
|
|
|
+ Command="{Binding SaveSettings}"
|
|
|
+ IsEnabled="{Binding IsValid}"
|
|
|
+ VerticalAlignment="Bottom"/>
|
|
|
+ <TextBlock
|
|
|
+ DockPanel.Dock="Left"
|
|
|
+ Text="{Binding LauncherVersion}"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Bottom"/>
|
|
|
+ </DockPanel>
|
|
|
</Grid>
|
|
|
</TabItem>
|
|
|
-
|
|
|
</TabControl>
|
|
|
- <TextBlock
|
|
|
- Text="{Binding LauncherVersion}"
|
|
|
- HorizontalAlignment="Left"
|
|
|
- VerticalAlignment="Bottom"
|
|
|
- Margin="10 0 0 10"/>
|
|
|
- <StackPanel
|
|
|
- Orientation="Horizontal"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- VerticalAlignment="Bottom"
|
|
|
- Margin="0 0 10 10">
|
|
|
- <Button
|
|
|
- Content="Save"
|
|
|
- Command="{Binding SaveSettings}"
|
|
|
- IsEnabled="{Binding IsValid}"
|
|
|
- Margin="0 0 10 0"/>
|
|
|
- <Button
|
|
|
- Content="Save & close"
|
|
|
- Command="{Binding SaveSettingsAndClose}"
|
|
|
- CommandParameter="{Binding $parent[Window]}"
|
|
|
- IsEnabled="{Binding IsValid}"/>
|
|
|
- </StackPanel>
|
|
|
</DockPanel>
|
|
|
</Panel>
|
|
|
-</Window>
|
|
|
+</UserControl>
|