public void TestRender() { var regex = new RegexAnalyze("aa1222", @"\d"); regex.Match(); var content = regex.Compiler("{for} {" + " '{}'," + "} {end}"); Assert.IsTrue(content.IndexOf("1") > 0); }
private void MatchList_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e) { if (string.IsNullOrWhiteSpace(ReplaceTb.Text) || _regex == null) { return; } var template = ReplaceTb.Text; var dialog = new ResultDialog { Result = _regex.Compiler(template) }; _ = dialog.ShowAsync(); }
private void Listbox_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (_lists.Count < 1) { return; } var content = ReplaceTb.Text; Task.Factory.StartNew(() => { content = _regex.Compiler(content); Dispatcher.Invoke(() => { var page = new ResultView { Content = content }; page.Show(); }); }); }