Ejemplo n.º 1
0
 private void buttonDestroy_Click(object sender, RoutedEventArgs e)
 {
     WPFAppWorld.WorldDestroy();
     if (ExampleEngineApp.Instance != null)
     {
         ExampleEngineApp.Instance.Client_DisconnectFromServer();
     }
 }
Ejemplo n.º 2
0
        protected override void OnDestroy()
        {
            WPFAppWorld.WorldDestroy();
            Client_DisconnectFromServer();

            base.OnDestroy();
            instance = null;
        }
Ejemplo n.º 3
0
        private void buttonConnect_Click(object sender, RoutedEventArgs e)
        {
            WPFAppWorld.WorldDestroy();
            if (ExampleEngineApp.Instance != null)
            {
                ExampleEngineApp.Instance.Client_DisconnectFromServer();
            }

            string host     = textBoxServerAddress.Text;
            int    port     = 56565;
            string userName = textBoxUserName.Text;
            string password = "";

            ExampleEngineApp.Instance.TryConnectToServer(host, port, userName, password);
        }
Ejemplo n.º 4
0
        void Client_ConnectionStatusChanged(NetworkClient sender, NetworkConnectionStatuses status)
        {
            switch (status)
            {
            case NetworkConnectionStatuses.Disconnected:
            {
                //string text = "Unable to connect";
                //if( sender.DisconnectionReason != "" )
                //   text += ". " + sender.DisconnectionReason;
                //Log.Error( text );

                WPFAppWorld.WorldDestroy();
                Client_DisconnectFromServer();
            }
            break;

            case NetworkConnectionStatuses.Connecting:
                break;

            case NetworkConnectionStatuses.Connected:
                break;
            }
        }
Ejemplo n.º 5
0
 private void buttonDestroy_Click(object sender, RoutedEventArgs e)
 {
     WPFAppWorld.WorldDestroy();
 }
Ejemplo n.º 6
0
 void Client_EntitySystemService_WorldDestroy(EntitySystemClientNetworkService sender,
                                              bool newMapWillBeLoaded)
 {
     WPFAppWorld.WorldDestroy();
 }