Mercurial > repos > WarFoundryForge
annotate FrmSystem.cs @ 12:6284c091b132
Merge local with IBBoard
author | Tsudico |
---|---|
date | Fri, 17 Dec 2010 22:14:43 -0600 |
parents | 43d88f50c712 |
children | 372f921c20fc |
rev | line source |
---|---|
0 | 1 using System; |
2 using System.Collections.Generic; | |
3 using System.ComponentModel; | |
4 using System.Data; | |
5 using System.Drawing; | |
6 using System.Text; | |
7 using System.Text.RegularExpressions; | |
8 using System.Windows.Forms; | |
9 using IBBoard.Lang; | |
10 using IBBoard.Windows.Forms; | |
11 using IBBoard.Windows.Forms.I18N; | |
12 | |
13 namespace IBBoard.WarFoundry.Forge.WinForms | |
14 { | |
15 public partial class FrmSystem : IBBoard.Windows.Forms.IBBForm | |
16 { | |
4
866d0093bb11
WarFoundryLoader.GetDefault().LoadFile returning null object.
Tsudico
parents:
0
diff
changeset
|
17 private IBBoard.WarFoundry.API.Objects.GameSystem system; |
866d0093bb11
WarFoundryLoader.GetDefault().LoadFile returning null object.
Tsudico
parents:
0
diff
changeset
|
18 |
8 | 19 private bool UpdateCategory |
20 { | |
21 get | |
22 { | |
23 if(this.listCategories.SelectedIndex >= 0) | |
24 { | |
25 foreach(IBBoard.WarFoundry.API.Objects.Category cat in system.Categories) | |
26 { | |
27 if(cat.Name == this.listCategories.SelectedItem) | |
28 { | |
29 if(cat.Name != this.txtCategoryName.Text) | |
30 { | |
31 return true; | |
32 } | |
33 if(cat.ID != this.txtCategoryID.Text) | |
34 { | |
35 return true; | |
36 } | |
37 if(cat.MinimumPoints > 0 && !this.cbPointMin.Checked) | |
38 { | |
39 return true; | |
40 } | |
41 else if(cat.MinimumPoints != this.numPointMin.Value) | |
42 { | |
43 return true; | |
44 } | |
45 if(cat.MaximumPoints < this.numPointMax.Maximum && !this.cbPointMax.Checked) | |
46 { | |
47 return true; | |
48 } | |
49 else if(cat.MaximumPoints != this.numPointMax.Value) | |
50 { | |
51 return true; | |
52 } | |
53 if(cat.MinimumPercentage > 0 && !this.cbPercentMin.Checked) | |
54 { | |
55 return true; | |
56 } | |
57 else if(cat.MinimumPercentage != this.numPercentMin.Value) | |
58 { | |
59 return true; | |
60 } | |
61 if(cat.MaximumPercentage < this.numPercentMax.Maximum && !this.cbPercentMax.Checked) | |
62 { | |
63 return true; | |
64 } | |
65 else if(cat.MaximumPercentage != this.numPercentMax.Value) | |
66 { | |
67 return true; | |
68 } | |
69 } | |
70 } | |
71 } | |
72 return false; | |
73 } | |
74 } | |
75 | |
4
866d0093bb11
WarFoundryLoader.GetDefault().LoadFile returning null object.
Tsudico
parents:
0
diff
changeset
|
76 public FrmSystem(IBBoard.WarFoundry.API.Objects.GameSystem loadSystem) |
0 | 77 { |
78 InitializeComponent(); | |
4
866d0093bb11
WarFoundryLoader.GetDefault().LoadFile returning null object.
Tsudico
parents:
0
diff
changeset
|
79 system = loadSystem; |
6
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
80 this.txtSystemName.Text = system.Name; |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
81 this.txtSystemId.Text = system.ID; |
8 | 82 this.numDefaultSize.Value = system.SystemArmyDefaultSize; |
83 this.numPointMax.Value = this.numDefaultSize.Value; | |
6
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
84 if(system.AllowAllies) |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
85 { |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
86 this.radSystemAlliesYes.Checked = true; |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
87 } |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
88 else |
4
866d0093bb11
WarFoundryLoader.GetDefault().LoadFile returning null object.
Tsudico
parents:
0
diff
changeset
|
89 { |
6
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
90 this.radSystemAlliesNo.Checked = true; |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
91 } |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
92 if (system.WarnOnError) |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
93 { |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
94 this.radSystemWarnYes.Checked = true; |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
95 } |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
96 else |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
97 { |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
98 this.radSystemWarnNo.Checked = true; |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
99 } |
8 | 100 updateCategoryList(); |
0 | 101 } |
6
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
102 |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
103 private string generateID(string name) |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
104 { |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
105 string newId = String.Empty; |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
106 |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
107 MatchCollection id_parts = Regex.Matches(name, @"[A-Z\d]"); |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
108 foreach (Match part in id_parts) |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
109 { |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
110 newId += part.ToString(); |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
111 } |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
112 |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
113 if (newId.Length < 3) |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
114 { |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
115 newId = name.ToLower().Replace(" ", ""); |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
116 } |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
117 |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
118 return newId.ToLower(); |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
119 } |
8 | 120 |
121 private void clearCategory() | |
122 { | |
123 this.txtCategoryName.Text = string.Empty; | |
124 this.txtCategoryID.Text = string.Empty; | |
125 this.cbPointMin.Checked = false; | |
126 this.cbPointMax.Checked = false; | |
127 this.cbPercentMin.Checked = false; | |
128 this.cbPercentMax.Checked = false; | |
129 this.numPointMin.Value = 0; | |
130 this.numPointMin.Enabled = false; | |
131 this.numPointMax.Value = this.numDefaultSize.Value; | |
132 this.numPointMax.Enabled = false; | |
133 this.numPercentMin.Value = 0; | |
134 this.numPercentMin.Enabled = false; | |
135 this.numPercentMax.Value = 100; | |
136 this.numPercentMax.Enabled = false; | |
137 } | |
138 | |
139 private void updateCategoryList() | |
140 { | |
141 if (system.Categories.Length > 0) | |
142 { | |
143 this.listCategories.Items.Clear(); | |
144 for (int i = 0; i < system.Categories.Length; i++) | |
145 { | |
146 this.listCategories.Items.Add(system.Categories[i].Name); | |
147 } | |
148 } | |
149 } | |
0 | 150 |
151 private void btnSystemClose_Click(object sender, EventArgs e) | |
152 { | |
153 this.Close(); | |
154 } | |
155 | |
156 private void btnGenerateSysId_Click(object sender, EventArgs e) | |
157 { | |
6
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
158 this.txtSystemId.Text = generateID(this.txtSystemName.Text); |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
159 } |
0 | 160 |
8 | 161 private void listCategories_SelectedIndexChanged(object sender, EventArgs e) |
162 { | |
163 foreach (IBBoard.WarFoundry.API.Objects.Category cat in system.Categories) | |
164 { | |
165 if (cat.Name == this.listCategories.SelectedItem) | |
166 { | |
167 this.txtCategoryName.Text = cat.Name; | |
168 this.txtCategoryID.Text = cat.ID; | |
169 if (cat.MinimumPoints > 0) | |
170 { | |
171 this.numPointMin.Value = cat.MinimumPoints; | |
172 this.cbPointMin.Checked = true; | |
173 this.numPointMin.Enabled = true; | |
174 } | |
175 else | |
176 { | |
177 this.numPointMin.Enabled = false; | |
178 } | |
179 if (cat.MaximumPoints > 0 && cat.MaximumPoints < this.numPercentMax.Maximum) | |
180 { | |
181 this.numPointMax.Value = cat.MaximumPoints; | |
182 this.cbPointMax.Checked = true; | |
183 this.numPointMax.Enabled = true; | |
184 } | |
185 else | |
186 { | |
187 this.numPointMax.Value = this.numDefaultSize.Value; | |
188 this.numPointMax.Enabled = false; | |
189 } | |
190 if (cat.MinimumPercentage > 0) | |
191 { | |
192 this.numPercentMin.Value = cat.MinimumPercentage; | |
193 this.cbPercentMin.Checked = true; | |
194 this.numPercentMin.Enabled = true; | |
195 } | |
196 else | |
197 { | |
198 this.numPercentMin.Enabled = false; | |
199 } | |
200 if (cat.MaximumPercentage < 100) | |
201 { | |
202 this.numPercentMax.Value = cat.MaximumPercentage; | |
203 this.cbPercentMax.Checked = true; | |
204 this.numPercentMax.Enabled = true; | |
205 } | |
206 else | |
207 { | |
208 this.numPercentMax.Enabled = false; | |
209 } | |
210 this.btnCategoryApply.Enabled = false; | |
211 break; | |
212 } | |
213 } | |
10 | 214 if(this.listCategories.SelectedIndex == 0) |
215 { | |
216 this.btnCategoryUp.Enabled = false; | |
217 } | |
218 else | |
219 { | |
220 this.btnCategoryUp.Enabled = true; | |
221 } | |
222 if (this.listCategories.SelectedIndex == this.listCategories.Items.Count - 1) | |
223 { | |
224 this.btnCategoryDown.Enabled = false; | |
225 } | |
226 else | |
227 { | |
228 this.btnCategoryDown.Enabled = true; | |
229 } | |
8 | 230 } |
231 | |
6
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
232 private void btnCategoryAdd_Click(object sender, EventArgs e) |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
233 { |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
234 if(this.txtCategoryName.Text == string.Empty) |
0 | 235 { |
6
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
236 MessageBox.Show("Category must have a name", "Category Error"); |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
237 return; |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
238 } |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
239 if (this.txtCategoryID.Text == string.Empty) |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
240 { |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
241 MessageBox.Show("Category must have an ID", "Category Error"); |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
242 return; |
0 | 243 } |
6
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
244 IBBoard.WarFoundry.API.Objects.Category cat = new IBBoard.WarFoundry.API.Objects.Category( |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
245 this.txtCategoryID.Text, |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
246 this.txtCategoryName.Text |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
247 ); |
0 | 248 |
6
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
249 cat.MinimumPoints = (int)this.numPointMin.Value; |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
250 cat.MaximumPoints = (int)this.numPointMax.Value; |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
251 cat.MinimumPercentage = (int)this.numPercentMin.Value; |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
252 cat.MaximumPercentage = (int)this.numPercentMax.Value; |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
253 |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
254 system.AddCategory(cat); |
8 | 255 updateCategoryList(); |
256 clearCategory(); | |
6
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
257 } |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
258 |
8 | 259 private void btnCategoryRemove_Click(object sender, EventArgs e) |
6
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
260 { |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
261 foreach(IBBoard.WarFoundry.API.Objects.Category cat in system.Categories) |
0 | 262 { |
6
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
263 if(cat.Name == this.listCategories.SelectedItem) |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
264 { |
8 | 265 system.RemoveCategory(cat.ID); |
266 this.listCategories.ClearSelected(); | |
267 break; | |
6
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
268 } |
0 | 269 } |
8 | 270 updateCategoryList(); |
271 } | |
272 | |
10 | 273 private void btnCategoryUp_Click(object sender, EventArgs e) |
274 { | |
275 int index = this.listCategories.SelectedIndex; | |
276 IBBoard.WarFoundry.API.Objects.Category[] catList = new IBBoard.WarFoundry.API.Objects.Category[this.listCategories.Items.Count]; | |
277 | |
278 for(int i = 0; i < system.Categories.Length; i++) | |
279 { | |
280 catList[i] = system.Categories[i]; | |
281 } | |
282 foreach(IBBoard.WarFoundry.API.Objects.Category cat in system.Categories) | |
283 { | |
284 system.RemoveCategory(cat.ID); | |
285 } | |
286 | |
287 IBBoard.WarFoundry.API.Objects.Category temp = catList[index]; | |
288 catList[index] = catList[index - 1]; | |
289 catList[index - 1] = temp; | |
290 | |
291 for(int i = catList.Length - 1; i >= 0; i--) | |
292 { | |
293 system.AddCategory(catList[i]); | |
294 } | |
295 | |
296 updateCategoryList(); | |
297 this.listCategories.SelectedIndex = index - 1; | |
298 } | |
299 | |
300 private void btnCategoryDown_Click(object sender, EventArgs e) | |
301 { | |
302 int index = this.listCategories.SelectedIndex; | |
303 IBBoard.WarFoundry.API.Objects.Category[] catList = new IBBoard.WarFoundry.API.Objects.Category[this.listCategories.Items.Count]; | |
304 | |
305 for (int i = 0; i < system.Categories.Length; i++) | |
306 { | |
307 catList[i] = system.Categories[i]; | |
308 } | |
309 foreach (IBBoard.WarFoundry.API.Objects.Category cat in system.Categories) | |
310 { | |
311 system.RemoveCategory(cat.ID); | |
312 } | |
313 | |
314 IBBoard.WarFoundry.API.Objects.Category temp = catList[index]; | |
315 catList[index] = catList[index + 1]; | |
316 catList[index + 1] = temp; | |
317 | |
318 for (int i = catList.Length - 1; i >= 0; i--) | |
319 { | |
320 system.AddCategory(catList[i]); | |
321 } | |
322 | |
323 updateCategoryList(); | |
324 this.listCategories.SelectedIndex = index + 1; | |
325 } | |
326 | |
8 | 327 private void txtCategoryName_TextChanged(object sender, EventArgs e) |
328 { | |
329 if (this.UpdateCategory) | |
330 { | |
331 this.btnCategoryApply.Enabled = true; | |
332 } | |
333 else | |
334 { | |
335 this.btnCategoryApply.Enabled = false; | |
336 } | |
337 } | |
338 | |
339 private void txtCategoryID_TextChanged(object sender, EventArgs e) | |
340 { | |
341 if (this.UpdateCategory) | |
342 { | |
343 this.btnCategoryApply.Enabled = true; | |
344 } | |
345 else | |
346 { | |
347 this.btnCategoryApply.Enabled = false; | |
348 } | |
6
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
349 } |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
350 |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
351 private void btnGenerateCatID_Click(object sender, EventArgs e) |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
352 { |
d63df495cf5a
Implemented initial support for adding and editing categories.
Tsudico
parents:
4
diff
changeset
|
353 this.txtCategoryID.Text = generateID(this.txtCategoryName.Text); |
0 | 354 } |
8 | 355 |
356 private void cbPointMin_CheckedChanged(object sender, EventArgs e) | |
357 { | |
358 if(this.cbPointMin.Checked) | |
359 { | |
360 this.numPointMin.Enabled = true; | |
361 } | |
362 else | |
363 { | |
364 this.numPointMin.Enabled = false; | |
365 } | |
366 if(this.UpdateCategory) | |
367 { | |
368 this.btnCategoryApply.Enabled = true; | |
369 } | |
370 else | |
371 { | |
372 this.btnCategoryApply.Enabled = false; | |
373 } | |
374 } | |
375 | |
376 private void cbPointMax_CheckedChanged(object sender, EventArgs e) | |
377 { | |
378 if (this.cbPointMax.Checked) | |
379 { | |
380 this.numPointMax.Enabled = true; | |
381 } | |
382 else | |
383 { | |
384 this.numPointMax.Enabled = false; | |
385 } | |
386 if (this.UpdateCategory) | |
387 { | |
388 this.btnCategoryApply.Enabled = true; | |
389 } | |
390 else | |
391 { | |
392 this.btnCategoryApply.Enabled = false; | |
393 } | |
394 } | |
395 | |
396 private void cbPercentMin_CheckedChanged(object sender, EventArgs e) | |
397 { | |
398 if (this.cbPercentMin.Checked) | |
399 { | |
400 this.numPercentMin.Enabled = true; | |
401 } | |
402 else | |
403 { | |
404 this.numPercentMin.Enabled = false; | |
405 } | |
406 if (this.UpdateCategory) | |
407 { | |
408 this.btnCategoryApply.Enabled = true; | |
409 } | |
410 else | |
411 { | |
412 this.btnCategoryApply.Enabled = false; | |
413 } | |
414 } | |
415 | |
416 private void cbPercentMax_CheckedChanged(object sender, EventArgs e) | |
417 { | |
418 if (this.cbPercentMax.Checked) | |
419 { | |
420 this.numPercentMax.Enabled = true; | |
421 } | |
422 else | |
423 { | |
424 this.numPercentMax.Enabled = false; | |
425 } | |
426 if (this.UpdateCategory) | |
427 { | |
428 this.btnCategoryApply.Enabled = true; | |
429 } | |
430 else | |
431 { | |
432 this.btnCategoryApply.Enabled = false; | |
433 } | |
434 } | |
435 | |
436 private void numPointMin_ValueChanged(object sender, EventArgs e) | |
437 { | |
438 if (this.UpdateCategory) | |
439 { | |
440 this.btnCategoryApply.Enabled = true; | |
441 } | |
442 else | |
443 { | |
444 this.btnCategoryApply.Enabled = false; | |
445 } | |
446 } | |
447 | |
448 private void numPointMax_ValueChanged(object sender, EventArgs e) | |
449 { | |
450 if (this.UpdateCategory) | |
451 { | |
452 this.btnCategoryApply.Enabled = true; | |
453 } | |
454 else | |
455 { | |
456 this.btnCategoryApply.Enabled = false; | |
457 } | |
458 } | |
459 | |
460 private void numPercentMin_ValueChanged(object sender, EventArgs e) | |
461 { | |
462 if (this.UpdateCategory) | |
463 { | |
464 this.btnCategoryApply.Enabled = true; | |
465 } | |
466 else | |
467 { | |
468 this.btnCategoryApply.Enabled = false; | |
469 } | |
470 } | |
471 | |
472 private void numPercentMax_ValueChanged(object sender, EventArgs e) | |
473 { | |
474 if (this.UpdateCategory) | |
475 { | |
476 this.btnCategoryApply.Enabled = true; | |
477 } | |
478 else | |
479 { | |
480 this.btnCategoryApply.Enabled = false; | |
481 } | |
482 } | |
0 | 483 } |
484 } |