当前位置: 首页>>代码示例>>C#>>正文


C# FmdcEventArgs类代码示例

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


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

示例1: hubConnection_ProtocolChange

 void hubConnection_ProtocolChange(object sender, FmdcEventArgs e)
 {
     Hub hubConnection = sender as Hub;
     if (hubConnection != null)
     {
         hubConnection.Protocol.Update += new FmdcEventHandler(prot_Update);
     }
 }
开发者ID:musakasim,项目名称:flowlib,代码行数:8,代码来源:ReceiveMainChatOrPMFromHub.cs

示例2: hubConnection_ProtocolChange

 void hubConnection_ProtocolChange(object sender, FmdcEventArgs e)
 {
     Hub hubConnection = sender as Hub;
     IProtocol prot = e.Data as IProtocol;
     if (prot != null)
     {
         prot.Update -= hubConnection_Update;
     }
     hubConnection.Protocol.Update += new FmdcEventHandler(hubConnection_Update);
 }
开发者ID:musakasim,项目名称:flowlib,代码行数:10,代码来源:PassiveSearch.cs

示例3: hubConnection_ProtocolChange

 void hubConnection_ProtocolChange(object sender, FmdcEventArgs e)
 {
     Hub hubConnection = sender as Hub;
     IProtocol prot = e.Data as IProtocol;
     if (prot != null)
     {
         prot.MessageReceived -= Protocol_MessageReceived;
         prot.MessageToSend -= Protocol_MessageToSend;
         prot.Update -= hubConnection_Update;
     }
     hubConnection.Protocol.MessageReceived += new FlowLib.Events.FmdcEventHandler(Protocol_MessageReceived2);
     hubConnection.Protocol.MessageToSend += new FlowLib.Events.FmdcEventHandler(Protocol_MessageToSend);
     hubConnection.Protocol.Update += new FlowLib.Events.FmdcEventHandler(hubConnection_Update);
 }
开发者ID:musakasim,项目名称:flowlib,代码行数:14,代码来源:ActiveSearch.cs

示例4: protRcvd

 public void protRcvd(object sender, FmdcEventArgs e)
 {
     Hub hub = (sender as Hub);
     switch(e.Action)
     {
     case Actions.StatusChange:
         HubStatus status = (e.Data as HubStatus);
         if(status.Code.Equals("Connected"))
         {
             this.hublist.Add(hub.Name, hub);
         }
         else if(status.Code.Equals("Disconnected"))
         {
             this.hublist.Remove(hub.Name);
         }
         break;
     }
 }
开发者ID:BGCX261,项目名称:zpoc3-svn-to-git,代码行数:18,代码来源:Core.cs

示例5: prot_Update

        void prot_Update(object sender, FmdcEventArgs e)
        {
            switch (e.Action)
            {
                case Actions.MainMessage:
                    MainMessage msgMain = e.Data as MainMessage;
                    System.Console.Write(string.Format("[{0}] <{1}> {2}\r\n",
                        System.DateTime.Now.ToLongTimeString(),
                        msgMain.From,
                        msgMain.Content));
                    break;

                case Actions.PrivateMessage:
                    PrivateMessage msgPriv = e.Data as PrivateMessage;
                    System.Console.Write(string.Format("[{0}] PM:{1}\r\n",
                        System.DateTime.Now.ToLongTimeString(),
                        msgPriv.Content));
                    break;
            }
        }
开发者ID:musakasim,项目名称:flowlib,代码行数:20,代码来源:ReceiveMainChatOrPMFromHub.cs

示例6: Protocol_RequestTransfer

 void Protocol_RequestTransfer(object sender, FmdcEventArgs e)
 {
     ITransfer trans = sender as ITransfer;
     TransferRequest req = e.Data as TransferRequest;
     req = transferManager.GetTransferReq(req.Key);
     if (trans != null && req != null)
     {
         e.Handled = true;
         e.Data = req;
         transferManager.RemoveTransferReq(req.Key);
     }
 }
开发者ID:musakasim,项目名称:flowlib,代码行数:12,代码来源:ActiveDownloadFilelistFromUser.cs

示例7: PassiveConnectToUser_UpdateBase

 void PassiveConnectToUser_UpdateBase(object sender, FmdcEventArgs e)
 {
 }
