Beispiel #1
0
        /// <summary>
        /// Shows the interface for a new Animation Sheet creation
        /// </summary>
        public void ShowCreateAnimationSheet()
        {
            var ed = new AnimationSheetView(this);

            if (ed.ShowDialog(_mainForm) == DialogResult.OK)
            {
                AddAnimationSheet(ed.GenerateAnimationSheet(), true);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Opens a view for the given animation (or brings a view already binded to this animation to the front)
        /// </summary>
        /// <param name="sheet">The Animation to open the AnimationView for</param>
        /// <returns>The created AnimationView</returns>
        public AnimationSheetView OpenViewForAnimationSheet(AnimationSheet sheet)
        {
            foreach (Form curView in MdiChildren)
            {
                var sheetView = curView as AnimationSheetView;
                if (sheetView != null && ReferenceEquals(sheetView.CurrentSheet, sheet))
                {
                    sheetView.BringToFront();
                    sheetView.Focus();
                    return(sheetView);
                }
            }

            AnimationSheetView view = new AnimationSheetView(Controller, sheet)
            {
                MdiParent = this
            };

            view.Show();
            view.BringToFront();

            return(view);
        }