コード例 #1
0
ファイル: SLNetComEvents.cs プロジェクト: SObS/SLeek
 protected virtual void OnTeleportStatusChanged(TeleportStatusEventArgs e)
 {
     if (TeleportStatusChanged != null) TeleportStatusChanged(this, e);
 }
コード例 #2
0
ファイル: SLNetCom.cs プロジェクト: SObS/SLeek
        private void Self_OnTeleport(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags)
        {
            if (status == AgentManager.TeleportStatus.Finished || status == AgentManager.TeleportStatus.Failed)
                teleporting = false;

            TeleportStatusEventArgs ea = new TeleportStatusEventArgs(message, status, flags);

            if (netcomSync != null)
                netcomSync.BeginInvoke(new OnTeleportStatusRaise(OnTeleportStatusChanged), new object[] { ea });
            else
                OnTeleportStatusChanged(ea);
        }
コード例 #3
0
ファイル: Teleport.cs プロジェクト: SObS/SLeek
        private void netcom_TeleportStatusChanged(object sender, TeleportStatusEventArgs e)
        {
            switch (e.Status)
            {
                case AgentManager.TeleportStatus.Start:
                case AgentManager.TeleportStatus.Progress:
                    lblTeleportStatus.Text = e.Message;
                    break;

                case AgentManager.TeleportStatus.Failed:
                    RefreshControls();

                    MessageBox.Show(e.Message, "Teleport", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    break;

                case AgentManager.TeleportStatus.Finished:
                    this.Close();
                    break;
            }
        }