public static CodeFormatterFactory GetInstance() { if (null == m_instance) return (m_instance = new CodeFormatterFactory()); else return m_instance; }
public static CodeFormatterFactory GetInstance() { if (null == m_instance) { return(m_instance = new CodeFormatterFactory()); } else { return(m_instance); } }
public void LoadFile(CFile file) { try { m_formatter = CodeFormatterFactory.GetInstance().CreateCodeFormatter(Path.GetExtension(file.Name)); } catch (Exception) { m_formatter = new JavaCodeFormatter(); } CodeFormatterInit finit = new CodeFormatterInit(); finit.KeywordColor = "#000088"; finit.CommentColor = "#008800"; new FileSystem(Globals.CurrentIdentity).LoadFileData(file); m_formatter.Init(finit); m_formatter.InitLineFormat(new String(file.Data)); txtData.Text = new String(file.Data); LoadComments(file); ViewState["fileid"] = file.ID; BindData(); }