extfoldernode.cs
来自「SharpDevelop2.0.0 c#开发免费工具」· CS 代码 · 共 78 行
CS
78 行
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision: 915 $</version>
// </file>
using System;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop.Gui
{
/// <summary>
/// Description of ExtFolderNode.
/// </summary>
public class ExtFolderNode : ExtTreeNode
{
string closedIcon = null;
string openedIcon = null;
public string ClosedIcon {
get {
return closedIcon;
}
set {
closedIcon = value;
if (closedIcon != null && !IsExpanded) {
SetIcon(closedIcon);
}
}
}
public string OpenedIcon {
get {
return openedIcon;
}
set {
openedIcon = value;
if (openedIcon != null && IsExpanded) {
SetIcon(openedIcon);
}
}
}
public ExtFolderNode()
{
}
public override void Refresh()
{
base.Refresh();
if (Nodes.Count == 0) {
SetIcon(ClosedIcon);
} else if (IsExpanded) {
SetIcon(OpenedIcon);
}
}
public override void Expanding()
{
base.Expanding();
if (openedIcon != null) {
SetIcon(openedIcon);
}
}
public override void Collapsing()
{
base.Collapsing();
if (closedIcon != null) {
SetIcon(closedIcon);
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?