void brushshape_Toggled(object o, EventArgs e) { IBrushShape targeteffect = brushshapes[o as RadioButton]; Console.WriteLine("selected shape " + targeteffect); CurrentEditBrush.GetInstance().BrushShape = targeteffect; ClearVBox(custombrushshapelabels); ClearVBox(custombrushshapewidgets); targeteffect.ShowControlBox(custombrushshapelabels, custombrushshapewidgets); }
public void AddBrushShape(string name, string description, IBrushShape brushshape) { RadioButton radiobutton = null; if (brushshapegroup != null) { radiobutton = new RadioButton(brushshapegroup, name); brushshapevbox.PackEnd(radiobutton); brushshapevbox.ShowAll(); } else { radiobutton = new RadioButton(name); brushshapevbox.PackEnd(radiobutton); brushshapevbox.ShowAll(); brushshapegroup = radiobutton; brushshape.ShowControlBox(custombrushshapelabels, custombrushshapewidgets); // radiobutton.Activate(); } brushshapes.Add(radiobutton, brushshape); radiobutton.Toggled += new EventHandler(brushshape_Toggled); }
public void AddBrushShape( string name, string description, IBrushShape brushshape ) { RadioButton radiobutton = null; if (brushshapegroup != null ) { radiobutton = new RadioButton( brushshapegroup, name ); brushshapevbox.PackEnd( radiobutton ); brushshapevbox.ShowAll(); } else { radiobutton = new RadioButton( name ); brushshapevbox.PackEnd( radiobutton ); brushshapevbox.ShowAll(); brushshapegroup = radiobutton; brushshape.ShowControlBox( custombrushshapelabels, custombrushshapewidgets ); // radiobutton.Activate(); } brushshapes.Add( radiobutton, brushshape ); radiobutton.Toggled += new EventHandler( brushshape_Toggled ); }