It looks like you're using an Ad Blocker.
Please white-list or disable AboveTopSecret.com in your ad-blocking tool.
Thank you.
Some features of ATS will be disabled while you continue to use an ad-blocker.
Originally posted by xrevxoltx
You should be using != and not ||.
|| is logical or. It will always evaluate to true if you have:
somestatement || true
Originally posted by graphuto
reply to post by xrevxoltx
Forgive my ignorance, but I'm just starting to get into this. Obviously, your way looks far superior to running two blocks, but explain this line to me:
client.Host = radioButton1.Enabled ? "smtp.gmail.com" : "smtp.live.com";
so what I want is for radioButton1 to send to gmail and radioButton2 to send to live. I'd still also like to understand why both blocks keep executing even though the "IF's" aren't properly met.
That is what is bugging me so much. I though that "IF's" worked IF and ONLY IF the (parameters) are met, running the following
[
]
block of code
edit on 12-5-2012 by graphuto because: (no reason given)
Originally posted by graphuto
reply to post by xrevxoltx
Forgive my ignorance, but I'm just starting to get into this. Obviously, your way looks far superior to running two blocks, but explain this line to me:
client.Host = radioButton1.Enabled ? "smtp.gmail.com" : "smtp.live.com";
so what I want is for radioButton1 to send to gmail and radioButton2 to send to live. I'd still also like to understand why both blocks keep executing even though the "IF's" aren't properly met.
That is what is bugging me so much. I though that "IF's" worked IF and ONLY IF the (parameters) are met, running the following
[
]
block of code
edit on 12-5-2012 by graphuto because: (no reason given)
Originally posted by xrevxoltx
Only one radio button is selected at a given time, correct? I recall in VB 6 you had to group them somehow, not sure about C#.
ETA: Group them to ensure selecting one deselected the other, I mean.edit on 12-5-2012 by xrevxoltx because: (no reason given)
Originally posted by graphuto
Awesome, I was using wrong syntax. its radiobutton.CHECKED not ENabled
Thanks for all the awesome help though!
Now if someone could tell me how to add a sweet Icon and a (icon? the picture that shows in the taskbar when the program is running)edit on 12-5-2012 by graphuto because: (no reason given)
Originally posted by graphuto
Now if someone could tell me how to add a sweet Icon and a (icon? the picture that shows in the taskbar when the program is running)edit on 12-5-2012 by graphuto because: (no reason given)