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 _MyShortUrlForceResolve As Boolean
82 Private _MyProxyType As HttpConnection.ProxyType
83 Private _MyProxyAddress As String
84 Private _MyProxyPort As Integer
85 Private _MyProxyUser As String
86 Private _MyProxyPassword As String
87 Private _MyPeriodAdjust As Boolean
88 Private _MyStartupVersion As Boolean
89 Private _MyStartupFollowers As Boolean
90 Private _MyRestrictFavCheck As Boolean
91 Private _MyAlwaysTop As Boolean
92 Private _MyUrlConvertAuto As Boolean
93 Private _MyOutputz As Boolean
94 Private _MyOutputzKey As String
95 Private _MyOutputzUrlmode As OutputzUrlmode
96 Private _MyNicoms As Boolean
97 Private _MyUnreadStyle As Boolean
98 Private _MyDateTimeFormat As String
99 Private _MyDefaultTimeOut As Integer
100 Private _MyLimitBalloon As Boolean
101 Private _MyPostAndGet As Boolean
102 Private _MyReplyPeriod As Integer
103 Private _MyAutoShortUrlFirst As UrlConverter
104 Private _MyTabIconDisp As Boolean
105 Private _MyReplyIconState As REPLY_ICONSTATE
106 Private _MyReadOwnPost As Boolean
107 Private _MyGetFav As Boolean
108 Private _MyMonoSpace As Boolean
109 Private _MyReadOldPosts As Boolean
110 Private _MyUseSsl As Boolean
111 Private _MyBitlyId As String
112 Private _MyBitlyPw As String
113 Private _MyShowGrid As Boolean
114 Private _MyUseAtIdSupplement As Boolean
115 Private _MyUseHashSupplement As Boolean
116 Private _MyLanguage As String
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 _MyOpenUserTimeline As Boolean
131 Private _ValidationError As Boolean = False
132 Private _MyEventNotifyEnabled As Boolean
133 Private _MyEventNotifyFlag As EVENTTYPE
134 Private _isMyEventNotifyFlag As EVENTTYPE
135 Private _MyForceEventNotify As Boolean
136 Private _MyFavEventUnread As Boolean
137 Private _MyTranslateLanguage As String
138 Private _soundfileListup As Boolean = False
139 Private _MyEventSoundFile As String
141 Private _MyDoubleClickAction As Integer
142 Private _UserAppointUrl As String
143 Public Property HideDuplicatedRetweets As Boolean
145 Public Property IsPreviewFoursquare As Boolean
146 Public Property FoursquarePreviewHeight As Integer
147 Public Property FoursquarePreviewWidth As Integer
148 Public Property FoursquarePreviewZoom As Integer
150 Public Class IntervalChangedEventArgs
152 Public UserStream As Boolean
153 Public Timeline As Boolean
154 Public Reply As Boolean
155 Public DirectMessage As Boolean
156 Public PublicSearch As Boolean
157 Public Lists As Boolean
158 Public UserTimeline As Boolean
161 Public Event IntervalChanged(ByVal sender As Object, e As IntervalChangedEventArgs)
163 Private Sub TreeViewSetting_BeforeSelect(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewCancelEventArgs) Handles TreeViewSetting.BeforeSelect
164 If Me.TreeViewSetting.SelectedNode Is Nothing Then Exit Sub
165 Dim pnl = DirectCast(Me.TreeViewSetting.SelectedNode.Tag, Panel)
166 If pnl Is Nothing Then Exit Sub
171 Private Sub TreeViewSetting_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeViewSetting.AfterSelect
172 If e.Node Is Nothing Then Exit Sub
173 Dim pnl = DirectCast(e.Node.Tag, Panel)
174 If pnl Is Nothing Then Exit Sub
179 Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
180 If TweenMain.IsNetworkAvailable() AndAlso _
181 (ComboBoxAutoShortUrlFirst.SelectedIndex = UrlConverter.Bitly OrElse ComboBoxAutoShortUrlFirst.SelectedIndex = UrlConverter.Jmp) AndAlso _
182 (Not String.IsNullOrEmpty(TextBitlyId.Text) OrElse Not String.IsNullOrEmpty(TextBitlyPw.Text)) Then
183 If Not BitlyValidation(TextBitlyId.Text, TextBitlyPw.Text) Then
184 MessageBox.Show(My.Resources.SettingSave_ClickText1)
185 _ValidationError = True
186 TreeViewSetting.SelectedNode.Name = "TweetActNode" ' 動作タブを選択
190 _ValidationError = False
193 _ValidationError = False
196 Dim arg As New IntervalChangedEventArgs
197 Dim isIntervalChanged As Boolean = False
200 _MyUserstreamStartup = Me.StartupUserstreamCheck.Checked
202 If _MytimelinePeriod <> CType(TimelinePeriod.Text, Integer) Then
203 _MytimelinePeriod = CType(TimelinePeriod.Text, Integer)
205 isIntervalChanged = True
207 If _MyDMPeriod <> CType(DMPeriod.Text, Integer) Then
208 _MyDMPeriod = CType(DMPeriod.Text, Integer)
209 arg.DirectMessage = True
210 isIntervalChanged = True
212 If _MyPubSearchPeriod <> CType(PubSearchPeriod.Text, Integer) Then
213 _MyPubSearchPeriod = CType(PubSearchPeriod.Text, Integer)
214 arg.PublicSearch = True
215 isIntervalChanged = True
218 If _MyListsPeriod <> CType(ListsPeriod.Text, Integer) Then
219 _MyListsPeriod = CType(ListsPeriod.Text, Integer)
221 isIntervalChanged = True
223 If _MyReplyPeriod <> CType(ReplyPeriod.Text, Integer) Then
224 _MyReplyPeriod = CType(ReplyPeriod.Text, Integer)
226 isIntervalChanged = True
228 If _MyUserTimelinePeriod <> CType(UserTimelinePeriod.Text, Integer) Then
229 _MyUserTimelinePeriod = CType(UserTimelinePeriod.Text, Integer)
230 arg.UserTimeline = True
231 isIntervalChanged = True
234 If isIntervalChanged Then
235 RaiseEvent IntervalChanged(Me, arg)
238 _MyReaded = StartupReaded.Checked
239 Select Case IconSize.SelectedIndex
241 _MyIconSize = IconSizes.IconNone
243 _MyIconSize = IconSizes.Icon16
245 _MyIconSize = IconSizes.Icon24
247 _MyIconSize = IconSizes.Icon48
249 _MyIconSize = IconSizes.Icon48_2
251 _MyStatusText = StatusText.Text
252 _MyPlaySound = PlaySnd.Checked
253 _MyUnreadManage = UReadMng.Checked
254 _MyOneWayLove = OneWayLv.Checked
256 _fntUnread = lblUnread.Font '未使用
257 _clUnread = lblUnread.ForeColor
258 _fntReaded = lblListFont.Font 'リストフォントとして使用
259 _clReaded = lblListFont.ForeColor
260 _clFav = lblFav.ForeColor
261 _clOWL = lblOWL.ForeColor
262 _clRetweet = lblRetweet.ForeColor
263 _fntDetail = lblDetail.Font
264 _clSelf = lblSelf.BackColor
265 _clAtSelf = lblAtSelf.BackColor
266 _clTarget = lblTarget.BackColor
267 _clAtTarget = lblAtTarget.BackColor
268 _clAtFromTarget = lblAtFromTarget.BackColor
269 _clAtTo = lblAtTo.BackColor
270 _clInputBackcolor = lblInputBackcolor.BackColor
271 _clInputFont = lblInputFont.ForeColor
272 _clListBackcolor = lblListBackcolor.BackColor
273 _clDetailBackcolor = lblDetailBackcolor.BackColor
274 _clDetail = lblDetail.ForeColor
275 _clDetailLink = lblDetailLink.ForeColor
276 _fntInputFont = lblInputFont.Font
277 Select Case cmbNameBalloon.SelectedIndex
279 _MyNameBalloon = NameBalloonEnum.None
281 _MyNameBalloon = NameBalloonEnum.UserID
283 _MyNameBalloon = NameBalloonEnum.NickName
286 Select Case ComboBoxPostKeySelect.SelectedIndex
288 _MyPostShiftEnter = True
289 _MyPostCtrlEnter = False
291 _MyPostCtrlEnter = True
292 _MyPostShiftEnter = False
294 _MyPostCtrlEnter = False
295 _MyPostShiftEnter = False
297 _usePostMethod = False
298 _countApi = CType(TextCountApi.Text, Integer)
299 _countApiReply = CType(TextCountApiReply.Text, Integer)
300 _browserpath = BrowserPathText.Text.Trim
301 _MyPostAndGet = CheckPostAndGet.Checked
302 _MyUseRecommendStatus = CheckUseRecommendStatus.Checked
303 _MyDispUsername = CheckDispUsername.Checked
304 _MyCloseToExit = CheckCloseToExit.Checked
305 _MyMinimizeToTray = CheckMinimizeToTray.Checked
306 Select Case ComboDispTitle.SelectedIndex
308 _MyDispLatestPost = DispTitleEnum.None
310 _MyDispLatestPost = DispTitleEnum.Ver
312 _MyDispLatestPost = DispTitleEnum.Post
314 _MyDispLatestPost = DispTitleEnum.UnreadRepCount
316 _MyDispLatestPost = DispTitleEnum.UnreadAllCount
318 _MyDispLatestPost = DispTitleEnum.UnreadAllRepCount
320 _MyDispLatestPost = DispTitleEnum.UnreadCountAllCount
321 Case 7 'Count of Status/Follow/Follower
322 _MyDispLatestPost = DispTitleEnum.OwnStatus
324 _MySortOrderLock = CheckSortOrderLock.Checked
325 _MyTinyUrlResolve = CheckTinyURL.Checked
326 _MyShortUrlForceResolve = CheckForceResolve.Checked
327 ShortUrl.IsResolve = _MyTinyUrlResolve
328 ShortUrl.IsForceResolve = _MyShortUrlForceResolve
329 If RadioProxyNone.Checked Then
330 _MyProxyType = HttpConnection.ProxyType.None
331 ElseIf RadioProxyIE.Checked Then
332 _MyProxyType = HttpConnection.ProxyType.IE
334 _MyProxyType = HttpConnection.ProxyType.Specified
336 _MyProxyAddress = TextProxyAddress.Text.Trim()
337 _MyProxyPort = Integer.Parse(TextProxyPort.Text.Trim())
338 _MyProxyUser = TextProxyUser.Text.Trim()
339 _MyProxyPassword = TextProxyPassword.Text.Trim()
340 _MyPeriodAdjust = CheckPeriodAdjust.Checked
341 _MyStartupVersion = CheckStartupVersion.Checked
342 _MyStartupFollowers = CheckStartupFollowers.Checked
343 _MyRestrictFavCheck = CheckFavRestrict.Checked
344 _MyAlwaysTop = CheckAlwaysTop.Checked
345 _MyUrlConvertAuto = CheckAutoConvertUrl.Checked
346 _MyOutputz = CheckOutputz.Checked
347 _MyOutputzKey = TextBoxOutputzKey.Text.Trim()
349 Select Case ComboBoxOutputzUrlmode.SelectedIndex
351 _MyOutputzUrlmode = OutputzUrlmode.twittercom
353 _MyOutputzUrlmode = OutputzUrlmode.twittercomWithUsername
356 _MyNicoms = CheckNicoms.Checked
357 _MyUnreadStyle = chkUnreadStyle.Checked
358 _MyDateTimeFormat = CmbDateTimeFormat.Text
359 _MyDefaultTimeOut = CType(ConnectionTimeOut.Text, Integer)
360 _MyRetweetNoConfirm = CheckRetweetNoConfirm.Checked
361 _MyLimitBalloon = CheckBalloonLimit.Checked
362 _MyEventNotifyEnabled = CheckEventNotify.Checked
363 GetEventNotifyFlag(_MyEventNotifyFlag, _isMyEventNotifyFlag)
364 _MyForceEventNotify = CheckForceEventNotify.Checked
365 _MyFavEventUnread = CheckFavEventUnread.Checked
366 _MyTranslateLanguage = (New Google).GetLanguageEnumFromIndex(ComboBoxTranslateLanguage.SelectedIndex)
367 _MyEventSoundFile = CStr(ComboBoxEventNotifySound.SelectedItem)
368 _MyAutoShortUrlFirst = CType(ComboBoxAutoShortUrlFirst.SelectedIndex, UrlConverter)
369 _MyTabIconDisp = chkTabIconDisp.Checked
370 _MyReadOwnPost = chkReadOwnPost.Checked
371 _MyGetFav = chkGetFav.Checked
372 _MyMonoSpace = CheckMonospace.Checked
373 _MyReadOldPosts = CheckReadOldPosts.Checked
374 _MyUseSsl = CheckUseSsl.Checked
375 _MyBitlyId = TextBitlyId.Text
376 _MyBitlyPw = TextBitlyPw.Text
377 _MyShowGrid = CheckShowGrid.Checked
378 _MyUseAtIdSupplement = CheckAtIdSupple.Checked
379 _MyUseHashSupplement = CheckHashSupple.Checked
380 _MyPreviewEnable = CheckPreviewEnable.Checked
381 _MyTwitterApiUrl = TwitterAPIText.Text.Trim
382 _MyTwitterSearchApiUrl = TwitterSearchAPIText.Text.Trim
383 Select Case ReplyIconStateCombo.SelectedIndex
385 _MyReplyIconState = REPLY_ICONSTATE.None
387 _MyReplyIconState = REPLY_ICONSTATE.StaticIcon
389 _MyReplyIconState = REPLY_ICONSTATE.BlinkIcon
391 Select Case LanguageCombo.SelectedIndex
399 _MyLanguage = "zh-CN"
403 _HotkeyEnabled = Me.HotkeyCheck.Checked
404 _HotkeyMod = Keys.None
405 If Me.HotkeyAlt.Checked Then _HotkeyMod = _HotkeyMod Or Keys.Alt
406 If Me.HotkeyShift.Checked Then _HotkeyMod = _HotkeyMod Or Keys.Shift
407 If Me.HotkeyCtrl.Checked Then _HotkeyMod = _HotkeyMod Or Keys.Control
408 If Me.HotkeyWin.Checked Then _HotkeyMod = _HotkeyMod Or Keys.LWin
409 If IsNumeric(HotkeyCode.Text) Then _HotkeyValue = CInt(HotkeyCode.Text)
410 _HotkeyKey = DirectCast(HotkeyText.Tag, Keys)
411 _BlinkNewMentions = ChkNewMentionsBlink.Checked
412 _MyUseAdditonalCount = UseChangeGetCount.Checked
413 _MoreCountApi = CType(GetMoreTextCountApi.Text, Integer)
414 _FirstCountApi = CType(FirstTextCountApi.Text, Integer)
415 _SearchCountApi = CType(SearchTextCountApi.Text, Integer)
416 _FavoritesCountApi = CType(FavoritesTextCountApi.Text, Integer)
417 _UserTimelineCountApi = CType(UserTimelineTextCountApi.Text, Integer)
418 _ListCountApi = CType(ListTextCountApi.Text, Integer)
419 _MyOpenUserTimeline = CheckOpenUserTimeline.Checked
420 _MyDoubleClickAction = ListDoubleClickActionComboBox.SelectedIndex
421 _UserAppointUrl = UserAppointUrlText.Text
422 Me.HideDuplicatedRetweets = Me.HideDuplicatedRetweetsCheck.Checked
423 Me.IsPreviewFoursquare = Me.IsPreviewFoursquareCheckBox.Checked
424 Me.FoursquarePreviewHeight = CInt(Me.FoursquarePreviewHeightTextBox.Text)
425 Me.FoursquarePreviewWidth = CInt(Me.FoursquarePreviewWidthTextBox.Text)
426 Me.FoursquarePreviewZoom = CInt(Me.FoursquarePreviewZoomTextBox.Text)
427 Catch ex As Exception
428 MessageBox.Show(My.Resources.Save_ClickText3)
429 Me.DialogResult = Windows.Forms.DialogResult.Cancel
434 Private Sub Setting_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
435 If tw IsNot Nothing AndAlso tw.Username = "" AndAlso e.CloseReason = CloseReason.None Then
436 If MessageBox.Show(My.Resources.Setting_FormClosing1, "Confirm", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Cancel Then
440 If _ValidationError Then
443 If e.Cancel = False AndAlso TreeViewSetting.SelectedNode IsNot Nothing Then
444 Dim curPanel As Panel = CType(TreeViewSetting.SelectedNode.Tag, Panel)
445 curPanel.Visible = False
446 curPanel.Enabled = False
450 Private Sub Setting_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load
451 tw = DirectCast(Me.Owner, TweenMain).TwitterInstance
452 Dim uname As String = tw.Username
453 Dim pw As String = tw.Password
454 Dim tk As String = tw.AccessToken
455 Dim tks As String = tw.AccessTokenSecret
456 Me.AuthStateLabel.Enabled = True
457 Me.AuthUserLabel.Enabled = True
458 Me.AuthClearButton.Enabled = True
459 'tw.Initialize(tk, tks, uname)
461 Username.Text = uname
463 If tw.Username = "" Then
464 Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click4
465 Me.AuthUserLabel.Text = ""
466 Me.Save.Enabled = False
468 Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click3
469 If TwitterApiInfo.AccessLevel = ApiAccessLevel.ReadWrite Then
470 Me.AuthStateLabel.Text += "(xAuth)"
471 ElseIf TwitterApiInfo.AccessLevel = ApiAccessLevel.ReadWriteAndDirectMessage Then
472 Me.AuthStateLabel.Text += "(OAuth)"
474 Me.AuthUserLabel.Text = tw.Username
477 Me.StartupUserstreamCheck.Checked = _MyUserstreamStartup
478 TimelinePeriod.Text = _MytimelinePeriod.ToString()
479 ReplyPeriod.Text = _MyReplyPeriod.ToString()
480 DMPeriod.Text = _MyDMPeriod.ToString()
481 PubSearchPeriod.Text = _MyPubSearchPeriod.ToString()
482 ListsPeriod.Text = _MyListsPeriod.ToString()
483 UserTimelinePeriod.Text = _MyUserTimelinePeriod.ToString
485 StartupReaded.Checked = _MyReaded
486 Select Case _MyIconSize
487 Case IconSizes.IconNone
488 IconSize.SelectedIndex = 0
489 Case IconSizes.Icon16
490 IconSize.SelectedIndex = 1
491 Case IconSizes.Icon24
492 IconSize.SelectedIndex = 2
493 Case IconSizes.Icon48
494 IconSize.SelectedIndex = 3
495 Case IconSizes.Icon48_2
496 IconSize.SelectedIndex = 4
498 StatusText.Text = _MyStatusText
499 UReadMng.Checked = _MyUnreadManage
500 If _MyUnreadManage = False Then
501 StartupReaded.Enabled = False
503 StartupReaded.Enabled = True
505 PlaySnd.Checked = _MyPlaySound
506 OneWayLv.Checked = _MyOneWayLove
508 lblListFont.Font = _fntReaded
509 lblUnread.Font = _fntUnread
510 lblUnread.ForeColor = _clUnread
511 lblListFont.ForeColor = _clReaded
512 lblFav.ForeColor = _clFav
513 lblOWL.ForeColor = _clOWL
514 lblRetweet.ForeColor = _clRetweet
515 lblDetail.Font = _fntDetail
516 lblSelf.BackColor = _clSelf
517 lblAtSelf.BackColor = _clAtSelf
518 lblTarget.BackColor = _clTarget
519 lblAtTarget.BackColor = _clAtTarget
520 lblAtFromTarget.BackColor = _clAtFromTarget
521 lblAtTo.BackColor = _clAtTo
522 lblInputBackcolor.BackColor = _clInputBackcolor
523 lblInputFont.ForeColor = _clInputFont
524 lblInputFont.Font = _fntInputFont
525 lblListBackcolor.BackColor = _clListBackcolor
526 lblDetailBackcolor.BackColor = _clDetailBackcolor
527 lblDetail.ForeColor = _clDetail
528 lblDetailLink.ForeColor = _clDetailLink
530 Select Case _MyNameBalloon
531 Case NameBalloonEnum.None
532 cmbNameBalloon.SelectedIndex = 0
533 Case NameBalloonEnum.UserID
534 cmbNameBalloon.SelectedIndex = 1
535 Case NameBalloonEnum.NickName
536 cmbNameBalloon.SelectedIndex = 2
539 If _MyPostCtrlEnter Then
540 ComboBoxPostKeySelect.SelectedIndex = 1
541 ElseIf _MyPostShiftEnter Then
542 ComboBoxPostKeySelect.SelectedIndex = 2
544 ComboBoxPostKeySelect.SelectedIndex = 0
547 TextCountApi.Text = _countApi.ToString
548 TextCountApiReply.Text = _countApiReply.ToString
549 BrowserPathText.Text = _browserpath
550 CheckPostAndGet.Checked = _MyPostAndGet
551 CheckUseRecommendStatus.Checked = _MyUseRecommendStatus
552 CheckDispUsername.Checked = _MyDispUsername
553 CheckCloseToExit.Checked = _MyCloseToExit
554 CheckMinimizeToTray.Checked = _MyMinimizeToTray
555 Select Case _MyDispLatestPost
556 Case DispTitleEnum.None
557 ComboDispTitle.SelectedIndex = 0
558 Case DispTitleEnum.Ver
559 ComboDispTitle.SelectedIndex = 1
560 Case DispTitleEnum.Post
561 ComboDispTitle.SelectedIndex = 2
562 Case DispTitleEnum.UnreadRepCount
563 ComboDispTitle.SelectedIndex = 3
564 Case DispTitleEnum.UnreadAllCount
565 ComboDispTitle.SelectedIndex = 4
566 Case DispTitleEnum.UnreadAllRepCount
567 ComboDispTitle.SelectedIndex = 5
568 Case DispTitleEnum.UnreadCountAllCount
569 ComboDispTitle.SelectedIndex = 6
570 Case DispTitleEnum.OwnStatus
571 ComboDispTitle.SelectedIndex = 7
573 CheckSortOrderLock.Checked = _MySortOrderLock
574 CheckTinyURL.Checked = _MyTinyUrlResolve
575 CheckForceResolve.Checked = _MyShortUrlForceResolve
576 Select Case _MyProxyType
577 Case HttpConnection.ProxyType.None
578 RadioProxyNone.Checked = True
579 Case HttpConnection.ProxyType.IE
580 RadioProxyIE.Checked = True
582 RadioProxySpecified.Checked = True
584 Dim chk As Boolean = RadioProxySpecified.Checked
585 LabelProxyAddress.Enabled = chk
586 TextProxyAddress.Enabled = chk
587 LabelProxyPort.Enabled = chk
588 TextProxyPort.Enabled = chk
589 LabelProxyUser.Enabled = chk
590 TextProxyUser.Enabled = chk
591 LabelProxyPassword.Enabled = chk
592 TextProxyPassword.Enabled = chk
594 TextProxyAddress.Text = _MyProxyAddress
595 TextProxyPort.Text = _MyProxyPort.ToString
596 TextProxyUser.Text = _MyProxyUser
597 TextProxyPassword.Text = _MyProxyPassword
599 CheckPeriodAdjust.Checked = _MyPeriodAdjust
600 CheckStartupVersion.Checked = _MyStartupVersion
601 CheckStartupFollowers.Checked = _MyStartupFollowers
602 CheckFavRestrict.Checked = _MyRestrictFavCheck
603 CheckAlwaysTop.Checked = _MyAlwaysTop
604 CheckAutoConvertUrl.Checked = _MyUrlConvertAuto
605 CheckOutputz.Checked = _MyOutputz
606 TextBoxOutputzKey.Text = _MyOutputzKey
608 Select Case _MyOutputzUrlmode
609 Case OutputzUrlmode.twittercom
610 ComboBoxOutputzUrlmode.SelectedIndex = 0
611 Case OutputzUrlmode.twittercomWithUsername
612 ComboBoxOutputzUrlmode.SelectedIndex = 1
615 CheckNicoms.Checked = _MyNicoms
616 chkUnreadStyle.Checked = _MyUnreadStyle
617 CmbDateTimeFormat.Text = _MyDateTimeFormat
618 ConnectionTimeOut.Text = _MyDefaultTimeOut.ToString
619 CheckRetweetNoConfirm.Checked = _MyRetweetNoConfirm
620 CheckBalloonLimit.Checked = _MyLimitBalloon
622 ApplyEventNotifyFlag(_MyEventNotifyEnabled, _MyEventNotifyFlag, _isMyEventNotifyFlag)
623 CheckForceEventNotify.Checked = _MyForceEventNotify
624 CheckFavEventUnread.Checked = _MyFavEventUnread
625 ComboBoxTranslateLanguage.SelectedIndex = (New Google).GetIndexFromLanguageEnum(_MyTranslateLanguage)
627 ComboBoxAutoShortUrlFirst.SelectedIndex = _MyAutoShortUrlFirst
628 chkTabIconDisp.Checked = _MyTabIconDisp
629 chkReadOwnPost.Checked = _MyReadOwnPost
630 chkGetFav.Checked = _MyGetFav
631 CheckMonospace.Checked = _MyMonoSpace
632 CheckReadOldPosts.Checked = _MyReadOldPosts
633 CheckUseSsl.Checked = _MyUseSsl
634 TextBitlyId.Text = _MyBitlyId
635 TextBitlyPw.Text = _MyBitlyPw
636 TextBitlyId.Modified = False
637 TextBitlyPw.Modified = False
638 CheckShowGrid.Checked = _MyShowGrid
639 CheckAtIdSupple.Checked = _MyUseAtIdSupplement
640 CheckHashSupple.Checked = _MyUseHashSupplement
641 CheckPreviewEnable.Checked = _MyPreviewEnable
642 TwitterAPIText.Text = _MyTwitterApiUrl
643 TwitterSearchAPIText.Text = _MyTwitterSearchApiUrl
644 Select Case _MyReplyIconState
645 Case REPLY_ICONSTATE.None
646 ReplyIconStateCombo.SelectedIndex = 0
647 Case REPLY_ICONSTATE.StaticIcon
648 ReplyIconStateCombo.SelectedIndex = 1
649 Case REPLY_ICONSTATE.BlinkIcon
650 ReplyIconStateCombo.SelectedIndex = 2
652 Select Case _MyLanguage
654 LanguageCombo.SelectedIndex = 0
656 LanguageCombo.SelectedIndex = 1
658 LanguageCombo.SelectedIndex = 2
660 LanguageCombo.SelectedIndex = 3
662 LanguageCombo.SelectedIndex = 0
664 HotkeyCheck.Checked = _HotkeyEnabled
665 HotkeyAlt.Checked = ((_HotkeyMod And Keys.Alt) = Keys.Alt)
666 HotkeyCtrl.Checked = ((_HotkeyMod And Keys.Control) = Keys.Control)
667 HotkeyShift.Checked = ((_HotkeyMod And Keys.Shift) = Keys.Shift)
668 HotkeyWin.Checked = ((_HotkeyMod And Keys.LWin) = Keys.LWin)
669 HotkeyCode.Text = _HotkeyValue.ToString
670 HotkeyText.Text = _HotkeyKey.ToString
671 HotkeyText.Tag = _HotkeyKey
672 HotkeyAlt.Enabled = HotkeyEnabled
673 HotkeyShift.Enabled = HotkeyEnabled
674 HotkeyCtrl.Enabled = HotkeyEnabled
675 HotkeyWin.Enabled = HotkeyEnabled
676 HotkeyText.Enabled = HotkeyEnabled
677 HotkeyCode.Enabled = HotkeyEnabled
678 ChkNewMentionsBlink.Checked = _BlinkNewMentions
680 CheckOutputz_CheckedChanged(sender, e)
682 GetMoreTextCountApi.Text = _MoreCountApi.ToString
683 FirstTextCountApi.Text = _FirstCountApi.ToString
684 SearchTextCountApi.Text = _SearchCountApi.ToString
685 FavoritesTextCountApi.Text = _FavoritesCountApi.ToString
686 UserTimelineTextCountApi.Text = _UserTimelineCountApi.ToString
687 ListTextCountApi.Text = _ListCountApi.ToString
688 UseChangeGetCount.Checked = _MyUseAdditonalCount
689 Label28.Enabled = UseChangeGetCount.Checked
690 Label30.Enabled = UseChangeGetCount.Checked
691 Label53.Enabled = UseChangeGetCount.Checked
692 Label66.Enabled = UseChangeGetCount.Checked
693 Label17.Enabled = UseChangeGetCount.Checked
694 Label25.Enabled = UseChangeGetCount.Checked
695 GetMoreTextCountApi.Enabled = UseChangeGetCount.Checked
696 FirstTextCountApi.Enabled = UseChangeGetCount.Checked
697 SearchTextCountApi.Enabled = UseChangeGetCount.Checked
698 FavoritesTextCountApi.Enabled = UseChangeGetCount.Checked
699 UserTimelineTextCountApi.Enabled = UseChangeGetCount.Checked
700 ListTextCountApi.Enabled = UseChangeGetCount.Checked
701 CheckOpenUserTimeline.Checked = _MyOpenUserTimeline
702 ListDoubleClickActionComboBox.SelectedIndex = _MyDoubleClickAction
703 UserAppointUrlText.Text = _UserAppointUrl
704 Me.HideDuplicatedRetweetsCheck.Checked = Me.HideDuplicatedRetweets
705 Me.IsPreviewFoursquareCheckBox.Checked = Me.IsPreviewFoursquare
706 Me.FoursquarePreviewHeightTextBox.Text = Me.FoursquarePreviewHeight.ToString
707 Me.FoursquarePreviewWidthTextBox.Text = Me.FoursquarePreviewWidth.ToString
708 Me.FoursquarePreviewZoomTextBox.Text = Me.FoursquarePreviewZoom.ToString
710 With Me.TreeViewSetting
711 .Nodes("BasedNode").Tag = BasedPanel
712 .Nodes("BasedNode").Nodes("PeriodNode").Tag = GetPeriodPanel
713 .Nodes("BasedNode").Nodes("StartUpNode").Tag = StartupPanel
714 .Nodes("BasedNode").Nodes("GetCountNode").Tag = GetCountPanel
715 '.Nodes("BasedNode").Nodes("UserStreamNode").Tag = UserStreamPanel
716 .Nodes("ActionNode").Tag = ActionPanel
717 .Nodes("ActionNode").Nodes("TweetActNode").Tag = TweetActPanel
718 .Nodes("PreviewNode").Tag = PreviewPanel
719 .Nodes("PreviewNode").Nodes("TweetPrvNode").Tag = TweetPrvPanel
720 .Nodes("PreviewNode").Nodes("NotifyNode").Tag = NotifyPanel
721 .Nodes("FontNode").Tag = FontPanel
722 .Nodes("FontNode").Nodes("FontNode2").Tag = FontPanel2
723 .Nodes("ConnectionNode").Tag = ConnectionPanel
724 .Nodes("ConnectionNode").Nodes("ProxyNode").Tag = ProxyPanel
725 .Nodes("ConnectionNode").Nodes("CooperateNode").Tag = CooperatePanel
726 .Nodes("ConnectionNode").Nodes("ShortUrlNode").Tag = ShortUrlPanel
728 .SelectedNode = .Nodes(0)
731 'TreeViewSetting.SelectedNode = TreeViewSetting.TopNode
732 ActiveControl = Username
735 Private Sub TimelinePeriod_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TimelinePeriod.Validating
738 prd = CType(TimelinePeriod.Text, Integer)
739 Catch ex As Exception
740 MessageBox.Show(My.Resources.TimelinePeriod_ValidatingText1)
745 If prd <> 0 AndAlso (prd < 15 OrElse prd > 6000) Then
746 MessageBox.Show(My.Resources.TimelinePeriod_ValidatingText2)
753 Private Sub ReplyPeriod_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ReplyPeriod.Validating
756 prd = CType(ReplyPeriod.Text, Integer)
757 Catch ex As Exception
758 MessageBox.Show(My.Resources.TimelinePeriod_ValidatingText1)
763 If prd <> 0 AndAlso (prd < 15 OrElse prd > 6000) Then
764 MessageBox.Show(My.Resources.TimelinePeriod_ValidatingText2)
771 Private Sub DMPeriod_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles DMPeriod.Validating
774 prd = CType(DMPeriod.Text, Integer)
775 Catch ex As Exception
776 MessageBox.Show(My.Resources.DMPeriod_ValidatingText1)
781 If prd <> 0 AndAlso (prd < 15 OrElse prd > 6000) Then
782 MessageBox.Show(My.Resources.DMPeriod_ValidatingText2)
789 Private Sub PubSearchPeriod_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles PubSearchPeriod.Validating
792 prd = CType(PubSearchPeriod.Text, Integer)
793 Catch ex As Exception
794 MessageBox.Show(My.Resources.PubSearchPeriod_ValidatingText1)
799 If prd <> 0 AndAlso (prd < 30 OrElse prd > 6000) Then
800 MessageBox.Show(My.Resources.PubSearchPeriod_ValidatingText2)
805 Private Sub ListsPeriod_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ListsPeriod.Validating
808 prd = CType(ListsPeriod.Text, Integer)
809 Catch ex As Exception
810 MessageBox.Show(My.Resources.DMPeriod_ValidatingText1)
815 If prd <> 0 AndAlso (prd < 15 OrElse prd > 6000) Then
816 MessageBox.Show(My.Resources.DMPeriod_ValidatingText2)
823 Private Sub UserTimeline_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles UserTimelinePeriod.Validating
826 prd = CType(UserTimelinePeriod.Text, Integer)
827 Catch ex As Exception
828 MessageBox.Show(My.Resources.DMPeriod_ValidatingText1)
833 If prd <> 0 AndAlso (prd < 15 OrElse prd > 6000) Then
834 MessageBox.Show(My.Resources.DMPeriod_ValidatingText2)
841 Private Sub UReadMng_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UReadMng.CheckedChanged
842 If UReadMng.Checked = True Then
843 StartupReaded.Enabled = True
845 StartupReaded.Enabled = False
849 Private Sub btnFontAndColor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUnread.Click, btnDetail.Click, btnListFont.Click, btnInputFont.Click
850 Dim Btn As Button = CType(sender, Button)
851 Dim rtn As DialogResult
853 FontDialog1.AllowVerticalFonts = False
854 FontDialog1.AllowScriptChange = True
855 FontDialog1.AllowSimulations = True
856 FontDialog1.AllowVectorFonts = True
857 FontDialog1.FixedPitchOnly = False
858 FontDialog1.FontMustExist = True
859 FontDialog1.ScriptsOnly = False
860 FontDialog1.ShowApply = False
861 FontDialog1.ShowEffects = True
862 FontDialog1.ShowColor = True
866 FontDialog1.Color = lblUnread.ForeColor
867 FontDialog1.Font = lblUnread.Font
869 FontDialog1.Color = lblDetail.ForeColor
870 FontDialog1.Font = lblDetail.Font
872 FontDialog1.Color = lblListFont.ForeColor
873 FontDialog1.Font = lblListFont.Font
875 FontDialog1.Color = lblInputFont.ForeColor
876 FontDialog1.Font = lblInputFont.Font
880 rtn = FontDialog1.ShowDialog
881 Catch ex As ArgumentException
882 MessageBox.Show(ex.Message)
886 If rtn = Windows.Forms.DialogResult.Cancel Then Exit Sub
890 lblUnread.ForeColor = FontDialog1.Color
891 lblUnread.Font = FontDialog1.Font
893 lblDetail.ForeColor = FontDialog1.Color
894 lblDetail.Font = FontDialog1.Font
896 lblListFont.ForeColor = FontDialog1.Color
897 lblListFont.Font = FontDialog1.Font
899 lblInputFont.ForeColor = FontDialog1.Color
900 lblInputFont.Font = FontDialog1.Font
905 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
906 Dim Btn As Button = CType(sender, Button)
907 Dim rtn As DialogResult
909 ColorDialog1.AllowFullOpen = True
910 ColorDialog1.AnyColor = True
911 ColorDialog1.FullOpen = False
912 ColorDialog1.SolidColorOnly = False
916 ColorDialog1.Color = lblSelf.BackColor
918 ColorDialog1.Color = lblAtSelf.BackColor
920 ColorDialog1.Color = lblTarget.BackColor
922 ColorDialog1.Color = lblAtTarget.BackColor
923 Case "btnAtFromTarget"
924 ColorDialog1.Color = lblAtFromTarget.BackColor
926 ColorDialog1.Color = lblFav.ForeColor
928 ColorDialog1.Color = lblOWL.ForeColor
930 ColorDialog1.Color = lblRetweet.ForeColor
931 Case "btnInputBackcolor"
932 ColorDialog1.Color = lblInputBackcolor.BackColor
934 ColorDialog1.Color = lblAtTo.BackColor
936 ColorDialog1.Color = lblListBackcolor.BackColor
938 ColorDialog1.Color = lblDetailBackcolor.BackColor
940 ColorDialog1.Color = lblDetailLink.ForeColor
943 rtn = ColorDialog1.ShowDialog
945 If rtn = Windows.Forms.DialogResult.Cancel Then Exit Sub
949 lblSelf.BackColor = ColorDialog1.Color
951 lblAtSelf.BackColor = ColorDialog1.Color
953 lblTarget.BackColor = ColorDialog1.Color
955 lblAtTarget.BackColor = ColorDialog1.Color
956 Case "btnAtFromTarget"
957 lblAtFromTarget.BackColor = ColorDialog1.Color
959 lblFav.ForeColor = ColorDialog1.Color
961 lblOWL.ForeColor = ColorDialog1.Color
963 lblRetweet.ForeColor = ColorDialog1.Color
964 Case "btnInputBackcolor"
965 lblInputBackcolor.BackColor = ColorDialog1.Color
967 lblAtTo.BackColor = ColorDialog1.Color
969 lblListBackcolor.BackColor = ColorDialog1.Color
971 lblDetailBackcolor.BackColor = ColorDialog1.Color
973 lblDetailLink.ForeColor = ColorDialog1.Color
977 Public Property UserstreamStartup() As Boolean
979 Return Me._MyUserstreamStartup
981 Set(ByVal value As Boolean)
982 Me._MyUserstreamStartup = value
986 Public Property TimelinePeriodInt() As Integer
988 Return _MytimelinePeriod
990 Set(ByVal value As Integer)
991 _MytimelinePeriod = value
995 Public Property ReplyPeriodInt() As Integer
997 Return _MyReplyPeriod
999 Set(ByVal value As Integer)
1000 _MyReplyPeriod = value
1004 Public Property DMPeriodInt() As Integer
1008 Set(ByVal value As Integer)
1013 Public Property PubSearchPeriodInt() As Integer
1015 Return _MyPubSearchPeriod
1017 Set(ByVal value As Integer)
1018 _MyPubSearchPeriod = value
1022 Public Property ListsPeriodInt() As Integer
1024 Return _MyListsPeriod
1026 Set(ByVal value As Integer)
1027 _MyListsPeriod = value
1031 Public Property UserTimelinePeriodInt() As Integer
1033 Return _MyUserTimelinePeriod
1035 Set(ByVal value As Integer)
1036 _MyUserTimelinePeriod = value
1040 Public Property Readed() As Boolean
1044 Set(ByVal value As Boolean)
1049 Public Property IconSz() As IconSizes
1053 Set(ByVal value As IconSizes)
1058 Public Property Status() As String
1060 Return _MyStatusText
1062 Set(ByVal value As String)
1063 _MyStatusText = value
1067 Public Property UnreadManage() As Boolean
1069 Return _MyUnreadManage
1071 Set(ByVal value As Boolean)
1072 _MyUnreadManage = value
1076 Public Property PlaySound() As Boolean
1080 Set(ByVal value As Boolean)
1081 _MyPlaySound = value
1085 Public Property OneWayLove() As Boolean
1087 Return _MyOneWayLove
1089 Set(ByVal value As Boolean)
1090 _MyOneWayLove = value
1095 Public Property FontUnread() As Font
1099 Set(ByVal value As Font)
1105 Public Property ColorUnread() As Color
1109 Set(ByVal value As Color)
1115 Public Property FontReaded() As Font
1119 Set(ByVal value As Font)
1124 Public Property ColorReaded() As Color
1128 Set(ByVal value As Color)
1133 Public Property ColorFav() As Color
1137 Set(ByVal value As Color)
1142 Public Property ColorOWL() As Color
1146 Set(ByVal value As Color)
1151 Public Property ColorRetweet() As Color
1155 Set(ByVal value As Color)
1160 Public Property FontDetail() As Font
1164 Set(ByVal value As Font)
1169 Public Property ColorDetail() As Color
1173 Set(ByVal value As Color)
1178 Public Property ColorDetailLink() As Color
1180 Return _clDetailLink
1182 Set(ByVal value As Color)
1183 _clDetailLink = value
1187 Public Property ColorSelf() As Color
1191 Set(ByVal value As Color)
1196 Public Property ColorAtSelf() As Color
1200 Set(ByVal value As Color)
1205 Public Property ColorTarget() As Color
1209 Set(ByVal value As Color)
1214 Public Property ColorAtTarget() As Color
1218 Set(ByVal value As Color)
1223 Public Property ColorAtFromTarget() As Color
1225 Return _clAtFromTarget
1227 Set(ByVal value As Color)
1228 _clAtFromTarget = value
1232 Public Property ColorAtTo() As Color
1236 Set(ByVal value As Color)
1241 Public Property ColorInputBackcolor() As Color
1243 Return _clInputBackcolor
1245 Set(ByVal value As Color)
1246 _clInputBackcolor = value
1250 Public Property ColorInputFont() As Color
1254 Set(ByVal value As Color)
1255 _clInputFont = value
1259 Public Property FontInputFont() As Font
1261 Return _fntInputFont
1263 Set(ByVal value As Font)
1264 _fntInputFont = value
1268 Public Property ColorListBackcolor() As Color
1270 Return _clListBackcolor
1272 Set(ByVal value As Color)
1273 _clListBackcolor = value
1277 Public Property ColorDetailBackcolor() As Color
1279 Return _clDetailBackcolor
1281 Set(ByVal value As Color)
1282 _clDetailBackcolor = value
1286 Public Property NameBalloon() As NameBalloonEnum
1288 Return _MyNameBalloon
1290 Set(ByVal value As NameBalloonEnum)
1291 _MyNameBalloon = value
1295 Public Property PostCtrlEnter() As Boolean
1297 Return _MyPostCtrlEnter
1299 Set(ByVal value As Boolean)
1300 _MyPostCtrlEnter = value
1304 Public Property PostShiftEnter() As Boolean
1306 Return _MyPostShiftEnter
1308 Set(ByVal value As Boolean)
1309 _MyPostShiftEnter = value
1313 Public Property CountApi() As Integer
1317 Set(ByVal value As Integer)
1322 Public Property CountApiReply() As Integer
1324 Return _countApiReply
1326 Set(ByVal value As Integer)
1327 _countApiReply = value
1331 Public Property MoreCountApi() As Integer
1333 Return _MoreCountApi
1335 Set(ByVal value As Integer)
1336 _MoreCountApi = value
1340 Public Property FirstCountApi() As Integer
1342 Return _FirstCountApi
1344 Set(ByVal value As Integer)
1345 _FirstCountApi = value
1349 Public Property SearchCountApi() As Integer
1351 Return _SearchCountApi
1353 Set(ByVal value As Integer)
1354 _SearchCountApi = value
1358 Public Property FavoritesCountApi() As Integer
1360 Return _FavoritesCountApi
1362 Set(ByVal value As Integer)
1363 _FavoritesCountApi = value
1367 Public Property UserTimelineCountApi() As Integer
1369 Return _UserTimelineCountApi
1371 Set(ByVal value As Integer)
1372 _UserTimelineCountApi = value
1376 Public Property ListCountApi() As Integer
1378 Return _ListCountApi
1380 Set(ByVal value As Integer)
1381 _ListCountApi = value
1385 Public Property PostAndGet() As Boolean
1387 Return _MyPostAndGet
1389 Set(ByVal value As Boolean)
1390 _MyPostAndGet = value
1394 Public Property UseRecommendStatus() As Boolean
1396 Return _MyUseRecommendStatus
1398 Set(ByVal value As Boolean)
1399 _MyUseRecommendStatus = value
1403 Public Property RecommendStatusText() As String
1405 Return _MyRecommendStatusText
1407 Set(ByVal value As String)
1408 _MyRecommendStatusText = value
1412 Public Property DispUsername() As Boolean
1414 Return _MyDispUsername
1416 Set(ByVal value As Boolean)
1417 _MyDispUsername = value
1421 Public Property CloseToExit() As Boolean
1423 Return _MyCloseToExit
1425 Set(ByVal value As Boolean)
1426 _MyCloseToExit = value
1430 Public Property MinimizeToTray() As Boolean
1432 Return _MyMinimizeToTray
1434 Set(ByVal value As Boolean)
1435 _MyMinimizeToTray = value
1439 Public Property DispLatestPost() As DispTitleEnum
1441 Return _MyDispLatestPost
1443 Set(ByVal value As DispTitleEnum)
1444 _MyDispLatestPost = value
1448 Public Property BrowserPath() As String
1452 Set(ByVal value As String)
1453 _browserpath = value
1457 Public Property TinyUrlResolve() As Boolean
1459 Return _MyTinyUrlResolve
1461 Set(ByVal value As Boolean)
1462 _MyTinyUrlResolve = value
1466 Public Property ShortUrlForceResolve() As Boolean
1468 Return _MyShortUrlForceResolve
1470 Set(ByVal value As Boolean)
1471 _MyShortUrlForceResolve = value
1475 Private Sub CheckUseRecommendStatus_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckUseRecommendStatus.CheckedChanged
1476 If CheckUseRecommendStatus.Checked = True Then
1477 StatusText.Enabled = False
1479 StatusText.Enabled = True
1483 Public Property SortOrderLock() As Boolean
1485 Return _MySortOrderLock
1487 Set(ByVal value As Boolean)
1488 _MySortOrderLock = value
1492 Public Property SelectedProxyType() As HttpConnection.ProxyType
1496 Set(ByVal value As HttpConnection.ProxyType)
1497 _MyProxyType = value
1501 Public Property ProxyAddress() As String
1503 Return _MyProxyAddress
1505 Set(ByVal value As String)
1506 _MyProxyAddress = value
1510 Public Property ProxyPort() As Integer
1514 Set(ByVal value As Integer)
1515 _MyProxyPort = value
1519 Public Property ProxyUser() As String
1523 Set(ByVal value As String)
1524 _MyProxyUser = value
1528 Public Property ProxyPassword() As String
1530 Return _MyProxyPassword
1532 Set(ByVal value As String)
1533 _MyProxyPassword = value
1537 Public Property PeriodAdjust() As Boolean
1539 Return _MyPeriodAdjust
1541 Set(ByVal value As Boolean)
1542 _MyPeriodAdjust = value
1546 Public Property StartupVersion() As Boolean
1548 Return _MyStartupVersion
1550 Set(ByVal value As Boolean)
1551 _MyStartupVersion = value
1555 Public Property StartupFollowers() As Boolean
1557 Return _MyStartupFollowers
1559 Set(ByVal value As Boolean)
1560 _MyStartupFollowers = value
1564 Public Property RestrictFavCheck() As Boolean
1566 Return _MyRestrictFavCheck
1568 Set(ByVal value As Boolean)
1569 _MyRestrictFavCheck = value
1573 Public Property AlwaysTop() As Boolean
1577 Set(ByVal value As Boolean)
1578 _MyAlwaysTop = value
1582 Public Property UrlConvertAuto() As Boolean
1584 Return _MyUrlConvertAuto
1586 Set(ByVal value As Boolean)
1587 _MyUrlConvertAuto = value
1590 Public Property OutputzEnabled() As Boolean
1594 Set(ByVal value As Boolean)
1598 Public Property OutputzKey() As String
1600 Return _MyOutputzKey
1602 Set(ByVal value As String)
1603 _MyOutputzKey = value
1606 Public Property OutputzUrlmode() As OutputzUrlmode
1608 Return _MyOutputzUrlmode
1610 Set(ByVal value As OutputzUrlmode)
1611 _MyOutputzUrlmode = value
1615 Public Property Nicoms() As Boolean
1619 Set(ByVal value As Boolean)
1623 Public Property AutoShortUrlFirst() As UrlConverter
1625 Return _MyAutoShortUrlFirst
1627 Set(ByVal value As UrlConverter)
1628 _MyAutoShortUrlFirst = value
1632 Public Property UseUnreadStyle() As Boolean
1634 Return _MyUnreadStyle
1636 Set(ByVal value As Boolean)
1637 _MyUnreadStyle = value
1641 Public Property DateTimeFormat() As String
1643 Return _MyDateTimeFormat
1645 Set(ByVal value As String)
1646 _MyDateTimeFormat = value
1650 Public Property DefaultTimeOut() As Integer
1652 Return _MyDefaultTimeOut
1654 Set(ByVal value As Integer)
1655 _MyDefaultTimeOut = value
1659 Public Property RetweetNoConfirm() As Boolean
1661 Return _MyRetweetNoConfirm
1663 Set(ByVal value As Boolean)
1664 _MyRetweetNoConfirm = value
1668 Public Property TabIconDisp() As Boolean
1670 Return _MyTabIconDisp
1672 Set(ByVal value As Boolean)
1673 _MyTabIconDisp = value
1677 Public Property ReplyIconState() As REPLY_ICONSTATE
1679 Return _MyReplyIconState
1681 Set(ByVal value As REPLY_ICONSTATE)
1682 _MyReplyIconState = value
1686 Public Property ReadOwnPost() As Boolean
1688 Return _MyReadOwnPost
1690 Set(ByVal value As Boolean)
1691 _MyReadOwnPost = value
1695 Public Property GetFav() As Boolean
1699 Set(ByVal value As Boolean)
1704 Public Property IsMonospace() As Boolean
1708 Set(ByVal value As Boolean)
1709 _MyMonoSpace = value
1713 Public Property ReadOldPosts() As Boolean
1715 Return _MyReadOldPosts
1717 Set(ByVal value As Boolean)
1718 _MyReadOldPosts = value
1722 Public Property UseSsl() As Boolean
1726 Set(ByVal value As Boolean)
1731 Public Property BitlyUser() As String
1735 Set(ByVal value As String)
1740 Public Property BitlyPwd() As String
1744 Set(ByVal value As String)
1749 Public Property ShowGrid() As Boolean
1753 Set(ByVal value As Boolean)
1758 Public Property UseAtIdSupplement() As Boolean
1760 Return _MyUseAtIdSupplement
1762 Set(ByVal value As Boolean)
1763 _MyUseAtIdSupplement = value
1767 Public Property UseHashSupplement() As Boolean
1769 Return _MyUseHashSupplement
1771 Set(ByVal value As Boolean)
1772 _MyUseHashSupplement = value
1776 Public Property PreviewEnable() As Boolean
1778 Return _MyPreviewEnable
1780 Set(ByVal value As Boolean)
1781 _MyPreviewEnable = value
1785 Public Property UseAdditionalCount() As Boolean
1787 Return _MyUseAdditonalCount
1789 Set(ByVal value As Boolean)
1790 _MyUseAdditonalCount = value
1794 Public Property OpenUserTimeline() As Boolean
1795 Set(ByVal value As Boolean)
1796 _MyOpenUserTimeline = value
1799 Return _MyOpenUserTimeline
1803 Public Property TwitterApiUrl() As String
1805 Return _MyTwitterApiUrl
1807 Set(ByVal value As String)
1808 _MyTwitterApiUrl = value
1812 Public Property TwitterSearchApiUrl() As String
1814 Return _MyTwitterSearchApiUrl
1816 Set(ByVal value As String)
1817 _MyTwitterSearchApiUrl = value
1821 Public Property Language() As String
1825 Set(ByVal value As String)
1830 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
1831 Using filedlg As New OpenFileDialog()
1833 filedlg.Filter = My.Resources.Button3_ClickText1
1834 filedlg.FilterIndex = 1
1835 filedlg.Title = My.Resources.Button3_ClickText2
1836 filedlg.RestoreDirectory = True
1838 If filedlg.ShowDialog() = Windows.Forms.DialogResult.OK Then
1839 BrowserPathText.Text = filedlg.FileName
1844 Private Sub RadioProxySpecified_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioProxySpecified.CheckedChanged
1845 Dim chk As Boolean = RadioProxySpecified.Checked
1846 LabelProxyAddress.Enabled = chk
1847 TextProxyAddress.Enabled = chk
1848 LabelProxyPort.Enabled = chk
1849 TextProxyPort.Enabled = chk
1850 LabelProxyUser.Enabled = chk
1851 TextProxyUser.Enabled = chk
1852 LabelProxyPassword.Enabled = chk
1853 TextProxyPassword.Enabled = chk
1856 Private Sub TextProxyPort_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextProxyPort.Validating
1858 If TextProxyPort.Text.Trim() = "" Then TextProxyPort.Text = "0"
1859 If Integer.TryParse(TextProxyPort.Text.Trim(), port) = False Then
1860 MessageBox.Show(My.Resources.TextProxyPort_ValidatingText1)
1864 If port < 0 Or port > 65535 Then
1865 MessageBox.Show(My.Resources.TextProxyPort_ValidatingText2)
1871 Private Sub CheckOutputz_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckOutputz.CheckedChanged
1872 If CheckOutputz.Checked = True Then
1873 Label59.Enabled = True
1874 Label60.Enabled = True
1875 TextBoxOutputzKey.Enabled = True
1876 ComboBoxOutputzUrlmode.Enabled = True
1878 Label59.Enabled = False
1879 Label60.Enabled = False
1880 TextBoxOutputzKey.Enabled = False
1881 ComboBoxOutputzUrlmode.Enabled = False
1885 Private Sub TextBoxOutputzKey_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextBoxOutputzKey.Validating
1886 If CheckOutputz.Checked Then
1887 TextBoxOutputzKey.Text = Trim(TextBoxOutputzKey.Text)
1888 If TextBoxOutputzKey.Text.Length = 0 Then
1889 MessageBox.Show(My.Resources.TextBoxOutputzKey_Validating)
1896 Private Function CreateDateTimeFormatSample() As Boolean
1898 LabelDateTimeFormatApplied.Text = DateTime.Now.ToString(CmbDateTimeFormat.Text)
1899 Catch ex As FormatException
1900 LabelDateTimeFormatApplied.Text = My.Resources.CreateDateTimeFormatSampleText1
1906 Private Sub CmbDateTimeFormat_TextUpdate(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmbDateTimeFormat.TextUpdate
1907 CreateDateTimeFormatSample()
1910 Private Sub CmbDateTimeFormat_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmbDateTimeFormat.SelectedIndexChanged
1911 CreateDateTimeFormatSample()
1914 Private Sub CmbDateTimeFormat_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles CmbDateTimeFormat.Validating
1915 If Not CreateDateTimeFormatSample() Then
1916 MessageBox.Show(My.Resources.CmbDateTimeFormat_Validating)
1921 Private Sub ConnectionTimeOut_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ConnectionTimeOut.Validating
1924 tm = CInt(ConnectionTimeOut.Text)
1925 Catch ex As Exception
1926 MessageBox.Show(My.Resources.ConnectionTimeOut_ValidatingText1)
1931 If tm < HttpTimeOut.MinValue OrElse tm > HttpTimeOut.MaxValue Then
1932 MessageBox.Show(My.Resources.ConnectionTimeOut_ValidatingText1)
1937 Private Sub LabelDateTimeFormatApplied_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles LabelDateTimeFormatApplied.VisibleChanged
1938 CreateDateTimeFormatSample()
1941 Private Sub TextCountApi_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextCountApi.Validating
1944 cnt = Integer.Parse(TextCountApi.Text)
1945 Catch ex As Exception
1946 MessageBox.Show(My.Resources.TextCountApi_Validating1)
1951 If cnt < 20 OrElse cnt > 200 Then
1952 MessageBox.Show(My.Resources.TextCountApi_Validating1)
1958 Private Sub TextCountApiReply_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextCountApiReply.Validating
1961 cnt = Integer.Parse(TextCountApiReply.Text)
1962 Catch ex As Exception
1963 MessageBox.Show(My.Resources.TextCountApi_Validating1)
1968 If cnt < 20 OrElse cnt > 200 Then
1969 MessageBox.Show(My.Resources.TextCountApi_Validating1)
1975 Public Property LimitBalloon() As Boolean
1977 Return _MyLimitBalloon
1979 Set(ByVal value As Boolean)
1980 _MyLimitBalloon = value
1984 Public Property EventNotifyEnabled As Boolean
1986 Return _MyEventNotifyEnabled
1988 Set(ByVal value As Boolean)
1989 _MyEventNotifyEnabled = value
1993 Public Property EventNotifyFlag As EVENTTYPE
1995 Return _MyEventNotifyFlag
1997 Set(ByVal value As EVENTTYPE)
1998 _MyEventNotifyFlag = value
2002 Public Property IsMyEventNotifyFlag As EVENTTYPE
2004 Return _isMyEventNotifyFlag
2006 Set(ByVal value As EVENTTYPE)
2007 _isMyEventNotifyFlag = value
2011 Public Property ForceEventNotify As Boolean
2013 Return _MyForceEventNotify
2015 Set(ByVal value As Boolean)
2016 _MyForceEventNotify = value
2020 Public Property FavEventUnread As Boolean
2022 Return _MyFavEventUnread
2024 Set(ByVal value As Boolean)
2025 _MyFavEventUnread = value
2029 Public Property TranslateLanguage As String
2031 Return _MyTranslateLanguage
2033 Set(ByVal value As String)
2034 _MyTranslateLanguage = value
2035 ComboBoxTranslateLanguage.SelectedIndex = (New Google).GetIndexFromLanguageEnum(value)
2039 Public Property EventSoundFile As String
2041 Return _MyEventSoundFile
2043 Set(ByVal value As String)
2044 _MyEventSoundFile = value
2048 Public Property ListDoubleClickAction As Integer
2050 Return _MyDoubleClickAction
2052 Set(ByVal value As Integer)
2053 _MyDoubleClickAction = value
2057 Public Property UserAppointUrl As String
2059 Return _UserAppointUrl
2061 Set(ByVal value As String)
2062 _UserAppointUrl = value
2066 Private Sub ComboBoxAutoShortUrlFirst_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxAutoShortUrlFirst.SelectedIndexChanged
2067 If ComboBoxAutoShortUrlFirst.SelectedIndex = UrlConverter.Bitly OrElse _
2068 ComboBoxAutoShortUrlFirst.SelectedIndex = UrlConverter.Jmp Then
2069 Label76.Enabled = True
2070 Label77.Enabled = True
2071 TextBitlyId.Enabled = True
2072 TextBitlyPw.Enabled = True
2074 Label76.Enabled = False
2075 Label77.Enabled = False
2076 TextBitlyId.Enabled = False
2077 TextBitlyPw.Enabled = False
2081 Private Sub ButtonBackToDefaultFontColor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonBackToDefaultFontColor.Click, ButtonBackToDefaultFontColor2.Click
2082 lblUnread.ForeColor = System.Drawing.SystemColors.ControlText
2083 lblUnread.Font = New Font(SystemFonts.DefaultFont, FontStyle.Bold Or FontStyle.Underline)
2085 lblListFont.ForeColor = System.Drawing.SystemColors.ControlText
2086 lblListFont.Font = System.Drawing.SystemFonts.DefaultFont
2088 lblDetail.ForeColor = Color.FromKnownColor(System.Drawing.KnownColor.ControlText)
2089 lblDetail.Font = System.Drawing.SystemFonts.DefaultFont
2091 lblInputFont.ForeColor = Color.FromKnownColor(System.Drawing.KnownColor.ControlText)
2092 lblInputFont.Font = System.Drawing.SystemFonts.DefaultFont
2094 lblSelf.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.AliceBlue)
2096 lblAtSelf.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.AntiqueWhite)
2098 lblTarget.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.LemonChiffon)
2100 lblAtTarget.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.LavenderBlush)
2102 lblAtFromTarget.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.Honeydew)
2104 lblFav.ForeColor = Color.FromKnownColor(System.Drawing.KnownColor.Red)
2106 lblOWL.ForeColor = Color.FromKnownColor(System.Drawing.KnownColor.Blue)
2108 lblInputBackcolor.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.LemonChiffon)
2110 lblAtTo.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.Pink)
2112 lblListBackcolor.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.Window)
2114 lblDetailBackcolor.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.Window)
2116 lblDetailLink.ForeColor = Color.FromKnownColor(System.Drawing.KnownColor.Blue)
2118 lblRetweet.ForeColor = Color.FromKnownColor(System.Drawing.KnownColor.Green)
2121 Private Function StartAuth() As Boolean
2123 Dim ptype As HttpConnection.ProxyType
2124 If RadioProxyNone.Checked Then
2125 ptype = HttpConnection.ProxyType.None
2126 ElseIf RadioProxyIE.Checked Then
2127 ptype = HttpConnection.ProxyType.IE
2129 ptype = HttpConnection.ProxyType.Specified
2131 Dim padr As String = TextProxyAddress.Text.Trim()
2132 Dim pport As Integer = Integer.Parse(TextProxyPort.Text.Trim())
2133 Dim pusr As String = TextProxyUser.Text.Trim()
2134 Dim ppw As String = TextProxyPassword.Text.Trim()
2137 HttpConnection.InitializeConnection(20, ptype, padr, pport, pusr, ppw)
2138 HttpTwitter.TwitterUrl = TwitterAPIText.Text.Trim
2139 HttpTwitter.TwitterSearchUrl = TwitterSearchAPIText.Text.Trim
2140 tw.Initialize("", "", "")
2141 Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click4
2142 Me.AuthUserLabel.Text = ""
2143 Dim pinPageUrl As String = ""
2144 Dim rslt As String = tw.StartAuthentication(pinPageUrl)
2145 If String.IsNullOrEmpty(rslt) Then
2149 MessageBox.Show(My.Resources.AuthorizeButton_Click2 + Environment.NewLine + rslt, "Authenticate", MessageBoxButtons.OK)
2154 Private Function PinAuth() As Boolean
2155 Dim pin As String = Me.Password.Text.Trim 'PIN Code
2158 Dim ptype As HttpConnection.ProxyType
2159 If RadioProxyNone.Checked Then
2160 ptype = HttpConnection.ProxyType.None
2161 ElseIf RadioProxyIE.Checked Then
2162 ptype = HttpConnection.ProxyType.IE
2164 ptype = HttpConnection.ProxyType.Specified
2166 Dim padr As String = TextProxyAddress.Text.Trim()
2167 Dim pport As Integer = Integer.Parse(TextProxyPort.Text.Trim())
2168 Dim pusr As String = TextProxyUser.Text.Trim()
2169 Dim ppw As String = TextProxyPassword.Text.Trim()
2172 HttpConnection.InitializeConnection(20, ptype, padr, pport, pusr, ppw)
2173 HttpTwitter.TwitterUrl = TwitterAPIText.Text.Trim
2174 HttpTwitter.TwitterSearchUrl = TwitterSearchAPIText.Text.Trim
2175 Dim rslt As String = tw.Authenticate(pin)
2176 If String.IsNullOrEmpty(rslt) Then
2177 MessageBox.Show(My.Resources.AuthorizeButton_Click1, "Authenticate", MessageBoxButtons.OK)
2178 Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click3
2179 Me.AuthUserLabel.Text = tw.Username
2180 If TwitterApiInfo.AccessLevel = ApiAccessLevel.ReadWrite Then
2181 Me.AuthStateLabel.Text += "(xAuth)"
2182 ElseIf TwitterApiInfo.AccessLevel = ApiAccessLevel.ReadWriteAndDirectMessage Then
2183 Me.AuthStateLabel.Text += "(OAuth)"
2187 MessageBox.Show(My.Resources.AuthorizeButton_Click2 + Environment.NewLine + rslt, "Authenticate", MessageBoxButtons.OK)
2188 Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click4
2189 Me.AuthUserLabel.Text = ""
2194 Private Function Authorize() As Boolean
2195 Dim user As String = Me.Username.Text.Trim
2196 Dim pwd As String = Me.Password.Text.Trim
2197 If String.IsNullOrEmpty(user) OrElse String.IsNullOrEmpty(pwd) Then
2198 MessageBox.Show(My.Resources.Save_ClickText1)
2203 Dim ptype As HttpConnection.ProxyType
2204 If RadioProxyNone.Checked Then
2205 ptype = HttpConnection.ProxyType.None
2206 ElseIf RadioProxyIE.Checked Then
2207 ptype = HttpConnection.ProxyType.IE
2209 ptype = HttpConnection.ProxyType.Specified
2211 Dim padr As String = TextProxyAddress.Text.Trim()
2212 Dim pport As Integer = Integer.Parse(TextProxyPort.Text.Trim())
2213 Dim pusr As String = TextProxyUser.Text.Trim()
2214 Dim ppw As String = TextProxyPassword.Text.Trim()
2217 HttpConnection.InitializeConnection(20, ptype, padr, pport, pusr, ppw)
2218 HttpTwitter.TwitterUrl = TwitterAPIText.Text.Trim
2219 HttpTwitter.TwitterSearchUrl = TwitterSearchAPIText.Text.Trim
2220 tw.Initialize("", "", "")
2221 Dim rslt As String = tw.Authenticate(user, pwd)
2222 If String.IsNullOrEmpty(rslt) Then
2223 MessageBox.Show(My.Resources.AuthorizeButton_Click1, "Authenticate", MessageBoxButtons.OK)
2224 Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click3
2225 Me.AuthUserLabel.Text = tw.Username
2226 If TwitterApiInfo.AccessLevel = ApiAccessLevel.ReadWrite Then
2227 Me.AuthStateLabel.Text += "(xAuth)"
2228 ElseIf TwitterApiInfo.AccessLevel = ApiAccessLevel.ReadWriteAndDirectMessage Then
2229 Me.AuthStateLabel.Text += "(OAuth)"
2233 MessageBox.Show(My.Resources.AuthorizeButton_Click2 + Environment.NewLine + rslt, "Authenticate", MessageBoxButtons.OK)
2234 Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click4
2235 Me.AuthUserLabel.Text = ""
2240 Private Sub StartAuthButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StartAuthButton.Click
2241 Me.Save.Enabled = False
2243 AuthorizeButton.Enabled = True
2245 AuthorizeButton.Enabled = False
2249 Private Sub AuthorizeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AuthorizeButton.Click
2250 If String.IsNullOrEmpty(Me.Password.Text.Trim) Then
2251 MessageBox.Show(My.Resources.Save_ClickText4)
2256 Me.Save.Enabled = True
2258 AuthorizeButton.Enabled = False
2259 Me.Password.Text = ""
2262 Private Sub AuthClearButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AuthClearButton.Click
2264 Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click4
2265 Me.AuthUserLabel.Text = ""
2266 Me.Save.Enabled = False
2270 Private Sub DisplayApiMaxCount()
2271 If TwitterApiInfo.MaxCount > -1 Then
2272 LabelApiUsing.Text = String.Format(My.Resources.SettingAPIUse1, TwitterApiInfo.UsingCount, TwitterApiInfo.MaxCount)
2274 LabelApiUsing.Text = String.Format(My.Resources.SettingAPIUse1, TwitterApiInfo.UsingCount, "???")
2278 Private Sub CalcApiUsing()
2279 Dim UsingApi As Integer = 0
2281 Dim ListsTabNum As Integer = 0
2282 Dim UserTimelineTabNum As Integer = 0
2283 Dim ApiLists As Integer = 0
2284 Dim ApiUserTimeline As Integer = 0
2285 Dim UsingApiUserStream As Integer = 0
2288 ' 初回起動時などにNothingの場合あり
2289 ListsTabNum = TabInformations.GetInstance.GetTabsByType(TabUsageType.Lists).Count
2290 Catch ex As Exception
2295 ' 初回起動時などにNothingの場合あり
2296 UserTimelineTabNum = TabInformations.GetInstance.GetTabsByType(TabUsageType.UserTimeline).Count
2297 Catch ex As Exception
2302 If Integer.TryParse(TimelinePeriod.Text, tmp) Then
2304 UsingApi += 3600 \ tmp
2309 If Integer.TryParse(ReplyPeriod.Text, tmp) Then
2311 UsingApi += 3600 \ tmp
2316 If Integer.TryParse(DMPeriod.Text, tmp) Then
2318 UsingApi += (3600 \ tmp) * 2
2323 If Integer.TryParse(ListsPeriod.Text, tmp) Then
2325 ApiLists = (3600 \ tmp) * ListsTabNum
2326 UsingApi += ApiLists
2330 ' UserTimelineタブ計算 0は手動更新
2331 If Integer.TryParse(UserTimelinePeriod.Text, tmp) Then
2333 ApiUserTimeline = (3600 \ tmp) * UserTimelineTabNum
2334 UsingApi += ApiUserTimeline
2338 If tw IsNot Nothing Then
2339 If TwitterApiInfo.MaxCount = -1 Then
2340 If Twitter.AccountState = ACCOUNT_STATE.Valid Then
2341 TwitterApiInfo.UsingCount = UsingApi
2342 Dim proc As New Thread(New Threading.ThreadStart(Sub()
2343 tw.GetInfoApi(Nothing) '取得エラー時はinfoCountは初期状態(値:-1)
2344 If Me.IsHandleCreated AndAlso Not Me.IsDisposed Then Invoke(New MethodInvoker(AddressOf DisplayApiMaxCount))
2348 LabelApiUsing.Text = String.Format(My.Resources.SettingAPIUse1, UsingApi, "???")
2351 LabelApiUsing.Text = String.Format(My.Resources.SettingAPIUse1, UsingApi, TwitterApiInfo.MaxCount)
2356 LabelPostAndGet.Visible = CheckPostAndGet.Checked AndAlso Not tw.UserStreamEnabled
2357 LabelUserStreamActive.Visible = tw.UserStreamEnabled
2359 LabelApiUsingUserStreamEnabled.Text = String.Format(My.Resources.SettingAPIUse2, (ApiLists + ApiUserTimeline).ToString)
2360 LabelApiUsingUserStreamEnabled.Visible = tw.UserStreamEnabled
2363 Private Sub CheckPostAndGet_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckPostAndGet.CheckedChanged
2367 Private Sub Setting_Shown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Shown
2370 If Me.Disposing OrElse Me.IsDisposed Then Exit Sub
2371 Loop Until Me.IsHandleCreated
2372 Me.TopMost = Me.AlwaysTop
2376 Private Sub ButtonApiCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonApiCalc.Click
2382 ' この呼び出しはデザイナーで必要です。
2383 InitializeComponent()
2385 ' InitializeComponent() 呼び出しの後で初期化を追加します。
2389 Public Shared ReadOnly Property Instance As AppendSettingDialog
2395 Private Function BitlyValidation(ByVal id As String, ByVal apikey As String) As Boolean
2396 If String.IsNullOrEmpty(id) OrElse String.IsNullOrEmpty(apikey) Then
2400 Dim req As String = "http://api.bit.ly/v3/validate"
2401 Dim content As String = ""
2402 Dim param As New Dictionary(Of String, String)
2404 param.Add("login", "tweenapi")
2405 param.Add("apiKey", "R_c5ee0e30bdfff88723c4457cc331886b")
2406 param.Add("x_login", id)
2407 param.Add("x_apiKey", apikey)
2408 param.Add("format", "txt")
2410 If Not (New HttpVarious).PostData(req, param, content) Then
2411 Return True ' 通信エラーの場合はとりあえずチェックを通ったことにする
2412 ElseIf content.Trim() = "1" Then
2414 ElseIf content.Trim() = "0" Then
2415 Return False ' 検証失敗 APIキーとIDの組み合わせが違う
2417 Return True ' 規定外応答:通信エラーの可能性があるためとりあえずチェックを通ったことにする
2421 Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click
2422 _ValidationError = False
2425 Public Property HotkeyEnabled As Boolean
2426 Public Property HotkeyKey As Keys
2427 Public Property HotkeyValue As Integer
2428 Public Property HotkeyMod As Keys
2430 Private Sub HotkeyText_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles HotkeyText.KeyDown
2433 HotkeyText.Text = e.KeyCode.ToString
2434 HotkeyCode.Text = e.KeyValue.ToString
2435 HotkeyText.Tag = e.KeyCode
2437 e.SuppressKeyPress = True
2440 Private Sub HotkeyCheck_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HotkeyCheck.CheckedChanged
2441 HotkeyCtrl.Enabled = HotkeyCheck.Checked
2442 HotkeyAlt.Enabled = HotkeyCheck.Checked
2443 HotkeyShift.Enabled = HotkeyCheck.Checked
2444 HotkeyWin.Enabled = HotkeyCheck.Checked
2445 HotkeyText.Enabled = HotkeyCheck.Checked
2446 HotkeyCode.Enabled = HotkeyCheck.Checked
2449 Public Property BlinkNewMentions As Boolean
2451 Private Sub GetMoreTextCountApi_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles GetMoreTextCountApi.Validating
2454 cnt = Integer.Parse(GetMoreTextCountApi.Text)
2455 Catch ex As Exception
2456 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2461 If Not cnt = 0 AndAlso (cnt < 20 OrElse cnt > 200) Then
2462 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2468 Private Sub UseChangeGetCount_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles UseChangeGetCount.CheckedChanged
2469 GetMoreTextCountApi.Enabled = UseChangeGetCount.Checked
2470 FirstTextCountApi.Enabled = UseChangeGetCount.Checked
2471 Label28.Enabled = UseChangeGetCount.Checked
2472 Label30.Enabled = UseChangeGetCount.Checked
2473 Label53.Enabled = UseChangeGetCount.Checked
2474 Label66.Enabled = UseChangeGetCount.Checked
2475 Label17.Enabled = UseChangeGetCount.Checked
2476 Label25.Enabled = UseChangeGetCount.Checked
2477 SearchTextCountApi.Enabled = UseChangeGetCount.Checked
2478 FavoritesTextCountApi.Enabled = UseChangeGetCount.Checked
2479 UserTimelineTextCountApi.Enabled = UseChangeGetCount.Checked
2480 ListTextCountApi.Enabled = UseChangeGetCount.Checked
2483 Private Sub FirstTextCountApi_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles FirstTextCountApi.Validating
2486 cnt = Integer.Parse(FirstTextCountApi.Text)
2487 Catch ex As Exception
2488 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2493 If Not cnt = 0 AndAlso (cnt < 20 OrElse cnt > 200) Then
2494 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2500 Private Sub SearchTextCountApi_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles SearchTextCountApi.Validating
2503 cnt = Integer.Parse(SearchTextCountApi.Text)
2504 Catch ex As Exception
2505 MessageBox.Show(My.Resources.TextSearchCountApi_Validating1)
2510 If Not cnt = 0 AndAlso (cnt < 20 OrElse cnt > 100) Then
2511 MessageBox.Show(My.Resources.TextSearchCountApi_Validating1)
2517 Private Sub FavoritesTextCountApi_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles FavoritesTextCountApi.Validating
2520 cnt = Integer.Parse(FavoritesTextCountApi.Text)
2521 Catch ex As Exception
2522 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2527 If Not cnt = 0 AndAlso (cnt < 20 OrElse cnt > 200) Then
2528 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2534 Private Sub UserTimelineTextCountApi_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles UserTimelineTextCountApi.Validating
2537 cnt = Integer.Parse(UserTimelineTextCountApi.Text)
2538 Catch ex As Exception
2539 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2544 If Not cnt = 0 AndAlso (cnt < 20 OrElse cnt > 200) Then
2545 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2551 Private Sub ListTextCountApi_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ListTextCountApi.Validating
2554 cnt = Integer.Parse(ListTextCountApi.Text)
2555 Catch ex As Exception
2556 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2561 If Not cnt = 0 AndAlso (cnt < 20 OrElse cnt > 200) Then
2562 MessageBox.Show(My.Resources.TextCountApi_Validating1)
2568 Private Sub CheckEventNotify_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
2569 Handles CheckEventNotify.CheckedChanged, CheckFavoritesEvent.CheckStateChanged, _
2570 CheckUnfavoritesEvent.CheckStateChanged, CheckFollowEvent.CheckStateChanged, _
2571 CheckListMemberAddedEvent.CheckStateChanged, CheckListMemberRemovedEvent.CheckStateChanged, _
2572 CheckListCreatedEvent.CheckStateChanged, CheckUserUpdateEvent.CheckStateChanged
2573 _MyEventNotifyEnabled = CheckEventNotify.Checked
2574 GetEventNotifyFlag(_MyEventNotifyFlag, _isMyEventNotifyFlag)
2575 ApplyEventNotifyFlag(_MyEventNotifyEnabled, _MyEventNotifyFlag, _isMyEventNotifyFlag)
2578 Private Class EventCheckboxTblElement
2579 Public CheckBox As CheckBox
2580 Public Type As EVENTTYPE
2583 Private Function GetEventCheckboxTable() As EventCheckboxTblElement()
2585 Static _eventCheckboxTable As EventCheckboxTblElement() = {
2586 New EventCheckboxTblElement With {.CheckBox = CheckFavoritesEvent, .Type = EVENTTYPE.Favorite},
2587 New EventCheckboxTblElement With {.CheckBox = CheckUnfavoritesEvent, .Type = EVENTTYPE.Unfavorite},
2588 New EventCheckboxTblElement With {.CheckBox = CheckFollowEvent, .Type = EVENTTYPE.Follow},
2589 New EventCheckboxTblElement With {.CheckBox = CheckListMemberAddedEvent, .Type = EVENTTYPE.ListMemberAdded},
2590 New EventCheckboxTblElement With {.CheckBox = CheckListMemberRemovedEvent, .Type = EVENTTYPE.ListMemberRemoved},
2591 New EventCheckboxTblElement With {.CheckBox = CheckBlockEvent, .Type = EVENTTYPE.Block},
2592 New EventCheckboxTblElement With {.CheckBox = CheckUserUpdateEvent, .Type = EVENTTYPE.UserUpdate},
2593 New EventCheckboxTblElement With {.CheckBox = CheckListCreatedEvent, .Type = EVENTTYPE.ListCreated}
2596 Return _eventCheckboxTable
2599 Private Sub GetEventNotifyFlag(ByRef eventnotifyflag As EVENTTYPE, ByRef isMyeventnotifyflag As EVENTTYPE)
2600 Dim evt As EVENTTYPE = EVENTTYPE.None
2601 Dim myevt As EVENTTYPE = EVENTTYPE.None
2603 For Each tbl As EventCheckboxTblElement In GetEventCheckboxTable()
2604 Select Case tbl.CheckBox.CheckState
2605 Case CheckState.Checked
2606 evt = evt Or tbl.Type
2607 myevt = myevt Or tbl.Type
2608 Case CheckState.Indeterminate
2609 evt = evt Or tbl.Type
2610 Case CheckState.Unchecked
2614 eventnotifyflag = evt
2615 isMyeventnotifyflag = myevt
2618 Private Sub ApplyEventNotifyFlag(ByVal rootEnabled As Boolean, ByVal eventnotifyflag As EVENTTYPE, ByVal isMyeventnotifyflag As EVENTTYPE)
2619 Dim evt = eventnotifyflag
2620 Dim myevt = isMyeventnotifyflag
2622 CheckEventNotify.Checked = rootEnabled
2624 For Each tbl As EventCheckboxTblElement In GetEventCheckboxTable()
2625 If CBool(evt And tbl.Type) Then
2626 If CBool(myevt And tbl.Type) Then
2627 tbl.CheckBox.CheckState = CheckState.Checked
2629 tbl.CheckBox.CheckState = CheckState.Indeterminate
2632 tbl.CheckBox.CheckState = CheckState.Unchecked
2634 tbl.CheckBox.Enabled = rootEnabled
2639 Private Sub CheckForceEventNotify_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckForceEventNotify.CheckedChanged
2640 _MyForceEventNotify = CheckEventNotify.Checked
2643 Private Sub CheckFavEventUnread_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckFavEventUnread.CheckedChanged
2644 _MyFavEventUnread = CheckFavEventUnread.Checked
2647 Private Sub ComboBoxTranslateLanguage_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxTranslateLanguage.SelectedIndexChanged
2648 _MyTranslateLanguage = (New Google).GetLanguageEnumFromIndex(ComboBoxTranslateLanguage.SelectedIndex)
2651 Private Sub SoundFileListup()
2652 If _MyEventSoundFile Is Nothing Then Exit Sub
2653 _soundfileListup = True
2654 ComboBoxEventNotifySound.Items.Clear()
2655 ComboBoxEventNotifySound.Items.Add("")
2656 Dim oDir As IO.DirectoryInfo = New IO.DirectoryInfo(My.Application.Info.DirectoryPath + IO.Path.DirectorySeparatorChar)
2657 If IO.Directory.Exists(IO.Path.Combine(My.Application.Info.DirectoryPath, "Sounds")) Then
2658 oDir = oDir.GetDirectories("Sounds")(0)
2660 For Each oFile As IO.FileInfo In oDir.GetFiles("*.wav")
2661 ComboBoxEventNotifySound.Items.Add(oFile.Name)
2663 Dim idx As Integer = ComboBoxEventNotifySound.Items.IndexOf(_MyEventSoundFile)
2664 If idx = -1 Then idx = 0
2665 ComboBoxEventNotifySound.SelectedIndex = idx
2666 _soundfileListup = False
2669 Private Sub ComboBoxEventNotifySound_VisibleChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxEventNotifySound.VisibleChanged
2673 Private Sub ComboBoxEventNotifySound_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxEventNotifySound.SelectedIndexChanged
2674 If _soundfileListup Then Exit Sub
2676 _MyEventSoundFile = DirectCast(ComboBoxEventNotifySound.SelectedItem, String)
2679 Private Sub UserAppointUrlText_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles UserAppointUrlText.Validating
2680 If Not UserAppointUrlText.Text.StartsWith("http") AndAlso Not UserAppointUrlText.Text = "" Then
2681 MessageBox.Show("Text Error:正しいURLではありません")
2685 Private Sub IsPreviewFoursquareCheckBox_CheckedChanged(sender As Object, e As System.EventArgs) Handles IsPreviewFoursquareCheckBox.CheckedChanged
2686 FoursquareGroupBox.Enabled = IsPreviewFoursquareCheckBox.Checked
2689 Private Sub OpenUrl(ByVal url As String)
2690 Dim myPath As String = url
2691 Dim path As String = Me.BrowserPathText.Text
2693 If BrowserPath <> "" Then
2694 If path.StartsWith("""") AndAlso path.Length > 2 AndAlso path.IndexOf("""", 2) > -1 Then
2695 Dim sep As Integer = path.IndexOf("""", 2)
2696 Dim browserPath As String = path.Substring(1, sep - 1)
2697 Dim arg As String = ""
2698 If sep < path.Length - 1 Then
2699 arg = path.Substring(sep + 1)
2701 myPath = arg + " " + myPath
2702 System.Diagnostics.Process.Start(browserPath, myPath)
2704 System.Diagnostics.Process.Start(path, myPath)
2707 System.Diagnostics.Process.Start(myPath)
2709 Catch ex As Exception
2710 ' MessageBox.Show("ブラウザの起動に失敗、またはタイムアウトしました。" + ex.ToString())