本文整理汇总了C#中CommandManager类的典型用法代码示例。如果您正苦于以下问题:C# CommandManager类的具体用法?C# CommandManager怎么用?C# CommandManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CommandManager类属于命名空间,在下文中一共展示了CommandManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Game1
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
commandManager = new CommandManager();
interactiveMusic = new InteractiveMusic();
}
开发者ID:joe586,项目名称:Bullet-Rebound,代码行数:7,代码来源:Game1.cs
示例2: Players
public Players(CommandManager c)
{
this.c = c;
//CommandManager.AddTab(ParseTab, "help", "h");
c.AddCommand(TheEnd, null, "theend");
c.AddCommand(Position, "position", "pos", "coord", "coords", "cord");
c.AddCommand(Time, null, "time", "timeset", "settime");
c.AddCommand(Load, "load", "lag", "uptime", "l");
c.AddCommand(Die, "kill", "suicide", "killmyself", "kil", "death", "die");
c.AddCommand(Inbox.Read, "read");
c.AddCommand(Stat, "stat");
c.AddCommand(Donate, "donate", "donors", "donor", "doner", "donator", "dontae", "vip");
c.AddCommand(Motd, "motd", "welcome", "info");
c.AddCommand(Rules, "rulebook", "rules", "rule");
c.AddCommand(Version, "version", "ver");
c.AddCommand(Pardon, "pardon", "vote", "vot", "unban", "uban", "umbanned", "unbanned");
c.AddCommand(ToGreenRoom, "greenroom", "wait");
c.AddCommand(ToConstruct, "construct", "con", "cons");
c.AddCommand(ToHell, "hell", "hel");
c.AddCommand(ToRealWorld, "vanilla", "real", "back");
c.AddCommand(ToIsland, "island");
c.AddCommand(ToHardcore, "hardcore");
c.AddCommand(ToWarp, "warp");
c.AddCommand(LockChest, null, "lock", "lwc", "chest", "cprivate", "private", "lcpassword");
}
开发者ID:mctraveler,项目名称:MineSharp,代码行数:25,代码来源:Players.cs
示例3: Application_Start
protected void Application_Start()
{
var cs = ConnectionSettings.Create();
var endpoint = new IPEndPoint(IPAddress.Loopback, 1113);
var con = EventStoreConnection.Create(endpoint);
con.ConnectAsync();
var credentials = new EventStore.ClientAPI.SystemData.UserCredentials("admin", "changeit");
var adapter = new EventStoreAdapter(endpoint, credentials);
ProjectionManager = new ProjectionManager(endpoint, credentials, adapter);
ProjectionManager.Run();
CommandManager = new CommandManager(con);
//var binder = new DefaultModelBinder();
//ModelBinders.Binders.Add(typeof(DateTime), binder);
//ModelBinders.Binders.Add(typeof(DateTime?), binder);
AreaRegistration.RegisterAllAreas();
GlobalConfiguration.Configure(WebApiConfig.Register);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
开发者ID:valeriob,项目名称:MyBudget,代码行数:26,代码来源:Global.asax.cs
示例4: ConnectionManagerTester
/// <summary>
/// Constructor. Inicializa instancias de la clase ConnectionManagerTester
/// </summary>
public ConnectionManagerTester()
{
/*
* Primero se crea el CommandManager. Este gestiona los comandos de
* sistema como alive, busy, ready, etc. Ahorra trabajo.
* Adicionalmente se suscriben los eventos (apuntador a funcion)
* para manejar las notificaciones de la clase
*/
commandManager = new CommandManager();
commandManager.Started += new CommandManagerStatusChangedEventHandler(commandManager_Started);
commandManager.Stopped += new CommandManagerStatusChangedEventHandler(commandManager_Stopped);
commandManager.CommandReceived += new CommandReceivedEventHandler(commandManager_CommandReceived);
commandManager.ResponseReceived += new ResponseReceivedEventHandler(commandManager_ResponseReceived);
/*
* Ahora se inicializa el ConnectionManager. Bajo el esquema actual
* todas las aplicaciones son servidores y es el blackboard el que
* se conecta a ellas (asi solo es necesario configurar una
* aplicacion). Se le indica nombre del modulo, puerto de conexion
* y el gestor de comandos. El modulo y puerto deben ser
* configurados en el blackboard
*/
connectionManager = new ConnectionManager("TESTER", 2000, 2000, IPAddress.Loopback, commandManager);
connectionManager.Started += new ConnectionManagerStatusChangedEventHandler(connectionManager_Started);
connectionManager.Stopped += new ConnectionManagerStatusChangedEventHandler(connectionManager_Stopped);
connectionManager.ClientDisconnected += new TcpClientDisconnectedEventHandler(connectionManager_ClientDisconnected);
connectionManager.ClientConnected += new TcpClientConnectedEventHandler(connectionManager_ClientConnected);
// Configuro el reloj
sw = new System.Diagnostics.Stopwatch();
}
开发者ID:BioRoboticsUNAM,项目名称:Robotics,代码行数:34,代码来源:ConnectionManagerTester.cs
示例5: MoveTo
public MoveTo(CommandManager parent,Vector3 target)
{
m_target = target;
m_parent = parent;
//find the navagation agent and set the destination
m_parent.GetComponent<NavMeshAgent>().destination = m_target;
}
开发者ID:barcharcraz,项目名称:Zenith_Imperium,代码行数:7,代码来源:MoveTo.cs
示例6: Create
public HttpResponseMessage Create(FileDto fileDto)
{
CommandManager cm = new CommandManager();
cm.Send(new CreateCommand(Guid.NewGuid(), fileDto.Name, fileDto.CreateDate));
return new HttpResponseMessage(HttpStatusCode.OK);
}
开发者ID:yeulucay,项目名称:CqrsExample,代码行数:8,代码来源:FileController.cs
示例7: Help
public Help(CommandManager c)
{
this.c = c;
c.AddTab(ParseTab, "help", "h");
c.AddCommand(ParseCommandHelp, "help", "h");
c.AddCommand(ParseCommandChatHelp, "chathelp");
}
开发者ID:mctraveler,项目名称:MineSharp,代码行数:8,代码来源:Help.cs
示例8: OnCommandEvent
void OnCommandEvent( CommandManager.CommandEventData data )
{
data.LockInput();
FrameRateUtility.StartCoroutine( delay, () =>
{
Application.Quit();
});
}
开发者ID:hiroki-kitahara,项目名称:Shoooooooooooooting-kitahara,代码行数:8,代码来源:CommandEventQuitApplication.cs
示例9: GetCommand_ThrowsIfNoCommandFound
public void GetCommand_ThrowsIfNoCommandFound()
{
// Arrange
CommandManager cm = new CommandManager();
// Act and Assert
ExceptionAssert.Throws<CommandLineException>(() => cm.GetCommand("NoCommandByThisName"), "Unknown command: 'NoCommandByThisName'");
}
开发者ID:njannink,项目名称:sonarlint-vs,代码行数:8,代码来源:CommandManagerTests.cs
示例10: PluginExample
public PluginExample()
{
this.cmdMan = new CommandManager();
Engine engine = new Engine();
this.cmdMan.CommandExecuters.Add(new FactorialCommandExecuter(engine));
this.cmdMan.CommandExecuters.Add(new StatusCommandExecuter(engine));
this.gui = new FrmPluginExample();
}
开发者ID:BioRoboticsUNAM,项目名称:Blackboard,代码行数:8,代码来源:PluginExample.cs
示例11: Start
// Use this for initialization
void Start()
{
renderer.material.SetTexture ("_MainTex", switchOff); //Die Standardtextur wird auf aus gestellt
switchState = false; //Die Abfrage wird Standardmässig auf aus gestellt
cm = GameObject.FindGameObjectWithTag("GameController").GetComponent<CommandManager>();
//Es wird das GameObjekt mit dem Tag "GameController" gesucht und die Daten die es
//dank des Scripts CommandManager sammelt werden hier eingebunden
}
开发者ID:pbat3h12b,项目名称:Schnitzeljagd,代码行数:9,代码来源:Switch.cs
示例12: getInstance
public static CommandManager getInstance()
{
if ( _instance == null )
{
_instance = new CommandManager();
}
return _instance;
}
开发者ID:LostTemple1990,项目名称:TouHouExploding,代码行数:8,代码来源:CommandManager.cs
示例13: Main
public static void Main()
{
ICommandManager commandManager = new CommandManager();
IUserInterface userInterface = new ConsoleInterface();
IRequester requester = new Requester();
var engine = new GameEngine(userInterface, commandManager, requester);
engine.Run();
}
开发者ID:Martin-Andreev,项目名称:Web-Services-and-Cloud,代码行数:9,代码来源:BattleshipProgram.cs
示例14: CommandExecuter
/// <summary>
/// Initializes a new instance of CommandExecuter
/// </summary>
/// <param name="commandName">The name of the command that the CommandExecuter will execute</param>
/// <param name="commandManager">The CommandManager object that will handle the command executed by this CommandExecuter instance</param>
public CommandExecuter(string commandName, CommandManager commandManager)
{
this.commandName = commandName;
this.responseRequired = true;
SignatureBuilder sb = new SignatureBuilder();
sb.AddNewFromDelegate(new StringArrayEventHandler(this.DefaultParameterParser));
this.signature = sb.GenerateSignature(this.commandName);
//if (commandManager != null)
// commandManager.CommandExecuters.Add(this);
}
开发者ID:BioRoboticsUNAM,项目名称:Robotics,代码行数:15,代码来源:CommandExecuter.cs
示例15: RegisterCommand_AddsCommandToDictionary
public void RegisterCommand_AddsCommandToDictionary()
{
// Arrange
CommandManager cm = new CommandManager();
ICommand mockCommand = new MockCommand();
// Act
cm.RegisterCommand(mockCommand);
// Assert
Assert.Equal(1, cm.GetCommands().Count());
}
开发者ID:njannink,项目名称:sonarlint-vs,代码行数:10,代码来源:CommandManagerTests.cs
示例16: GetCommandOptions_ThrowsWhenOptionHasNoSetter
public void GetCommandOptions_ThrowsWhenOptionHasNoSetter()
{
// Arrange
CommandManager cm = new CommandManager();
ICommand cmd = new MockCommandBadOption();
cm.RegisterCommand(cmd);
string expectedErrorText = "[option] on 'NuGet.Test.NuGetCommandLine.CommandManagerTests+MockCommandBadOption.Message' is invalid without a setter.";
// Act & Assert
ExceptionAssert.Throws<InvalidOperationException>(() => cm.GetCommandOptions(cmd), expectedErrorText);
}
开发者ID:njannink,项目名称:sonarlint-vs,代码行数:10,代码来源:CommandManagerTests.cs
示例17: GetCommand_ReturnsCorrectCommand
public void GetCommand_ReturnsCorrectCommand()
{
// Arrange
CommandManager cm = new CommandManager();
ICommand expectedCommand = new MockCommand();
cm.RegisterCommand(expectedCommand);
// Act
ICommand actualCommand = cm.GetCommand("MockCommand");
// Assert
Assert.Equal(expectedCommand, actualCommand);
}
开发者ID:njannink,项目名称:sonarlint-vs,代码行数:11,代码来源:CommandManagerTests.cs
示例18: Execute
public void Execute(ICharacter caller, GameManager manager, CommandManager cm)
{
if (caller == null)
throw new ArgumentException();
if (manager == null)
throw new ArgumentException();
if (cm == null)
throw new ArgumentException();
cm.CreateStack();
manager.GoToNextCharacter();
cm.SetCurrent(manager.ActivePlayer);
}
开发者ID:Kavignon,项目名称:Augmented_Tactics,代码行数:12,代码来源:EndTurnCommand.cs
示例19: Start
//initialization
public void Start()
{
m_inp = Managers.GetInstance().GetInputManager();
m_cmanager = Managers.GetInstance().GetCommandManager();
m_bulletPool = Managers.GetInstance().GetBulletPoolManager().GetBulletPool(20, Managers.GetInstance().GetGameProperties().playerBulletPrefab);
m_moveTimer = m_cmanager.GetTimer();
m_isAlive = true;
m_explosion = transform.GetChild(0).gameObject;
m_sprite = GetComponent<SpriteRenderer>();
m_deathCounter = 0;
m_stillDead = false;
}
开发者ID:Abysice,项目名称:Time-Pigs-and-The-Ham-of-Destiny,代码行数:13,代码来源:PlayerController.cs
示例20: ChatCommands
public ChatCommands(CommandManager c)
{
c.AddCommand(TellAdmin, "telladmin", "admin");
c.AddCommand(Channel, "channel", "ch", "c");
c.AddCommand(Shout, "shout");
c.AddCommand(Prod, "push", "prod", "slap");
c.AddCommand(Firehose, "firehose");
c.AddCommand(Tell, "tell", "msg");
c.AddCommand(Timestamp, "timestamp");
c.AddCommand(Me, null, "me");
c.AddCommand(Chat.ResetChannel, "reset");
}
开发者ID:mctraveler,项目名称:MineSharp,代码行数:12,代码来源:ChatCommands.cs
注:本文中的CommandManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论