public DictionaryConfigurationDlg(PropertyTable propertyTable) { m_propertyTable = propertyTable; InitializeComponent(); m_preview.Dock = DockStyle.Fill; m_preview.Location = new Point(0, 0); previewDetailSplit.Panel1.Controls.Add(m_preview); manageConfigs_treeDetailButton_split.IsSplitterFixed = true; treeDetail_Button_Split.IsSplitterFixed = true; this.MinimumSize = new Size(m_grpConfigurationManagement.Width + 3, manageConfigs_treeDetailButton_split.Height); m_helpTopicProvider = propertyTable.GetValue <IHelpTopicProvider>("HelpTopicProvider"); m_helpProvider = new HelpProvider { HelpNamespace = m_helpTopicProvider.HelpFile }; m_helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(HelpTopic)); m_helpProvider.SetHelpNavigator(this, HelpNavigator.Topic); m_helpProvider.SetShowHelp(this, true); // Restore the location and size from last time we called this dialog. if (m_propertyTable != null) { object locWnd = m_propertyTable.GetValue <object>("DictionaryConfigurationDlg_Location"); object szWnd = m_propertyTable.GetValue <object>("DictionaryConfigurationDlg_Size"); if (locWnd != null && szWnd != null) { Rectangle rect = new Rectangle((Point)locWnd, (Size)szWnd); ScreenHelper.EnsureVisibleRect(ref rect); DesktopBounds = rect; StartPosition = FormStartPosition.Manual; } } }
public UploadToWebonaryDlg(UploadToWebonaryController controller, UploadToWebonaryModel model, PropertyTable propertyTable) { InitializeComponent(); if (MiscUtils.IsUnix) { MinimumSize = new Size(MinimumSize.Width, MinimumSize.Height + m_additionalMinimumHeightForMono); } m_controller = controller; Model = model; LoadFromModel(); m_helpTopicProvider = propertyTable.GetValue <FwXApp>("App"); // When a link is clicked, open a web page to the URL. explanationLabel.LinkClicked += (sender, args) => { using (Process.Start(((LinkLabel)sender).Text.Substring(args.Link.Start, args.Link.Length))) {} }; // Restore the location and size from last time we called this dialog. if (PropertyTable != null) { object locWnd = PropertyTable.GetValue <object>("UploadToWebonaryDlg_Location"); object szWnd = PropertyTable.GetValue <object>("UploadToWebonaryDlg_Size"); if (locWnd != null && szWnd != null) { Rectangle rect = new Rectangle((Point)locWnd, (Size)szWnd); ScreenHelper.EnsureVisibleRect(ref rect); DesktopBounds = rect; StartPosition = FormStartPosition.Manual; } } // Start with output log area not shown by default // When a user clicks Publish, it is revealed. This is done within the context of having a resizable table of controls, and having // the output log area be the vertically growing control when a user increases the height of the dialog this.Shown += (sender, args) => { ValidateSortingOnAlphaHeaders(); this.Height = this.Height - outputLogTextbox.Height; }; // Handle localizable explanation area with link. var explanationText = xWorksStrings.toApplyForWebonaryAccountExplanation; var explanationTextLink = xWorksStrings.toApplyForWebonaryAccountLink; var explanationTextLinkStart = explanationText.IndexOf("{", StringComparison.Ordinal); var explanationTextLinkLength = explanationTextLink.Length; explanationLabel.Text = string.Format(explanationText, explanationTextLink); // Don't blow up if a localization didn't allow for the link. if (explanationTextLinkStart < 0) { explanationTextLinkStart = 0; explanationTextLinkLength = 0; } explanationLabel.LinkArea = new LinkArea(explanationTextLinkStart, explanationTextLinkLength); }
private void btnStyles_Click(object sender, EventArgs e) { XCore.PropertyTable propertyTable = null; LexImportWizard wiz = LexImportWizard.Wizard(); if (wiz != null) { propertyTable = wiz.PropTable; } if (propertyTable == null) { // See LT-9100 and LT-9266. Apparently this condition can happen. MessageBox.Show(LexTextControls.ksCannotSoTryAgain, LexTextControls.ksInternalProblem, MessageBoxButtons.OK, MessageBoxIcon.Information); return; } FwStylesDlg.RunStylesDialogForCombo(cbStyle, InitializeStylesComboBox, "", m_stylesheet as LcmStyleSheet, 0, 0, m_cache, this, propertyTable.GetValue <IApp>("App"), m_helpTopicProvider, null); }
private void helpButton_Click(object sender, EventArgs e) { ShowHelp.ShowHelpTopic(m_propertyTable.GetValue <IHelpTopicProvider>("HelpTopicProvider"), m_helpTopic); }