Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
 public static void RemoveInstance(TimeLine timeline)
 {
     if (instances.Contains(timeline))
     {
         instances.Remove(timeline);
     }
 }
Esempio n. 3
0
 private void KeyFramer_FormClosing(object sender, FormClosingEventArgs e)
 {
     TimeLine.RemoveInstance(this.TimeLine);
     singleton = null;
 }