コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (tbSearch.Text == "")
            {
                MessageBox.Show("작가를 입력해주세요.", "Custom Recommendation", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            int score = 0;

            if (metroTextBox1.Text == "" || !int.TryParse(metroTextBox1.Text, out score))
            {
                MessageBox.Show("올바른 개수를 입력하세요.", "Custom Recommendation", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            parent.Post(() => parent.RequestAddArtists(tbSearch.Text, metroTextBox1.Text));
            DialogResult = DialogResult.OK;
            Close();
        }