Skip to content

Commit 6744e21

Browse files
committed
Remove some unused code
1 parent 4a86962 commit 6744e21

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

Flow.Launcher/MainWindow.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
PreviewKeyDown="OnKeyDown"
2727
ResizeMode="NoResize"
2828
ShowInTaskbar="False"
29-
SizeChanged="OnSizeChanged"
3029
SizeToContent="Height"
3130
Style="{DynamicResource WindowStyle}"
3231
Topmost="True"

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,11 @@
1111
using Flow.Launcher.Helper;
1212
using Flow.Launcher.Infrastructure.UserSettings;
1313
using Flow.Launcher.ViewModel;
14-
using Microsoft.AspNetCore.Authorization;
15-
using Application = System.Windows.Application;
1614
using Screen = System.Windows.Forms.Screen;
1715
using ContextMenuStrip = System.Windows.Forms.ContextMenuStrip;
18-
using DataFormats = System.Windows.DataFormats;
1916
using DragEventArgs = System.Windows.DragEventArgs;
2017
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
21-
using MessageBox = System.Windows.MessageBox;
2218
using NotifyIcon = System.Windows.Forms.NotifyIcon;
23-
using System.Windows.Interop;
2419

2520
namespace Flow.Launcher
2621
{
@@ -149,21 +144,19 @@ private void OnLoaded(object sender, RoutedEventArgs _)
149144
break;
150145
}
151146
};
152-
153-
InitializePosition();
154147
}
155148

156149
private void InitializePosition()
157150
{
158151
if (_settings.RememberLastLaunchLocation)
159152
{
160-
this.Top = this._settings.WindowTop;
161-
this.Left = this._settings.WindowLeft;
153+
Top = _settings.WindowTop;
154+
Left = _settings.WindowLeft;
162155
}
163156
else
164157
{
165-
this.Left = WindowLeft();
166-
this.Top = WindowTop();
158+
Left = WindowLeft();
159+
Top = WindowTop();
167160
}
168161
}
169162

@@ -341,15 +334,6 @@ private void UpdatePosition()
341334
}
342335
}
343336

344-
private void OnSizeChanged(object sender, SizeChangedEventArgs e)
345-
{
346-
if (_settings.RememberLastLaunchLocation)
347-
{
348-
return;
349-
_settings.WindowLeft = Left;
350-
_settings.WindowTop = Top;
351-
}
352-
}
353337

354338
private void OnLocationChanged(object sender, EventArgs e)
355339
{

0 commit comments

Comments
 (0)