static void Main() { Console.WriteLine("Path Found: " + VisualStudioProvider.TryGetSolutionDirectoryInfo() + exepath); homeScreen = new HomeScreen(); homeScreen.e_play += PlayButtonClicked; homeScreen.e_resolution += ResButtonClicked; homeScreen.Run(); }
static void PlayButtonClicked(object sender, System.EventArgs e) { ProcessStartInfo gproc = new ProcessStartInfo(); gproc.Arguments = null; gproc.FileName = VisualStudioProvider.TryGetSolutionDirectoryInfo() + exepath; gproc.WindowStyle = ProcessWindowStyle.Normal; gproc.CreateNoWindow = true; using (Process proc = Process.Start(gproc)) { proc.WaitForExit(); } }