-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSyncInterface.cs
More file actions
49 lines (40 loc) · 1.67 KB
/
SyncInterface.cs
File metadata and controls
49 lines (40 loc) · 1.67 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
using DesktopApplication.InterfaceLogic;
using DesktopApplication.Objects.ViewModels;
namespace DesktopApplication
{
public partial class DataCopyTool : Form {
private SyncInterfaceLogic InterfaceLogic;
public DataCopyTool() {
InitializeComponent();
InitializeDynamicPanel();
InterfaceLogic = new SyncInterfaceLogic(this);
}
private void InitializeDynamicPanel() {
dynamicPanel.Controls.Add(new Label() { Text = "No rows added. Click 'Add Row' to start." });
}
private void addRow_Click(object sender, EventArgs e) {
InterfaceLogic.CreateSyncObject();
}
private void SaveButton_Click(object sender, EventArgs e) {
InterfaceLogic.SaveSettings();
}
private void LoadButton_Click(object sender, EventArgs e) {
InterfaceLogic.LoadSettings();
}
private void ClearButton_Click(object sender, EventArgs e) {
InterfaceLogic.ResetSettings();
}
internal void clearPanel() {
dynamicPanel.Controls.Clear();
}
internal void AddObjectToPanel(SyncViewModel syncViewModel) {
dynamicPanel.Controls.Add(syncViewModel.sourceButton);
dynamicPanel.Controls.Add(syncViewModel.sourceLabel);
dynamicPanel.Controls.Add(syncViewModel.destinationButton);
dynamicPanel.Controls.Add(syncViewModel.destinationLabel);
dynamicPanel.Controls.Add(syncViewModel.EditScheduleButton);
dynamicPanel.Controls.Add(syncViewModel.copyButton);
dynamicPanel.Controls.Add(syncViewModel.RecurringCheckbox);
}
}
}