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); }
/// <summary> /// 登录成功后将登录信息记录到文本中 /// </summary> private void writeLoginInfo() { userinfo.host = host_txt.Text; userinfo.name = this.userName_txt.Text; userinfo.password = this.pw_txt.Text; userinfo.remotePath = this.remotePath_txt.Text; write.TxtPath = PathManager.GetInstance().LoginINfoLog; if (!write.replaceLineText("username:"******"username:"******"username:"******"password:"******"password:"******"password:"******"host:", "host:" + userinfo.host)) { write.addOneLine("host:" + userinfo.host); } if (!write.replaceLineText("reomotepath:", "reomotepath:" + userinfo.remotePath)) { write.addOneLine("reomotepath:" + userinfo.remotePath); } }
public static void addConfig(string sourcePath, string targetPath) { string temp = "- [替换] " + sourcePath + @" -> " + targetPath.Replace(@"\", @"/"); write.addOneLine(temp); }