Beispiel #1
0
        protected override void OnDrawNode(DrawTreeNodeEventArgs e)
        {
            OptionSettingNode setting = e.Node as OptionSettingNode;

            if (setting != null)
            {
                setting.DrawNode(e);
            }
            e.DrawDefault = true;
            base.OnDrawNode(e);
        }
Beispiel #2
0
        protected override void OnMouseUp(MouseEventArgs e)
        {
            var node = GetNodeAt(e.Location);

            if (node == null)
            {
                return;
            }

            OptionSettingNode settingsNode = node as OptionSettingNode;

            if (settingsNode != null)
            {
                if (settingsNode == SelectedNode)
                {
                    ToggleSetting(settingsNode);
                }
                else
                {
                    SelectedNode = settingsNode;
                }
            }
        }
Beispiel #3
0
 private void ToggleSetting(OptionSettingNode settingsNode)
 {
     settingsNode.ToggleSetting();
     InvalidateNodeIcon(settingsNode);
     OnAfterCheck(new TreeViewEventArgs(settingsNode));
 }