예제 #1
0
        private void _LogView(stLog.SysLog syslog, System.Windows.Forms.RichTextBox rbox, System.Windows.Forms.Timer timerlog, AutoCompleteStringCollection autocmpl, object ctrlinfo)
        {
            this.InitAttrDefaults();

            if (syslog == null)
            {
                throw new ArgumentNullException(global::stLog.Properties.Resources.stSysLogIsNull);
            }
            if (rbox == null)
            {
                throw new ArgumentNullException(global::stLog.Properties.Resources.stRichTextBoxIsNull);
            }
            this.rBox        = rbox;
            this.sysLog      = syslog;
            this.ctrlInfo    = ((ctrlinfo != null) ? (ctrlinfo as Control) : ctrlInfo);
            this.autoCmpl    = ((autocmpl != null) ? autocmpl : autoCmpl);
            this.timerHandle = new System.EventHandler(this.AutoUpdateTick);

            if (timerlog == null)
            {
                this.timerLog          = new System.Windows.Forms.Timer();
                this.timerLog.Enabled  = false;
                this.timerLog.Interval = 1000;
                this.timerLog.Tick    += this.timerHandle;
            }
            else
            {
                this.timerLog       = timerlog;
                this.timerLog.Tick += this.timerHandle;
            }
        }
예제 #2
0
 public LogView(stLog.SysLog syslog, System.Windows.Forms.RichTextBox rbox, System.Windows.Forms.Timer timerlog)
 {
     this._LogView(syslog, rbox, timerlog, null, null);
 }
예제 #3
0
 public LogView(stLog.SysLog syslog, System.Windows.Forms.RichTextBox rbox, System.Windows.Forms.Timer timerlog, AutoCompleteStringCollection autocmpl, object ctrlinfo)
 {
     this._LogView(syslog, rbox, timerlog, autocmpl, ctrlinfo);
 }