本文整理汇总了C#中System.ComponentModel.HandledEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# HandledEventArgs类的具体用法?C# HandledEventArgs怎么用?C# HandledEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HandledEventArgs类属于System.ComponentModel命名空间,在下文中一共展示了HandledEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnStartHardMode
public static bool OnStartHardMode()
{
if (StartHardMode == null)
return false;
HandledEventArgs handledEventArgs = new HandledEventArgs();
WorldHooks.StartHardMode(handledEventArgs);
return handledEventArgs.Handled;
}
示例2: OnCanClose
private void OnCanClose(object sender, HandledEventArgs handledEventArgs){
if (!handledEventArgs.Handled){
bool handled = Frame.Context == TemplateContext.ApplicationWindow &&((IModelOptionsMinimizeOnCloseOptions) Application.Model.Options).MinimizeOnClose;
handledEventArgs.Handled = handled;
if (handled)
_closeWindowController.FormClosing += CloseWindowControllerOnFormClosing;
}
}
示例3: OnSmashAltar
public static bool OnSmashAltar()
{
if (SmashAltar == null)
return false;
HandledEventArgs handledEventArgs = new HandledEventArgs();
WorldHooks.SmashAltar(handledEventArgs);
return handledEventArgs.Handled;
}
示例4: OnDrawInterface
public static bool OnDrawInterface(SpriteBatch batch)
{
if (DrawInterface == null)
return false;
var args = new HandledEventArgs();
DrawInterface(batch, args);
return args.Handled;
}
示例5: OnGetKeyState
public static bool OnGetKeyState()
{
if (GetKeyState == null)
return false;
var args = new HandledEventArgs();
GetKeyState(args);
return args.Handled;
}
示例6: OnCommand
public static bool OnCommand(string cmd)
{
if (Command == null)
return false;
var args = new HandledEventArgs();
Command(cmd, args);
return args.Handled;
}
示例7: OnSaveWorld
public static bool OnSaveWorld(bool resettime)
{
if (SaveWorld == null)
return false;
var args = new HandledEventArgs();
SaveWorld(resettime, args);
return args.Handled;
}
示例8: OnJoin
public static bool OnJoin(int whoami)
{
if (Join == null)
return false;
var args = new HandledEventArgs();
Join(whoami, args);
return args.Handled;
}
示例9: OnChat
public static bool OnChat(messageBuffer msg, int whoami, string text)
{
if (Chat == null)
return false;
var args = new HandledEventArgs();
Chat(msg, whoami, text, args);
return args.Handled;
}
示例10: OnSaveWorld
public static bool OnSaveWorld(bool resettime)
{
if (WorldHooks.SaveWorld == null)
{
return false;
}
HandledEventArgs handledEventArgs = new HandledEventArgs();
WorldHooks.SaveWorld(resettime, handledEventArgs);
return handledEventArgs.Handled;
}
示例11: OnJoin
public static bool OnJoin(int whoami)
{
if (ServerHooks.Join == null)
{
return false;
}
HandledEventArgs handledEventArgs = new HandledEventArgs();
ServerHooks.Join(whoami, handledEventArgs);
return handledEventArgs.Handled;
}
示例12: OnChat
public static bool OnChat(ref string msg)
{
if (ClientHooks.Chat != null)
{
HandledEventArgs handledEventArgs = new HandledEventArgs();
ClientHooks.Chat(ref msg, handledEventArgs);
return handledEventArgs.Handled;
}
return false;
}
示例13: OnSendBytes
public static bool OnSendBytes(ServerSock socket, byte[] buffer, int offset, int count)
{
if (NetHooks.SendBytes == null)
{
return false;
}
HandledEventArgs handledEventArgs = new HandledEventArgs();
NetHooks.SendBytes(socket, buffer, offset, count, handledEventArgs);
return handledEventArgs.Handled;
}
示例14: OnCommand
public static bool OnCommand(string cmd)
{
if (ServerHooks.Command == null)
{
return false;
}
HandledEventArgs handledEventArgs = new HandledEventArgs();
ServerHooks.Command(cmd, handledEventArgs);
return handledEventArgs.Handled;
}
示例15: OnChat
public static bool OnChat(messageBuffer msg, int whoami, string text)
{
if (ServerHooks.Chat == null)
{
return false;
}
HandledEventArgs handledEventArgs = new HandledEventArgs();
ServerHooks.Chat(msg, whoami, text, handledEventArgs);
return handledEventArgs.Handled;
}