예제 #1
0
        void Network_LoginProgress(object sender, LoginProgressEventArgs e)
        {
            if (e.Status == LoginStatus.Success)
            {
                IsLoggedIn = true;
                client.Self.RequestBalance();
                if (CanSyncInvoke)
                {
                    NetcomSync.BeginInvoke(new ClientConnectedRaise(OnClientConnected), new object[] { EventArgs.Empty });
                }
                else
                {
                    OnClientConnected(EventArgs.Empty);
                }
            }

            if (e.Status == LoginStatus.Failed)
            {
                instance.MarkEndExecution();
            }

            LoginProgressEventArgs ea = new LoginProgressEventArgs(e.Status, e.Message, string.Empty);

            if (CanSyncInvoke)
            {
                NetcomSync.BeginInvoke(new OnClientLoginRaise(OnClientLoginStatus), e);
            }
            else
            {
                OnClientLoginStatus(e);
            }
        }
예제 #2
0
 void Self_AlertMessage(object sender, AlertMessageEventArgs e)
 {
     if (CanSyncInvoke)
     {
         NetcomSync.BeginInvoke(new OnAlertMessageRaise(OnAlertMessageReceived), new object[] { e });
     }
     else
     {
         OnAlertMessageReceived(e);
     }
 }
예제 #3
0
 void Self_MoneyBalance(object sender, BalanceEventArgs e)
 {
     if (CanSyncInvoke)
     {
         NetcomSync.BeginInvoke(new OnMoneyBalanceRaise(OnMoneyBalanceUpdated), new object[] { e });
     }
     else
     {
         OnMoneyBalanceUpdated(e);
     }
 }
예제 #4
0
 private void Self_ChatFromSimulator(object sender, ChatEventArgs e)
 {
     if (CanSyncInvoke)
     {
         NetcomSync.BeginInvoke(new OnChatRaise(OnChatReceived), new object[] { e });
     }
     else
     {
         OnChatReceived(e);
     }
 }
예제 #5
0
        void Network_LoggedOut(object sender, LoggedOutEventArgs e)
        {
            IsLoggedIn = false;

            if (CanSyncInvoke)
            {
                NetcomSync.BeginInvoke(new OnClientLogoutRaise(OnClientLoggedOut), new object[] { EventArgs.Empty });
            }
            else
            {
                OnClientLoggedOut(EventArgs.Empty);
            }
        }
예제 #6
0
        void Network_Disconnected(object sender, DisconnectedEventArgs e)
        {
            IsLoggedIn = false;
            instance.MarkEndExecution();

            if (CanSyncInvoke)
            {
                NetcomSync.BeginInvoke(new OnClientDisconnectRaise(OnClientDisconnected), new object[] { e });
            }
            else
            {
                OnClientDisconnected(e);
            }
        }
예제 #7
0
        void Self_TeleportProgress(object sender, TeleportEventArgs e)
        {
            if (e.Status == TeleportStatus.Finished || e.Status == TeleportStatus.Failed)
            {
                IsTeleporting = false;
            }

            if (CanSyncInvoke)
            {
                NetcomSync.BeginInvoke(new OnTeleportStatusRaise(OnTeleportStatusChanged), new object[] { e });
            }
            else
            {
                OnTeleportStatusChanged(e);
            }
        }