annotate FrmAddEquipment.cs @ 81:3ff8e10de45a

Re #308: Make GTK# UI translatable * Make menu item/action names match WinForms for consistency * Add "_" to translations for keyboard shortcuts in menus
author IBBoard <dev@ibboard.co.uk>
date Tue, 28 Dec 2010 19:58:00 +0000
parents 7055b24cfc79
children 58779fcd0166
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
51
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 // This file (FrmAddEquipment.cs) is a part of the IBBoard.WarFoundry.GUI.GTK project and is copyright 2010 IBBoard
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 //
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
70
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
4
51
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 using System;
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 70
diff changeset
6 using Gtk;
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 70
diff changeset
7 using IBBoard.GtkSharp;
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 70
diff changeset
8 using IBBoard.GtkSharp.Translatable;
51
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 using IBBoard.WarFoundry.API.Objects;
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 70
diff changeset
10 using IBBoard.WarFoundry.GUI.GTK.UIControl.Interfaces;
52
4bad8cb3f889 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 51
diff changeset
11 using IBBoard.WarFoundry.GUI.GTK.Util;
55
eb7db8495bb5 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 54
diff changeset
12 using log4net;
70
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
13
51
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 namespace IBBoard.WarFoundry.GUI.GTK
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 {
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 70
diff changeset
16 public partial class FrmAddEquipment : TranslatableDialog, IAddEquipmentUI
51
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 {
55
eb7db8495bb5 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 54
diff changeset
18 private static ILog log = LogManager.GetLogger(typeof(FrmAddEquipment));
54
f9f6e9db5350 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 53
diff changeset
19 public event SingleArgMethodInvoker<UnitEquipmentItem> UnitEquipmentItemChoiceChanged;
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 70
diff changeset
20 public event MethodInvoker UnitEquipmentAmountTypeChanged;
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 70
diff changeset
21 public event MethodInvoker UnitEquipmentAmountChanged;
70
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
22
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
23 private bool isRatioLimited;
56
0c5fbb54bfb0 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 55
diff changeset
24
51
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 public FrmAddEquipment()
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 {
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 this.Build();
54
f9f6e9db5350 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 53
diff changeset
28 lstEquipment.Selection.Changed += OnSelectionChanged;
52
4bad8cb3f889 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 51
diff changeset
29 TreeViewColumn equipColumn = new TreeViewColumn();
4bad8cb3f889 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 51
diff changeset
30 equipColumn.Title = "Equipment";
4bad8cb3f889 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 51
diff changeset
31 CellRendererText equipCell = new CellRendererText();
4bad8cb3f889 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 51
diff changeset
32 equipColumn.PackStart(equipCell, true);
4bad8cb3f889 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 51
diff changeset
33 equipColumn.SetCellDataFunc(equipCell, GtkWarFoundryUtil.RenderWarFoundryObjectName);
61
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
34 lstEquipment.AppendColumn(equipColumn);
51
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35 }
54
f9f6e9db5350 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 53
diff changeset
36
61
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
37 private void OnUnitEquipmentAmountChanged()
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
38 {
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
39 if (UnitEquipmentAmountChanged != null)
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
40 {
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
41 UnitEquipmentAmountChanged();
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
42 }
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
43 }
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
44
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
45 private void OnUnitEquipmentAmountTypeChanged()
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
46 {
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
47 if (UnitEquipmentAmountChanged != null)
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
48 {
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
49 UnitEquipmentAmountTypeChanged();
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
50 }
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
51 }
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
52
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
53 protected void OnSelectionChanged(object o, EventArgs e)
54
f9f6e9db5350 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 53
diff changeset
54 {
70
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
55 if (UnitEquipmentItemChoiceChanged != null)
54
f9f6e9db5350 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 53
diff changeset
56 {
57
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
57 UnitEquipmentItemChoiceChanged(SelectedUnitEquipmentItem);
54
f9f6e9db5350 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 53
diff changeset
58 }
f9f6e9db5350 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 53
diff changeset
59 }
51
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
60
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
61 public void SetUnitEquipmentItems(UnitEquipmentItem[] items)
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
62 {
52
4bad8cb3f889 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 51
diff changeset
63 ListStore store = new ListStore(typeof(UnitEquipmentItem));
4bad8cb3f889 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 51
diff changeset
64
4bad8cb3f889 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 51
diff changeset
65 foreach (UnitEquipmentItem equipItem in items)
4bad8cb3f889 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 51
diff changeset
66 {
4bad8cb3f889 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 51
diff changeset
67 store.AppendValues(equipItem);
4bad8cb3f889 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 51
diff changeset
68 }
4bad8cb3f889 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 51
diff changeset
69
4bad8cb3f889 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 51
diff changeset
70 lstEquipment.Model = store;
51
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
71 }
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
72
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
73 public void SetUnitEquipmentLimits(bool isRatioLimit, double minPercent, double maxPercent, int minNumber, int maxNumber)
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
74 {
55
eb7db8495bb5 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 54
diff changeset
75 log.DebugFormat("IsRatio? {0}. Limits: {1}->{2}, {3}%->{4}%", isRatioLimit, minNumber, maxNumber, minPercent, maxPercent);
eb7db8495bb5 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 54
diff changeset
76 numericAmount.SetRange(minNumber, maxNumber);
eb7db8495bb5 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 54
diff changeset
77 percentageAmount.SetRange(minPercent, maxPercent);
61
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
78
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
79 if (isRatioLimit)
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
80 {
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
81 if (minPercent == 100)
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
82 {
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
83 rbEquipAll.Active = true;
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
84 }
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
85 else
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
86 {
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
87 rbEquipPercent.Active = true;
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
88 }
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
89 }
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
90 else
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
91 {
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
92 rbEquipNumeric.Active = true;
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
93 }
70
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
94
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
95 isRatioLimited = isRatioLimit;
51
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
96 }
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
97
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
98 public void SetUnitEquipmentLimitsEnabled(bool isEnabled)
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
99 {
63
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
100 SetNumericAmountEnabledState(isEnabled);
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
101 SetPercentageAmountEnabledState(isEnabled);
51
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
102 }
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
103
54
f9f6e9db5350 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 53
diff changeset
104 public bool ShowControl()
51
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
105 {
55
eb7db8495bb5 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 54
diff changeset
106 int result = Run();
eb7db8495bb5 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 54
diff changeset
107 bool okayClicked = (result == (int)ResponseType.Ok);
eb7db8495bb5 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 54
diff changeset
108 this.Hide();
eb7db8495bb5 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 54
diff changeset
109 return okayClicked;
51
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
110 }
53
28b242612ad7 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 52
diff changeset
111
55
eb7db8495bb5 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 54
diff changeset
112 protected virtual void CancelButtonClicked(object sender, System.EventArgs e)
53
28b242612ad7 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 52
diff changeset
113 {
55
eb7db8495bb5 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 54
diff changeset
114 log.Debug("Cancel clicked");
53
28b242612ad7 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 52
diff changeset
115 Respond(ResponseType.Cancel);
56
0c5fbb54bfb0 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 55
diff changeset
116 }
0c5fbb54bfb0 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 55
diff changeset
117
0c5fbb54bfb0 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 55
diff changeset
118 protected virtual void OkayButtonClicked(object sender, System.EventArgs e)
0c5fbb54bfb0 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 55
diff changeset
119 {
0c5fbb54bfb0 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 55
diff changeset
120 log.Debug("Okay clicked");
0c5fbb54bfb0 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 55
diff changeset
121 Respond(ResponseType.Ok);
54
f9f6e9db5350 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 53
diff changeset
122 }
57
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
123
70
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
124 public void SetOkayEnabledState(bool enabled)
61
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
125 {
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
126 buttonOk.Sensitive = enabled;
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
127 }
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
128
70
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
129 protected virtual void SpinButtonValueChanged(object sender, System.EventArgs e)
61
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
130 {
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
131 OnUnitEquipmentAmountChanged();
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
132 }
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
133
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
134 protected virtual void RadioButtonClicked(object sender, System.EventArgs e)
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
135 {
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
136 OnUnitEquipmentAmountTypeChanged();
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
137 }
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
138
70
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
139 public void SetNumericAmountEnabledState(bool enabled)
63
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
140 {
70
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
141 double minPercent = GetMinPercentage();
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
142 rbEquipNumeric.Sensitive = enabled && !(isRatioLimited && minPercent == 100);
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
143 numericAmount.Sensitive = rbEquipNumeric.Sensitive;
63
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
144 }
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
145
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
146 public void SetPercentageAmountEnabledState(bool enabled)
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
147 {
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
148 if (enabled)
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
149 {
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
150 double minPercentage = GetMinPercentage();
70
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
151 rbEquipPercent.Sensitive = isRatioLimited && minPercentage != 100;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
152 percentageAmount.Sensitive = rbEquipPercent.Sensitive;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
153 double maxPercentage = GetMaxPercentage();
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
154 rbEquipAll.Sensitive = isRatioLimited && maxPercentage == 100;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
155 lblEquipAll.Sensitive = rbEquipAll.Sensitive;
63
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
156 }
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
157 else
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
158 {
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
159 rbEquipPercent.Sensitive = false;
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
160 percentageAmount.Sensitive = false;
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
161 rbEquipAll.Sensitive = false;
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
162 lblEquipAll.Sensitive = false;
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
163 }
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
164 }
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
165
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
166 private double GetMaxPercentage()
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
167 {
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
168 double min, max;
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
169 percentageAmount.GetRange(out min, out max);
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
170 return max;
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
171 }
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
172
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
173 private double GetMinPercentage()
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
174 {
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
175 double min, max;
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
176 percentageAmount.GetRange(out min, out max);
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
177 return min;
c2d79b4209e3 * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in
IBBoard <dev@ibboard.co.uk>
parents: 62
diff changeset
178 }
61
e7ad676a7344 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 57
diff changeset
179
70
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
180 public void ListenToWidgets()
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
181 {
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
182 rbEquipAll.Clicked += RadioButtonClicked;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
183 rbEquipNumeric.Clicked += RadioButtonClicked;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
184 rbEquipPercent.Clicked += RadioButtonClicked;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
185 numericAmount.ValueChanged += SpinButtonValueChanged;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
186 percentageAmount.ValueChanged += SpinButtonValueChanged;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
187 lstEquipment.Selection.Changed += OnSelectionChanged;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
188 }
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
189
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
190 public void IgnoreWidgets()
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
191 {
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
192 rbEquipAll.Clicked -= RadioButtonClicked;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
193 rbEquipNumeric.Clicked -= RadioButtonClicked;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
194 rbEquipPercent.Clicked -= RadioButtonClicked;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
195 numericAmount.ValueChanged -= SpinButtonValueChanged;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
196 percentageAmount.ValueChanged -= SpinButtonValueChanged;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
197 lstEquipment.Selection.Changed -= OnSelectionChanged;
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
198 }
4b82515586ac Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 63
diff changeset
199
57
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
200 public UnitEquipmentItem SelectedUnitEquipmentItem
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
201 {
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
202 get
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
203 {
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
204 return (UnitEquipmentItem)TreeUtils.GetSelectedItem(lstEquipment);
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
205 }
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
206 }
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
207
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
208 public bool IsRatioEquipmentAmount
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
209 {
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
210 get
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
211 {
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
212 return !rbEquipNumeric.Active;
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
213 }
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
214 }
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
215
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
216 public int EquipmentNumericAmount
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
217 {
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
218 get
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
219 {
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
220 return (int)numericAmount.Value;
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
221 }
62
f733073967a2 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 61
diff changeset
222
f733073967a2 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 61
diff changeset
223 set
f733073967a2 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 61
diff changeset
224 {
f733073967a2 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 61
diff changeset
225 numericAmount.Value = value;
f733073967a2 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 61
diff changeset
226 }
57
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
227 }
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
228
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
229 public double EquipmentPercentageAmount
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
230 {
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
231 get
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
232 {
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
233 double percent;
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
234
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
235 if (rbEquipAll.Active)
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
236 {
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
237 percent = 100;
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
238 }
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
239 else
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
240 {
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
241 percent = percentageAmount.Value;
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
242 }
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
243
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
244 return percent;
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
245 }
62
f733073967a2 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 61
diff changeset
246
f733073967a2 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 61
diff changeset
247 set
f733073967a2 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 61
diff changeset
248 {
f733073967a2 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 61
diff changeset
249 percentageAmount.Value = value;
f733073967a2 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 61
diff changeset
250 }
57
293d204e40db Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents: 56
diff changeset
251 }
51
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
252 }
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
253 }
dafbd432ca23 Re #60: Add UI to add/remove/edit weapons in GTK
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
254