private void moreMenuButton_Click(object sender, EventArgs e) { this.btFind.Enabled = this.btEstimate.Enabled = this.miCloseText.Enabled = !string.IsNullOrEmpty(this.FileName); this.nextSentenceToolStripMenuItem.Enabled = this.List.Items.Count > this.List.SelectedIndex + 1; this.previousSentenceToolStripMenuItem.Enabled = 0 < this.List.SelectedIndex; // TODO: а были ли изменения?? this.saveToolStripMenuItem.Enabled = !string.IsNullOrEmpty(this.FileName); // this.btEstimate.Enabled = !string.IsNullOrEmpty(this.FullText); #region btFindUsages.Enabled string _currentWordOrText = TipTextBox.GetCurrentWord(this.TipTextBox); // this.btFind.Enabled = !string.IsNullOrEmpty(this.FullText); string _menuText = "Find '{0}'"; if (this.btFind.Enabled) { this.btFind.ToolTipText = string.Format(_menuText, _currentWordOrText); } else { this.btFind.ToolTipText = string.Format(_menuText, "Selected"); } #endregion }
public void FindCitationsForWordAndShow() { string _currentWordOrText = TipTextBox.GetCurrentWord(this.TipTextBox); if (string.IsNullOrEmpty(_currentWordOrText)) { return; } FindForm searcher = new FindForm(); searcher.InitAndSearch(this.FullText, _currentWordOrText); //TODO: using (new AbandonTopPosition(Utils.VideoForm)) // а надо ли ? searcher.Show(); }