mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
- Add Show() function and seperate toggleflow()
- Change ShowMainWindow to using Show() (for Fix plugin install button)
This commit is contained in:
parent
f8cfa7c45a
commit
a2600af2eb
3 changed files with 16 additions and 12 deletions
|
|
@ -70,7 +70,7 @@ namespace Flow.Launcher
|
|||
|
||||
public void RestarApp() => RestartApp();
|
||||
|
||||
public void ShowMainWindow() => _mainVM.MainWindowVisibility = Visibility.Visible;
|
||||
public void ShowMainWindow() => _mainVM.Show();
|
||||
|
||||
public void CheckForNewUpdate() => _settingsVM.UpdateApp();
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ using Flow.Launcher.ViewModel;
|
|||
using Flow.Launcher.Helper;
|
||||
using System.Windows.Controls;
|
||||
using Flow.Launcher.Core.ExternalPlugins;
|
||||
using Screen = System.Windows.Forms.Screen;
|
||||
|
||||
namespace Flow.Launcher
|
||||
{
|
||||
|
|
|
|||
|
|
@ -713,16 +713,7 @@ namespace Flow.Launcher.ViewModel
|
|||
{
|
||||
if (WinToggleStatus != true)
|
||||
{
|
||||
if (_settings.UseSound)
|
||||
{
|
||||
MediaPlayer media = new MediaPlayer();
|
||||
media.Open(new Uri(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav"));
|
||||
media.Play();
|
||||
}
|
||||
MainWindowVisibility = Visibility.Visible;
|
||||
WinToggleStatus = true;
|
||||
((MainWindow)Application.Current.MainWindow).WindowAnimator();
|
||||
MainWindowOpacity = 1;
|
||||
Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -730,6 +721,20 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
public void Show()
|
||||
{
|
||||
if (_settings.UseSound)
|
||||
{
|
||||
MediaPlayer media = new MediaPlayer();
|
||||
media.Open(new Uri(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav"));
|
||||
media.Play();
|
||||
}
|
||||
MainWindowVisibility = Visibility.Visible;
|
||||
WinToggleStatus = true;
|
||||
((MainWindow)Application.Current.MainWindow).WindowAnimator();
|
||||
MainWindowOpacity = 1;
|
||||
}
|
||||
|
||||
public async void Hide()
|
||||
{
|
||||
MainWindowOpacity = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue