Пример #1
0
        /// <summary>
        /// Clones this frame
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            MainChannelFrame frame = new MainChannelFrame();

            frame.Frame = this.Frame;
            frame.Name  = this.Name;

            foreach (Otter.UI.Actions.Action action in this.mActions)
            {
                frame.Actions.Add((Otter.UI.Actions.Action)action.Clone());
            }

            return(frame);
        }
Пример #2
0
        /// <summary>
        /// Clones this frame
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            MainChannelFrame frame = new MainChannelFrame();

            frame.Frame = this.Frame;
            frame.Name = this.Name;

            foreach(Otter.UI.Actions.Action action in this.mActions)
                frame.Actions.Add((Otter.UI.Actions.Action)action.Clone());

            return frame;
        }
Пример #3
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void mActionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (SelectedChannel != 0 || SelectedFrameStart < 0 || SelectedFrameEnd < 0)
                return;

            Otter.Forms.ActionsEditor actionsEditor = new Otter.Forms.ActionsEditor(this.View.Scene);
            MainChannelFrame mainChannelFrame = mAnimation.GetMainChannelFrame((uint)SelectedFrameStart);

            if (mainChannelFrame == null)
            {
                mainChannelFrame = new MainChannelFrame();
                mainChannelFrame.Frame = (uint)SelectedFrameStart;
                mAnimation.MainChannelFrames.Add(mainChannelFrame);
            }

            actionsEditor.Actions = mainChannelFrame.Actions;
            if (actionsEditor.ShowDialog() == DialogResult.OK)
            {
                if (actionsEditor.Actions.Count == 0)
                {
                    mAnimation.MainChannelFrames.Remove(mainChannelFrame);
                }
                else
                {
                    mainChannelFrame.Actions.Clear();
                    mainChannelFrame.Actions.AddRange(actionsEditor.Actions);
                }
            }

            this.Invalidate();
        }