internal void PreLoad() { var comboPath = Directory.GetCurrentDirectory() + "/library.xml"; if (jukeController.Browser.Songs.Count == 0 && File.Exists(comboPath)) { jukeController.LoadHandler.LoadSongs(new XmlSongReader(comboPath)); logger.Debug("Library reloaded! " + jukeController.Browser.Songs.Count); } else { Console.WriteLine("Library not found? " + jukeController.Browser.Songs.Count + " " + File.Exists(comboPath)); logger.Debug("Library not found " + comboPath + " " + File.Exists(comboPath)); } Messenger.Post("J.U.K.E. is now running. Please enjoy.\n"); Console.WriteLine("Running!"); }
public bool Startup(string serverLocation, bool verbose) { logger.Debug("Server Startup"); try { var p = Process.Start(new ProcessStartInfo(serverLocation) { RedirectStandardOutput = true, RedirectStandardError = true }); Thread.Sleep(500); return(!p.HasExited && p.Responding); } catch (Exception e) { logger.Error(e.Message); Console.Error.WriteLine(e.Message); return(false); } }