本文整理汇总了C#中CommandFunction类的典型用法代码示例。如果您正苦于以下问题:C# CommandFunction类的具体用法?C# CommandFunction怎么用?C# CommandFunction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CommandFunction类属于命名空间,在下文中一共展示了CommandFunction类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: AddCommand
public void AddCommand(string Text, CommandFunction F)
{
Command.TextOnly temp = new Command.TextOnly(Text);
temp.OnClick = F;
commands.Add(temp);
RebuildWindow();
}
开发者ID:Dahrkael,项目名称:CoRe,代码行数:7,代码来源:TextOnly.cs
示例2: Command
public Command(string name, CommandFunction function)
{
this.Name = name;
this.Function = function;
CommandDispatcher.CommandList.Add(this.Name, this);
}
开发者ID:vanbrayne,项目名称:ZenioxIrcBot,代码行数:7,代码来源:Command.cs
示例3: GetReplicationCommandType
public ReplicationCommandType GetReplicationCommandType(System.Data.IDbCommand cmd, CommandFunction fct)
{
switch (fct)
{
case CommandFunction.ExecuteNonQuery:
return ReplicationCommandType.Write;
case CommandFunction.ExecuteScalar:
case CommandFunction.ExecuteReader:
return ReplicationCommandType.Read;
}
return ReplicationCommandType.Read;
}
开发者ID:kYann,项目名称:SqlReplicationClient,代码行数:12,代码来源:DefaultCommandTypeAnalyser.cs
示例4: CommandButton
void CommandButton(CommandFunction func, string buttonLabel, ref float buttonIndex)
{
if(GUI.Button(new Rect(margin, buttonEndY + (buttonIndex*(buttonHeight+buttonGap)), buttonWidth, buttonHeight), buttonLabel, HighLogic.Skin.button))
{
if(!selectAll)
{
if(focusIndex < wingmen.Count)
{
func(wingmen[focusIndex], focusIndex);
}
}
else
{
for(int i = 0; i < wingmen.Count; i++)
{
func(wingmen[i], i);
}
}
}
buttonIndex++;
}
开发者ID:jediminer543,项目名称:BDArmory,代码行数:22,代码来源:ModuleWingCommander.cs
示例5: WrapCommandFunction
private bool WrapCommandFunction(Command command, CommandFunction function, bool doing)
{
try
{
m_currentCommnd = command;
return function(doing);
}
finally
{
m_currentCommnd = Command.Invalid;
}
}
开发者ID:sbambach,项目名称:ATF,代码行数:12,代码来源:SourceControlCommands.cs
示例6: CommandButton
void CommandButton(CommandFunction func, string buttonLabel, ref float buttonLine, float startY, float margin, float buttonGap, float buttonWidth, float buttonHeight, bool sendToWingmen, bool pressed, object data)
{
float yPos = startY + margin + ((buttonHeight + buttonGap) * buttonLine);
if(GUI.Button(new Rect(margin, yPos, buttonWidth, buttonHeight), buttonLabel, pressed ? HighLogic.Skin.box : HighLogic.Skin.button))
{
if(sendToWingmen)
{
if(wingmen.Count > 0)
{
foreach(var index in focusIndexes)
{
func(wingmen[index], index, data);
}
}
if(commandSelf)
{
foreach(var ai in vessel.FindPartModulesImplementing<BDModulePilotAI>())
{
func(ai, -1, data);
}
}
}
else
{
func(null, -1, null);
}
}
buttonLine++;
}
开发者ID:BahamutoD,项目名称:BDArmory,代码行数:31,代码来源:ModuleWingCommander.cs
示例7: RegisterCommandEx
public static void RegisterCommandEx(string name, CommandFunction<CCommand, int[], bool> action)
{
CRegistery.RegisterDelegate(name, action);
}
开发者ID:mswf,项目名称:game-a-week,代码行数:4,代码来源:Lunar.cs
示例8: RegisterCommand
/// <summary>
/// Add a command to the debugger with a specific name and help text.
/// </summary>
/// <param name="name">The name of the method in the debugger.</param>
/// <param name="help">The help text to display in the console for the function.</param>
/// <param name="function">The method to register.</param>
/// <param name="types">The types for the arguments.</param>
public void RegisterCommand(string name, string help, CommandFunction function, params CommandType[] types)
{
if (commands.ContainsKey(name)) return;
if (instantCommands.ContainsKey(name)) return;
commands.Add(name, new DebugCommand(function, types) { HelpDescription = help, Name = name });
}
开发者ID:holymoo,项目名称:OtterSpaceInvaders,代码行数:14,代码来源:Debugger.cs
示例9: RegisterInstantCommand
void RegisterInstantCommand(string name, string help, CommandFunction function, params CommandType[] types)
{
instantCommands.Add(name, new DebugCommand(function, types) { HelpDescription = help, Name = name });
}
开发者ID:holymoo,项目名称:OtterSpaceInvaders,代码行数:4,代码来源:Debugger.cs
示例10: RegisterInstantCommand
public void RegisterInstantCommand(CommandFunction function, params CommandType[] types) {
RegisterInstantCommand(function, types);
}
开发者ID:KrissLaCross,项目名称:BreakOut,代码行数:3,代码来源:Debugger.cs
示例11: CommandType
CommandType(string nam, CommandFunction fun, int pos, int lvl, LogType logged, bool shown, bool removeinvis, bool removehide, bool removemed, bool usePara, bool mustSpellOut)
{
Name = nam;
Function = fun;
MinLevel = lvl;
LoggingType = logged;
Show = shown;
BreakInvisibility = removeinvis;
BreakHide = removehide;
BreakMeditate = removemed;
MinPosition = pos;
CanUseWhenParalyzed = usePara;
MustSpellOut = mustSpellOut;
}
开发者ID:ramseur,项目名称:ModernMUD,代码行数:14,代码来源:CommandType.cs
注:本文中的CommandFunction类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论