Remotely/Agent.Installer.Win/MainWindow.xaml.cs
2020-02-23 02:38:27 +00:00

57 lines
1.5 KiB
C#

using Remotely.Agent.Installer.Win.Services;
using Remotely.Agent.Installer.Win.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
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;
}
}
}