Example #1
0
 public void Goto(int?gotoValueNullable = null)
 {
     gotoValueNullable = gotoValueNullable ?? ParsingUtilities.ParseIntNullable(_gui.TextBoxGoto.Text);
     if (gotoValueNullable.HasValue)
     {
         int gotoValue = M64Utilities.ConvertDisplayedValueToFrame(gotoValueNullable.Value);
         ControlUtilities.TableGoTo(_gui.DataGridViewInputs, gotoValue);
     }
 }
Example #2
0
        private void SetValuesOfSelection(CellSelectionType cellSelectionType, bool value)
        {
            (int?startFrame, int?endFrame) = GetFrameBounds();
            List <M64InputCell> cells = M64Utilities.GetSelectedInputCells(
                _gui.DataGridViewInputs,
                cellSelectionType,
                startFrame,
                endFrame,
                _gui.TextBoxSelectionInputs.Text);
            int?intOnValue = ParsingUtilities.ParseIntNullable(_gui.TextBoxOnValue.Text);

            cells.ForEach(cell => cell.SetValue(value, intOnValue));
            _gui.DataGridViewInputs.Refresh();
        }
Example #3
0
        private (int?startFrame, int?endFrame) GetFrameBounds()
        {
            int?startFrame = ParsingUtilities.ParseIntNullable(_gui.TextBoxSelectionStartFrame.Text);
            int?endFrame   = ParsingUtilities.ParseIntNullable(_gui.TextBoxSelectionEndFrame.Text);

            if (startFrame.HasValue)
            {
                startFrame = M64Utilities.ConvertDisplayedValueToFrame(startFrame.Value);
            }
            if (endFrame.HasValue)
            {
                endFrame = M64Utilities.ConvertDisplayedValueToFrame(endFrame.Value);
            }
            return(startFrame, endFrame);
        }
Example #4
0
        public void UpdateSelectionTextboxes()
        {
            List <M64InputCell> cells = M64Utilities.GetSelectedInputCells(
                _gui.DataGridViewInputs, CellSelectionType.Cells);

            (int?minFrame, int?maxFrame, string inputsString) = M64Utilities.GetCellStats(cells, true);
            if (minFrame.HasValue)
            {
                _gui.TextBoxSelectionStartFrame.Text = minFrame.Value.ToString();
            }
            if (maxFrame.HasValue)
            {
                _gui.TextBoxSelectionEndFrame.Text = maxFrame.Value.ToString();
            }
            _gui.TextBoxSelectionInputs.Text = inputsString;
        }