Advertisement
Guest User

AskIP

a guest
Dec 10th, 2016
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.80 KB | None | 0 0
  1. using System;
  2. using System.ComponentModel;
  3. using System.Drawing;
  4. using System.IO;
  5. using System.Windows.Forms;
  6.  
  7. namespace AskIP
  8. {
  9. // Token: 0x02000002 RID: 2
  10. public class Form1 : Form
  11. {
  12. // Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250
  13. public Form1()
  14. {
  15. this.InitializeComponent();
  16. }
  17.  
  18. // Token: 0x06000002 RID: 2 RVA: 0x000020B6 File Offset: 0x000002B6
  19. public void strWrite()
  20. {
  21. }
  22.  
  23. // Token: 0x06000003 RID: 3 RVA: 0x000020B6 File Offset: 0x000002B6
  24. private void textBox1_TextChanged(object sender, EventArgs e)
  25. {
  26. }
  27.  
  28. // Token: 0x06000004 RID: 4 RVA: 0x000020BC File Offset: 0x000002BC
  29. private void button1_Click(object sender, EventArgs e)
  30. {
  31. this.saveFile.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
  32. this.saveFile.ShowDialog();
  33. this.strW = new StreamWriter(this.saveFile.OpenFile());
  34. this.IP = this.tb_IP.Text;
  35. this.UserName = this.tb_UserName.Text;
  36. this.Pass = this.tb_pass.Text;
  37. this.strW.WriteLine("IP: " + this.IP);
  38. this.strW.WriteLine("Username: " + this.UserName);
  39. this.strW.WriteLine("Password: " + this.Pass);
  40. bool @checked = this.checkBox1.Checked;
  41. if (@checked)
  42. {
  43. this.After = "After You Login Press ./menu";
  44. }
  45. else
  46. {
  47. this.After = "";
  48. }
  49. this.strW.WriteLine(this.After);
  50. this.strW.Close();
  51. }
  52.  
  53. // Token: 0x06000005 RID: 5 RVA: 0x000020B6 File Offset: 0x000002B6
  54. private void Form1_Load(object sender, EventArgs e)
  55. {
  56. }
  57.  
  58. // Token: 0x06000006 RID: 6 RVA: 0x000021D0 File Offset: 0x000003D0
  59. private void checkBox1_CheckedChanged(object sender, EventArgs e)
  60. {
  61. bool flag = this.saveFile.FileName == "";
  62. if (flag)
  63. {
  64. this.After = "After You Login Press ./menu";
  65. }
  66. else
  67. {
  68. bool @checked = this.checkBox1.Checked;
  69. if (@checked)
  70. {
  71. this.After = "After You Login Press ./menu";
  72. this.str = new StreamReader(this.saveFile.FileName);
  73. for (int i = 0; i < 3; i++)
  74. {
  75. this.s = this.str.ReadLine();
  76. this.line[i] = this.s;
  77. }
  78. this.str.Close();
  79. this.strW = new StreamWriter(this.saveFile.FileName);
  80. this.strW.WriteLine("IP: " + this.tb_IP.Text);
  81. this.strW.WriteLine("Username: " + this.tb_UserName.Text);
  82. this.strW.WriteLine("Password: " + this.tb_pass.Text);
  83. this.strW.WriteLine(this.After);
  84. this.strW.Close();
  85. this.line = new string[5];
  86. }
  87. else
  88. {
  89. this.After = "After You Login Press ./menu";
  90. this.str = new StreamReader(this.saveFile.FileName);
  91. for (int j = 0; j < 3; j++)
  92. {
  93. this.s = this.str.ReadLine();
  94. this.line[j] = this.s;
  95. }
  96. this.str.Close();
  97. this.strW = new StreamWriter(this.saveFile.OpenFile());
  98. this.strW.WriteLine("IP: " + this.tb_IP.Text);
  99. this.strW.WriteLine("Username: " + this.tb_UserName.Text);
  100. this.strW.WriteLine("Password: " + this.tb_pass.Text);
  101. this.strW.Close();
  102. this.line = new string[5];
  103. }
  104. }
  105. }
  106.  
  107. // Token: 0x06000007 RID: 7 RVA: 0x00002420 File Offset: 0x00000620
  108. protected override void Dispose(bool disposing)
  109. {
  110. bool flag = disposing && this.components != null;
  111. if (flag)
  112. {
  113. this.components.Dispose();
  114. }
  115. base.Dispose(disposing);
  116. }
  117.  
  118. // Token: 0x06000008 RID: 8 RVA: 0x00002458 File Offset: 0x00000658
  119. private void InitializeComponent()
  120. {
  121. ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(Form1));
  122. this.checkBox1 = new CheckBox();
  123. this.label1 = new Label();
  124. this.tb_IP = new TextBox();
  125. this.button1 = new Button();
  126. this.tb_UserName = new TextBox();
  127. this.label2 = new Label();
  128. this.tb_pass = new TextBox();
  129. this.label3 = new Label();
  130. this.saveFile = new SaveFileDialog();
  131. base.SuspendLayout();
  132. this.checkBox1.AutoSize = true;
  133. this.checkBox1.ForeColor = SystemColors.ButtonHighlight;
  134. this.checkBox1.Location = new Point(4, 154);
  135. this.checkBox1.Name = "checkBox1";
  136. this.checkBox1.Size = new Size(82, 17);
  137. this.checkBox1.TabIndex = 0;
  138. this.checkBox1.Text = "Add ./menu";
  139. this.checkBox1.UseVisualStyleBackColor = true;
  140. this.checkBox1.CheckedChanged += new EventHandler(this.checkBox1_CheckedChanged);
  141. this.label1.AutoSize = true;
  142. this.label1.ForeColor = SystemColors.ButtonHighlight;
  143. this.label1.Location = new Point(5, 15);
  144. this.label1.Name = "label1";
  145. this.label1.Size = new Size(71, 13);
  146. this.label1.TabIndex = 1;
  147. this.label1.Text = "Enter your IP:";
  148. this.tb_IP.Location = new Point(8, 31);
  149. this.tb_IP.Name = "tb_IP";
  150. this.tb_IP.Size = new Size(124, 20);
  151. this.tb_IP.TabIndex = 2;
  152. this.tb_IP.TextChanged += new EventHandler(this.textBox1_TextChanged);
  153. this.button1.Location = new Point(97, 188);
  154. this.button1.Name = "button1";
  155. this.button1.Size = new Size(75, 23);
  156. this.button1.TabIndex = 3;
  157. this.button1.Text = "Save";
  158. this.button1.UseVisualStyleBackColor = true;
  159. this.button1.Click += new EventHandler(this.button1_Click);
  160. this.tb_UserName.Location = new Point(8, 74);
  161. this.tb_UserName.Name = "tb_UserName";
  162. this.tb_UserName.Size = new Size(124, 20);
  163. this.tb_UserName.TabIndex = 5;
  164. this.label2.AutoSize = true;
  165. this.label2.ForeColor = SystemColors.ButtonHighlight;
  166. this.label2.Location = new Point(5, 58);
  167. this.label2.Name = "label2";
  168. this.label2.Size = new Size(109, 13);
  169. this.label2.TabIndex = 4;
  170. this.label2.Text = "Enter your Username:";
  171. this.tb_pass.Location = new Point(8, 115);
  172. this.tb_pass.Name = "tb_pass";
  173. this.tb_pass.Size = new Size(124, 20);
  174. this.tb_pass.TabIndex = 7;
  175. this.label3.AutoSize = true;
  176. this.label3.ForeColor = SystemColors.ButtonHighlight;
  177. this.label3.Location = new Point(5, 99);
  178. this.label3.Name = "label3";
  179. this.label3.Size = new Size(107, 13);
  180. this.label3.TabIndex = 6;
  181. this.label3.Text = "Enter your Password:";
  182. base.AutoScaleDimensions = new SizeF(6f, 13f);
  183. base.AutoScaleMode = AutoScaleMode.Font;
  184. this.BackColor = SystemColors.Highlight;
  185. base.CausesValidation = false;
  186. base.ClientSize = new Size(174, 214);
  187. base.Controls.Add(this.tb_pass);
  188. base.Controls.Add(this.label3);
  189. base.Controls.Add(this.tb_UserName);
  190. base.Controls.Add(this.label2);
  191. base.Controls.Add(this.button1);
  192. base.Controls.Add(this.tb_IP);
  193. base.Controls.Add(this.label1);
  194. base.Controls.Add(this.checkBox1);
  195. base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
  196. base.MaximizeBox = false;
  197. base.MinimizeBox = false;
  198. base.Name = "Form1";
  199. this.Text = "MeiMei";
  200. base.Load += new EventHandler(this.Form1_Load);
  201. base.ResumeLayout(false);
  202. base.PerformLayout();
  203. }
  204.  
  205. // Token: 0x04000001 RID: 1
  206. private string IP = "";
  207.  
  208. // Token: 0x04000002 RID: 2
  209. private string UserName = "";
  210.  
  211. // Token: 0x04000003 RID: 3
  212. private string Pass = "";
  213.  
  214. // Token: 0x04000004 RID: 4
  215. private string After = "";
  216.  
  217. // Token: 0x04000005 RID: 5
  218. private StreamWriter strW;
  219.  
  220. // Token: 0x04000006 RID: 6
  221. private StreamReader str;
  222.  
  223. // Token: 0x04000007 RID: 7
  224. private string[] line = new string[5];
  225.  
  226. // Token: 0x04000008 RID: 8
  227. private string s = "";
  228.  
  229. // Token: 0x04000009 RID: 9
  230. private IContainer components = null;
  231.  
  232. // Token: 0x0400000A RID: 10
  233. private CheckBox checkBox1;
  234.  
  235. // Token: 0x0400000B RID: 11
  236. private Label label1;
  237.  
  238. // Token: 0x0400000C RID: 12
  239. private TextBox tb_IP;
  240.  
  241. // Token: 0x0400000D RID: 13
  242. private Button button1;
  243.  
  244. // Token: 0x0400000E RID: 14
  245. private TextBox tb_UserName;
  246.  
  247. // Token: 0x0400000F RID: 15
  248. private Label label2;
  249.  
  250. // Token: 0x04000010 RID: 16
  251. private TextBox tb_pass;
  252.  
  253. // Token: 0x04000011 RID: 17
  254. private Label label3;
  255.  
  256. // Token: 0x04000012 RID: 18
  257. private SaveFileDialog saveFile;
  258. }
  259. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement