-
Notifications
You must be signed in to change notification settings - Fork 124
/
Copy pathMainWindow.xaml.cs
90 lines (72 loc) · 2.12 KB
/
MainWindow.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
using System;
using System.Windows;
using System.Windows.Input;
using CrazyCoder.ViewModels;
using CrazyCoder.Views;
namespace CrazyCoder
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
DataContext = new MainViewModel();
}
#region 开发工具
private void Regex_Click(Object sender, RoutedEventArgs e)
{
//frame.Navigate(new Uri("Views\\Regex.xaml", UriKind.Relative));
var frm = new RegexWindow();
frm.Show();
}
private void Ico_Click(Object sender, RoutedEventArgs e)
{
}
private void Security_Click(Object sender, RoutedEventArgs e)
{
}
private void Speech_Click(Object sender, RoutedEventArgs e)
{
}
#endregion
#region 网络通信
private void Network_Click(Object sender, RoutedEventArgs e)
{
}
#endregion
#region 帮助
private void CheckUpdate_Click(Object sender, RoutedEventArgs e)
{
}
private void About_Click(Object sender, RoutedEventArgs e)
{
//frame.Navigate(new Uri("https://github.com/newlifex"));
//Process.Start("https://www.newlifex.com");
}
#endregion
#region 窗口控制
private void Nav_MouseDown(Object sender, MouseButtonEventArgs e)
{
if (e.LeftButton == MouseButtonState.Pressed) DragMove();
}
private void Min_Click(Object sender, RoutedEventArgs e)
{
WindowState = WindowState.Minimized;
}
private void Max_Click(Object sender, RoutedEventArgs e)
{
if (WindowState == WindowState.Maximized)
WindowState = WindowState.Normal;
else
WindowState = WindowState.Maximized;
}
private void Close_Click(Object sender, RoutedEventArgs e)
{
Close();
}
#endregion
}
}