Beispiel #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 == "headersize")
     {
         type = "size";
         if (m_headerButton != null)
         {
             value = FCStr.convertSizeToStr(m_headerButton.Size);
         }
         else
         {
             value = "0,0";
         }
     }
     else if (name == "headervisible")
     {
         type  = "bool";
         value = FCStr.convertBoolToStr(HeaderVisible);
     }
     else if (name.IndexOf("header-") != -1)
     {
         if (m_headerButton != null)
         {
             m_headerButton.getProperty(name.Substring(7), ref value, ref type);
         }
     }
     else
     {
         base.getProperty(name, ref value, ref type);
     }
 }
Beispiel #2
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 == "candragsplitter")
     {
         type = "bool";
         if (m_splitter != null)
         {
             value = FCStr.convertBoolToStr(m_splitter.AllowDrag);
         }
         else
         {
             value = "False";
         }
     }
     else if (name == "splitmode")
     {
         type = "enum:FCSizeType";
         if (SplitMode == FCSizeType.AbsoluteSize)
         {
             value = "AbsoluteSize";
         }
         else
         {
             value = "PercentSize";
         }
     }
     else if (name.IndexOf("splitter-") != -1)
     {
         if (m_splitter != null)
         {
             m_splitter.getProperty(name.Substring(9), ref value, ref type);
         }
     }
     else if (name == "splitterposition")
     {
         type = "str";
         if (m_splitter != null)
         {
             if (m_layoutStyle == FCLayoutStyle.TopToBottom || m_layoutStyle == FCLayoutStyle.BottomToTop)
             {
                 value = FCStr.convertIntToStr(m_splitter.Top);
                 if (m_splitter.Height > 0)
                 {
                     value = value + "," + FCStr.convertIntToStr(m_splitter.Height);
                 }
             }
             else
             {
                 value = FCStr.convertIntToStr(m_splitter.Left);
                 if (m_splitter.Width > 0)
                 {
                     value = value + "," + FCStr.convertIntToStr(m_splitter.Width);
                 }
             }
         }
     }
     else if (name == "splittervisible")
     {
         type = "bool";
         if (m_splitter != null)
         {
             value = FCStr.convertBoolToStr(m_splitter.Visible);
         }
         else
         {
             value = "False";
         }
     }
     else
     {
         base.getProperty(name, ref value, ref type);
     }
 }