예제 #1
0
파일: Log.cs 프로젝트: meilaHou/c-learn
        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);
        }
예제 #2
0
파일: Log.cs 프로젝트: meilaHou/c-learn
        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);
        }
예제 #3
0
 /// <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);
     }
 }
예제 #4
0
        public static void addConfig(string sourcePath, string targetPath)
        {
            string temp = "- [替换] " + sourcePath + @"  ->  " + targetPath.Replace(@"\", @"/");

            write.addOneLine(temp);
        }