public FindReplaceDialog(FindReplaceMgr theVM)
 {            
     InitializeComponent();
     DataContext = TheVM = theVM;
     this.Top =theVM.OwnerWindow.Top+  theVM.OwnerWindow.Height / 2-this.Height / 2;
     this.Left = theVM.OwnerWindow.Left+ theVM.OwnerWindow.Width - this.Width-5;
 }
Esempio n. 2
0
        private FindReplaceMgr MakeSample(string SampleText)
        {
            Editors.Clear();
            Editors.Add(new TextEditor() { Text=SampleText });
            Editors.Add(new TextEditor() { Text = SampleText });
            Editors.Add(new TextEditor() { Text = SampleText });
            Editors.Add(new TextEditor() { Text = SampleText });

            FindReplaceMgr ret = new FindReplaceMgr() { Editors=Editors, InterfaceConverter=new IEditorConverter(), CurrentEditor=Editors[0] };
            return ret;
        }
Esempio n. 3
0
 private void FindReplaceMgr_DialogWindowCreated(object sender, FindReplaceMgr.DialogWindowCreatedEventArgs e)
 {
     // register command bindings so hotkeys work when dialog window is active
     var s = sender as FindReplaceMgr;
     if (s == null) 
         return;
     e.Dialog.CommandBindings.Add(s.FindBinding);
     e.Dialog.CommandBindings.Add(s.FindNextBinding);
     e.Dialog.CommandBindings.Add(s.ReplaceBinding);
     e.Dialog.InputBindings.Add(new KeyBinding(NavigationCommands.Search, new KeyGesture(Key.F3, ModifierKeys.Shift)));
 }
 public FindReplaceDialog(FindReplaceMgr theVM)
 {            
     DataContext = TheVM = theVM;  
     InitializeComponent();
 }