mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
using Remotely.Agent.Installer.Win.Services;
|
|
using Remotely.Agent.Installer.Win.ViewModels;
|
|
using System.Windows;
|
|
using System.Windows.Input;
|
|
|
|
namespace Remotely.Agent.Installer.Win
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for MainWindow.xaml
|
|
/// </summary>
|
|
public partial class MainWindow : Window
|
|
{
|
|
public MainWindow()
|
|
{
|
|
if (CommandLineParser.CommandLineArgs.ContainsKey("quiet"))
|
|
{
|
|
Hide();
|
|
ShowInTaskbar = false;
|
|
_ = new MainWindowViewModel().Init();
|
|
}
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
|
{
|
|
DragMove();
|
|
}
|
|
|
|
private async void Window_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
await (DataContext as MainWindowViewModel).Init();
|
|
}
|
|
|
|
private void CloseButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
App.Current.Shutdown();
|
|
}
|
|
|
|
private void MinimizeButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
this.WindowState = WindowState.Minimized;
|
|
}
|
|
}
|
|
}
|