Changeset - 45b588f61ac8
[Not reviewed]
Jason Maltzen (jmaltzen) - 9 years ago 2015-11-19 04:26:22
jason.maltzen@unsanctioned.net
Add a button to flush all reagents from the simulator.
3 files changed with 52 insertions and 11 deletions:
0 comments (0 inline, 0 general)
SimulatorWindow.cs
Show inline comments
...
 
@@ -223,8 +223,12 @@ namespace DesertPaintLab
 
					recipeData.SetValue(iter, 1, oldValue - 1);
 
				}
 
			}			
 
			
 
		}
 

 
        protected virtual void OnFlushReagents (object sender, System.EventArgs e)
 
        {
 
            recipeData.Clear();
 
        }
 
	}
 
}
...
 
\ No newline at end of file
gtk-gui/DesertPaintLab.SimulatorWindow.cs
Show inline comments
...
 
@@ -33,12 +33,16 @@ namespace DesertPaintLab
 
		private global::Gtk.Image image1;
 
		
 
		private global::Gtk.Button button66;
 
		
 
		private global::Gtk.Image image2;
 
		
 
		private global::Gtk.Button button67;
 
		
 
		private global::Gtk.Image image3;
 
		
 
		private global::Gtk.Alignment alignment4;
 
		
 
		private global::DesertPaintLab.PaintSwatch paintSwatch;
 

 
		protected virtual void Build ()
 
		{
...
 
@@ -98,13 +102,12 @@ namespace DesertPaintLab
 
			global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox162]));
 
			w7.Position = 1;
 
			w7.Expand = false;
 
			w7.Fill = false;
 
			// Container child hbox1.Gtk.Box+BoxChild
 
			this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow ();
 
			this.GtkScrolledWindow1.WidthRequest = 0;
 
			this.GtkScrolledWindow1.Name = "GtkScrolledWindow1";
 
			this.GtkScrolledWindow1.ShadowType = ((global::Gtk.ShadowType)(1));
 
			// Container child GtkScrolledWindow1.Gtk.Container+ContainerChild
 
			this.recipeView = new global::Gtk.TreeView ();
 
			this.recipeView.CanFocus = true;
 
			this.recipeView.Name = "recipeView";
...
 
@@ -150,37 +153,52 @@ namespace DesertPaintLab
 
			this.vbox3.Add (this.button66);
 
			global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.button66]));
 
			w14.Position = 2;
 
			w14.Expand = false;
 
			w14.Fill = false;
 
			// Container child vbox3.Gtk.Box+BoxChild
 
			this.button67 = new global::Gtk.Button ();
 
			this.button67.CanFocus = true;
 
			this.button67.Name = "button67";
 
			// Container child button67.Gtk.Container+ContainerChild
 
			this.image3 = new global::Gtk.Image ();
 
			this.image3.Name = "image3";
 
			this.image3.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-goto-first", global::Gtk.IconSize.Menu);
 
			this.button67.Add (this.image3);
 
			this.vbox3.Add (this.button67);
 
			global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.button67]));
 
			w16.Position = 3;
 
			w16.Expand = false;
 
			w16.Fill = false;
 
			// Container child vbox3.Gtk.Box+BoxChild
 
			this.alignment4 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
 
			this.alignment4.Name = "alignment4";
 
			this.vbox3.Add (this.alignment4);
 
			global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.alignment4]));
 
			w15.Position = 3;
 
			global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.alignment4]));
 
			w17.Position = 4;
 
			this.hbox1.Add (this.vbox3);
 
			global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3]));
 
			w16.Position = 3;
 
			w16.Expand = false;
 
			w16.Fill = false;
 
			global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3]));
 
			w18.Position = 3;
 
			w18.Expand = false;
 
			w18.Fill = false;
 
			// Container child hbox1.Gtk.Box+BoxChild
 
			this.paintSwatch = new global::DesertPaintLab.PaintSwatch ();
 
			this.paintSwatch.WidthRequest = 200;
 
			this.paintSwatch.Events = ((global::Gdk.EventMask)(256));
 
			this.paintSwatch.Name = "paintSwatch";
 
			this.hbox1.Add (this.paintSwatch);
 
			global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.paintSwatch]));
 
			w17.Position = 4;
 
			global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.paintSwatch]));
 
			w19.Position = 4;
 
			this.Add (this.hbox1);
 
			if ((this.Child != null)) {
 
				this.Child.ShowAll ();
 
			}
 
			this.DefaultWidth = 804;
 
			this.DefaultHeight = 390;
 
			this.Show ();
 
			this.addReagentButton.Clicked += new global::System.EventHandler (this.OnAddReagent);
 
			this.button65.Clicked += new global::System.EventHandler (this.OnIncrementReagent);
 
			this.button66.Clicked += new global::System.EventHandler (this.OnDecrementReagent);
 
			this.button67.Clicked += new global::System.EventHandler (this.OnFlushReagents);
 
		}
 
	}
 
}
gtk-gui/gui.stetic
Show inline comments
...
 
@@ -796,13 +796,12 @@ You can either import an existing Practi
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
 
            <property name="MemberName" />
 
            <property name="WidthRequest">0</property>
 
            <property name="ShadowType">In</property>
 
            <child>
 
              <widget class="Gtk.TreeView" id="recipeView">
 
                <property name="MemberName" />
 
                <property name="CanFocus">True</property>
 
                <property name="ShowScrollbars">True</property>
...
 
@@ -870,20 +869,40 @@ You can either import an existing Practi
 
                <property name="AutoSize">True</property>
 
                <property name="Expand">False</property>
 
                <property name="Fill">False</property>
 
              </packing>
 
            </child>
 
            <child>
 
              <widget class="Gtk.Button" id="button67">
 
                <property name="MemberName" />
 
                <property name="CanFocus">True</property>
 
                <property name="Type">Custom</property>
 
                <signal name="Clicked" handler="OnFlushReagents" />
 
                <child>
 
                  <widget class="Gtk.Image" id="image3">
 
                    <property name="MemberName" />
 
                    <property name="Pixbuf">stock:gtk-goto-first Menu</property>
 
                  </widget>
 
                </child>
 
              </widget>
 
              <packing>
 
                <property name="Position">3</property>
 
                <property name="AutoSize">True</property>
 
                <property name="Expand">False</property>
 
                <property name="Fill">False</property>
 
              </packing>
 
            </child>
 
            <child>
 
              <widget class="Gtk.Alignment" id="alignment4">
 
                <property name="MemberName" />
 
                <child>
 
                  <placeholder />
 
                </child>
 
              </widget>
 
              <packing>
 
                <property name="Position">3</property>
 
                <property name="Position">4</property>
 
                <property name="AutoSize">True</property>
 
              </packing>
 
            </child>
 
          </widget>
 
          <packing>
 
            <property name="Position">3</property>
0 comments (0 inline, 0 general)