Ejemplo n.º 1
0
 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;
     }
 }
Ejemplo n.º 2
0
 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();
 }