modecounts.cs
来自「树的简单使用方法和基本操作,这是一个CS程序.」· CS 代码 · 共 39 行
CS
39 行
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Common;
namespace TreeTest
{
public partial class ModeCounts : ModeBase
{
public ModeCounts()
{
InitializeComponent();
}
public override Mode Mode { get { return Mode.Counts; } }
public override INode<Element> CurrentNode
{
set
{
base.CurrentNode = value;
INode<Element> n = value;
TreeCount.Text = ( n == null ) ? "NULL" : n.Tree.Count.ToString();
NodeCount.Text = ( n == null ) ? "NULL" : n.Count.ToString();
DirectChildCount.Text = ( n == null ) ? "NULL" : n.DirectChildCount.ToString();
Depth.Text = ( n == null ) ? "NULL" : n.Depth.ToString();
BranchCount.Text = ( n == null ) ? "NULL" : n.BranchCount.ToString();
BranchIndex.Text = ( n == null ) ? "NULL" : n.BranchIndex.ToString();
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?