00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 namespace Foodolini.Activities {
00012
00013
00014 public partial class AdministrationActivity {
00015
00016 private Gtk.UIManager UIManager;
00017
00018 private Gtk.HBox hbox1;
00019
00020 private Gtk.VBox vbox1;
00021
00022 private Gtk.ScrolledWindow GtkScrolledWindow;
00023
00024 private Gtk.NodeView UserView;
00025
00026 private Gtk.HButtonBox hbuttonbox1;
00027
00028 private Gtk.Button CreateNewUser;
00029
00030 private Gtk.Button DeleteUserButton;
00031
00032 private Gtk.Table CreatePersonTable;
00033
00034 private Gtk.Calendar BirthDayCalendar;
00035
00036 private Gtk.Entry FullNameEntry;
00037
00038 private Gtk.ComboBox GenderCombobox;
00039
00040 private Gtk.HButtonBox hbuttonbox2;
00041
00042 private Gtk.Button CancelNewUserButton;
00043
00044 private Gtk.Button SaveNewUserButton;
00045
00046 private Gtk.SpinButton HeightSpinbutton;
00047
00048 private Gtk.Label label1;
00049
00050 private Gtk.Label label2;
00051
00052 private Gtk.Label label3;
00053
00054 private Gtk.Label label4;
00055
00056 private Gtk.Label label5;
00057
00058 private Gtk.Label label6;
00059
00060 private Gtk.Label label7;
00061
00062 private Gtk.Entry UserNameEntry;
00063
00064 private Gtk.SpinButton WeightSpinbutton;
00065
00066 protected virtual void Build() {
00067 Stetic.Gui.Initialize(this);
00068
00069 Stetic.BinContainer w1 = Stetic.BinContainer.Attach(this);
00070 this.UIManager = new Gtk.UIManager();
00071 Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
00072 this.UIManager.InsertActionGroup(w2, 0);
00073 this.Name = "Foodolini.Activities.AdministrationActivity";
00074
00075 this.hbox1 = new Gtk.HBox();
00076 this.hbox1.Name = "hbox1";
00077 this.hbox1.Spacing = 6;
00078
00079 this.vbox1 = new Gtk.VBox();
00080 this.vbox1.Name = "vbox1";
00081 this.vbox1.Spacing = 6;
00082
00083 this.GtkScrolledWindow = new Gtk.ScrolledWindow();
00084 this.GtkScrolledWindow.Name = "GtkScrolledWindow";
00085 this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
00086
00087 this.UserView = new Gtk.NodeView();
00088 this.UserView.CanFocus = true;
00089 this.UserView.Name = "UserView";
00090 this.UserView.EnableSearch = false;
00091 this.GtkScrolledWindow.Add(this.UserView);
00092 this.vbox1.Add(this.GtkScrolledWindow);
00093 Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.GtkScrolledWindow]));
00094 w4.Position = 0;
00095
00096 this.hbuttonbox1 = new Gtk.HButtonBox();
00097 this.hbuttonbox1.Spacing = 5;
00098 this.hbuttonbox1.LayoutStyle = ((Gtk.ButtonBoxStyle)(3));
00099
00100 this.CreateNewUser = new Gtk.Button();
00101 this.CreateNewUser.CanFocus = true;
00102 this.CreateNewUser.Name = "CreateNewUser";
00103 this.CreateNewUser.UseUnderline = true;
00104
00105 Gtk.Alignment w5 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00106
00107 Gtk.HBox w6 = new Gtk.HBox();
00108 w6.Spacing = 2;
00109
00110 Gtk.Image w7 = new Gtk.Image();
00111 w7.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-add", Gtk.IconSize.Menu, 16);
00112 w6.Add(w7);
00113
00114 Gtk.Label w9 = new Gtk.Label();
00115 w9.LabelProp = Mono.Unix.Catalog.GetString("Create new user");
00116 w9.UseUnderline = true;
00117 w6.Add(w9);
00118 w5.Add(w6);
00119 this.CreateNewUser.Add(w5);
00120 this.hbuttonbox1.Add(this.CreateNewUser);
00121 Gtk.ButtonBox.ButtonBoxChild w13 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox1[this.CreateNewUser]));
00122 w13.Expand = false;
00123 w13.Fill = false;
00124
00125 this.DeleteUserButton = new Gtk.Button();
00126 this.DeleteUserButton.Sensitive = false;
00127 this.DeleteUserButton.CanFocus = true;
00128 this.DeleteUserButton.Name = "DeleteUserButton";
00129 this.DeleteUserButton.UseUnderline = true;
00130
00131 Gtk.Alignment w14 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00132
00133 Gtk.HBox w15 = new Gtk.HBox();
00134 w15.Spacing = 2;
00135
00136 Gtk.Image w16 = new Gtk.Image();
00137 w16.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-delete", Gtk.IconSize.Menu, 16);
00138 w15.Add(w16);
00139
00140 Gtk.Label w18 = new Gtk.Label();
00141 w18.LabelProp = Mono.Unix.Catalog.GetString("Delete user");
00142 w18.UseUnderline = true;
00143 w15.Add(w18);
00144 w14.Add(w15);
00145 this.DeleteUserButton.Add(w14);
00146 this.hbuttonbox1.Add(this.DeleteUserButton);
00147 Gtk.ButtonBox.ButtonBoxChild w22 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox1[this.DeleteUserButton]));
00148 w22.Position = 1;
00149 w22.Expand = false;
00150 w22.Fill = false;
00151 this.vbox1.Add(this.hbuttonbox1);
00152 Gtk.Box.BoxChild w23 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbuttonbox1]));
00153 w23.Position = 1;
00154 w23.Expand = false;
00155 w23.Fill = false;
00156 this.hbox1.Add(this.vbox1);
00157 Gtk.Box.BoxChild w24 = ((Gtk.Box.BoxChild)(this.hbox1[this.vbox1]));
00158 w24.Position = 0;
00159
00160 this.CreatePersonTable = new Gtk.Table(((uint)(9)), ((uint)(4)), false);
00161 this.CreatePersonTable.Name = "CreatePersonTable";
00162 this.CreatePersonTable.RowSpacing = ((uint)(6));
00163 this.CreatePersonTable.ColumnSpacing = ((uint)(6));
00164
00165 this.BirthDayCalendar = new Gtk.Calendar();
00166 this.BirthDayCalendar.CanFocus = true;
00167 this.BirthDayCalendar.Name = "BirthDayCalendar";
00168 this.BirthDayCalendar.DisplayOptions = ((Gtk.CalendarDisplayOptions)(35));
00169 this.CreatePersonTable.Add(this.BirthDayCalendar);
00170 Gtk.Table.TableChild w25 = ((Gtk.Table.TableChild)(this.CreatePersonTable[this.BirthDayCalendar]));
00171 w25.TopAttach = ((uint)(3));
00172 w25.BottomAttach = ((uint)(5));
00173 w25.LeftAttach = ((uint)(1));
00174 w25.RightAttach = ((uint)(4));
00175 w25.XOptions = ((Gtk.AttachOptions)(4));
00176 w25.YOptions = ((Gtk.AttachOptions)(4));
00177
00178 this.FullNameEntry = new Gtk.Entry();
00179 this.FullNameEntry.CanFocus = true;
00180 this.FullNameEntry.Name = "FullNameEntry";
00181 this.FullNameEntry.IsEditable = true;
00182 this.FullNameEntry.InvisibleChar = '●';
00183 this.CreatePersonTable.Add(this.FullNameEntry);
00184 Gtk.Table.TableChild w26 = ((Gtk.Table.TableChild)(this.CreatePersonTable[this.FullNameEntry]));
00185 w26.TopAttach = ((uint)(1));
00186 w26.BottomAttach = ((uint)(2));
00187 w26.LeftAttach = ((uint)(1));
00188 w26.RightAttach = ((uint)(4));
00189 w26.XOptions = ((Gtk.AttachOptions)(4));
00190 w26.YOptions = ((Gtk.AttachOptions)(4));
00191
00192 this.GenderCombobox = Gtk.ComboBox.NewText();
00193 this.GenderCombobox.AppendText(Mono.Unix.Catalog.GetString("Male"));
00194 this.GenderCombobox.AppendText(Mono.Unix.Catalog.GetString("Female"));
00195 this.GenderCombobox.Name = "GenderCombobox";
00196 this.GenderCombobox.Active = 0;
00197 this.CreatePersonTable.Add(this.GenderCombobox);
00198 Gtk.Table.TableChild w27 = ((Gtk.Table.TableChild)(this.CreatePersonTable[this.GenderCombobox]));
00199 w27.TopAttach = ((uint)(5));
00200 w27.BottomAttach = ((uint)(6));
00201 w27.LeftAttach = ((uint)(1));
00202 w27.RightAttach = ((uint)(2));
00203 w27.XOptions = ((Gtk.AttachOptions)(4));
00204 w27.YOptions = ((Gtk.AttachOptions)(4));
00205
00206 this.hbuttonbox2 = new Gtk.HButtonBox();
00207 this.hbuttonbox2.Name = "hbuttonbox2";
00208 this.hbuttonbox2.LayoutStyle = ((Gtk.ButtonBoxStyle)(1));
00209
00210 this.CancelNewUserButton = new Gtk.Button();
00211 this.CancelNewUserButton.CanFocus = true;
00212 this.CancelNewUserButton.Name = "CancelNewUserButton";
00213 this.CancelNewUserButton.UseUnderline = true;
00214
00215 Gtk.Alignment w28 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00216
00217 Gtk.HBox w29 = new Gtk.HBox();
00218 w29.Spacing = 2;
00219
00220 Gtk.Image w30 = new Gtk.Image();
00221 w30.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-cancel", Gtk.IconSize.Menu, 16);
00222 w29.Add(w30);
00223
00224 Gtk.Label w32 = new Gtk.Label();
00225 w32.LabelProp = Mono.Unix.Catalog.GetString("Cancel user creation");
00226 w32.UseUnderline = true;
00227 w29.Add(w32);
00228 w28.Add(w29);
00229 this.CancelNewUserButton.Add(w28);
00230 this.hbuttonbox2.Add(this.CancelNewUserButton);
00231 Gtk.ButtonBox.ButtonBoxChild w36 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2[this.CancelNewUserButton]));
00232 w36.Expand = false;
00233 w36.Fill = false;
00234
00235 this.SaveNewUserButton = new Gtk.Button();
00236 this.SaveNewUserButton.Sensitive = false;
00237 this.SaveNewUserButton.CanFocus = true;
00238 this.SaveNewUserButton.Name = "SaveNewUserButton";
00239 this.SaveNewUserButton.UseUnderline = true;
00240
00241 Gtk.Alignment w37 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00242
00243 Gtk.HBox w38 = new Gtk.HBox();
00244 w38.Spacing = 2;
00245
00246 Gtk.Image w39 = new Gtk.Image();
00247 w39.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-save", Gtk.IconSize.Menu, 16);
00248 w38.Add(w39);
00249
00250 Gtk.Label w41 = new Gtk.Label();
00251 w41.LabelProp = Mono.Unix.Catalog.GetString("Save new user");
00252 w41.UseUnderline = true;
00253 w38.Add(w41);
00254 w37.Add(w38);
00255 this.SaveNewUserButton.Add(w37);
00256 this.hbuttonbox2.Add(this.SaveNewUserButton);
00257 Gtk.ButtonBox.ButtonBoxChild w45 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2[this.SaveNewUserButton]));
00258 w45.Position = 1;
00259 w45.Expand = false;
00260 w45.Fill = false;
00261 this.CreatePersonTable.Add(this.hbuttonbox2);
00262 Gtk.Table.TableChild w46 = ((Gtk.Table.TableChild)(this.CreatePersonTable[this.hbuttonbox2]));
00263 w46.TopAttach = ((uint)(7));
00264 w46.BottomAttach = ((uint)(8));
00265 w46.RightAttach = ((uint)(4));
00266 w46.XOptions = ((Gtk.AttachOptions)(4));
00267 w46.YOptions = ((Gtk.AttachOptions)(4));
00268
00269 this.HeightSpinbutton = new Gtk.SpinButton(0, 25, 5);
00270 this.HeightSpinbutton.CanFocus = true;
00271 this.HeightSpinbutton.Name = "HeightSpinbutton";
00272 this.HeightSpinbutton.Adjustment.PageIncrement = 1;
00273 this.HeightSpinbutton.ClimbRate = 1;
00274 this.HeightSpinbutton.Digits = ((uint)(2));
00275 this.HeightSpinbutton.Numeric = true;
00276 this.HeightSpinbutton.Value = 18;
00277 this.CreatePersonTable.Add(this.HeightSpinbutton);
00278 Gtk.Table.TableChild w47 = ((Gtk.Table.TableChild)(this.CreatePersonTable[this.HeightSpinbutton]));
00279 w47.TopAttach = ((uint)(5));
00280 w47.BottomAttach = ((uint)(6));
00281 w47.LeftAttach = ((uint)(3));
00282 w47.RightAttach = ((uint)(4));
00283 w47.XOptions = ((Gtk.AttachOptions)(4));
00284 w47.YOptions = ((Gtk.AttachOptions)(4));
00285
00286 this.label1 = new Gtk.Label();
00287 this.label1.Name = "label1";
00288 this.label1.Xpad = 5;
00289 this.label1.Xalign = 0F;
00290 this.label1.LabelProp = Mono.Unix.Catalog.GetString("<span size=\"xx-large\">Create new user</span>");
00291 this.label1.UseMarkup = true;
00292 this.CreatePersonTable.Add(this.label1);
00293 Gtk.Table.TableChild w48 = ((Gtk.Table.TableChild)(this.CreatePersonTable[this.label1]));
00294 w48.RightAttach = ((uint)(4));
00295 w48.YOptions = ((Gtk.AttachOptions)(4));
00296
00297 this.label2 = new Gtk.Label();
00298 this.label2.Name = "label2";
00299 this.label2.Xpad = 5;
00300 this.label2.Xalign = 0F;
00301 this.label2.LabelProp = Mono.Unix.Catalog.GetString("Full name:");
00302 this.CreatePersonTable.Add(this.label2);
00303 Gtk.Table.TableChild w49 = ((Gtk.Table.TableChild)(this.CreatePersonTable[this.label2]));
00304 w49.TopAttach = ((uint)(1));
00305 w49.BottomAttach = ((uint)(2));
00306 w49.XOptions = ((Gtk.AttachOptions)(4));
00307 w49.YOptions = ((Gtk.AttachOptions)(4));
00308
00309 this.label3 = new Gtk.Label();
00310 this.label3.Name = "label3";
00311 this.label3.Xpad = 5;
00312 this.label3.Xalign = 0F;
00313 this.label3.LabelProp = Mono.Unix.Catalog.GetString("User name:");
00314 this.CreatePersonTable.Add(this.label3);
00315 Gtk.Table.TableChild w50 = ((Gtk.Table.TableChild)(this.CreatePersonTable[this.label3]));
00316 w50.TopAttach = ((uint)(2));
00317 w50.BottomAttach = ((uint)(3));
00318 w50.XOptions = ((Gtk.AttachOptions)(4));
00319 w50.YOptions = ((Gtk.AttachOptions)(4));
00320
00321 this.label4 = new Gtk.Label();
00322 this.label4.Name = "label4";
00323 this.label4.Xpad = 5;
00324 this.label4.Ypad = 3;
00325 this.label4.Xalign = 0F;
00326 this.label4.Yalign = 0F;
00327 this.label4.LabelProp = Mono.Unix.Catalog.GetString("Date of birth:");
00328 this.CreatePersonTable.Add(this.label4);
00329 Gtk.Table.TableChild w51 = ((Gtk.Table.TableChild)(this.CreatePersonTable[this.label4]));
00330 w51.TopAttach = ((uint)(3));
00331 w51.BottomAttach = ((uint)(4));
00332 w51.XOptions = ((Gtk.AttachOptions)(4));
00333 w51.YOptions = ((Gtk.AttachOptions)(4));
00334
00335 this.label5 = new Gtk.Label();
00336 this.label5.Name = "label5";
00337 this.label5.Xpad = 5;
00338 this.label5.Xalign = 0F;
00339 this.label5.LabelProp = Mono.Unix.Catalog.GetString("Gender:");
00340 this.CreatePersonTable.Add(this.label5);
00341 Gtk.Table.TableChild w52 = ((Gtk.Table.TableChild)(this.CreatePersonTable[this.label5]));
00342 w52.TopAttach = ((uint)(5));
00343 w52.BottomAttach = ((uint)(6));
00344 w52.XOptions = ((Gtk.AttachOptions)(4));
00345 w52.YOptions = ((Gtk.AttachOptions)(4));
00346
00347 this.label6 = new Gtk.Label();
00348 this.label6.Name = "label6";
00349 this.label6.Xpad = 5;
00350 this.label6.Xalign = 0F;
00351 this.label6.LabelProp = Mono.Unix.Catalog.GetString("Height (m):");
00352 this.CreatePersonTable.Add(this.label6);
00353 Gtk.Table.TableChild w53 = ((Gtk.Table.TableChild)(this.CreatePersonTable[this.label6]));
00354 w53.TopAttach = ((uint)(5));
00355 w53.BottomAttach = ((uint)(6));
00356 w53.LeftAttach = ((uint)(2));
00357 w53.RightAttach = ((uint)(3));
00358 w53.XOptions = ((Gtk.AttachOptions)(4));
00359 w53.YOptions = ((Gtk.AttachOptions)(4));
00360
00361 this.label7 = new Gtk.Label();
00362 this.label7.Name = "label7";
00363 this.label7.Xpad = 5;
00364 this.label7.Xalign = 0F;
00365 this.label7.LabelProp = Mono.Unix.Catalog.GetString("Weight (kg):");
00366 this.CreatePersonTable.Add(this.label7);
00367 Gtk.Table.TableChild w54 = ((Gtk.Table.TableChild)(this.CreatePersonTable[this.label7]));
00368 w54.TopAttach = ((uint)(6));
00369 w54.BottomAttach = ((uint)(7));
00370 w54.LeftAttach = ((uint)(2));
00371 w54.RightAttach = ((uint)(3));
00372 w54.XOptions = ((Gtk.AttachOptions)(4));
00373 w54.YOptions = ((Gtk.AttachOptions)(4));
00374
00375 this.UserNameEntry = new Gtk.Entry();
00376 this.UserNameEntry.CanFocus = true;
00377 this.UserNameEntry.Name = "UserNameEntry";
00378 this.UserNameEntry.IsEditable = true;
00379 this.UserNameEntry.InvisibleChar = '●';
00380 this.CreatePersonTable.Add(this.UserNameEntry);
00381 Gtk.Table.TableChild w55 = ((Gtk.Table.TableChild)(this.CreatePersonTable[this.UserNameEntry]));
00382 w55.TopAttach = ((uint)(2));
00383 w55.BottomAttach = ((uint)(3));
00384 w55.LeftAttach = ((uint)(1));
00385 w55.RightAttach = ((uint)(4));
00386 w55.XOptions = ((Gtk.AttachOptions)(4));
00387 w55.YOptions = ((Gtk.AttachOptions)(4));
00388
00389 this.WeightSpinbutton = new Gtk.SpinButton(0, 10000, 5);
00390 this.WeightSpinbutton.CanFocus = true;
00391 this.WeightSpinbutton.Name = "WeightSpinbutton";
00392 this.WeightSpinbutton.Adjustment.PageIncrement = 1;
00393 this.WeightSpinbutton.ClimbRate = 1;
00394 this.WeightSpinbutton.Digits = ((uint)(1));
00395 this.WeightSpinbutton.Numeric = true;
00396 this.WeightSpinbutton.Value = 75;
00397 this.CreatePersonTable.Add(this.WeightSpinbutton);
00398 Gtk.Table.TableChild w56 = ((Gtk.Table.TableChild)(this.CreatePersonTable[this.WeightSpinbutton]));
00399 w56.TopAttach = ((uint)(6));
00400 w56.BottomAttach = ((uint)(7));
00401 w56.LeftAttach = ((uint)(3));
00402 w56.RightAttach = ((uint)(4));
00403 w56.XOptions = ((Gtk.AttachOptions)(4));
00404 w56.YOptions = ((Gtk.AttachOptions)(4));
00405 this.hbox1.Add(this.CreatePersonTable);
00406 Gtk.Box.BoxChild w57 = ((Gtk.Box.BoxChild)(this.hbox1[this.CreatePersonTable]));
00407 w57.Position = 1;
00408 w57.Expand = false;
00409 w57.Fill = false;
00410 this.Add(this.hbox1);
00411 if ((this.Child != null)) {
00412 this.Child.ShowAll();
00413 }
00414 w1.SetUiManager(UIManager);
00415 this.Hide();
00416 this.UserView.CursorChanged += new System.EventHandler(this.OnUserViewCursorChanged);
00417 this.CreateNewUser.Clicked += new System.EventHandler(this.OnCreateNewUserClicked);
00418 this.DeleteUserButton.Clicked += new System.EventHandler(this.OnDeleteUserButtonClicked);
00419 this.UserNameEntry.Changed += new System.EventHandler(this.ValidateEntry);
00420 this.CancelNewUserButton.Clicked += new System.EventHandler(this.OnCancelNewUserButtonClicked);
00421 this.SaveNewUserButton.Clicked += new System.EventHandler(this.OnSaveNewUserButtonClicked);
00422 this.FullNameEntry.Changed += new System.EventHandler(this.ValidateEntry);
00423 }
00424 }
00425 }