Winify – Diff between revs 24 and 25
?pathlinks?
Rev 24 | Rev 25 | |||
---|---|---|---|---|
Line 1... | Line 1... | |||
1 | using System; |
1 | using System; |
|
2 | using System.Linq; |
2 | using System.Linq; |
|
3 | using System.Windows.Forms; |
3 | using System.Windows.Forms; |
|
4 | using Announcements; |
4 | using Announcements; |
|
5 | using Servers; |
5 | using Servers; |
|
6 | using Winify.Properties; |
- | ||
7 | using Winify.Utilities; |
6 | using Winify.Utilities; |
|
Line 8... | Line 7... | |||
8 | |
7 | |
|
9 | namespace Winify |
8 | namespace Winify.Settings |
|
10 | { |
9 | { |
|
11 | public partial class SettingsForm : Form |
10 | public partial class SettingsForm : Form |
|
- | 11 | { |
||
- | 12 | #region Public Events & Delegates |
||
- | 13 | |
||
- | 14 | public event EventHandler<SettingsSavedEventArgs> Save; |
||
- | 15 | |
||
- | 16 | #endregion |
||
12 | { |
17 | |
|
Line 13... | Line 18... | |||
13 | #region Private Delegates, Events, Enums, Properties, Indexers and Fields |
18 | #region Private Delegates, Events, Enums, Properties, Indexers and Fields |
|
Line 14... | Line 19... | |||
14 | |
19 | |
|
Line 80... | Line 85... | |||
80 | |
85 | |
|
Line 81... | Line 86... | |||
81 | #region Event Handlers |
86 | #region Event Handlers |
|
82 | |
87 | |
|
83 | private void CheckBox1_CheckedChanged(object sender, EventArgs e) |
88 | private void CheckBox1_CheckedChanged(object sender, EventArgs e) |
|
Line 84... | Line 89... | |||
84 | { |
89 | { |
|
85 | Settings.Default.LaunchOnBoot = ((CheckBox) sender).Checked; |
90 | Properties.Settings.Default.LaunchOnBoot = ((CheckBox) sender).Checked; |
|
Line 86... | Line 91... | |||
86 | |
91 | |
|
87 | Miscellaneous.LaunchOnBootSet(Settings.Default.LaunchOnBoot); |
92 | Miscellaneous.LaunchOnBootSet(Properties.Settings.Default.LaunchOnBoot); |
|
88 | } |
93 | } |
|
Line 89... | Line 94... | |||
89 | |
94 | |
|
- | 95 | private void Button1_Click(object sender, EventArgs e) |
||
- | 96 | { |
||
90 | private void Button1_Click(object sender, EventArgs e) |
97 | var server = new Server(); |
|
Line 91... | Line 98... | |||
91 | { |
98 | |
|
92 | var server = new Server(); |
99 | _servers.Server.Add(server); |
|
93 | |
100 | |
|
Line 125... | Line 132... | |||
125 | private void Button4_Click(object sender, EventArgs e) |
132 | private void Button4_Click(object sender, EventArgs e) |
|
126 | { |
133 | { |
|
127 | var announcement = new Announcement(); |
134 | var announcement = new Announcement(); |
|
Line 128... | Line 135... | |||
128 | |
135 | |
|
- | 136 | _announcements.Announcement.Add(announcement); |
||
- | 137 | |
||
129 | _announcements.Announcement.Add(announcement); |
138 | listBox2.SelectedItem = announcement; |
|
Line 130... | Line 139... | |||
130 | } |
139 | } |
|
131 | |
140 | |
|
132 | private void ListBox2_SelectedIndexChanged(object sender, EventArgs e) |
141 | private void ListBox2_SelectedIndexChanged(object sender, EventArgs e) |
|
Line 139... | Line 148... | |||
139 | |
148 | |
|
140 | _announcementBindingSource.DataSource = _announcement; |
149 | _announcementBindingSource.DataSource = _announcement; |
|
141 | } |
150 | } |
|
Line -... | Line 151... | |||
- | 151 | } |
||
- | 152 | |
||
- | 153 | private void Button6_Click(object sender, EventArgs e) |
||
- | 154 | { |
||
- | 155 | Close(); |
||
- | 156 | } |
||
- | 157 | |
||
- | 158 | private void Button5_Click(object sender, EventArgs e) |
||
- | 159 | { |
||
- | 160 | Save?.Invoke(this, new SettingsSavedEventArgs(_servers, _announcements)); |
||
- | 161 | Close(); |
||
142 | } |
162 | } |
|
143 | |
163 | |
|
144 | #endregion |
164 | #endregion |
|
145 | } |
165 | } |