示例#1
0
 public RegexWindow(RegexWindowViewModel viewModel, Window owner)
 {
     InitializeComponent();
     DataContext = _viewModel = viewModel;
     Owner       = owner;
     Background  = Owner.Background;
     Icon        = Owner.Icon;
 }
示例#2
0
        private void _regexTesterLink_OnClick(object sender, RoutedEventArgs e)
        {
            var regexViewModel = new RegexWindowViewModel
            {
                RegexString = "",
                TitleText   = "Regex Tester",
            };
            var regexWindow = new RegexWindow(regexViewModel, this);

            regexWindow.Show();
        }
示例#3
0
        private void ContainingTextRegexSettingsButton_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            var regexViewModel = new RegexWindowViewModel
            {
                RegexString = mViewModel.ContainingText,
                Options     = mViewModel.ContainingTextRegexOptions,
            };
            var regexWindow = new RegexWindow(regexViewModel, this);

            regexWindow.ShowDialog();
            if (regexViewModel.Apply)
            {
                mViewModel.ContainingText             = regexViewModel.RegexString;
                mViewModel.ContainingTextRegexOptions = regexViewModel.Options;
            }
        }