本文整理汇总了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);
}
}
示例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);
}
示例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);
}
示例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;
}
}
示例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;
}
}
示例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);
}
}
示例7: PassiveConnectToUser_UpdateBase
void PassiveConnectToUser_UpdateBase(object sender, FmdcEventArgs e)
{
}
示例8: OnUpdate
void OnUpdate(object sender, FmdcEventArgs e)
{
}
示例9: OnMessageReceived
void OnMessageReceived(object sender, FmdcEventArgs e)
{
}
示例10: OnSend
public bool OnSend(IConMessage msg)
{
FmdcEventArgs e = new FmdcEventArgs(Actions.CommandOutgoing, msg);
MessageToSend(con, e);
if (!e.Handled)
{
return true;
}
return false;
}
示例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);
}
}
}
}
示例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);
}
}
}
示例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();
}
示例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);
}
示例15: d_SegmentStarted
void d_SegmentStarted(object sender, FmdcEventArgs e)
{
SegmentStarted(sender, e);
}