public int GetFontIDByID(int nID) { StringBuilder sb = new StringBuilder(128); FileFolderHelper.ReadIniFile(nID.ToString(), "FontID", "1", sb, 128, file); return(Int32.Parse(sb.ToString())); }
public string[] GetAllFontName() { ArrayList stringlist = new ArrayList(); for (int i = 0; ; i++) { StringBuilder sb = new StringBuilder(128); FileFolderHelper.ReadIniFile(i.ToString(), "Name", "", sb, 128, file); if (sb.ToString() != "") { sb.Append(string.Format("({0})", i)); stringlist.Add(sb.ToString()); } else { break; } } string[] ResultStrings = new string[stringlist.Count]; for (int i = 0; i < stringlist.Count; i++) { ResultStrings[i] = stringlist[i].ToString(); } return(ResultStrings); }
public string GetColorNameByID(int nID) { StringBuilder sbColorName = new StringBuilder(128); FileFolderHelper.ReadIniFile(nID.ToString(), "Color", "", sbColorName, 128, file); return(sbColorName.ToString()); }
public FontCollection GetFontCollectionByID(int nID) { StringBuilder sb = new StringBuilder(128); FileFolderHelper.ReadIniFile(nID.ToString(), "File", "1", sb, 128, file); PrivateFontCollection pfc = new PrivateFontCollection(); pfc.AddFontFile(m_Root.TrimEnd(new char[] { '\\' }) + sb.ToString()); return(pfc); }