public override void Execute(object parameter) { var SelectedText = _IDEProvider.GetSelectedText().Trim(); if (!Regex.IsMatch(SelectedText, @"^[a-z0-9_]+$", RegexOptions.IgnoreCase)) { throw new Exception($"Ошибочный текст для поиска в Dicti:\r\n{SelectedText}"); } WindowDicti wd = new WindowDicti(SelectedText); wd.Show(); }
private void ButtonDicti_Click(object sender, RoutedEventArgs e) { WindowDicti d = new WindowDicti("123"); d.Show(); }