コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 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 );
 }