mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
40 lines
1009 B
C#
40 lines
1009 B
C#
using Avalonia;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Markup.Xaml;
|
|
using System;
|
|
|
|
namespace Remotely.Desktop.Linux.Views
|
|
{
|
|
public class PromptForAccessWindow : Window
|
|
{
|
|
public PromptForAccessWindow()
|
|
{
|
|
this.InitializeComponent();
|
|
#if DEBUG
|
|
this.AttachDevTools();
|
|
#endif
|
|
}
|
|
|
|
private void InitializeComponent()
|
|
{
|
|
AvaloniaXamlLoader.Load(this);
|
|
|
|
Opened += Window_Opened;
|
|
this.FindControl<Border>("TitleBanner").PointerPressed += TitleBanner_PointerPressed;
|
|
}
|
|
|
|
private void Window_Opened(object sender, EventArgs e)
|
|
{
|
|
Topmost = false;
|
|
}
|
|
|
|
private void TitleBanner_PointerPressed(object sender, Avalonia.Input.PointerPressedEventArgs e)
|
|
{
|
|
if (e.GetCurrentPoint(this).Properties.PointerUpdateKind == Avalonia.Input.PointerUpdateKind.LeftButtonPressed)
|
|
{
|
|
BeginMoveDrag(e);
|
|
}
|
|
}
|
|
}
|
|
}
|