private void OnLoggedOn(SteamUser.LoggedOnCallback callback) { if (this.Visible == false) { return; } Program.steam.isRunning = false; if (callback.Result != EResult.OK) { if (Program.isMinimized) { Utils.ShowNotify(Program.notifyIcon, "The connection of your Steam account has been lost."); } else { MessageBox.Show("The connection of your Steam account has been lost.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } Program.steamAvailable = false; IniModel.DeleteSteamLoginKey(); return; } else { Program.steamAvailable = true; } }
private void SteamLogoutButton_Click(object sender, EventArgs e) { if (Program.steamAvailable) { IniModel.DeleteSteamLoginKey(); Program.steam.Disconnect(); Program.steam = new Platforms.Steam(); Program.steamAvailable = false; } else { Steam steamLogin = new Steam(); steamLogin.ShowDialog(); steamLogin.Dispose(); steamLogin = null; Program.steamAvailable = Program.steam.isConnected(); } this.Close(); }