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 btnThucHien_Click(object sender, EventArgs e)
- {
- LOC_SSH_HU();
- }
- public void LOC_SSH_HU()
- {
- //MessageBox.Show("đã thực hiện click");
- //var k = 0;
- string[] Danh_sach_nhap_vao = txtDauVao.Text.Trim().Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
- for (int i = 0; i < Danh_sach_nhap_vao.Length; i++)
- {
- //MessageBox.Show(Danh_sach_nhap_vao[i]);
- string ssh = Danh_sach_nhap_vao[i];
- //Kiểm tra không rỗng
- if (string.IsNullOrEmpty(ssh) == false)
- {
- string[] ssh_Array = ssh.Split('|');
- //Kiểm tra ssh hợp lệ có đủ ip/user/pass
- if (ssh_Array.Length >= 3)
- {
- // Xuất ra txtDauRa list ssh "Environment.NewLine" ==> enter xuống dòng
- txtDauRa.Text += ssh + Environment.NewLine;
- }
- }
- }
- }
- private void cbTacVu_SelectedIndexChanged(object sender, EventArgs e)
- {
- //if (cbTacVu.SelectedIndex == 0)
- //{
- // MessageBox.Show("index = 0");
- //}
- //else if (cbTacVu.SelectedIndex == 1)
- //{
- // MessageBox.Show("index = 1");
- //}
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement