forked from thedeemon/gep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PreferencesForm.cs
53 lines (48 loc) · 1.71 KB
/
PreferencesForm.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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace gep
{
public partial class PreferencesForm : Form
{
public bool autoArrange;
public bool suggestURLs;
public bool useDirectConnect;
public bool createFiltersByName;
public PreferencesForm(bool _autoArrange, bool _suggestURLs, bool _useDirectConnect, bool _createFiltersByName)
{
autoArrange = _autoArrange;
suggestURLs = _suggestURLs;
useDirectConnect = _useDirectConnect;
createFiltersByName = _createFiltersByName;
InitializeComponent();
}
private void okBtn_Click(object sender, EventArgs e)
{
autoArrange = autoArrangeChkBox.Checked;
suggestURLs = suggestURLsChkBox.Checked;
useDirectConnect = findPinsBtn.Checked;
createFiltersByName = createByNameBtn.Checked;
DialogResult = DialogResult.OK;
Close();
}
private void cancelBtn_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
private void PreferencesForm_Load(object sender, EventArgs e)
{
autoArrangeChkBox.Checked = autoArrange;
suggestURLsChkBox.Checked = suggestURLs;
createByMonBtn.Checked = !createFiltersByName;
createByNameBtn.Checked = createFiltersByName;
findPinsBtn.Checked = useDirectConnect;
renderStreamBtn.Checked = !useDirectConnect;
}
}
}