private void Time_Validating(object sender, CancelEventArgs e) { if (initializing || Time.Text == Language.GetLocalizedText(1351, "Multiple") || dirtyEdit == false) { return; } double newValue = ParseTime(Time.Text); if (newValue == -1) { Time.BackColor = Color.Red; } else { Time.BackColor = UiTools.TextBackground; } if (newValue != propTime) { if (keys != null) { Undo.Push(new UndoTourStopChange(Language.GetLocalizedText(1352, "Key Properties Edit"), Earth3d.MainWindow.TourEdit.Tour)); foreach (VisibleKey vk in keys.Values) { Key key = vk.Target.GetKey(vk.ParameterIndex, vk.Time); if (key != null) { vk.Target.MoveKey(vk.ParameterIndex, vk.Time, newValue); } } } TimeLine.RefreshUi(false); RefreshTween(); } }
public static void RemoveInstance(TimeLine timeline) { if (instances.Contains(timeline)) { instances.Remove(timeline); } }
private void KeyFramer_FormClosing(object sender, FormClosingEventArgs e) { TimeLine.RemoveInstance(this.TimeLine); singleton = null; }