Exemplo n.º 1
0
 private void InvokeOnCheckBoxClicking(FileTreeViewControlEventArgs args)
 {
     CheckBoxClickingHandler handler = OnCheckBoxClicking;
     if (handler != null) handler(this, args);
 }
Exemplo n.º 2
0
 public void CheckBoxClicked(FileTreeViewControlEventArgs args)
 {
     InvokeOnCheckBoxClicked(args);
 }
Exemplo n.º 3
0
        void SetIsChecked(bool? value, bool updateChildren, bool updateParent)
        {
            try
            {
                var args = new FileTreeViewControlEventArgs { CurrentNode = this };
                _fileTreeViewEvent.CheckBoxClicking(args);
                if (args.Handled)
                    return;

                if (value == _isChecked)
                    return;

                _isChecked = value;
                if (updateChildren && _isChecked.HasValue)
                {

                    if (HasDummyChild)
                    {
                        Children.Remove(DummyChild);
                        LoadChildren();
                    }

                    foreach (var c in Children)
                    {
                        c.SetIsChecked(_isChecked, true, false);
                    }

                }

                if (updateParent && _parent != null)
                    _parent.VerifyCheckState();

                RaisePropertyChanged("IsChecked");
            }
            catch (Exception)
            {

                //ignored
            }
        }