Esempio n. 1
0
 public static string GetFontSizeNameBySize(float fontSize)
 {
     for (int i = 0; i < allFontSize.Length; i++)
     {
         if (allFontSize[i] == fontSize)
         {
             return(allFontSizeName[i]);
         }
     }
     return(ZYEditorControl.GetDefaultSettings(ZYTextConst.c_FontSize));
 }
Esempio n. 2
0
        }// End of function : isNeedSave

        /// <summary>
        /// 获得属性默认值
        /// </summary>
        /// <param name="strName">属性名</param>
        /// <returns>获得属性值</returns>
        public static object GetDefaultValue(string strName)
        {
            switch (strName)
            {
            case ZYTextConst.c_FontName:
                return(ZYEditorControl.GetDefaultSettings(ZYTextConst.c_FontName));

            case ZYTextConst.c_FontSize:
                return(FontCommon.GetFontSizeByName(ZYEditorControl.GetDefaultSettings(ZYTextConst.c_FontSize)));

            case ZYTextConst.c_FontBold:
                return(false);

            case ZYTextConst.c_FontItalic:
                return(false);

            case ZYTextConst.c_FontUnderLine:
                return(false);

            case ZYTextConst.c_ForeColor:
                return(System.Drawing.SystemColors.WindowText);

            case ZYTextConst.c_Sub:
                return(false);

            case ZYTextConst.c_Sup:
                return(false);

            //				case ZYTextConst.c_DeleteTime :
            //					return null;
            case ZYTextConst.c_Deleter:
                return((int)-1);

            case ZYTextConst.c_Creator:
                return((int)0);

            case ZYTextConst.c_SaveList:
                return(true);

            case ZYTextConst.c_Align:
                return(0);

            case ZYTextConst.c_Source:
                return("0000000000");

            case ZYTextConst.c_ListSource:
                return("0000000000");

            case ZYTextConst.c_SaveInFile:
                return(false);

            case ZYTextConst.c_Multiple:
                return(false);

            case ZYTextConst.c_HideTitle:
                return(false);

            case ZYTextConst.c_Height:
                return(1);

            case ZYTextConst.c_NoContent:
                return(false);

            case ZYTextConst.c_TitleLine:
                return(false);

            case ZYTextConst.c_TitleAlign:
                return("left");

            //				case ZYTextConst.c_UnitSource:
            //					return -1 ;
            case ZYTextConst.c_CircleFont:
                return(false);

            default:
                return(null);
            }
        }