Exemple #1
0
        private void TreeListGetStateImage(object sender, DevExpress.XtraTreeList.GetStateImageEventArgs e)
        {
            if (e.Node.GetValue(0) is ReturnObj)
            {
                var oh = (ReturnObj)e.Node.GetValue(0);
                if (oh.ReturnStateId == 1)
                {
                    e.NodeImageIndex = 0;
                }

                if (oh.ReturnStateId == 2)
                {
                    e.NodeImageIndex = 1;
                }

                if (oh.ReturnStateId == 3)
                {
                    e.NodeImageIndex = 2;
                }

                if (oh.ReturnStateId == 4)
                {
                    e.NodeImageIndex = 3;
                }

                if (oh.ReturnStateId == 5)
                {
                    e.NodeImageIndex = 4;
                }
            }
        }
Exemple #2
0
        private void treeList1_GetStateImage(object sender, DevExpress.XtraTreeList.GetStateImageEventArgs e)
        {
            int id = (int)e.Node[this._ds.ConfigTbl.TypeTreeListColumn];

            this._ds.BranchTypeTbl.GetStateImage(sender, e, id);
            //e.NodeImageIndex = !e.Node.HasChildren ? 2 : (e.Node.Expanded ? 1 : 0);
        }
Exemple #3
0
 private void treeList1_GetStateImage(object sender, DevExpress.XtraTreeList.GetStateImageEventArgs e)
 {
     e.NodeImageIndex = e.Node.Id;
     // e.Node.Expanded = false;
     //if (e.Node.Id <= 1 || e.Node.Id == 3)
     //    e.Node.Expanded = true;
 }
Exemple #4
0
 private void treeList1_GetStateImage(object sender, DevExpress.XtraTreeList.GetStateImageEventArgs e)
 {
     e.NodeImageIndex = e.Node.HasChildren ? 1 : 2;
     if (treeListProduction.FocusedNode == e.Node)
     {
         e.NodeImageIndex = 0;
     }
 }
Exemple #5
0
 private void TreeList1_GetStateImage(object sender, DevExpress.XtraTreeList.GetStateImageEventArgs e)
 {
     if (treeList1.FindNodeByID(e.Node.Id)["node_tp"].ToString() == "1")
     {
         e.NodeImageIndex = 0;
     }
     else
     {
         e.NodeImageIndex = 1;
     }
 }
 private void treeFile_GetStateImage(object sender, DevExpress.XtraTreeList.GetStateImageEventArgs e)
 {
     if (e.Node.GetDisplayText("Type") == "Folder")
     {
         e.NodeImageIndex = 0;
     }
     else
     {
         e.NodeImageIndex = 1;
     }
 }
Exemple #7
0
        private void treeList1_GetStateImage(object sender, DevExpress.XtraTreeList.GetStateImageEventArgs e)
        {
            CheckState check = GetCheckState(e.Node.Tag);

            if (check == CheckState.Unchecked)
            {
                e.NodeImageIndex = 0;
            }
            else if (check == CheckState.Checked)
            {
                e.NodeImageIndex = 1;
            }
            else
            {
                e.NodeImageIndex = 2;
            }
        }
Exemple #8
0
        void treeBinding_GetStateImage(object sender, DevExpress.XtraTreeList.GetStateImageEventArgs e)
        {
            ABCCommonTreeListNode obj = (ABCCommonTreeListNode)treeBinding.GetDataRecordByNode(e.Node);

            if (obj == null || (ABCScreen.ABCBindingConfig)obj.InnerData == null)
            {
                return;
            }

            if (((ABCScreen.ABCBindingConfig)obj.InnerData).IsList)
            {
                e.NodeImageIndex = 0;
            }
            else
            {
                e.NodeImageIndex = 1;
            }
        }
Exemple #9
0
        private void treeList_StationLayer_GetStateImage(object sender, DevExpress.XtraTreeList.GetStateImageEventArgs e)
        {
            var checkState = GetCheckState(e.Node.Tag);

            switch (checkState)
            {
            case CheckState.Checked:
                e.NodeImageIndex = 0;
                break;

            case CheckState.Indeterminate:
                e.NodeImageIndex = 1;
                break;

            case CheckState.Unchecked:
                e.NodeImageIndex = 2;
                break;
            }
        }
Exemple #10
0
 /// <summary>
 /// 设置图片
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void treeList1_GetStateImage(object sender, DevExpress.XtraTreeList.GetStateImageEventArgs e)
 {
     try
     {
         CheckState check = GetCheckState(e.Node.Tag);
         if (check == CheckState.Unchecked)
         {
             e.NodeImageIndex = 0;
         }
         else if (check == CheckState.Checked)
         {
             e.NodeImageIndex = 1;
         }
         else
         {
             e.NodeImageIndex = 2;
         }
     }
     catch (Exception E)
     {
         this.ShowMessage(E.Message);
     }
 }
Exemple #11
0
 //--------------------------
 private void treeList1_GetStateImage(object sender, DevExpress.XtraTreeList.GetStateImageEventArgs e)
 {
     e.NodeImageIndex = !e.Node.HasChildren ? 2 : (e.Node.Expanded ? 1 : 0);
 }
Exemple #12
0
 private void entityList_GetStateImage(object sender, DevExpress.XtraTreeList.GetStateImageEventArgs e)
 {
     e.NodeImageIndex = e.Node.Id;
 }
Exemple #13
0
        private void ResultsTreeList_GetStateImage(object sender, DevExpress.XtraTreeList.GetStateImageEventArgs e)
        {
            var isfolder = Convert.ToBoolean(e.Node.GetValue("IsFolder"));

            e.NodeImageIndex = isfolder ? 0 : 1;
        }