Source/CommandManager.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Collections;
namespace DevComponents.DotNetBar
{
/// <summary>
/// Provides command related utility methods that register and unregister commands.
/// </summary>
public class CommandManager
{
private static Hashtable _CommandBindings = new Hashtable();
private static bool _UseReflection = true;
/// <summary>
/// Gets or sets whether commands use Reflection to find the property names when applying value to the unknown types. Default value is true.
/// Setting this value to false will increase performance if Unknown types are used but it will at same time disable the
/// command setting value for these types.
/// </summary>
public static bool UseReflection
{
get
{
return _UseReflection;
}
set
{
_UseReflection = value;
}
}
private static bool _AutoUpdateLayout = true;
/// <summary>
/// Gets or sets whether layout on the items of type BaseItem is automatically updated when command text or other property changes which requires layout updated. Default value is true.
/// </summary>
public static bool AutoUpdateLayout
{
get { return _AutoUpdateLayout; }
set
{
if (_AutoUpdateLayout != value)
{
_AutoUpdateLayout = value;
}
}
}
/// <summary>
/// Connects the Command Source to the Command.
/// </summary>
/// <param name="commandSource">Command source to connect to the command.</param>
/// <param name="command">Reference to the command.</param>
public static void RegisterCommand(ICommandSource commandSource, ICommand command)
{
if (commandSource == null)
throw new NullReferenceException("commandSource cannot be null");
if (command == null)
throw new NullReferenceException("command cannot be null");
ArrayList subscribers = null;
后面还有 78 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。