예제 #1
0
 static void Main()
 {
     var app = new Application();
     var window = new RegexEditor();
     app.MainWindow = window;
     app.Run(window);
 }
예제 #2
0
        private void ShowEditor(string regex, string test, Action<RegexEditor> replacer)
        {
            var editor = new RegexEditor
                {
                    Replacer = replacer
                };
            if (regex != null)
            {
                editor.RegularExpression = regex;
            }
            if (test != null)
            {
                editor.TestingText = test;
            }

            var helper = new WindowInteropHelper(editor);
            helper.EnsureHandle();
            helper.Owner = Handle;

            editor.ShowDialog();
        }