Winify – Diff between revs 58 and 59
?pathlinks?
Rev 58 | Rev 59 | |||
---|---|---|---|---|
1 | using System; |
1 | using System; |
|
2 | using System.Linq; |
2 | using System.Linq; |
|
3 | using System.Threading; |
3 | using System.Threading; |
|
4 | using System.Windows.Forms; |
4 | using System.Windows.Forms; |
|
5 | using Announcements; |
5 | using Announcements; |
|
6 | using Servers; |
6 | using Servers; |
|
7 | using Winify.Utilities; |
7 | using Winify.Utilities; |
|
8 | using static System.Windows.Forms.VisualStyles.VisualStyleElement; |
8 | using static System.Windows.Forms.VisualStyles.VisualStyleElement; |
|
9 | |
9 | |
|
10 | namespace Winify.Settings |
10 | namespace Winify.Settings |
|
11 | { |
11 | { |
|
12 | public partial class SettingsForm : Form |
12 | public partial class SettingsForm : Form |
|
13 | { |
13 | { |
|
14 | #region Public Events & Delegates |
14 | #region Public Events & Delegates |
|
15 | |
15 | |
|
16 | public event EventHandler<SettingsSavedEventArgs> Save; |
16 | public event EventHandler<SettingsSavedEventArgs> Save; |
|
17 | |
17 | |
|
18 | #endregion |
18 | #endregion |
|
19 | |
19 | |
|
20 | #region Private Delegates, Events, Enums, Properties, Indexers and Fields |
20 | #region Private Delegates, Events, Enums, Properties, Indexers and Fields |
|
21 | |
21 | |
|
22 | private readonly BindingSource _announcementBindingSource; |
22 | private readonly BindingSource _announcementBindingSource; |
|
23 | |
23 | |
|
24 | private Announcements.Announcements _announcements; |
24 | private Announcements.Announcements _announcements; |
|
25 | |
25 | |
|
26 | private readonly BindingSource _serverBindingSource; |
26 | private readonly BindingSource _serverBindingSource; |
|
27 | |
27 | |
|
28 | private Servers.Servers _servers; |
28 | private Servers.Servers _servers; |
|
29 | |
29 | |
|
30 | private Announcement _announcement; |
30 | private Announcement _announcement; |
|
31 | |
31 | |
|
32 | private Server _server; |
32 | private Server _server; |
|
33 | private readonly MainForm _mainForm; |
33 | private readonly MainForm _mainForm; |
|
34 | private readonly CancellationToken _cancellationToken; |
34 | private readonly CancellationToken _cancellationToken; |
|
35 | private readonly BindingSource _configurationBindingSource; |
35 | private readonly BindingSource _configurationBindingSource; |
|
36 | private readonly BindingSource _configurationProxyBindingSource; |
36 | private readonly BindingSource _configurationProxyBindingSource; |
|
37 | |
37 | |
|
38 | #endregion |
38 | #endregion |
|
39 | |
39 | |
|
40 | #region Constructors, Destructors and Finalizers |
40 | #region Constructors, Destructors and Finalizers |
|
41 | |
41 | |
|
42 | public SettingsForm() |
42 | public SettingsForm() |
|
43 | { |
43 | { |
|
44 | InitializeComponent(); |
44 | InitializeComponent(); |
|
45 | |
45 | |
|
46 | Utilities.WindowState.FormTracker.Track(this); |
46 | Utilities.WindowState.FormTracker.Track(this); |
|
47 | } |
47 | } |
|
48 | |
48 | |
|
49 | public SettingsForm(MainForm mainForm, Servers.Servers servers, Announcements.Announcements announcements, |
49 | public SettingsForm(MainForm mainForm, Servers.Servers servers, Announcements.Announcements announcements, |
|
50 | CancellationToken cancellationToken) : this() |
50 | CancellationToken cancellationToken) : this() |
|
51 | { |
51 | { |
|
52 | _mainForm = mainForm; |
52 | _mainForm = mainForm; |
|
53 | _servers = servers; |
53 | _servers = servers; |
|
54 | _announcements = announcements; |
54 | _announcements = announcements; |
|
55 | _cancellationToken = cancellationToken; |
55 | _cancellationToken = cancellationToken; |
|
56 | |
56 | |
|
57 | _configurationBindingSource = new BindingSource(); |
57 | _configurationBindingSource = new BindingSource(); |
|
58 | _configurationBindingSource.DataSource = _mainForm.Configuration; |
58 | _configurationBindingSource.DataSource = _mainForm.Configuration; |
|
59 | |
59 | |
|
60 | _configurationProxyBindingSource = new BindingSource(); |
60 | _configurationProxyBindingSource = new BindingSource(); |
|
61 | _configurationProxyBindingSource.DataSource = _mainForm.Configuration.Proxy; |
61 | _configurationProxyBindingSource.DataSource = _mainForm.Configuration.Proxy; |
|
62 | |
62 | |
|
63 | switch (_servers?.Server == null) |
63 | switch (_servers?.Server == null) |
|
64 | { |
64 | { |
|
65 | case true: |
65 | case true: |
|
66 | _servers = new Servers.Servers(); |
66 | _servers = new Servers.Servers(); |
|
67 | _server = new Server(); |
67 | _server = new Server(); |
|
68 | _servers.Server.Add(_server); |
68 | _servers.Server.Add(_server); |
|
69 | break; |
69 | break; |
|
70 | default: |
70 | default: |
|
71 | _server = _servers.Server.FirstOrDefault(); |
71 | _server = _servers.Server.FirstOrDefault(); |
|
72 | if (_server == null) |
72 | if (_server == null) |
|
73 | { |
73 | { |
|
74 | _server = new Server(); |
74 | _server = new Server(); |
|
75 | _servers.Server.Add(_server); |
75 | _servers.Server.Add(_server); |
|
76 | } |
76 | } |
|
77 | break; |
77 | break; |
|
78 | } |
78 | } |
|
79 | |
79 | |
|
80 | _serverBindingSource = new BindingSource(); |
80 | _serverBindingSource = new BindingSource(); |
|
81 | _serverBindingSource.DataSource = _server; |
81 | _serverBindingSource.DataSource = _server; |
|
82 | |
82 | |
|
83 | switch (_announcements?.Announcement == null) |
83 | switch (_announcements?.Announcement == null) |
|
84 | { |
84 | { |
|
85 | case true: |
85 | case true: |
|
86 | _announcements = new Announcements.Announcements(); |
86 | _announcements = new Announcements.Announcements(); |
|
87 | _announcement = new Announcement(); |
87 | _announcement = new Announcement(); |
|
88 | _announcements.Announcement.Add(_announcement); |
88 | _announcements.Announcement.Add(_announcement); |
|
89 | break; |
89 | break; |
|
90 | default: |
90 | default: |
|
91 | _announcement = _announcements.Announcement.FirstOrDefault(); |
91 | _announcement = _announcements.Announcement.FirstOrDefault(); |
|
92 | if (_announcement == null) |
92 | if (_announcement == null) |
|
93 | { |
93 | { |
|
94 | _announcement = new Announcement(); |
94 | _announcement = new Announcement(); |
|
95 | _announcements.Announcement.Add(_announcement); |
95 | _announcements.Announcement.Add(_announcement); |
|
96 | } |
96 | } |
|
97 | break; |
97 | break; |
|
98 | } |
98 | } |
|
99 | |
99 | |
|
100 | _announcementBindingSource = new BindingSource(); |
100 | _announcementBindingSource = new BindingSource(); |
|
101 | _announcementBindingSource.DataSource = _announcement; |
101 | _announcementBindingSource.DataSource = _announcement; |
|
102 | } |
102 | } |
|
103 | |
103 | |
|
104 | #endregion |
104 | #endregion |
|
105 | |
105 | |
|
106 | #region Event Handlers |
106 | #region Event Handlers |
|
107 | |
107 | |
|
108 | private void Button1_Click(object sender, EventArgs e) |
108 | private void Button1_Click(object sender, EventArgs e) |
|
109 | { |
109 | { |
|
110 | var server = new Server(); |
110 | var server = new Server(); |
|
111 | server.Name = "New Server"; |
111 | server.Name = "New Server"; |
|
112 | |
112 | |
|
113 | _servers.Server.Add(server); |
113 | _servers.Server.Add(server); |
|
114 | _serverBindingSource.DataSource = server; |
114 | _serverBindingSource.DataSource = server; |
|
115 | |
115 | |
|
116 | Save?.Invoke(this, new SettingsSavedEventArgs(_servers, _announcements)); |
116 | Save?.Invoke(this, new SettingsSavedEventArgs(_servers, _announcements)); |
|
117 | |
117 | |
|
118 | listBox1.SelectedItem = server; |
118 | listBox1.SelectedItem = server; |
|
119 | } |
119 | } |
|
120 | |
120 | |
|
121 | private void Button2_Click(object sender, EventArgs e) |
121 | private void Button2_Click(object sender, EventArgs e) |
|
122 | { |
122 | { |
|
123 | var index = -1; |
123 | var index = -1; |
|
124 | |
124 | |
|
125 | if (listBox1.SelectedItem is Server server) |
125 | if (listBox1.SelectedItem is Server server) |
|
126 | { |
126 | { |
|
127 | index = listBox1.Items.IndexOf(server); |
127 | index = listBox1.Items.IndexOf(server); |
|
128 | _servers.Server.Remove(server); |
128 | _servers.Server.Remove(server); |
|
129 | } |
129 | } |
|
130 | |
130 | |
|
131 | if (index >= listBox1.Items.Count) |
131 | if (index >= listBox1.Items.Count) |
|
132 | { |
132 | { |
|
133 | --index; |
133 | --index; |
|
134 | } |
134 | } |
|
135 | |
135 | |
|
136 | listBox1.SelectedIndex = index; |
136 | listBox1.SelectedIndex = index; |
|
137 | } |
137 | } |
|
138 | |
138 | |
|
139 | private void ListBox1_SelectedIndexChanged(object sender, EventArgs e) |
139 | private void ListBox1_SelectedIndexChanged(object sender, EventArgs e) |
|
140 | { |
140 | { |
|
141 | |
141 | |
|
142 | var listBox = (ListBox)sender; |
142 | var listBox = (ListBox)sender; |
|
143 | if (listBox.SelectedIndex == -1) |
143 | if (listBox.SelectedIndex == -1) |
|
144 | { |
144 | { |
|
145 | _serverBindingSource.DataSource = new |
145 | _serverBindingSource.DataSource = new |
|
146 | { Name = string.Empty, Url = string.Empty, Username = string.Empty, Password = string.Empty }; |
146 | { Name = string.Empty, Url = string.Empty, Username = string.Empty, Password = string.Empty }; |
|
147 | return; |
147 | return; |
|
148 | } |
148 | } |
|
149 | |
149 | |
|
150 | if (listBox.SelectedItem is Server server) |
150 | if (listBox.SelectedItem is Server server) |
|
151 | { |
151 | { |
|
152 | _server = server; |
152 | _server = server; |
|
153 | |
153 | |
|
154 | _serverBindingSource.DataSource = _server; |
154 | _serverBindingSource.DataSource = _server; |
|
155 | } |
155 | } |
|
156 | } |
156 | } |
|
157 | |
157 | |
|
158 | private void Button3_Click(object sender, EventArgs e) |
158 | private void Button3_Click(object sender, EventArgs e) |
|
159 | { |
159 | { |
|
160 | if (listBox2.SelectedItem is Announcement announcement) _announcements.Announcement.Remove(announcement); |
160 | if (listBox2.SelectedItem is Announcement announcement) _announcements.Announcement.Remove(announcement); |
|
161 | } |
161 | } |
|
162 | |
162 | |
|
163 | private void Button4_Click(object sender, EventArgs e) |
163 | private void Button4_Click(object sender, EventArgs e) |
|
164 | { |
164 | { |
|
165 | var announcement = new Announcement(); |
165 | var announcement = new Announcement(); |
|
166 | if (int.TryParse(appIdTextBox.Text, out var appId)) announcement.AppId = appId; |
166 | if (int.TryParse(appIdTextBox.Text, out var appId)) announcement.AppId = appId; |
|
167 | |
167 | |
|
168 | if (int.TryParse(lingerTimeTextBox.Text, out var lingerTime)) announcement.LingerTime = lingerTime; |
168 | if (int.TryParse(lingerTimeTextBox.Text, out var lingerTime)) announcement.LingerTime = lingerTime; |
|
169 | |
169 | |
|
170 | _announcements.Announcement.Add(announcement); |
170 | _announcements.Announcement.Add(announcement); |
|
171 | |
171 | |
|
172 | Save?.Invoke(this, new SettingsSavedEventArgs(_servers, _announcements)); |
172 | Save?.Invoke(this, new SettingsSavedEventArgs(_servers, _announcements)); |
|
173 | |
173 | |
|
174 | listBox2.SelectedItem = announcement; |
174 | listBox2.SelectedItem = announcement; |
|
175 | } |
175 | } |
|
176 | |
176 | |
|
177 | private void ListBox2_SelectedIndexChanged(object sender, EventArgs e) |
177 | private void ListBox2_SelectedIndexChanged(object sender, EventArgs e) |
|
178 | { |
178 | { |
|
179 | var listBox = (ListBox)sender; |
179 | var listBox = (ListBox)sender; |
|
180 | |
180 | |
|
181 | if (listBox.SelectedItem is Announcement announcement) |
181 | if (listBox.SelectedItem is Announcement announcement) |
|
182 | { |
182 | { |
|
183 | _announcement = announcement; |
183 | _announcement = announcement; |
|
184 | |
184 | |
|
185 | _announcementBindingSource.DataSource = _announcement; |
185 | _announcementBindingSource.DataSource = _announcement; |
|
186 | } |
186 | } |
|
187 | } |
187 | } |
|
188 | |
188 | |
|
189 | private void Button6_Click(object sender, EventArgs e) |
189 | private void Button6_Click(object sender, EventArgs e) |
|
190 | { |
190 | { |
|
191 | Close(); |
191 | Close(); |
|
192 | } |
192 | } |
|
193 | |
193 | |
|
194 | private void Button5_Click(object sender, EventArgs e) |
194 | private void Button5_Click(object sender, EventArgs e) |
|
195 | { |
195 | { |
|
196 | Save?.Invoke(this, new SettingsSavedEventArgs(_servers, _announcements)); |
196 | Save?.Invoke(this, new SettingsSavedEventArgs(_servers, _announcements)); |
|
197 | |
197 | |
|
198 | Close(); |
198 | Close(); |
|
199 | } |
199 | } |
|
200 | |
200 | |
|
201 | #endregion |
201 | #endregion |
|
202 | |
202 | |
|
203 | private void checkBox4_CheckedStateChanged(object sender, EventArgs e) |
203 | private void checkBox4_CheckedStateChanged(object sender, EventArgs e) |
|
204 | { |
204 | { |
|
205 | var checkBox = (CheckBox)sender; |
205 | var checkBox = (CheckBox)sender; |
|
206 | var state = checkBox.Checked; |
206 | var state = checkBox.Checked; |
|
207 | if (state) |
207 | if (state) |
|
208 | { |
208 | { |
|
209 | ToggleTableRow(tableLayoutPanel13, 0, false); |
209 | ToggleTableRow(tableLayoutPanel13, 0, false); |
|
210 | |
210 | |
|
211 | return; |
211 | return; |
|
212 | } |
212 | } |
|
213 | |
213 | |
|
214 | ToggleTableRow(tableLayoutPanel13, 0, true); |
214 | ToggleTableRow(tableLayoutPanel13, 0, true); |
|
215 | } |
215 | } |
|
216 | |
216 | |
|
217 | private static void ToggleTableRow(TableLayoutPanel tableLayoutPanel, int row, bool enable) |
217 | private static void ToggleTableRow(TableLayoutPanel tableLayoutPanel, int row, bool enable) |
|
218 | { |
218 | { |
|
219 | var count = tableLayoutPanel.RowCount; |
219 | var count = tableLayoutPanel.RowCount; |
|
220 | foreach (var i in Enumerable.Range(0, count)) |
220 | foreach (var i in Enumerable.Range(0, count)) |
|
221 | { |
221 | { |
|
222 | var control = tableLayoutPanel.GetControlFromPosition(i, row); |
222 | var control = tableLayoutPanel.GetControlFromPosition(i, row); |
|
223 | control.Enabled = enable; |
223 | control.Enabled = enable; |
|
224 | } |
224 | } |
|
225 | } |
225 | } |
|
226 | |
226 | |
|
227 | private void SettingsForm_Load(object sender, EventArgs e) |
227 | private void SettingsForm_Load(object sender, EventArgs e) |
|
228 | { |
228 | { |
|
229 | // Databindings. |
229 | // Databindings. |
|
- | 230 | trackBar1.DataBindings.Add(new Binding("Value", _configurationBindingSource, |
||
- | 231 | nameof(_mainForm.Configuration.RetrievePastNotificationHours), true, |
||
- | 232 | DataSourceUpdateMode.OnPropertyChanged)); |
||
- | 233 | |
||
- | 234 | textBox4.DataBindings.Add(new Binding("Text", _configurationBindingSource, |
||
- | 235 | nameof(_mainForm.Configuration.RetrievePastNotificationHours), true, |
||
- | 236 | DataSourceUpdateMode.OnPropertyChanged)); |
||
- | 237 | |
||
230 | numericUpDown1.DataBindings.Add(new Binding("Value", _configurationBindingSource, |
238 | numericUpDown1.DataBindings.Add(new Binding("Value", _configurationBindingSource, |
|
231 | nameof(_mainForm.Configuration.ToastDuration), true, |
239 | nameof(_mainForm.Configuration.ToastDuration), true, |
|
232 | DataSourceUpdateMode.OnPropertyChanged)); |
240 | DataSourceUpdateMode.OnPropertyChanged)); |
|
233 | |
241 | |
|
234 | checkBox4.DataBindings.Add( |
242 | checkBox4.DataBindings.Add( |
|
235 | new Binding("Checked", _configurationBindingSource, nameof(_mainForm.Configuration.InfiniteToastDuration), true, |
243 | new Binding("Checked", _configurationBindingSource, nameof(_mainForm.Configuration.InfiniteToastDuration), true, |
|
236 | DataSourceUpdateMode.OnPropertyChanged)); |
244 | DataSourceUpdateMode.OnPropertyChanged)); |
|
237 | |
245 | |
|
238 | checkBox1.DataBindings.Add(new Binding("Checked", _configurationBindingSource, |
246 | checkBox1.DataBindings.Add(new Binding("Checked", _configurationBindingSource, |
|
239 | nameof(_mainForm.Configuration.LaunchOnBoot), true, DataSourceUpdateMode.OnPropertyChanged)); |
247 | nameof(_mainForm.Configuration.LaunchOnBoot), true, DataSourceUpdateMode.OnPropertyChanged)); |
|
240 | |
248 | |
|
241 | checkBox2.DataBindings.Add(new Binding("Checked", _configurationBindingSource, |
249 | checkBox2.DataBindings.Add(new Binding("Checked", _configurationBindingSource, |
|
242 | nameof(_mainForm.Configuration.IgnoreSelfSignedCertificates), true, |
250 | nameof(_mainForm.Configuration.IgnoreSelfSignedCertificates), true, |
|
243 | DataSourceUpdateMode.OnPropertyChanged)); |
251 | DataSourceUpdateMode.OnPropertyChanged)); |
|
244 | |
252 | |
|
245 | checkBox3.DataBindings.Add( |
253 | checkBox3.DataBindings.Add( |
|
246 | new Binding("Checked", _configurationProxyBindingSource, nameof(_mainForm.Configuration.Proxy.Enable), true, |
254 | new Binding("Checked", _configurationProxyBindingSource, nameof(_mainForm.Configuration.Proxy.Enable), true, |
|
247 | DataSourceUpdateMode.OnPropertyChanged)); |
255 | DataSourceUpdateMode.OnPropertyChanged)); |
|
248 | textBox1.DataBindings.Add( |
256 | textBox1.DataBindings.Add( |
|
249 | new Binding("Text", _configurationProxyBindingSource, nameof(_mainForm.Configuration.Proxy.Url), true, |
257 | new Binding("Text", _configurationProxyBindingSource, nameof(_mainForm.Configuration.Proxy.Url), true, |
|
250 | DataSourceUpdateMode.OnPropertyChanged)); |
258 | DataSourceUpdateMode.OnPropertyChanged)); |
|
251 | textBox2.DataBindings.Add( |
259 | textBox2.DataBindings.Add( |
|
252 | new Binding("Text", _configurationProxyBindingSource, nameof(_mainForm.Configuration.Proxy.Username), true, |
260 | new Binding("Text", _configurationProxyBindingSource, nameof(_mainForm.Configuration.Proxy.Username), true, |
|
253 | DataSourceUpdateMode.OnPropertyChanged)); |
261 | DataSourceUpdateMode.OnPropertyChanged)); |
|
254 | textBox3.DataBindings.Add( |
262 | textBox3.DataBindings.Add( |
|
255 | new Binding("Text", _configurationProxyBindingSource, nameof(_mainForm.Configuration.Proxy.Password), true, |
263 | new Binding("Text", _configurationProxyBindingSource, nameof(_mainForm.Configuration.Proxy.Password), true, |
|
256 | DataSourceUpdateMode.OnPropertyChanged)); |
264 | DataSourceUpdateMode.OnPropertyChanged)); |
|
257 | |
265 | |
|
258 | serverNameTextBox.DataBindings.Add(new Binding("Text", _serverBindingSource, nameof(_server.Name), true, |
266 | serverNameTextBox.DataBindings.Add(new Binding("Text", _serverBindingSource, nameof(_server.Name), true, |
|
259 | DataSourceUpdateMode.OnPropertyChanged)); |
267 | DataSourceUpdateMode.OnPropertyChanged)); |
|
260 | serverUrlTextBox.DataBindings.Add(new Binding("Text", _serverBindingSource, nameof(_server.Url), true, |
268 | serverUrlTextBox.DataBindings.Add(new Binding("Text", _serverBindingSource, nameof(_server.Url), true, |
|
261 | DataSourceUpdateMode.OnPropertyChanged)); |
269 | DataSourceUpdateMode.OnPropertyChanged)); |
|
262 | serverUsernameTextBox.DataBindings.Add(new Binding("Text", _serverBindingSource, nameof(_server.Username), |
270 | serverUsernameTextBox.DataBindings.Add(new Binding("Text", _serverBindingSource, nameof(_server.Username), |
|
263 | true, |
271 | true, |
|
264 | DataSourceUpdateMode.OnPropertyChanged)); |
272 | DataSourceUpdateMode.OnPropertyChanged)); |
|
265 | serverPasswordTextBox.DataBindings.Add(new Binding("Text", _serverBindingSource, nameof(_server.Password), |
273 | serverPasswordTextBox.DataBindings.Add(new Binding("Text", _serverBindingSource, nameof(_server.Password), |
|
266 | true, |
274 | true, |
|
267 | DataSourceUpdateMode.OnPropertyChanged)); |
275 | DataSourceUpdateMode.OnPropertyChanged)); |
|
268 | |
276 | |
|
269 | listBox1.DataSource = _servers.Server; |
277 | listBox1.DataSource = _servers.Server; |
|
270 | listBox1.DisplayMember = "Name"; |
278 | listBox1.DisplayMember = "Name"; |
|
271 | listBox1.DataBindings.Add(new Binding("Text", _servers.Server, "Name", true, |
279 | listBox1.DataBindings.Add(new Binding("Text", _servers.Server, "Name", true, |
|
272 | DataSourceUpdateMode.OnPropertyChanged)); |
280 | DataSourceUpdateMode.OnPropertyChanged)); |
|
273 | |
281 | |
|
274 | appIdTextBox.DataBindings.Add(new Binding("Text", _announcementBindingSource, nameof(_announcement.AppId), |
282 | appIdTextBox.DataBindings.Add(new Binding("Text", _announcementBindingSource, nameof(_announcement.AppId), |
|
275 | true, |
283 | true, |
|
276 | DataSourceUpdateMode.OnPropertyChanged)); |
284 | DataSourceUpdateMode.OnPropertyChanged)); |
|
277 | lingerTimeTextBox.DataBindings.Add(new Binding("Text", _announcementBindingSource, |
285 | lingerTimeTextBox.DataBindings.Add(new Binding("Text", _announcementBindingSource, |
|
278 | nameof(_announcement.LingerTime), true, |
286 | nameof(_announcement.LingerTime), true, |
|
279 | DataSourceUpdateMode.OnPropertyChanged)); |
287 | DataSourceUpdateMode.OnPropertyChanged)); |
|
280 | |
288 | |
|
281 | listBox2.DataSource = _announcements.Announcement; |
289 | listBox2.DataSource = _announcements.Announcement; |
|
282 | listBox2.DisplayMember = "Id"; |
290 | listBox2.DisplayMember = "Id"; |
|
283 | listBox2.DataBindings.Add(new Binding("Text", _announcements.Announcement, "Id", true, |
291 | listBox2.DataBindings.Add(new Binding("Text", _announcements.Announcement, "Id", true, |
|
284 | DataSourceUpdateMode.OnPropertyChanged)); |
292 | DataSourceUpdateMode.OnPropertyChanged)); |
|
285 | |
293 | |
|
286 | // Miscellaneous. |
294 | // Miscellaneous. |
|
287 | ToggleTableRow(tableLayoutPanel13, 0, !_mainForm.Configuration.InfiniteToastDuration); |
295 | ToggleTableRow(tableLayoutPanel13, 0, !_mainForm.Configuration.InfiniteToastDuration); |
|
288 | } |
296 | } |
|
- | 297 | |
||
- | 298 | private void trackBar1_ValueChanged(object sender, EventArgs e) |
||
- | 299 | { |
||
- | 300 | |
||
- | 301 | } |
||
289 | } |
302 | } |
|
290 | } |
303 | } |
|
291 | |
304 | |
|
292 |
|
305 |
|
|
293 | |
306 | |
|
294 | |
307 | |
|
295 | |
308 | |