コード例 #1
0
        private void label_Npc_creator_Click(object sender, EventArgs e)
        {
            Close();
            NPC_Creator npc = new NPC_Creator(form_MM);

            npc.Show();
        }
コード例 #2
0
ファイル: Form_MainMenu.cs プロジェクト: huhulz/SpawnCreator
        //------------------------------------]


        private void label5_Click(object sender, EventArgs e)
        {
            Hide();
            NPC_Creator npc = new NPC_Creator(this);

            npc.Show();
        }
コード例 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            Form_MainMenu mainmenu = new Form_MainMenu();
            var           npc      = new NPC_Creator();

            if (textBox5.Text == "")
            {
                MessageBox.Show("Option Text should not be empty", "Error");
                return;
            }

            MySqlConnection connection = new MySqlConnection(
                "datasource=" + form_MM.GetHost() + ";" +
                "port=" + form_MM.GetPort() + ";" +
                "username="******";" +
                "password="******"INSERT INTO " + form_MM.GetWorldDB() + ".gossip_menu_option " +
                                 "(menu_id, id, option_icon, option_text, OptionBroadcastTextID, option_id, npc_option_npcflag, " +
                                 "action_menu_id, action_poi_id, box_coded, box_money, box_text, BoxBroadcastTextID, VerifiedBuild) \n" +
                                 "VALUES (" +
                                 textBox61.Text + ", " +            // menu_id
                                 numericUpDown1.Text + ", " +       // id
                                 textBox_option_icon.Text + ", '" + // option_icon
                                 textBox5.Text + "', " +            // option_text
                                 textBox4.Text + ", " +             // OptionBroadcastTextID
                                 textBox_option_id.Text + ", " +    // option_id
                                 textBox7.Text + ", " +             // npc_option_npcflag
                                 textBox6.Text + ", " +             // action_menu_id
                                 textBox3.Text + ", " +             // action_poi_id
                                 textBox2.Text + ", " +             // box_coded
                                 textBox10.Text + ", '" +           // box_money
                                 textBox9.Text + "', " +            // box_text
                                 textBox11.Text + ", " +            // BoxBroadcastTextID
                                 textBox12.Text + ");";             // VerifiedBuild


            MySqlCommand command = new MySqlCommand(insertQuery, connection);

            try
            {
                connection.Open();
                command.ExecuteNonQuery();
                label9.Visible = true;
            }
            catch (MySqlException ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                connection.Close();
            }
        }
コード例 #4
0
        public NpcFlag()
        {
            InitializeComponent();

            NPC_Creator npc = new NPC_Creator();

            if (checkedListBox1.GetItemCheckState(5) == CheckState.Checked)
            {
                npc.textBox13.Enabled = true;
            }
        }
コード例 #5
0
ファイル: MySql_Connect.cs プロジェクト: huhulz/SpawnCreator
        //========================================================================================================

        public static void SelectMax_WorldDB_creature_template()
        {
            string      query = "SELECT max(entry) + 1 FROM creature_template;";
            NPC_Creator npc   = new NPC_Creator();

            _conn    = new MySql.Data.MySqlClient.MySqlConnection(ConnectionString_WorldDB);
            _command = new MySqlCommand(query, _conn);

            try
            {
                _conn.Open();
                //_command.ExecuteNonQuery();
                npc.NUD_Entry.Text = _command.ExecuteScalar().ToString();
                _command.Connection.Close();
            }
            catch (MySqlException ex)
            {
                MessageBox.Show(ex.Message);
            }
        }