예제 #1
0
        public Slider()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();


            /// <VariableInit>
            /// The Below are Initialization of Variables to its Default values.
            /// </VariableInit>
            ///

            #region Initialization of Variables to its Default Values

            if (null != strLeftImagePath)
            {
                imImageLeft = System.Drawing.Image.FromFile(strLeftImagePath);
            }
            if (null != strRightImagePath)
            {
                imImageRight = System.Drawing.Image.FromFile(strRightImagePath);
            }
            objNotifyClient = null;
            //strRangeString = "Range";
            //strDelimiter = ",";  // Because in Germany decimal point is represented as , i.e., "10.50 in US" is "10,50 in Germany"
            //strRange = "0,10,20,30,Good,50,60,70,Great,90,100";
            //strRange1 = "10";
            //strRange2 = "90";
            strLeftImagePath           = null;
            strRightImagePath          = null;
            fHeightOfThumb             = 20.0f;
            fWidthOfThumb              = 10.0f;
            this.BackColor             = System.Drawing.Color.LightBlue;
            clrInFocusBarColor         = System.Drawing.Color.Magenta;
            clrDisabledBarColor        = System.Drawing.Color.Gray;
            clrInFocusRangeLabelColor  = System.Drawing.Color.Green;
            clrDisabledRangeLabelColor = System.Drawing.Color.Gray;
            clrThumbColor              = System.Drawing.Color.Purple;
            fStringOutputFontSize      = 10.0f;
            clrStringOutputFontColor   = System.Drawing.Color.Black;
            fntStringOutputFontFamily  = System.Drawing.FontFamily.GenericSerif;
            fntRangeOutputStringFont   = new System.Drawing.Font(fntStringOutputFontFamily, fStringOutputFontSize, System.Drawing.FontStyle.Bold);

            unSizeOfMiddleBar    = 3;
            unGapFromLeftMargin  = 10;
            unGapFromRightMargin = 10;
            fntLabelFontFamily   = System.Drawing.FontFamily.GenericSansSerif;
            fLabelFontSize       = 8.25f;
            fntLabelFontStyle    = System.Drawing.FontStyle.Bold;
            fntLabelFont         = new System.Drawing.Font(fntLabelFontFamily, fLabelFontSize, fntLabelFontStyle);

            strSplitLabels = new string[1024];
            ptThumbPoints1 = new System.Drawing.PointF[3];
            ptThumbPoints2 = new System.Drawing.PointF[3];

            bMouseEventThumb1 = false;
            bMouseEventThumb2 = false;
            bAnimateTheSlider = false;
            #endregion

            /// <VariableInit>
            /// The Below are Initialization of Variables to its Default values.
            /// </VariableInit>
            ///
        }