Example #1
0
 public void FrmLogin_UnLoad(object sender, EventArgs e)
 {
     if (E_NetworkConfig.Socket != null && E_NetworkConfig.Socket.IsConnected)
     {
         E_NetworkSend.SendLeaveGame();
     }
     E_Loop.CloseEditor();
 }
Example #2
0
        public static void CloseEditor()
        {
            E_NetworkSend.SendLeaveGame();

            E_Globals.GameDestroyed = true;
            E_Globals.GameStarted   = false;

            Application.Exit();
        }
Example #3
0
 public void BtnLogin_Click(object sender, EventArgs e)
 {
     if (E_NetworkConfig.Socket.IsConnected)
     {
         if (IsLoginLegal(txtLogin.Text, txtPassword.Text))
         {
             E_NetworkSend.SendEditorLogin(txtLogin.Text, txtPassword.Text);
         }
     }
 }
 internal static void DestroyNetwork()
 {
     // Calling a disconnect is not necessary when using destroy network as
     // Dispose already calls it and cleans up the memory internally.
     // But if our Socket is alive, lets try to send one last thing to the server
     if (Socket != null && Socket.IsConnected)
     {
         E_NetworkSend.SendLeaveGame();
     }
     Socket.Dispose();
 }
Example #5
0
        public static void CloseEditor()
        {
            if (E_NetworkConfig.Socket != null && E_NetworkConfig.Socket.IsConnected)
            {
                E_NetworkSend.SendLeaveGame();
            }

            E_Globals.GameDestroyed = true;
            E_Globals.GameStarted   = false;

            Application.Exit();
        }
Example #6
0
 public void CmbMapList_SelectedIndexChanged(object sender, EventArgs e)
 {
     E_NetworkSend.SendEditorRequestMap(cmbMapList.SelectedIndex + 1);
 }
Example #7
0
 public void BtnClassEditor_Click(object sender, EventArgs e)
 {
     E_NetworkSend.SendRequestClasses();
     E_NetworkSend.SendRequestEditClass();
 }
Example #8
0
 public void BtnAnimationEditor_Click(object sender, EventArgs e)
 {
     E_NetworkSend.SendRequestAnimations();
     E_NetworkSend.SendRequestEditAnimation();
 }
Example #9
0
 public void BtnShopEditor_Click(object sender, EventArgs e)
 {
     E_NetworkSend.SendRequestShops();
     E_NetworkSend.SendRequestEditShop();
 }
Example #10
0
 public void BtnSkillEditor_Click(object sender, EventArgs e)
 {
     E_NetworkSend.SendRequestSkills();
     E_NetworkSend.SendRequestEditSkill();
 }
Example #11
0
 public void BtnNPCEditor_Click(object sender, EventArgs e)
 {
     E_NetworkSend.SendRequestNPCS();
     E_NetworkSend.SendRequestEditNpc();
 }
Example #12
0
 public void BtnResourceEditor_Click(object sender, EventArgs e)
 {
     E_NetworkSend.SendRequestResources();
     E_NetworkSend.SendRequestEditResource();
 }
Example #13
0
 public void BtnMapEditor_Click(object sender, EventArgs e)
 {
     E_NetworkSend.SendEditorRequestMap(1);
 }