/// <summary> /// 将记录写入到输出目标 /// </summary> /// <param name="log"></param> private static void write(string log) { #if DEBUG Console.WriteLine("[" + notice() + "]" + log); #else FileStream fs = new FileStream(Configure.LogPath(), FileMode.Append); byte[] rb = SendMessage.ToBytes("[" + notice() + "]" + log + "\r\n"); fs.Write(rb, 0, rb.Length); fs.Close(); #endif }
/// <summary> /// 配置文件信息 /// </summary> /// <returns></returns> public string config() { string rt = ""; rt += "程序路径: " + System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName; rt += "\n工作路径: " + Environment.CurrentDirectory; rt += "\n服务器端口: " + Net.Get().GetIp(); rt += "\n文件服务器端口: " + FileSend.Get().getIP(); rt += "\n配置文件路径: " + Configure.LogPath(); rt += "\n截图目录: " + Configure.ScreenshotPath(); rt += "\n用户列表: " + Configure.UserListPath(); return(rt + "\n"); }