Exemple #1
0
        public void LoadSyncDocument(string filePath)
        {
            this.ParentWindow.Dispatcher.Invoke(() =>
            {
                this.Document = DMDocument.Load(filePath);
                this.DocumentChangedAction(this.Document);

                using (CompositionContainer container = new CompositionContainer())
                {
                    var karaokeService = new KaraokeHighlightService();

                    container.ComposeParts(this.AudioPlayer, this.Document, karaokeService);
                }
            });
        }
Exemple #2
0
        private void CmdCreateDocumentModel_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            var episode = e.Parameter as XEpisode;

            if (episode == null)
            {
                MessageBox.Show("Error Episode is NULL!");
                return;
            }

            var wizardWindow = new RecognizeEpisodeWizardWindow(this.CurrentTarget, episode);

            var initUC                = new InitUserControl();
            var splitUC               = new SplitTranscriptUserControl();
            var dictationUC           = new DictationUserControl();
            var refSoundMarkupUC      = new ReferenceSoundMarkupUserControl();
            var setDocTimelineUC      = new SetDocumentTimelineUserControl();
            var pronunciationMarkupUC = new PronunciationMarkupUserControl();
            var syncEpisodeUC         = new SyncEpisodeUserControl();

            var karaokeService = new KaraokeHighlightService();


            if (this._container != null)
            {
                this._container.Dispose();
                this._container = null;
            }
            this._container = new CompositionContainer();

            this._container.ComposeParts(
                wizardWindow.ViewModel,

                //UserControl
                initUC.ViewModel,
                splitUC.ViewModel,
                dictationUC.ViewModel,
                setDocTimelineUC.ViewModel,
                refSoundMarkupUC.ViewModel,
                pronunciationMarkupUC.ViewModel,
                syncEpisodeUC.ViewModel
                //services
                //karaokeService
                );

            wizardWindow.Show();
        }
Exemple #3
0
 public DictationViewModel(UserControl uControl)
     : base(uControl)
 {
     this.HighlightService = new KaraokeHighlightService();
 }