private void btn_monitoring_Click(object sender, EventArgs e) { ButtonReset(); if (ActiveMdiChild != null) { if (this.ActiveMdiChild != mchildForm_Monitoring) { //ActiveMdiChild.Close(); ActiveMdiChild.Hide(); } mchildForm_Monitoring = ShowActiveForm(mchildForm_Monitoring, typeof(monitoring)) as monitoring; mchildForm_Monitoring.Show(); } else { mchildForm_Monitoring = ShowActiveForm(mchildForm_Monitoring, typeof(monitoring)) as monitoring; mchildForm_Monitoring.Show(); } btn_monitoring.BackColor = Color.Red; }
private void Form1_Load(object sender, EventArgs e) { client = new SimpleTcpClient(); client.StringEncoder = Encoding.UTF8; client.DataReceived += Client_DataReceived; btn_monitoring.BackColor = Color.Red; //시작메뉴 모니터링 화면 if (ActiveMdiChild != null) { if (this.ActiveMdiChild != mchildForm_Monitoring) { //ActiveMdiChild.Close(); ActiveMdiChild.Hide(); } mchildForm_Monitoring = ShowActiveForm(mchildForm_Monitoring, typeof(monitoring)) as monitoring; } else { mchildForm_Monitoring = ShowActiveForm(mchildForm_Monitoring, typeof(monitoring)) as monitoring; } }