Beispiel #1
0
        void OnChange(ControlBase control, EventArgs args)
        {
            RadioButtonGroup   rbc = control as RadioButtonGroup;
            LabeledRadioButton rb  = rbc.Selected;

            UnitPrint(String.Format("RadioButton: SelectionChanged: {0}", rb.Text));
        }
Beispiel #2
0
        public RadioButton(Base parent)
            : base(parent)
        {
            Control.RadioButtonGroup rbg = new Control.RadioButtonGroup(this, "Sample radio group");
            rbg.SetPosition(10, 10);

            rbg.AddOption("Option 1");
            rbg.AddOption("Option 2");
            rbg.AddOption("Option 3");
            rbg.AddOption("\u0627\u0644\u0622\u0646 \u0644\u062D\u0636\u0648\u0631");
            //rbg.SizeToContents(); // it's auto

            rbg.SelectionChanged += OnChange;

            Control.LabeledRadioButton rb1 = new LabeledRadioButton(this);
            rb1.Text = "Option 1";
            rb1.SetPosition(300, 10);

            Control.LabeledRadioButton rb2 = new LabeledRadioButton(this);
            rb2.Text = "Option 2222222222222222222222222222222222";
            rb2.SetPosition(300, 30);

            Control.LabeledRadioButton rb3 = new LabeledRadioButton(this);
            rb3.Text = "\u0627\u0644\u0622\u0646 \u0644\u062D\u0636\u0648\u0631";
            rb3.SetPosition(300, 50);

            //this.DrawDebugOutlines = true;
        }
Beispiel #3
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup rbg = new Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup(this, "Sample radio group");
            rbg.TextColor = Color.White;
            rbg.SetPosition(10, 10);

            rbg.AddOption("Option 1");
            rbg.AddOption("Option 2");
            rbg.AddOption("Option 3");
            rbg.AddOption("\u0627\u0644\u0622\u0646 \u0644\u062D\u0636\u0648\u0631");
            //rbg.SizeToContents(); // it's auto

            rbg.SelectionChanged += OnChange;

            LabeledRadioButton rb1 = new LabeledRadioButton(this);

            rb1.Text = "Option 1";
            rb1.SetPosition(300, 10);

            LabeledRadioButton rb2 = new LabeledRadioButton(this);

            rb2.Text = "Option 2222222222222222222222222222222222";
            rb2.SetPosition(300, 30);

            LabeledRadioButton rb3 = new LabeledRadioButton(this);

            rb3.Text = "\u0627\u0644\u0622\u0646 \u0644\u062D\u0636\u0648\u0631";
            rb3.SetPosition(300, 50);

            //this.DrawDebugOutlines = true;
        }
        public Example_Bilinear_Perspective(Base parent)
            : base(parent)
        {
            m_DrawingPanel = new InteractiveGeometryContainer(this);
            m_DrawingPanel.DoubleBuffered  = true;
            m_DrawingPanel.ClientBackColor = Color.FromArgb(0, 128, 128, 128);
            m_DrawingPanel.Dock            = Pos.Fill;
            m_DrawingPanel.Paint          += new PaintEventHandler(DrawingPanel_Paint);
            m_DrawingPanel.Resize         += new EventHandler(DrawingPanel_Resize);


            //  Transformation Type
            groupBox_TransformationType          = new RadioButtonGroup(m_DrawingPanel, string.Empty);
            groupBox_TransformationType.Text     = "Type:";
            groupBox_TransformationType.Location = new PointI(10, 10);

            rbBilinear        = groupBox_TransformationType.AddOption("Bilinear");
            rbBilinear.Margin = new Margin(0, 5, 0, 0);
            //NoNeed	rbPerspective =
            groupBox_TransformationType.AddOption("Perspective");
        }