Change Property toggle base to Var from visibility

This commit is contained in:
DB p 2021-11-12 07:49:20 +09:00
parent 342bf306ef
commit a4e941b954

View file

@ -52,6 +52,8 @@ namespace Flow.Launcher
private async void OnClosing(object sender, CancelEventArgs e) private async void OnClosing(object sender, CancelEventArgs e)
{ {
_settings.WindowTop = Top;
_settings.WindowLeft = Left;
_notifyIcon.Visible = false; _notifyIcon.Visible = false;
_viewModel.Save(); _viewModel.Save();
e.Cancel = true; e.Cancel = true;
@ -79,9 +81,9 @@ namespace Flow.Launcher
{ {
switch (e.PropertyName) switch (e.PropertyName)
{ {
case nameof(MainViewModel.MainWindowVisibility): case nameof(MainViewModel.WinToggleStatus):
{ {
if (_viewModel.MainWindowVisibility == Visibility.Visible) if (_viewModel.WinToggleStatus == true)
{ {
Activate(); Activate();
QueryTextBox.Focus(); QueryTextBox.Focus();
@ -157,7 +159,7 @@ namespace Flow.Launcher
Top = WindowTop(); Top = WindowTop();
Left = WindowLeft(); Left = WindowLeft();
_settings.WindowTop = Top; _settings.WindowTop = Top;
_settings.WindowLeft = Left; _settings.WindowLeft = Left;
} }
private void UpdateNotifyIconText() private void UpdateNotifyIconText()
@ -237,7 +239,6 @@ namespace Flow.Launcher
public void WindowAnimator() public void WindowAnimator()
{ {
InitializePosition();
Storyboard sb = new Storyboard(); Storyboard sb = new Storyboard();
var da = new DoubleAnimation var da = new DoubleAnimation
{ {