public void SetMessage(string msg,TemplateFile file) { this.message = msg; this.template = file; this.scintilla1.Text = this.message; //this.scintilla1.IsReadOnly = true; this.scintilla1.ConfigurationManager.Language = LauguaageType.cs.ToString(); this.scintilla1.Indentation.SmartIndentType = SmartIndent.CPP; this.scintilla1.Margins.Margin0.Width = 35; }
public static TemplateFile GetInstance(string name) { if(root==null) { string path=AppSettingsHelper.GetString("codetemplate","codetemplate"); string filepath = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, path); DirectoryHelper.CreateDir(filepath); root = new TemplateFile(name, filepath, FileType.Directory); } return root; }