Beispiel #1
0
        private void CreateAnimation(object sender, RoutedEventArgs e)
        {
            //open a new animation window
            Window newAnimationWin = new AnimPropertiesWindow();

            newAnimationWin.Show();
        }
Beispiel #2
0
        private void EditAnimation(object sender, RoutedEventArgs e)
        {
            //Setup the edit window
            AnimPropertiesWindow editAnimationWin = new AnimPropertiesWindow(_AnimationDefinition);

            editAnimationWin.Owner = this;
            editAnimationWin.Title = "Edit Animation";
            //Open it and wait until its closed
            editAnimationWin.ShowDialog();

            //read data from edit dialog and store it in the animation definition
            foreach (KeyValuePair <string, string> kvp in editAnimationWin._AnimationDefinition)
            {
                //don't allow extra information to be added to the definition
                if (_AnimationDefinition.ContainsKey(kvp.Key))
                {
                    _AnimationDefinition[kvp.Key] = kvp.Value;
                }
            }

            //update the animatiion properties display
            AnimationInfo.ItemsSource = AnimationDefinition;
            CurrentFrame_TextChanged(CurrentFrame, new EventArgs());
        }