public Accueil() { InitializeComponent(); Acc = this; // Je Fawk | 13 April 2014 | Reading the game path that was written b the ServerLauncher // Explanation notes: // Application.StartupPath.Remove(Application.StartupPath.LastIndexOf('\\')) + "\\GamePath.txt") // * gets the application startup path // * substracts the last \ // * adds the GamePath.txt to it using (System.IO.StreamReader streamReader = new StreamReader(Application.StartupPath.Remove(Application.StartupPath.LastIndexOf('\\')) + "\\GamePath.txt")) { pathToGameExecutable = streamReader.ReadLine(); pathToGameFolder = streamReader.ReadLine(); } }
public Accueil() { InitializeComponent(); Acc = this; }