Ejemplo n.º 1
0
        /// <summary>Consrturctor</summary>
        /// <param name="param">Parameter set</param>
        /// <param name="datamapPosition">Position of datamap</param>
        /// <param name="SelectedRow">Selected row number</param>
        public EditDatamapContentForm(HJS.ECU.Parameter.ParameterSet param, int datamapPosition, int SelectedRow)
        {
            InitializeComponent();

            mParam           = param;
            mDatamapPosition = datamapPosition;

            labelDatamapName.Text = String.Format("Kf ID={0} ({1})",
                                                  mParam.GetDatamapIdentifier(datamapPosition),
                                                  mParam.GetDatamapType(datamapPosition));

            mParam.GetDatamapAxis(datamapPosition,
                                  out XStart, out XSize, out XSteps,
                                  out YStart, out YSize, out YSteps,
                                  out ZStart, out ZSize, out ZSteps);
            numericUpDownX.Minimum   = XStart;
            numericUpDownX.Increment = XSize;
            numericUpDownX.Maximum   = XStart + XSteps * XSize;
            if (mParam.GetDatamapDimension(datamapPosition) > 0)
            {
                numericUpDownY.Minimum   = YStart;
                numericUpDownY.Increment = YSize;
                numericUpDownY.Maximum   = YStart + YSteps * YSize;
            }
            else
            {
                numericUpDownY.Enabled = false;
            }

            if (SelectedRow > 0)
            {
                numericUpDownY.Value = YStart + SelectedRow * YSize;
            }
            else
            {
                displayValue(0, 0);
            }
        }