Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. ing System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using System.Threading;
  11.  
  12. namespace WindowsFormsApp6
  13. {
  14. public partial class Form1 : Form
  15. {
  16.  
  17. bool dmsg = false;
  18. public Form1()
  19. {
  20. InitializeComponent();
  21. }
  22.  
  23. private void Button1_Click(object sender, EventArgs e)
  24. {
  25.  
  26. timer1.Start();
  27. }
  28.  
  29. private void Button2_Click(object sender, EventArgs e)
  30. {
  31. timer1.Stop();
  32. }
  33.  
  34. private void Timer1_Tick(object sender, EventArgs e)
  35. {
  36. int gayaf = 0;
  37. gayaf++;
  38. while (dmsg == true)
  39. {
  40. gayaf++;
  41. Thread.Sleep(Convert.ToInt32(textBox2.Text));
  42. SendKeys.Send("{ENTER}");
  43. SendKeys.Send(textBox1.Text + " " + gayaf);
  44. }
  45.  
  46. timer1.Interval = Convert.ToInt32(textBox2.Text);
  47. SendKeys.Send("{ENTER}");
  48. SendKeys.Send(textBox1.Text);
  49.  
  50. }
  51.  
  52. private void TextBox2_TextChanged(object sender, EventArgs e)
  53. {
  54.  
  55. }
  56.  
  57. private void Form1_Load(object sender, EventArgs e)
  58. {
  59.  
  60. }
  61.  
  62. private void RestartToolStripMenuItem_Click(object sender, EventArgs e)
  63. {
  64. Application.Restart();
  65. }
  66.  
  67. private void ExitToolStripMenuItem_Click(object sender, EventArgs e)
  68. {
  69. Application.Exit();
  70. }
  71.  
  72. private void PublicIPToolStripMenuItem_Click(object sender, EventArgs e)
  73. {
  74. string pubIp = new System.Net.WebClient().DownloadString("https://api.ipify.org");
  75. MessageBox.Show(pubIp);
  76.  
  77. }
  78.  
  79. private void CheckBox1_CheckedChanged(object sender, EventArgs e)
  80. {
  81. dmsg = true;
  82. }
  83. }
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement