private void buttonDestroy_Click(object sender, EventArgs e) { WinFormsAppWorld.WorldDestroy(); if (ExampleEngineApp.Instance != null) { ExampleEngineApp.Instance.Client_DisconnectFromServer(); } }
protected override void OnDestroy() { WinFormsAppWorld.WorldDestroy(); Client_DisconnectFromServer(); base.OnDestroy(); instance = null; }
private void buttonConnect_Click(object sender, EventArgs e) { WinFormsAppWorld.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); }
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 ); WinFormsAppWorld.WorldDestroy(); Client_DisconnectFromServer(); } break; case NetworkConnectionStatuses.Connecting: break; case NetworkConnectionStatuses.Connected: break; } }
void Client_EntitySystemService_WorldDestroy(EntitySystemClientNetworkService sender, bool newMapWillBeLoaded) { WinFormsAppWorld.WorldDestroy(); }
private void closeToolStripMenuItem_Click(object sender, EventArgs e) { WinFormsAppWorld.WorldDestroy(); }