1 // OpenTween - Client of Twitter
2 // Copyright (c) 2007-2011 kiri_feather (@kiri_feather) <kiri.feather@gmail.com>
3 // (c) 2008-2011 Moz (@syo68k)
4 // (c) 2008-2011 takeshik (@takeshik) <http://www.takeshik.org/>
5 // (c) 2010-2011 anis774 (@anis774) <http://d.hatena.ne.jp/anis774/>
6 // (c) 2010-2011 fantasticswallow (@f_swallow) <http://twitter.com/f_swallow>
7 // (c) 2014 kim_upsilon (@kim_upsilon) <https://upsilo.net/~upsilon/>
8 // All rights reserved.
10 // This file is part of OpenTween.
12 // This program is free software; you can redistribute it and/or modify it
13 // under the terms of the GNU General Public License as published by the Free
14 // Software Foundation; either version 3 of the License, or (at your option)
17 // This program is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 // You should have received a copy of the GNU General Public License along
23 // with this program. If not, see <http://www.gnu.org/licenses/>, or write to
24 // the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
25 // Boston, MA 02110-1301, USA.
30 using System.Collections.Generic;
31 using System.ComponentModel;
36 using System.Windows.Forms;
38 namespace OpenTween.Setting.Panel
40 public partial class FontPanel2 : SettingPanelBase
43 => this.InitializeComponent();
45 public void LoadConfig(SettingLocal settingLocal)
47 this.lblSelf.BackColor = settingLocal.ColorSelf;
48 this.lblAtSelf.BackColor = settingLocal.ColorAtSelf;
49 this.lblTarget.BackColor = settingLocal.ColorTarget;
50 this.lblAtTarget.BackColor = settingLocal.ColorAtTarget;
51 this.lblAtFromTarget.BackColor = settingLocal.ColorAtFromTarget;
52 this.lblAtTo.BackColor = settingLocal.ColorAtTo;
53 this.lblInputBackcolor.BackColor = settingLocal.ColorInputBackcolor;
54 this.lblInputFont.ForeColor = settingLocal.ColorInputFont;
55 this.lblInputFont.Font = settingLocal.FontInputFont;
56 this.lblListBackcolor.BackColor = settingLocal.ColorListBackcolor;
59 public void SaveConfig(SettingLocal settingLocal)
61 settingLocal.ColorSelf = this.lblSelf.BackColor;
62 settingLocal.ColorAtSelf = this.lblAtSelf.BackColor;
63 settingLocal.ColorTarget = this.lblTarget.BackColor;
64 settingLocal.ColorAtTarget = this.lblAtTarget.BackColor;
65 settingLocal.ColorAtFromTarget = this.lblAtFromTarget.BackColor;
66 settingLocal.ColorAtTo = this.lblAtTo.BackColor;
67 settingLocal.ColorInputBackcolor = this.lblInputBackcolor.BackColor;
68 settingLocal.ColorInputFont = this.lblInputFont.ForeColor;
69 settingLocal.ColorListBackcolor = this.lblListBackcolor.BackColor;
70 settingLocal.FontInputFont = this.lblInputFont.Font;
73 private void ButtonBackToDefaultFontColor2_Click(object sender, EventArgs e)
75 this.lblInputFont.ForeColor = Color.FromKnownColor(System.Drawing.KnownColor.ControlText);
76 this.lblInputFont.Font = System.Drawing.SystemFonts.DefaultFont;
78 this.lblSelf.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.AliceBlue);
80 this.lblAtSelf.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.AntiqueWhite);
82 this.lblTarget.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.LemonChiffon);
84 this.lblAtTarget.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.LavenderBlush);
86 this.lblAtFromTarget.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.Honeydew);
88 this.lblInputBackcolor.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.LemonChiffon);
90 this.lblAtTo.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.Pink);
92 this.lblListBackcolor.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.Window);
95 private void btnSelf_Click(object sender, EventArgs e)
96 => this.ShowBackColorDialog(this.lblSelf);
98 private void btnAtSelf_Click(object sender, EventArgs e)
99 => this.ShowBackColorDialog(this.lblAtSelf);
101 private void btnTarget_Click(object sender, EventArgs e)
102 => this.ShowBackColorDialog(this.lblTarget);
104 private void btnAtTarget_Click(object sender, EventArgs e)
105 => this.ShowBackColorDialog(this.lblAtTarget);
107 private void btnAtFromTarget_Click(object sender, EventArgs e)
108 => this.ShowBackColorDialog(this.lblAtFromTarget);
110 private void btnAtTo_Click(object sender, EventArgs e)
111 => this.ShowBackColorDialog(this.lblAtTo);
113 private void btnListBack_Click(object sender, EventArgs e)
114 => this.ShowBackColorDialog(this.lblListBackcolor);
116 private void btnInputBackcolor_Click(object sender, EventArgs e)
117 => this.ShowBackColorDialog(this.lblInputBackcolor);
119 private void btnInputFont_Click(object sender, EventArgs e)
120 => this.ShowFontDialog(this.lblInputFont);