void NameFormLoad(object sender, EventArgs e) { if (!File.Exists(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\PlayerConfig.txt")) { SecurityFuncs.GeneratePlayerID(); SecurityFuncs.WriteConfigValues(); SecurityFuncs.ReadConfigValues(); } else { SecurityFuncs.ReadConfigValues(); } textBox1.Text = GlobalVars.Name; }
protected override void OnFormClosing(FormClosingEventArgs e) { base.OnFormClosing(e); SecurityFuncs.WriteConfigValues(); GlobalVars.ReadyToLaunch = true; }