コード例 #1
0
        protected override void Arrange()
        {
            DictionaryService = new Mock<IDictionaryService>();

            if (ShouldConstruct)
            {
                DictionaryViewModel = new DictionaryViewModel(DictionaryService.Object);
            }
        }
コード例 #2
0
        public ManagementViewModel(
            IAudioService audioService,
            IDictionaryService dictionaryService)
        {
            //Instantiate child VMs
            DictionaryViewModel = new DictionaryViewModel(dictionaryService);
            OtherViewModel = new OtherViewModel();
            PointingAndSelectingViewModel = new PointingAndSelectingViewModel();
            SoundsViewModel = new SoundsViewModel(audioService);
            VisualsViewModel = new VisualsViewModel();
            WordsViewModel = new WordsViewModel(dictionaryService);

            //Instantiate interaction requests and commands
            ConfirmationRequest = new InteractionRequest<Confirmation>();
            OkCommand = new DelegateCommand<Window>(Ok); //Can always click Ok
            CancelCommand = new DelegateCommand<Window>(Cancel); //Can always click Cancel
        }
コード例 #3
0
ファイル: WhenConstruct.cs プロジェクト: EddPorter/OptiKey
 protected override void Act()
 {
     DictionaryViewModel = new DictionaryViewModel(DictionaryService.Object);
 }