private void toolStripButton2_Click(object sender, EventArgs e) { DigitalIO.FormDIO fm = new DigitalIO.FormDIO(); fm.FormBorderStyle = FormBorderStyle.None; // 取消窗体边框 fm.TopLevel = false; // 取消最顶层窗体 fm.Dock = DockStyle.Fill; Ctab_MainTab.PageAdd(fm, -10, "DO", tabPageList); fm.Show(); }
/// <summary> /// online_Click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void online_Click(object sender, EventArgs e) { string ipAddr; if (Properties.Settings.Default.OnlineIP == "") { ipAddr = "http://127.0.0.1"; } else { ipAddr = Properties.Settings.Default.OnlineIP; } MyUserControl.MyBrowser browser = new MyUserControl.MyBrowser(ipAddr); Ctab_MainTab.PageAdd(browser, -10, "在线系统", tabPageList); }
/// <summary> /// 双击系统树节点 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void sysTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { if (e.Node.LastNode == null) { DataBLL dataBLL = new DataBLL(); ModelLayer.Nodes nodeSel = null; int nodeID = System.Convert.ToInt32(e.Node.Name); nodeSel = dataBLL.getNodeInfo(nodeID);//获取node的详细信息 device,signalType,chNO nodeSel.nodeName = e.Node.Text; nodeSel.nodeID = nodeID; listView_AddItems(listView_Properties, nodeSel.getNodeDic()); if (nodeSel.device == null || nodeSel.device == "") { //没有nodeinfo 使用自定义layoutpanel布局 MyUserControl.MyTableLayoutPanel tlp = new MyUserControl.MyTableLayoutPanel(); tlp.SetNodeConfigPanel(nodeID, nodeSel.nodeName); tlp.save.Click += new System.EventHandler(this.tpl_save_Click); Ctab_MainTab.PageAdd(tlp, nodeID, nodeSel.nodeName, tabPageList); } else { if (nodeSel.device.ToUpper() == "WIFI") { //有nodeinfo 添加曲线图 MyUserControl.TCPWave tcpWave = new MyUserControl.TCPWave(); tcpWave.Dock = DockStyle.Fill; Ctab_MainTab.PageAdd(tcpWave, nodeID, nodeSel.nodeName, tabPageList); } else { //有nodeinfo 添加曲线图 CANModels.ADForm.ADForm fm = new CANModels.ADForm.ADForm(nodeSel.chNO); fm.FormBorderStyle = FormBorderStyle.None; // 取消窗体边框 fm.TopLevel = false; // 取消最顶层窗体 fm.Dock = DockStyle.Fill; Ctab_MainTab.PageAdd(fm, nodeID, nodeSel.nodeName, tabPageList); fm.Show(); } } } }