Advertisement
Sonicbdwa

Text Box :P

Aug 4th, 2015
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.37 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.         private void Form1_Load(object sender, EventArgs e)
  20.         {
  21.  
  22.         }
  23.         private void richTextBox1_TextChanged(object sender, EventArgs e)
  24.         {
  25.  
  26.         }
  27.         private void richTextBox2_TextChanged(object sender, EventArgs e)
  28.         {
  29.  
  30.         }
  31.         private void label1_Click(object sender, EventArgs e)
  32.         {
  33.  
  34.         }
  35.         private void label2_Click(object sender, EventArgs e)
  36.         {
  37.  
  38.         }      
  39.         private void label3_Click(object sender, EventArgs e)
  40.         {
  41.  
  42.         }
  43.         private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
  44.         {
  45.             //if (comboBox1.SelectedIndex == 0)
  46.             //{
  47.             //    MessageBox.Show("Loc SSH hu !");
  48.             //}
  49.             //else if (comboBox1.SelectedIndex == 1)
  50.             //{
  51.             //    MessageBox.Show("Loc SSH trung ca user va password");
  52.             //}
  53.         }
  54.         private void button1_Click(object sender, EventArgs e)
  55.         {
  56.             if(cbTacVu.SelectedIndex == 0)
  57.             {
  58.                 Loc_SSH_Hu();
  59.             }
  60.             else
  61.             {
  62.                 MessageBox.Show("Cac chuc nang khac se som co :)");
  63.             }
  64.             //MessageBox.Show("Thuc hien tac vu");
  65.         }
  66.         public void Loc_SSH_Hu()
  67.         {
  68.             string[] danh_sach_Nhap_Vap = txtDauVao.Text.Trim().Split(new string[]{Environment.NewLine}, StringSplitOptions.None);
  69.             for (int i = 0; i < danh_sach_Nhap_Vap.Length; i++)
  70.             {
  71.                 string ssh = danh_sach_Nhap_Vap[i];
  72.                 if (string.IsNullOrEmpty(ssh) == false)
  73.                 {
  74.                     string[] ssh_Array = ssh.Split('|');
  75.                     if (ssh_Array.Length >= 3)
  76.                     {
  77.                         txtDauRa.Text += ssh + Environment.NewLine;
  78.                         //MessageBox.Show("SSH" + ssh + "la SSH loi");
  79.                     }
  80.                 }
  81.             }
  82.         }
  83.     }
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement