using SunlightCentralizedControlManagement_SCCM_.UserClass; using SunlightCentralizedControlManagement_SCCM_.ViewModel; 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.Forms; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using static System.Windows.Forms.VisualStyles.VisualStyleElement.Tab; namespace SunlightCentralizedControlManagement_SCCM_ { /// /// MainWindow.xaml 的交互逻辑 /// public partial class MainWindow : Window { public MainWindow() { DataContext = new MainWindowViewModel(); InitializeComponent(); } private void ButtonPopUpLogout_Click(object sender, RoutedEventArgs e) { System.Windows.Application.Current.Shutdown(); } private void ButtonMaximize_Click(object sender, RoutedEventArgs e) { if (WindowState == WindowState.Maximized) { WindowState = WindowState.Normal; } else { WindowState = WindowState.Maximized; } } private void ButtonMinimize_Click(object sender, RoutedEventArgs e) { if (WindowState == WindowState.Minimized) { WindowState = WindowState.Normal; } else { WindowState = WindowState.Minimized; } } private void ButtonOpenMenu_Click(object sender, RoutedEventArgs e) { ButtonOpenMenu.Visibility = Visibility.Collapsed; ButtonCloseMenu.Visibility = Visibility.Visible; } private void ButtonCloseMenu_Click(object sender, RoutedEventArgs e) { ButtonOpenMenu.Visibility = Visibility.Visible; ButtonCloseMenu.Visibility = Visibility.Collapsed; } private void GridTitle_MouseDown(object sender, MouseButtonEventArgs e) { if (e.ChangedButton == MouseButton.Left) DragMove(); } private void GridMenu_SizeChanged(object sender, SizeChangedEventArgs e) { gdMian.Margin = new Thickness(e.NewSize.Width, 50, 0, 0); } private void ListViewItem_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { } private void ListViewItem_Whole(object sender, MouseButtonEventArgs e) { Picture.Content = new View.Whole(); } private void ListViewItem_Monitor(object sender, MouseButtonEventArgs e) { Picture.Content = new View.MonitorView(); } private void ListViewItem_Curve(object sender, MouseButtonEventArgs e) { Picture.Content = new View.CurveView(); } private void ListViewItem_Programgroup(object sender, MouseButtonEventArgs e) { Picture.Content = new View.ProgramgroupView(); } private void Buttonhelp_Click(object sender, RoutedEventArgs e) { WindowsView.Help help_page = new WindowsView.Help(); help_page.Show(); } private void ButtonSYS_Click(object sender, RoutedEventArgs e) { Picture.Content = new View.MachinesSet();//EngineerSetView(); } } }