本文整理汇总了C#中OpenMetaverse.DisconnectedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# DisconnectedEventArgs类的具体用法?C# DisconnectedEventArgs怎么用?C# DisconnectedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DisconnectedEventArgs类属于OpenMetaverse命名空间,在下文中一共展示了DisconnectedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DisconnectHandler
public static void DisconnectHandler(object sender, DisconnectedEventArgs e)
{
if (e.Reason == NetworkManager.DisconnectType.NetworkTimeout)
{
Console.WriteLine("Network connection timed out, disconnected");
}
else if (e.Reason == NetworkManager.DisconnectType.ServerInitiated)
{
Console.WriteLine("Server disconnected us: " + e.Message);
}
}
示例2: netcom_ClientDisconnected
private void netcom_ClientDisconnected(object sender, DisconnectedEventArgs e)
{
this.Close();
}
示例3: Network_OnDisconnected
private void Network_OnDisconnected(object sender, DisconnectedEventArgs e)
{
// Null out the cached fullName since it can change after logging
// in again (with a different account name or different login
// server but using the same GridClient object
fullName = null;
}
示例4: netcom_ClientDisconnected
void netcom_ClientDisconnected(object sender, DisconnectedEventArgs e)
{
if (InvokeRequired)
{
BeginInvoke(new MethodInvoker(Close));
}
else
{
Close();
}
}
示例5: Network_OnDisconnected
private void Network_OnDisconnected(object sender, DisconnectedEventArgs e)
{
if (RebakeScheduleTimer != null)
{
RebakeScheduleTimer.Dispose();
RebakeScheduleTimer = null;
}
if (AppearanceThread != null)
{
if (AppearanceThread.IsAlive)
{
AppearanceThread.Abort();
}
AppearanceThread = null;
AppearanceThreadRunning = 0;
}
}
示例6: Netcom_Disconnected
void Netcom_Disconnected(object sender, DisconnectedEventArgs e)
{
RefreshControls();
}
示例7: OnClientDisconnected
protected virtual void OnClientDisconnected(DisconnectedEventArgs e)
{
if (ClientDisconnected != null) ClientDisconnected(this, e);
}
示例8: netcom_ClientDisconnected
private void netcom_ClientDisconnected(object sender, DisconnectedEventArgs e)
{
RefreshControls();
}
示例9: Network_OnDisconnected
public void Network_OnDisconnected(object sender, DisconnectedEventArgs args)
{
// m_log.ErrorFormat("Fired Network_OnDisconnected");
// if (
// (args.Reason == NetworkManager.DisconnectType.SimShutdown
// || args.Reason == NetworkManager.DisconnectType.NetworkTimeout)
// && OnDisconnected != null)
if (
(args.Reason == NetworkManager.DisconnectType.ClientInitiated
|| args.Reason == NetworkManager.DisconnectType.ServerInitiated
|| args.Reason == NetworkManager.DisconnectType.NetworkTimeout)
&& OnDisconnected != null)
// if (OnDisconnected != null)
{
IsConnected = false;
OnDisconnected(this, EventType.DISCONNECTED);
}
}
示例10: Netcom_ClientDisconnected
void Netcom_ClientDisconnected(object sender, DisconnectedEventArgs e)
{
ParcelsDownloaded.Set();
}
示例11: Network_Disconnected
void Network_Disconnected(object sender, DisconnectedEventArgs e)
{
Logger.Log("*** BONED WE HAVE BEEN BOOTED ***", Helpers.LogLevel.Error);
Logger.Log(e.Message, Helpers.LogLevel.Error);
Logger.Log(e.Reason, Helpers.LogLevel.Error);
if (connected == true)
{
connected = false;
client.Network.Logout(); //force logout to clean up libomv
}
}
示例12: Netcom_ClientDisconnected
void Netcom_ClientDisconnected(object sender, DisconnectedEventArgs e)
{
if (InvokeRequired)
{
if (!instance.MonoRuntime || IsHandleCreated)
{
BeginInvoke(new MethodInvoker(() => Netcom_ClientDisconnected(sender, e)));
}
return;
}
if (UploadThread != null && UploadThread.IsAlive)
{
try
{
UploadThread.Abort();
}
catch { }
UploadThread = null;
Running = false;
}
UpdateButtons();
}
示例13: Netcom_ClientDisconnected
void Netcom_ClientDisconnected(object sender, DisconnectedEventArgs e)
{
if (InvokeRequired)
{
if (!instance.MonoRuntime || IsHandleCreated)
{
BeginInvoke(new MethodInvoker(() => Netcom_ClientDisconnected(sender, e)));
}
return;
}
if (instance.TabConsole.TabExists("objects"))
{
instance.TabConsole.Tabs["objects"].Close();
}
}
示例14: Network_OnDisconnected
// EVENT CALLBACK SECTION
void Network_OnDisconnected(object sender, DisconnectedEventArgs e)
{
var message = e.Message;
var reason = e.Reason;
try
{
if (message.Length > 0)
WriteLine("Disconnected from server. Reason is " + message + ". " + reason);
else
WriteLine("Disconnected from server. " + reason);
SendNetworkEvent("On-Network-Disconnected", reason, message);
}
catch (Exception ex)
{
LogException("Network_OnDisconnected", ex);
}
EnsureConnectedCheck(reason);
}
示例15: Network_Disconnected
public void Network_Disconnected(object sender, DisconnectedEventArgs e)
{
Hashtable item = new Hashtable();
item.Add("MessageType", "Disconnected");
item.Add("Reason", e.Reason);
item.Add("Message", e.Message);
enqueue(item);
}