public void Scan(string source) { var mainVM = StaticResolver.Resolve <MainViewModel>(); DispatchUtilities.Invoke(() => { mainVM.ScanFromAutoplay(source); }); }
public void Encode(string source, string destination, string preset, string picker) { var processingService = StaticResolver.Resolve <ProcessingService>(); DispatchUtilities.Invoke(() => { processingService.Process(source, destination, preset, picker); }); }
public void Scan(string source) { var mainVM = StaticResolver.Resolve <MainViewModel>(); DispatchUtilities.Invoke(() => { try { mainVM.ScanFromAutoplay(source); } catch (Exception exception) { throw new FaultException <AutomationError>(new AutomationError { Message = exception.Message }); } }); }
public void Encode(string source, string destination, string preset, string picker) { var processingService = StaticResolver.Resolve <ProcessingService>(); DispatchUtilities.Invoke(() => { try { processingService.Process(source, destination, preset, picker); } catch (Exception exception) { throw new FaultException <AutomationError>(new AutomationError { Message = exception.Message }); } }); }
public void ImportQueue(string filePath) { var queueImporter = StaticResolver.Resolve <IQueueImportExport>(); DispatchUtilities.Invoke(() => { try { queueImporter.Import(filePath); this.ShowMessage(MainRes.QueueImportSuccessMessage); } catch (Exception) { this.ShowMessage(MainRes.QueueImportErrorMessage); throw; } }); }
public void ImportPreset(string filePath) { var presetImporter = StaticResolver.Resolve <IPresetImportExport>(); DispatchUtilities.Invoke(() => { try { Preset preset = presetImporter.ImportPreset(filePath); this.ShowMessage(string.Format(MainRes.PresetImportSuccessMessage, preset.Name)); } catch (Exception) { this.ShowMessage(MainRes.PresetImportErrorMessage); throw; } }); }
public LogWindow() { this.InitializeComponent(); this.PopulateLogColorBrushMapping(); this.listColumn.Width = new GridLength(Config.LogListPaneWidth); this.Loaded += (sender, e) => { this.logTextBox.ScrollToEnd(); }; this.logCoordinator.Logs .Connect() .OnItemAdded(addedLogViewModel => { DispatchUtilities.Invoke(() => { this.logCoordinator.SelectedLog = addedLogViewModel; this.logsListBox.ScrollIntoView(addedLogViewModel); }); }) .Subscribe(); this.logCoordinator.WhenAnyValue(x => x.SelectedLog).Subscribe(selectedLog => { if (selectedLog != null) { this.DisconnectFromLogger(); this.ConnectToLogger(selectedLog.Logger); } }); this.appThemeService.AppThemeObservable.Skip(1).Subscribe(_ => { this.Dispatcher.BeginInvoke(new Action(() => { this.PopulateLogColorBrushMapping(); this.logParagraph.Inlines.Clear(); this.AddExistingLogEntries(); })); }); }
public void ImportQueue(string filePath) { var queueImporter = Ioc.Get <IQueueImportExport>(); DispatchUtilities.Invoke(() => { try { queueImporter.Import(filePath); this.ShowMessage(MainRes.QueueImportSuccessMessage); } catch (Exception exception) { this.ShowMessage(MainRes.QueueImportErrorMessage); throw new FaultException <AutomationError>(new AutomationError { Message = exception.Message }); } }); }
public void ImportPreset(string filePath) { var presetImporter = Ioc.Get <IPresetImportExport>(); DispatchUtilities.Invoke(() => { try { Preset preset = presetImporter.ImportPreset(filePath); this.ShowMessage(string.Format(MainRes.PresetImportSuccessMessage, preset.Name)); } catch (Exception exception) { this.ShowMessage(MainRes.PresetImportErrorMessage); throw new FaultException <AutomationError>(new AutomationError { Message = exception.Message }); } }); }
public void SetChosenTracks(List <int> chosenAudioTracks, SourceTitle selectedTitle) { DispatchUtilities.Invoke(() => { int previousIndex = this.TargetStreamIndex; this.targetStreams.Clear(); this.targetStreams.Add(new TargetStreamViewModel { Text = CommonRes.All }); int shownStreams = Math.Max(previousIndex, chosenAudioTracks.Count); for (int i = 0; i < shownStreams; i++) { string details = null; if (i < chosenAudioTracks.Count && selectedTitle != null) { details = selectedTitle.AudioList[chosenAudioTracks[i] - 1].Description; } this.targetStreams.Add( new TargetStreamViewModel { Text = string.Format(CommonRes.StreamChoice, (i + 1)), TrackDetails = details }); } // Set to -1, then back to real index in order to force a refresh on the ComboBox this.targetStreamIndex = -1; this.RaisePropertyChanged(nameof(this.TargetStreamIndex)); this.targetStreamIndex = previousIndex; this.RaisePropertyChanged(nameof(this.TargetStreamIndex)); }); }