Remotely/Agent.Installer.Win/MainWindow.xaml.cs
2021-07-29 07:56:15 -07:00

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;
}
}
}