• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ComponentModel.HandledEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.ComponentModel.HandledEventArgs的典型用法代码示例。如果您正苦于以下问题:C# HandledEventArgs类的具体用法?C# HandledEventArgs怎么用?C# HandledEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



HandledEventArgs类属于System.ComponentModel命名空间,在下文中一共展示了HandledEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnStartHardMode

 public static bool OnStartHardMode()
 {
     if (StartHardMode == null)
         return false;
     HandledEventArgs handledEventArgs = new HandledEventArgs();
     WorldHooks.StartHardMode(handledEventArgs);
     return handledEventArgs.Handled;
 }
开发者ID:Jakky89,项目名称:TerrariaAPI-Server,代码行数:8,代码来源:WorldHooks.cs


示例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;
     }
 }
开发者ID:kamchung322,项目名称:eXpand,代码行数:8,代码来源:MinimizeOnCloseController.cs


示例3: OnSmashAltar

 public static bool OnSmashAltar()
 {
     if (SmashAltar == null)
         return false;
     HandledEventArgs handledEventArgs = new HandledEventArgs();
     WorldHooks.SmashAltar(handledEventArgs);
     return handledEventArgs.Handled;
 }
开发者ID:Icehawk78,项目名称:TerrariaAPI-Server,代码行数:8,代码来源:WorldHooks.cs


示例4: OnDrawInterface

 public static bool OnDrawInterface(SpriteBatch batch)
 {
     if (DrawInterface == null)
         return false;
     var args = new HandledEventArgs();
     DrawInterface(batch, args);
     return args.Handled;
 }
开发者ID:Jaex,项目名称:Terraria-API,代码行数:8,代码来源:DrawHooks.cs


示例5: OnGetKeyState

        public static bool OnGetKeyState()
        {
            if (GetKeyState == null)
                return false;

            var args = new HandledEventArgs();
            GetKeyState(args);
            return args.Handled;
        }
开发者ID:Jaex,项目名称:Terraria-API,代码行数:9,代码来源:GameHooks.cs


示例6: OnCommand

        public static bool OnCommand(string cmd)
        {
            if (Command == null)
                return false;

            var args = new HandledEventArgs();
            Command(cmd, args);
            return args.Handled;
        }
开发者ID:Pondredia,项目名称:Terraria-API,代码行数:9,代码来源:ServerHooks.cs


示例7: OnSaveWorld

        public static bool OnSaveWorld(bool resettime)
        {
            if (SaveWorld == null)
                return false;

            var args = new HandledEventArgs();
            SaveWorld(resettime, args);
            return args.Handled;
        }
开发者ID:Pondredia,项目名称:Terraria-API,代码行数:9,代码来源:WorldHooks.cs


示例8: OnJoin

        public static bool OnJoin(int whoami)
        {
            if (Join == null)
                return false;

            var args = new HandledEventArgs();
            Join(whoami, args);
            return args.Handled;
        }
开发者ID:Pondredia,项目名称:Terraria-API,代码行数:9,代码来源:ServerHooks.cs


示例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;
        }
开发者ID:Pondredia,项目名称:Terraria-API,代码行数:9,代码来源:ServerHooks.cs


示例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;
 }
开发者ID:Jakky89,项目名称:TerrariaAPI-Server,代码行数:10,代码来源:WorldHooks.cs


示例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;
 }
开发者ID:pfchrono,项目名称:Toaria,代码行数:10,代码来源:ServerHooks.cs


示例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;
 }
开发者ID:kmcfate,项目名称:TerrariaAPI-Server,代码行数:10,代码来源:ClientHooks.cs


示例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;
 }
开发者ID:pfchrono,项目名称:Toaria,代码行数:10,代码来源:NetHooks.cs


示例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;
 }
开发者ID:pfchrono,项目名称:Toaria,代码行数:10,代码来源:ServerHooks.cs


示例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;
 }
开发者ID:pfchrono,项目名称:Toaria,代码行数:10,代码来源:ServerHooks.cs


示例16: OnGreetPlayer

 public static bool OnGreetPlayer(int who)
 {
     if (NetHooks.GreetPlayer == null)
     {
         return false;
     }
     HandledEventArgs handledEventArgs = new HandledEventArgs();
     NetHooks.GreetPlayer(who, handledEventArgs);
     return handledEventArgs.Handled;
 }
开发者ID:pfchrono,项目名称:Toaria,代码行数:10,代码来源:NetHooks.cs


示例17: OnGetKeyState

 public static bool OnGetKeyState()
 {
     if (GameHooks.GetKeyState == null)
     {
         return false;
     }
     HandledEventArgs handledEventArgs = new HandledEventArgs();
     GameHooks.GetKeyState(handledEventArgs);
     return handledEventArgs.Handled;
 }
开发者ID:pfchrono,项目名称:Toaria,代码行数:10,代码来源:GameHooks.cs


示例18: OnChat

        public static bool OnChat(ref string msg)
        {
            if (Chat != null)
            {
                HandledEventArgs args = new HandledEventArgs();
                Chat(ref msg, args);
                return args.Handled;
            }

            return false;
        }
开发者ID:Jaex,项目名称:Terraria-API,代码行数:11,代码来源:ClientHooks.cs


示例19: OnCustomWriteSecuredLogonParameters

 void OnCustomWriteSecuredLogonParameters(object sender, HandledEventArgs handledEventArgs) {
     var webApplication = ((WebApplication) sender);
     handledEventArgs.Handled = true;
     if (HttpContext.Current == null) {
         Tracing.Tracer.LogWarning("Cannot add a Forms cookie to the Respose.Cookies collection: the HttpContext.Current property is null");
         return;
     }
     var logonParametersAsString = LogonParametersAsString();
     var cookie = HttpCookie(logonParametersAsString, webApplication);
     HttpContext.Current.Response.Cookies.Add(cookie);
 }
开发者ID:derjabkin,项目名称:eXpand,代码行数:11,代码来源:Authentication.cs


示例20: OnSaveWorld

 /// <summary>
 /// SaveWorld event handler which notifies users that the server may lag
 /// </summary>
 public void OnSaveWorld(bool resettime = false, HandledEventArgs e = null)
 {
     // Protect against internal errors causing save failures
     // These can be caused by an unexpected error such as a bad or out of date plugin
     try
     {
         TShock.Utils.Broadcast("Saving world. Momentary lag might result from this.", Color.Red);
     }
     catch (Exception ex)
     {
         Log.Error("World saved notification failed");
         Log.Error(ex.ToString());
     }
 }
开发者ID:kalaikaqu,项目名称:TShock,代码行数:17,代码来源:SaveManager.cs



注:本文中的System.ComponentModel.HandledEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ComponentModel.IContainer类代码示例发布时间:2022-05-26
下一篇:
C# ComponentModel.EventHandlerList类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap