static void Main(string[] args)
 {
     // Server value provided (silent execution)
     if (args.Length == 1)
     {
         // Silently fail if invalid server provided
         // Array is 0-indexed but user provided values
         // are probably 1-indexed
         // So subtract 1
         // Also this is naive parsing
         // We're only expecting a single number!
         // Someone want to make a proper parser?
         ServerManager sm = ServerManager.Instance;
         int           i  = Convert.ToInt32(args[0]);
         MegaracKVM.DownloadAndRunKVM(sm.servers[i - 1]);
     }
     else
     {
         Application.EnableVisualStyles();
         Application.SetCompatibleTextRenderingDefault(false);
         Application.Run(new Form1());
     }
 }
Beispiel #2
0
        private void serverListGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int r = e.RowIndex;

            MegaracKVM.DownloadAndRunKVM(sm.servers[r]);
        }
Beispiel #3
0
        private void connectButton_Click(object sender, EventArgs e)
        {
            Server s = new Server(txtHost.Text, txtUsername.Text, txtPassword.Text);

            MegaracKVM.DownloadAndRunKVM(s);
        }