You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
122 lines
3.9 KiB
122 lines
3.9 KiB
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_
|
|
{
|
|
/// <summary>
|
|
/// MainWindow.xaml 的交互逻辑
|
|
/// </summary>
|
|
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_ProductionPlanning(object sender, MouseButtonEventArgs e)
|
|
{
|
|
Picture.Content = new View.ProductionPlanningView();
|
|
}
|
|
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_Machine(object sender, MouseButtonEventArgs e)
|
|
{
|
|
Picture.Content = new View.MachinesView();
|
|
}
|
|
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 ListViewItem_ConveyorCenters(object sender, MouseButtonEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
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.SYSSetView();
|
|
}
|
|
|
|
private void ButtonPermit_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
WindowsView.CDKEY cDKEY = new WindowsView.CDKEY();
|
|
cDKEY.Show();
|
|
}
|
|
}
|
|
}
|
|
|