Ejemplo n.º 1
0
        /// <summary>
        /// 根据运行模式生成不同的记录文件
        /// </summary>
        /// <returns>生成结果</returns>
        public bool CreateService()
        {
            if (IsCreate)
            {
                return(true);
            }

            if (_traceFile.CreateFile("Buoy1", TraceType.SingleBinary, "Buoy1", "bin", @"\UDP") == false)
            {
                return(false);
            }

            if (_traceFile.CreateFile("Buoy2", TraceType.SingleBinary, "Buoy2", "bin", @"\UDP") == false)
            {
                return(false);
            }
            if (_traceFile.CreateFile("Buoy3", TraceType.SingleBinary, "Buoy3", "bin", @"\UDP") == false)
            {
                return(false);
            }
            if (_traceFile.CreateFile("Buoy4", TraceType.SingleBinary, "Buoy4", "bin", @"\UDP") == false)
            {
                return(false);
            }
            if (_traceFile.CreateFile("Position", TraceType.String, "Pos", "txt", @"\Result") == false)
            {
                return(false);
            }
            if (_traceFile.CreateFile("ALL", TraceType.SingleBinary, "All", "bin", @"\UDP") == false)
            {
                return(false);
            }

            IsCreate = true;
            return(true);
        }