Bloom.MiscUI.ProblemReporterDialog.SetDefaultIncludeBookSetting C# (CSharp) Method

SetDefaultIncludeBookSetting() public method

public SetDefaultIncludeBookSetting ( bool include ) : void
include bool
return void
        public void SetDefaultIncludeBookSetting(bool include)
        {
            _includeBook.Checked = include;
            UpdateDisplay();
        }

Usage Example

        /// <summary>
        /// Support the "Report a Problem" button when it shows up in the preview window as part of
        /// a page reporting that we can't open the book for some reason.
        /// </summary>
        private void _previewBrowser_OnBrowserClick(object sender, EventArgs e)
        {
            if (GetAnchorHref(e).EndsWith("ReportProblem"))
            {
                using (var dlg = new ProblemReporterDialog(null,_bookSelection))
                {
                    dlg.SetDefaultIncludeBookSetting(true);
                    dlg.Description =
                        "This book had a problem. Please tell us anything that might be helpful in diagnosing the problem here:" +
                        Environment.NewLine;

                    try
                    {
                        dlg.Description += Environment.NewLine + Environment.NewLine + Environment.NewLine;
                        if(_bookSelection.CurrentSelection.Storage != null)
                        {
                            dlg.Description += _bookSelection.CurrentSelection.Storage.ErrorMessagesHtml;
                        }
                    }
                    catch (Exception)
                    {
                        //no use chasing errors generated getting error info
                    }
                    dlg.ShowInTaskbar = true;
                    dlg.ShowDialog();
                }
            }
        }