开发者ID:musakasim,项目名称:flowlib,代码行数:3,代码来源:ActiveDownloadFilelistFromUser.cs

示例8: OnUpdate

 void OnUpdate(object sender, FmdcEventArgs e)
 {
 }
开发者ID:BGCX261,项目名称:zpoc3-svn-to-git,代码行数:3,代码来源:UPnPProtocol.cs

示例9: OnMessageReceived

 void OnMessageReceived(object sender, FmdcEventArgs e)
 {
 }
开发者ID:BGCX261,项目名称:zpoc3-svn-to-git,代码行数:3,代码来源:UPnPProtocol.cs

示例10: OnSend

 public bool OnSend(IConMessage msg)
 {
     FmdcEventArgs e = new FmdcEventArgs(Actions.CommandOutgoing, msg);
     MessageToSend(con, e);
     if (!e.Handled)
     {
         return true;
     }
     return false;
 }
开发者ID:BGCX261,项目名称:zpoc3-svn-to-git,代码行数:10,代码来源:UPnPProtocol.cs

示例11: ActOnInMessage

 public void ActOnInMessage(IConMessage message)
 {
     UdpMessage msg = message as UdpMessage;
     if (msg != null)
     {
         // Device Found
         UPnPDevice device = ParseSSDP(msg.Raw, msg.RemoteAddress);
         FmdcEventArgs e = new FmdcEventArgs(0, device);
         Update(con, e);
         if (!e.Handled)
         {
             string key = device.Information.Sender.ToString();
             // Do device exist in our list?
             if (this.con.RootDevices.ContainsKey(key))
             {
                 // Don't add this device. It already exist in our list.
             }
             else
             {
                 // We don't have this device yet. Add it.
                 con.RootDevices.Add(key, device);
                 FmdcEventArgs e2 = new FmdcEventArgs(Actions.UPnPRootDeviceFound, device);
                 Update(con, e2);
             }
         }
     }
 }
开发者ID:BGCX261,项目名称:zpoc3-svn-to-git,代码行数:27,代码来源:UPnPProtocol.cs

示例12: hubConnection_ProtocolChange

 void hubConnection_ProtocolChange(object sender, FmdcEventArgs e)
 {
     Hub hubConnection = sender as Hub;
     if (hubConnection != null)
     {
         hubConnection.Protocol.Update += new FmdcEventHandler(prot_Update);
         if (Program.DEBUG)
         {
             hubConnection.Protocol.MessageReceived += new FmdcEventHandler(Protocol_MessageReceived);
             hubConnection.Protocol.MessageToSend += new FmdcEventHandler(Protocol_MessageToSend);
         }
     }
 }
开发者ID:oscarmike67,项目名称:seriebot,代码行数:13,代码来源:DcBot.cs

示例13: hubConnection_ConnectionStatusChange

        void hubConnection_ConnectionStatusChange(object sender, FmdcEventArgs e)
        {
            switch (e.Action)
            {
                case TcpConnection.Connecting:
                    Program.WriteLine("*** Hub Connecting...");
                    break;
                case TcpConnection.Connected:
                    Program.WriteLine("*** Hub Connected.");
                    break;
                case TcpConnection.Disconnected:
                    Program.Write("*** Hub Disconnected.");
                    Program.Write(e.Data);
                    Program.WriteLine();
                    break;
                default:
                    Program.Write("*** Hub has Unknown connection status.");
                    Program.Write(e.Data);
                    Program.WriteLine();
                    break;
            }

            Program.WriteLine();
        }
开发者ID:oscarmike67,项目名称:seriebot,代码行数:24,代码来源:DcBot.cs

示例14: downloadManager_DownloadCompleted

 void downloadManager_DownloadCompleted(object sender, FmdcEventArgs e)
 {
     DownloadItem item = sender as DownloadItem;
     Source source = e.Data as Source;
     DownloadHandler.TryHandleDownload(this, item, source);
 }
开发者ID:oscarmike67,项目名称:seriebot,代码行数:6,代码来源:DcBot.cs

示例15: d_SegmentStarted

 void d_SegmentStarted(object sender, FmdcEventArgs e)
 {
     SegmentStarted(sender, e);
 }
开发者ID:musakasim,项目名称:flowlib,代码行数:4,代码来源:DownloadManager.cs


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