mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 13:26:30 +00:00
queue + local sqlite WIP
This commit is contained in:
@@ -6,6 +6,7 @@ using System.Windows.Media;
|
||||
using Azaion.Annotator.Extensions;
|
||||
using Azaion.Common.DTO;
|
||||
using Azaion.Common.DTO.Config;
|
||||
using Azaion.Common.Extensions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
using SharpVectors.Converters;
|
||||
@@ -33,7 +34,7 @@ public partial class MainSuite
|
||||
SizeChanged += async (_, _) => await SaveUserSettings();
|
||||
LocationChanged += async (_, _) => await SaveUserSettings();
|
||||
StateChanged += async (_, _) => await SaveUserSettings();
|
||||
Left = SystemParameters.WorkArea.Width - Width - 250;
|
||||
Left = (SystemParameters.WorkArea.Width - Width) / 2;
|
||||
}
|
||||
|
||||
private void OnLoaded(object sender, RoutedEventArgs e)
|
||||
@@ -54,8 +55,8 @@ public partial class MainSuite
|
||||
new SvgViewbox
|
||||
{
|
||||
SvgSource = azaionModule.SvgIcon,
|
||||
Width = 32,
|
||||
Height = 32,
|
||||
Width = 24,
|
||||
Height = 24,
|
||||
Margin = new Thickness(0, 0, 10, 0)
|
||||
},
|
||||
new TextBlock
|
||||
@@ -120,4 +121,20 @@ public partial class MainSuite
|
||||
}
|
||||
|
||||
private void CloseBtn_OnClick(object sender, RoutedEventArgs e) => Close();
|
||||
|
||||
private double _startMouseMovePosition;
|
||||
|
||||
private void OnMouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.OriginalSource is Button || e.OriginalSource is StackPanel)
|
||||
return;
|
||||
|
||||
if (e.LeftButton == MouseButtonState.Pressed)
|
||||
Left = System.Windows.Forms.Cursor.Position.X - _startMouseMovePosition;
|
||||
}
|
||||
|
||||
private void MainSuite_OnMouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
_startMouseMovePosition = e.GetPosition(this).X;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user