Beispiel #1
0
        private void lnkResetCookies_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            // Clear the settings
            Settings.Default.sessionid     = string.Empty;
            Settings.Default.steamLogin    = string.Empty;
            Settings.Default.myProfileURL  = string.Empty;
            Settings.Default.steamparental = string.Empty;
            Settings.Default.Save();

            // Stop the steam-idle process
            StopIdle();

            // Clear the badges list
            AllBadges.Clear();

            // Resize the form
            var graphics = CreateGraphics();
            var scale    = graphics.DpiY * 1.625;

            Height = Convert.ToInt32(scale);

            // Set timer intervals
            tmrCheckSteam.Interval      = 500;
            tmrCheckCookieData.Interval = 500;

            // Hide lblDrops and lblIdle
            lblDrops.Visible = false;
            lblIdle.Visible  = false;

            // Set IsCookieReady to false
            IsCookieReady = false;

            // Re-enable tmrReadyToGo
            tmrReadyToGo.Enabled = true;
        }
Beispiel #2
0
        /// <summary>
        /// Log out from current account
        /// </summary>
        private void Logout()
        {
            _updater.Stop();
            StopIdle();

            IsAuthorized = false;

            // Clear the account settings
            Storage.SessionId        = string.Empty;
            Storage.SteamLoginSecure = string.Empty;
            Storage.SteamParental    = string.Empty;
            UserName                      =
                ProfileUrl                =
                    Level                 =
                        AvatarUrl         =
                            BackgroundUrl = null;
            FavoriteBadge                 = null;
            Storage.IdleMode              = 0;
            Storage.BadgeFilter           =
                Storage.ShowcaseFilter    = string.Empty;

            AllBadges.Clear();
            IdleQueueBadges.Clear();

            Storage.Save();

            foreach (var showcase in AllShowcases)
            {
                showcase.IsCompleted = false;
                showcase.CanCraft    = false;
                showcase.IsOwned     = false;
            }
            Logger.Info("See you later");
        }
Beispiel #3
0
        /// <summary>
        /// Performs reset to initial state
        /// </summary>
        private void ResetClientStatus()
        {
            // Clear the settings
            Settings.Default.sessionid        = string.Empty;
            Settings.Default.steamLogin       = string.Empty;
            Settings.Default.myProfileURL     = string.Empty;
            Settings.Default.steamparental    = string.Empty;
            Settings.Default.mainWindowLeft   = 0;
            Settings.Default.mainWindowTop    = 0;
            Settings.Default.useMainWindowPos = false;
            Settings.Default.Save();

            // Stop the steam-idle process
            StopIdle();

            // Clear the badges list
            AllBadges.Clear();

            // Resize the form
            var graphics = CreateGraphics();
            var scale    = graphics.DpiY * 1.625;

            Height = Convert.ToInt32(scale);

            // Set timer intervals
            tmrCheckSteam.Interval      = 500;
            tmrCheckCookieData.Interval = 500;

            // Hide signed user name
            if (Settings.Default.showUsername)
            {
                lblSignedOnAs.Text    = String.Empty;
                lblSignedOnAs.Visible = false;
            }

            // Hide spinners
            picReadingPage.Visible = false;

            // Hide lblDrops and lblIdle
            lblDrops.Visible = false;
            lblIdle.Visible  = false;

            // Set IsCookieReady to false
            IsCookieReady = false;

            // Re-enable tmrReadyToGo
            tmrReadyToGo.Enabled = true;
        }
Beispiel #4
0
        private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // Show the form
            var previous = Settings.Default.sort;
            var frm      = new frmSettings();

            frm.ShowDialog();

            if (previous != Settings.Default.sort)
            {
                StopIdle();
                AllBadges.Clear();
                tmrReadyToGo.Enabled = true;
            }

            if (Settings.Default.showUsername)
            {
                lblSignedOnAs.Text = "Signed in as " + GetUserName();
            }

            lblSignedOnAs.Visible = Settings.Default.showUsername;
        }
Beispiel #5
0
        private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // Show the form
            String  previous          = Settings.Default.sort;
            Boolean previous_behavior = Settings.Default.OnlyOneGameIdle;
            Form    frm = new frmSettings();

            frm.ShowDialog();

            if (previous != Settings.Default.sort || previous_behavior != Settings.Default.OnlyOneGameIdle)
            {
                StopIdle();
                AllBadges.Clear();
                tmrReadyToGo.Enabled = true;
            }

            if (Settings.Default.showUsername && IsCookieReady)
            {
                lblSignedOnAs.Text    = SteamProfile.GetSignedAs();
                lblSignedOnAs.Visible = Settings.Default.showUsername;
            }
        }
 private void ReloadList()
 {
     StopIdle();
     AllBadges.Clear();
     tmrReadyToGo.Enabled = true;
 }