-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml.cs
More file actions
76 lines (61 loc) · 2.19 KB
/
Copy pathMainWindow.xaml.cs
File metadata and controls
76 lines (61 loc) · 2.19 KB
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
using DokuApp.Model.UI;
using System.Windows;
using System.Windows.Input;
using System;
namespace DokuApp
{
public partial class MainWindow : Window
{
private readonly MainWindowMVVM vm;
public event EventHandler<KeyEventArgs>? WindowKeyDown;
public event EventHandler<KeyEventArgs>? WindowKeyUp;
public event EventHandler<RoutedEventArgs>? WindowSolveGrid;
public event EventHandler<RoutedEventArgs>? WindowMarkCorners;
public event EventHandler<RoutedEventArgs>? WindowStepSolution;
public event EventHandler<RoutedEventArgs>? WindowClearGrid;
public event EventHandler<RoutedEventArgs>? WindowTotalClearGrid;
public event EventHandler<RoutedEventArgs>? WindowClearPossibilitiesGrid;
public event EventHandler<RoutedEventArgs>? WindowClearNumberGrid;
public MainWindow()
{
InitializeComponent();
vm = new MainWindowMVVM(this);
}
private void MainWindow_OnKeyDown(object sender, KeyEventArgs e)
{
WindowKeyDown?.Invoke(sender, e);
}
private void MainWindow_OnKeyUp(object sender, KeyEventArgs e)
{
WindowKeyUp?.Invoke(sender, e);
}
private void SolveGrid(object sender, RoutedEventArgs e)
{
WindowSolveGrid?.Invoke(sender, e);
}
private void ClearGrid(object sender, RoutedEventArgs e)
{
WindowClearGrid?.Invoke(sender, e);
}
private void FullClearGrid(object sender, RoutedEventArgs e)
{
WindowTotalClearGrid?.Invoke(sender, e);
}
private void ClearNumbers(object sender, RoutedEventArgs e)
{
WindowClearNumberGrid?.Invoke(sender, e);
}
private void ClearPossibilities(object sender, RoutedEventArgs e)
{
WindowClearPossibilitiesGrid?.Invoke(sender, e);
}
private void MarkCorners(object sender, RoutedEventArgs e)
{
WindowMarkCorners?.Invoke(sender, e);
}
private void SolveStep(object sender, RoutedEventArgs e)
{
WindowStepSolution?.Invoke(sender, e);
}
}
}