示例#1
0
        public STColorFontConfig clone()
        {
            STColorFontConfig obj = new STColorFontConfig(all_backcolor[0], all_font[0]);

            obj.all_forecolor = this.all_forecolor.Clone() as Color[];
            obj.all_backcolor = this.all_backcolor.Clone() as Color[];
            obj.all_font      = this.all_font.Clone() as Font[];
            return(obj);
        }
示例#2
0
        void Bt_setting_colorClick(object sender, EventArgs e)
        {
            ColorSelectionForm oform = new ColorSelectionForm(colorfontconfig.clone());

            if (oform.ShowDialog() == DialogResult.OK)
            {
                colorfontconfig = oform.config;
                update_dg_color(dgv_show);
            }
        }
示例#3
0
        public ColorSelectionForm(STColorFontConfig inconfig)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
            config            = inconfig;
            this.DialogResult = DialogResult.Cancel;

            demodata = new DataTable();
            demodata.Columns.Add("DateTime");
            demodata.Columns.Add("PRIORITY");
            demodata.Columns.Add("MESSAGE");
            DataRow dr       = null;
            string  msg      = string.Empty;
            int     priority = 0;

            all_label    = new Label[8];
            all_label[0] = label0;
            all_label[1] = label1;
            all_label[2] = label2;
            all_label[3] = label3;
            all_label[4] = label4;
            all_label[5] = label5;
            all_label[6] = label6;
            all_label[7] = label7;
            for (int i = 0; i < 8; i++)
            {
                priority       = i;
                msg            = string.Format("This is the demo message with priority {0}", config.all_priority[priority]);
                dr             = demodata.NewRow();
                dr["DateTime"] = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss.ffffff");
                dr["MESSAGE"]  = msg;
                dr["PRIORITY"] = priority;
                demodata.Rows.Add(dr);
                all_label[i].Text      = config.all_priority[i];
                all_label[i].ForeColor = config.all_forecolor[i];
                all_label[i].BackColor = config.all_backcolor[i];
                all_label[i].Font      = config.all_font[i];
            }
        }
示例#4
0
        public SSHMainForm()
        {
            InitializeComponent();
            colorfontconfig = new STColorFontConfig(label1.BackColor, label1.Font);
            Init_NodeList();
            logQ.Init();

            this.tb_hostIP.Text   = Resources.HOST;
            this.tb_username.Text = Resources.USERNAME;
            this.tb_pwd.Text      = Resources.PASSWORD;

            var now = DateTime.Now;

            this.dateTimePicker_Start.Value = now.AddMinutes(-10);
            this.dateTimePicker_End.Value   = now;
            all_session = new List <sessionObj>();

            main = new SSHManager(new SSHParam(this.tb_hostIP.Text, this.tb_username.Text, this.tb_pwd.Text)
                                  , tb_output, rtb_log);
            RulesInit();
            ComboBox_commonInit();
        }