Exemplo n.º 1
0
        public void InsertNumFrames(int insertionFrame, int numberOfFrames)
        {
            if (insertionFrame < CurrentTasMovie.InputLogLength)
            {
                bool needsToRollback = TasView.FirstSelectedIndex < Emulator.Frame;

                CurrentTasMovie.InsertEmptyFrame(insertionFrame, numberOfFrames);

                if (needsToRollback)
                {
                    GoToLastEmulatedFrameIfNecessary(insertionFrame);
                    DoAutoRestore();
                }
                else
                {
                    RefreshDialog();
                }
            }
        }
Exemplo n.º 2
0
        private void InsertNumFramesMenuItem_Click(object sender, EventArgs e)
        {
            bool wasPaused       = Mainform.EmulatorPaused;
            int  insertionFrame  = TasView.AnyRowsSelected ? TasView.FirstSelectedIndex.Value : 0;
            bool needsToRollback = TasView.FirstSelectedIndex < Emulator.Frame;

            FramesPrompt framesPrompt = new FramesPrompt();
            DialogResult result       = framesPrompt.ShowDialog();

            if (result == DialogResult.OK)
            {
                CurrentTasMovie.InsertEmptyFrame(insertionFrame, framesPrompt.Frames);
            }

            if (needsToRollback)
            {
                GoToLastEmulatedFrameIfNecessary(insertionFrame);
                DoAutoRestore();
            }
            else
            {
                RefreshDialog();
            }
        }