1 ' Tween - 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>
9 ' This file is part of Tween.
11 ' This program is free software; you can redistribute it and/or modify it
12 ' under the terms of the GNU General Public License as published by the Free
13 ' Software Foundation; either version 3 of the License, or (at your option)
16 ' This program is distributed in the hope that it will be useful, but
17 ' WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 ' or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 ' You should have received a copy of the GNU General Public License along
22 ' with this program. If not, see <http://www.gnu.org/licenses/>, or write to
23 ' the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
24 ' Boston, MA 02110-1301, USA.
26 Imports System.Threading
28 Public Class AppendSettingDialog
30 Private Shared _instance As New AppendSettingDialog
32 Private _MytimelinePeriod As Integer
33 Private _MyDMPeriod As Integer
34 Private _MyPubSearchPeriod As Integer
35 Private _MyListsPeriod As Integer
36 Private _MyUserTimelinePeriod As Integer
37 Private _MyLogDays As Integer
38 Private _MyLogUnit As LogUnitEnum
39 Private _MyReaded As Boolean
40 Private _MyIconSize As IconSizes
41 Private _MyStatusText As String
42 Private _MyRecommendStatusText As String
43 Private _MyUnreadManage As Boolean
44 Private _MyPlaySound As Boolean
45 Private _MyOneWayLove As Boolean
46 Private _fntUnread As Font
47 Private _clUnread As Color
48 Private _fntReaded As Font
49 Private _clReaded As Color
50 Private _clFav As Color
51 Private _clOWL As Color
52 Private _clRetweet As Color
53 Private _fntDetail As Font
54 Private _clSelf As Color
55 Private _clAtSelf As Color
56 Private _clTarget As Color
57 Private _clAtTarget As Color
58 Private _clAtFromTarget As Color
59 Private _clAtTo As Color
60 Private _clInputBackcolor As Color
61 Private _clInputFont As Color
62 Private _fntInputFont As Font
63 Private _clListBackcolor As Color
64 Private _clDetailBackcolor As Color
65 Private _clDetail As Color
66 Private _clDetailLink As Color
67 Private _MyNameBalloon As NameBalloonEnum
68 Private _MyPostCtrlEnter As Boolean
69 Private _MyPostShiftEnter As Boolean
70 Private _usePostMethod As Boolean
71 Private _countApi As Integer
72 Private _countApiReply As Integer
73 Private _browserpath As String
74 Private _MyUseRecommendStatus As Boolean
75 Private _MyDispUsername As Boolean
76 Private _MyDispLatestPost As DispTitleEnum
77 Private _MySortOrderLock As Boolean
78 Private _MyMinimizeToTray As Boolean
79 Private _MyCloseToExit As Boolean
80 Private _MyTinyUrlResolve As Boolean
81 Private _MyProxyType As HttpConnection.ProxyType
82 Private _MyProxyAddress As String
83 Private _MyProxyPort As Integer
84 Private _MyProxyUser As String
85 Private _MyProxyPassword As String
86 Private _MyPeriodAdjust As Boolean
87 Private _MyStartupVersion As Boolean
88 Private _MyStartupFollowers As Boolean
89 Private _MyRestrictFavCheck As Boolean
90 Private _MyAlwaysTop As Boolean
91 Private _MyUrlConvertAuto As Boolean
92 Private _MyOutputz As Boolean
93 Private _MyOutputzKey As String
94 Private _MyOutputzUrlmode As OutputzUrlmode
95 Private _MyNicoms As Boolean
96 Private _MyUnreadStyle As Boolean
97 Private _MyDateTimeFormat As String
98 Private _MyDefaultTimeOut As Integer
99 Private _MyLimitBalloon As Boolean
100 Private _MyPostAndGet As Boolean
101 Private _MyReplyPeriod As Integer
102 Private _MyAutoShortUrlFirst As UrlConverter
103 Private _MyTabIconDisp As Boolean
104 Private _MyReplyIconState As REPLY_ICONSTATE
105 Private _MyReadOwnPost As Boolean
106 Private _MyGetFav As Boolean
107 Private _MyMonoSpace As Boolean
108 Private _MyReadOldPosts As Boolean
109 Private _MyUseSsl As Boolean
110 Private _MyBitlyId As String
111 Private _MyBitlyPw As String
112 Private _MyShowGrid As Boolean
113 Private _MyUseAtIdSupplement As Boolean
114 Private _MyUseHashSupplement As Boolean
115 Private _MyLanguage As String
116 Private _MyIsOAuth As Boolean
117 Private _MyTwitterApiUrl As String
118 Private _MyTwitterSearchApiUrl As String
119 Private _MyPreviewEnable As Boolean
120 Private _MoreCountApi As Integer
121 Private _FirstCountApi As Integer
122 Private _MyUseAdditonalCount As Boolean
123 Private _SearchCountApi As Integer
124 Private _FavoritesCountApi As Integer
125 Private _UserTimelineCountApi As Integer
126 Private _ListCountApi As Integer
127 Private _MyRetweetNoConfirm As Boolean
128 Private _MyUserstreamStartup As Boolean
129 Private _MyUserstreamPeriod As Integer
130 Private _MyOpenUserTimeline As Boolean
132 Private _ValidationError As Boolean = False
133 Private _MyEventNotifyEnabled As Boolean
134 Private _MyEventNotifyFlag As EVENTTYPE
135 Private _isMyEventNotifyFlag As EVENTTYPE
136 Private _MyForceEventNotify As Boolean
137 Private _MyFavEventUnread As Boolean
138 Private _MyTranslateLanguage As String
139 Private _soundfileListup As Boolean = False
140 Private _MyEventSoundFile As String
142 Private Sub TreeViewSetting_BeforeSelect(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewCancelEventArgs) Handles TreeViewSetting.BeforeSelect
143 If Me.TreeViewSetting.SelectedNode Is Nothing Then Exit Sub
144 Dim pnl = DirectCast(Me.TreeViewSetting.SelectedNode.Tag, Panel)
145 If pnl Is Nothing Then Exit Sub
150 Private Sub TreeViewSetting_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeViewSetting.AfterSelect
151 If e.Node Is Nothing Then Exit Sub
152 Dim pnl = DirectCast(e.Node.Tag, Panel)
153 If pnl Is Nothing Then Exit Sub
158 'Private Sub ToggleNodeChange(ByVal node As TreeNode)
159 ' If node Is Nothing Then Exit Sub
160 ' TreeViewSetting.BeginUpdate()
161 ' If node.IsExpanded Then
166 ' TreeViewSetting.EndUpdate()
169 'Private Sub TreeViewSetting_DrawNode(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawTreeNodeEventArgs) Handles TreeViewSetting.DrawNode
170 ' e.DrawDefault = True
171 ' If (e.State And TreeNodeStates.Selected) = TreeNodeStates.Selected Then
172 ' Dim pnl = DirectCast(e.Node.Tag, Panel)
173 ' If pnl Is Nothing Then Exit Sub
174 ' If _curPanel IsNot Nothing Then
175 ' If pnl.Name <> _curPanel.Name Then
176 ' _curPanel.Enabled = False
177 ' _curPanel.Visible = False
187 'Private Sub TreeViewSetting_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TreeViewSetting.MouseDown
188 ' Dim info As TreeViewHitTestInfo = TreeViewSetting.HitTest(e.X, e.Y)
189 ' If CBool((info.Location And TreeViewHitTestLocations.Label)) Then
190 ' ToggleNodeChange(info.Node)
194 Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
195 If TweenMain.IsNetworkAvailable() AndAlso _
196 (ComboBoxAutoShortUrlFirst.SelectedIndex = UrlConverter.Bitly OrElse ComboBoxAutoShortUrlFirst.SelectedIndex = UrlConverter.Jmp) AndAlso _
197 (Not String.IsNullOrEmpty(TextBitlyId.Text) OrElse Not String.IsNullOrEmpty(TextBitlyPw.Text)) Then
198 If Not BitlyValidation(TextBitlyId.Text, TextBitlyPw.Text) Then
199 MessageBox.Show(My.Resources.SettingSave_ClickText1)
200 _ValidationError = True
201 TreeViewSetting.SelectedNode.Name = "TweetActNode" ' 動作タブを選択
205 _ValidationError = False
208 _ValidationError = False
210 If Me.Username.Focused OrElse Me.Password.Focused Then
211 If Not Authorize() Then
212 _ValidationError = True
217 _MyUserstreamPeriod = CType(Me.UserstreamPeriod.Text, Integer)
218 _MyUserstreamStartup = Me.StartupUserstreamCheck.Checked
219 _MyIsOAuth = AuthOAuthRadio.Checked
220 _MytimelinePeriod = CType(TimelinePeriod.Text, Integer)
221 _MyDMPeriod = CType(DMPeriod.Text, Integer)
222 _MyPubSearchPeriod = CType(PubSearchPeriod.Text, Integer)
223 _MyListsPeriod = CType(ListsPeriod.Text, Integer)
224 _MyReplyPeriod = CType(ReplyPeriod.Text, Integer)
225 _MyUserTimelinePeriod = CType(UserTimelinePeriod.Text, Integer)
227 _MyReaded = StartupReaded.Checked
228 Select Case IconSize.SelectedIndex
230 _MyIconSize = IconSizes.IconNone
232 _MyIconSize = IconSizes.Icon16
234 _MyIconSize = IconSizes.Icon24
236 _MyIconSize = IconSizes.Icon48
238 _MyIconSize = IconSizes.Icon48_2
240 _MyStatusText = StatusText.Text
241 _MyPlaySound = PlaySnd.Checked
242 _MyUnreadManage = UReadMng.Checked
243 _MyOneWayLove = OneWayLv.Checked
245 _fntUnread = lblUnread.Font '未使用
246 _clUnread = lblUnread.ForeColor
247 _fntReaded = lblListFont.Font 'リストフォントとして使用
248 _clReaded = lblListFont.ForeColor
249 _clFav = lblFav.ForeColor
250 _clOWL = lblOWL.ForeColor
251 _clRetweet = lblRetweet.ForeColor
252 _fntDetail = lblDetail.Font
253 _clSelf = lblSelf.BackColor
254 _clAtSelf = lblAtSelf.BackColor
255 _clTarget = lblTarget.BackColor
256 _clAtTarget = lblAtTarget.BackColor
257 _clAtFromTarget = lblAtFromTarget.BackColor
258 _clAtTo = lblAtTo.BackColor
259 _clInputBackcolor = lblInputBackcolor.BackColor
260 _clInputFont = lblInputFont.ForeColor
261 _clListBackcolor = lblListBackcolor.BackColor
262 _clDetailBackcolor = lblDetailBackcolor.BackColor
263 _clDetail = lblDetail.ForeColor
264 _clDetailLink = lblDetailLink.ForeColor
265 _fntInputFont = lblInputFont.Font
266 Select Case cmbNameBalloon.SelectedIndex
268 _MyNameBalloon = NameBalloonEnum.None
270 _MyNameBalloon = NameBalloonEnum.UserID
272 _MyNameBalloon = NameBalloonEnum.NickName
275 Select Case ComboBoxPostKeySelect.SelectedIndex
277 _MyPostShiftEnter = True
278 _MyPostCtrlEnter = False
280 _MyPostCtrlEnter = True
281 _MyPostShiftEnter = False
283 _MyPostCtrlEnter = False
284 _MyPostShiftEnter = False
286 _usePostMethod = False
287 _countApi = CType(TextCountApi.Text, Integer)
288 _countApiReply = CType(TextCountApiReply.Text, Integer)
289 _browserpath = BrowserPathText.Text.Trim
290 _MyPostAndGet = CheckPostAndGet.Checked
291 _MyUseRecommendStatus = CheckUseRecommendStatus.Checked
292 _MyDispUsername = CheckDispUsername.Checked
293 _MyCloseToExit = CheckCloseToExit.Checked
294 _MyMinimizeToTray = CheckMinimizeToTray.Checked
295 Select Case ComboDispTitle.SelectedIndex
297 _MyDispLatestPost = DispTitleEnum.None
299 _MyDispLatestPost = DispTitleEnum.Ver
301 _MyDispLatestPost = DispTitleEnum.Post
303 _MyDispLatestPost = DispTitleEnum.UnreadRepCount
305 _MyDispLatestPost = DispTitleEnum.UnreadAllCount
307 _MyDispLatestPost = DispTitleEnum.UnreadAllRepCount
309 _MyDispLatestPost = DispTitleEnum.UnreadCountAllCount
310 Case 7 'Count of Status/Follow/Follower
311 _MyDispLatestPost = DispTitleEnum.OwnStatus
313 _MySortOrderLock = CheckSortOrderLock.Checked
314 _MyTinyUrlResolve = CheckTinyURL.Checked
315 ShortUrl.IsResolve = _MyTinyUrlResolve
316 If RadioProxyNone.Checked Then
317 _MyProxyType = HttpConnection.ProxyType.None
318 ElseIf RadioProxyIE.Checked Then
319 _MyProxyType = HttpConnection.ProxyType.IE
321 _MyProxyType = HttpConnection.ProxyType.Specified
323 _MyProxyAddress = TextProxyAddress.Text.Trim()
324 _MyProxyPort = Integer.Parse(TextProxyPort.Text.Trim())
325 _MyProxyUser = TextProxyUser.Text.Trim()
326 _MyProxyPassword = TextProxyPassword.Text.Trim()
327 _MyPeriodAdjust = CheckPeriodAdjust.Checked
328 _MyStartupVersion = CheckStartupVersion.Checked
329 _MyStartupFollowers = CheckStartupFollowers.Checked
330 _MyRestrictFavCheck = CheckFavRestrict.Checked
331 _MyAlwaysTop = CheckAlwaysTop.Checked
332 _MyUrlConvertAuto = CheckAutoConvertUrl.Checked
333 _MyOutputz = CheckOutputz.Checked
334 _MyOutputzKey = TextBoxOutputzKey.Text.Trim()
336 Select Case ComboBoxOutputzUrlmode.SelectedIndex
338 _MyOutputzUrlmode = OutputzUrlmode.twittercom
340 _MyOutputzUrlmode = OutputzUrlmode.twittercomWithUsername
343 _MyNicoms = CheckNicoms.Checked
344 _MyUnreadStyle = chkUnreadStyle.Checked
345 _MyDateTimeFormat = CmbDateTimeFormat.Text
346 _MyDefaultTimeOut = CType(ConnectionTimeOut.Text, Integer)
347 _MyRetweetNoConfirm = CheckRetweetNoConfirm.Checked
348 _MyLimitBalloon = CheckBalloonLimit.Checked
349 _MyEventNotifyEnabled = CheckEventNotify.Checked
350 GetEventNotifyFlag(_MyEventNotifyFlag, _isMyEventNotifyFlag)
351 _MyForceEventNotify = CheckForceEventNotify.Checked
352 _MyFavEventUnread = CheckFavEventUnread.Checked
353 _MyTranslateLanguage = (New Google).GetLanguageEnumFromIndex(ComboBoxTranslateLanguage.SelectedIndex)
354 _MyEventSoundFile = CStr(ComboBoxEventNotifySound.SelectedItem)
355 _MyAutoShortUrlFirst = CType(ComboBoxAutoShortUrlFirst.SelectedIndex, UrlConverter)
356 _MyTabIconDisp = chkTabIconDisp.Checked
357 _MyReadOwnPost = chkReadOwnPost.Checked
358 _MyGetFav = chkGetFav.Checked
359 _MyMonoSpace = CheckMonospace.Checked
360 _MyReadOldPosts = CheckReadOldPosts.Checked
361 _MyUseSsl = CheckUseSsl.Checked
362 _MyBitlyId = TextBitlyId.Text
363 _MyBitlyPw = TextBitlyPw.Text
364 _MyShowGrid = CheckShowGrid.Checked
365 _MyUseAtIdSupplement = CheckAtIdSupple.Checked
366 _MyUseHashSupplement = CheckHashSupple.Checked
367 _MyPreviewEnable = CheckPreviewEnable.Checked
368 _MyTwitterApiUrl = TwitterAPIText.Text.Trim
369 _MyTwitterSearchApiUrl = TwitterSearchAPIText.Text.Trim
370 Select Case ReplyIconStateCombo.SelectedIndex
372 _MyReplyIconState = REPLY_ICONSTATE.None
374 _MyReplyIconState = REPLY_ICONSTATE.StaticIcon
376 _MyReplyIconState = REPLY_ICONSTATE.BlinkIcon
378 Select Case LanguageCombo.SelectedIndex
386 _MyLanguage = "zh-CN"
390 _HotkeyEnabled = Me.HotkeyCheck.Checked
391 _HotkeyMod = Keys.None
392 If Me.HotkeyAlt.Checked Then _HotkeyMod = _HotkeyMod Or Keys.Alt
393 If Me.HotkeyShift.Checked Then _HotkeyMod = _HotkeyMod Or Keys.Shift
394 If Me.HotkeyCtrl.Checked Then _HotkeyMod = _HotkeyMod Or Keys.Control
395 If Me.HotkeyWin.Checked Then _HotkeyMod = _HotkeyMod Or Keys.LWin
396 If IsNumeric(HotkeyCode.Text) Then _HotkeyValue = CInt(HotkeyCode.Text)
397 _HotkeyKey = DirectCast(HotkeyText.Tag, Keys)
398 _BlinkNewMentions = ChkNewMentionsBlink.Checked
399 _MyUseAdditonalCount = UseChangeGetCount.Checked
400 _MoreCountApi = CType(GetMoreTextCountApi.Text, Integer)
401 _FirstCountApi = CType(FirstTextCountApi.Text, Integer)
402 _SearchCountApi = CType(SearchTextCountApi.Text, Integer)
403 _FavoritesCountApi = CType(FavoritesTextCountApi.Text, Integer)
404 _UserTimelineCountApi = CType(UserTimelineTextCountApi.Text, Integer)
405 _ListCountApi = CType(ListTextCountApi.Text, Integer)
406 _MyOpenUserTimeline = CheckOpenUserTimeline.Checked
407 Catch ex As Exception
408 MessageBox.Show(My.Resources.Save_ClickText3)
409 Me.DialogResult = Windows.Forms.DialogResult.Cancel
414 Private Sub Setting_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
415 If tw IsNot Nothing AndAlso tw.Username = "" AndAlso e.CloseReason = CloseReason.None Then
416 If MessageBox.Show(My.Resources.Setting_FormClosing1, "Confirm", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Cancel Then
420 If _ValidationError Then
423 If e.Cancel = False AndAlso TreeViewSetting.SelectedNode IsNot Nothing Then
424 Dim curPanel As Panel = CType(TreeViewSetting.SelectedNode.Tag, Panel)
425 curPanel.Visible = False
426 curPanel.Enabled = False
430 Private Sub Setting_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load
431 tw = DirectCast(Me.Owner, TweenMain).TwitterInstance
432 Dim uname As String = tw.Username
433 Dim pw As String = tw.Password
434 Dim tk As String = tw.AccessToken
435 Dim tks As String = tw.AccessTokenSecret
436 If Not Me._MyIsOAuth Then
438 Me.AuthStateLabel.Enabled = False
439 Me.AuthUserLabel.Enabled = False
440 Me.AuthClearButton.Enabled = False
441 Me.AuthOAuthRadio.Checked = False
442 Me.AuthBasicRadio.Checked = True
443 Me.CheckEnableBasicAuth.Checked = True
444 Me.AuthBasicRadio.Enabled = True
445 tw.Initialize(uname, pw)
447 Me.AuthStateLabel.Enabled = True
448 Me.AuthUserLabel.Enabled = True
449 Me.AuthClearButton.Enabled = True
450 Me.AuthOAuthRadio.Checked = True
451 Me.AuthBasicRadio.Checked = False
452 tw.Initialize(tk, tks, uname)
455 Username.Text = uname
457 If tw.Username = "" Then
458 Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click4
459 Me.AuthUserLabel.Text = ""
461 Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click3
462 Me.AuthUserLabel.Text = tw.Username
465 Me.StartupUserstreamCheck.Checked = _MyUserstreamStartup
466 Me.UserstreamPeriod.Text = _MyUserstreamPeriod.ToString()
467 TimelinePeriod.Text = _MytimelinePeriod.ToString()
468 ReplyPeriod.Text = _MyReplyPeriod.ToString()
469 DMPeriod.Text = _MyDMPeriod.ToString()
470 PubSearchPeriod.Text = _MyPubSearchPeriod.ToString()
471 ListsPeriod.Text = _MyListsPeriod.ToString()
472 UserTimelinePeriod.Text = _MyUserTimelinePeriod.ToString
474 StartupReaded.Checked = _MyReaded
475 Select Case _MyIconSize
476 Case IconSizes.IconNone
477 IconSize.SelectedIndex = 0
478 Case IconSizes.Icon16
479 IconSize.SelectedIndex = 1
480 Case IconSizes.Icon24
481 IconSize.SelectedIndex = 2
482 Case IconSizes.Icon48
483 IconSize.SelectedIndex = 3
484 Case IconSizes.Icon48_2
485 IconSize.SelectedIndex = 4
487 StatusText.Text = _MyStatusText
488 UReadMng.Checked = _MyUnreadManage
489 If _MyUnreadManage = False Then
490 StartupReaded.Enabled = False
492 StartupReaded.Enabled = True
494 PlaySnd.Checked = _MyPlaySound
495 OneWayLv.Checked = _MyOneWayLove
497 lblListFont.Font = _fntReaded
498 lblUnread.Font = _fntUnread
499 lblUnread.ForeColor = _clUnread
500 lblListFont.ForeColor = _clReaded
501 lblFav.ForeColor = _clFav
502 lblOWL.ForeColor = _clOWL
503 lblRetweet.ForeColor = _clRetweet
504 lblDetail.Font = _fntDetail
505 lblSelf.BackColor = _clSelf
506 lblAtSelf.BackColor = _clAtSelf
507 lblTarget.BackColor = _clTarget
508 lblAtTarget.BackColor = _clAtTarget
509 lblAtFromTarget.BackColor = _clAtFromTarget
510 lblAtTo.BackColor = _clAtTo
511 lblInputBackcolor.BackColor = _clInputBackcolor
512 lblInputFont.ForeColor = _clInputFont
513 lblInputFont.Font = _fntInputFont
514 lblListBackcolor.BackColor = _clListBackcolor
515 lblDetailBackcolor.BackColor = _clDetailBackcolor
516 lblDetail.ForeColor = _clDetail
517 lblDetailLink.ForeColor = _clDetailLink
519 Select Case _MyNameBalloon
520 Case NameBalloonEnum.None
521 cmbNameBalloon.SelectedIndex = 0
522 Case NameBalloonEnum.UserID
523 cmbNameBalloon.SelectedIndex = 1
524 Case NameBalloonEnum.NickName
525 cmbNameBalloon.SelectedIndex = 2
528 If _MyPostCtrlEnter Then
529 ComboBoxPostKeySelect.SelectedIndex = 1
530 ElseIf _MyPostShiftEnter Then
531 ComboBoxPostKeySelect.SelectedIndex = 2
533 ComboBoxPostKeySelect.SelectedIndex = 0
536 TextCountApi.Text = _countApi.ToString
537 TextCountApiReply.Text = _countApiReply.ToString
538 BrowserPathText.Text = _browserpath
539 CheckPostAndGet.Checked = _MyPostAndGet
540 CheckUseRecommendStatus.Checked = _MyUseRecommendStatus
541 CheckDispUsername.Checked = _MyDispUsername
542 CheckCloseToExit.Checked = _MyCloseToExit
543 CheckMinimizeToTray.Checked = _MyMinimizeToTray
544 Select Case _MyDispLatestPost
545 Case DispTitleEnum.None
546 ComboDispTitle.SelectedIndex = 0
547 Case DispTitleEnum.Ver
548 ComboDispTitle.SelectedIndex = 1
549 Case DispTitleEnum.Post
550 ComboDispTitle.SelectedIndex = 2
551 Case DispTitleEnum.UnreadRepCount
552 ComboDispTitle.SelectedIndex = 3
553 Case DispTitleEnum.UnreadAllCount
554 ComboDispTitle.SelectedIndex = 4
555 Case DispTitleEnum.UnreadAllRepCount
556 ComboDispTitle.SelectedIndex = 5
557 Case DispTitleEnum.UnreadCountAllCount
558 ComboDispTitle.SelectedIndex = 6
559 Case DispTitleEnum.OwnStatus
560 ComboDispTitle.SelectedIndex = 7
562 CheckSortOrderLock.Checked = _MySortOrderLock
563 CheckTinyURL.Checked = _MyTinyUrlResolve
564 Select Case _MyProxyType
565 Case HttpConnection.ProxyType.None
566 RadioProxyNone.Checked = True
567 Case HttpConnection.ProxyType.IE
568 RadioProxyIE.Checked = True
570 RadioProxySpecified.Checked = True
572 Dim chk As Boolean = RadioProxySpecified.Checked
573 LabelProxyAddress.Enabled = chk
574 TextProxyAddress.Enabled = chk
575 LabelProxyPort.Enabled = chk
576 TextProxyPort.Enabled = chk
577 LabelProxyUser.Enabled = chk
578 TextProxyUser.Enabled = chk
579 LabelProxyPassword.Enabled = chk
580 TextProxyPassword.Enabled = chk
582 TextProxyAddress.Text = _MyProxyAddress
583 TextProxyPort.Text = _MyProxyPort.ToString
584 TextProxyUser.Text = _MyProxyUser
585 TextProxyPassword.Text = _MyProxyPassword
587 CheckPeriodAdjust.Checked = _MyPeriodAdjust
588 CheckStartupVersion.Checked = _MyStartupVersion
589 CheckStartupFollowers.Checked = _MyStartupFollowers
590 CheckFavRestrict.Checked = _MyRestrictFavCheck
591 CheckAlwaysTop.Checked = _MyAlwaysTop
592 CheckAutoConvertUrl.Checked = _MyUrlConvertAuto
593 CheckOutputz.Checked = _MyOutputz
594 TextBoxOutputzKey.Text = _MyOutputzKey
596 Select Case _MyOutputzUrlmode
597 Case OutputzUrlmode.twittercom
598 ComboBoxOutputzUrlmode.SelectedIndex = 0
599 Case OutputzUrlmode.twittercomWithUsername
600 ComboBoxOutputzUrlmode.SelectedIndex = 1
603 CheckNicoms.Checked = _MyNicoms
604 chkUnreadStyle.Checked = _MyUnreadStyle
605 CmbDateTimeFormat.Text = _MyDateTimeFormat
606 ConnectionTimeOut.Text = _MyDefaultTimeOut.ToString
607 CheckRetweetNoConfirm.Checked = _MyRetweetNoConfirm
608 CheckBalloonLimit.Checked = _MyLimitBalloon
610 ApplyEventNotifyFlag(_MyEventNotifyEnabled, _MyEventNotifyFlag, _isMyEventNotifyFlag)
611 CheckForceEventNotify.Checked = _MyForceEventNotify
612 CheckFavEventUnread.Checked = _MyFavEventUnread
613 ComboBoxTranslateLanguage.SelectedIndex = (New Google).GetIndexFromLanguageEnum(_MyTranslateLanguage)
615 ComboBoxAutoShortUrlFirst.SelectedIndex = _MyAutoShortUrlFirst
616 chkTabIconDisp.Checked = _MyTabIconDisp
617 chkReadOwnPost.Checked = _MyReadOwnPost
618 chkGetFav.Checked = _MyGetFav
619 CheckMonospace.Checked = _MyMonoSpace
620 CheckReadOldPosts.Checked = _MyReadOldPosts
621 CheckUseSsl.Checked = _MyUseSsl
622 TextBitlyId.Text = _MyBitlyId
623 TextBitlyPw.Text = _MyBitlyPw
624 TextBitlyId.Modified = False
625 TextBitlyPw.Modified = False
626 CheckShowGrid.Checked = _MyShowGrid
627 CheckAtIdSupple.Checked = _MyUseAtIdSupplement
628 CheckHashSupple.Checked = _MyUseHashSupplement
629 CheckPreviewEnable.Checked = _MyPreviewEnable
630 TwitterAPIText.Text = _MyTwitterApiUrl
631 TwitterSearchAPIText.Text = _MyTwitterSearchApiUrl
632 Select Case _MyReplyIconState
633 Case REPLY_ICONSTATE.None
634 ReplyIconStateCombo.SelectedIndex = 0
635 Case REPLY_ICONSTATE.StaticIcon
636 ReplyIconStateCombo.SelectedIndex = 1
637 Case REPLY_ICONSTATE.BlinkIcon
638 ReplyIconStateCombo.SelectedIndex = 2
640 Select Case _MyLanguage
642 LanguageCombo.SelectedIndex = 0
644 LanguageCombo.SelectedIndex = 1
646 LanguageCombo.SelectedIndex = 2
648 LanguageCombo.SelectedIndex = 3
650 LanguageCombo.SelectedIndex = 0
652 HotkeyCheck.Checked = _HotkeyEnabled
653 HotkeyAlt.Checked = ((_HotkeyMod And Keys.Alt) = Keys.Alt)
654 HotkeyCtrl.Checked = ((_HotkeyMod And Keys.Control) = Keys.Control)
655 HotkeyShift.Checked = ((_HotkeyMod And Keys.Shift) = Keys.Shift)
656 HotkeyWin.Checked = ((_HotkeyMod And Keys.LWin) = Keys.LWin)
657 HotkeyCode.Text = _HotkeyValue.ToString
658 HotkeyText.Text = _HotkeyKey.ToString
659 HotkeyText.Tag = _HotkeyKey
660 HotkeyAlt.Enabled = HotkeyEnabled
661 HotkeyShift.Enabled = HotkeyEnabled
662 HotkeyCtrl.Enabled = HotkeyEnabled
663 HotkeyWin.Enabled = HotkeyEnabled
664 HotkeyText.Enabled = HotkeyEnabled
665 HotkeyCode.Enabled = HotkeyEnabled
666 ChkNewMentionsBlink.Checked = _BlinkNewMentions
668 CheckOutputz_CheckedChanged(sender, e)
670 GetMoreTextCountApi.Text = _MoreCountApi.ToString
671 FirstTextCountApi.Text = _FirstCountApi.ToString
672 SearchTextCountApi.Text = _SearchCountApi.ToString
673 FavoritesTextCountApi.Text = _FavoritesCountApi.ToString
674 UserTimelineTextCountApi.Text = _UserTimelineCountApi.ToString
675 ListTextCountApi.Text = _ListCountApi.ToString
676 UseChangeGetCount.Checked = _MyUseAdditonalCount
677 Label28.Enabled = UseChangeGetCount.Checked
678 Label30.Enabled = UseChangeGetCount.Checked
679 Label53.Enabled = UseChangeGetCount.Checked
680 Label66.Enabled = UseChangeGetCount.Checked
681 Label17.Enabled = UseChangeGetCount.Checked
682 Label25.Enabled = UseChangeGetCount.Checked
683 GetMoreTextCountApi.Enabled = UseChangeGetCount.Checked
684 FirstTextCountApi.Enabled = UseChangeGetCount.Checked
685 SearchTextCountApi.Enabled = UseChangeGetCount.Checked
686 FavoritesTextCountApi.Enabled = UseChangeGetCount.Checked
687 UserTimelineTextCountApi.Enabled = UseChangeGetCount.Checked
688 ListTextCountApi.Enabled = UseChangeGetCount.Checked
689 CheckOpenUserTimeline.Checked = _MyOpenUserTimeline
691 With Me.TreeViewSetting
692 .Nodes("BasedNode").Tag = BasedPanel
693 .Nodes("BasedNode").Nodes("PeriodNode").Tag = GetPeriodPanel
694 .Nodes("BasedNode").Nodes("StartUpNode").Tag = StartupPanel
695 .Nodes("BasedNode").Nodes("GetCountNode").Tag = GetCountPanel
696 '.Nodes("BasedNode").Nodes("UserStreamNode").Tag = UserStreamPanel
697 .Nodes("ActionNode").Tag = ActionPanel
698 .Nodes("ActionNode").Nodes("TweetActNode").Tag = TweetActPanel
699 .Nodes("PreviewNode").Tag = PreviewPanel
700 .Nodes("PreviewNode").Nodes("TweetPrvNode").Tag = TweetPrvPanel
701 .Nodes("PreviewNode").Nodes("NotifyNode").Tag = NotifyPanel
702 .Nodes("FontNode").Tag = FontPanel
703 .Nodes("FontNode").Nodes("FontNode2").Tag = FontPanel2
704 .Nodes("ConnectionNode").Tag = ConnectionPanel
705 .Nodes("ConnectionNode").Nodes("ProxyNode").Tag = ProxyPanel
706 .Nodes("ConnectionNode").Nodes("CooperateNode").Tag = CooperatePanel
707 .Nodes("ConnectionNode").Nodes("ShortUrlNode").Tag = ShortUrlPanel
709 .SelectedNode = .Nodes(0)
712 'TreeViewSetting.SelectedNode = TreeViewSetting.TopNode
713 ActiveControl = Username
716 Private Sub UserstreamPeriod_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles UserstreamPeriod.Validating
719 prd = CType(UserstreamPeriod.Text, Integer)
720 Catch ex As Exception
721 MessageBox.Show(My.Resources.UserstreamPeriod_ValidatingText1)
726 If prd < 0 OrElse prd > 60 Then
727 MessageBox.Show(My.Resources.UserstreamPeriod_ValidatingText1)
734 Private Sub TimelinePeriod_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TimelinePeriod.Validating
737 prd = CType(TimelinePeriod.Text, Integer)
738 Catch ex As Exception
739 MessageBox.Show(My.Resources.TimelinePeriod_ValidatingText1)
744 If prd <> 0 AndAlso (prd < 15 OrElse prd > 6000) Then
745 MessageBox.Show(My.Resources.TimelinePeriod_ValidatingText2)
752 Private Sub ReplyPeriod_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ReplyPeriod.Validating
755 prd = CType(ReplyPeriod.Text, Integer)
756 Catch ex As Exception
757 MessageBox.Show(My.Resources.TimelinePeriod_ValidatingText1)
762 If prd <> 0 AndAlso (prd < 15 OrElse prd > 6000) Then
763 MessageBox.Show(My.Resources.TimelinePeriod_ValidatingText2)
770 Private Sub DMPeriod_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles DMPeriod.Validating
773 prd = CType(DMPeriod.Text, Integer)
774 Catch ex As Exception
775 MessageBox.Show(My.Resources.DMPeriod_ValidatingText1)
780 If prd <> 0 AndAlso (prd < 15 OrElse prd > 6000) Then
781 MessageBox.Show(My.Resources.DMPeriod_ValidatingText2)
788 Private Sub PubSearchPeriod_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles PubSearchPeriod.Validating
791 prd = CType(PubSearchPeriod.Text, Integer)
792 Catch ex As Exception
793 MessageBox.Show(My.Resources.PubSearchPeriod_ValidatingText1)
798 If prd <> 0 AndAlso (prd < 30 OrElse prd > 6000) Then
799 MessageBox.Show(My.Resources.PubSearchPeriod_ValidatingText2)
804 Private Sub ListsPeriod_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ListsPeriod.Validating
807 prd = CType(ListsPeriod.Text, Integer)
808 Catch ex As Exception
809 MessageBox.Show(My.Resources.DMPeriod_ValidatingText1)
814 If prd <> 0 AndAlso (prd < 15 OrElse prd > 6000) Then
815 MessageBox.Show(My.Resources.DMPeriod_ValidatingText2)
822 Private Sub UserTimeline_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles UserTimelinePeriod.Validating
825 prd = CType(UserTimelinePeriod.Text, Integer)
826 Catch ex As Exception
827 MessageBox.Show(My.Resources.DMPeriod_ValidatingText1)
832 If prd <> 0 AndAlso (prd < 15 OrElse prd > 6000) Then
833 MessageBox.Show(My.Resources.DMPeriod_ValidatingText2)
840 Private Sub UReadMng_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UReadMng.CheckedChanged
841 If UReadMng.Checked = True Then
842 StartupReaded.Enabled = True
844 StartupReaded.Enabled = False
848 Private Sub btnFontAndColor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUnread.Click, btnDetail.Click, btnListFont.Click, btnInputFont.Click
849 Dim Btn As Button = CType(sender, Button)
850 Dim rtn As DialogResult
852 FontDialog1.AllowVerticalFonts = False
853 FontDialog1.AllowScriptChange = True
854 FontDialog1.AllowSimulations = True
855 FontDialog1.AllowVectorFonts = True
856 FontDialog1.FixedPitchOnly = False
857 FontDialog1.FontMustExist = True
858 FontDialog1.ScriptsOnly = False
859 FontDialog1.ShowApply = False
860 FontDialog1.ShowEffects = True
861 FontDialog1.ShowColor = True
865 FontDialog1.Color = lblUnread.ForeColor
866 FontDialog1.Font = lblUnread.Font
868 FontDialog1.Color = lblDetail.ForeColor
869 FontDialog1.Font = lblDetail.Font
871 FontDialog1.Color = lblListFont.ForeColor
872 FontDialog1.Font = lblListFont.Font
874 FontDialog1.Color = lblInputFont.ForeColor
875 FontDialog1.Font = lblInputFont.Font
879 rtn = FontDialog1.ShowDialog
880 Catch ex As ArgumentException
881 MessageBox.Show(ex.Message)
885 If rtn = Windows.Forms.DialogResult.Cancel Then Exit Sub
889 lblUnread.ForeColor = FontDialog1.Color
890 lblUnread.Font = FontDialog1.Font
892 lblDetail.ForeColor = FontDialog1.Color
893 lblDetail.Font = FontDialog1.Font
895 lblListFont.ForeColor = FontDialog1.Color
896 lblListFont.Font = FontDialog1.Font
898 lblInputFont.ForeColor = FontDialog1.Color
899 lblInputFont.Font = FontDialog1.Font
904 Private Sub btnColor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSelf.Click, btnAtSelf.Click, btnTarget.Click, btnAtTarget.Click, btnAtFromTarget.Click, btnFav.Click, btnOWL.Click, btnInputBackcolor.Click, btnAtTo.Click, btnListBack.Click, btnDetailBack.Click, btnDetailLink.Click, btnRetweet.Click
905 Dim Btn As Button = CType(sender, Button)
906 Dim rtn As DialogResult
908 ColorDialog1.AllowFullOpen = True
909 ColorDialog1.AnyColor = True
910 ColorDialog1.FullOpen = False
911 ColorDialog1.SolidColorOnly = False
915 ColorDialog1.Color = lblSelf.BackColor
917 ColorDialog1.Color = lblAtSelf.BackColor
919 ColorDialog1.Color = lblTarget.BackColor
921 ColorDialog1.Color = lblAtTarget.BackColor
922 Case "btnAtFromTarget"
923 ColorDialog1.Color = lblAtFromTarget.BackColor
925 ColorDialog1.Color = lblFav.ForeColor
927 ColorDialog1.Color = lblOWL.ForeColor
929 ColorDialog1.Color = lblRetweet.ForeColor
930 Case "btnInputBackcolor"
931 ColorDialog1.Color = lblInputBackcolor.BackColor
933 ColorDialog1.Color = lblAtTo.BackColor
935 ColorDialog1.Color = lblListBackcolor.BackColor
937 ColorDialog1.Color = lblDetailBackcolor.BackColor
939 ColorDialog1.Color = lblDetailLink.ForeColor
942 rtn = ColorDialog1.ShowDialog
944 If rtn = Windows.Forms.DialogResult.Cancel Then Exit Sub
948 lblSelf.BackColor = ColorDialog1.Color
950 lblAtSelf.BackColor = ColorDialog1.Color
952 lblTarget.BackColor = ColorDialog1.Color
954 lblAtTarget.BackColor = ColorDialog1.Color
955 Case "btnAtFromTarget"
956 lblAtFromTarget.BackColor = ColorDialog1.Color
958 lblFav.ForeColor = ColorDialog1.Color
960 lblOWL.ForeColor = ColorDialog1.Color
962 lblRetweet.ForeColor = ColorDialog1.Color
963 Case "btnInputBackcolor"
964 lblInputBackcolor.BackColor = ColorDialog1.Color
966 lblAtTo.BackColor = ColorDialog1.Color
968 lblListBackcolor.BackColor = ColorDialog1.Color
970 lblDetailBackcolor.BackColor = ColorDialog1.Color
972 lblDetailLink.ForeColor = ColorDialog1.Color
976 Public Property UserstreamPeriodInt() As Integer
978 Return _MyUserstreamPeriod
980 Set(ByVal value As Integer)
981 _MyUserstreamPeriod = value
985 Public Property UserstreamStartup() As Boolean
987 Return Me._MyUserstreamStartup
989 Set(ByVal value As Boolean)
990 Me._MyUserstreamStartup = value
994 Public Property TimelinePeriodInt() As Integer
996 Return _MytimelinePeriod
998 Set(ByVal value As Integer)
999 _MytimelinePeriod = value
1003 Public Property ReplyPeriodInt() As Integer
1005 Return _MyReplyPeriod
1007 Set(ByVal value As Integer)
1008 _MyReplyPeriod = value
1012 Public Property DMPeriodInt() As Integer
1016 Set(ByVal value As Integer)
1021 Public Property PubSearchPeriodInt() As Integer
1023 Return _MyPubSearchPeriod
1025 Set(ByVal value As Integer)
1026 _MyPubSearchPeriod = value
1030 Public Property ListsPeriodInt() As Integer
1032 Return _MyListsPeriod
1034 Set(ByVal value As Integer)
1035 _MyListsPeriod = value
1039 Public Property UserTimelinePeriodInt() As Integer
1041 Return _MyUserTimelinePeriod
1043 Set(ByVal value As Integer)
1044 _MyUserTimelinePeriod = value
1048 Public Property Readed() As Boolean
1052 Set(ByVal value As Boolean)
1057 Public Property IconSz() As IconSizes
1061 Set(ByVal value As IconSizes)
1066 Public Property Status() As String
1068 Return _MyStatusText
1070 Set(ByVal value As String)
1071 _MyStatusText = value
1075 Public Property UnreadManage() As Boolean
1077 Return _MyUnreadManage
1079 Set(ByVal value As Boolean)
1080 _MyUnreadManage = value
1084 Public Property PlaySound() As Boolean
1088 Set(ByVal value As Boolean)
1089 _MyPlaySound = value
1093 Public Property OneWayLove() As Boolean
1095 Return _MyOneWayLove
1097 Set(ByVal value As Boolean)
1098 _MyOneWayLove = value
1103 Public Property FontUnread() As Font
1107 Set(ByVal value As Font)
1113 Public Property ColorUnread() As Color
1117 Set(ByVal value As Color)
1123 Public Property FontReaded() As Font
1127 Set(ByVal value As Font)
1132 Public Property ColorReaded() As Color
1136 Set(ByVal value As Color)
1141 Public Property ColorFav() As Color
1145 Set(ByVal value As Color)
1150 Public Property ColorOWL() As Color
1154 Set(ByVal value As Color)
1159 Public Property ColorRetweet() As Color
1163 Set(ByVal value As Color)
1168 Public Property FontDetail() As Font
1172 Set(ByVal value As Font)
1177 Public Property ColorDetail() As Color
1181 Set(ByVal value As Color)
1186 Public Property ColorDetailLink() As Color
1188 Return _clDetailLink
1190 Set(ByVal value As Color)
1191 _clDetailLink = value
1195 Public Property ColorSelf() As Color
1199 Set(ByVal value As Color)
1204 Public Property ColorAtSelf() As Color
1208 Set(ByVal value As Color)
1213 Public Property ColorTarget() As Color
1217 Set(ByVal value As Color)
1222 Public Property ColorAtTarget() As Color
1226 Set(ByVal value As Color)
1231 Public Property ColorAtFromTarget() As Color
1233 Return _clAtFromTarget
1235 Set(ByVal value As Color)
1236 _clAtFromTarget = value
1240 Public Property ColorAtTo() As Color
1244 Set(ByVal value As Color)
1249 Public Property ColorInputBackcolor() As Color
1251 Return _clInputBackcolor
1253 Set(ByVal value As Color)
1254 _clInputBackcolor = value
1258 Public Property ColorInputFont() As Color
1262 Set(ByVal value As Color)
1263 _clInputFont = value
1267 Public Property FontInputFont() As Font
1269 Return _fntInputFont
1271 Set(ByVal value As Font)
1272 _fntInputFont = value
1276 Public Property ColorListBackcolor() As Color
1278 Return _clListBackcolor
1280 Set(ByVal value As Color)
1281 _clListBackcolor = value
1285 Public Property ColorDetailBackcolor() As Color
1287 Return _clDetailBackcolor
1289 Set(ByVal value As Color)
1290 _clDetailBackcolor = value
1294 Public Property NameBalloon() As NameBalloonEnum
1296 Return _MyNameBalloon
1298 Set(ByVal value As NameBalloonEnum)
1299 _MyNameBalloon = value
1303 Public Property PostCtrlEnter() As Boolean
1305 Return _MyPostCtrlEnter
1307 Set(ByVal value As Boolean)
1308 _MyPostCtrlEnter = value
1312 Public Property PostShiftEnter() As Boolean
1314 Return _MyPostShiftEnter
1316 Set(ByVal value As Boolean)
1317 _MyPostShiftEnter = value
1321 Public Property CountApi() As Integer
1325 Set(ByVal value As Integer)
1330 Public Property CountApiReply() As Integer
1332 Return _countApiReply
1334 Set(ByVal value As Integer)
1335 _countApiReply = value
1339 Public Property MoreCountApi() As Integer
1341 Return _MoreCountApi
1343 Set(ByVal value As Integer)
1344 _MoreCountApi = value
1348 Public Property FirstCountApi() As Integer
1350 Return _FirstCountApi
1352 Set(ByVal value As Integer)
1353 _FirstCountApi = value
1357 Public Property SearchCountApi() As Integer
1359 Return _SearchCountApi
1361 Set(ByVal value As Integer)
1362 _SearchCountApi = value
1366 Public Property FavoritesCountApi() As Integer
1368 Return _FavoritesCountApi
1370 Set(ByVal value As Integer)
1371 _FavoritesCountApi = value
1375 Public Property UserTimelineCountApi() As Integer
1377 Return _UserTimelineCountApi
1379 Set(ByVal value As Integer)
1380 _UserTimelineCountApi = value
1384 Public Property ListCountApi() As Integer
1386 Return _ListCountApi
1388 Set(ByVal value As Integer)
1389 _ListCountApi = value
1393 Public Property PostAndGet() As Boolean
1395 Return _MyPostAndGet
1397 Set(ByVal value As Boolean)
1398 _MyPostAndGet = value
1402 Public Property UseRecommendStatus() As Boolean
1404 Return _MyUseRecommendStatus
1406 Set(ByVal value As Boolean)
1407 _MyUseRecommendStatus = value
1411 Public Property RecommendStatusText() As String
1413 Return _MyRecommendStatusText
1415 Set(ByVal value As String)
1416 _MyRecommendStatusText = value
1420 Public Property DispUsername() As Boolean
1422 Return _MyDispUsername
1424 Set(ByVal value As Boolean)
1425 _MyDispUsername = value
1429 Public Property CloseToExit() As Boolean
1431 Return _MyCloseToExit
1433 Set(ByVal value As Boolean)
1434 _MyCloseToExit = value
1438 Public Property MinimizeToTray() As Boolean
1440 Return _MyMinimizeToTray
1442 Set(ByVal value As Boolean)
1443 _MyMinimizeToTray = value
1447 Public Property DispLatestPost() As DispTitleEnum
1449 Return _MyDispLatestPost
1451 Set(ByVal value As DispTitleEnum)
1452 _MyDispLatestPost = value
1456 Public Property BrowserPath() As String
1460 Set(ByVal value As String)
1461 _browserpath = value
1465 Public Property TinyUrlResolve() As Boolean
1467 Return _MyTinyUrlResolve
1469 Set(ByVal value As Boolean)
1470 _MyTinyUrlResolve = value
1474 Private Sub CheckUseRecommendStatus_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckUseRecommendStatus.CheckedChanged
1475 If CheckUseRecommendStatus.Checked = True Then
1476 StatusText.Enabled = False
1478 StatusText.Enabled = True
1482 Public Property SortOrderLock() As Boolean
1484 Return _MySortOrderLock
1486 Set(ByVal value As Boolean)
1487 _MySortOrderLock = value
1491 Public Property SelectedProxyType() As HttpConnection.ProxyType
1495 Set(ByVal value As HttpConnection.ProxyType)
1496 _MyProxyType = value
1500 Public Property ProxyAddress() As String
1502 Return _MyProxyAddress
1504 Set(ByVal value As String)
1505 _MyProxyAddress = value
1509 Public Property ProxyPort() As Integer
1513 Set(ByVal value As Integer)
1514 _MyProxyPort = value
1518 Public Property ProxyUser() As String
1522 Set(ByVal value As String)
1523 _MyProxyUser = value
1527 Public Property ProxyPassword() As String
1529 Return _MyProxyPassword
1531 Set(ByVal value As String)
1532 _MyProxyPassword = value
1536 Public Property PeriodAdjust() As Boolean
1538 Return _MyPeriodAdjust
1540 Set(ByVal value As Boolean)
1541 _MyPeriodAdjust = value
1545 Public Property StartupVersion() As Boolean
1547 Return _MyStartupVersion
1549 Set(ByVal value As Boolean)
1550 _MyStartupVersion = value
1554 Public Property StartupFollowers() As Boolean
1556 Return _MyStartupFollowers
1558 Set(ByVal value As Boolean)
1559 _MyStartupFollowers = value
1563 Public Property RestrictFavCheck() As Boolean
1565 Return _MyRestrictFavCheck
1567 Set(ByVal value As Boolean)
1568 _MyRestrictFavCheck = value
1572 Public Property AlwaysTop() As Boolean
1576 Set(ByVal value As Boolean)
1577 _MyAlwaysTop = value
1581 Public Property UrlConvertAuto() As Boolean
1583 Return _MyUrlConvertAuto
1585 Set(ByVal value As Boolean)
1586 _MyUrlConvertAuto = value
1589 Public Property OutputzEnabled() As Boolean
1593 Set(ByVal value As Boolean)
1597 Public Property OutputzKey() As String
1599 Return _MyOutputzKey
1601 Set(ByVal value As String)
1602 _MyOutputzKey = value
1605 Public Property OutputzUrlmode() As OutputzUrlmode
1607 Return _MyOutputzUrlmode
1609 Set(ByVal value As OutputzUrlmode)
1610 _MyOutputzUrlmode = value
1614 Public Property Nicoms() As Boolean
1618 Set(ByVal value As Boolean)
1622 Public Property AutoShortUrlFirst() As UrlConverter
1624 Return _MyAutoShortUrlFirst
1626 Set(ByVal value As UrlConverter)
1627 _MyAutoShortUrlFirst = value
1631 Public Property UseUnreadStyle() As Boolean
1633 Return _MyUnreadStyle
1635 Set(ByVal value As Boolean)
1636 _MyUnreadStyle = value
1640 Public Property DateTimeFormat() As String
1642 Return _MyDateTimeFormat
1644 Set(ByVal value As String)
1645 _MyDateTimeFormat = value
1649 Public Property DefaultTimeOut() As Integer
1651 Return _MyDefaultTimeOut
1653 Set(ByVal value As Integer)
1654 _MyDefaultTimeOut = value
1658 Public Property RetweetNoConfirm() As Boolean
1660 Return _MyRetweetNoConfirm
1662 Set(ByVal value As Boolean)
1663 _MyRetweetNoConfirm = value
1667 Public Property TabIconDisp() As Boolean
1669 Return _MyTabIconDisp
1671 Set(ByVal value As Boolean)
1672 _MyTabIconDisp = value
1676 Public Property ReplyIconState() As REPLY_ICONSTATE
1678 Return _MyReplyIconState
1680 Set(ByVal value As REPLY_ICONSTATE)
1681 _MyReplyIconState = value
1685 Public Property ReadOwnPost() As Boolean
1687 Return _MyReadOwnPost
1689 Set(ByVal value As Boolean)
1690 _MyReadOwnPost = value
1694 Public Property GetFav() As Boolean
1698 Set(ByVal value As Boolean)
1703 Public Property IsMonospace() As Boolean
1707 Set(ByVal value As Boolean)
1708 _MyMonoSpace = value
1712 Public Property ReadOldPosts() As Boolean
1714 Return _MyReadOldPosts
1716 Set(ByVal value As Boolean)
1717 _MyReadOldPosts = value
1721 Public Property UseSsl() As Boolean
1725 Set(ByVal value As Boolean)
1730 Public Property BitlyUser() As String
1734 Set(ByVal value As String)
1739 Public Property BitlyPwd() As String
1743 Set(ByVal value As String)
1748 Public Property ShowGrid() As Boolean
1752 Set(ByVal value As Boolean)
1757 Public Property UseAtIdSupplement() As Boolean
1759 Return _MyUseAtIdSupplement
1761 Set(ByVal value As Boolean)
1762 _MyUseAtIdSupplement = value
1766 Public Property UseHashSupplement() As Boolean
1768 Return _MyUseHashSupplement
1770 Set(ByVal value As Boolean)
1771 _MyUseHashSupplement = value
1775 Public Property PreviewEnable() As Boolean
1777 Return _MyPreviewEnable
1779 Set(ByVal value As Boolean)
1780 _MyPreviewEnable = value
1784 Public Property UseAdditionalCount() As Boolean
1786 Return _MyUseAdditonalCount
1788 Set(ByVal value As Boolean)
1789 _MyUseAdditonalCount = value
1793 Public Property OpenUserTimeline() As Boolean
1794 Set(ByVal value As Boolean)
1795 _MyOpenUserTimeline = value
1798 Return _MyOpenUserTimeline
1802 Public Property TwitterApiUrl() As String
1804 Return _MyTwitterApiUrl
1806 Set(ByVal value As String)
1807 _MyTwitterApiUrl = value
1811 Public Property TwitterSearchApiUrl() As String
1813 Return _MyTwitterSearchApiUrl
1815 Set(ByVal value As String)
1816 _MyTwitterSearchApiUrl = value
1820 Public Property Language() As String
1824 Set(ByVal value As String)
1829 Public Property IsOAuth() As Boolean
1833 Set(ByVal value As Boolean)
1838 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
1839 Using filedlg As New OpenFileDialog()
1841 filedlg.Filter = My.Resources.Button3_ClickText1
1842 filedlg.FilterIndex = 1
1843 filedlg.Title = My.Resources.Button3_ClickText2
1844 filedlg.RestoreDirectory = True
1846 If filedlg.ShowDialog() = Windows.Forms.DialogResult.OK Then
1847 BrowserPathText.Text = filedlg.FileName
1852 Private Sub RadioProxySpecified_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioProxySpecified.CheckedChanged
1853 Dim chk As Boolean = RadioProxySpecified.Checked
1854 LabelProxyAddress.Enabled = chk
1855 TextProxyAddress.Enabled = chk
1856 LabelProxyPort.Enabled = chk
1857 TextProxyPort.Enabled = chk
1858 LabelProxyUser.Enabled = chk
1859 TextProxyUser.Enabled = chk
1860 LabelProxyPassword.Enabled = chk
1861 TextProxyPassword.Enabled = chk
1864 Private Sub TextProxyPort_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextProxyPort.Validating
1866 If TextProxyPort.Text.Trim() = "" Then TextProxyPort.Text = "0"
1867 If Integer.TryParse(TextProxyPort.Text.Trim(), port) = False Then
1868 MessageBox.Show(My.Resources.TextProxyPort_ValidatingText1)
1872 If port < 0 Or port > 65535 Then
1873 MessageBox.Show(My.Resources.TextProxyPort_ValidatingText2)
1879 Private Sub CheckOutputz_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckOutputz.CheckedChanged
1880 If CheckOutputz.Checked = True Then
1881 Label59.Enabled = True
1882 Label60.Enabled = True
1883 TextBoxOutputzKey.Enabled = True
1884 ComboBoxOutputzUrlmode.Enabled = True
1886 Label59.Enabled = False
1887 Label60.Enabled = False
1888 TextBoxOutputzKey.Enabled = False
1889 ComboBoxOutputzUrlmode.Enabled = False
1893 Private Sub TextBoxOutputzKey_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextBoxOutputzKey.Validating
1894 If CheckOutputz.Checked Then
1895 TextBoxOutputzKey.Text = Trim(TextBoxOutputzKey.Text)
1896 If TextBoxOutputzKey.Text.Length = 0 Then
1897 MessageBox.Show(My.Resources.TextBoxOutputzKey_Validating)
1904 Private Function CreateDateTimeFormatSample() As Boolean
1906 LabelDateTimeFormatApplied.Text = DateTime.Now.ToString(CmbDateTimeFormat.Text)
1907 Catch ex As FormatException
1908 LabelDateTimeFormatApplied.Text = My.Resources.CreateDateTimeFormatSampleText1
1914 Private Sub CmbDateTimeFormat_TextUpdate(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmbDateTimeFormat.TextUpdate
1915 CreateDateTimeFormatSample()
1918 Private Sub CmbDateTimeFormat_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmbDateTimeFormat.SelectedIndexChanged
1919 CreateDateTimeFormatSample()
1922 Private Sub CmbDateTimeFormat_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles CmbDateTimeFormat.Validating
1923 If Not CreateDateTimeFormatSample() Then
1924 MessageBox.Show(My.Resources.CmbDateTimeFormat_Validating)
1929 Private Sub ConnectionTimeOut_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ConnectionTimeOut.Validating
1932 tm = CInt(ConnectionTimeOut.Text)
1933 Catch ex As Exception
1934 MessageBox.Show(My.Resources.ConnectionTimeOut_ValidatingText1)
1939 If tm < HttpTimeOut.MinValue OrElse tm > HttpTimeOut.MaxValue Then
1940 MessageBox.Show(My.Resources.ConnectionTimeOut_ValidatingText1)
1945 Private Sub LabelDateTimeFormatApplied_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles LabelDateTimeFormatApplied.VisibleChanged
1946 CreateDateTimeFormatSample()
1949 Private Sub TextCountApi_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextCountApi.Validating
1952 cnt = Integer.Parse(TextCountApi.Text)
1953 Catch ex As Exception
1954 MessageBox.Show(My.Resources.TextCountApi_Validating1)
1959 If cnt < 20 OrElse cnt > 200 Then
1960 MessageBox.Show(My.Resources.TextCountApi_Validating1)
1966 Private Sub TextCountApiReply_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextCountApiReply.Validating
1969 cnt = Integer.Parse(TextCountApiReply.Text)
1970 Catch ex As Exception
1971 MessageBox.Show(My.Resources.TextCountApi_Validating1)
1976 If cnt < 20 OrElse cnt > 200 Then
1977 MessageBox.Show(My.Resources.TextCountApi_Validating1)
1983 Public Property LimitBalloon() As Boolean
1985 Return _MyLimitBalloon
1987 Set(ByVal value As Boolean)
1988 _MyLimitBalloon = value
1992 Public Property EventNotifyEnabled As Boolean
1994 Return _MyEventNotifyEnabled
1996 Set(ByVal value As Boolean)
1997 _MyEventNotifyEnabled = value
2001 Public Property EventNotifyFlag As EVENTTYPE
2003 Return _MyEventNotifyFlag
2005 Set(ByVal value As EVENTTYPE)
2006 _MyEventNotifyFlag = value
2010 Public Property IsMyEventNotifyFlag As EVENTTYPE
2012 Return _isMyEventNotifyFlag
2014 Set(ByVal value As EVENTTYPE)
2015 _isMyEventNotifyFlag = value
2019 Public Property ForceEventNotify As Boolean
2021 Return _MyForceEventNotify
2023 Set(ByVal value As Boolean)
2024 _MyForceEventNotify = value
2028 Public Property FavEventUnread As Boolean
2030 Return _MyFavEventUnread
2032 Set(ByVal value As Boolean)
2033 _MyFavEventUnread = value
2037 Public Property TranslateLanguage As String
2039 Return _MyTranslateLanguage
2041 Set(ByVal value As String)
2042 _MyTranslateLanguage = value
2043 ComboBoxTranslateLanguage.SelectedIndex = (New Google).GetIndexFromLanguageEnum(value)
2047 Public Property EventSoundFile As String
2049 Return _MyEventSoundFile
2051 Set(ByVal value As String)
2052 _MyEventSoundFile = value
2056 Private Sub ComboBoxAutoShortUrlFirst_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxAutoShortUrlFirst.SelectedIndexChanged
2057 If ComboBoxAutoShortUrlFirst.SelectedIndex = UrlConverter.Bitly OrElse _
2058 ComboBoxAutoShortUrlFirst.SelectedIndex = UrlConverter.Jmp Then
2059 TextBitlyId.Enabled = True
2060 TextBitlyPw.Enabled = True
2062 TextBitlyId.Enabled = False
2063 TextBitlyPw.Enabled = False
2067 Private Sub ButtonBackToDefaultFontColor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonBackToDefaultFontColor.Click, ButtonBackToDefaultFontColor2.Click
2068 lblUnread.ForeColor = System.Drawing.SystemColors.ControlText
2069 lblUnread.Font = New Font(SystemFonts.DefaultFont, FontStyle.Bold Or FontStyle.Underline)
2071 lblListFont.ForeColor = System.Drawing.SystemColors.ControlText
2072 lblListFont.Font = System.Drawing.SystemFonts.DefaultFont
2074 lblDetail.ForeColor = Color.FromKnownColor(System.Drawing.KnownColor.ControlText)
2075 lblDetail.Font = System.Drawing.SystemFonts.DefaultFont
2077 lblInputFont.ForeColor = Color.FromKnownColor(System.Drawing.KnownColor.ControlText)
2078 lblInputFont.Font = System.Drawing.SystemFonts.DefaultFont
2080 lblSelf.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.AliceBlue)
2082 lblAtSelf.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.AntiqueWhite)
2084 lblTarget.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.LemonChiffon)
2086 lblAtTarget.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.LavenderBlush)
2088 lblAtFromTarget.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.Honeydew)
2090 lblFav.ForeColor = Color.FromKnownColor(System.Drawing.KnownColor.Red)
2092 lblOWL.ForeColor = Color.FromKnownColor(System.Drawing.KnownColor.Blue)
2094 lblInputBackcolor.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.LemonChiffon)
2096 lblAtTo.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.Pink)
2098 lblListBackcolor.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.Window)
2100 lblDetailBackcolor.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.Window)
2102 lblDetailLink.ForeColor = Color.FromKnownColor(System.Drawing.KnownColor.Blue)
2104 lblRetweet.ForeColor = Color.FromKnownColor(System.Drawing.KnownColor.Green)
2107 Private Function Authorize() As Boolean
2108 Dim user As String = Me.Username.Text.Trim
2109 Dim pwd As String = Me.Password.Text.Trim
2110 If String.IsNullOrEmpty(user) OrElse String.IsNullOrEmpty(pwd) Then
2111 MessageBox.Show(My.Resources.Save_ClickText1)
2116 Dim ptype As HttpConnection.ProxyType
2117 If RadioProxyNone.Checked Then
2118 ptype = HttpConnection.ProxyType.None
2119 ElseIf RadioProxyIE.Checked Then
2120 ptype = HttpConnection.ProxyType.IE
2122 ptype = HttpConnection.ProxyType.Specified
2124 Dim padr As String = TextProxyAddress.Text.Trim()
2125 Dim pport As Integer = Integer.Parse(TextProxyPort.Text.Trim())
2126 Dim pusr As String = TextProxyUser.Text.Trim()
2127 Dim ppw As String = TextProxyPassword.Text.Trim()
2130 HttpConnection.InitializeConnection(20, ptype, padr, pport, pusr, ppw)
2131 HttpTwitter.TwitterUrl = TwitterAPIText.Text.Trim
2132 HttpTwitter.TwitterSearchUrl = TwitterSearchAPIText.Text.Trim
2133 If Me.AuthBasicRadio.Checked Then
2134 tw.Initialize("", "")
2136 tw.Initialize("", "", "")
2138 Dim rslt As String = tw.Authenticate(user, pwd)
2139 If String.IsNullOrEmpty(rslt) Then
2140 MessageBox.Show(My.Resources.AuthorizeButton_Click1, "Authenticate", MessageBoxButtons.OK)
2141 Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click3
2142 Me.AuthUserLabel.Text = tw.Username
2145 MessageBox.Show(My.Resources.AuthorizeButton_Click2 + Environment.NewLine + rslt, "Authenticate", MessageBoxButtons.OK)
2146 Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click4
2147 Me.AuthUserLabel.Text = ""
2152 Private Sub AuthorizeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AuthorizeButton.Click
2153 If Authorize() Then CalcApiUsing()
2156 Private Sub AuthClearButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AuthClearButton.Click
2158 Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click4
2159 Me.AuthUserLabel.Text = ""
2163 Private Sub AuthOAuthRadio_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AuthOAuthRadio.CheckedChanged
2164 If tw Is Nothing Then Exit Sub
2165 If AuthBasicRadio.Checked Then
2167 tw.Initialize("", "")
2168 Me.AuthStateLabel.Enabled = False
2169 Me.AuthUserLabel.Enabled = False
2170 Me.AuthClearButton.Enabled = False
2172 tw.Initialize("", "", "")
2173 Me.AuthStateLabel.Enabled = True
2174 Me.AuthUserLabel.Enabled = True
2175 Me.AuthClearButton.Enabled = True
2177 Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click4
2178 Me.AuthUserLabel.Text = ""
2182 Private Sub DisplayApiMaxCount()
2183 If TwitterApiInfo.MaxCount > -1 Then
2184 LabelApiUsing.Text = String.Format(My.Resources.SettingAPIUse1, TwitterApiInfo.UsingCount, TwitterApiInfo.MaxCount)
2186 LabelApiUsing.Text = String.Format(My.Resources.SettingAPIUse1, TwitterApiInfo.UsingCount, "???")
2190 Private Sub CalcApiUsing()
2191 Dim UsingApi As Integer = 0
2193 Dim ListsTabNum As Integer = 0
2194 Dim UserTimelineTabNum As Integer = 0
2195 Dim ApiLists As Integer = 0
2196 Dim ApiUserTimeline As Integer = 0
2197 Dim UsingApiUserStream As Integer = 0
2200 ' 初回起動時などにNothingの場合あり
2201 ListsTabNum = TabInformations.GetInstance.GetTabsByType(TabUsageType.Lists).Count
2202 Catch ex As Exception
2207 ' 初回起動時などにNothingの場合あり
2208 UserTimelineTabNum = TabInformations.GetInstance.GetTabsByType(TabUsageType.UserTimeline).Count
2209 Catch ex As Exception
2214 If Integer.TryParse(TimelinePeriod.Text, tmp) Then
2216 UsingApi += 3600 \ tmp
2221 If Integer.TryParse(ReplyPeriod.Text, tmp) Then
2223 UsingApi += 3600 \ tmp
2228 If Integer.TryParse(DMPeriod.Text, tmp) Then
2230 UsingApi += (3600 \ tmp) * 2
2235 If Integer.TryParse(ListsPeriod.Text, tmp) Then
2237 ApiLists = (3600 \ tmp) * ListsTabNum
2238 UsingApi += ApiLists
2242 ' UserTimelineタブ計算 0は手動更新
2243 If Integer.TryParse(UserTimelinePeriod.Text, tmp) Then
2245 ApiUserTimeline = (3600 \ tmp) * UserTimelineTabNum
2246 UsingApi += ApiUserTimeline
2250 If tw IsNot Nothing Then
2251 If TwitterApiInfo.MaxCount = -1 Then
2252 If Twitter.AccountState = ACCOUNT_STATE.Valid Then
2253 TwitterApiInfo.UsingCount = UsingApi
2254 Dim proc As New Thread(New Threading.ThreadStart(Sub()
2255 tw.GetInfoApi(Nothing) '取得エラー時はinfoCountは初期状態(値:-1)
2256 If Me.IsHandleCreated AndAlso Not Me.IsDisposed Then Invoke(New MethodInvoker(AddressOf DisplayApiMaxCount))
2260 LabelApiUsing.Text = String.Format(My.Resources.SettingAPIUse1, UsingApi, "???")
2263 LabelApiUsing.Text = String.Format(My.Resources.SettingAPIUse1, UsingApi, TwitterApiInfo.MaxCount)
2268 LabelPostAndGet.Visible = CheckPostAndGet.Checked AndAlso Not tw.UserStreamEnabled
2269 LabelUserStreamActive.Visible = tw.UserStreamEnabled
2271 LabelApiUsingUserStreamEnabled.Text = String.Format(My.Resources.SettingAPIUse2, (ApiLists + ApiUserTimeline).ToString)
2272 LabelApiUsingUserStreamEnabled.Visible = tw.UserStreamEnabled
2275 Private Sub CheckPostAndGet_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckPostAndGet.CheckedChanged
2279 Private Sub Setting_Shown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Shown
2282 If Me.Disposing OrElse Me.IsDisposed Then Exit Sub
2283 Loop Until Me.IsHandleCreated
2287 Private Sub ButtonApiCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonApiCalc.Click
2293 ' この呼び出しはデザイナーで必要です。
2294 InitializeComponent()
2296 ' InitializeComponent() 呼び出しの後で初期化を追加します。
2300 Public Shared ReadOnly Property Instance As AppendSettingDialog
2306 Private Function BitlyValidation(ByVal id As String, ByVal apikey As String) As Boolean
2307 If String.IsNullOrEmpty(id) OrElse String.IsNullOrEmpty(apikey) Then
2311 Dim req As String = "http://api.bit.ly/v3/validate"
2312 Dim content As String = ""
2313 Dim param As New Dictionary(Of String, String)
2315 param.Add("login", "tweenapi")
2316 param.Add("apiKey", "R_c5ee0e30bdfff88723c4457cc331886b")
2317 param.Add("x_login", id)
2318 param.Add("x_apiKey", apikey)
2319 param.Add("format", "txt")
2321 If Not (New HttpVarious).PostData(req, param, content) Then
2322 Return True ' 通信エラーの場合はとりあえずチェックを通ったことにする
2323 ElseIf content.Trim() = "1" Then
2325 ElseIf content.Trim() = "0" Then
2326 Return False ' 検証失敗 APIキーとIDの組み合わせが違う
2328 Return True ' 規定外応答:通信エラーの可能性があるためとりあえずチェックを通ったことにする
2332 Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click
2333 _ValidationError = False
2336 Public Property HotkeyEnabled As Boolean
2337 Public Property HotkeyKey As Keys
2338 Public Property HotkeyValue As Integer
2339 Public Property HotkeyMod As Keys
2341 Private Sub HotkeyText_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles HotkeyText.KeyDown
2344 HotkeyText.Text = e.KeyCode.ToString
2345 HotkeyCode.Text = e.KeyValue.ToString
2346 HotkeyText.Tag = e.KeyCode
2348 e.SuppressKeyPress = True
2351 Private Sub HotkeyCheck_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HotkeyCheck.CheckedChanged
2352 HotkeyCtrl.Enabled = HotkeyCheck.Checked
2353 HotkeyAlt.Enabled = HotkeyCheck.Checked
2354 HotkeyShift.Enabled = HotkeyCheck.Checked
2355 HotkeyWin.Enabled = HotkeyCheck.Checked
2356 HotkeyText.Enabled = HotkeyCheck.Checked
2357 HotkeyCode.Enabled = HotkeyCheck.Checked
2360 Public Property BlinkNewMentions As Boolean
2362 Private Sub GetMoreTextCountApi_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles GetMoreTextCountApi.Validating
2365 cnt = Integer.Parse(GetMoreTextCountApi.Text)
2366 Catch ex As Exception
2367 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2372 If Not cnt = 0 AndAlso (cnt < 20 OrElse cnt > 200) Then
2373 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2379 Private Sub UseChangeGetCount_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles UseChangeGetCount.CheckedChanged
2380 GetMoreTextCountApi.Enabled = UseChangeGetCount.Checked
2381 FirstTextCountApi.Enabled = UseChangeGetCount.Checked
2382 Label28.Enabled = UseChangeGetCount.Checked
2383 Label30.Enabled = UseChangeGetCount.Checked
2384 Label53.Enabled = UseChangeGetCount.Checked
2385 Label66.Enabled = UseChangeGetCount.Checked
2386 Label17.Enabled = UseChangeGetCount.Checked
2387 Label25.Enabled = UseChangeGetCount.Checked
2388 SearchTextCountApi.Enabled = UseChangeGetCount.Checked
2389 FavoritesTextCountApi.Enabled = UseChangeGetCount.Checked
2390 UserTimelineTextCountApi.Enabled = UseChangeGetCount.Checked
2391 ListTextCountApi.Enabled = UseChangeGetCount.Checked
2394 Private Sub FirstTextCountApi_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles FirstTextCountApi.Validating
2397 cnt = Integer.Parse(FirstTextCountApi.Text)
2398 Catch ex As Exception
2399 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2404 If Not cnt = 0 AndAlso (cnt < 20 OrElse cnt > 200) Then
2405 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2411 Private Sub CheckEnableBasicAuth_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckEnableBasicAuth.CheckedChanged
2412 AuthBasicRadio.Enabled = CheckEnableBasicAuth.Checked
2415 Private Sub SearchTextCountApi_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles SearchTextCountApi.Validating
2418 cnt = Integer.Parse(SearchTextCountApi.Text)
2419 Catch ex As Exception
2420 MessageBox.Show(My.Resources.TextSearchCountApi_Validating1)
2425 If Not cnt = 0 AndAlso (cnt < 20 OrElse cnt > 100) Then
2426 MessageBox.Show(My.Resources.TextSearchCountApi_Validating1)
2432 Private Sub FavoritesTextCountApi_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles FavoritesTextCountApi.Validating
2435 cnt = Integer.Parse(FavoritesTextCountApi.Text)
2436 Catch ex As Exception
2437 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2442 If Not cnt = 0 AndAlso (cnt < 20 OrElse cnt > 200) Then
2443 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2449 Private Sub UserTimelineTextCountApi_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles UserTimelineTextCountApi.Validating
2452 cnt = Integer.Parse(UserTimelineTextCountApi.Text)
2453 Catch ex As Exception
2454 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2459 If Not cnt = 0 AndAlso (cnt < 20 OrElse cnt > 200) Then
2460 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2466 Private Sub ListTextCountApi_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ListTextCountApi.Validating
2469 cnt = Integer.Parse(ListTextCountApi.Text)
2470 Catch ex As Exception
2471 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2476 If Not cnt = 0 AndAlso (cnt < 20 OrElse cnt > 200) Then
2477 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2483 Private Sub CheckEventNotify_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
2484 Handles CheckEventNotify.CheckedChanged, CheckFavoritesEvent.CheckStateChanged, _
2485 CheckUnfavoritesEvent.CheckStateChanged, CheckFollowEvent.CheckStateChanged, _
2486 CheckListMemberAddedEvent.CheckStateChanged, CheckListMemberRemovedEvent.CheckStateChanged, _
2487 CheckListCreatedEvent.CheckStateChanged, CheckUserUpdateEvent.CheckStateChanged
2488 _MyEventNotifyEnabled = CheckEventNotify.Checked
2489 GetEventNotifyFlag(_MyEventNotifyFlag, _isMyEventNotifyFlag)
2490 ApplyEventNotifyFlag(_MyEventNotifyEnabled, _MyEventNotifyFlag, _isMyEventNotifyFlag)
2493 Private Class EventCheckboxTblElement
2494 Public CheckBox As CheckBox
2495 Public Type As EVENTTYPE
2498 Private Function GetEventCheckboxTable() As EventCheckboxTblElement()
2500 Static _eventCheckboxTable As EventCheckboxTblElement() = {
2501 New EventCheckboxTblElement With {.CheckBox = CheckFavoritesEvent, .Type = EVENTTYPE.Favorite},
2502 New EventCheckboxTblElement With {.CheckBox = CheckUnfavoritesEvent, .Type = EVENTTYPE.Unfavorite},
2503 New EventCheckboxTblElement With {.CheckBox = CheckFollowEvent, .Type = EVENTTYPE.Follow},
2504 New EventCheckboxTblElement With {.CheckBox = CheckListMemberAddedEvent, .Type = EVENTTYPE.ListMemberAdded},
2505 New EventCheckboxTblElement With {.CheckBox = CheckListMemberRemovedEvent, .Type = EVENTTYPE.ListMemberRemoved},
2506 New EventCheckboxTblElement With {.CheckBox = CheckBlockEvent, .Type = EVENTTYPE.Block},
2507 New EventCheckboxTblElement With {.CheckBox = CheckUserUpdateEvent, .Type = EVENTTYPE.UserUpdate},
2508 New EventCheckboxTblElement With {.CheckBox = CheckListCreatedEvent, .Type = EVENTTYPE.ListCreated}
2511 Return _eventCheckboxTable
2514 Private Sub GetEventNotifyFlag(ByRef eventnotifyflag As EVENTTYPE, ByRef isMyeventnotifyflag As EVENTTYPE)
2515 Dim evt As EVENTTYPE = EVENTTYPE.None
2516 Dim myevt As EVENTTYPE = EVENTTYPE.None
2518 For Each tbl As EventCheckboxTblElement In GetEventCheckboxTable()
2519 Select Case tbl.CheckBox.CheckState
2520 Case CheckState.Checked
2521 evt = evt Or tbl.Type
2522 myevt = myevt Or tbl.Type
2523 Case CheckState.Indeterminate
2524 evt = evt Or tbl.Type
2525 Case CheckState.Unchecked
2529 eventnotifyflag = evt
2530 isMyeventnotifyflag = myevt
2533 Private Sub ApplyEventNotifyFlag(ByVal rootEnabled As Boolean, ByVal eventnotifyflag As EVENTTYPE, ByVal isMyeventnotifyflag As EVENTTYPE)
2534 Dim evt = eventnotifyflag
2535 Dim myevt = isMyeventnotifyflag
2537 CheckEventNotify.Checked = rootEnabled
2539 For Each tbl As EventCheckboxTblElement In GetEventCheckboxTable()
2540 If CBool(evt And tbl.Type) Then
2541 If CBool(myevt And tbl.Type) Then
2542 tbl.CheckBox.CheckState = CheckState.Checked
2544 tbl.CheckBox.CheckState = CheckState.Indeterminate
2547 tbl.CheckBox.CheckState = CheckState.Unchecked
2549 tbl.CheckBox.Enabled = rootEnabled
2554 Private Sub CheckForceEventNotify_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckForceEventNotify.CheckedChanged
2555 _MyForceEventNotify = CheckEventNotify.Checked
2558 Private Sub CheckFavEventUnread_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckFavEventUnread.CheckedChanged
2559 _MyFavEventUnread = CheckFavEventUnread.Checked
2562 Private Sub ComboBoxTranslateLanguage_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxTranslateLanguage.SelectedIndexChanged
2563 _MyTranslateLanguage = (New Google).GetLanguageEnumFromIndex(ComboBoxTranslateLanguage.SelectedIndex)
2566 Private Sub SoundFileListup()
2567 If _MyEventSoundFile Is Nothing Then Exit Sub
2568 _soundfileListup = True
2569 ComboBoxEventNotifySound.Items.Clear()
2570 ComboBoxEventNotifySound.Items.Add("")
2571 Dim oDir As IO.DirectoryInfo = New IO.DirectoryInfo(My.Application.Info.DirectoryPath + IO.Path.DirectorySeparatorChar)
2572 If IO.Directory.Exists(IO.Path.Combine(My.Application.Info.DirectoryPath, "Sounds")) Then
2573 oDir = oDir.GetDirectories("Sounds")(0)
2575 For Each oFile As IO.FileInfo In oDir.GetFiles("*.wav")
2576 ComboBoxEventNotifySound.Items.Add(oFile.Name)
2578 Dim idx As Integer = ComboBoxEventNotifySound.Items.IndexOf(_MyEventSoundFile)
2579 If idx = -1 Then idx = 0
2580 ComboBoxEventNotifySound.SelectedIndex = idx
2581 _soundfileListup = False
2584 Private Sub ComboBoxEventNotifySound_VisibleChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxEventNotifySound.VisibleChanged
2588 Private Sub ComboBoxEventNotifySound_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxEventNotifySound.SelectedIndexChanged
2589 If _soundfileListup Then Exit Sub
2591 _MyEventSoundFile = DirectCast(ComboBoxEventNotifySound.SelectedItem, String)