static void Main(string[] args) { //Parse the command line arguments string mapName = "-1"; string mapType = "-1"; for (int i = 0; i < args.Count(); i++) { if (args[i] == "--mapName") { mapName = args[i + 1]; } if (args[i] == "--mapType") { mapType = args[i + 1]; } ; } Network.init(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (mapName == "-1" || mapType == "-1") { Application.Run(new AskName()); } else { if (mapType == "mmcm") { MMCM_RemoteControlPanel remotePanel = new MMCM_RemoteControlPanel(); while (!remotePanel.Initialise(mapName)) { ; } Application.Run(remotePanel); //.Show(); } else if (mapType == "ctpc") { CTPC_RemoteControlPanel remotePanel = new CTPC_RemoteControlPanel(); while (!remotePanel.Initialise(mapName)) { ; } Application.Run(remotePanel); //.Show(); } } }
private void button1_Click(object sender, EventArgs e) { if (radioButtonMMCM.Checked) { MMCM_RemoteControlPanel remotePanel = new MMCM_RemoteControlPanel(); while (!remotePanel.Initialise(txtName.Text)) { ; } remotePanel.Show(); } else if (radioButtonCTPC.Checked) { CTPC_RemoteControlPanel remotePanel = new CTPC_RemoteControlPanel(); while (!remotePanel.Initialise(txtName.Text)) { ; } remotePanel.Show(); } }