Beispiel #1
0
        /// <summary>
        /// Stringify the node
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            StringBuilder result = new StringBuilder();

            result.AppendLine(StringContent);
            if (Program.displayCompleteMessage)
            {
                ChildrenNodes.ForEach(c =>
                {
                    result.AppendLine(c.ToString());
                });
            }

            return(result.ToString());
        }
 public void SetIsChecked(bool?value, bool updateChildren, bool updateParent)
 {
     if (value == isChecked)
     {
         return;
     }
     isChecked = value;
     if (updateChildren && isChecked.HasValue)
     {
         ChildrenNodes.ForEach(c => c.SetIsChecked(isChecked, true, false));
     }
     if (updateParent && ParentNode != null)
     {
         ParentNode.VerifyCheckedState();
     }
     NotifyPropertyChanged("IsChecked");
 }