/// <summary>
        /// 写日志
        /// </summary>
        /// <param name="message"></param>
        /// <param name="title"></param>
        public static void Logprogram(string message, string title)
        {
            #region 写日志

               LogClass logclass = new LogClass();
               LogClass.StructLogEntry structlogentry = new LogClass.StructLogEntry();
               LogEntry logentry = new LogEntry();

               structlogentry.eventid = 100;
               structlogentry.message = message;
               structlogentry.priority = 0;
               structlogentry.category = "General";
               structlogentry.title = title;
               structlogentry.username = "";
               structlogentry.logentry = logentry;

               logclass.InsertDatebase(structlogentry);

               #endregion
        }
        /// <summary>
        /// 写日志
        /// </summary>
        /// <param name="message"></param>
        /// <param name="title"></param>
        private void WriteLoginLog(string message, string title)
        {
            #region 写日志

            //处理消息,去掉里面的单引号(每次去掉两个)
            int index;

            while((index = message.IndexOf("\'")) != -1)
            {
                message = message.Remove(index, 1);

                index = message.IndexOf("\'");
                if(index != -1)
                {
                    message = message.Remove(index, 1);    
                }
            }

            LogClass logclass = new LogClass();
            LogClass.StructLogEntry structlogentry = new LogClass.StructLogEntry();
            LogEntry logentry = new LogEntry();

            structlogentry.eventid = 2000;
            structlogentry.message = string.Format("{0} {1}", StaticMath.GetName(), message);
            structlogentry.priority = 2;
            structlogentry.category = "General";
            structlogentry.title = title;
            structlogentry.username = StaticMath.GetName();
            structlogentry.logentry = logentry;

            logclass.InsertDatebase(structlogentry);

            #endregion
        }