Advertisement
Guest User

Untitled

a guest
Oct 4th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.07 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.Windows.Forms;
  9.  
  10. namespace Test_Form
  11. {
  12.     public partial class Form1 : Form
  13.     {
  14.         string[][] remoteServer = new string[][] {
  15.             new string[] {".", null, null},
  16.             new string[] {"localhost", null, null}
  17.             //new string[] {"194.20.54.209", "", ""}
  18.         };
  19.  
  20.         public Form1()
  21.         {
  22.             InitializeComponent();
  23.  
  24.             List<Host> hosts = Host.GetAllHost();
  25.             string username = "";
  26.             string password = "";
  27.  
  28.             List<ManagerDataRow> mgnRows = new List<ManagerDataRow>();
  29.             foreach (Host host in hosts)
  30.             {
  31.                 Manager mgn = new Manager(host.host, username, password);
  32.                 ManagerDataRow mdr = new ManagerDataRow(mgn);
  33.                 mgnRows.Add(mdr);
  34.             }
  35.  
  36.             // Add row to the Grid
  37.             srvInfoGrid.DataSource = mgnRows;
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement