當前位置: 首頁>>代碼示例>>C#>>正文


C# ComponentModel.HandledEventArgs類代碼示例

本文整理匯總了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;
 }
開發者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


注:本文中的System.ComponentModel.HandledEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。