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.
28 using System.Collections.Generic;
29 using System.ComponentModel;
34 using System.Windows.Forms;
36 namespace OpenTween.Setting.Panel
38 public partial class GetPeriodPanel : SettingPanelBase
40 public GetPeriodPanel()
42 InitializeComponent();
45 private void UserstreamPeriod_Validating(object sender, CancelEventArgs e)
50 prd = int.Parse(UserstreamPeriod.Text);
54 MessageBox.Show(Properties.Resources.UserstreamPeriod_ValidatingText1);
59 if (prd < 0 || prd > 60)
61 MessageBox.Show(Properties.Resources.UserstreamPeriod_ValidatingText1);
67 private void TimelinePeriod_Validating(object sender, CancelEventArgs e)
72 prd = int.Parse(TimelinePeriod.Text);
76 MessageBox.Show(Properties.Resources.TimelinePeriod_ValidatingText1);
81 if (prd != 0 && (prd < 15 || prd > 6000))
83 MessageBox.Show(Properties.Resources.TimelinePeriod_ValidatingText2);
89 private void ReplyPeriod_Validating(object sender, CancelEventArgs e)
94 prd = int.Parse(ReplyPeriod.Text);
98 MessageBox.Show(Properties.Resources.TimelinePeriod_ValidatingText1);
103 if (prd != 0 && (prd < 15 || prd > 6000))
105 MessageBox.Show(Properties.Resources.TimelinePeriod_ValidatingText2);
111 private void DMPeriod_Validating(object sender, CancelEventArgs e)
116 prd = int.Parse(DMPeriod.Text);
120 MessageBox.Show(Properties.Resources.DMPeriod_ValidatingText1);
125 if (prd != 0 && (prd < 15 || prd > 6000))
127 MessageBox.Show(Properties.Resources.DMPeriod_ValidatingText2);
133 private void PubSearchPeriod_Validating(object sender, CancelEventArgs e)
138 prd = int.Parse(PubSearchPeriod.Text);
142 MessageBox.Show(Properties.Resources.PubSearchPeriod_ValidatingText1);
147 if (prd != 0 && (prd < 30 || prd > 6000))
149 MessageBox.Show(Properties.Resources.PubSearchPeriod_ValidatingText2);
154 private void ListsPeriod_Validating(object sender, CancelEventArgs e)
159 prd = int.Parse(ListsPeriod.Text);
163 MessageBox.Show(Properties.Resources.DMPeriod_ValidatingText1);
168 if (prd != 0 && (prd < 15 || prd > 6000))
170 MessageBox.Show(Properties.Resources.DMPeriod_ValidatingText2);
176 private void UserTimeline_Validating(object sender, CancelEventArgs e)
181 prd = int.Parse(UserTimelinePeriod.Text);
185 MessageBox.Show(Properties.Resources.DMPeriod_ValidatingText1);
190 if (prd != 0 && (prd < 15 || prd > 6000))
192 MessageBox.Show(Properties.Resources.DMPeriod_ValidatingText2);