Files @ 2040107278aa
Branch filter:

Location: ATITD-Tools/Desert-Paint-Lab/gtk-gui/MainWindow.cs

jmaltzen
Fixes #8 #9 #6 #3 : Order of ingredients should now match the paint bench. Basic brute-force recipe generation implementation. Fixed rounding error on the simulator. Give feedback when using the simulator if reactions are missing. Also: adds an interface for modifying ingredient settings for recipe generation, adds a help option to view missing recorded reactions

// This file has been generated by the GUI designer. Do not modify.

public partial class MainWindow
{
	private global::Gtk.UIManager UIManager;
	
	private global::Gtk.Action FileAction;
	
	private global::Gtk.Action HelpAction;
	
	private global::Gtk.Action AboutAction;
	
	private global::Gtk.Action NewProfileAction;
	
	private global::Gtk.Action OpenProfileAction;
	
	private global::Gtk.Action ExitAction;
	
	private global::Gtk.Action ExportForPracticalPaintAction;
	
	private global::Gtk.Action WindowAction;
	
	private global::Gtk.Action RunSimulatorAction;
	
	private global::Gtk.Action DebugAction;
	
	private global::Gtk.Action ScreenshotAction;
	
	private global::Gtk.Action RecipesAction;
	
	private global::Gtk.Action ReactionStatusAction;
	
	private global::Gtk.Action IngredientsAction;
	
	private global::Gtk.VBox vbox1;
	
	private global::Gtk.MenuBar menubar1;
	
	private global::Gtk.HBox hbox1;
	
	private global::Gtk.Frame frame2;
	
	private global::Gtk.Alignment GtkAlignment;
	
	private global::Gtk.VBox vbox3;
	
	private global::Gtk.HBox hbox6;
	
	private global::Gtk.Label label4;
	
	private global::Gtk.ComboBox ingredient1ComboBox;
	
	private global::Gtk.HBox hbox7;
	
	private global::Gtk.Label label5;
	
	private global::Gtk.ComboBox ingredient2ComboBox;
	
	private global::Gtk.HBox hbox8;
	
	private global::Gtk.Label label6;
	
	private global::Gtk.ComboBox ingredient3ComboBox;
	
	private global::Gtk.Label GtkLabel2;
	
	private global::Gtk.Frame frame3;
	
	private global::Gtk.Alignment GtkAlignment1;
	
	private global::Gtk.VBox vbox4;
	
	private global::DesertPaintLab.PaintSwatch unmodifiedSwatch;
	
	private global::Gtk.Button captureButton;
	
	private global::Gtk.Label GtkLabel25;
	
	private global::Gtk.Frame frame4;
	
	private global::Gtk.Alignment GtkAlignment2;
	
	private global::Gtk.VBox vbox5;
	
	private global::DesertPaintLab.PaintSwatch reactionSwatch;
	
	private global::Gtk.Button saveButton;
	
	private global::Gtk.Label GtkLabel26;
	
	private global::Gtk.Statusbar statusBar;

