static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ThreadException += Application_ThreadException; AppDomain.CurrentDomain.UnhandledException += AppDomain_UnhandledException; Session.Profile = ProfileService.LoadProfile(); Application.Run(new PlayerForm()); }
private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { Session.Profile.PlayerLocation = Location; Session.Profile.PlayerSize = Size; ProfileService.SaveProfile(Session.Profile); }