Esempio n. 1
0
        private void Log_Fresh_Click(object sender, EventArgs e)
        {
            Configs.log.LogEnable      = this.Log_LogEnable.Checked;
            Configs.log.Enable         = this.Log_Enable.Checked;
            Configs.log.WarnningEnable = this.Log_WarnEnable.Checked;
            Configs.log.ErrEnable      = this.Log_ErrEnable.Checked;

            if (!int.TryParse(this.Log_LogLev.Text, out Log.lev_L))
            {
                Log.E("Log Fresh Err LogLevel");
            }
            if (!int.TryParse(this.Log_WarnLev.Text, out Log.lev_W))
            {
                Log.E("Log Fresh Err WarnningLevel");
            }
            if (!int.TryParse(this.Log_ErrLev.Text, out Log.lev_E))
            {
                Log.E("Log Fresh Err ErrLevel");
            }
            if (!int.TryParse(this.Log_FontSize.Text, out Configs.log.FontSize))
            {
                Log.E("Log Fresh Err FontSize");
            }
            else
            {
                logView.Font = new System.Drawing.Font("宋体", Configs.log.FontSize);
            }

            APP.WriteLogConfig();
        }
Esempio n. 2
0
        private void Net_Fresh_Click(object sender, EventArgs e)
        {
            if (!int.TryParse(this.TCPBufferSize.Text, out Configs.net.TCPBuffersize))
            {
                Log.E("Net Init Err  TCPBuffersize");
            }
            if (!int.TryParse(this.TCPPort.Text, out Configs.net.TCPPort))
            {
                Log.E("Net Init Err TCPPort");
            }
            if (!int.TryParse(this.TcpCheckSpace.Text, out Configs.net.TCPCheckSpace))
            {
                Log.E("Net Init Err TCPCheckSpace");
            }
            if (!int.TryParse(this.TCPTimeOut.Text, out Configs.net.TCPConnTimeOut))
            {
                Log.E("Net Init Err TCPConnTimeOut");
            }
            if (!int.TryParse(this.TCPMaxCon.Text, out Configs.net.TCPMaxConn))
            {
                Log.E("Net Init Err TCPMaxConn");
            }


            APP.WriteNetConfig();
        }