Click here to Skip to main content
15,915,094 members
Home / Discussions / C#
   

C#

 
AnswerRe: (NegotiateStream) The server has rejected the client credentials Pin
abiemann2-Dec-09 7:18
abiemann2-Dec-09 7:18 
QuestionUnexpected Errors in Multithreading Pin
Razanust1-Dec-09 21:35
Razanust1-Dec-09 21:35 
AnswerRe: Unexpected Errors in Multithreading Pin
Calla1-Dec-09 21:37
Calla1-Dec-09 21:37 
AnswerRe: Unexpected Errors in Multithreading Pin
Richard MacCutchan1-Dec-09 21:40
mveRichard MacCutchan1-Dec-09 21:40 
Questionhow to waiti for specific events that occurs Pin
Ronenb1-Dec-09 21:30
Ronenb1-Dec-09 21:30 
AnswerRe: how to waiti for specific events that occurs Pin
freakyit1-Dec-09 22:55
freakyit1-Dec-09 22:55 
AnswerRe: how to waiti for specific events that occurs Pin
abiemann2-Dec-09 7:37
abiemann2-Dec-09 7:37 
QuestionHow to check a groupbox for checked radiobuttons dynamicaly Pin
gwithey1-Dec-09 21:16
gwithey1-Dec-09 21:16 
I have come across something and wondered if it can be done.

private void Shape_CheckedChanged(object sender, EventArgs e)
     {
        // Check and set the draw state that has been selected
        if (rbDraw.Checked)
        {
           if (rbSelectShape.Checked)
           {
              imageViewer1.ShapeSelected = ImageViewer.Shape.Select;
           }
           if (rbDrawRect.Checked)
           {
              imageViewer1.ShapeSelected = ImageViewer.Shape.Rectangle;
           }
           if (rbDrawCircle.Checked)
           {
              imageViewer1.ShapeSelected = ImageViewer.Shape.Circle;
           }
           if (rbDrawTriangle.Checked)
           {
              imageViewer1.ShapeSelected = ImageViewer.Shape.Triangle;
           }
           if (rbLine.Checked)
           {
              imageViewer1.ShapeSelected = ImageViewer.Shape.Line;
           }
           if (rbText.Checked)
           {
              imageViewer1.ShapeSelected = ImageViewer.Shape.Text;
           }
        }
        Console.WriteLine(imageViewer1.ShapeSelected.ToString());
     }


Above is the code i used to check each radio button however i tried tidying it up with the bellow code and couldn't think of a way to set the enum depending on checked radio button.


foreach (RadioButton rb in gbShape)
         {
            if (rb.Checked == true)
            {
               imageViewer1.ShapeSelected = ImageViewer.Shape.Circle; // How can make dynamic?
            }
         }


Any ideas

Thanx in advance
AnswerRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
dan!sh 1-Dec-09 21:49
professional dan!sh 1-Dec-09 21:49 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
gwithey1-Dec-09 21:53
gwithey1-Dec-09 21:53 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
freakyit1-Dec-09 22:06
freakyit1-Dec-09 22:06 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
gwithey1-Dec-09 22:41
gwithey1-Dec-09 22:41 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
gwithey1-Dec-09 22:20
gwithey1-Dec-09 22:20 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
freakyit1-Dec-09 22:39
freakyit1-Dec-09 22:39 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
gwithey1-Dec-09 22:50
gwithey1-Dec-09 22:50 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
freakyit1-Dec-09 22:57
freakyit1-Dec-09 22:57 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
gwithey1-Dec-09 23:08
gwithey1-Dec-09 23:08 
QuestionOpen a text file in Notepad Pin
Hardus Lombaard1-Dec-09 21:12
Hardus Lombaard1-Dec-09 21:12 
AnswerRe: Open a text file in Notepad Pin
Calla1-Dec-09 21:19
Calla1-Dec-09 21:19 
AnswerRe: Open a text file in Notepad Pin
Luc Pattyn2-Dec-09 1:14
sitebuilderLuc Pattyn2-Dec-09 1:14 
GeneralRe: Open a text file in Notepad Pin
Hardus Lombaard20-Jul-10 22:09
Hardus Lombaard20-Jul-10 22:09 
Questiontruncate all data tables Pin
akram30021-Dec-09 20:33
akram30021-Dec-09 20:33 
AnswerRe: truncate all data tables Pin
dan!sh 1-Dec-09 20:44
professional dan!sh 1-Dec-09 20:44 
GeneralRe: truncate all data tables Pin
akram30021-Dec-09 23:04
akram30021-Dec-09 23:04 
QuestionProxy Classes - Copy/Paste Pre-compiler Pin
Iain Wiseman1-Dec-09 19:09
Iain Wiseman1-Dec-09 19:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.