Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using 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;
- namespace SSH_All_In_One
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- private void richTextBox1_TextChanged(object sender, EventArgs e)
- {
- }
- private void richTextBox2_TextChanged(object sender, EventArgs e)
- {
- }
- private void label1_Click(object sender, EventArgs e)
- {
- }
- private void label2_Click(object sender, EventArgs e)
- {
- }
- private void label3_Click(object sender, EventArgs e)
- {
- }
- private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- //if (comboBox1.SelectedIndex == 0)
- //{
- // MessageBox.Show("Loc SSH hu !");
- //}
- //else if (comboBox1.SelectedIndex == 1)
- //{
- // MessageBox.Show("Loc SSH trung ca user va password");
- //}
- }
- private void button1_Click(object sender, EventArgs e)
- {
- if(cbTacVu.SelectedIndex == 0)
- {
- Loc_SSH_Hu();
- }
- else
- {
- MessageBox.Show("Cac chuc nang khac se som co :)");
- }
- //MessageBox.Show("Thuc hien tac vu");
- }
- public void Loc_SSH_Hu()
- {
- string[] danh_sach_Nhap_Vap = txtDauVao.Text.Trim().Split(new string[]{Environment.NewLine}, StringSplitOptions.None);
- for (int i = 0; i < danh_sach_Nhap_Vap.Length; i++)
- {
- string ssh = danh_sach_Nhap_Vap[i];
- if (string.IsNullOrEmpty(ssh) == false)
- {
- string[] ssh_Array = ssh.Split('|');
- if (ssh_Array.Length >= 3)
- {
- txtDauRa.Text += ssh + Environment.NewLine;
- //MessageBox.Show("SSH" + ssh + "la SSH loi");
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement