예제 #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;
     }
 }
예제 #2
0
파일: Settings.cs 프로젝트: eai04191/OnPS
 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();
 }