00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 namespace Foodolini.Activities {
00012
00013
00014 public partial class PersonEditor {
00015
00016 private Gtk.HBox hbox1;
00017
00018 private Gtk.HBox ViewPersonTable;
00019
00020 private Gtk.Table table1;
00021
00022 private Gtk.Calendar calendarDateOfBirth;
00023
00024 private Gtk.Entry entry1FullName;
00025
00026 private Gtk.Entry entry2UserName;
00027
00028 private Gtk.HButtonBox hbuttonboxCancel;
00029
00030 private Gtk.HButtonBox hbuttonboxEditSave;
00031
00032 private Gtk.Button button114Cancel;
00033
00034 private Gtk.Button buttonSaveUserDetails;
00035
00036 private Gtk.Label label8;
00037
00038 private Gtk.Label lbDateOfBirth;
00039
00040 private Gtk.Label lbFullName;
00041
00042 private Gtk.Label lbGender;
00043
00044 private Gtk.Label lbHeight;
00045
00046 private Gtk.Label lbUserProfile;
00047
00048 private Gtk.Label lbWeight;
00049
00050 private Gtk.VBox vbox2;
00051
00052 private Gtk.ComboBox comboboxGender;
00053
00054 private Gtk.VBox vbox3;
00055
00056 private Gtk.SpinButton spHeight;
00057
00058 private Gtk.VBox vbox4;
00059
00060 private Gtk.SpinButton spWeight;
00061
00062 protected virtual void Build() {
00063 Stetic.Gui.Initialize(this);
00064
00065 Stetic.BinContainer.Attach(this);
00066 this.Name = "Foodolini.Activities.PersonEditor";
00067
00068 this.hbox1 = new Gtk.HBox();
00069 this.hbox1.Name = "hbox1";
00070 this.hbox1.Spacing = 6;
00071 this.hbox1.BorderWidth = ((uint)(9));
00072
00073 this.ViewPersonTable = new Gtk.HBox();
00074 this.ViewPersonTable.Name = "ViewPersonTable";
00075 this.ViewPersonTable.Spacing = 6;
00076
00077 this.table1 = new Gtk.Table(((uint)(8)), ((uint)(4)), false);
00078 this.table1.Name = "table1";
00079 this.table1.RowSpacing = ((uint)(6));
00080 this.table1.ColumnSpacing = ((uint)(6));
00081 this.table1.BorderWidth = ((uint)(9));
00082
00083 this.calendarDateOfBirth = new Gtk.Calendar();
00084 this.calendarDateOfBirth.CanFocus = true;
00085 this.calendarDateOfBirth.Name = "calendarDateOfBirth";
00086 this.calendarDateOfBirth.DisplayOptions = ((Gtk.CalendarDisplayOptions)(35));
00087 this.table1.Add(this.calendarDateOfBirth);
00088 Gtk.Table.TableChild w1 = ((Gtk.Table.TableChild)(this.table1[this.calendarDateOfBirth]));
00089 w1.TopAttach = ((uint)(3));
00090 w1.BottomAttach = ((uint)(4));
00091 w1.LeftAttach = ((uint)(1));
00092 w1.RightAttach = ((uint)(4));
00093 w1.XOptions = ((Gtk.AttachOptions)(4));
00094 w1.YOptions = ((Gtk.AttachOptions)(4));
00095
00096 this.entry1FullName = new Gtk.Entry();
00097 this.entry1FullName.CanFocus = true;
00098 this.entry1FullName.Name = "entry1FullName";
00099 this.entry1FullName.IsEditable = true;
00100 this.entry1FullName.InvisibleChar = '●';
00101 this.table1.Add(this.entry1FullName);
00102 Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.entry1FullName]));
00103 w2.TopAttach = ((uint)(1));
00104 w2.BottomAttach = ((uint)(2));
00105 w2.LeftAttach = ((uint)(1));
00106 w2.RightAttach = ((uint)(4));
00107 w2.XOptions = ((Gtk.AttachOptions)(4));
00108 w2.YOptions = ((Gtk.AttachOptions)(4));
00109
00110 this.entry2UserName = new Gtk.Entry();
00111 this.entry2UserName.CanFocus = true;
00112 this.entry2UserName.Name = "entry2UserName";
00113 this.entry2UserName.IsEditable = true;
00114 this.entry2UserName.InvisibleChar = '●';
00115 this.table1.Add(this.entry2UserName);
00116 Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.entry2UserName]));
00117 w3.TopAttach = ((uint)(2));
00118 w3.BottomAttach = ((uint)(3));
00119 w3.LeftAttach = ((uint)(1));
00120 w3.RightAttach = ((uint)(4));
00121 w3.XOptions = ((Gtk.AttachOptions)(4));
00122 w3.YOptions = ((Gtk.AttachOptions)(4));
00123
00124 this.hbuttonboxCancel = new Gtk.HButtonBox();
00125 this.hbuttonboxCancel.Name = "hbuttonboxCancel";
00126 this.hbuttonboxCancel.LayoutStyle = ((Gtk.ButtonBoxStyle)(1));
00127 this.table1.Add(this.hbuttonboxCancel);
00128 Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.hbuttonboxCancel]));
00129 w4.TopAttach = ((uint)(7));
00130 w4.BottomAttach = ((uint)(8));
00131 w4.LeftAttach = ((uint)(2));
00132 w4.RightAttach = ((uint)(4));
00133 w4.YOptions = ((Gtk.AttachOptions)(4));
00134
00135 this.hbuttonboxEditSave = new Gtk.HButtonBox();
00136 this.hbuttonboxEditSave.Name = "hbuttonboxEditSave";
00137 this.hbuttonboxEditSave.LayoutStyle = ((Gtk.ButtonBoxStyle)(2));
00138
00139 this.button114Cancel = new Gtk.Button();
00140 this.button114Cancel.CanFocus = true;
00141 this.button114Cancel.Name = "button114Cancel";
00142 this.button114Cancel.UseUnderline = true;
00143
00144 Gtk.Alignment w5 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00145
00146 Gtk.HBox w6 = new Gtk.HBox();
00147 w6.Spacing = 2;
00148
00149 Gtk.Image w7 = new Gtk.Image();
00150 w7.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-cancel", Gtk.IconSize.Menu, 16);
00151 w6.Add(w7);
00152
00153 Gtk.Label w9 = new Gtk.Label();
00154 w9.LabelProp = Mono.Unix.Catalog.GetString("Cancel changes");
00155 w9.UseUnderline = true;
00156 w6.Add(w9);
00157 w5.Add(w6);
00158 this.button114Cancel.Add(w5);
00159 this.hbuttonboxEditSave.Add(this.button114Cancel);
00160 Gtk.ButtonBox.ButtonBoxChild w13 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonboxEditSave[this.button114Cancel]));
00161 w13.Expand = false;
00162 w13.Fill = false;
00163
00164 this.buttonSaveUserDetails = new Gtk.Button();
00165 this.buttonSaveUserDetails.CanFocus = true;
00166 this.buttonSaveUserDetails.Name = "buttonSaveUserDetails";
00167 this.buttonSaveUserDetails.UseUnderline = true;
00168
00169 Gtk.Alignment w14 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00170
00171 Gtk.HBox w15 = new Gtk.HBox();
00172 w15.Spacing = 2;
00173
00174 Gtk.Image w16 = new Gtk.Image();
00175 w16.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-save", Gtk.IconSize.Menu, 16);
00176 w15.Add(w16);
00177
00178 Gtk.Label w18 = new Gtk.Label();
00179 w18.LabelProp = Mono.Unix.Catalog.GetString("Save user details");
00180 w18.UseUnderline = true;
00181 w15.Add(w18);
00182 w14.Add(w15);
00183 this.buttonSaveUserDetails.Add(w14);
00184 this.hbuttonboxEditSave.Add(this.buttonSaveUserDetails);
00185 Gtk.ButtonBox.ButtonBoxChild w22 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonboxEditSave[this.buttonSaveUserDetails]));
00186 w22.Position = 1;
00187 w22.Expand = false;
00188 w22.Fill = false;
00189 this.table1.Add(this.hbuttonboxEditSave);
00190 Gtk.Table.TableChild w23 = ((Gtk.Table.TableChild)(this.table1[this.hbuttonboxEditSave]));
00191 w23.TopAttach = ((uint)(6));
00192 w23.BottomAttach = ((uint)(7));
00193 w23.LeftAttach = ((uint)(1));
00194 w23.RightAttach = ((uint)(4));
00195 w23.YOptions = ((Gtk.AttachOptions)(4));
00196
00197 this.label8 = new Gtk.Label();
00198 this.label8.Name = "label8";
00199 this.label8.Xpad = 5;
00200 this.label8.Xalign = 0F;
00201 this.label8.LabelProp = Mono.Unix.Catalog.GetString("User name:");
00202 this.table1.Add(this.label8);
00203 Gtk.Table.TableChild w24 = ((Gtk.Table.TableChild)(this.table1[this.label8]));
00204 w24.TopAttach = ((uint)(2));
00205 w24.BottomAttach = ((uint)(3));
00206 w24.XOptions = ((Gtk.AttachOptions)(4));
00207 w24.YOptions = ((Gtk.AttachOptions)(4));
00208
00209 this.lbDateOfBirth = new Gtk.Label();
00210 this.lbDateOfBirth.Name = "lbDateOfBirth";
00211 this.lbDateOfBirth.Xpad = 5;
00212 this.lbDateOfBirth.Xalign = 0F;
00213 this.lbDateOfBirth.LabelProp = Mono.Unix.Catalog.GetString("Date of birth:");
00214 this.table1.Add(this.lbDateOfBirth);
00215 Gtk.Table.TableChild w25 = ((Gtk.Table.TableChild)(this.table1[this.lbDateOfBirth]));
00216 w25.TopAttach = ((uint)(3));
00217 w25.BottomAttach = ((uint)(4));
00218 w25.XOptions = ((Gtk.AttachOptions)(4));
00219 w25.YOptions = ((Gtk.AttachOptions)(4));
00220
00221 this.lbFullName = new Gtk.Label();
00222 this.lbFullName.Name = "lbFullName";
00223 this.lbFullName.Xpad = 5;
00224 this.lbFullName.Xalign = 0F;
00225 this.lbFullName.LabelProp = Mono.Unix.Catalog.GetString("Full name:");
00226 this.table1.Add(this.lbFullName);
00227 Gtk.Table.TableChild w26 = ((Gtk.Table.TableChild)(this.table1[this.lbFullName]));
00228 w26.TopAttach = ((uint)(1));
00229 w26.BottomAttach = ((uint)(2));
00230 w26.XOptions = ((Gtk.AttachOptions)(4));
00231 w26.YOptions = ((Gtk.AttachOptions)(4));
00232
00233 this.lbGender = new Gtk.Label();
00234 this.lbGender.Name = "lbGender";
00235 this.lbGender.Xpad = 5;
00236 this.lbGender.Xalign = 0F;
00237 this.lbGender.LabelProp = Mono.Unix.Catalog.GetString("Gender:");
00238 this.table1.Add(this.lbGender);
00239 Gtk.Table.TableChild w27 = ((Gtk.Table.TableChild)(this.table1[this.lbGender]));
00240 w27.TopAttach = ((uint)(4));
00241 w27.BottomAttach = ((uint)(5));
00242 w27.XOptions = ((Gtk.AttachOptions)(4));
00243 w27.YOptions = ((Gtk.AttachOptions)(4));
00244
00245 this.lbHeight = new Gtk.Label();
00246 this.lbHeight.Name = "lbHeight";
00247 this.lbHeight.Xpad = 5;
00248 this.lbHeight.Xalign = 0F;
00249 this.lbHeight.LabelProp = Mono.Unix.Catalog.GetString("Height (cm):");
00250 this.table1.Add(this.lbHeight);
00251 Gtk.Table.TableChild w28 = ((Gtk.Table.TableChild)(this.table1[this.lbHeight]));
00252 w28.TopAttach = ((uint)(4));
00253 w28.BottomAttach = ((uint)(5));
00254 w28.LeftAttach = ((uint)(2));
00255 w28.RightAttach = ((uint)(3));
00256 w28.XOptions = ((Gtk.AttachOptions)(4));
00257 w28.YOptions = ((Gtk.AttachOptions)(4));
00258
00259 this.lbUserProfile = new Gtk.Label();
00260 this.lbUserProfile.Name = "lbUserProfile";
00261 this.lbUserProfile.Xpad = 5;
00262 this.lbUserProfile.Xalign = 0F;
00263 this.lbUserProfile.LabelProp = Mono.Unix.Catalog.GetString("<big>Edit user profile:</big>");
00264 this.lbUserProfile.UseMarkup = true;
00265 this.table1.Add(this.lbUserProfile);
00266 Gtk.Table.TableChild w29 = ((Gtk.Table.TableChild)(this.table1[this.lbUserProfile]));
00267 w29.RightAttach = ((uint)(4));
00268 w29.XOptions = ((Gtk.AttachOptions)(4));
00269 w29.YOptions = ((Gtk.AttachOptions)(4));
00270
00271 this.lbWeight = new Gtk.Label();
00272 this.lbWeight.Name = "lbWeight";
00273 this.lbWeight.Xpad = 5;
00274 this.lbWeight.Xalign = 0F;
00275 this.lbWeight.LabelProp = Mono.Unix.Catalog.GetString("Weight (kg):");
00276 this.table1.Add(this.lbWeight);
00277 Gtk.Table.TableChild w30 = ((Gtk.Table.TableChild)(this.table1[this.lbWeight]));
00278 w30.TopAttach = ((uint)(5));
00279 w30.BottomAttach = ((uint)(6));
00280 w30.LeftAttach = ((uint)(2));
00281 w30.RightAttach = ((uint)(3));
00282 w30.XOptions = ((Gtk.AttachOptions)(4));
00283 w30.YOptions = ((Gtk.AttachOptions)(4));
00284
00285 this.vbox2 = new Gtk.VBox();
00286 this.vbox2.Name = "vbox2";
00287 this.vbox2.Spacing = 6;
00288
00289 this.comboboxGender = Gtk.ComboBox.NewText();
00290 this.comboboxGender.AppendText(Mono.Unix.Catalog.GetString("male"));
00291 this.comboboxGender.AppendText(Mono.Unix.Catalog.GetString("female"));
00292 this.comboboxGender.Name = "comboboxGender";
00293 this.comboboxGender.Active = 0;
00294 this.vbox2.Add(this.comboboxGender);
00295 Gtk.Box.BoxChild w31 = ((Gtk.Box.BoxChild)(this.vbox2[this.comboboxGender]));
00296 w31.Position = 0;
00297 w31.Expand = false;
00298 w31.Fill = false;
00299 this.table1.Add(this.vbox2);
00300 Gtk.Table.TableChild w32 = ((Gtk.Table.TableChild)(this.table1[this.vbox2]));
00301 w32.TopAttach = ((uint)(4));
00302 w32.BottomAttach = ((uint)(5));
00303 w32.LeftAttach = ((uint)(1));
00304 w32.RightAttach = ((uint)(2));
00305 w32.XOptions = ((Gtk.AttachOptions)(4));
00306 w32.YOptions = ((Gtk.AttachOptions)(4));
00307
00308 this.vbox3 = new Gtk.VBox();
00309 this.vbox3.Name = "vbox3";
00310 this.vbox3.Spacing = 6;
00311
00312 this.spHeight = new Gtk.SpinButton(0, 250, 1);
00313 this.spHeight.CanFocus = true;
00314 this.spHeight.Name = "spHeight";
00315 this.spHeight.Adjustment.PageIncrement = 10;
00316 this.spHeight.ClimbRate = 1;
00317 this.spHeight.Digits = ((uint)(2));
00318 this.spHeight.Numeric = true;
00319 this.vbox3.Add(this.spHeight);
00320 Gtk.Box.BoxChild w33 = ((Gtk.Box.BoxChild)(this.vbox3[this.spHeight]));
00321 w33.Position = 0;
00322 w33.Expand = false;
00323 w33.Fill = false;
00324 this.table1.Add(this.vbox3);
00325 Gtk.Table.TableChild w34 = ((Gtk.Table.TableChild)(this.table1[this.vbox3]));
00326 w34.TopAttach = ((uint)(4));
00327 w34.BottomAttach = ((uint)(5));
00328 w34.LeftAttach = ((uint)(3));
00329 w34.RightAttach = ((uint)(4));
00330 w34.XOptions = ((Gtk.AttachOptions)(4));
00331 w34.YOptions = ((Gtk.AttachOptions)(4));
00332
00333 this.vbox4 = new Gtk.VBox();
00334 this.vbox4.Name = "vbox4";
00335 this.vbox4.Spacing = 6;
00336
00337 this.spWeight = new Gtk.SpinButton(0, 100, 5);
00338 this.spWeight.CanFocus = true;
00339 this.spWeight.Name = "spWeight";
00340 this.spWeight.Adjustment.PageIncrement = 10;
00341 this.spWeight.ClimbRate = 1;
00342 this.spWeight.Digits = ((uint)(1));
00343 this.spWeight.Numeric = true;
00344 this.vbox4.Add(this.spWeight);
00345 Gtk.Box.BoxChild w35 = ((Gtk.Box.BoxChild)(this.vbox4[this.spWeight]));
00346 w35.Position = 0;
00347 w35.Expand = false;
00348 w35.Fill = false;
00349 this.table1.Add(this.vbox4);
00350 Gtk.Table.TableChild w36 = ((Gtk.Table.TableChild)(this.table1[this.vbox4]));
00351 w36.TopAttach = ((uint)(5));
00352 w36.BottomAttach = ((uint)(6));
00353 w36.LeftAttach = ((uint)(3));
00354 w36.RightAttach = ((uint)(4));
00355 w36.XOptions = ((Gtk.AttachOptions)(4));
00356 w36.YOptions = ((Gtk.AttachOptions)(4));
00357 this.ViewPersonTable.Add(this.table1);
00358 Gtk.Box.BoxChild w37 = ((Gtk.Box.BoxChild)(this.ViewPersonTable[this.table1]));
00359 w37.Position = 0;
00360 w37.Expand = false;
00361 w37.Fill = false;
00362 this.hbox1.Add(this.ViewPersonTable);
00363 Gtk.Box.BoxChild w38 = ((Gtk.Box.BoxChild)(this.hbox1[this.ViewPersonTable]));
00364 w38.Position = 0;
00365 this.Add(this.hbox1);
00366 if ((this.Child != null)) {
00367 this.Child.ShowAll();
00368 }
00369 this.Hide();
00370 this.spWeight.ValueChanged += new System.EventHandler(this.ValidateEntries);
00371 this.spHeight.ValueChanged += new System.EventHandler(this.ValidateEntries);
00372 this.comboboxGender.Changed += new System.EventHandler(this.ValidateEntries);
00373 this.button114Cancel.Clicked += new System.EventHandler(this.OnClickedCancelChanges);
00374 this.buttonSaveUserDetails.Clicked += new System.EventHandler(this.OnClickedSaveUserDetails);
00375 this.entry2UserName.Changed += new System.EventHandler(this.ValidateEntries);
00376 this.entry1FullName.Changed += new System.EventHandler(this.ValidateEntries);
00377 this.calendarDateOfBirth.DaySelected += new System.EventHandler(this.ValidateEntries);
00378 this.calendarDateOfBirth.MonthChanged += new System.EventHandler(this.ValidateEntries);
00379 }
00380 }
00381 }