Guest User

SSH_All_In_One_!

a guest
Aug 2nd, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. using 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.  
  11. namespace SSH_All_In_One
  12. {
  13. public partial class Form1 : Form
  14. {
  15. public Form1()
  16. {
  17. InitializeComponent();
  18. }
  19.  
  20.  
  21. private void Form1_Load(object sender, EventArgs e)
  22. {
  23.  
  24. }
  25.  
  26. private void button1_Click(object sender, EventArgs e)
  27. {
  28. if (comboBox1.SelectedIndex == 0)
  29. {
  30. Loc_SSH_Hu();
  31. }
  32. else
  33. {
  34. MessageBox.Show("Cac tac vu khac dang duoc cap nhat");
  35. }
  36. }
  37.  
  38. private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
  39. {
  40. //if (comboBox1.SelectedIndex == 0)
  41. // MessageBox.Show("loc ssh hu");
  42. //else if (comboBox1.SelectedIndex == 1)
  43. // MessageBox.Show("loc ssh trung ip ,pass, user");
  44. }
  45.  
  46. public void Loc_SSH_Hu()
  47. {
  48. string[] danh_sach_nhap_vao = textBox1.Text.Trim().Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
  49. for (int i = 0; i < danh_sach_nhap_vao.Length; i++)
  50. // MessageBox.Show(danh_sach_nhap_vao[i]);
  51. //MessageBox.Show("Thuc hien tac vu");
  52. {
  53. string ssh = danh_sach_nhap_vao[i];
  54. if (string.IsNullOrEmpty(ssh) == false)
  55. {
  56. string[] ssh_arr = ssh.Split(';');
  57. if (ssh_arr.Length >= 3)
  58. {
  59. textBox2.Text += ssh + Environment.NewLine;
  60. }
  61. }
  62. }
  63. }
  64.  
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment