Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ing System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using System.Threading;
- namespace WindowsFormsApp6
- {
- public partial class Form1 : Form
- {
- bool dmsg = false;
- public Form1()
- {
- InitializeComponent();
- }
- private void Button1_Click(object sender, EventArgs e)
- {
- timer1.Start();
- }
- private void Button2_Click(object sender, EventArgs e)
- {
- timer1.Stop();
- }
- private void Timer1_Tick(object sender, EventArgs e)
- {
- int gayaf = 0;
- gayaf++;
- while (dmsg == true)
- {
- gayaf++;
- Thread.Sleep(Convert.ToInt32(textBox2.Text));
- SendKeys.Send("{ENTER}");
- SendKeys.Send(textBox1.Text + " " + gayaf);
- }
- timer1.Interval = Convert.ToInt32(textBox2.Text);
- SendKeys.Send("{ENTER}");
- SendKeys.Send(textBox1.Text);
- }
- private void TextBox2_TextChanged(object sender, EventArgs e)
- {
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- private void RestartToolStripMenuItem_Click(object sender, EventArgs e)
- {
- Application.Restart();
- }
- private void ExitToolStripMenuItem_Click(object sender, EventArgs e)
- {
- Application.Exit();
- }
- private void PublicIPToolStripMenuItem_Click(object sender, EventArgs e)
- {
- string pubIp = new System.Net.WebClient().DownloadString("https://api.ipify.org");
- MessageBox.Show(pubIp);
- }
- private void CheckBox1_CheckedChanged(object sender, EventArgs e)
- {
- dmsg = true;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement