private void DefinitionBox_FormClosing(object sender, FormClosingEventArgs e) { ThisAddIn.DecreaseDialogCoords(); WordHelpers.RunActionWithWaitCursor(() => { if (HighlightAllUsages.Checked) { if (_corectDefinitionOccurences.Count != 0) { DocumentHelpers.ClearHightlightOnAllInstancesOfTerm(_corectDefinitionOccurences); } } if (HighlightIncorrectUsages.Checked) { if (_incorrectDefinitionOccurences.Count != 0) { DocumentHelpers.ClearHightlightOnAllInstancesOfTerm(_incorrectDefinitionOccurences); } } if (_currentPosition != null) { Navigate.ToRange(_currentPosition); } }); }
private void DefinitionBox_Load(object sender, EventArgs e) { ThisAddIn.CheckDialogDimensions(this.Width, this.Height); SetDesktopLocation(ThisAddIn.xCoordDialog, ThisAddIn.yCoordDialog); SetDefinitionBoxFieldsText(); Init(); ThisAddIn.IncreaseDialogCoords(); }
private void ListOfDefinitions_Load(object sender, EventArgs e) { foreach (var elem in _definition.Locations) { var definitionText = elem.Text; if (definitionText.Length > 100) { definitionText = definitionText.Substring(0, 100); definitionText += "..."; } multiLineListBox1.Items.Add($"Document: {_sourceFile}\n{definitionText}"); } multiLineListBox1.SelectedIndex = 0; label1.Text = _definition.Singular; ThisAddIn.CheckDialogDimensions(this.Width, this.Height); SetDesktopLocation(ThisAddIn.xCoordDialog, ThisAddIn.yCoordDialog); ThisAddIn.IncreaseDialogCoords(); }
private void ListOfDefinitions_FormClosed(object sender, FormClosedEventArgs e) { ThisAddIn.DecreaseDialogCoords(); }