コード例 #1
0
 private void ApplyChanges()
 {
     OtherViewModel.ApplyChanges();
     PointingAndSelectingViewModel.ApplyChanges();
     SoundsViewModel.ApplyChanges();
     VisualsViewModel.ApplyChanges();
 }
コード例 #2
0
        private void btnFindMaryTts_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog
            {
                FileName = "marytts-server.bat",
                Filter   = "marytts-server|marytts-server.bat"
            };

            if (openFileDialog.ShowDialog() == true)
            {
                string fileLocation = null;

                if (openFileDialog.FileName.EndsWith(@"\bin\marytts-server.bat"))
                {
                    txtMaryTtsLocation.Text = openFileDialog.FileName;
                    fileLocation            = txtMaryTtsLocation.Text;
                }
                else
                {
                    txtMaryTtsLocation.Text = Properties.Resources.MARYTTS_LOCATION_ERROR_LABEL;
                }

                SoundsViewModel viewModel = this.DataContext as SoundsViewModel;
                if (viewModel != null && !string.IsNullOrWhiteSpace(fileLocation))
                {
                    viewModel.MaryTTSLocation = fileLocation;
                }
            }
        }
コード例 #3
0
 private void ApplyChanges()
 {
     DictionaryViewModel.ApplyChanges();
     OtherViewModel.ApplyChanges();
     PointingAndSelectingViewModel.ApplyChanges();
     SoundsViewModel.ApplyChanges();
     VisualsViewModel.ApplyChanges();
     WordsViewModel.ApplyChanges();
 }
コード例 #4
0
ファイル: AutomationModule.cs プロジェクト: xbadcode/Rubezh
		public override void CreateViewModels()
		{
			_soundsViewModel = new SoundsViewModel();
			_opcServersViewModel = new OPCServersViewModel();
			_proceduresViewModel = new ProceduresViewModel();
			_schedulesViewModel = new SchedulesViewModel();
			_globalVariablesViewModel = new GlobalVariablesViewModel();
			_planExtension = new AutomationPlanExtension(_proceduresViewModel);
			_opcTechnosoftwareViewModel = new OpcTechnosoftwareViewModel();
			_opcDaClientViewModel = new OpcDaClientViewModel();
			_opcDaTagFiltersViewModel = new OpcDaTagFiltersViewModel();
		}
コード例 #5
0
        public ManagementViewModel(IAudioService audioService)
        {
            //Instantiate child VMs
            OtherViewModel = new OtherViewModel();
            PointingAndSelectingViewModel = new PointingAndSelectingViewModel();
            SoundsViewModel  = new SoundsViewModel(audioService);
            VisualsViewModel = new VisualsViewModel();

            //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
        }
コード例 #6
0
        public ManagementViewModel(
            IAudioService audioService,
            IDictionaryService dictionaryService,
            IWindowManipulationService windowManipulationService)
        {
            //Instantiate child VMs
            DictionaryViewModel           = new DictionaryViewModel(dictionaryService);
            GesturesViewModel             = new GesturesViewModel();
            PointingAndSelectingViewModel = new PointingAndSelectingViewModel();
            SoundsViewModel   = new SoundsViewModel(audioService);
            VisualsViewModel  = new VisualsViewModel(windowManipulationService);
            FeaturesViewModel = new FeaturesViewModel();
            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
        }
コード例 #7
0
		public SoundsMenuViewModel(SoundsViewModel context)
		{
			Context = context;
		}