lxXTaCoXxl 26 Posting Whiz in Training

Why not use Type.GetMethods to get just the methods instead of searching for keywords in the file. I took a second to write an example (though not as detailed as yours) it can be modified to implement with opening a specific file.

        private void button1_Click(object sender, EventArgs e) {
            ListMethods(typeof(int));
        }

        private void ListMethods(Type t) {
            foreach (var m in t.GetMethods()) {
                var p = string.Join
                    (", ", m.GetParameters()
                                 .Select(x => x.ParameterType + " " + x.Name)
                                 .ToArray());

                richTextBox1.Text += (string.Format("{0} {1} ({2})\n",
                                  m.ReturnType,
                                  m.Name,
                                  p));
            }
        }

Untitled-3.jpg

Obviously with mine you could add a drop down menu or use radio buttons to select which type of method you wish to look for (and a little more work has to be done to reveal private and protected methods) and if you use a drop down menu just add an all option. Just a thought, but yours is a good approach as well. Nice work!

ddanbe commented: Thanks for your tip! +15
lxXTaCoXxl 26 Posting Whiz in Training

Square is defined again inside of another .cs file and needs to be renamed. Although, if you're writing this with XNA you should really switch your project type over to Windows Game type.

@Momerath: When designing games it's good practice to create your own objects, plus the Rectangle class inside of System.Drawing is meant for many purposes, but does not have all the variables that a square in a Tetris clone would have.

lxXTaCoXxl 26 Posting Whiz in Training

I agree with @skatamatic on this topic. If you must write a Tetris clone then start by learning the framework. You'll need to know how to load Textures (I use PNG but BMP works just as well) then you'll need to learn how to manipulate the texture (using keyboard and or game pad input, or if you have the Kinect SDK you can set it up for Kinect), drawing the textures to the screen, drawing strings to represent things like score, combo, etc. A lot of work comes with XNA development because we have to do everything on our own. There is no form designer. :D

Your work is only limited by your imagination; but before you begin writing a big game (fps, rpg, 3ps, etc) get in the habbit of laying everything out in a flow chart. You'll want that organization later on, when you get stuck on something, leave the project for a week, and come back not knowing what all is left to do; or sometimes even what you wanted to do.

**Note **
If you're reading this and are learning about 3D game design then in that case we do have a form designer: UDK :D It's perfect for creating 3D environments before sending them to the game. I wrote a nifty little app that "seeds" the environments straight to the live debugger of XNA allowing me to add in characters and everything and test the look through the game without all the big tools …

lxXTaCoXxl 26 Posting Whiz in Training

I used a label inside my snippet just to test it; but this will simply increment and decrement a float value by 0.2f between the values specified in the conditionals. I have it updating between 8f and 15f. Must be run on a timer (make sure the interval is low "ex: mine is on 1ms"). It's still a little buggy and by buggy I mean it bugs me that it's jerky. It's not smooth transition.

***UPDATE***
I fixed the jerky bug inside of the source.

//Line 35
FontSize += 0.25f;

//Line 44
FontSize -= 0.25f;

Yes this will work with anything that has a font. Just simply change it from a label.

Example:

textBox1.Font = new Font("OCR A Extended", FontSize, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0));

Most of use don't know the exact font names so just change your text to the font you want, then go into the designer source of the form and get the value from the font assignment in there.

Enjoy,
Jamie - Studio 41 Games (Owner/Head Developer)

ddanbe commented: Great! +14
lxXTaCoXxl 26 Posting Whiz in Training

Okay, as I just stated, simply add Environment.NewLine to the end of the statement.

private void Button_Click(object sender, EventArgs e)
{
textBox2.Multiline = true;
timer1.Start();
}

private void Timer_Tick(object sender, EventArgs e)
{
textBox2.Text += textBox1.Text + Environment.NewLine;
}
lxXTaCoXxl 26 Posting Whiz in Training

This release is an updated version of my previously released code snippet entitled "Get Internet Connection State". I've made this snippet into an actual control that you can add to your toolbox. It can be used with all versions of Visual Studio C#. I'm also posting the main source code, I'm still working on the two custom events for it.

TheForeRunner commented: This is a great tool. Thanks for sharing it. +0
lxXTaCoXxl 26 Posting Whiz in Training

The problem your friend had is the normal problem with people. All throughout school we are taught to read left to right correct? So int turn, even in math we begin reading left to right out of habit. Sometimes you have the people that try to solve problems as they read them (not always the best method of doing something) and with math can almost always produce the wrong answer. The trick is to take your time and examine the problem before trying to solve it and some where along the way people forget that. Slow down and think, even if it is just 6 + 2 * 10. :)

Azmah commented: Good on you ;) +0
lxXTaCoXxl 26 Posting Whiz in Training

Simplest way is to set the image properties to stretch it will automatically scale it to fit the form completely.

this.BackgroundImageLayout = ImageLayout.Stretch;

You're very welcome. :D