예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Emoji newemoji = new Emoji(pathTextBox.Text, keywordTextBox.Text, seriesTextBox.Text, targetTextBox.Text, 0, false);

            try
            {
                EmojiService.AddEmoji(newemoji);
                MessageBox.Show("添加成功");
                pictureBox1.Image   = null;
                pathTextBox.Text    = "";
                keywordTextBox.Text = "";
                seriesTextBox.Text  = "";
                targetTextBox.Text  = "";
            }catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
예제 #2
0
파일: AddForm.cs 프로젝트: SpriteSay/DouTu
        private void button1_Click(object sender, EventArgs e)
        {
            Emoji newemoji = new Emoji(pathTextBox.Text, keywordTextBox.Text, cmbSeries.Text, cmbTarget.Text, 0, false);

            try
            {
                EmojiService.AddEmoji(newemoji);
                MessageBox.Show("添加成功");
                pictureBox1.Image   = null;
                pathTextBox.Text    = "";
                keywordTextBox.Text = "";
            }catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            //MainForm mm = new MainForm();
            // mm.ShowEmojis(MainForm.emojiList);
            //((MainForm)this.Owner).Refresh();
            this.Close();
        }