public OptionPage(OptionPageCustom optionsHolder) { this.InitializeComponent(); this.OptionsHolder = optionsHolder; this.chkPublishButton.Checked = this.OptionsHolder.HideByDefault; }
private async Task DoHidePublishButtonIfRequiredAsync(System.Threading.CancellationToken cancellationToken) { OptionPageCustom page = (OptionPageCustom)this.GetDialogPage(typeof(OptionPageCustom)); if (page.HideByDefault) { if (ThreadHelper.CheckAccess() == false) { await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); } this.DoHidePublishButton(); } }