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()); } }
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(); }