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.
 
 
 

83 lines
2.4 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.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)
{
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)
{
}
}
}