示例#1
0
        private void EnsureChorusAccount()
        {
            if (_chorusAccounts.Any())
            {
                return;
            }
            DialogResult buttonPress = MultiButtonMsgDlg.Show(
                this,
                TextUtil.LineSeparate(
                    Resources.OpenDataSourceDialog_EnsureChorusAccount_No_Chorus_acounts_have_been_specified,
                    Resources.OpenDataSourceDialog_EnsureChorusAccount_Press_Register_to_register_for_an_account_on_the_Chorus_Project,
                    Resources.OpenDataSourceDialog_EnsureChorusAccount_Press_Add_to_use_specify_an_existing_Chorus_account),
                Resources.OpenDataSourceDialog_EnsureChorusAccount_Register, Resources.OpenDataSourceDialog_EnsureChorusAccount_Add, true);

            if (buttonPress == DialogResult.Cancel)
            {
                return;
            }

            if (buttonPress == DialogResult.Yes)
            {
                // person intends to register
                WebHelpers.OpenLink(this, "https://chorusproject.org/pages/register.html"); // Not L10N
            }
            var newAccount = _chorusAccounts.NewItem(this, _chorusAccounts, null);

            if (null != newAccount)
            {
                _chorusAccounts.Add(newAccount);
            }
        }