lol, yah a zoom might not be a half bad idea but i didnt see any issues with it, again very nicely done..
private void button2_Click(object sender, Client C)
{
C.Mining = true;
Console.WriteLine("Mining is" + C.Mining);
}
private void button3_Click(object sender, Client C)
{
C.Mining = false;
Console.WriteLine("Mining is" + C.Mining);
}
//
// button3
//
this.button3.Location = new System.Drawing.Point(219, 45);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(91, 23);
this.button3.TabIndex = 1;
this.button3.Text = "Stop Mining";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button2_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(48, 45);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(94, 23);
this.button2.TabIndex = 0;
this.button2.Text = "Start Mining";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
You get that error because your handler method doesn't match the signature of the System.EventHandler delegate, which is:Quote:
it says that there is no overload for 'button2_Click' 'button3_Click' and matches delegate 'System.EventHandler'
public delegate void EventHandler(object sender, EventArgs e);
private void button2_Click(object sender, EventArgs e)
{
}
still not working, the problem is i have to change thisQuote:
this.button3.Click += new System.EventHandler(this.button2_Click);
Should be button3_Click lol.
There's no reason to have two buttons though... Just do C.Mining = !C.Mining and change the button text based on what it is.
private void button3_Click(object sender, Client C)
private void button3_Click(object sender, EventArgs C)
No offense but duhhh.Quote:
still not working, the problem is i have to change this
to this:Code:private void button3_Click(object sender, Client C)
but this way it will say that 'System.EventArgs' does not contain a definition for 'Mining' and no extension method 'Mining' accepting a first argument of type 'System.EventArgs' could be found, and i don't know how to make a button text based on what it is :confused:Code:private void button3_Click(object sender, EventArgs C)
@up i know but i get another error if i change it
lol excuse my ignorance, iam trying to actually make something :)Quote:
No offense but duhhh.
You can't pass a Client object into it, it doesn't work like that.
Example would be setting a Client as active (selectable via say... a dropdown menu or w/e) and use THAT for the actual settings controlled from the buttons.
You can download it free from the interwebsQuote:
Microsoft.Visual.Studio.2010.Professional is good to use ? or express
[Loader] IPAddress=192.168.0.192 LoginPort=9959 GamePort=5816 Website=http://www.whocares.com
public partial class GUI : Form
{
public static Dictionary<string, GameUser> Clients = new Dictionary<string, GameUser>();
//So, we now have our LISTENERS. We need to know what happens when something connects though!
public static string GameIP = "";//we're actually going to be reading this from the auth response packet so leave it blank for now.
public static ushort GamePort = 5816;
public static string AuthIP = "208.96.34.46";
public static string ProxyIP = "192.168.0.192";
public static string EncryptionKey = "DR654dt34trg4UI6";
public GameUser selectedChar = null;
public GUI()
{