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


C# OpenMetaverse.DisconnectedEventArgs類代碼示例

本文整理匯總了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);
     }
 }
開發者ID:TooheyPaneer,項目名稱:libopenmetaverse,代碼行數:11,代碼來源:PacketDump.cs

示例2: netcom_ClientDisconnected

 private void netcom_ClientDisconnected(object sender, DisconnectedEventArgs e)
 {
     this.Close();
 }
開發者ID:NullProjects,項目名稱:METAbolt,代碼行數:4,代碼來源:Teleport.cs

示例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;
 }
開發者ID:RavenB,項目名稱:gridsearch,代碼行數:7,代碼來源:AgentManager.cs

示例4: netcom_ClientDisconnected

 void netcom_ClientDisconnected(object sender, DisconnectedEventArgs e)
 {
     if (InvokeRequired)
     {
         BeginInvoke(new MethodInvoker(Close));
     }
     else
     {
         Close();
     }
 }
開發者ID:TooheyPaneer,項目名稱:radegast,代碼行數:11,代碼來源:Profile.cs

示例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;
            }
        }
開發者ID:CCIR,項目名稱:libopenmetaverse,代碼行數:18,代碼來源:AppearanceManager.cs

示例6: Netcom_Disconnected

 void Netcom_Disconnected(object sender, DisconnectedEventArgs e)
 {
     RefreshControls();
 }
開發者ID:RevolutionSmythe,項目名稱:radegast,代碼行數:4,代碼來源:GroupIMTabWindow.cs

示例7: OnClientDisconnected

 protected virtual void OnClientDisconnected(DisconnectedEventArgs e)
 {
     if (ClientDisconnected != null) ClientDisconnected(this, e);
 }
開發者ID:Booser,項目名稱:radegast,代碼行數:4,代碼來源:NetComEvents.cs

示例8: netcom_ClientDisconnected

 private void netcom_ClientDisconnected(object sender, DisconnectedEventArgs e)
 {
     RefreshControls();
 }
開發者ID:NullProjects,項目名稱:METAbolt,代碼行數:4,代碼來源:IMTabWindow.cs

示例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);
            }
        }
開發者ID:4U2NV,項目名稱:opensim,代碼行數:20,代碼來源:Bot.cs

示例10: Netcom_ClientDisconnected

 void Netcom_ClientDisconnected(object sender, DisconnectedEventArgs e)
 {
     ParcelsDownloaded.Set();
 }
開發者ID:RevolutionSmythe,項目名稱:radegast,代碼行數:4,代碼來源:ParcelInfoCommand.cs

示例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
            }
        }
開發者ID:RavenB,項目名稱:gridsearch,代碼行數:12,代碼來源:GridConn.cs

示例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();
        }
開發者ID:nooperation,項目名稱:radegast,代碼行數:24,代碼來源:MeshUploadConsole.cs

示例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();
            }
        }
開發者ID:RevolutionSmythe,項目名稱:radegast,代碼行數:16,代碼來源:ObjectsConsole.cs

示例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);
        }
開發者ID:drzo,項目名稱:opensim4opencog,代碼行數:20,代碼來源:BotConnection.cs

示例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);
 }
開發者ID:AlphaStaxLLC,項目名稱:AjaxLife,代碼行數:8,代碼來源:Events.cs


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