当前位置: 首页>>代码示例>>C#>>正文


C# MainViewModel.SetWaitIndicator方法代码示例

本文整理汇总了C#中MainViewModel.SetWaitIndicator方法的典型用法代码示例。如果您正苦于以下问题:C# MainViewModel.SetWaitIndicator方法的具体用法?C# MainViewModel.SetWaitIndicator怎么用?C# MainViewModel.SetWaitIndicator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MainViewModel的用法示例。


在下文中一共展示了MainViewModel.SetWaitIndicator方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShowCommand_WillExecuteChangeTypeCommand_Always

        public void ShowCommand_WillExecuteChangeTypeCommand_Always()
        {
            bool calledChangeTypeCommand = false;
            var vm = new MainViewModel();
            vm.SetWaitIndicator(new Mock<WaitIndicator>().Object);
            vm.InitWithGuiTypes(new List<string>() { "A.a", "B.b", "C.c" });
            var spyCommand = new Mock<ICommand>();
            spyCommand.Setup(c => c.Execute("A.a")).Callback(() => calledChangeTypeCommand = true);
            vm.ChangeTypeCommand = spyCommand.Object;

            vm.ListOfSelectedAssemblyTypes[0].ShowCommand.Execute("A.a");

            Assert.IsTrue(calledChangeTypeCommand);
        }
开发者ID:kurattila,项目名称:Cider-x64,代码行数:14,代码来源:MainViewModel_Test.cs

示例2: ShowCommand_WillCloseWaitIndicator_AfterChangeTypeCommandFinished

        public void ShowCommand_WillCloseWaitIndicator_AfterChangeTypeCommandFinished()
        {
            bool calledWaitIndicatorEnd = false;
            var spyWaitIndicator = new Mock<WaitIndicator>();
            spyWaitIndicator.Setup(w => w.EndWaiting()).Callback(() => calledWaitIndicatorEnd = true);
            var vm = new MainViewModel();
            vm.SetWaitIndicator(spyWaitIndicator.Object);
            vm.InitWithGuiTypes(new List<string>() { "A.a", "B.b", "C.c" });
            var dummyCommand = new Mock<ICommand>();
            vm.ChangeTypeCommand = dummyCommand.Object;

            vm.ListOfSelectedAssemblyTypes[0].ShowCommand.Execute("A.a");

            Assert.IsTrue(calledWaitIndicatorEnd);
        }
开发者ID:kurattila,项目名称:Cider-x64,代码行数:15,代码来源:MainViewModel_Test.cs

示例3: ShowCommand_WillDisplayWaitIndicator_Always

        public void ShowCommand_WillDisplayWaitIndicator_Always()
        {
            bool calledWaitIndicatorBegin = false;
            var spyWaitIndicator = new Mock<WaitIndicator>();
            var dummyAppearance = new Mock<IWaitIndicatorAppearance>();
            spyWaitIndicator.Setup(w => w.BeginWaiting(dummyAppearance.Object, 0, 0, 0, 0)).Callback(() => calledWaitIndicatorBegin = true);
            var vm = new MainViewModel();
            vm.PlayButtonWaitIndicatorAppearance = dummyAppearance.Object;
            vm.SetWaitIndicator(spyWaitIndicator.Object);
            vm.InitWithGuiTypes(new List<string>() { "A.a", "B.b", "C.c" });
            var dummyCommand = new Mock<ICommand>();
            vm.ChangeTypeCommand = dummyCommand.Object;

            vm.ListOfSelectedAssemblyTypes[0].ShowCommand.Execute("A.a");

            Assert.IsTrue(calledWaitIndicatorBegin);
        }
开发者ID:kurattila,项目名称:Cider-x64,代码行数:17,代码来源:MainViewModel_Test.cs


注:本文中的MainViewModel.SetWaitIndicator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。