public RegexWindow(RegexWindowViewModel viewModel, Window owner) { InitializeComponent(); DataContext = _viewModel = viewModel; Owner = owner; Background = Owner.Background; Icon = Owner.Icon; }
private void _regexTesterLink_OnClick(object sender, RoutedEventArgs e) { var regexViewModel = new RegexWindowViewModel { RegexString = "", TitleText = "Regex Tester", }; var regexWindow = new RegexWindow(regexViewModel, this); regexWindow.Show(); }
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; } }