private void button1_Click(object sender, EventArgs e) { NetworkSpeed ls = new NetworkSpeed(); Controller hotspot = new Controller(); hotspot.start(); // ls.showSpeed(); // this.BackColor = Color.Green; /* label3.Text = "Eazify is now on"; * label4.Text = hotspot.GetMessage(); * * label5.Text = ls.BytesReceivede()+""; * label6.Text = ls.ByteSende() + "";*/ }
private void bunifuiOSSwitch1_OnValueChange(object sender, EventArgs e) { NetworkSpeed ls = new NetworkSpeed(); Controller hotspot = new Controller(); hotspot.start(); if (bunifuiOSSwitch1.Value == true) { hotspot.start(); StatusLabel.Text = "ON"; } else if (bunifuiOSSwitch1.Value == false) { StatusLabel.Text = "OFF"; Controller.stop(); } }
private void timer1_Tick_1(object sender, EventArgs e) { NetworkSpeed ls = new NetworkSpeed(); ls.showSpeed(); if (ls.ByteSend() >= 1000 || ls.BytesReceived() >= 1000) { bytesReceived.Text = ls.BytesReceived() / 1000 + " Kb"; bytesSend.Text = ls.ByteSend() / 1000 + " Kb"; } else if (ls.BytesReceived() >= 1000000 || ls.ByteSend() >= 1000000) { bytesReceived.Text = ls.BytesReceived() / 1000000 + " Mb"; bytesSend.Text = ls.ByteSend() / 1000000 + " Mb"; } else if (ls.ByteSend() >= 1000000000 || ls.BytesReceived() >= 1000000000) { bytesReceived.Text = ls.BytesReceived() / 1000000000 + " Gb"; bytesSend.Text = ls.ByteSend() / 1000000000 + " Gb"; } }