Пример #1
0
 /// <summary>
 /// 初始状态
 /// </summary>
 private void Click_init()
 {
     DevExpress.XtraTreeList.Nodes.TreeListNode node = null;
     try
     {
         treeList_fz.FocusedNode = treeList_fz.Nodes[0];
         node = treeList_fz.FocusedNode;
         if (node != null)
         {
             if (node.StateImageIndex == 0)
             {
                 SetState(node, 1);
             }
             else
             {
                 SetState(node, 0);
                 SetStateS(node.ParentNode, 0);
             }
             GetCheckNode(treeList_fz, 1);
             if (ShowType != 1)
             {
                 ClearState();
                 ShowType = 1;
             }
             if (StaticClass.real_del != null)
             {
                 StaticClass.real_del(ShowType, bpShowPage, checkmsg);
             }
         }
     }
     catch (Exception ex)
     {
         Basic.Framework.Logging.LogHelper.Error(ex);
     }
 }
Пример #2
0
 public void formshow(Dictionary <string, string> param)
 {
     if (param != null && param.Count > 0)
     {
         RequestUtil.DoMainTabChange("实时主界面");
         shownum = param["MM"].ToString();
         StaticClass.formshow(shownum);
     }
 }
Пример #3
0
        private void RefreshControl()
        {
            #region 初始化
            newtreelist();
            Initree();
            #endregion

            #region 赋值
            SelectTreeList();
            #endregion

            #region 刷新
            if (ShowType != 5)
            {
                if (StaticClass.real_del != null)
                {
                    StaticClass.real_del(ShowType, bpShowPage, checkmsg);
                }
            }
            #endregion
        }
Пример #4
0
 /// <summary>
 /// 设备树鼠标单击事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void treeList_fz_MouseClick(object sender, MouseEventArgs e)
 {
     DevExpress.XtraTreeList.Nodes.TreeListNode node = null;
     DevExpress.XtraTreeList.TreeListHitInfo    hitInfo;
     if (e.Button == MouseButtons.Left)
     {
         hitInfo = treeList_fz.CalcHitInfo(new Point(e.X, e.Y));
         if (hitInfo.HitInfoType == DevExpress.XtraTreeList.HitInfoType.Cell ||
             hitInfo.HitInfoType == DevExpress.XtraTreeList.HitInfoType.StateImage)
         {
             node = treeList_fz.FocusedNode;
             if (node != null)
             {
                 if (node.StateImageIndex == 0)
                 {
                     SetState(node, 1);
                 }
                 else
                 {
                     SetState(node, 0);
                     SetStateS(node.ParentNode, 0);
                 }
                 GetCheckNode(treeList_fz, 1);
                 if (ShowType != 1)
                 {
                     ClearState();
                     ShowType = 1;
                 }
                 if (StaticClass.real_del != null)
                 {
                     StaticClass.real_del(ShowType, bpShowPage, checkmsg);
                 }
             }
         }
     }
 }
Пример #5
0
 /// <summary>
 /// 自定义编排树焦点改变事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void treeList_bp_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e)
 {
     if (treeList_bp.FocusedNode != null && treeList_bp.FocusedNode != treeList_bp.Nodes[0])
     {
         for (int i = 0; i < treeList_bp.Nodes[0].Nodes.Count; i++)
         {
             treeList_bp.Nodes[0].Nodes[i].StateImageIndex = 0;
         }
         treeList_bp.FocusedNode.StateImageIndex = 1;
         if (treeList_bp.FocusedNode.Tag != null)
         {
             bpShowPage = int.Parse(treeList_bp.FocusedNode.Tag.ToString());
         }
         if (ShowType != 5)
         {
             ClearState();
             ShowType = 5;
         }
         if (StaticClass.real_del != null)
         {
             StaticClass.real_del(ShowType, bpShowPage, null);
         }
     }
 }
Пример #6
0
 private void WorkMainForm_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e)
 {
     StaticClass.SystemOut = true;
     StaticClass.CloseAlarmForm();
 }
Пример #7
0
        private void WorkMainForm_Load(object sender, System.EventArgs e)
        {
            StaticClass.iniform();
            StaticClass.real_s.Show();
            GetRealDiaplayTabPage().Controls.Add(StaticClass.real_s);

            StaticClass._type_s.Show();
            GetNagDockPanel().Controls.Add(StaticClass._type_s);

            StaticClass.YJForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            StaticClass.YJForm.TopLevel        = false;
            StaticClass.YJForm.Show();
            GetEwarlDockPanel().Controls.Add(StaticClass.YJForm);

            StaticClass.MNLBJForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            StaticClass.MNLBJForm.TopLevel        = false;
            StaticClass.MNLBJForm.Show();
            GetWarGridDockPanel().Controls.Add(StaticClass.MNLBJForm);

            StaticClass.KGLBJForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            StaticClass.KGLBJForm.TopLevel        = false;
            StaticClass.KGLBJForm.Show();
            GetSWWarDockPanel().Controls.Add(StaticClass.KGLBJForm);

            StaticClass.KDYCForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            StaticClass.KDYCForm.TopLevel        = false;
            StaticClass.KDYCForm.Show();
            GetFBExeDockPanel().Controls.Add(StaticClass.KDYCForm);

            StaticClass.KZForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            StaticClass.KZForm.TopLevel        = false;
            StaticClass.KZForm.Show();
            GetRealControlDockPanel().Controls.Add(StaticClass.KZForm);

            StaticClass.KGLBDForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            StaticClass.KGLBDForm.TopLevel        = false;
            StaticClass.KGLBDForm.Show();
            GetSWChangeDockPanel().Controls.Add(StaticClass.KGLBDForm);

            StaticClass.RealHandForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            StaticClass.RealHandForm.TopLevel        = false;
            StaticClass.RealHandForm.Show();
            GetHandControlPanel().Controls.Add(StaticClass.RealHandForm);

            //添加运行记录页面
            StaticClass.realRunRecordControl.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            StaticClass.realRunRecordControl.TopLevel        = false;
            StaticClass.realRunRecordControl.Show();
            runRecordPanel.Controls.Add(StaticClass.realRunRecordControl);

            //添加自动挂接页面
            StaticClass.automaticArtControl.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            StaticClass.automaticArtControl.TopLevel        = false;
            StaticClass.automaticArtControl.Show();
            automaticArtPanel.Controls.Add(StaticClass.automaticArtControl);

            StaticClass.MNLDDForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            StaticClass.MNLDDForm.TopLevel        = false;
            StaticClass.MNLDDForm.Show();
            anaDD_Container.Controls.Add(StaticClass.MNLDDForm);


            timer1.Enabled             = true;
            StaticClass.updatefromtext = new StaticClass.mydel1(settext);
            StaticClass.dell           = new StaticClass.mydell1(showform);
        }
Пример #8
0
 /// <summary>
 /// 刷 新
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void tools_refresh_Click(object sender, EventArgs e)
 {
     StaticClass.adddelegate();//重新注册委托
     refresh();
 }