private void treeView_dir_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { #if print ConsoleU.writeLine(String.Format("node selected. . {0}", e.Node.FullPath), ConsoleU.Level.Info); #endif if (e.Node.Text == REMOTE_MENU) { dataGridView(); //load dsRandomXml from xml and Bound to dgb groupbox(); if (sign == "on") { dataGridView1.Visible = true; groupBox1.Visible = true; } else if (sign == "off") { if (mSpSlot != null) { dataGridView1.Visible = true; groupBox1.Visible = true; mRemote = new gf_remote(mSpSlot);// open remote form mRemote.Owner = this; mRemote.Move += new EventHandler(subFormMove); mRemote.mMainFormTrans += new mainFormTrans(remoteEventReceive); //this is a delegate in order to close subForm mRemote.Show(); sign = "on"; this.AddOwnedForm(mRemote); mDockRemote = new DockU(this);//DockU mDockRemote.isEnabled = true; mDockRemote.position = DockU.Position.MiddleRight; mDockRemote.process(mRemote); serialToolStripMenuItem.Enabled = false; } else { ConsoleU.writeLine(String.Format("No choice of serial"), ConsoleU.Level.Error); treeView_dir.SelectedNode = null; dataGridView1.Visible = false; groupBox1.Visible = false; } } else { dataGridView1.Visible = false; groupBox1.Visible = false; } } else { dataGridView1.Visible = false; groupBox1.Visible = false; } }
private void treeView_dir_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { #if print ConsoleU.writeLine(String.Format("node selected. . {0}", e.Node.FullPath), ConsoleU.Level.Info); #endif if (e.Node.Text == REMOTE_MENU) { dataGridView();//load dsRandomXml from xml and Bound to dgb groupbox(); if (sign == "on") { dataGridView1.Visible = true; groupBox1.Visible = true; } else if (sign == "off") { if (mSpSlot != null) { dataGridView1.Visible = true; groupBox1.Visible = true; mRemote = new gf_remote(mSpSlot);// open remote form mRemote.Owner = this; mRemote.Move += new EventHandler(subFormMove); mRemote.mMainFormTrans += new mainFormTrans(remoteEventReceive);//this is a delegate in order to close subForm mRemote.Show(); sign = "on"; this.AddOwnedForm(mRemote); mDockRemote = new DockU(this);//DockU mDockRemote.isEnabled = true; mDockRemote.position = DockU.Position.MiddleRight; mDockRemote.process(mRemote); serialToolStripMenuItem.Enabled = false; } else { ConsoleU.writeLine(String.Format("No choice of serial"), ConsoleU.Level.Error); treeView_dir.SelectedNode = null; dataGridView1.Visible = false; groupBox1.Visible = false; } } else { dataGridView1.Visible = false; groupBox1.Visible = false; } } else { dataGridView1.Visible = false; groupBox1.Visible = false; } }