2024-02-05 23:08:37 -08:00
|
|
|
using Avalonia.Controls;
|
|
|
|
using Avalonia.Input;
|
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
namespace SourceGit.Views
|
|
|
|
{
|
|
|
|
public partial class FileHistories : Window
|
|
|
|
{
|
|
|
|
public FileHistories()
|
|
|
|
{
|
2024-02-05 23:08:37 -08:00
|
|
|
InitializeComponent();
|
|
|
|
}
|
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
private void MaximizeOrRestoreWindow(object sender, TappedEventArgs e)
|
|
|
|
{
|
|
|
|
if (WindowState == WindowState.Maximized)
|
|
|
|
{
|
2024-03-14 03:23:36 -07:00
|
|
|
WindowState = WindowState.Normal;
|
2024-03-17 18:37:06 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2024-03-14 03:23:36 -07:00
|
|
|
WindowState = WindowState.Maximized;
|
|
|
|
}
|
|
|
|
e.Handled = true;
|
|
|
|
}
|
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
private void CustomResizeWindow(object sender, PointerPressedEventArgs e)
|
|
|
|
{
|
|
|
|
if (sender is Border border)
|
|
|
|
{
|
|
|
|
if (border.Tag is WindowEdge edge)
|
|
|
|
{
|
2024-03-14 03:23:36 -07:00
|
|
|
BeginResizeDrag(edge, e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
private void BeginMoveWindow(object sender, PointerPressedEventArgs e)
|
|
|
|
{
|
2024-03-14 03:23:36 -07:00
|
|
|
BeginMoveDrag(e);
|
|
|
|
}
|
2024-02-05 23:08:37 -08:00
|
|
|
}
|
2024-03-31 01:54:29 -07:00
|
|
|
}
|