Ejemplo n.º 1
0
        private void PerformQuickDuplication()
        {
            int?iter1StartObserved = ParsingUtilities.ParseIntNullable(
                _gui.TextBoxQuickDuplication1stIterationStart.Text);
            int?iter2StartObserved = ParsingUtilities.ParseIntNullable(
                _gui.TextBoxQuickDuplication2ndIterationStart.Text);
            int?totalIters = ParsingUtilities.ParseIntNullable(
                _gui.TextBoxQuickDuplicationTotalIterations.Text);

            if (!iter1StartObserved.HasValue ||
                !iter2StartObserved.HasValue ||
                !totalIters.HasValue)
            {
                return;
            }

            int iter1Start   = iter1StartObserved.Value - 1;
            int iter2Start   = iter2StartObserved.Value - 1;
            int multiplicity = totalIters.Value - 1;
            int iter1End     = iter2Start - 1;

            M64CopiedData copiedData = M64CopiedData.CreateCopiedData(
                _gui.DataGridViewInputs, _m64File.CurrentFileName,
                iter1Start, iter1End, true /* useRow */);

            _m64File.Paste(copiedData, iter2Start, true /* insert */, multiplicity);
        }
Ejemplo n.º 2
0
        private void CopyData(bool useRow)
        {
            (int?startFrame, int?endFrame) = GetFrameBounds();
            string inputsString = _gui.TextBoxSelectionInputs.Text;

            if (!startFrame.HasValue || !endFrame.HasValue)
            {
                return;
            }
            M64CopiedData copiedData = M64CopiedData.CreateCopiedData(
                _gui.DataGridViewInputs, _m64File.CurrentFileName,
                startFrame.Value, endFrame.Value, useRow, inputsString);

            if (copiedData == null)
            {
                return;
            }
            _gui.ListBoxCopied.Items.Add(copiedData);
            _gui.ListBoxCopied.SelectedItem = copiedData;
        }