Exemple #1
0
        /// <summary>创建TaskPane</summary>
        private void CreateWPFTaskPane()
        {
            if (_taskPane == null)
            {
                _taskPane = base.Application.Sw.CreateTaskpaneView2($@"{AssemblyPath}\TestRunner32.png", "TestRunner");
            }

            if (RunnerView == null)
            {
                RunnerView = new NUnitRunnerView()
                {
                    DataContext = (RunnerViewModel = new NUnitRunnerViewModel <ISldWorks>(base.Application.Sw))
                };
            }

            if (_host == null)
            {
                _host = new ElementHost()
                {
                    Child = RunnerView
                };
            }

            _taskPane.DisplayWindowFromHandlex64(_host.Handle.ToInt64());
        }
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            NUnitRunnerViewModel viewModel = new NUnitRunnerViewModel(commandData.Application);

            DialogWindow.Show <NUnitRunnerView>(viewModel);

            return(Result.Succeeded);
        }
Exemple #3
0
 public TestRuunerHub(NUnitRunnerViewModel <ISldWorks> runner)
 {
     this._runner = runner;
 }