private void InitScriptData() { //weblink string filename = definitions.path.DataWeblink; System.IO.StreamWriter sw = new StreamWriter(this.PathData + filename); script.pBase b = new pBase(); b.mName = filename; string s = b.ObtainTemplateScript(); sw.Write(s); sw.Close(); //shortcuts filename = definitions.path.DataShortcuts; b.mName = filename; s = b.ObtainTemplateScript(); sw = new StreamWriter(this.PathData + filename); sw.Write(s); sw.Close(); //clipboard filename = definitions.nameconst.DataClipboard; sw = new StreamWriter(this.PathData + filename); sw.Close(); LoadData(); UpdateScriptShortcut(); UpdateScriptWeblink(); UpdateScriptClipboard(); }
private void ExportFileFromTemplate(string filename) { script.pBase b = new pBase(); b.mName = filename; b.mPathData = this.PathData + filename; b.mPathKey = this.PathKey + filename; string buf = b.ObtainTemplateData(); b.ExportDataFile(buf); buf = b.ObtainTemplateKey(); b.ExportKeyFile(buf); }