public void PlayRecord(SimpleLoLRecord slr) { if (!Dispatcher.CheckAccess()) { RecordDelegate prd = new RecordDelegate(PlayRecord); Dispatcher.Invoke(prd, slr); return; } Logger.Instance.WriteLog(String.Format("Play record: {0}", slr.FileName)); if (_launcher == null) { if (slr.RecoringRecorder != null) { StartLoLLauncher(new LoLLauncher(slr.RecoringRecorder)); } else { StartLoLLauncher(new LoLLauncher(slr)); } } else { PopupWindow.ShowMessage(this, Utilities.GetString("AlreadyPlaying") as string); } }
public void Record(DisplayProvider displayProvider, SoundProvider soundProvider) { if (this.fileName == null) { throw new InvalidOperationException("FileName is not specified"); } // Check state lock (syncRoot) { if (state != RecordingState.Idle) { throw new InvalidOperationException("Invalid state."); } state = RecordingState.Preparing; } record = new RecordDelegate(this.RecordPrivate); AsyncCallback callback = new AsyncCallback(this.RecordCallBack); record.BeginInvoke(displayProvider, soundProvider, callback, null); // Start a new thread for recording }
public void ExportRecord(SimpleLoLRecord slr) { if (!Dispatcher.CheckAccess()) { RecordDelegate prd = new RecordDelegate(ExportRecord); Dispatcher.Invoke(prd, slr); return; } if (videoRecordingController != null) { if (videoRecordingController.LoLStarted) { bool?answer = YesNoPopupWindow.AskQuestion(this, Utilities.GetString("VideoRecordingExitCheck")); if (answer.HasValue) { if (answer.Value) { EndVideoRecordingMode(); } } } else { EndVideoRecordingMode(); } return; } toExport = slr; MovieConfiguration configurater = new MovieConfiguration(); if (toExport != null) { configurater.FileNameBox.Text = slr.FileNameShort.Remove(slr.FileNameShort.Length - 4); } configurater.Done += MovieConfigurationDone; SwitchMainContent(configurater); }