00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 namespace Foodolini.Activities.Ingredients {
00012
00013
00014 public partial class IngredientDialog {
00015
00016 private Gtk.Table table1;
00017
00018 private Gtk.ComboBox cbFoodGroup;
00019
00020 private Gtk.HBox hbox1;
00021
00022 private Gtk.SpinButton sbShelfDays;
00023
00024 private Gtk.Label label12;
00025
00026 private Gtk.HBox hbox2;
00027
00028 private Gtk.SpinButton sbOpenDays;
00029
00030 private Gtk.Label label13;
00031
00032 private Gtk.Label label1;
00033
00034 private Gtk.Label label2;
00035
00036 private Gtk.Label label3;
00037
00038 private Gtk.Label label4;
00039
00040 private Gtk.Label label5;
00041
00042 private Gtk.Label label6;
00043
00044 private Gtk.Label label7;
00045
00046 private Gtk.Entry txtCommercialName;
00047
00048 private Gtk.Entry txtLongDescription;
00049
00050 private Gtk.Entry txtManufacturer;
00051
00052 private Gtk.Entry txtShortDescription;
00053
00054 private Gtk.Label label8;
00055
00056 private Gtk.ScrolledWindow GtkScrolledWindow;
00057
00058 private Gtk.NodeView nutrientsView;
00059
00060 private Gtk.Button btnDelete;
00061
00062 private Gtk.Button buttonCancel;
00063
00064 private Gtk.Button buttonOk;
00065
00066 protected virtual void Build() {
00067 Stetic.Gui.Initialize(this);
00068
00069 this.Name = "Foodolini.Activities.Ingredients.IngredientDialog";
00070 this.WindowPosition = ((Gtk.WindowPosition)(4));
00071
00072 Gtk.VBox w1 = this.VBox;
00073 w1.Name = "vBox";
00074 w1.BorderWidth = ((uint)(2));
00075
00076 this.table1 = new Gtk.Table(((uint)(7)), ((uint)(2)), false);
00077 this.table1.Name = "table1";
00078 this.table1.RowSpacing = ((uint)(6));
00079 this.table1.ColumnSpacing = ((uint)(6));
00080
00081 this.cbFoodGroup = Gtk.ComboBox.NewText();
00082 this.cbFoodGroup.TooltipMarkup = "The group of food this ingredient belongs to";
00083 this.cbFoodGroup.Name = "cbFoodGroup";
00084 this.table1.Add(this.cbFoodGroup);
00085 Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.cbFoodGroup]));
00086 w2.TopAttach = ((uint)(6));
00087 w2.BottomAttach = ((uint)(7));
00088 w2.LeftAttach = ((uint)(1));
00089 w2.RightAttach = ((uint)(2));
00090 w2.XOptions = ((Gtk.AttachOptions)(4));
00091 w2.YOptions = ((Gtk.AttachOptions)(4));
00092
00093 this.hbox1 = new Gtk.HBox();
00094 this.hbox1.Name = "hbox1";
00095 this.hbox1.Spacing = 6;
00096
00097 this.sbShelfDays = new Gtk.SpinButton(0, 3650, 1);
00098 this.sbShelfDays.TooltipMarkup = "How long this ingredient lasts while unopened";
00099 this.sbShelfDays.CanFocus = true;
00100 this.sbShelfDays.Name = "sbShelfDays";
00101 this.sbShelfDays.Adjustment.PageIncrement = 10;
00102 this.sbShelfDays.ClimbRate = 1;
00103 this.sbShelfDays.Numeric = true;
00104 this.hbox1.Add(this.sbShelfDays);
00105 Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox1[this.sbShelfDays]));
00106 w3.Position = 0;
00107 w3.Expand = false;
00108 w3.Fill = false;
00109
00110 this.label12 = new Gtk.Label();
00111 this.label12.Name = "label12";
00112 this.label12.LabelProp = Mono.Unix.Catalog.GetString("days");
00113 this.hbox1.Add(this.label12);
00114 Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox1[this.label12]));
00115 w4.Position = 1;
00116 w4.Expand = false;
00117 w4.Fill = false;
00118 this.table1.Add(this.hbox1);
00119 Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.hbox1]));
00120 w5.TopAttach = ((uint)(4));
00121 w5.BottomAttach = ((uint)(5));
00122 w5.LeftAttach = ((uint)(1));
00123 w5.RightAttach = ((uint)(2));
00124 w5.YOptions = ((Gtk.AttachOptions)(4));
00125
00126 this.hbox2 = new Gtk.HBox();
00127 this.hbox2.Name = "hbox2";
00128 this.hbox2.Spacing = 6;
00129
00130 this.sbOpenDays = new Gtk.SpinButton(0, 3650, 1);
00131 this.sbOpenDays.TooltipMarkup = "When this ingredient expires after it has been opened";
00132 this.sbOpenDays.CanFocus = true;
00133 this.sbOpenDays.Name = "sbOpenDays";
00134 this.sbOpenDays.Adjustment.PageIncrement = 10;
00135 this.sbOpenDays.ClimbRate = 1;
00136 this.sbOpenDays.Numeric = true;
00137 this.hbox2.Add(this.sbOpenDays);
00138 Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox2[this.sbOpenDays]));
00139 w6.Position = 0;
00140 w6.Expand = false;
00141 w6.Fill = false;
00142
00143 this.label13 = new Gtk.Label();
00144 this.label13.Name = "label13";
00145 this.label13.LabelProp = Mono.Unix.Catalog.GetString("days");
00146 this.hbox2.Add(this.label13);
00147 Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox2[this.label13]));
00148 w7.Position = 1;
00149 w7.Expand = false;
00150 w7.Fill = false;
00151 this.table1.Add(this.hbox2);
00152 Gtk.Table.TableChild w8 = ((Gtk.Table.TableChild)(this.table1[this.hbox2]));
00153 w8.TopAttach = ((uint)(5));
00154 w8.BottomAttach = ((uint)(6));
00155 w8.LeftAttach = ((uint)(1));
00156 w8.RightAttach = ((uint)(2));
00157 w8.YOptions = ((Gtk.AttachOptions)(4));
00158
00159 this.label1 = new Gtk.Label();
00160 this.label1.Name = "label1";
00161 this.label1.Xalign = 0F;
00162 this.label1.LabelProp = Mono.Unix.Catalog.GetString("<b>Full name:</b>");
00163 this.label1.UseMarkup = true;
00164 this.table1.Add(this.label1);
00165 Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.table1[this.label1]));
00166 w9.XOptions = ((Gtk.AttachOptions)(4));
00167 w9.YOptions = ((Gtk.AttachOptions)(4));
00168
00169 this.label2 = new Gtk.Label();
00170 this.label2.Name = "label2";
00171 this.label2.Xalign = 0F;
00172 this.label2.LabelProp = Mono.Unix.Catalog.GetString("<b>Abbreviated name:</b>");
00173 this.label2.UseMarkup = true;
00174 this.table1.Add(this.label2);
00175 Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.table1[this.label2]));
00176 w10.TopAttach = ((uint)(1));
00177 w10.BottomAttach = ((uint)(2));
00178 w10.XOptions = ((Gtk.AttachOptions)(4));
00179 w10.YOptions = ((Gtk.AttachOptions)(4));
00180
00181 this.label3 = new Gtk.Label();
00182 this.label3.Name = "label3";
00183 this.label3.Xalign = 0F;
00184 this.label3.LabelProp = Mono.Unix.Catalog.GetString("<b>Commercial name:</b>");
00185 this.label3.UseMarkup = true;
00186 this.table1.Add(this.label3);
00187 Gtk.Table.TableChild w11 = ((Gtk.Table.TableChild)(this.table1[this.label3]));
00188 w11.TopAttach = ((uint)(2));
00189 w11.BottomAttach = ((uint)(3));
00190 w11.XOptions = ((Gtk.AttachOptions)(4));
00191 w11.YOptions = ((Gtk.AttachOptions)(4));
00192
00193 this.label4 = new Gtk.Label();
00194 this.label4.Name = "label4";
00195 this.label4.Xalign = 0F;
00196 this.label4.LabelProp = Mono.Unix.Catalog.GetString("<b>Manufacturer:</b>");
00197 this.label4.UseMarkup = true;
00198 this.table1.Add(this.label4);
00199 Gtk.Table.TableChild w12 = ((Gtk.Table.TableChild)(this.table1[this.label4]));
00200 w12.TopAttach = ((uint)(3));
00201 w12.BottomAttach = ((uint)(4));
00202 w12.XOptions = ((Gtk.AttachOptions)(4));
00203 w12.YOptions = ((Gtk.AttachOptions)(4));
00204
00205 this.label5 = new Gtk.Label();
00206 this.label5.Name = "label5";
00207 this.label5.Xalign = 0F;
00208 this.label5.LabelProp = Mono.Unix.Catalog.GetString("<b>Shelf life:</b>");
00209 this.label5.UseMarkup = true;
00210 this.table1.Add(this.label5);
00211 Gtk.Table.TableChild w13 = ((Gtk.Table.TableChild)(this.table1[this.label5]));
00212 w13.TopAttach = ((uint)(4));
00213 w13.BottomAttach = ((uint)(5));
00214 w13.XOptions = ((Gtk.AttachOptions)(4));
00215 w13.YOptions = ((Gtk.AttachOptions)(4));
00216
00217 this.label6 = new Gtk.Label();
00218 this.label6.Name = "label6";
00219 this.label6.LabelProp = Mono.Unix.Catalog.GetString("<b>Expiration after opening:</b>");
00220 this.label6.UseMarkup = true;
00221 this.table1.Add(this.label6);
00222 Gtk.Table.TableChild w14 = ((Gtk.Table.TableChild)(this.table1[this.label6]));
00223 w14.TopAttach = ((uint)(5));
00224 w14.BottomAttach = ((uint)(6));
00225 w14.XOptions = ((Gtk.AttachOptions)(4));
00226 w14.YOptions = ((Gtk.AttachOptions)(4));
00227
00228 this.label7 = new Gtk.Label();
00229 this.label7.Name = "label7";
00230 this.label7.Xalign = 0F;
00231 this.label7.LabelProp = Mono.Unix.Catalog.GetString("<b>Category:</b>");
00232 this.label7.UseMarkup = true;
00233 this.table1.Add(this.label7);
00234 Gtk.Table.TableChild w15 = ((Gtk.Table.TableChild)(this.table1[this.label7]));
00235 w15.TopAttach = ((uint)(6));
00236 w15.BottomAttach = ((uint)(7));
00237 w15.XOptions = ((Gtk.AttachOptions)(4));
00238 w15.YOptions = ((Gtk.AttachOptions)(4));
00239
00240 this.txtCommercialName = new Gtk.Entry();
00241 this.txtCommercialName.CanFocus = true;
00242 this.txtCommercialName.Name = "txtCommercialName";
00243 this.txtCommercialName.IsEditable = true;
00244 this.txtCommercialName.InvisibleChar = '•';
00245 this.table1.Add(this.txtCommercialName);
00246 Gtk.Table.TableChild w16 = ((Gtk.Table.TableChild)(this.table1[this.txtCommercialName]));
00247 w16.TopAttach = ((uint)(2));
00248 w16.BottomAttach = ((uint)(3));
00249 w16.LeftAttach = ((uint)(1));
00250 w16.RightAttach = ((uint)(2));
00251 w16.XOptions = ((Gtk.AttachOptions)(4));
00252 w16.YOptions = ((Gtk.AttachOptions)(4));
00253
00254 this.txtLongDescription = new Gtk.Entry();
00255 this.txtLongDescription.TooltipMarkup = "The name of the ingredient to be displayed";
00256 this.txtLongDescription.CanFocus = true;
00257 this.txtLongDescription.Name = "txtLongDescription";
00258 this.txtLongDescription.IsEditable = true;
00259 this.txtLongDescription.InvisibleChar = '•';
00260 this.table1.Add(this.txtLongDescription);
00261 Gtk.Table.TableChild w17 = ((Gtk.Table.TableChild)(this.table1[this.txtLongDescription]));
00262 w17.LeftAttach = ((uint)(1));
00263 w17.RightAttach = ((uint)(2));
00264 w17.YOptions = ((Gtk.AttachOptions)(4));
00265
00266 this.txtManufacturer = new Gtk.Entry();
00267 this.txtManufacturer.CanFocus = true;
00268 this.txtManufacturer.Name = "txtManufacturer";
00269 this.txtManufacturer.IsEditable = true;
00270 this.txtManufacturer.InvisibleChar = '•';
00271 this.table1.Add(this.txtManufacturer);
00272 Gtk.Table.TableChild w18 = ((Gtk.Table.TableChild)(this.table1[this.txtManufacturer]));
00273 w18.TopAttach = ((uint)(3));
00274 w18.BottomAttach = ((uint)(4));
00275 w18.LeftAttach = ((uint)(1));
00276 w18.RightAttach = ((uint)(2));
00277 w18.XOptions = ((Gtk.AttachOptions)(4));
00278 w18.YOptions = ((Gtk.AttachOptions)(4));
00279
00280 this.txtShortDescription = new Gtk.Entry();
00281 this.txtShortDescription.CanFocus = true;
00282 this.txtShortDescription.Name = "txtShortDescription";
00283 this.txtShortDescription.IsEditable = true;
00284 this.txtShortDescription.InvisibleChar = '•';
00285 this.table1.Add(this.txtShortDescription);
00286 Gtk.Table.TableChild w19 = ((Gtk.Table.TableChild)(this.table1[this.txtShortDescription]));
00287 w19.TopAttach = ((uint)(1));
00288 w19.BottomAttach = ((uint)(2));
00289 w19.LeftAttach = ((uint)(1));
00290 w19.RightAttach = ((uint)(2));
00291 w19.XOptions = ((Gtk.AttachOptions)(4));
00292 w19.YOptions = ((Gtk.AttachOptions)(4));
00293 w1.Add(this.table1);
00294 Gtk.Box.BoxChild w20 = ((Gtk.Box.BoxChild)(w1[this.table1]));
00295 w20.Position = 0;
00296 w20.Expand = false;
00297
00298 this.label8 = new Gtk.Label();
00299 this.label8.Name = "label8";
00300 this.label8.Xalign = 0F;
00301 this.label8.LabelProp = Mono.Unix.Catalog.GetString("Nutritional details per 100g:");
00302 w1.Add(this.label8);
00303 Gtk.Box.BoxChild w21 = ((Gtk.Box.BoxChild)(w1[this.label8]));
00304 w21.Position = 1;
00305 w21.Expand = false;
00306 w21.Fill = false;
00307
00308 this.GtkScrolledWindow = new Gtk.ScrolledWindow();
00309 this.GtkScrolledWindow.Name = "GtkScrolledWindow";
00310 this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
00311
00312 this.nutrientsView = new Gtk.NodeView();
00313 this.nutrientsView.CanFocus = true;
00314 this.nutrientsView.Name = "nutrientsView";
00315 this.nutrientsView.HoverSelection = true;
00316 this.GtkScrolledWindow.Add(this.nutrientsView);
00317 w1.Add(this.GtkScrolledWindow);
00318 Gtk.Box.BoxChild w23 = ((Gtk.Box.BoxChild)(w1[this.GtkScrolledWindow]));
00319 w23.Position = 2;
00320
00321 Gtk.HButtonBox w24 = this.ActionArea;
00322 w24.Name = "dialog1_ActionArea";
00323 w24.Spacing = 6;
00324 w24.BorderWidth = ((uint)(5));
00325 w24.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
00326
00327 this.btnDelete = new Gtk.Button();
00328 this.btnDelete.TooltipMarkup = "Deletes this ingredient";
00329 this.btnDelete.CanFocus = true;
00330 this.btnDelete.Name = "btnDelete";
00331 this.btnDelete.UseUnderline = true;
00332
00333 Gtk.Alignment w25 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00334
00335 Gtk.HBox w26 = new Gtk.HBox();
00336 w26.Spacing = 2;
00337
00338 Gtk.Image w27 = new Gtk.Image();
00339 w27.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-delete", Gtk.IconSize.Menu, 16);
00340 w26.Add(w27);
00341
00342 Gtk.Label w29 = new Gtk.Label();
00343 w29.LabelProp = Mono.Unix.Catalog.GetString("_Delete");
00344 w29.UseUnderline = true;
00345 w26.Add(w29);
00346 w25.Add(w26);
00347 this.btnDelete.Add(w25);
00348 this.AddActionWidget(this.btnDelete, -2);
00349 Gtk.ButtonBox.ButtonBoxChild w33 = ((Gtk.ButtonBox.ButtonBoxChild)(w24[this.btnDelete]));
00350 w33.Expand = false;
00351 w33.Fill = false;
00352
00353 this.buttonCancel = new Gtk.Button();
00354 this.buttonCancel.TooltipMarkup = "Cancel any changes made to this ingredient";
00355 this.buttonCancel.CanDefault = true;
00356 this.buttonCancel.CanFocus = true;
00357 this.buttonCancel.Name = "buttonCancel";
00358 this.buttonCancel.UseUnderline = true;
00359
00360 Gtk.Alignment w34 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00361
00362 Gtk.HBox w35 = new Gtk.HBox();
00363 w35.Spacing = 2;
00364
00365 Gtk.Image w36 = new Gtk.Image();
00366 w36.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-cancel", Gtk.IconSize.Menu, 16);
00367 w35.Add(w36);
00368
00369 Gtk.Label w38 = new Gtk.Label();
00370 w38.LabelProp = Mono.Unix.Catalog.GetString("_Cancel");
00371 w38.UseUnderline = true;
00372 w35.Add(w38);
00373 w34.Add(w35);
00374 this.buttonCancel.Add(w34);
00375 this.AddActionWidget(this.buttonCancel, -6);
00376 Gtk.ButtonBox.ButtonBoxChild w42 = ((Gtk.ButtonBox.ButtonBoxChild)(w24[this.buttonCancel]));
00377 w42.Position = 1;
00378 w42.Expand = false;
00379 w42.Fill = false;
00380
00381 this.buttonOk = new Gtk.Button();
00382 this.buttonOk.TooltipMarkup = "Saves changes made to this ingredient";
00383 this.buttonOk.CanDefault = true;
00384 this.buttonOk.CanFocus = true;
00385 this.buttonOk.Name = "buttonOk";
00386 this.buttonOk.UseUnderline = true;
00387
00388 Gtk.Alignment w43 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00389
00390 Gtk.HBox w44 = new Gtk.HBox();
00391 w44.Spacing = 2;
00392
00393 Gtk.Image w45 = new Gtk.Image();
00394 w45.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-apply", Gtk.IconSize.Menu, 16);
00395 w44.Add(w45);
00396
00397 Gtk.Label w47 = new Gtk.Label();
00398 w47.LabelProp = Mono.Unix.Catalog.GetString("_Save");
00399 w47.UseUnderline = true;
00400 w44.Add(w47);
00401 w43.Add(w44);
00402 this.buttonOk.Add(w43);
00403 this.AddActionWidget(this.buttonOk, -5);
00404 Gtk.ButtonBox.ButtonBoxChild w51 = ((Gtk.ButtonBox.ButtonBoxChild)(w24[this.buttonOk]));
00405 w51.Position = 2;
00406 w51.Expand = false;
00407 w51.Fill = false;
00408 if ((this.Child != null)) {
00409 this.Child.ShowAll();
00410 }
00411 this.DefaultWidth = 426;
00412 this.DefaultHeight = 512;
00413 this.Show();
00414 this.nutrientsView.RowActivated += new Gtk.RowActivatedHandler(this.OnNutrientsViewRowActivated);
00415 }
00416 }
00417 }