mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Apply Logic in the viewmodel
This commit is contained in:
parent
c557031ef1
commit
ec4f3a781a
3 changed files with 7 additions and 13 deletions
|
|
@ -598,10 +598,8 @@
|
||||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource startFlowLauncherOnSystemStartup}" />
|
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource startFlowLauncherOnSystemStartup}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
Checked="OnAutoStartupChecked"
|
|
||||||
IsChecked="{Binding Settings.StartFlowLauncherOnSystemStartup}"
|
IsChecked="{Binding Settings.StartFlowLauncherOnSystemStartup}"
|
||||||
Style="{DynamicResource SideControlCheckBox}"
|
Style="{DynamicResource SideControlCheckBox}"/>
|
||||||
Unchecked="OnAutoStartupUncheck" />
|
|
||||||
<TextBlock Style="{StaticResource Glyph}">
|
<TextBlock Style="{StaticResource Glyph}">
|
||||||

|

|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
|
|
|
||||||
|
|
@ -57,16 +57,6 @@ namespace Flow.Launcher
|
||||||
hwndTarget.RenderMode = RenderMode.SoftwareOnly;
|
hwndTarget.RenderMode = RenderMode.SoftwareOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnAutoStartupChecked(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
viewModel.SetStartup();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnAutoStartupUncheck(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
viewModel.RemoveStartup();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnSelectPythonDirectoryClick(object sender, RoutedEventArgs e)
|
private void OnSelectPythonDirectoryClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var dlg = new FolderBrowserDialog
|
var dlg = new FolderBrowserDialog
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,13 @@ namespace Flow.Launcher.ViewModel
|
||||||
Settings.AutoUpdates = value;
|
Settings.AutoUpdates = value;
|
||||||
|
|
||||||
if (value)
|
if (value)
|
||||||
|
{
|
||||||
UpdateApp();
|
UpdateApp();
|
||||||
|
SetStartup();
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
RemoveStartup();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue