public void EmulteClickTest()
        {
            WPFMenuItem item = new WPFMenuItem(_ctrl._menuItem);

            item.EmulateClick();
            Assert.IsTrue((bool)_ctrl.menuItemClicked);
        }
 public void EmulteClickTestAsync()
 {
     WPFMenuItem item = new WPFMenuItem(_ctrl._menuItemMessage);
     Async async = new Async();
     WindowControl windowControl = WindowControl.FromZTop(_app);
     item.EmulateClick(async);
     new NativeMessageBox(windowControl.WaitForNextModal()).EmulateButtonClick("OK");
     async.WaitForCompletion();
 }
        public void EmulteClickTestAsync()
        {
            WPFMenuItem   item          = new WPFMenuItem(_ctrl._menuItemMessage);
            Async         async         = new Async();
            WindowControl windowControl = WindowControl.FromZTop(_app);

            item.EmulateClick(async);
            new NativeMessageBox(windowControl.WaitForNextModal()).EmulateButtonClick("OK");
            async.WaitForCompletion();
        }
Beispiel #4
0
        /// <summary>
        /// 指定パスにあるフレーズ辞書を現在使用されているフレーズ辞書に統合します。
        /// 統合は後勝ちで実行されます。
        /// </summary>
        /// <param name="srcPdicPath"></param>
        public void MergePdicToCurrent(string srcPdicPath)
        {
            Async       async  = new Async();
            Async       async1 = new Async();
            WPFMenuItem mi     = new WPFMenuItem(rootControl.LogicalTree().ByType <MenuItem>().ByBinding("OptionsCommand").Single());

            mi.EmulateClick(async);
            WindowControl settingsWindow       = rootControl.WaitForNextModal();
            WPFButtonBase mergePhraseDicButton = new WPFButtonBase(settingsWindow.LogicalTree().ByType <Button>().ByBinding("MergePhraseDicCommand").Single());

            mergePhraseDicButton.EmulateClick(async1);
            WindowControl selectDialog = rootControl.WaitForNextModal();

            MergeFile(selectDialog, srcPdicPath);

            WindowControl resultDialog = settingsWindow.WaitForNextModal().WaitForNextModal();

            new NativeButton(resultDialog.IdentifyFromWindowText("OK")).EmulateClick();
            new WPFButtonBase(settingsWindow.LogicalTree().ByType <Button>().ByBinding("OkCommand").Single()).EmulateClick();
            async1.WaitForCompletion();
            async.WaitForCompletion();
        }
 public void EmulteClickTest()
 {
     WPFMenuItem item = new WPFMenuItem(_ctrl._menuItem);
     item.EmulateClick();
     Assert.IsTrue((bool)_ctrl.menuItemClicked);
 }