コード例 #1
0
        public bool AskForDonation()
        {
            if (!PreferenceAll.Global.ApplicationAskedForDonation && PreferenceAll.Global.ApplicationCallCounter > 50)
            {
                var result = new AnotherMessageBox().Show(_lstrContributionText.Text, _lstrContributionTitle.Text,
                    MessageBoxButtons.YesNo);

                PreferenceAll.Global.ApplicationAskedForDonation = true;

                if (result == DialogResult.Yes)
                    return true;
            }

            return false;
        }
コード例 #2
0
        private void btnRestoreSettings_Click(object sender, EventArgs e)
        {
            var result = new AnotherMessageBox().Show(_lstrApplicationRestoreSettingsText.Text, _lstrApplicationRestoreSettingsHeader.Text, MessageBoxButtons.YesNo
                );

            if (result == DialogResult.Yes)
            {
                PSettings.Restore();
                RestorePanelPositionAndSize();
                ControlsFill();
            }
        }
コード例 #3
0
        private void ShowAvailableUpdates()
        {
            if (InvokeRequired)
            {
                BeginInvoke(new ShowAvailableUpdatesDelegate(ShowAvailableUpdates));
                return;
            }

            var result = new AnotherMessageBox().Show(_strUpdateFiles + "\n" + _lstrApplicationDoYouWishToUpdate, _lstrApplicationUpdateTitle.Text, MessageBoxButtons.YesNo);
            if (result == DialogResult.Yes)
            {
                if (File.Exists(Constants.StrDownloadManager))
                {
                    _bLaunchDownloadManager = true;
                    Close();
                }
            }

            _strUpdateFiles = String.Empty;
        }