Source/CrumbBar/CrumbBar.cs
(开头部分) 21KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Drawing;
using System.Drawing.Design;
using System.ComponentModel;
using System.Collections;
using DevComponents.DotNetBar.Rendering;
using System.Windows.Forms;
namespace DevComponents.DotNetBar
{
/// <summary>
/// Represents compact tree bread-crumb control.
/// </summary>
[ToolboxBitmap(typeof(CrumbBar), "CrumbBar.CrumbBar.ico"), ToolboxItem(true), Designer(typeof(Design.CrumbBarDesigner)), System.Runtime.InteropServices.ComVisible(false), DefaultEvent("SelectedItemChanged")]
public class CrumbBar : ItemControl
{
#region Private Variables
private CrumbBarItemsCollection _Items = null;
private CrumbBarViewContainer _ViewContainer = null;
private Office2007Renderer _VistaRenderer = null;
#endregion
#region Events
/// <summary>
/// Occurs before SelectedItem has changed and provides opportunity to cancel the change. Set Cancel property on event arguments to true to cancel the change.
/// </summary>
[Description("Occurs before SelectedItem has changed and provides opportunity to cancel the change.")]
public event CrumBarSelectionEventHandler SelectedItemChanging;
/// <summary>
/// Occurs after SelectedItem has changed. The change of the selected item at this point cannot be canceled. For that use SelectedItemChanging event.
/// </summary>
public event CrumBarSelectionEventHandler SelectedItemChanged;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the CrumbBar class.
/// </summary>
public CrumbBar()
: base()
{
_Items = new CrumbBarItemsCollection(this);
_ViewContainer = new CrumbBarViewContainer();
_ViewContainer.GlobalItem = false;
_ViewContainer.ContainerControl = this;
_ViewContainer.Displayed = true;
_ViewContainer.Style = eDotNetBarStyle.Office2007;
this.ColorScheme.Style = eDotNetBarStyle.Office2007;
_ViewContainer.SetOwner(this);
InitializeVistaRenderer();
this.SetBaseItemContainer(_ViewContainer);
}
#endregion
#region Internal Implementation
private CrumbBarItem _SelectedItem;
/// <summary>
/// Gets or sets currently selected item.
后面还有 519 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。