OSDN Git Service

UpdateDialog に [今後このダイアログを表示しない] チェックボックスを追加
[opentween/open-tween.git] / OpenTween / UpdateDialog.cs
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) 2012      tigree4th <crerish@gmail.com>
8 //           (c) 2012      kim_upsilon (@kim_upsilon) <https://upsilo.net/~upsilon/>
9 // All rights reserved.
10 // 
11 // This file is part of OpenTween.
12 // 
13 // This program is free software; you can redistribute it and/or modify it
14 // under the terms of the GNU General Public License as published by the Free
15 // Software Foundation; either version 3 of the License, or (at your option)
16 // any later version.
17 // 
18 // This program is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 // for more details. 
22 // 
23 // You should have received a copy of the GNU General Public License along
24 // with this program. If not, see <http://www.gnu.org/licenses/>, or write to
25 // the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
26 // Boston, MA 02110-1301, USA.
27
28 using System;
29 using System.Collections.Generic;
30 using System.ComponentModel;
31 using System.Data;
32 using System.Drawing;
33 using System.Linq;
34 using System.Text;
35 using System.Windows.Forms;
36
37 namespace OpenTween
38 {
39     public partial class UpdateDialog : OTBaseForm
40     {
41         public string SummaryText
42         {
43             get { return this.LabelSummary.Text; }
44             set { this.LabelSummary.Text = value; }
45         }
46
47         public string DetailsText
48         {
49             get { return this.TextDetail.Text; }
50             set { this.TextDetail.Text = value; }
51         }
52
53         public bool DoNotShowAgain { get; private set; }
54
55         public UpdateDialog()
56         {
57             InitializeComponent();
58
59             this.PictureBox1.Image = SystemIcons.Question.ToBitmap();
60             this.Text = MyCommon.ReplaceAppName(this.Text);
61         }
62
63         private void YesButton_Click(object sender, EventArgs e)
64         {
65             this.Close();
66         }
67
68         private void NoButton_Click(object sender, EventArgs e)
69         {
70             this.Close();
71         }
72
73         private void UpdateDialog_Shown(object sender, EventArgs e)
74         {
75             // デフォルトではテキストが全選択されるため抑制
76             this.TextDetail.SelectionLength = 0;
77         }
78
79         private void UpdateDialog_FormClosed(object sender, FormClosedEventArgs e)
80         {
81             this.DoNotShowAgain = this.DoNotShowAgainCheckBox.Checked;
82         }
83     }
84 }