Пример #1
0
        private void PbSelectID2_Click(object sender, EventArgs e)
        {
            ItemPicker itemPicker = new ItemPicker();

            if (itemPicker.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            tbRange2.Text = Convert.ToString(itemPicker.ItemIndex);
        }
Пример #2
0
        private void PbSelectID1_Click(object sender, EventArgs e) //dethunter12 add 6/10/2018
        {
            ItemPicker itemPicker = new ItemPicker();

            if (itemPicker.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            tbRange1.Text = Convert.ToString(itemPicker.ItemIndex);
        }
Пример #3
0
        private void btnAddItems_Click(object sender, EventArgs e)
        {
            try
            {
                ItemPicker itemPicker = new ItemPicker(); //dethunter12 add
                if (itemPicker.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                int ItemIDx;
                ItemIDx = itemPicker.ItemIndex;
                databaseHandle.SendQueryMySql(Host, User, Password, Database, "INSERT INTO t_moonstone_reward (a_type, a_giftindex) VALUES ('" + MoonstoneID + "'," + "'" + ItemIDx + "')");
            }
            catch
            {
                int num = (int)MessageBox.Show("Duplicated ItemID isn't allowed.", "Error");
            }
            dgItems.Rows.Clear();
            LoadDG(MoonstoneID);
            int index = dgItems.Rows.Count - 1;

            dgItems.Rows[index].Selected            = true;
            dgItems.FirstDisplayedScrollingRowIndex = index;
        }