	protected virtual void Build ()
	{
		global::Stetic.Gui.Initialize (this);
		// Widget MainWindow
		this.UIManager = new global::Gtk.UIManager ();
		global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup ("Default");
		this.FileAction = new global::Gtk.Action ("FileAction", "_File", null, null);
		this.FileAction.ShortLabel = "_File";
		w1.Add (this.FileAction, "<Alt>f");
		this.HelpAction = new global::Gtk.Action ("HelpAction", "_Help", null, null);
		this.HelpAction.ShortLabel = "_Help";
		w1.Add (this.HelpAction, "<Alt>a");
		this.AboutAction = new global::Gtk.Action ("AboutAction", "_About...", null, null);
		this.AboutAction.ShortLabel = "_About...";
		w1.Add (this.AboutAction, "<Alt>a");
		this.NewProfileAction = new global::Gtk.Action ("NewProfileAction", "_New Profile...", null, null);
		this.NewProfileAction.ShortLabel = "_New Profile...";
		w1.Add (this.NewProfileAction, "<Alt>n");
		this.OpenProfileAction = new global::Gtk.Action ("OpenProfileAction", "_Open Profile...", null, null);
		this.OpenProfileAction.ShortLabel = "_Open Profile...";
		w1.Add (this.OpenProfileAction, "<Alt>o");
		this.ExitAction = new global::Gtk.Action ("ExitAction", "E_xit", null, null);
		this.ExitAction.ShortLabel = "E_xit";
		w1.Add (this.ExitAction, "<Alt>x");
		this.ExportForPracticalPaintAction = new global::Gtk.Action ("ExportForPracticalPaintAction", "Export for _PracticalPaint...", null, null);
		this.ExportForPracticalPaintAction.ShortLabel = "Export for _PracticalPaint...";
		w1.Add (this.ExportForPracticalPaintAction, null);
		this.WindowAction = new global::Gtk.Action ("WindowAction", "_Window", null, null);
		this.WindowAction.ShortLabel = "_Window";
		w1.Add (this.WindowAction, null);
		this.RunSimulatorAction = new global::Gtk.Action ("RunSimulatorAction", "_Run Simulator", null, null);
		this.RunSimulatorAction.ShortLabel = "_Run Simulator";
		w1.Add (this.RunSimulatorAction, null);
		this.DebugAction = new global::Gtk.Action ("DebugAction", "Debug", null, null);
		this.DebugAction.ShortLabel = "Debug";
		w1.Add (this.DebugAction, null);
		this.ScreenshotAction = new global::Gtk.Action ("ScreenshotAction", "Screenshot", null, null);
		this.ScreenshotAction.ShortLabel = "Screenshot";
		w1.Add (this.ScreenshotAction, null);
		this.RecipesAction = new global::Gtk.Action ("RecipesAction", "Recipes", null, null);
		this.RecipesAction.ShortLabel = "Recipe Generator";
		w1.Add (this.RecipesAction, null);
		this.ReactionStatusAction = new global::Gtk.Action ("ReactionStatusAction", "Reaction Status", null, null);
		this.ReactionStatusAction.ShortLabel = "Reaction Status";
		w1.Add (this.ReactionStatusAction, null);
		this.IngredientsAction = new global::Gtk.Action ("IngredientsAction", "Ingredients", null, null);
		this.IngredientsAction.ShortLabel = "Ingredients";
		w1.Add (this.IngredientsAction, null);
		this.UIManager.InsertActionGroup (w1, 0);
		this.AddAccelGroup (this.UIManager.AccelGroup);
		this.Name = "MainWindow";
		this.Title = "Desert Paint Lab";
		this.WindowPosition = ((global::Gtk.WindowPosition)(4));
		// Container child MainWindow.Gtk.Container+ContainerChild
		this.vbox1 = new global::Gtk.VBox ();
		this.vbox1.Name = "vbox1";
		// Container child vbox1.Gtk.Box+BoxChild
		this.UIManager.AddUiFromString ("<ui><menubar name='menubar1'><menu name='FileAction' action='FileAction'><menuitem name='NewProfileAction' action='NewProfileAction'/><menuitem name='OpenProfileAction' action='OpenProfileAction'/><menuitem name='ExportForPracticalPaintAction' action='ExportForPracticalPaintAction'/><separator/><menuitem name='ExitAction' action='ExitAction'/></menu><menu name='WindowAction' action='WindowAction'><menuitem name='RunSimulatorAction' action='RunSimulatorAction'/><menuitem name='RecipesAction' action='RecipesAction'/><menuitem name='IngredientsAction' action='IngredientsAction'/></menu><menu name='HelpAction' action='HelpAction'><menuitem name='AboutAction' action='AboutAction'/><menuitem name='ReactionStatusAction' action='ReactionStatusAction'/></menu><menu name='DebugAction' action='DebugAction'><menuitem name='ScreenshotAction' action='ScreenshotAction'/></menu></menubar></ui>");
		this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menubar1")));
		this.menubar1.Name = "menubar1";
		this.vbox1.Add (this.menubar1);
		global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.menubar1]));
		w2.Position = 0;
		w2.Expand = false;
		w2.Fill = false;
		// Container child vbox1.Gtk.Box+BoxChild
		this.hbox1 = new global::Gtk.HBox ();
		this.hbox1.Name = "hbox1";
		this.hbox1.Spacing = 6;
		this.hbox1.BorderWidth = ((uint)(4));
		// Container child hbox1.Gtk.Box+BoxChild
		this.frame2 = new global::Gtk.Frame ();
		this.frame2.Name = "frame2";
		this.frame2.BorderWidth = ((uint)(4));
		// Container child frame2.Gtk.Container+ContainerChild
		this.GtkAlignment = new global::Gtk.Alignment (0F, 0F, 1F, 1F);
		this.GtkAlignment.Name = "GtkAlignment";
		this.GtkAlignment.LeftPadding = ((uint)(6));
		this.GtkAlignment.RightPadding = ((uint)(6));
		// Container child GtkAlignment.Gtk.Container+ContainerChild
		this.vbox3 = new global::Gtk.VBox ();
		this.vbox3.Name = "vbox3";
		this.vbox3.Homogeneous = true;
		this.vbox3.Spacing = 6;
		// Container child vbox3.Gtk.Box+BoxChild
		this.hbox6 = new global::Gtk.HBox ();
		this.hbox6.Name = "hbox6";
		this.hbox6.Spacing = 6;
		// Container child hbox6.Gtk.Box+BoxChild
		this.label4 = new global::Gtk.Label ();
		this.label4.Name = "label4";
		this.label4.LabelProp = "Ingredient 1:";
		this.hbox6.Add (this.label4);
		global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox6 [this.label4]));
		w3.Position = 0;
		w3.Expand = false;
		w3.Fill = false;
		// Container child hbox6.Gtk.Box+BoxChild
		this.ingredient1ComboBox = global::Gtk.ComboBox.NewText ();
		this.ingredient1ComboBox.Name = "ingredient1ComboBox";
		this.hbox6.Add (this.ingredient1ComboBox);
		global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox6 [this.ingredient1ComboBox]));
		w4.Position = 1;
		this.vbox3.Add (this.hbox6);
		global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox6]));
		w5.Position = 0;
		w5.Expand = false;
		w5.Fill = false;
		// Container child vbox3.Gtk.Box+BoxChild
		this.hbox7 = new global::Gtk.HBox ();
		this.hbox7.Name = "hbox7";
		this.hbox7.Spacing = 6;
		// Container child hbox7.Gtk.Box+BoxChild
		this.label5 = new global::Gtk.Label ();
		this.label5.Name = "label5";
		this.label5.LabelProp = "Ingredient 2:";
		this.hbox7.Add (this.label5);
		global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox7 [this.label5]));
		w6.Position = 0;
		w6.Expand = false;
		w6.Fill = false;
		// Container child hbox7.Gtk.Box+BoxChild
		this.ingredient2ComboBox = global::Gtk.ComboBox.NewText ();
		this.ingredient2ComboBox.Name = "ingredient2ComboBox";
		this.hbox7.Add (this.ingredient2ComboBox);
		global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox7 [this.ingredient2ComboBox]));
		w7.Position = 1;
		this.vbox3.Add (this.hbox7);
		global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox7]));
		w8.Position = 1;
		w8.Expand = false;
		w8.Fill = false;
		// Container child vbox3.Gtk.Box+BoxChild
		this.hbox8 = new global::Gtk.HBox ();
		this.hbox8.Name = "hbox8";
		this.hbox8.Spacing = 6;
		// Container child hbox8.Gtk.Box+BoxChild
		this.label6 = new global::Gtk.Label ();
		this.label6.Name = "label6";
		this.label6.LabelProp = "Ingredient 3:";
		this.hbox8.Add (this.label6);
		global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox8 [this.label6]));
		w9.Position = 0;
		w9.Expand = false;
		w9.Fill = false;
		// Container child hbox8.Gtk.Box+BoxChild
		this.ingredient3ComboBox = global::Gtk.ComboBox.NewText ();
		this.ingredient3ComboBox.Name = "ingredient3ComboBox";
		this.hbox8.Add (this.ingredient3ComboBox);
		global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox8 [this.ingredient3ComboBox]));
		w10.Position = 1;
		this.vbox3.Add (this.hbox8);
		global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox8]));
		w11.Position = 2;
		w11.Expand = false;
		w11.Fill = false;
		this.GtkAlignment.Add (this.vbox3);
		this.frame2.Add (this.GtkAlignment);
		this.GtkLabel2 = new global::Gtk.Label ();
		this.GtkLabel2.Name = "GtkLabel2";
		this.GtkLabel2.LabelProp = "<b>Select Ingredients</b>";
		this.GtkLabel2.UseMarkup = true;
		this.frame2.LabelWidget = this.GtkLabel2;
		this.hbox1.Add (this.frame2);
		global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.frame2]));
		w14.Position = 0;
		// Container child hbox1.Gtk.Box+BoxChild
		this.frame3 = new global::Gtk.Frame ();
		this.frame3.Name = "frame3";
		this.frame3.BorderWidth = ((uint)(4));
		// Container child frame3.Gtk.Container+ContainerChild
		this.GtkAlignment1 = new global::Gtk.Alignment (0F, 0F, 1F, 1F);
		this.GtkAlignment1.Name = "GtkAlignment1";
		this.GtkAlignment1.LeftPadding = ((uint)(5));
		this.GtkAlignment1.TopPadding = ((uint)(5));
		this.GtkAlignment1.RightPadding = ((uint)(5));
		this.GtkAlignment1.BottomPadding = ((uint)(6));
		// Container child GtkAlignment1.Gtk.Container+ContainerChild
		this.vbox4 = new global::Gtk.VBox ();
		this.vbox4.WidthRequest = 120;
		this.vbox4.Name = "vbox4";
		this.vbox4.Spacing = 6;
		// Container child vbox4.Gtk.Box+BoxChild
		this.unmodifiedSwatch = new global::DesertPaintLab.PaintSwatch ();
		this.unmodifiedSwatch.Events = ((global::Gdk.EventMask)(256));
		this.unmodifiedSwatch.Name = "unmodifiedSwatch";
		this.vbox4.Add (this.unmodifiedSwatch);
		global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.unmodifiedSwatch]));
		w15.Position = 0;
		// Container child vbox4.Gtk.Box+BoxChild
		this.captureButton = new global::Gtk.Button ();
		this.captureButton.WidthRequest = 100;
		this.captureButton.CanFocus = true;
		this.captureButton.Name = "captureButton";
		this.captureButton.UseUnderline = true;
		this.captureButton.Label = "Capture";
		this.vbox4.Add (this.captureButton);
		global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.captureButton]));
		w16.Position = 1;
		w16.Expand = false;
		w16.Fill = false;
		this.GtkAlignment1.Add (this.vbox4);
		this.frame3.Add (this.GtkAlignment1);
		this.GtkLabel25 = new global::Gtk.Label ();
		this.GtkLabel25.Name = "GtkLabel25";
		this.GtkLabel25.LabelProp = "<b>Unmodified</b>";
		this.GtkLabel25.UseMarkup = true;
		this.frame3.LabelWidget = this.GtkLabel25;
		this.hbox1.Add (this.frame3);
		global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.frame3]));
		w19.Position = 1;
		w19.Expand = false;
		w19.Fill = false;
		// Container child hbox1.Gtk.Box+BoxChild
		this.frame4 = new global::Gtk.Frame ();
		this.frame4.Name = "frame4";
		this.frame4.BorderWidth = ((uint)(4));
		// Container child frame4.Gtk.Container+ContainerChild
		this.GtkAlignment2 = new global::Gtk.Alignment (0F, 0F, 1F, 1F);
		this.GtkAlignment2.WidthRequest = 130;
		this.GtkAlignment2.Name = "GtkAlignment2";
		this.GtkAlignment2.LeftPadding = ((uint)(5));
		this.GtkAlignment2.TopPadding = ((uint)(5));
		this.GtkAlignment2.RightPadding = ((uint)(5));
		this.GtkAlignment2.BottomPadding = ((uint)(6));
		// Container child GtkAlignment2.Gtk.Container+ContainerChild
		this.vbox5 = new global::Gtk.VBox ();
		this.vbox5.WidthRequest = 120;
		this.vbox5.Name = "vbox5";
		this.vbox5.Spacing = 6;
		// Container child vbox5.Gtk.Box+BoxChild
		this.reactionSwatch = new global::DesertPaintLab.PaintSwatch ();
		this.reactionSwatch.Events = ((global::Gdk.EventMask)(256));
		this.reactionSwatch.Name = "reactionSwatch";
		this.vbox5.Add (this.reactionSwatch);
		global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.reactionSwatch]));
		w20.Position = 0;
		// Container child vbox5.Gtk.Box+BoxChild
		this.saveButton = new global::Gtk.Button ();
		this.saveButton.WidthRequest = 100;
		this.saveButton.CanFocus = true;
		this.saveButton.Name = "saveButton";
		this.saveButton.UseUnderline = true;
		this.saveButton.Label = "Record";
		this.vbox5.Add (this.saveButton);
		global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.saveButton]));
		w21.Position = 1;
		w21.Expand = false;
		w21.Fill = false;
		this.GtkAlignment2.Add (this.vbox5);
		this.frame4.Add (this.GtkAlignment2);
		this.GtkLabel26 = new global::Gtk.Label ();
		this.GtkLabel26.Name = "GtkLabel26";
		this.GtkLabel26.LabelProp = "<b>Reaction</b>";
		this.GtkLabel26.UseMarkup = true;
		this.frame4.LabelWidget = this.GtkLabel26;
		this.hbox1.Add (this.frame4);
		global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.frame4]));
		w24.Position = 2;
		w24.Expand = false;
		w24.Fill = false;
		this.vbox1.Add (this.hbox1);
		global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1]));
		w25.Position = 1;
		// Container child vbox1.Gtk.Box+BoxChild
		this.statusBar = new global::Gtk.Statusbar ();
		this.statusBar.Name = "statusBar";
		this.statusBar.Spacing = 6;
		this.vbox1.Add (this.statusBar);
		global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.statusBar]));
		w26.Position = 2;
		w26.Expand = false;
		w26.Fill = false;
		this.Add (this.vbox1);
		if ((this.Child != null)) {
			this.Child.ShowAll ();
		}
		this.DefaultWidth = 629;
		this.DefaultHeight = 265;
		this.Show ();
		this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent);
		this.AboutAction.Activated += new global::System.EventHandler (this.OnAbout);
		this.NewProfileAction.Activated += new global::System.EventHandler (this.OnNewProfile);
		this.OpenProfileAction.Activated += new global::System.EventHandler (this.OnOpenProfile);
		this.ExitAction.Activated += new global::System.EventHandler (this.OnMenuExit);
		this.ExportForPracticalPaintAction.Activated += new global::System.EventHandler (this.OnExport);
		this.RunSimulatorAction.Activated += new global::System.EventHandler (this.RunSimulator);
		this.ScreenshotAction.Activated += new global::System.EventHandler (this.OnDebugScreenshot);
		this.RecipesAction.Activated += new global::System.EventHandler (this.OnOpenRecipeGenerator);
		this.ReactionStatusAction.Activated += new global::System.EventHandler (this.OnShowReactionStatus);
		this.IngredientsAction.Activated += new global::System.EventHandler (this.OnShowIngredients);
		this.ingredient1ComboBox.Changed += new global::System.EventHandler (this.OnChangedIngredient1);
		this.ingredient2ComboBox.Changed += new global::System.EventHandler (this.OnChangedIngredient2);
		this.ingredient3ComboBox.Changed += new global::System.EventHandler (this.OnChangedIngredient3);
		this.captureButton.Clicked += new global::System.EventHandler (this.OnCaptureButton);
		this.saveButton.Clicked += new global::System.EventHandler (this.OnSaveButton);
	}
}