|
11 | 11 | using Flow.Launcher.Helper;
|
12 | 12 | using Flow.Launcher.Infrastructure.UserSettings;
|
13 | 13 | using Flow.Launcher.ViewModel;
|
14 |
| -using Microsoft.AspNetCore.Authorization; |
15 |
| -using Application = System.Windows.Application; |
16 | 14 | using Screen = System.Windows.Forms.Screen;
|
17 | 15 | using ContextMenuStrip = System.Windows.Forms.ContextMenuStrip;
|
18 |
| -using DataFormats = System.Windows.DataFormats; |
19 | 16 | using DragEventArgs = System.Windows.DragEventArgs;
|
20 | 17 | using KeyEventArgs = System.Windows.Input.KeyEventArgs;
|
21 |
| -using MessageBox = System.Windows.MessageBox; |
22 | 18 | using NotifyIcon = System.Windows.Forms.NotifyIcon;
|
23 |
| -using System.Windows.Interop; |
24 | 19 |
|
25 | 20 | namespace Flow.Launcher
|
26 | 21 | {
|
@@ -149,21 +144,19 @@ private void OnLoaded(object sender, RoutedEventArgs _)
|
149 | 144 | break;
|
150 | 145 | }
|
151 | 146 | };
|
152 |
| - |
153 |
| - InitializePosition(); |
154 | 147 | }
|
155 | 148 |
|
156 | 149 | private void InitializePosition()
|
157 | 150 | {
|
158 | 151 | if (_settings.RememberLastLaunchLocation)
|
159 | 152 | {
|
160 |
| - this.Top = this._settings.WindowTop; |
161 |
| - this.Left = this._settings.WindowLeft; |
| 153 | + Top = _settings.WindowTop; |
| 154 | + Left = _settings.WindowLeft; |
162 | 155 | }
|
163 | 156 | else
|
164 | 157 | {
|
165 |
| - this.Left = WindowLeft(); |
166 |
| - this.Top = WindowTop(); |
| 158 | + Left = WindowLeft(); |
| 159 | + Top = WindowTop(); |
167 | 160 | }
|
168 | 161 | }
|
169 | 162 |
|
@@ -341,15 +334,6 @@ private void UpdatePosition()
|
341 | 334 | }
|
342 | 335 | }
|
343 | 336 |
|
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 |
| - } |
353 | 337 |
|
354 | 338 | private void OnLocationChanged(object sender, EventArgs e)
|
355 | 339 | {
|
|
0 commit comments