-
-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split Bootstrapper tab into Appearance/Behaviour
- Loading branch information
1 parent
fb4a417
commit e075e9b
Showing
11 changed files
with
210 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using Bloxstrap.Dialogs; | ||
using Bloxstrap.Enums; | ||
using Bloxstrap.Helpers.Extensions; | ||
using Bloxstrap.Views; | ||
using CommunityToolkit.Mvvm.Input; | ||
using Wpf.Ui.Mvvm.Services; | ||
using Wpf.Ui.Mvvm.Contracts; | ||
|
||
namespace Bloxstrap.ViewModels | ||
{ | ||
public class BehaviourViewModel | ||
{ | ||
public bool CreateDesktopIcon | ||
{ | ||
get => App.Settings.Prop.CreateDesktopIcon; | ||
set => App.Settings.Prop.CreateDesktopIcon = value; | ||
} | ||
|
||
public bool UpdateCheckingEnabled | ||
{ | ||
get => App.Settings.Prop.CheckForUpdates; | ||
set => App.Settings.Prop.CheckForUpdates = value; | ||
} | ||
|
||
public bool ChannelChangePromptingEnabled | ||
{ | ||
get => App.Settings.Prop.PromptChannelChange; | ||
set => App.Settings.Prop.PromptChannelChange = value; | ||
} | ||
|
||
public bool MultiInstanceLaunchingEnabled | ||
{ | ||
get => App.Settings.Prop.MultiInstanceLaunching; | ||
set => App.Settings.Prop.MultiInstanceLaunching = value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<ui:UiPage x:Class="Bloxstrap.Views.Pages.AppearancePage" | ||
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:local="clr-namespace:Bloxstrap.Views.Pages" | ||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" | ||
mc:Ignorable="d" | ||
d:DesignHeight="450" d:DesignWidth="800" | ||
Title="AppearancePage" | ||
Scrollable="True"> | ||
<StackPanel Margin="0,0,14,14"> | ||
<TextBlock Text="Configure how Bloxstrap should look." FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" /> | ||
|
||
<ui:CardControl Margin="0,8,0,0" Padding="16,13,16,12"> | ||
<ui:CardControl.Header> | ||
<StackPanel> | ||
<TextBlock FontSize="14" Text="Theme" /> | ||
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Dark theme does not apply to Legacy or Vista styles." Foreground="{DynamicResource TextFillColorTertiaryBrush}" /> | ||
</StackPanel> | ||
</ui:CardControl.Header> | ||
<ComboBox Width="200" Padding="10,5,10,5" ItemsSource="{Binding Themes.Keys, Mode=OneTime}" Text="{Binding Theme, Mode=TwoWay}" /> | ||
</ui:CardControl> | ||
<ui:CardControl Margin="0,8,0,0" Padding="16,13,16,12"> | ||
<ui:CardControl.Header> | ||
<StackPanel> | ||
<TextBlock FontSize="14" Text="Style" /> | ||
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Choose how the bootstrapper should look." Foreground="{DynamicResource TextFillColorTertiaryBrush}" /> | ||
</StackPanel> | ||
</ui:CardControl.Header> | ||
<ComboBox Width="200" Padding="10,5,10,5" ItemsSource="{Binding Dialogs.Keys, Mode=OneTime}" Text="{Binding Dialog, Mode=TwoWay}" /> | ||
</ui:CardControl> | ||
<ui:CardControl Margin="0,8,0,0" Padding="16,13,16,12"> | ||
<ui:CardControl.Header> | ||
<StackPanel> | ||
<TextBlock FontSize="14" Text="Icon" /> | ||
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Choose what icon the bootstrapper should use." Foreground="{DynamicResource TextFillColorTertiaryBrush}" /> | ||
</StackPanel> | ||
</ui:CardControl.Header> | ||
<Grid Width="200"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto" /> | ||
<ColumnDefinition Width="*" /> | ||
</Grid.ColumnDefinitions> | ||
<Border Grid.Column="0" Width="28" Height="28" Margin="0,0,5,0"> | ||
<Border.Background> | ||
<ImageBrush ImageSource="{Binding IconPreviewSource, Mode=OneWay}" /> | ||
</Border.Background> | ||
</Border> | ||
<ComboBox Grid.Column="1" Margin="5,0,0,0" Padding="10,5,10,5" ItemsSource="{Binding Icons.Keys, Mode=OneTime}" Text="{Binding Icon, Mode=TwoWay}" /> | ||
</Grid> | ||
</ui:CardControl> | ||
<ui:Button Content="Preview" HorizontalAlignment="Stretch" Margin="0,8,0,0" Command="{Binding PreviewBootstrapperCommand}" /> | ||
</StackPanel> | ||
</ui:UiPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Bloxstrap.ViewModels; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
|
||
namespace Bloxstrap.Views.Pages | ||
{ | ||
/// <summary> | ||
/// Interaction logic for AppearancePage.xaml | ||
/// </summary> | ||
public partial class AppearancePage | ||
{ | ||
public AppearancePage() | ||
{ | ||
DataContext = new AppearanceViewModel(this); | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<ui:UiPage x:Class="Bloxstrap.Views.Pages.BehaviourPage" | ||
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:models="clr-namespace:Bloxstrap.ViewModels" | ||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" | ||
mc:Ignorable="d" | ||
d:DesignHeight="600" d:DesignWidth="800" | ||
Title="BehaviourPage" | ||
Scrollable="True"> | ||
|
||
<StackPanel Margin="0,0,14,14"> | ||
<TextBlock Text="Configure what Bloxstrap should do when starting up." FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" /> | ||
|
||
<ui:CardControl Margin="0,8,0,0" Padding="16,13,16,12"> | ||
<ui:CardControl.Header> | ||
<StackPanel> | ||
<TextBlock FontSize="14" Text="Create desktop icon" /> | ||
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Bloxstrap will place an icon on the desktop that launches Roblox the next time it launches." Foreground="{DynamicResource TextFillColorTertiaryBrush}" /> | ||
</StackPanel> | ||
</ui:CardControl.Header> | ||
<ui:ToggleSwitch IsChecked="{Binding CreateDesktopIcon, Mode=TwoWay}" /> | ||
</ui:CardControl> | ||
<ui:CardControl Margin="0,8,0,0" Padding="16,13,16,12"> | ||
<ui:CardControl.Header> | ||
<StackPanel> | ||
<TextBlock FontSize="14" Text="Automatically update Bloxstrap" /> | ||
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Bloxstrap will check and automatically update itself when launching Roblox." Foreground="{DynamicResource TextFillColorTertiaryBrush}" /> | ||
</StackPanel> | ||
</ui:CardControl.Header> | ||
<ui:ToggleSwitch IsChecked="{Binding UpdateCheckingEnabled, Mode=TwoWay}" /> | ||
</ui:CardControl> | ||
<ui:CardControl Margin="0,8,0,0" Padding="16,13,16,12"> | ||
<ui:CardControl.Header> | ||
<StackPanel> | ||
<TextBlock FontSize="14" Text="Allow multi-game instance launching" /> | ||
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Roblox will allow having more than one game instance open simultaneously." Foreground="{DynamicResource TextFillColorTertiaryBrush}" /> | ||
</StackPanel> | ||
</ui:CardControl.Header> | ||
<ui:ToggleSwitch IsChecked="{Binding MultiInstanceLaunchingEnabled, Mode=TwoWay}" /> | ||
</ui:CardControl> | ||
<ui:CardControl Margin="0,8,0,0" Padding="16,13,16,12"> | ||
<ui:CardControl.Header> | ||
<StackPanel> | ||
<TextBlock FontSize="14" Text="Prompt on Roblox-forced channel change" /> | ||
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Confirm change if Roblox mandates when launching. Otherwise, it'll change automatically." Foreground="{DynamicResource TextFillColorTertiaryBrush}" /> | ||
</StackPanel> | ||
</ui:CardControl.Header> | ||
<ui:ToggleSwitch IsChecked="{Binding ChannelChangePromptingEnabled, Mode=TwoWay}" /> | ||
</ui:CardControl> | ||
</StackPanel> | ||
</ui:UiPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using Bloxstrap.ViewModels; | ||
|
||
namespace Bloxstrap.Views.Pages | ||
{ | ||
/// <summary> | ||
/// Interaction logic for BehaviourPage.xaml | ||
/// </summary> | ||
public partial class BehaviourPage | ||
{ | ||
public BehaviourPage() | ||
{ | ||
DataContext = new BehaviourViewModel(); | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.