예제 #1
0
 /// <summary>
 /// 获取属性值
 /// </summary>
 /// <param name="name">属性名称</param>
 /// <param name="value">返回属性值</param>
 /// <param name="type">返回属性类型</param>
 public override void getProperty(String name, ref String value, ref String type)
 {
     if (name == "autoformat")
     {
         type  = "int";
         value = FCStr.convertBoolToStr(AutoFormat);
     }
     else if (name == "digit")
     {
         type  = "int";
         value = FCStr.convertDoubleToStr(Digit);
     }
     else if (name == "maximum")
     {
         type  = "double";
         value = FCStr.convertDoubleToStr(Maximum);
     }
     else if (name == "minimum")
     {
         type  = "double";
         value = FCStr.convertDoubleToStr(Minimum);
     }
     else if (name == "showthousands")
     {
         type  = "bool";
         value = FCStr.convertBoolToStr(ShowThousands);
     }
     else if (name == "step")
     {
         type  = "double";
         value = FCStr.convertDoubleToStr(Step);
     }
     else if (name == "value")
     {
         type  = "double";
         value = FCStr.convertDoubleToStr(Value);
     }
     else
     {
         base.getProperty(name, ref value, ref type);
     }
 }
예제 #2
0
 /// <summary>
 /// 获取属性值
 /// </summary>
 /// <param name="name">属性名称</param>
 /// <param name="value">返回属性值</param>
 /// <param name="type">返回属性类型</param>
 public virtual void getProperty(String name, ref String value, ref String type)
 {
     if (name == "allowuserpaint")
     {
         type  = "bool";
         value = FCStr.convertBoolToStr(AllowUserPaint);
     }
     else if (name == "automaxmin")
     {
         type  = "bool";
         value = FCStr.convertBoolToStr(AutoMaxMin);
     }
     else if (name == "basefield")
     {
         type  = "int";
         value = FCStr.convertIntToStr(BaseField);
     }
     else if (name == "digit")
     {
         type  = "int";
         value = FCStr.convertIntToStr(Digit);
     }
     else if (name == "font")
     {
         type  = "font";
         value = FCStr.convertFontToStr(Font);
     }
     else if (name == "textcolor")
     {
         type  = "color";
         value = FCStr.convertColorToStr(TextColor);
     }
     else if (name == "textcolor2")
     {
         type  = "color";
         value = FCStr.convertColorToStr(TextColor2);
     }
     else if (name == "magnitude")
     {
         type  = "int";
         value = FCStr.convertIntToStr(Magnitude);
     }
     else if (name == "midvalue")
     {
         type  = "double";
         value = FCStr.convertDoubleToStr(MidValue);
     }
     else if (name == "numberstyle")
     {
         type = "enum:NumberStyle";
         NumberStyle style = NumberStyle;
         if (style == NumberStyle.Standard)
         {
             value = "Standard";
         }
         else
         {
             value = "UnderLine";
         }
     }
     else if (name == "paddingbottom")
     {
         type  = "int";
         value = FCStr.convertIntToStr(PaddingBottom);
     }
     else if (name == "paddingtop")
     {
         type  = "int";
         value = FCStr.convertIntToStr(PaddingTop);
     }
     else if (name == "reverse")
     {
         type  = "bool";
         value = FCStr.convertBoolToStr(Reverse);
     }
     else if (name == "scalecolor")
     {
         type  = "color";
         value = FCStr.convertColorToStr(ScaleColor);
     }
     else if (name == "system")
     {
         type = "enum:VScaleSystem";
         VScaleSystem system = System;
         if (system == VScaleSystem.Logarithmic)
         {
             value = "Log";
         }
         else
         {
             value = "Standard";
         }
     }
     else if (name == "type")
     {
         type = "enum:VScaleType";
         VScaleType vScaleType = Type;
         if (vScaleType == VScaleType.Divide)
         {
             value = "Divide";
         }
         else if (vScaleType == VScaleType.EqualDiff)
         {
             value = "EqualDiff";
         }
         else if (vScaleType == VScaleType.EqualRatio)
         {
             value = "EqualRatio";
         }
         else if (vScaleType == VScaleType.GoldenRatio)
         {
             value = "GoldenRatio";
         }
         else
         {
             value = "Percent";
         }
     }
     else if (name == "visiblemax")
     {
         type  = "double";
         value = FCStr.convertDoubleToStr(VisibleMax);
     }
     else if (name == "visiblemin")
     {
         type  = "double";
         value = FCStr.convertDoubleToStr(VisibleMin);
     }
 }
예제 #3
0
 /// <summary>
 /// 获取属性值
 /// </summary>
 /// <param name="name">属性名称</param>
 /// <param name="value">返回属性值</param>
 /// <param name="type">返回属性类型</param>
 public override void getProperty(String name, ref String value, ref String type)
 {
     if (name == "closefield")
     {
         type  = "int";
         value = FCStr.convertIntToStr(CloseField);
     }
     else if (name == "colorfield")
     {
         type  = "int";
         value = FCStr.convertIntToStr(ColorField);
     }
     else if (name == "closefieldtext")
     {
         type  = "String";
         value = CloseFieldText;
     }
     else if (name == "downcolor")
     {
         type  = "color";
         value = FCStr.convertColorToStr(DownColor);
     }
     else if (name == "highfield")
     {
         type  = "int";
         value = FCStr.convertIntToStr(HighField);
     }
     else if (name == "highfieldtext")
     {
         type  = "String";
         value = HighFieldText;
     }
     else if (name == "lowfield")
     {
         type  = "int";
         value = FCStr.convertIntToStr(LowField);
     }
     else if (name == "lowfieldtext")
     {
         type  = "String";
         value = LowFieldText;
     }
     else if (name == "openfield")
     {
         type  = "int";
         value = FCStr.convertIntToStr(OpenField);
     }
     else if (name == "openfieldtext")
     {
         type  = "String";
         value = OpenFieldText;
     }
     else if (name == "showmaxmin")
     {
         type  = "bool";
         value = FCStr.convertBoolToStr(ShowMaxMin);
     }
     else if (name == "style")
     {
         type = "enum:CandleStyle";
         CandleStyle style = Style;
         if (style == CandleStyle.American)
         {
             value = "American";
         }
         else if (style == CandleStyle.CloseLine)
         {
             value = "CloseLine";
         }
         else if (style == CandleStyle.Tower)
         {
             value = "Tower";
         }
         else
         {
             value = "Rect";
         }
     }
     else if (name == "stylefield")
     {
         type  = "int";
         value = FCStr.convertIntToStr(StyleField);
     }
     else if (name == "tagcolor")
     {
         type  = "double";
         value = FCStr.convertDoubleToStr(TagColor);
     }
     else if (name == "upcolor")
     {
         type  = "color";
         value = FCStr.convertDoubleToStr(UpColor);
     }
     else
     {
         base.getProperty(name, ref value, ref type);
     }
 }