comparison gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmReplaceEquipment.cs @ 97:6d2c8ad0d8f1

Re #308: Make GTK# UI translatable * More standardisation of widget names with WinForms
author IBBoard <dev@ibboard.co.uk>
date Sun, 02 Jan 2011 15:50:29 +0000
parents e40d892a2298
children 135491fd1830
comparison
equal deleted inserted replaced
96:b4416ca69153 97:6d2c8ad0d8f1
14 private global::Gtk.SpinButton numericAmount; 14 private global::Gtk.SpinButton numericAmount;
15 private global::Gtk.SpinButton percentageAmount; 15 private global::Gtk.SpinButton percentageAmount;
16 private global::Gtk.RadioButton rbEquipAll; 16 private global::Gtk.RadioButton rbEquipAll;
17 private global::Gtk.RadioButton rbEquipNumeric; 17 private global::Gtk.RadioButton rbEquipNumeric;
18 private global::Gtk.RadioButton rbEquipPercent; 18 private global::Gtk.RadioButton rbEquipPercent;
19 private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblEquipAmount; 19 private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblAmount;
20 private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblEquipment; 20 private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblItem;
21 private global::IBBoard.GtkSharp.Translatable.TranslatableButton buttonCancel; 21 private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnCancel;
22 private global::IBBoard.GtkSharp.Translatable.TranslatableButton buttonOk; 22 private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnOkay;
23 23
24 protected virtual void Build() 24 protected virtual void Build()
25 { 25 {
26 global::Stetic.Gui.Initialize(this); 26 global::Stetic.Gui.Initialize(this);
27 // Widget IBBoard.WarFoundry.GUI.GTK.FrmReplaceEquipment 27 // Widget IBBoard.WarFoundry.GUI.GTK.FrmReplaceEquipment
164 w12.BottomAttach = ((uint)(2)); 164 w12.BottomAttach = ((uint)(2));
165 w12.LeftAttach = ((uint)(1)); 165 w12.LeftAttach = ((uint)(1));
166 w12.RightAttach = ((uint)(2)); 166 w12.RightAttach = ((uint)(2));
167 w12.YOptions = ((global::Gtk.AttachOptions)(4)); 167 w12.YOptions = ((global::Gtk.AttachOptions)(4));
168 // Container child table1.Gtk.Table+TableChild 168 // Container child table1.Gtk.Table+TableChild
169 this.lblEquipAmount = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel(); 169 this.lblAmount = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel();
170 this.lblEquipAmount.Name = "lblEquipAmount"; 170 this.lblAmount.Name = "lblAmount";
171 this.lblEquipAmount.LabelProp = global::Mono.Unix.Catalog.GetString("amount:"); 171 this.lblAmount.LabelProp = global::Mono.Unix.Catalog.GetString("amount:");
172 this.table1.Add(this.lblEquipAmount); 172 this.table1.Add(this.lblAmount);
173 global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1[this.lblEquipAmount])); 173 global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1[this.lblAmount]));
174 w13.TopAttach = ((uint)(1)); 174 w13.TopAttach = ((uint)(1));
175 w13.BottomAttach = ((uint)(2)); 175 w13.BottomAttach = ((uint)(2));
176 w13.XOptions = ((global::Gtk.AttachOptions)(4)); 176 w13.XOptions = ((global::Gtk.AttachOptions)(4));
177 w13.YOptions = ((global::Gtk.AttachOptions)(4)); 177 w13.YOptions = ((global::Gtk.AttachOptions)(4));
178 // Container child table1.Gtk.Table+TableChild 178 // Container child table1.Gtk.Table+TableChild
179 this.lblEquipment = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel(); 179 this.lblItem = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel();
180 this.lblEquipment.Name = "lblEquipment"; 180 this.lblItem.Name = "lblItem";
181 this.lblEquipment.LabelProp = global::Mono.Unix.Catalog.GetString("equipment"); 181 this.lblItem.LabelProp = global::Mono.Unix.Catalog.GetString("equipment");
182 this.table1.Add(this.lblEquipment); 182 this.table1.Add(this.lblItem);
183 global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1[this.lblEquipment])); 183 global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1[this.lblItem]));
184 w14.XOptions = ((global::Gtk.AttachOptions)(4)); 184 w14.XOptions = ((global::Gtk.AttachOptions)(4));
185 w14.YOptions = ((global::Gtk.AttachOptions)(4)); 185 w14.YOptions = ((global::Gtk.AttachOptions)(4));
186 w1.Add(this.table1); 186 w1.Add(this.table1);
187 global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(w1[this.table1])); 187 global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(w1[this.table1]));
188 w15.Position = 0; 188 w15.Position = 0;
193 w16.Name = "dialog1_ActionArea"; 193 w16.Name = "dialog1_ActionArea";
194 w16.Spacing = 10; 194 w16.Spacing = 10;
195 w16.BorderWidth = ((uint)(5)); 195 w16.BorderWidth = ((uint)(5));
196 w16.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); 196 w16.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
197 // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild 197 // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
198 this.buttonCancel = new global::IBBoard.GtkSharp.Translatable.TranslatableButton(); 198 this.bttnCancel = new global::IBBoard.GtkSharp.Translatable.TranslatableButton();
199 this.buttonCancel.CanDefault = true; 199 this.bttnCancel.CanDefault = true;
200 this.buttonCancel.CanFocus = true; 200 this.bttnCancel.CanFocus = true;
201 this.buttonCancel.Name = "buttonCancel"; 201 this.bttnCancel.Name = "bttnCancel";
202 this.buttonCancel.UseStock = true; 202 this.bttnCancel.UseStock = true;
203 this.buttonCancel.UseUnderline = true; 203 this.bttnCancel.UseUnderline = true;
204 this.buttonCancel.Label = "gtk-cancel"; 204 this.bttnCancel.Label = "gtk-cancel";
205 this.AddActionWidget(this.buttonCancel, -6); 205 this.AddActionWidget(this.bttnCancel, -6);
206 global::Gtk.ButtonBox.ButtonBoxChild w17 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w16[this.buttonCancel])); 206 global::Gtk.ButtonBox.ButtonBoxChild w17 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w16[this.bttnCancel]));
207 w17.Expand = false; 207 w17.Expand = false;
208 w17.Fill = false; 208 w17.Fill = false;
209 // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild 209 // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
210 this.buttonOk = new global::IBBoard.GtkSharp.Translatable.TranslatableButton(); 210 this.bttnOkay = new global::IBBoard.GtkSharp.Translatable.TranslatableButton();
211 this.buttonOk.CanDefault = true; 211 this.bttnOkay.CanDefault = true;
212 this.buttonOk.CanFocus = true; 212 this.bttnOkay.CanFocus = true;
213 this.buttonOk.Name = "buttonOk"; 213 this.bttnOkay.Name = "bttnOkay";
214 this.buttonOk.UseStock = true; 214 this.bttnOkay.UseStock = true;
215 this.buttonOk.UseUnderline = true; 215 this.bttnOkay.UseUnderline = true;
216 this.buttonOk.Label = "gtk-ok"; 216 this.bttnOkay.Label = "gtk-ok";
217 this.AddActionWidget(this.buttonOk, -5); 217 this.AddActionWidget(this.bttnOkay, -5);
218 global::Gtk.ButtonBox.ButtonBoxChild w18 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w16[this.buttonOk])); 218 global::Gtk.ButtonBox.ButtonBoxChild w18 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w16[this.bttnOkay]));
219 w18.Position = 1; 219 w18.Position = 1;
220 w18.Expand = false; 220 w18.Expand = false;
221 w18.Fill = false; 221 w18.Fill = false;
222 if ((this.Child != null)) 222 if ((this.Child != null))
223 { 223 {
227 this.DefaultHeight = 300; 227 this.DefaultHeight = 300;
228 this.Show(); 228 this.Show();
229 this.rbEquipNumeric.Clicked += new global::System.EventHandler(this.RadioButtonClicked); 229 this.rbEquipNumeric.Clicked += new global::System.EventHandler(this.RadioButtonClicked);
230 this.percentageAmount.ValueChanged += new global::System.EventHandler(this.SpinButtonValueChanged); 230 this.percentageAmount.ValueChanged += new global::System.EventHandler(this.SpinButtonValueChanged);
231 this.numericAmount.ValueChanged += new global::System.EventHandler(this.SpinButtonValueChanged); 231 this.numericAmount.ValueChanged += new global::System.EventHandler(this.SpinButtonValueChanged);
232 this.buttonCancel.Clicked += new global::System.EventHandler(this.CancelButtonClicked); 232 this.bttnCancel.Clicked += new global::System.EventHandler(this.CancelButtonClicked);
233 this.buttonOk.Clicked += new global::System.EventHandler(this.OkayButtonClicked); 233 this.bttnOkay.Clicked += new global::System.EventHandler(this.OkayButtonClicked);
234 } 234 }
235 } 235 }
236 } 236 }