/// <summary>
        /// Método do botão 2, mouse up. (CANCEL)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private static void Button_2_MouseUp(object sender, EngineEventArgs e)
        {
            EngineMultimedia.Play(EngineSoundEnum.Click);

            TextBox.CursorEnabled = false;
            Visible = false;
        }
Exemplo n.º 2
0
        public void Down_Click(object sender, EventArgs e)
        {
            EngineMultimedia.Play(EngineSoundEnum.Close);

            if (Index < Message.Count - 1)
            {
                Index++;
            }
        }
Exemplo n.º 3
0
        public void Up_Click(object sender, EventArgs e)
        {
            EngineMultimedia.Play(EngineSoundEnum.Close);

            if (Index > 0)
            {
                Index--;
            }
        }
Exemplo n.º 4
0
        public static bool InitializeEngine()
        {
            NetworkSocket.Initialize();

            try {
                background            = new EngineObject($"{Common.Configuration.GamePath}/Data/background.png", 1024, 768);
                background.Size       = new Size2(1024, 768);
                background.SourceRect = new Rectangle(0, 0, 1024, 720);


                DataManager.Initialize();

                WindowTalent.Initialize();
                WindowSkill.Initialize();
                WindowPin.Initialize();
                WindowCash.Initialize();
                WindowMail.Initialize();
                WindowSelectedItem.Initialize();
                WindowViewTalent.Initialize();

                //Carrega os dados de classe.
                ClasseManager.Initialize();

                //Carrega os dados de npc.
                NpcManager.OpenData();

                //Carrega os dados de experiencia
                ExperienceManager.Read();

                EngineFont.Initialize();
                EngineMessageBox.Initialize();
                EngineInputBox.Initialize();
                EngineMultimedia.Initialize();

                WindowLogin.Initialize();
                WindowServer.Initialize();
                WindowCharacter.Initialize();
                WindowNewCharacter.Initialize();

                WindowGame.Initialize();

                WindowViewItem.Initialize();

                //    EngineMultimedia.PlayMusic(0, true);

                GameState = 1;
                return(true);
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
                return(false);
            }
        }
Exemplo n.º 5
0
        public static void Exit()
        {
            EngineMultimedia.StopMultimedia();

            //limpa o endereço do servidor
            if (NetworkSocket.Connected(NetworkSocketEnum.GameServer))
            {
                Common.Configuration.IPAddress[(int)NetworkSocketEnum.GameServer].Clear();
                NetworkSocket.Disconnect(NetworkSocketEnum.GameServer);
            }

            Application.Exit();
        }
Exemplo n.º 6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private static void Button_MouseUp(object sender, EventArgs e)
        {
            if (Enabled == false)
            {
                return;
            }

            EngineMultimedia.Play(EngineSoundEnum.Click);
            Visible = false;

            if (Common.Configuration.Disconnected)
            {
                Environment.Exit(0);
            }
        }
        /// <summary>
        /// Método do botão 1, mouse up. (OK)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private static void Button_1_MouseUp(object sender, EngineEventArgs e)
        {
            EngineMultimedia.Play(EngineSoundEnum.Click);

            //delete
            if (InputBoxAction == EngineInputBoxAction.Delete)
            {
                if (TextBox.Text.CompareTo("deletar") == 0)
                {
                    WorldPacket.DeleteCharacter((byte)WindowCharacter.SelectedIndex);
                    Hide();
                }
                else
                {
                    TextBox.Text = string.Empty;
                }
            }
        }
Exemplo n.º 8
0
        public static bool InitializeEngine()
        {
            NetworkSocket.Initialize();

            try {
                background            = new EngineObject($"{Environment.CurrentDirectory}\\Data\\background.png", 1024, 768);
                background.Size       = new Size2(1024, 768);
                background.SourceRect = new Rectangle(0, 0, 1024, 768);

                //Carrega os dados de classe.
                ClasseManager.Initialize();

                //Carrega os dados de experiencia
                ExperienceManager.Experience.Initialize("experience");

                EngineFont.Initialize();
                EngineMessageBox.Initialize();
                EngineInputBox.Initialize();
                EngineMultimedia.Initialize();

                WindowLogin.Initialize();
                WindowServer.Initialize();
                WindowCharacter.Initialize();
                WindowNewCharacter.Initialize();

                WindowGame.Initialize();

                SpriteManager.Initialize();

                EngineMultimedia.PlayMusic(0, true);

                GameState = 1;
                return(true);
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
                return(false);
            }
        }