コード例 #1
0
        private void ButtonMatch_Click(object sender, RoutedEventArgs e)
        {
            _vm.Init(GetOptions());
            var match = _vm.Match();

            if (match?.Success ?? false)
            {
                TextBox_Input.Focus();
                TextBox_Input.Select(match.Index, match.Length);
            }
        }
コード例 #2
0
        // State management
        private void SetType(DictionaryType type)
        {
            ClearOutput();
            ClearInput();
            switch (type)
            {
            // Array
            case DictionaryType.DemoImplementation:
                dictionary = new DemoImplementation();
                break;

            default:
                ShowMessage("Couldn't change type: Not implemented.");
                return;
            }

            ShowMessage("Changed type.");
            UpdateOutput();
            TextBox_Input.Focus();
        }
コード例 #3
0
 public MainWindow()
 {
     InitializeComponent();
     TextBox_Regex.Text = "(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]";
     TextBox_Input.Focus();
 }
コード例 #4
0
 private void ClearInput()
 {
     TextBox_Input.Clear();
     TextBox_Input.Focus();
 }