private readonly VoiceToText _voiceToText; //Speech recognition from cognative services public MainWindow() { UiLog.Info("bio info UI started"); InitializeComponent(); _messageSide = MessageSide.BioInfoSide; Messages = new MessageCollection { new Message { Side = MessageSide.BioInfoSide, Text = "Welcome to the B,M,S, Bio Info A,I Terminal. How may I help you today?" } }; _updater = new BioInfoUpdater(); // version checks & updates _dialogHandler = new DialogHandler(this); // DialogHandler _bioInfoVoice = new SpeechSynthesizer(); _voiceToText = new VoiceToText(); DataContext = Messages; _scrollViewerScrollToEndAnim = new DoubleAnimation { Duration = TimeSpan.FromSeconds(1), EasingFunction = new SineEase() }; Storyboard.SetTarget(_scrollViewerScrollToEndAnim, this); Storyboard.SetTargetProperty(_scrollViewerScrollToEndAnim, new PropertyPath(_verticalOffsetProperty)); _scrollViewerStoryboard = new Storyboard(); _scrollViewerStoryboard.Children.Add(_scrollViewerScrollToEndAnim); Resources.Add("foo", _scrollViewerStoryboard); tbTextInput.Focus(); }
private readonly BioInfoUpdater _updater; // check for program updates public Update(BioInfoUpdater bioInfoUpdater) { InitializeComponent(); _updater = bioInfoUpdater; }