00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 namespace Foodolini.Activities.Ingredients {
00012
00013
00014 public partial class IngredientSelector {
00015
00016 private Foodolini.Activities.Ingredients.IngredientsActivity ingredientsactivity;
00017
00018 private Gtk.HBox hbox;
00019
00020 private Gtk.Label lblQuantity;
00021
00022 private Gtk.SpinButton sbQuantity;
00023
00024 private Gtk.Button buttonCancel;
00025
00026 private Gtk.Button buttonOk;
00027
00028 protected virtual void Build() {
00029 Stetic.Gui.Initialize(this);
00030
00031 this.Name = "Foodolini.Activities.Ingredients.IngredientSelector";
00032 this.WindowPosition = ((Gtk.WindowPosition)(4));
00033
00034 Gtk.VBox w1 = this.VBox;
00035 w1.Name = "vBox";
00036 w1.BorderWidth = ((uint)(2));
00037
00038 this.ingredientsactivity = new Foodolini.Activities.Ingredients.IngredientsActivity();
00039 this.ingredientsactivity.Events = ((Gdk.EventMask)(256));
00040 this.ingredientsactivity.Name = "ingredientsactivity";
00041 w1.Add(this.ingredientsactivity);
00042 Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.ingredientsactivity]));
00043 w2.Position = 0;
00044
00045 this.hbox = new Gtk.HBox();
00046 this.hbox.Name = "hbox";
00047 this.hbox.Spacing = 6;
00048 this.hbox.BorderWidth = ((uint)(6));
00049
00050 this.lblQuantity = new Gtk.Label();
00051 this.lblQuantity.Name = "lblQuantity";
00052 this.lblQuantity.LabelProp = Mono.Unix.Catalog.GetString("<b>Quantity (g):</b>");
00053 this.lblQuantity.UseMarkup = true;
00054 this.hbox.Add(this.lblQuantity);
00055 Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox[this.lblQuantity]));
00056 w3.Position = 0;
00057 w3.Expand = false;
00058 w3.Fill = false;
00059
00060 this.sbQuantity = new Gtk.SpinButton(0, 100000, 50);
00061 this.sbQuantity.TooltipMarkup = "The quantity to add of the selected ingredient";
00062 this.sbQuantity.CanFocus = true;
00063 this.sbQuantity.Name = "sbQuantity";
00064 this.sbQuantity.Adjustment.PageIncrement = 10;
00065 this.sbQuantity.ClimbRate = 1;
00066 this.sbQuantity.Numeric = true;
00067 this.hbox.Add(this.sbQuantity);
00068 Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox[this.sbQuantity]));
00069 w4.Position = 1;
00070 w4.Expand = false;
00071 w4.Fill = false;
00072 w1.Add(this.hbox);
00073 Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(w1[this.hbox]));
00074 w5.Position = 1;
00075 w5.Expand = false;
00076 w5.Fill = false;
00077
00078 Gtk.HButtonBox w6 = this.ActionArea;
00079 w6.Name = "dialog1_ActionArea";
00080 w6.Spacing = 6;
00081 w6.BorderWidth = ((uint)(5));
00082 w6.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
00083
00084 this.buttonCancel = new Gtk.Button();
00085 this.buttonCancel.TooltipMarkup = "Cancel selecting ingredient";
00086 this.buttonCancel.CanDefault = true;
00087 this.buttonCancel.CanFocus = true;
00088 this.buttonCancel.Name = "buttonCancel";
00089 this.buttonCancel.UseUnderline = true;
00090
00091 Gtk.Alignment w7 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00092
00093 Gtk.HBox w8 = new Gtk.HBox();
00094 w8.Spacing = 2;
00095
00096 Gtk.Image w9 = new Gtk.Image();
00097 w9.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-cancel", Gtk.IconSize.Menu, 16);
00098 w8.Add(w9);
00099
00100 Gtk.Label w11 = new Gtk.Label();
00101 w11.LabelProp = Mono.Unix.Catalog.GetString("_Cancel");
00102 w11.UseUnderline = true;
00103 w8.Add(w11);
00104 w7.Add(w8);
00105 this.buttonCancel.Add(w7);
00106 this.AddActionWidget(this.buttonCancel, -6);
00107 Gtk.ButtonBox.ButtonBoxChild w15 = ((Gtk.ButtonBox.ButtonBoxChild)(w6[this.buttonCancel]));
00108 w15.Expand = false;
00109 w15.Fill = false;
00110
00111 this.buttonOk = new Gtk.Button();
00112 this.buttonOk.TooltipMarkup = "Choose the selected ingredient";
00113 this.buttonOk.Sensitive = false;
00114 this.buttonOk.CanDefault = true;
00115 this.buttonOk.CanFocus = true;
00116 this.buttonOk.Name = "buttonOk";
00117 this.buttonOk.UseUnderline = true;
00118
00119 Gtk.Alignment w16 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00120
00121 Gtk.HBox w17 = new Gtk.HBox();
00122 w17.Spacing = 2;
00123
00124 Gtk.Image w18 = new Gtk.Image();
00125 w18.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-apply", Gtk.IconSize.Menu, 16);
00126 w17.Add(w18);
00127
00128 Gtk.Label w20 = new Gtk.Label();
00129 w20.LabelProp = Mono.Unix.Catalog.GetString("_OK");
00130 w20.UseUnderline = true;
00131 w17.Add(w20);
00132 w16.Add(w17);
00133 this.buttonOk.Add(w16);
00134 this.AddActionWidget(this.buttonOk, -5);
00135 Gtk.ButtonBox.ButtonBoxChild w24 = ((Gtk.ButtonBox.ButtonBoxChild)(w6[this.buttonOk]));
00136 w24.Position = 1;
00137 w24.Expand = false;
00138 w24.Fill = false;
00139 if ((this.Child != null)) {
00140 this.Child.ShowAll();
00141 }
00142 this.DefaultWidth = 928;
00143 this.DefaultHeight = 686;
00144 this.hbox.Hide();
00145 this.Show();
00146 }
00147 }
00148 }