private void MainWindow_Closed(object sender, EventArgs e) { Settings.Default.Save(); overlay.Close(); HotkeyManager.Disable(); ETWPingMonitor.Stop(); }
static void Main(string[] args) { JObject settings = JObject.Parse(File.ReadAllText("settings.txt")); Console.CursorVisible = false; Console.Title = "DS3 Connection Info V3.3"; SteamNative.Initialize(); mem = new MemoryManager(); Console.WriteLine("Dark Souls III: Closed"); do { try { mem.OpenProcess("DarkSoulsIII"); } catch { } Thread.Sleep(2000); } while (mem.ProcHandle == IntPtr.Zero); if (!SteamApi.Initialize(374320)) { Console.WriteLine("ERROR: Could not initalize SteamAPI."); Console.Read(); return; } ETWPingMonitor.Start(); if ((bool)settings["overlay"]) { Overlay.Enable(settings); } Console.Clear(); while (!mem.HasExited) { Player.UpdatePlayerList(); Player.UpdateInGameInfo(mem.Process); PrintConnInfo(); Thread.Sleep(1000); } Overlay.Disable(); ETWPingMonitor.Stop(); }