Ejemplo n.º 1
0
        public SubtitleSearchWindow(SubtitleSearchViewModel viewModel)
        {
            InitializeComponent();

            _viewModel  = viewModel;
            DataContext = viewModel;
            SearchTextBox.Focus();
        }
Ejemplo n.º 2
0
        private static Task ManualSubtitleDownload(INovaromaEngine engine, IExceptionHandler exceptionHandler, IDialogService dialogService, FileInfo fileInfo, IDownloadable downloadable)
        {
            var searchQuery = downloadable != null?downloadable.GetSearchQuery() : fileInfo.NameWithoutExtension();

            var viewModel = new SubtitleSearchViewModel(engine, exceptionHandler, dialogService, downloadable, fileInfo);
            var window    = new SubtitleSearchWindow(viewModel);

            var t = viewModel.InitSearch(searchQuery);

            window.ForceShow();
            return(t);
        }