private void hasautopathFile() { if (autopathwrite == null) { autopathwrite = new FileTextChangeManager(@"./egameCopyConfig/autopath.txt"); } FilesAndDirsChangeManager.hasSomeFile(@"./egameCopyConfig/autopath.txt", true); }
public static void ftpLog(string str) { string logpath = PathManager.GetInstance().FtpLogPath; FileTextChangeManager write = new FileTextChangeManager(logpath); if (isFirstFtpLog) { isFirstFtpLog = false; write.clearAllLine(); write.addOneLine("以下文件需上传"); } write.addOneLine(str); }
internal static void warn(string str) { string logpath = PathManager.GetInstance().LogPath; FileTextChangeManager write = new FileTextChangeManager(logpath); if (isFirstLog) { isFirstLog = false; write.clearAllLine(); } write.addOneLine(str); MessageBox.Show(str); }
private void initText() { // FileTextChangeManager.GetInstance().readAllLine(); FileTextChangeManager textmanager = new FileTextChangeManager(); textmanager.TxtPath = PathManager.GetInstance().ShuomingPath; List <string> temp = textmanager.readAllLine(); for (var i = 0; i < temp.Count; i++) { richTextBox1.AppendText(temp[i]); richTextBox1.AppendText("\n"); } }
public static void addIndexXml(string path) { if (write == null) { write = new FileTextChangeManager(); } write.TxtPath = path + @"\Index.xml"; //"匹配 Game.swf?v=2.3.10.1601191154 " string re0 = "(" + "Game.swf" + ")"; string re03 = "(\\?v=)"; string re1 = "(\\d+)"; // Integer Number 1 string re2 = "(\\.*)"; // Any Single Character 1 string re3 = "(\\d+)"; // Integer Number 2 string re4 = "(\\.*)"; // Any Single Character 2 string re5 = "(\\d+)"; // Integer Number 3 string re6 = "(\\.*)"; // Any Single Character 2 string re7 = "(\\d+)"; // Integer Number 3 ////首先清除掉所有的内容; //if (FilesAndDirsChangeManager.hasSomeFile(path + @"/Index.xml", false)) //{ // write.clearAllLine(); //} bool isfox = write.replaceLineWithReg(re0 + re03 + re1 + re2 + re3 + re4 + re5 + re6 + re7, "Game.swf?v=" + PathManager.GetInstance().VersionTxt); Log.trace(write.TxtPath + " Game.swf?v=" + PathManager.GetInstance().VersionTxt + " " + (isfox ? "成功" : "失败")); if (isfox) { Log.ftpLog(write.TxtPath); } // { // string p = @"<?xml version=""1.0"" encoding=""utf-8""?> //<index> // <brand> // <main>brand/Main.swf?v=1.0.01291356</main> // <skin>brand/Skin.swf?v=1.0.01291356</skin> // </brand> // <app>game/Game.swf?v=" + PathManager.GetInstance().VersionTxt + @"</app> //</index>"; // write.addOneLine(p); // Log.trace(write.TxtPath + " 文件创建成功"); // }; }
public static void addStartTitle() { if (write == null) { write = new FileTextChangeManager(); } addIndexXml(); write.TxtPath = path + @"\" + filename; if (!FilesAndDirsChangeManager.hasSomeFile(write.TxtPath, true)) { write.addOneLine(@"## 版本 (" + PathManager.GetInstance().VersionTxt + ")"); write.addOneLine(@"## 内测"); write.addOneLine(@"## 步骤"); Log.trace("创建文件到 " + write.TxtPath + " 成功"); } else { write.addOneLine("最新记录"); }; }
// private string filename = "changefile.txt"; public ChangedFilesManager() { autopathwrite = new FileTextChangeManager(PathManager.GetInstance().ChangePath); filePathList = autopathwrite.readAllLine(); }
public ModifyConfig() { writefile = new FileTextChangeManager(); }