annotate FrmNewUnit.cs @ 167:9808adf2d566 default tip

Re #419: Remove assumptions of a file-based install * Update GTK# GUI to use Streams version of XSLT export
author IBBoard <dev@ibboard.co.uk>
date Wed, 28 Nov 2012 20:25:53 +0000
parents 354c1d2ad086
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
a191d0655f55 Re #121: Migrate to AGPL license
IBBoard <dev@ibboard.co.uk>
parents: 13
diff changeset
1 // This file (FrmNewUnit.cs) is a part of the IBBoard.WarFoundry.GTK project and is copyright 2008, 2009 IBBoard.
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 //
19
a191d0655f55 Re #121: Migrate to AGPL license
IBBoard <dev@ibboard.co.uk>
parents: 13
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.
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 using System;
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 using System.Collections.Generic;
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 19
diff changeset
7 using Gtk;
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 19
diff changeset
8 using IBBoard.GtkSharp.Translatable;
162
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
9 using WFObjects = IBBoard.WarFoundry.API.Objects;
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 using IBBoard.WarFoundry.API.Objects;
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 using log4net;
88
b0089e875754 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
12 using IBBoard.Lang;
110
76b73f15d07e Re #344: Show unit requirement failures
IBBoard <dev@ibboard.co.uk>
parents: 96
diff changeset
13 using IBBoard.WarFoundry.API.Objects.Requirement;
76b73f15d07e Re #344: Show unit requirement failures
IBBoard <dev@ibboard.co.uk>
parents: 96
diff changeset
14 using System.Text;
162
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
15 using IBBoard.WarFoundry.API.Objects.Requirement.Context;
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16
77
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents: 76
diff changeset
17 namespace IBBoard.WarFoundry.GUI.GTK
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 {
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 19
diff changeset
19 public partial class FrmNewUnit : TranslatableDialog
13
6b2c8e55564a * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 5
diff changeset
20 {
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 private ILog logger = LogManager.GetLogger(typeof(FrmNewUnit));
77
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents: 76
diff changeset
22 private UnitType unitType;
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 private Army unitArmy;
162
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
24 private string titlePart;
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
25 private AddingContext context;
77
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents: 76
diff changeset
26
162
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
27 public FrmNewUnit(Race race, Category category, Army army) : this(race.GetUnitTypes(category), army)
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
28 {
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
29 titlePart = category.Name;
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
30 context = new NullAddingContext();
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
31 }
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
32
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
33 public FrmNewUnit(WFObjects.Unit unit, Army army) : this(unit.UnitType.ContainedUnitTypes, army)
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
34 {
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
35 titlePart = unit.Name;
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
36 context = new AddingToParentContext(unit);
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
37 }
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
38
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
39 private FrmNewUnit(UnitType[] unitTypes, Army army)
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40 {
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 this.Build();
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42 unitArmy = army;
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
43
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 19
diff changeset
44 TreeViewColumn unitTypeColumn = new TreeViewColumn();
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 19
diff changeset
45 CellRendererText unitTypeCell = new CellRendererText();
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46 unitTypeColumn.PackStart(unitTypeCell, true);
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
47 lstUnitTypes.AppendColumn(unitTypeColumn);
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 19
diff changeset
48 unitTypeColumn.SetCellDataFunc(unitTypeCell, new TreeCellDataFunc(RenderUnitTypeName));
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
49 ListStore store = new ListStore(typeof(UnitType));
162
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
50 logger.DebugFormat("Listing {0} unit types", unitTypes.Length);
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
51
162
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
52 foreach (UnitType type in unitTypes)
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
53 {
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
54 logger.DebugFormat("Adding unit type {0}", type.Name);
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
55 store.AppendValues(type);
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
56 }
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
57
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
58 lstUnitTypes.Model = store;
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 19
diff changeset
59 lstUnitTypes.Selection.Changed += new EventHandler(OnSelectionChanged);
96
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 89
diff changeset
60
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 89
diff changeset
61 Translation.TranslationChanged += Retranslate;
88
b0089e875754 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
62 Translate();
b0089e875754 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
63 }
b0089e875754 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
64
96
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 89
diff changeset
65 private void Retranslate()
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 89
diff changeset
66 {
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 89
diff changeset
67 Translate();
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 89
diff changeset
68 }
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 89
diff changeset
69
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 89
diff changeset
70 public override void Dispose()
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 89
diff changeset
71 {
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 89
diff changeset
72 Translation.TranslationChanged -= Retranslate;
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 89
diff changeset
73 base.Dispose();
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 89
diff changeset
74 }
b4416ca69153 Fixes #309: Add initial preference dialog with language support
IBBoard <dev@ibboard.co.uk>
parents: 89
diff changeset
75
88
b0089e875754 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
76 protected override void Translate()
b0089e875754 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
77 {
b0089e875754 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
78 base.Translate();
b0089e875754 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
79 lstUnitTypes.Columns[0].Title = Translation.GetTranslation("frmNewUnitNewUnitColumn", "unit type");
162
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
80 Title = Translation.GetTranslation(Name, "Create new unit", titlePart);
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
81 }
77
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents: 76
diff changeset
82
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
83 private void RenderUnitTypeName(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
84 {
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
85 UnitType type = (UnitType)model.GetValue(iter, 0);
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
86 (cell as CellRendererText).Text = type.Name;
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
87 }
77
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents: 76
diff changeset
88
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
89 protected virtual void OnSelectionChanged(object o, EventArgs e)
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
90 {
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
91 SetSelectUnitEnabledVal();
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
92 }
77
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents: 76
diff changeset
93
13
6b2c8e55564a * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 5
diff changeset
94 public UnitType SelectedUnit
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
95 {
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
96 get { return unitType; }
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
97 }
77
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents: 76
diff changeset
98
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
99 private UnitType GetSelectedUnitType()
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
100 {
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
101 TreeModel model;
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
102 TreeIter iter;
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 19
diff changeset
103 lstUnitTypes.Selection.GetSelected(out model, out iter);
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
104 UnitType toReturn = null;
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
105
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 19
diff changeset
106 if (model != null)
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
107 {
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 19
diff changeset
108 toReturn = (UnitType)model.GetValue(iter, 0);
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
109 }
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
110
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
111 return toReturn;
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
112 }
77
68804784bf6f Re #86: Complete initial GTK# UI
IBBoard <dev@ibboard.co.uk>
parents: 76
diff changeset
113
13
6b2c8e55564a * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 5
diff changeset
114 private void SetSelectUnitEnabledVal()
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
115 {
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
116 UnitType type = GetSelectedUnitType();
13
6b2c8e55564a * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 5
diff changeset
117
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 19
diff changeset
118 if (type != null)
13
6b2c8e55564a * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 5
diff changeset
119 {
88
b0089e875754 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
120 bttnCreate.Sensitive = true;
110
76b73f15d07e Re #344: Show unit requirement failures
IBBoard <dev@ibboard.co.uk>
parents: 96
diff changeset
121 ICollection<string> failureMessages;
162
354c1d2ad086 Re #423: Support nested units in GTK UI
IBBoard <dev@ibboard.co.uk>
parents: 142
diff changeset
122 Validation result = RequirementHandler.AllowsAdding(type, unitArmy, context, out failureMessages);
110
76b73f15d07e Re #344: Show unit requirement failures
IBBoard <dev@ibboard.co.uk>
parents: 96
diff changeset
123 bool validationFailed = !Validates.AsOkay(result);
142
f23e5b40ca9d Re #344: Show unit requirement failures
IBBoard <dev@ibboard.co.uk>
parents: 110
diff changeset
124 validationWidget.Visible = validationFailed;
13
6b2c8e55564a * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 5
diff changeset
125
110
76b73f15d07e Re #344: Show unit requirement failures
IBBoard <dev@ibboard.co.uk>
parents: 96
diff changeset
126 if (validationFailed)
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
127 {
142
f23e5b40ca9d Re #344: Show unit requirement failures
IBBoard <dev@ibboard.co.uk>
parents: 110
diff changeset
128 validationWidget.SetMessages(failureMessages);
13
6b2c8e55564a * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 5
diff changeset
129 }
6b2c8e55564a * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 5
diff changeset
130 }
6b2c8e55564a * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 5
diff changeset
131 else
6b2c8e55564a * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 5
diff changeset
132 {
88
b0089e875754 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 77
diff changeset
133 bttnCreate.Sensitive = false;
142
f23e5b40ca9d Re #344: Show unit requirement failures
IBBoard <dev@ibboard.co.uk>
parents: 110
diff changeset
134 validationWidget.Visible = false;
13
6b2c8e55564a * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 5
diff changeset
135 }
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
136 }
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
137
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 19
diff changeset
138 protected virtual void OnButtonCancelActivated(object sender, System.EventArgs e)
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
139 {
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
140 Respond(ResponseType.Cancel);
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
141 }
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
142
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 19
diff changeset
143 protected virtual void OnRowActivated(object o, Gtk.RowActivatedArgs args)
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
144 {
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
145 unitType = GetSelectedUnitType();
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
146 Respond(ResponseType.Ok);
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
147 }
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
148
76
7055b24cfc79 Re #308: Make GTK# UI translatable
IBBoard <dev@ibboard.co.uk>
parents: 19
diff changeset
149 protected virtual void OnButtonOkClicked(object sender, System.EventArgs e)
0
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
150 {
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
151 unitType = GetSelectedUnitType();
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
152 Respond(ResponseType.Ok);
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
153 }
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
154 }
1bb28f84d567 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
155 }