private void okbtn_Click(object sender, EventArgs e) { //TO!DO Language.ReloadLangs(); //2015.07.05. - Lényegében csak az ablakokat frissíti PackManager.Save <Theme>(SelectedTheme); //2015.07.03. this.Close(); //2015.05.24. }
private void SaveEmoticonIfChanged() { bool save = false; if (pictureBox1.Image == null || textBox1.Text == "") { return; } if (SelectedEmoticon >= flowLayoutPanel1.Controls.Count) { flowLayoutPanel1.Controls.Add(new PictureBox { Tag = flowLayoutPanel1.Controls.Count, Image = pictureBox1.Image.Clone() as Image, Size = pictureBox1.Image.Size }); flowLayoutPanel1.Controls[flowLayoutPanel1.Controls.Count - 1].Click += Emoticons_Click; if (SelectedTextFormat == -1) { TextFormat.TextFormats.Add(PackManager.Add <TextFormat>(domainUpDown1.Text + ".npack")); selectedtextformat = TextFormat.TextFormats.Count - 1; save = true; } var emoticon = new Emoticon(textBox1.Text); emoticon.Image = new Bitmap(pictureBox1.Image); //2015.07.05. TextFormat.TextFormats[SelectedTextFormat].Emoticons.Add(emoticon); } else if (textBox1.Text != initialtext || imagechanged) { TextFormat.TextFormats[SelectedTextFormat].Emoticons[SelectedEmoticon].Value = textBox1.Text; TextFormat.TextFormats[SelectedTextFormat].Emoticons[SelectedEmoticon].Image.Dispose(); //2015.07.05. TextFormat.TextFormats[SelectedTextFormat].Emoticons[SelectedEmoticon].Image = new Bitmap(pictureBox1.Image); //2015.07.05. initialtext = textBox1.Text; imagechanged = false; (flowLayoutPanel1.Controls[SelectedEmoticon] as PictureBox).Image = pictureBox1.Image; save = true; } if (save) { PackManager.Save <TextFormat>(TextFormat.TextFormats[SelectedTextFormat]); } }