public void ComboBoxTeam_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ComboBoxTeam.SelectedIndex == -1)
            {
                return;
            }

            ProgramIsChangingStuff = true;

            NumericStartX.Value          = (decimal)StartPositions[ComboBoxTeam.SelectedIndex].PositionX;
            NumericStartY.Value          = (decimal)StartPositions[ComboBoxTeam.SelectedIndex].PositionY;
            NumericStartZ.Value          = (decimal)StartPositions[ComboBoxTeam.SelectedIndex].PositionZ;
            NumericStartRot.Value        = (decimal)ReadWriteCommon.BAMStoDegrees(StartPositions[ComboBoxTeam.SelectedIndex].Pitch);
            ComboStartMode.SelectedIndex = (int)StartPositions[ComboBoxTeam.SelectedIndex].Mode;
            NumericStartHold.Value       = StartPositions[ComboBoxTeam.SelectedIndex].HoldTime;

            NumericEndX.Value   = (decimal)EndPositions[ComboBoxTeam.SelectedIndex].PositionX;
            NumericEndY.Value   = (decimal)EndPositions[ComboBoxTeam.SelectedIndex].PositionY;
            NumericEndZ.Value   = (decimal)EndPositions[ComboBoxTeam.SelectedIndex].PositionZ;
            NumericEndRot.Value = (decimal)ReadWriteCommon.BAMStoDegrees(EndPositions[ComboBoxTeam.SelectedIndex].Pitch);

            NumericBragX.Value   = (decimal)BragPositions[ComboBoxTeam.SelectedIndex].PositionX;
            NumericBragY.Value   = (decimal)BragPositions[ComboBoxTeam.SelectedIndex].PositionY;
            NumericBragZ.Value   = (decimal)BragPositions[ComboBoxTeam.SelectedIndex].PositionZ;
            NumericBragRot.Value = (decimal)ReadWriteCommon.BAMStoDegrees(BragPositions[ComboBoxTeam.SelectedIndex].Pitch);

            ProgramIsChangingStuff = false;
        }
Example #2
0
        private void ComboBoxTeam_SelectedIndexChanged(object sender, EventArgs e)
        {
            ProgramIsChangingStuff = true;

            groupBoxEnd.Enabled = true;
            if (CurrentLevelConfig.Mode == ModeType.SinglePlayer)
            {
                groupBoxStart.Enabled = true;
                groupBoxBrag.Enabled  = false;

                NumericStartX.Value          = (decimal)StartPositions[ComboBoxTeam.SelectedIndex].PositionX;
                NumericStartY.Value          = (decimal)StartPositions[ComboBoxTeam.SelectedIndex].PositionY;
                NumericStartZ.Value          = (decimal)StartPositions[ComboBoxTeam.SelectedIndex].PositionZ;
                NumericStartRot.Value        = (decimal)ReadWriteCommon.BAMStoDegrees(StartPositions[ComboBoxTeam.SelectedIndex].Pitch);
                ComboStartMode.SelectedIndex = (int)StartPositions[ComboBoxTeam.SelectedIndex].Mode;
                NumericStartHold.Value       = StartPositions[ComboBoxTeam.SelectedIndex].HoldTime;

                NumericEndX.Value   = (decimal)EndPositions[ComboBoxTeam.SelectedIndex].PositionX;
                NumericEndY.Value   = (decimal)EndPositions[ComboBoxTeam.SelectedIndex].PositionY;
                NumericEndZ.Value   = (decimal)EndPositions[ComboBoxTeam.SelectedIndex].PositionZ;
                NumericEndRot.Value = (decimal)ReadWriteCommon.BAMStoDegrees(EndPositions[ComboBoxTeam.SelectedIndex].Pitch);
            }
            else if (CurrentLevelConfig.Mode == ModeType.MultiPlayer)
            {
                if (ComboBoxTeam.SelectedIndex <= 1)
                {
                    groupBoxStart.Enabled        = true;
                    NumericStartX.Value          = (decimal)StartPositions[ComboBoxTeam.SelectedIndex].PositionX;
                    NumericStartY.Value          = (decimal)StartPositions[ComboBoxTeam.SelectedIndex].PositionY;
                    NumericStartZ.Value          = (decimal)StartPositions[ComboBoxTeam.SelectedIndex].PositionZ;
                    NumericStartRot.Value        = (decimal)ReadWriteCommon.BAMStoDegrees(StartPositions[ComboBoxTeam.SelectedIndex].Pitch);
                    ComboStartMode.SelectedIndex = (int)StartPositions[ComboBoxTeam.SelectedIndex].Mode;
                    NumericStartHold.Value       = StartPositions[ComboBoxTeam.SelectedIndex].HoldTime;
                }
                else
                {
                    groupBoxStart.Enabled = false;
                }

                NumericEndX.Value   = (decimal)EndPositions[ComboBoxTeam.SelectedIndex].PositionX;
                NumericEndY.Value   = (decimal)EndPositions[ComboBoxTeam.SelectedIndex].PositionY;
                NumericEndZ.Value   = (decimal)EndPositions[ComboBoxTeam.SelectedIndex].PositionZ;
                NumericEndRot.Value = (decimal)ReadWriteCommon.BAMStoDegrees(EndPositions[ComboBoxTeam.SelectedIndex].Pitch);

                groupBoxBrag.Enabled = true;
                NumericBragX.Value   = (decimal)BragPositions[ComboBoxTeam.SelectedIndex].PositionX;
                NumericBragY.Value   = (decimal)BragPositions[ComboBoxTeam.SelectedIndex].PositionY;
                NumericBragZ.Value   = (decimal)BragPositions[ComboBoxTeam.SelectedIndex].PositionZ;
                NumericBragRot.Value = (decimal)ReadWriteCommon.BAMStoDegrees(BragPositions[ComboBoxTeam.SelectedIndex].Pitch);
            }
            ProgramIsChangingStuff = false;
        }
Example #3
0
        private void listBoxPoints_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (listBoxPoints.SelectedIndex == -1)
            {
                groupBoxPitchRoll.Enabled = false;
            }
            else
            {
                groupBoxPitchRoll.Enabled = true;
                ProgramIsChangingStuff    = true;

                numericUpDownPitch.Value = (decimal)ReadWriteCommon.BAMStoDegrees(splineEditorFunctions.GetSelected().Points[listBoxPoints.SelectedIndex].Pitch);
                numericUpDownRoll.Value  = (decimal)ReadWriteCommon.BAMStoDegrees(splineEditorFunctions.GetSelected().Points[listBoxPoints.SelectedIndex].Roll);

                ProgramIsChangingStuff = false;
            }
        }