public Vector3SliderComponent(Point aLocation, Size aSize, IO.ComponentIO aIO, string aPanelName,
                               float aMinValue, float aMaxValue, float aStartValue, bool aOneToOneScaleFlag = false,
                               string aXText            = "X: ", string aYText = "Y: ", string aZText = "Z: ",
                               float aDownScaleMinValue = -1.0f, float aDownScaleMaxValue = 1.0f)
     : base(aLocation, aSize, aIO, aPanelName)
 {
     InitializeComponents(aIO.myIOElementName, aMinValue, aMaxValue, aStartValue, aOneToOneScaleFlag,
                          aXText, aYText, aZText, aDownScaleMinValue, aDownScaleMaxValue);
 }
        public SliderComponent(Point aLocation, Size aSize, IO.ComponentIO aIO, string aPanelName,
                               float aMinValue, float aMaxValue, float aStartValue, bool aOneToOneFlag = false,
                               float aDownScaleMinValue = -1.0f, float aDownScaleMaxValue = 1.0f)
            : base(aLocation, aSize, aIO, aPanelName)
        {
            myOneToOneScaleFlag = aOneToOneFlag;

            myDownScaleValue.myX = aDownScaleMinValue;
            myDownScaleValue.myY = aDownScaleMaxValue;

            myMaxValue   = (int)aMaxValue;
            myMinValue   = (int)aMinValue;
            myStartValue = (int)aStartValue;

            if (myMaxValue < myMinValue)
            {
                myMaxValue = myMinValue;
            }
            if (myMinValue > myMaxValue)
            {
                myMinValue = myMaxValue;
            }
            if (myStartValue < myMinValue)
            {
                myStartValue = myMinValue;
            }
            if (myStartValue > myMaxValue)
            {
                myStartValue = myMaxValue;
            }

            myScrollBar.Maximum     = myMaxValue;
            myScrollBar.Minimum     = myMinValue;
            myScrollBar.Value       = myStartValue;
            myScrollBar.LargeChange = 1;
            myScrollBar.TabIndex    = 1;

            myCurrentFloatValue = CSharpUtilities.MathUtilities.Remap(myCurrentValue, myMinValue, myMaxValue,
                                                                      myDownScaleValue.myX, myDownScaleValue.myY);
            float truncatedValue = (float)(Math.Truncate((double)myCurrentFloatValue * 100.0) / 100.0);

            myCurrentFloatValue = truncatedValue;

            if (aOneToOneFlag == false)
            {
                myFormatedText = myText + myCurrentValue.ToString();
                myLabel.Text   = myFormatedText;
            }
            else
            {
                myFormatedText = myText + myCurrentFloatValue.ToString();
                myLabel.Text   = myFormatedText;
            }
        }
 public MinMaxComponent(Point aLocation, Size aSize, IO.ComponentIO aIO, string aPanelName)
     : base(aLocation, aSize, aIO, aPanelName)
 {
 }
 public PathBrowseComponent(Point aLocation, Size aSize, IO.ComponentIO aIO, string aPanelName)
     : base(aLocation, aSize, aIO, aPanelName)
 {
 }
 public NumericTextComponent(Point aLocation, Size aSize, IO.ComponentIO aIO, string aPanelName, bool aDigitOnlyFlag = true)
     : base(aLocation, aSize, aIO, aPanelName)
 {
     myDigitOnlyFlag = aDigitOnlyFlag;
 }
示例#6
0
 public DLLPreviewComponent(Point aLocation, Size aSize, IO.ComponentIO aIO, string aPanelName, bool aUseText = false)
     : base(aLocation, aSize, aIO, aPanelName)
 {
     myUseText = aUseText;
 }