當前位置: 首頁>>代碼示例>>C#>>正文


C# CheckState.Equals方法代碼示例

本文整理匯總了C#中CheckState.Equals方法的典型用法代碼示例。如果您正苦於以下問題:C# CheckState.Equals方法的具體用法?C# CheckState.Equals怎麽用?C# CheckState.Equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CheckState的用法示例。


在下文中一共展示了CheckState.Equals方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SetCheckedParentNodes

 private static void SetCheckedParentNodes(TreeListNode node, CheckState check)
 {
     if (node.ParentNode != null)
     {
         bool b = false;
         for (int i = 0; i < node.ParentNode.Nodes.Count; i++)
         {
             CheckState state = node.ParentNode.Nodes[i].CheckState;
             if (!check.Equals(state))
             {
                 b = true;
                 break;
             }
         }
         node.ParentNode.CheckState = b ? CheckState.Indeterminate : check;
         SetCheckedParentNodes(node.ParentNode, check);
     }
 }
開發者ID:pvx,項目名稱:ShopOrder,代碼行數:18,代碼來源:OrderManagerForm.cs

示例2: SetCheckedParentNodes

 private void SetCheckedParentNodes(DevExpress.XtraTreeList.Nodes.TreeListNode node, CheckState check)
 {
     if (node.ParentNode != null)
     {
         bool b = false;
         CheckState state;
         for (int i = 0; i < node.ParentNode.Nodes.Count; i++)
         {
             if (node.ParentNode.Nodes[i].Tag == null) state = CheckState.Unchecked;
             else state = (CheckState)node.ParentNode.Nodes[i].Tag;
             if (!check.Equals(state))
             {
                 b = !b;
                 break;
             }
         }
         node.ParentNode.Tag = b ? CheckState.Indeterminate : check;
         SetCheckedParentNodes(node.ParentNode, check);
     }
 }
開發者ID:EdgarEDT,項目名稱:myitoppsp,代碼行數:20,代碼來源:frmLayerGradeSave.cs

示例3: SetCheckedParentNodes

        private void SetCheckedParentNodes(TreeListNode node, CheckState check) {
            if (node.ParentNode != null) {
                bool b = false;
                CheckState state;

                for (int i = 0; i < node.ParentNode.Nodes.Count; i++) {
                    state = (CheckState)node.ParentNode.Nodes[i].CheckState;
                    if (!check.Equals(state)) {
                        b = !b;
                        break;
                    }
                }
                
                node.ParentNode.CheckState = b ? CheckState.Checked : check;
                SetCheckedParentNodes(node.ParentNode, check);
            }
        }
開發者ID:s7loves,項目名稱:mypowerscgl,代碼行數:17,代碼來源:UCmOrgUserTree.cs

示例4: SetCheckedParentNodes

 private void SetCheckedParentNodes(IDictionary<string, List<Layer>> mapLayers, TreeListNode node, CheckState checkState)
 {
     if(node.ParentNode!=null)
     {
         var b = false;
         CheckState state;
         foreach (TreeListNode parentNode in node.ParentNode.Nodes)
         {
             if(parentNode.Tag==null)
             {
                 state=CheckState.Unchecked;
             }
             else
             {
                 state = (CheckState) parentNode.Tag;
             }
             if(!checkState.Equals(state))
             {
                 b = !b;
                 break;
             }
         }
         node.ParentNode.Tag = b ? CheckState.Indeterminate : checkState;
         SetCheckedParentNodes(mapLayers, node.ParentNode, checkState);
     }
 }
開發者ID:zfc317,項目名稱:mscd,代碼行數:26,代碼來源:MainForm.cs

示例5: SetCheckedParentNodes

        private void SetCheckedParentNodes(TreeListNode node, CheckState checkState)
        {
            if (node.ParentNode != null)
            {
                bool b = false;
                CheckState state;
                for (int i = 0; i < node.ParentNode.Nodes.Count; i++)
                {
                    state = (CheckState)node.ParentNode.Nodes[i].CheckState;
                    if (!checkState.Equals(state))
                    {
                        b = !b;
                        break;
                    }
                }
                node.ParentNode.CheckState = b ? CheckState.Indeterminate : checkState;
                //SetRulesHistoryState(node.ParentNode["RuleName"].ToString(), node.ParentNode.Checked);

                SetCheckedParentNodes(node.ParentNode, checkState);

            }
        }
開發者ID:hy1314200,項目名稱:HyDM,代碼行數:22,代碼來源:UCRulesTree.cs


注:本文中的CheckState.Equals方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。