00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 namespace Foodolini.Activities {
00012
00013
00014 public partial class CookbookActivity {
00015
00016 private Gtk.HBox bxCookbook;
00017
00018 private Gtk.VBox bxSearchRecipe;
00019
00020 private Gtk.HBox hbox3;
00021
00022 private Gtk.Table table2;
00023
00024 private Gtk.Entry entSearchRecipes;
00025
00026 private Gtk.Expander expAdvancedCriteria;
00027
00028 private Gtk.Table table1;
00029
00030 private Gtk.CheckButton cbExpirateDate;
00031
00032 private Gtk.CheckButton cbRating;
00033
00034 private Gtk.HScale scExpirationDate;
00035
00036 private Gtk.HScale scRating;
00037
00038 private Gtk.Label GtkLabel8;
00039
00040 private Gtk.HBox hbox2;
00041
00042 private Gtk.Label label3;
00043
00044 private Gtk.Button btnSearch;
00045
00046 private Gtk.HBox hbox4;
00047
00048 private Gtk.CheckButton cbBreakfast;
00049
00050 private Gtk.CheckButton cbLunch;
00051
00052 private Gtk.CheckButton cbDinner;
00053
00054 private Gtk.CheckButton cbOther;
00055
00056 private Gtk.HSeparator hseparator1;
00057
00058 private Gtk.Label label1;
00059
00060 private Gtk.Label label2;
00061
00062 private Gtk.Label label5;
00063
00064 private Gtk.ScrolledWindow GtkScrolledWindow;
00065
00066 private Gtk.NodeView nvRecipes;
00067
00068 private Gtk.HBox hbox5;
00069
00070 private Gtk.Button btnCreateRecipe;
00071
00072 private Gtk.Label label4;
00073
00074 protected virtual void Build() {
00075 Stetic.Gui.Initialize(this);
00076
00077 Stetic.BinContainer.Attach(this);
00078 this.Name = "Foodolini.Activities.CookbookActivity";
00079
00080 this.bxCookbook = new Gtk.HBox();
00081 this.bxCookbook.Name = "bxCookbook";
00082 this.bxCookbook.Spacing = 6;
00083 this.bxCookbook.BorderWidth = ((uint)(9));
00084
00085 this.bxSearchRecipe = new Gtk.VBox();
00086 this.bxSearchRecipe.Name = "bxSearchRecipe";
00087 this.bxSearchRecipe.Spacing = 6;
00088
00089 this.hbox3 = new Gtk.HBox();
00090 this.hbox3.Name = "hbox3";
00091 this.hbox3.Spacing = 6;
00092
00093 this.table2 = new Gtk.Table(((uint)(6)), ((uint)(2)), false);
00094 this.table2.Name = "table2";
00095 this.table2.RowSpacing = ((uint)(6));
00096 this.table2.ColumnSpacing = ((uint)(6));
00097
00098 this.entSearchRecipes = new Gtk.Entry();
00099 this.entSearchRecipes.CanFocus = true;
00100 this.entSearchRecipes.Name = "entSearchRecipes";
00101 this.entSearchRecipes.IsEditable = true;
00102 this.entSearchRecipes.InvisibleChar = '●';
00103 this.table2.Add(this.entSearchRecipes);
00104 Gtk.Table.TableChild w1 = ((Gtk.Table.TableChild)(this.table2[this.entSearchRecipes]));
00105 w1.TopAttach = ((uint)(3));
00106 w1.BottomAttach = ((uint)(4));
00107 w1.LeftAttach = ((uint)(1));
00108 w1.RightAttach = ((uint)(2));
00109 w1.YOptions = ((Gtk.AttachOptions)(4));
00110
00111 this.expAdvancedCriteria = new Gtk.Expander(null);
00112 this.expAdvancedCriteria.CanFocus = true;
00113 this.expAdvancedCriteria.Name = "expAdvancedCriteria";
00114 this.expAdvancedCriteria.Expanded = true;
00115
00116 this.table1 = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
00117 this.table1.Name = "table1";
00118 this.table1.RowSpacing = ((uint)(6));
00119 this.table1.ColumnSpacing = ((uint)(6));
00120
00121 this.cbExpirateDate = new Gtk.CheckButton();
00122 this.cbExpirateDate.TooltipMarkup = "Search by expiration date, and the recipes with fooditems about to expire will be at the top of the list.\nSelect the importance in the scale.";
00123 this.cbExpirateDate.CanFocus = true;
00124 this.cbExpirateDate.Name = "cbExpirateDate";
00125 this.cbExpirateDate.Label = Mono.Unix.Catalog.GetString("E_xpiration date");
00126 this.cbExpirateDate.DrawIndicator = true;
00127 this.cbExpirateDate.UseUnderline = true;
00128 this.table1.Add(this.cbExpirateDate);
00129 Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.cbExpirateDate]));
00130 w2.XOptions = ((Gtk.AttachOptions)(4));
00131 w2.YOptions = ((Gtk.AttachOptions)(4));
00132
00133 this.cbRating = new Gtk.CheckButton();
00134 this.cbRating.TooltipMarkup = "Search by rating, and the recipes with the higest average rating will be at the top of the list.\nSelect the importance in the scale.";
00135 this.cbRating.CanFocus = true;
00136 this.cbRating.Name = "cbRating";
00137 this.cbRating.Label = Mono.Unix.Catalog.GetString("_Rating");
00138 this.cbRating.DrawIndicator = true;
00139 this.cbRating.UseUnderline = true;
00140 this.table1.Add(this.cbRating);
00141 Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.cbRating]));
00142 w3.TopAttach = ((uint)(1));
00143 w3.BottomAttach = ((uint)(2));
00144 w3.XOptions = ((Gtk.AttachOptions)(4));
00145 w3.YOptions = ((Gtk.AttachOptions)(4));
00146
00147 this.scExpirationDate = new Gtk.HScale(null);
00148 this.scExpirationDate.CanFocus = true;
00149 this.scExpirationDate.Name = "scExpirationDate";
00150 this.scExpirationDate.Adjustment.Lower = 1;
00151 this.scExpirationDate.Adjustment.Upper = 5;
00152 this.scExpirationDate.Adjustment.PageIncrement = 1;
00153 this.scExpirationDate.Adjustment.StepIncrement = 1;
00154 this.scExpirationDate.Adjustment.Value = 1;
00155 this.scExpirationDate.DrawValue = true;
00156 this.scExpirationDate.Digits = 0;
00157 this.scExpirationDate.ValuePos = ((Gtk.PositionType)(2));
00158 this.table1.Add(this.scExpirationDate);
00159 Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.scExpirationDate]));
00160 w4.LeftAttach = ((uint)(1));
00161 w4.RightAttach = ((uint)(2));
00162 w4.YOptions = ((Gtk.AttachOptions)(4));
00163
00164 this.scRating = new Gtk.HScale(null);
00165 this.scRating.CanFocus = true;
00166 this.scRating.Name = "scRating";
00167 this.scRating.Adjustment.Lower = 1;
00168 this.scRating.Adjustment.Upper = 5;
00169 this.scRating.Adjustment.PageIncrement = 1;
00170 this.scRating.Adjustment.StepIncrement = 1;
00171 this.scRating.Adjustment.Value = 1;
00172 this.scRating.DrawValue = true;
00173 this.scRating.Digits = 0;
00174 this.scRating.ValuePos = ((Gtk.PositionType)(2));
00175 this.table1.Add(this.scRating);
00176 Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.scRating]));
00177 w5.TopAttach = ((uint)(1));
00178 w5.BottomAttach = ((uint)(2));
00179 w5.LeftAttach = ((uint)(1));
00180 w5.RightAttach = ((uint)(2));
00181 w5.YOptions = ((Gtk.AttachOptions)(4));
00182 this.expAdvancedCriteria.Add(this.table1);
00183 this.GtkLabel8 = new Gtk.Label();
00184 this.GtkLabel8.Name = "GtkLabel8";
00185 this.GtkLabel8.LabelProp = Mono.Unix.Catalog.GetString("Advanced search _criteria");
00186 this.GtkLabel8.UseUnderline = true;
00187 this.expAdvancedCriteria.LabelWidget = this.GtkLabel8;
00188 this.table2.Add(this.expAdvancedCriteria);
00189 Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table2[this.expAdvancedCriteria]));
00190 w7.TopAttach = ((uint)(4));
00191 w7.BottomAttach = ((uint)(5));
00192 w7.RightAttach = ((uint)(2));
00193 w7.XOptions = ((Gtk.AttachOptions)(4));
00194
00195 this.hbox2 = new Gtk.HBox();
00196 this.hbox2.Name = "hbox2";
00197 this.hbox2.Spacing = 6;
00198
00199 this.label3 = new Gtk.Label();
00200 this.label3.Name = "label3";
00201 this.hbox2.Add(this.label3);
00202 Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox2[this.label3]));
00203 w8.Position = 0;
00204
00205 this.btnSearch = new Gtk.Button();
00206 this.btnSearch.WidthRequest = 210;
00207 this.btnSearch.CanFocus = true;
00208 this.btnSearch.Name = "btnSearch";
00209 this.btnSearch.UseUnderline = true;
00210
00211 Gtk.Alignment w9 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00212
00213 Gtk.HBox w10 = new Gtk.HBox();
00214 w10.Spacing = 2;
00215
00216 Gtk.Image w11 = new Gtk.Image();
00217 w11.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-find", Gtk.IconSize.Menu, 16);
00218 w10.Add(w11);
00219
00220 Gtk.Label w13 = new Gtk.Label();
00221 w13.LabelProp = Mono.Unix.Catalog.GetString("_Search");
00222 w13.UseUnderline = true;
00223 w10.Add(w13);
00224 w9.Add(w10);
00225 this.btnSearch.Add(w9);
00226 this.hbox2.Add(this.btnSearch);
00227 Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(this.hbox2[this.btnSearch]));
00228 w17.Position = 1;
00229 w17.Expand = false;
00230 w17.Fill = false;
00231 this.table2.Add(this.hbox2);
00232 Gtk.Table.TableChild w18 = ((Gtk.Table.TableChild)(this.table2[this.hbox2]));
00233 w18.TopAttach = ((uint)(5));
00234 w18.BottomAttach = ((uint)(6));
00235 w18.LeftAttach = ((uint)(1));
00236 w18.RightAttach = ((uint)(2));
00237 w18.XOptions = ((Gtk.AttachOptions)(4));
00238 w18.YOptions = ((Gtk.AttachOptions)(4));
00239
00240 this.hbox4 = new Gtk.HBox();
00241 this.hbox4.Name = "hbox4";
00242 this.hbox4.Spacing = 6;
00243
00244 this.cbBreakfast = new Gtk.CheckButton();
00245 this.cbBreakfast.CanFocus = true;
00246 this.cbBreakfast.Name = "cbBreakfast";
00247 this.cbBreakfast.Label = Mono.Unix.Catalog.GetString("_Breakfast");
00248 this.cbBreakfast.DrawIndicator = true;
00249 this.cbBreakfast.UseUnderline = true;
00250 this.hbox4.Add(this.cbBreakfast);
00251 Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.hbox4[this.cbBreakfast]));
00252 w19.Position = 0;
00253
00254 this.cbLunch = new Gtk.CheckButton();
00255 this.cbLunch.CanFocus = true;
00256 this.cbLunch.Name = "cbLunch";
00257 this.cbLunch.Label = Mono.Unix.Catalog.GetString("_Lunch");
00258 this.cbLunch.DrawIndicator = true;
00259 this.cbLunch.UseUnderline = true;
00260 this.hbox4.Add(this.cbLunch);
00261 Gtk.Box.BoxChild w20 = ((Gtk.Box.BoxChild)(this.hbox4[this.cbLunch]));
00262 w20.Position = 1;
00263
00264 this.cbDinner = new Gtk.CheckButton();
00265 this.cbDinner.CanFocus = true;
00266 this.cbDinner.Name = "cbDinner";
00267 this.cbDinner.Label = Mono.Unix.Catalog.GetString("_Dinner");
00268 this.cbDinner.DrawIndicator = true;
00269 this.cbDinner.UseUnderline = true;
00270 this.hbox4.Add(this.cbDinner);
00271 Gtk.Box.BoxChild w21 = ((Gtk.Box.BoxChild)(this.hbox4[this.cbDinner]));
00272 w21.Position = 2;
00273
00274 this.cbOther = new Gtk.CheckButton();
00275 this.cbOther.CanFocus = true;
00276 this.cbOther.Name = "cbOther";
00277 this.cbOther.Label = Mono.Unix.Catalog.GetString("_Other");
00278 this.cbOther.DrawIndicator = true;
00279 this.cbOther.UseUnderline = true;
00280 this.hbox4.Add(this.cbOther);
00281 Gtk.Box.BoxChild w22 = ((Gtk.Box.BoxChild)(this.hbox4[this.cbOther]));
00282 w22.Position = 3;
00283 this.table2.Add(this.hbox4);
00284 Gtk.Table.TableChild w23 = ((Gtk.Table.TableChild)(this.table2[this.hbox4]));
00285 w23.TopAttach = ((uint)(2));
00286 w23.BottomAttach = ((uint)(3));
00287 w23.RightAttach = ((uint)(2));
00288 w23.XOptions = ((Gtk.AttachOptions)(4));
00289 w23.YOptions = ((Gtk.AttachOptions)(4));
00290
00291 this.hseparator1 = new Gtk.HSeparator();
00292 this.hseparator1.Name = "hseparator1";
00293 this.table2.Add(this.hseparator1);
00294 Gtk.Table.TableChild w24 = ((Gtk.Table.TableChild)(this.table2[this.hseparator1]));
00295 w24.TopAttach = ((uint)(1));
00296 w24.BottomAttach = ((uint)(2));
00297 w24.RightAttach = ((uint)(2));
00298 w24.XOptions = ((Gtk.AttachOptions)(4));
00299 w24.YOptions = ((Gtk.AttachOptions)(4));
00300
00301 this.label1 = new Gtk.Label();
00302 this.label1.Name = "label1";
00303 this.label1.Xalign = 0F;
00304 this.label1.LabelProp = Mono.Unix.Catalog.GetString("<i>To search for recipes, select a meal type, and enter any search criteria.\nUse the advanced search criteria for more advanced search methods.</i>");
00305 this.label1.UseMarkup = true;
00306 this.table2.Add(this.label1);
00307 Gtk.Table.TableChild w25 = ((Gtk.Table.TableChild)(this.table2[this.label1]));
00308 w25.RightAttach = ((uint)(2));
00309 w25.XOptions = ((Gtk.AttachOptions)(4));
00310 w25.YOptions = ((Gtk.AttachOptions)(4));
00311
00312 this.label2 = new Gtk.Label();
00313 this.label2.Name = "label2";
00314 this.label2.Xalign = 0F;
00315 this.label2.LabelProp = Mono.Unix.Catalog.GetString("Keyword search:");
00316 this.table2.Add(this.label2);
00317 Gtk.Table.TableChild w26 = ((Gtk.Table.TableChild)(this.table2[this.label2]));
00318 w26.TopAttach = ((uint)(3));
00319 w26.BottomAttach = ((uint)(4));
00320 w26.XOptions = ((Gtk.AttachOptions)(0));
00321 w26.YOptions = ((Gtk.AttachOptions)(4));
00322 this.hbox3.Add(this.table2);
00323 Gtk.Box.BoxChild w27 = ((Gtk.Box.BoxChild)(this.hbox3[this.table2]));
00324 w27.Position = 0;
00325 w27.Expand = false;
00326
00327 this.label5 = new Gtk.Label();
00328 this.label5.Name = "label5";
00329 this.hbox3.Add(this.label5);
00330 Gtk.Box.BoxChild w28 = ((Gtk.Box.BoxChild)(this.hbox3[this.label5]));
00331 w28.Position = 1;
00332 this.bxSearchRecipe.Add(this.hbox3);
00333 Gtk.Box.BoxChild w29 = ((Gtk.Box.BoxChild)(this.bxSearchRecipe[this.hbox3]));
00334 w29.Position = 0;
00335 w29.Expand = false;
00336 w29.Fill = false;
00337
00338 this.GtkScrolledWindow = new Gtk.ScrolledWindow();
00339 this.GtkScrolledWindow.Name = "GtkScrolledWindow";
00340 this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
00341
00342 this.nvRecipes = new Gtk.NodeView();
00343 this.nvRecipes.CanFocus = true;
00344 this.nvRecipes.Name = "nvRecipes";
00345 this.GtkScrolledWindow.Add(this.nvRecipes);
00346 this.bxSearchRecipe.Add(this.GtkScrolledWindow);
00347 Gtk.Box.BoxChild w31 = ((Gtk.Box.BoxChild)(this.bxSearchRecipe[this.GtkScrolledWindow]));
00348 w31.Position = 1;
00349
00350 this.hbox5 = new Gtk.HBox();
00351 this.hbox5.Name = "hbox5";
00352 this.hbox5.Spacing = 6;
00353
00354 this.btnCreateRecipe = new Gtk.Button();
00355 this.btnCreateRecipe.CanFocus = true;
00356 this.btnCreateRecipe.Name = "btnCreateRecipe";
00357 this.btnCreateRecipe.UseUnderline = true;
00358
00359 Gtk.Alignment w32 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00360
00361 Gtk.HBox w33 = new Gtk.HBox();
00362 w33.Spacing = 2;
00363
00364 Gtk.Image w34 = new Gtk.Image();
00365 w34.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-add", Gtk.IconSize.Menu, 16);
00366 w33.Add(w34);
00367
00368 Gtk.Label w36 = new Gtk.Label();
00369 w36.LabelProp = Mono.Unix.Catalog.GetString("Create _new recipe");
00370 w36.UseUnderline = true;
00371 w33.Add(w36);
00372 w32.Add(w33);
00373 this.btnCreateRecipe.Add(w32);
00374 this.hbox5.Add(this.btnCreateRecipe);
00375 Gtk.Box.BoxChild w40 = ((Gtk.Box.BoxChild)(this.hbox5[this.btnCreateRecipe]));
00376 w40.Position = 0;
00377 w40.Expand = false;
00378 w40.Fill = false;
00379
00380 this.label4 = new Gtk.Label();
00381 this.label4.Name = "label4";
00382 this.hbox5.Add(this.label4);
00383 Gtk.Box.BoxChild w41 = ((Gtk.Box.BoxChild)(this.hbox5[this.label4]));
00384 w41.Position = 1;
00385 this.bxSearchRecipe.Add(this.hbox5);
00386 Gtk.Box.BoxChild w42 = ((Gtk.Box.BoxChild)(this.bxSearchRecipe[this.hbox5]));
00387 w42.Position = 2;
00388 w42.Expand = false;
00389 w42.Fill = false;
00390 this.bxCookbook.Add(this.bxSearchRecipe);
00391 Gtk.Box.BoxChild w43 = ((Gtk.Box.BoxChild)(this.bxCookbook[this.bxSearchRecipe]));
00392 w43.Position = 0;
00393 this.Add(this.bxCookbook);
00394 if ((this.Child != null)) {
00395 this.Child.ShowAll();
00396 }
00397 this.Hide();
00398 this.btnSearch.Clicked += new System.EventHandler(this.OnBtnSearchClicked);
00399 this.scRating.ValueChanged += new System.EventHandler(this.SearchCriteriaChanged);
00400 this.cbRating.Toggled += new System.EventHandler(this.SearchCriteriaChanged);
00401 this.cbExpirateDate.Toggled += new System.EventHandler(this.SearchCriteriaChanged);
00402 this.entSearchRecipes.Activated += new System.EventHandler(this.OnEntSearchRecipesActivated);
00403 this.nvRecipes.CursorChanged += new System.EventHandler(this.ViewRecipe);
00404 this.nvRecipes.RowActivated += new Gtk.RowActivatedHandler(this.EditRecipe);
00405 this.btnCreateRecipe.Clicked += new System.EventHandler(this.OnCreateRecipeClick);
00406 }
00407 }
00408 }