Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C#, .NET and if-statements.

Name: Anonymous 2012-10-17 23:40

So I'm here, writing this little Forms program because I want something with a GUI that I can use to interface with Wget, Youtube-dl, and FFMpeg, and all's going well until I decide to add functionality to the RadioButtons on my form. Here's the declarations for one of the two radiobuttons currently on my form, and the eventhandler that runs when I click the "accept" button.

>he doesn't know if code tags work on /prog/
>laughingwhores.jpg
        RadioButton youtubeRadio = new RadioButton();
        youtubeRadio.BackColor = Color.FromArgb(0, 255, 255, 255);
        youtubeRadio.ForeColor = Color.White;
        youtubeRadio.Text = "Youtube";
        youtubeRadio.AutoSize = true;
        youtubeRadio.Location = new Point(5, 190);


    private void accept_Click(object sender, EventArgs e)
    {
        if(standardRadio.Checked)
        {
            MessageBox.Show("Standard");
        }
        else if(youtubeRadio.Checked)
        {
            MessageBox.Show("Standard");
        }
    }


I've read though all of the documentation I could find on event handlers, radiobuttons, normal buttons, even check boxes, and I can't find a single reason why this doesn't work. It runs fine when there are no if-statements surrounding the code, but it doesn't even fire when they're in place. Any suggestions?

Name: Anonymous 2012-10-17 23:42

Also, just to clarify, I'm not looking for someone to write this for me, just some tips on where I should look.

Name: Anonymous 2012-10-17 23:44

Windows, C#, meme arrows, incompetence, ``filename memes'', GUIs, and general mental midgetry belong in /g/

Name: Anonymous 2012-10-17 23:47

>>/3/
I'm using an 11 year-old computer with Windows XP, dual-booting Xubuntu which I borked a week or so ago. Sorry if my mannerisms bother you that much, mister TeX quotes.

Name: Anonymous 2012-10-17 23:56

>>4
Are you older than your computer?

Name: Anonymous 2012-10-17 23:58

>>5
Yes, just poor.

Name: Anonymous 2012-10-18 0:13

>>6
It's alright, I'm typing this from a T60 with freed non-spyware firmware.

Name: Anonymous 2012-10-18 1:08

>>7
Free firmware can still contain spyware, it's the users' own responsibility to audit and verify the correctness of their software. Of course, it's not necessary for only one person to burden the cost of this as the whole software community can cooperate their efforts into doing such work.

Name: Anonymous 2012-10-18 1:10

>>7
While you're swinging your epeen around - does your lid switch work? I'm honestly curious.

Name: Anonymous 2012-10-18 2:39

>>9
Yep, and its status is accessible from software.  The volume keys also work (although they operate an internal hardware mixer control that is inaccessible from software; it's probably the embedded controller).  Battery status reports semi-accurately (I blame it on the cheapo battery).  The only thing that just doesn't work is suspend, but I didn't use it anyway since suspending a laptop with active encryption keys in RAM is a very bad ideaTM from a security standpoint; you will be pleased to know that Debian Wheezy handles uswsusp's s2disk correctly in conjunction with LUKS encrypted LVM.

Name: Anonymous 2012-10-18 11:39

>>10
Aren't you afraid it's going to die?  It is, after all, at least 6 years old...

Name: Anonymous 2012-10-18 12:59

>>11
Thinkpads aren't that fragile. Thinkpad components are also user changeable which is not a standard characteristic of notebook computers. Chances are if a component dies, it'd be trivial to buy the same model and salvage parts for replacement.

Name: Anonymous 2012-10-18 13:06

>>12
Thinkpads aren't that fragile.
Amen to that. I know someone who owns two ThinkPads and has been using them daily for ten years.

Name: Anonymous 2012-10-18 13:12

>>12-13
Note: this only works for IBM Thinkpads. Lenovo is shit.

Name: Anonymous 2012-10-18 17:54

>>12-14
First and only Thinkpad I happened to buy was a T43. Southbridge soldering came loose with barely any use of the damn thing. And yes, it was IBM.

So I have no confidence in those to be quite honest.

Name: Anonymous 2012-10-18 20:11

>>15
just resolder it.

Name: Anonymous 2012-10-18 20:16

>>16
Resetting the ball-grid-array is beyond my skill (and set of tools). The fact that that happened (and turned out to be widespread too for the T43s) is just fucking embarrassing. "ThinkPad" supremacy my ass.

Name: Anonymous 2012-10-18 21:38

Still waiting, Lemote.

Name: Anonymous 2012-10-18 21:58

So, any news about mobile computer platforms (e.g. tablets or netbooks) that can be run using entirely open source firmware and software (so I can check that indeed there aren't any american/jewish/hollywood/chinese/etc. backdoors)?

Name: Anonymous 2012-10-18 22:54

>>19
hint: Yeeloong

Name: Anonymous 2012-10-18 23:00

>>19
Buy a bunch of transistors and build your own. That's the only way you can really be sure.

Name: Anonymous 2012-10-18 23:22

>>19
I can plug your backdoor if you know what I mean

Name: Anonymous 2012-10-19 0:02

>>1
Stop using Allman braces; it's annoying.

Name: Anonymous 2012-10-19 1:39

>>23
Allman-style is objectively superior to every other form of indentation.

Name: OP 2012-10-19 4:01

Well, thank you, /prog/, for a most thrilling thread. In the end I dropped the radiobuttons and used a 3-item combobox instead, and now everything works. Take care.

Name: Anonymous 2012-10-19 5:41

>>20
Isn't out yet.

>>21
Ive considered making my own photolithography machine out of spare DVD drive steppers.  Theoretically it's possible, but I'm not well-versed enough in chemistry not to fuck shit up, nor do I have any idea where to get silicon wafers.

Stepping down the paranoia a bit and assuming that Microchip PICs with 128 bytes of RAM can't really contain any backdoors, one could interconnect a bunch of PICs and make a full 32-bit CPU out of it.

Name: Anonymous 2012-10-19 6:08

>>26
Yeeloong? Not out yet? What? If it's not out yet, how does RMS own and recommend them?

Name: Anonymous 2012-10-19 6:31

>>1
MessageBox.Show("Standard");
MessageBox.Show("Standard");
And I'm not trying to do the text zoom effect here, OP.

Name: Anonymous 2012-10-19 6:41

>>27
I meant the new Yeeloong 8133.  The old one has a pure shit battery life and they don't even offer extended batteries.

Name: Anonymous 2012-10-19 6:45

>>29
It should be easy to open up the battery casing and replace the cells inside with higher capacity cells.

Name: Anonymous 2012-10-19 6:47

>>28
Aye, that was just a typo, none of the code inside if-statements would run regardless of what it said. Although I've worked around it using a while-loop around the if-statements and a Combobox in place of Radio Buttons.

Name: Anonymous 2012-10-20 1:59

>>30
I don't think I have the expertise and tools required not to fuck it up.  Besides, I'd rather just wait for the Yeeloong 8133.

Name: Anonymous 2012-10-20 3:55

>>10
Really though, if you have data that attracts attackers sophisticated enough to perform a cold boot or side channel DMA attack, you probably have worse problems.

>>25
Glad to be of service!

Name: Anonymous 2013-08-31 7:19


All things are possible through Allah my friend.

May take a little while though.

Name: Anonymous 2013-08-31 8:04


Japanese customs allows me 3 bottles of booze.

Name: Anonymous 2013-08-31 8:50





    Shud I play the Lottery?

Don't change these.
Name: Email:
Entire Thread Thread List