Rearrange menu, one-time desktop icon creation

This commit is contained in:
pizzaboxer 2023-02-13 22:25:57 +00:00
parent 4b360ca471
commit 8a4cc67893
7 changed files with 29 additions and 24 deletions

View File

@ -436,10 +436,16 @@ namespace Bloxstrap
.WriteToFile(newMenuShortcut); .WriteToFile(newMenuShortcut);
} }
if (App.Settings.Prop.CreateDesktopIcon && !File.Exists(Path.Combine(Directories.Desktop, "Play Roblox.lnk"))) if (App.Settings.Prop.CreateDesktopIcon)
{ {
ShellLink.Shortcut.CreateShortcut(Directories.Application, "", Directories.Application, 0) if (!File.Exists(Path.Combine(Directories.Desktop, "Play Roblox.lnk")))
.WriteToFile(Path.Combine(Directories.Desktop, "Play Roblox.lnk")); {
ShellLink.Shortcut.CreateShortcut(Directories.Application, "", Directories.Application, 0)
.WriteToFile(Path.Combine(Directories.Desktop, "Play Roblox.lnk"));
}
// one-time toggle, set it back to false
App.Settings.Prop.CreateDesktopIcon = false;
} }
} }

View File

@ -41,6 +41,12 @@ namespace Bloxstrap.ViewModels
_page = page; _page = page;
} }
public bool CreateDesktopIcon
{
get => App.Settings.Prop.CreateDesktopIcon;
set => App.Settings.Prop.CreateDesktopIcon = value;
}
public bool UpdateCheckingEnabled public bool UpdateCheckingEnabled
{ {
get => App.Settings.Prop.CheckForUpdates; get => App.Settings.Prop.CheckForUpdates;

View File

@ -60,12 +60,6 @@ namespace Bloxstrap.ViewModels
set => App.BaseDirectory = value; set => App.BaseDirectory = value;
} }
public bool CreateDesktopIcon
{
get => App.Settings.Prop.CreateDesktopIcon;
set => App.Settings.Prop.CreateDesktopIcon = value;
}
public IEnumerable<string> Channels public IEnumerable<string> Channels
{ {
get => _channels; get => _channels;

View File

@ -62,8 +62,8 @@
<ui:NavigationItem Content="Mods" PageType="{x:Type pages:ModsPage}" Icon="DocumentToolbox24" Tag="mods" /> <ui:NavigationItem Content="Mods" PageType="{x:Type pages:ModsPage}" Icon="DocumentToolbox24" Tag="mods" />
<ui:NavigationItem Content="Bootstrapper" PageType="{x:Type pages:BootstrapperPage}" Icon="Window48" Tag="bootstrapper" /> <ui:NavigationItem Content="Bootstrapper" PageType="{x:Type pages:BootstrapperPage}" Icon="Window48" Tag="bootstrapper" />
<ui:NavigationItem Content="Installation" PageType="{x:Type pages:InstallationPage}" Icon="HardDrive20" Tag="installation" /> <ui:NavigationItem Content="Installation" PageType="{x:Type pages:InstallationPage}" Icon="HardDrive20" Tag="installation" />
<ui:NavigationSeparator /> <!--<ui:NavigationSeparator />-->
<ui:NavigationItem Content="ReShade Help" PageType="{x:Type pages:ReShadeHelpPage}" Icon="BookQuestionMark24" Tag="reshadehelp" /> <ui:NavigationItem Content="ReShade Help" PageType="{x:Type pages:ReShadeHelpPage}" Icon="BookQuestionMark24" Tag="reshadehelp" Visibility="Collapsed" />
<ui:NavigationItem Content="About" PageType="{x:Type pages:AboutPage}" Icon="QuestionCircle48" Tag="about" /> <ui:NavigationItem Content="About" PageType="{x:Type pages:AboutPage}" Icon="QuestionCircle48" Tag="about" />
</ui:NavigationFluent.Items> </ui:NavigationFluent.Items>
</ui:NavigationFluent> </ui:NavigationFluent>

View File

@ -14,6 +14,15 @@
<TextBlock Text="Configure how Bloxstrap should behave and look." FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" /> <TextBlock Text="Configure how Bloxstrap should behave and look." FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
<TextBlock Text="Behaviour" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" /> <TextBlock Text="Behaviour" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" />
<ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Header>
<StackPanel Grid.Column="0">
<TextBlock FontSize="13" FontWeight="Medium" Text="Create desktop icon" />
<TextBlock FontSize="12" Text="Bloxstrap will place an icon on the desktop that launches Roblox." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch IsChecked="{Binding CreateDesktopIcon, Mode=TwoWay}" />
</ui:CardControl>
<ui:CardControl Margin="0,8,0,0"> <ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Header> <ui:CardControl.Header>
<StackPanel Grid.Column="0"> <StackPanel Grid.Column="0">

View File

@ -29,16 +29,6 @@
</Grid> </Grid>
</ui:CardExpander> </ui:CardExpander>
<ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Header>
<StackPanel Grid.Column="0">
<TextBlock FontSize="13" FontWeight="Medium" Text="Create desktop icon" />
<TextBlock FontSize="12" Text="Bloxstrap will place an icon on the desktop that launches Roblox." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch IsChecked="{Binding CreateDesktopIcon, Mode=TwoWay}" />
</ui:CardControl>
<ui:CardExpander Margin="0,8,0,0"> <ui:CardExpander Margin="0,8,0,0">
<ui:CardExpander.Header> <ui:CardExpander.Header>
<Grid> <Grid>

View File

@ -74,10 +74,10 @@
<TextBlock FontSize="12" Foreground="{DynamicResource TextFillColorTertiaryBrush}"> <TextBlock FontSize="12" Foreground="{DynamicResource TextFillColorTertiaryBrush}">
<TextBlock.Style> <TextBlock.Style>
<Style> <Style>
<Setter Property="TextBlock.Text" Value="ReShade's resources are stored here." /> <Setter Property="TextBlock.Text" Value="Where ReShade's resources are stored." />
<Style.Triggers> <Style.Triggers>
<DataTrigger Binding="{Binding CanOpenReShadeFolder}" Value="False"> <DataTrigger Binding="{Binding CanOpenReShadeFolder}" Value="False">
<Setter Property="TextBlock.Text" Value="Available once Roblox is started with ReShade." /> <Setter Property="TextBlock.Text" Value="Please launch Roblox with ReShade first." />
</DataTrigger> </DataTrigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
@ -88,7 +88,7 @@
<ui:CardAction Grid.Column="1" Margin="4,8,0,0" Icon="BookQuestionMark24" Command="{Binding ShowReShadeHelpCommand}"> <ui:CardAction Grid.Column="1" Margin="4,8,0,0" Icon="BookQuestionMark24" Command="{Binding ShowReShadeHelpCommand}">
<StackPanel> <StackPanel>
<TextBlock FontSize="13" FontWeight="Medium" Text="Help" /> <TextBlock FontSize="13" FontWeight="Medium" Text="Help" />
<TextBlock FontSize="12" Text="See info about using ReShade." Foreground="{DynamicResource TextFillColorTertiaryBrush}" /> <TextBlock FontSize="12" Text="See info about using ReShade." Padding="0,0,16,0" Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel> </StackPanel>
</ui:CardAction> </ui:CardAction>
</Grid> </Grid>