Exemple #1
0
        private void SpeedRunsLiveForm_Load(object sender, EventArgs e)
        {
            btnJoinQuit.Enabled = false;
            var authDialog = new AuthenticationDialog();

            var credentials = WebCredentials.SpeedRunsLiveIRCCredentials;

            authDialog.Username         = credentials.Username ?? "";
            authDialog.Password         = credentials.Password ?? "";
            authDialog.RememberPassword = !string.IsNullOrEmpty(authDialog.Password);

            if (authDialog.ShowDialog(this) == DialogResult.OK)
            {
                var username = authDialog.Username;
                var password = authDialog.Password;

                WebCredentials.SpeedRunsLiveIRCCredentials = new SRLCredentials(username, authDialog.RememberPassword ? password : "");

                SRLClient.Connect(username, password);
            }
            else
            {
                Close();
            }
        }
        private void SpeedRunsLiveForm_Load(object sender, EventArgs e)
        {
            btnJoinQuit.Enabled = false;
            var authDialog = new AuthenticationDialog();

            ShareSettings.Default.Reload();
            authDialog.Username         = ShareSettings.Default.SRLIRCUsername;
            authDialog.Password         = ShareSettings.Default.SRLIRCPassword;
            authDialog.RememberPassword = authDialog.Password != "";
            if (authDialog.ShowDialog(this) == DialogResult.OK)
            {
                var username = authDialog.Username;
                var password = authDialog.Password;

                ShareSettings.Default.SRLIRCUsername = username;
                ShareSettings.Default.SRLIRCPassword = authDialog.RememberPassword ? password : "";
                ShareSettings.Default.Save();

                SRLClient.Connect(username, password);
            }
            else
            {
                Close();
            }
        }
        private void SpeedRunsLiveForm_Load(object sender, EventArgs e)
        {
            btnJoinQuit.Enabled = false;
            var authDialog = new AuthenticationDialog();
            ShareSettings.Default.Reload();
            authDialog.Username = ShareSettings.Default.SRLIRCUsername;
            authDialog.Password = ShareSettings.Default.SRLIRCPassword;
            authDialog.RememberPassword = authDialog.Password != "";
            if (authDialog.ShowDialog(this) == DialogResult.OK)
            {
                var username = authDialog.Username;
                var password = authDialog.Password;

                ShareSettings.Default.SRLIRCUsername = username;
                ShareSettings.Default.SRLIRCPassword = authDialog.RememberPassword ? password : "";
                ShareSettings.Default.Save();

                SRLClient.Connect(username, password);
            }
            else
            {
                Close();
            }
        }