/// <summary> /// A helper function that pastes a number of keyframes to the first visible curve. /// This is currently used by get KeyFramesFromLogfile but might also be a first stup of copy/pasting keyframes. /// </summary> /// <param name="valuesOverTime"></param> public void AddKeyframesToFirstCurve(List <KeyValuePair <double, float> > valuesOverTime) { if (_curvesWithPointControls.Keys.Count == 0) { UIHelper.ShowErrorMessageBox("To add keyframes to a curve, you have to selected an animated operator.", "Cannot paste keyframes."); return; } _updatingCurveEnabled = false; var curve = _curvesWithPointControls.Keys[0]; foreach (var valueAndTime in valuesOverTime) { double time = valueAndTime.Key; float value = valueAndTime.Value; curve.AddOrUpdateV(time, new VDefinition() { Value = value }); } _updatingCurveEnabled = true; RebuildCurrentCurves(); }
public new int Run() { try { LibPathManager.SetDllSearchPath(); AppDomain.CurrentDomain.AssemblyResolve += LibPathManager.CustomResolve; return(base.Run()); } catch (ShutDownSilentException) { // do nothing, simply exit without any dialog } catch (ShutDownException shutdownException) { UIHelper.ShowErrorMessageBox(shutdownException.Message, shutdownException.Title); } #if !DEBUG catch (Exception ex) { Components.CrashReportWindow.ShowCrashReportForException(ex); } #endif return(0); }