//todo: start the new server, and the controller on a new thread public Controller(ControllerDialog controllerDialog, XMLData xmlData) { _main = new Thread(mainloop); _server = new Server(controllerDialog.LoggerControl); _controllerDialog = controllerDialog; _xmlData = xmlData; _main.Start(); }
private void toolStripMenuItem1_Click(object sender, EventArgs e) { // load xml FileDialog dialog = new OpenFileDialog(); dialog.ShowDialog(); string xmlFilePath = dialog.FileName; try { _xmlData = XMLData.LoadScript(xmlFilePath); LoggerControl.Log(LogType.Notice, "Succesfully loaded XML (Last vehicle spawn on: " + _xmlData.vehicles[_xmlData.vehicles.Count - 1].spawnTime + " ms; Containing :" + _xmlData.vehicles.Count + " vehicles)"); } catch { LoggerControl.Log(LogType.Error, "Failed to load File"); } }