root/lang/vb2005/Tween/Tween/Setting.vb @ 22678

Revision 22678, 36.9 kB (checked in by kiri_feather, 5 years ago)

削除確認関連修正
Option Strict コード削除

Line 
1Public Class Setting
2    Private _MyuserID As String
3    Private _Mypassword As String
4    Private _MytimelinePeriod As Integer
5    Private _MyDMPeriod As Integer
6    Private _MynextThreshold As Integer
7    Private _MyNextPages As Integer
8    Private _MyLogDays As Integer
9    Private _MyLogUnit As LogUnitEnum
10    Private _MyReadPages As Integer
11    Private _MyReadPagesReply As Integer
12    Private _MyReadPagesDM As Integer
13    Private _MyReaded As Boolean
14    Private _MyIconSize As IconSizes
15    Private _MyStatusText As String
16    Private _MyUnreadManage As Boolean
17    Private _MyPlaySound As Boolean
18    Private _MyOneWayLove As Boolean
19    Private _fntUnread As Font
20    Private _clUnread As Color
21    Private _fntReaded As Font
22    Private _clReaded As Color
23    Private _clFav As Color
24    Private _clOWL As Color
25    Private _fntDetail As Font
26    Private _clSelf As Color
27    Private _clAtSelf As Color
28    Private _clTarget As Color
29    Private _clAtTarget As Color
30    Private _clAtFromTarget As Color
31    Private _MyNameBalloon As NameBalloonEnum
32    Private _MyPostCtrlEnter As Boolean
33    Private _useAPI As Boolean
34    Private _hubServer As String
35    Private _browserpath As String
36    Private _MyCheckReply As Boolean
37    Private _MyUseRecommendStatus As Boolean
38    Private _MyDispUsername As Boolean
39    Private _MyDispLatestPost As DispTitleEnum
40    Private _MySortOrderLock As Boolean
41    Private _MyMinimizeToTray As Boolean
42    Private _MyCloseToExit As Boolean
43    Private _MyTinyUrlResolve As Boolean
44    Private _MyProxyType As ProxyTypeEnum
45    Private _MyProxyAddress As String
46    Private _MyProxyPort As Integer
47    Private _MyProxyUser As String
48    Private _MyProxyPassword As String
49    Private _MyMaxPostNum As Integer
50    Private _MyPeriodAdjust As Boolean
51    Private _MyStartupVersion As Boolean
52    Private _MyStartupKey As Boolean
53    Private _MyStartupFollowers As Boolean
54    Private _MyRestrictFavCheck As Boolean
55    Private _MyAlwaysTop As Boolean
56
57    'Public Enum LogUnitEnum
58    '    Minute
59    '    Hour
60    '    Day
61    'End Enum
62
63    'Public Enum IconSizes
64    '    IconNone = 0
65    '    Icon16 = 1
66    '    Icon24 = 2
67    '    Icon48 = 3
68    '    Icon48_2 = 4
69    'End Enum
70
71    'Public Enum NameBalloonEnum
72    '    None
73    '    UserID
74    '    NickName
75    'End Enum
76
77    'Public Enum DispTitleEnum
78    '    None
79    '    Ver
80    '    Post
81    '    UnreadRepCount
82    '    UnreadAllCount
83    '    UnreadAllRepCount
84    '    UnreadCountAllCount
85    'End Enum
86
87    Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
88        If Username.Text.Trim = "" Or _
89           Password.Text.Trim = "" Then
90            Me.DialogResult = Windows.Forms.DialogResult.Cancel
91            MessageBox.Show("���[�U�[���ƃp�X���[�h��肵�Ă��������B")
92            Exit Sub
93        End If
94        If Username.Text.Contains("@") Then
95            Me.DialogResult = Windows.Forms.DialogResult.Cancel
96            MessageBox.Show("���[�U�[���Ɂw@�x��߂Ȃ��ł��������B�i���[���A�h���X�s�j")
97            Exit Sub
98        End If
99        Try
100            _MyuserID = Username.Text.Trim()
101            _Mypassword = Password.Text.Trim()
102            _MytimelinePeriod = CType(TimelinePeriod.Text, Integer)
103            _MyDMPeriod = CType(DMPeriod.Text, Integer)
104            _MynextThreshold = CType(NextThreshold.Text, Integer)
105            _MyNextPages = CType(NextPages.Text, Integer)
106            _MyMaxPostNum = CType(MaxPost.Text, Integer)
107
108            '_MyLogDays = CType(ReadLogDays.Text, Integer)
109            'Select Case ReadLogUnit.SelectedIndex
110            '    Case 0
111            '        _MyLogUnit = LogUnitEnum.Minute
112            '    Case 1
113            '        _MyLogUnit = LogUnitEnum.Hour
114            '    Case 2
115            '        _MyLogUnit = LogUnitEnum.Day
116            '    Case Else
117            '        _MyLogUnit = LogUnitEnum.Hour
118            'End Select
119            _MyReadPages = CType(StartupReadPages.Text, Integer)
120            _MyReadPagesReply = CType(StartupReadReply.Text, Integer)
121            _MyReadPagesDM = CType(StartupReadDM.Text, Integer)
122            _MyReaded = StartupReaded.Checked
123            Select Case IconSize.SelectedIndex
124                Case 0
125                    _MyIconSize = IconSizes.IconNone
126                Case 1
127                    _MyIconSize = IconSizes.Icon16
128                Case 2
129                    _MyIconSize = IconSizes.Icon24
130                Case 3
131                    _MyIconSize = IconSizes.Icon48
132                Case 4
133                    _MyIconSize = IconSizes.Icon48_2
134            End Select
135            _MyStatusText = StatusText.Text
136            _MyPlaySound = PlaySnd.Checked
137            TweenMain.PlaySoundMenuItem.Checked = _MyPlaySound
138            _MyUnreadManage = UReadMng.Checked
139            _MyOneWayLove = OneWayLv.Checked
140
141            _fntUnread = lblUnRead.Font
142            _clUnread = lblUnRead.ForeColor
143            _fntReaded = lblReaded.Font
144            _clReaded = lblReaded.ForeColor
145            _clFav = lblFav.ForeColor
146            _clOWL = lblOWL.ForeColor
147            _fntDetail = lblDetail.Font
148            _clSelf = lblSelf.BackColor
149            _clAtSelf = lblAtSelf.BackColor
150            _clTarget = lblTarget.BackColor
151            _clAtTarget = lblAtTarget.BackColor
152            _clAtFromTarget = lblAtFromTarget.BackColor
153            Select Case cmbNameBalloon.SelectedIndex
154                Case 0
155                    _MyNameBalloon = NameBalloonEnum.None
156                Case 1
157                    _MyNameBalloon = NameBalloonEnum.UserID
158                Case 2
159                    _MyNameBalloon = NameBalloonEnum.NickName
160            End Select
161            _MyPostCtrlEnter = CheckPostCtrlEnter.Checked
162            _useAPI = CheckUseAPI.Checked
163            _hubServer = HubServerDomain.Text.Trim
164            _browserpath = BrowserPathText.Text.Trim
165            _MyCheckReply = CheckboxReply.Checked
166            _MyUseRecommendStatus = CheckUseRecommendStatus.Checked
167            _MyDispUsername = CheckDispUsername.Checked
168            _MyCloseToExit = CheckCloseToExit.Checked
169            _MyMinimizeToTray = CheckMinimizeToTray.Checked
170            Select Case ComboDispTitle.SelectedIndex
171                Case 0  'None
172                    _MyDispLatestPost = DispTitleEnum.None
173                Case 1  'Ver
174                    _MyDispLatestPost = DispTitleEnum.Ver
175                Case 2  'Post
176                    _MyDispLatestPost = DispTitleEnum.Post
177                Case 3  'RepCount
178                    _MyDispLatestPost = DispTitleEnum.UnreadRepCount
179                Case 4  'AllCount
180                    _MyDispLatestPost = DispTitleEnum.UnreadAllCount
181                Case 5  'Rep+All
182                    _MyDispLatestPost = DispTitleEnum.UnreadAllRepCount
183                Case 6  'Unread/All
184                    _MyDispLatestPost = DispTitleEnum.UnreadCountAllCount
185            End Select
186            _MySortOrderLock = CheckSortOrderLock.Checked
187            _MyTinyUrlResolve = CheckTinyURL.Checked
188            If RadioProxyNone.Checked Then
189                _MyProxyType = ProxyTypeEnum.None
190            ElseIf RadioProxyIE.Checked Then
191                _MyProxyType = ProxyTypeEnum.IE
192            Else
193                _MyProxyType = ProxyTypeEnum.Specified
194            End If
195            _MyProxyAddress = TextProxyAddress.Text.Trim()
196            _MyProxyPort = Integer.Parse(TextProxyPort.Text.Trim())
197            _MyProxyUser = TextProxyUser.Text.Trim()
198            _MyProxyPassword = TextProxyPassword.Text.Trim()
199            _MyPeriodAdjust = CheckPeriodAdjust.Checked
200            _MyStartupVersion = CheckStartupVersion.Checked
201            _MyStartupKey = CheckStartupKey.Checked
202            _MyStartupFollowers = CheckStartupFollowers.Checked
203            _MyRestrictFavCheck = CheckFavRestrict.Checked
204            _MyAlwaysTop = CheckAlwaysTop.Checked
205
206            'TweenMain.SetMainWindowTitle()
207            'TweenMain.SetNotifyIconText()
208
209        Catch ex As Exception
210            MessageBox.Show("�ݒ��Ɍ����������B")
211            Me.DialogResult = Windows.Forms.DialogResult.Cancel
212            Exit Sub
213        End Try
214    End Sub
215
216    Private Sub Setting_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
217        Username.Text = _MyuserID
218        Password.Text = _Mypassword
219        TimelinePeriod.Text = _MytimelinePeriod.ToString()
220        DMPeriod.Text = _MyDMPeriod.ToString()
221        NextThreshold.Text = _MynextThreshold.ToString()
222        NextPages.Text = _MyNextPages.ToString()
223        MaxPost.Text = _MyMaxPostNum.ToString()
224        'ReadLogDays.Text = _MyLogDays.ToString()
225        'Select Case _MyLogUnit
226        '    Case LogUnitEnum.Minute
227        '        ReadLogUnit.SelectedIndex = 0
228        '    Case LogUnitEnum.Hour
229        '        ReadLogUnit.SelectedIndex = 1
230        '    Case LogUnitEnum.Day
231        '        ReadLogUnit.SelectedIndex = 2
232        'End Select
233        StartupReadPages.Text = _MyReadPages.ToString()
234        StartupReadReply.Text = _MyReadPagesReply.ToString()
235        StartupReadDM.Text = _MyReadPagesDM.ToString()
236        StartupReaded.Checked = _MyReaded
237        Select Case _MyIconSize
238            Case IconSizes.IconNone
239                IconSize.SelectedIndex = 0
240            Case IconSizes.Icon16
241                IconSize.SelectedIndex = 1
242            Case IconSizes.Icon24
243                IconSize.SelectedIndex = 2
244            Case IconSizes.Icon48
245                IconSize.SelectedIndex = 3
246            Case IconSizes.Icon48_2
247                IconSize.SelectedIndex = 4
248        End Select
249        StatusText.Text = _MyStatusText
250        UReadMng.Checked = _MyUnreadManage
251        If _MyUnreadManage = False Then
252            StartupReaded.Enabled = False
253        Else
254            StartupReaded.Enabled = True
255        End If
256        PlaySnd.Checked = _MyPlaySound
257        TweenMain.PlaySoundMenuItem.Checked = _MyPlaySound
258        OneWayLv.Checked = _MyOneWayLove
259
260        lblUnRead.Font = _fntUnread
261        lblUnRead.ForeColor = _clUnread
262        lblReaded.Font = _fntReaded
263        lblReaded.ForeColor = _clReaded
264        lblFav.ForeColor = _clFav
265        lblOWL.ForeColor = _clOWL
266        lblDetail.Font = _fntDetail
267        lblSelf.BackColor = _clSelf
268        lblAtSelf.BackColor = _clAtSelf
269        lblTarget.BackColor = _clTarget
270        lblAtTarget.BackColor = _clAtTarget
271        lblAtFromTarget.BackColor = _clAtFromTarget
272
273        Select Case _MyNameBalloon
274            Case NameBalloonEnum.None
275                cmbNameBalloon.SelectedIndex = 0
276            Case NameBalloonEnum.UserID
277                cmbNameBalloon.SelectedIndex = 1
278            Case NameBalloonEnum.NickName
279                cmbNameBalloon.SelectedIndex = 2
280        End Select
281
282        CheckPostCtrlEnter.Checked = _MyPostCtrlEnter
283        CheckUseAPI.Checked = _useAPI
284        HubServerDomain.Text = _hubServer
285        BrowserPathText.Text = _browserpath
286        CheckboxReply.Checked = _MyCheckReply
287        CheckUseRecommendStatus.Checked = _MyUseRecommendStatus
288        CheckDispUsername.Checked = _MyDispUsername
289        CheckCloseToExit.Checked = _MyCloseToExit
290        CheckMinimizeToTray.Checked = _MyMinimizeToTray
291        Select Case _MyDispLatestPost
292            Case DispTitleEnum.None
293                ComboDispTitle.SelectedIndex = 0
294            Case DispTitleEnum.Ver
295                ComboDispTitle.SelectedIndex = 1
296            Case DispTitleEnum.Post
297                ComboDispTitle.SelectedIndex = 2
298            Case DispTitleEnum.UnreadRepCount
299                ComboDispTitle.SelectedIndex = 3
300            Case DispTitleEnum.UnreadAllCount
301                ComboDispTitle.SelectedIndex = 4
302            Case DispTitleEnum.UnreadAllRepCount
303                ComboDispTitle.SelectedIndex = 5
304            Case DispTitleEnum.UnreadCountAllCount
305                ComboDispTitle.SelectedIndex = 6
306        End Select
307        CheckSortOrderLock.Checked = _MySortOrderLock
308        CheckTinyURL.Checked = _MyTinyUrlResolve
309        Select Case _MyProxyType
310            Case ProxyTypeEnum.None
311                RadioProxyNone.Checked = True
312            Case ProxyTypeEnum.IE
313                RadioProxyIE.Checked = True
314            Case Else
315                RadioProxySpecified.Checked = True
316        End Select
317        Dim chk As Boolean = RadioProxySpecified.Checked
318        LabelProxyAddress.Enabled = chk
319        TextProxyAddress.Enabled = chk
320        LabelProxyPort.Enabled = chk
321        TextProxyPort.Enabled = chk
322        LabelProxyUser.Enabled = chk
323        TextProxyUser.Enabled = chk
324        LabelProxyPassword.Enabled = chk
325        TextProxyPassword.Enabled = chk
326
327        TextProxyAddress.Text = _MyProxyAddress
328        TextProxyPort.Text = _MyProxyPort.ToString
329        TextProxyUser.Text = _MyProxyUser
330        TextProxyPassword.Text = _MyProxyPassword
331
332        CheckPeriodAdjust.Checked = _MyPeriodAdjust
333        CheckStartupVersion.Checked = _MyStartupVersion
334        CheckStartupKey.Checked = _MyStartupKey
335        CheckStartupFollowers.Checked = _MyStartupFollowers
336        CheckFavRestrict.Checked = _MyRestrictFavCheck
337        CheckAlwaysTop.Checked = _MyAlwaysTop
338
339        'TweenMain.SetMainWindowTitle()
340        'TweenMain.SetNotifyIconText()
341
342        TabControl1.SelectedIndex = 0
343
344    End Sub
345
346    Private Sub TimelinePeriod_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TimelinePeriod.Validating
347        Dim prd As Integer
348        Try
349            prd = CType(TimelinePeriod.Text, Integer)
350        Catch ex As Exception
351            MessageBox.Show("�X�V�Ԋu�ɂ͐��l�i0�܂���5�`600�j��肵�Ă��������B")
352            e.Cancel = True
353            Exit Sub
354        End Try
355
356        If prd <> 0 And (prd < 15 Or prd > 600) Then
357            MessageBox.Show("�X�V�Ԋu�ɂ͐��l�i0�܂���5�`600�j��肵�Ă��������B")
358            e.Cancel = True
359        End If
360    End Sub
361
362    Private Sub NextThreshold_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles NextThreshold.Validating
363        Dim thr As Integer
364        Try
365            thr = CType(NextThreshold.Text, Integer)
366        Catch ex As Exception
367            MessageBox.Show("臒l�ɂ͐��l�i1�`20�j��肵�Ă��������B")
368            e.Cancel = True
369            Exit Sub
370        End Try
371
372        If thr < 1 Or thr > 20 Then
373            MessageBox.Show("臒l�ɂ͐��l�i1�`20�j��肵�Ă��������B")
374            e.Cancel = True
375        End If
376    End Sub
377
378    Private Sub NextPages_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles NextPages.Validating
379        Dim thr As Integer
380        Try
381            thr = CType(NextPages.Text, Integer)
382        Catch ex As Exception
383            MessageBox.Show("�y�[�W���ɂ͐��l�i1�`20�j��肵�Ă��������B")
384            e.Cancel = True
385            Exit Sub
386        End Try
387
388        If thr < 1 Or thr > 20 Then
389            MessageBox.Show("�y�[�W���ɂ͐��l�i1�`20�j��肵�Ă��������B")
390            e.Cancel = True
391        End If
392    End Sub
393
394    Private Sub DMPeriod_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles DMPeriod.Validating
395        Dim prd As Integer
396        Try
397            prd = CType(DMPeriod.Text, Integer)
398        Catch ex As Exception
399            MessageBox.Show("�X�V�Ԋu�ɂ͐��l�i0�܂���5�`600�j��肵�Ă��������B")
400            e.Cancel = True
401            Exit Sub
402        End Try
403
404        If prd <> 0 And (prd < 15 Or prd > 600) Then
405            MessageBox.Show("�X�V�Ԋu�ɂ͐��l�i0�܂���5�`600�j��肵�Ă��������B")
406            e.Cancel = True
407        End If
408    End Sub
409
410    Private Sub ReadLogDays_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ReadLogDays.Validating
411        'Dim days As Integer
412        'Try
413        '    days = CType(ReadLogDays.Text, Integer)
414        'Catch ex As Exception
415        '    MessageBox.Show("�ǂݍ��ݓ��͐��l�i0�`7�j��肵�Ă��������B")
416        '    e.Cancel = True
417        '    Exit Sub
418        'End Try
419
420        'If days < 0 Or days > 7 Then
421        '    MessageBox.Show("�ǂݍ��ݓ��͐��l�i0�`7�j��肵�Ă��������B")
422        '    e.Cancel = True
423        'End If
424    End Sub
425
426    Private Sub StartupReadPages_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles StartupReadPages.Validating
427        Dim pages As Integer
428        Try
429            pages = CType(StartupReadPages.Text, Integer)
430        Catch ex As Exception
431            MessageBox.Show("�ǂݍ��݃y�[�W���ɂ͐��l�i1�`999�j��肵�Ă��������B")
432            e.Cancel = True
433            Exit Sub
434        End Try
435
436        If pages < 1 Or pages > 999 Then
437            MessageBox.Show("�ǂݍ��݃y�[�W���ɂ͐��l�i1�`999�j��肵�Ă��������B")
438            e.Cancel = True
439        End If
440    End Sub
441
442    Private Sub StartupReadReply_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles StartupReadReply.Validating
443        Dim pages As Integer
444        Try
445            pages = CType(StartupReadReply.Text, Integer)
446        Catch ex As Exception
447            MessageBox.Show("�ǂݍ��݃y�[�W���ɂ͐��l�i0�`999�j��肵�Ă��������B")
448            e.Cancel = True
449            Exit Sub
450        End Try
451
452        If pages < 0 Or pages > 999 Then
453            MessageBox.Show("�ǂݍ��݃y�[�W���ɂ͐��l�i0�`999�j��肵�Ă��������B")
454            e.Cancel = True
455        End If
456    End Sub
457
458    Private Sub StartupReadDM_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles StartupReadDM.Validating
459        Dim pages As Integer
460        Try
461            pages = CType(StartupReadDM.Text, Integer)
462        Catch ex As Exception
463            MessageBox.Show("�ǂݍ��݃y�[�W���ɂ͐��l�i1�`999�j��肵�Ă��������B")
464            e.Cancel = True
465            Exit Sub
466        End Try
467
468        If pages < 1 Or pages > 999 Then
469            MessageBox.Show("�ǂݍ��݃y�[�W���ɂ͐��l�i1�`999�j��肵�Ă��������B")
470            e.Cancel = True
471        End If
472    End Sub
473
474    Private Sub UReadMng_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
475        If UReadMng.Checked = True Then
476            StartupReaded.Enabled = True
477        Else
478            StartupReaded.Enabled = False
479        End If
480    End Sub
481
482    Private Sub btnFontAndColor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUnread.Click, btnReaded.Click, btnDetail.Click
483        Dim Btn As Button = CType(sender, Button)
484        Dim rtn As DialogResult
485
486        FontDialog1.AllowVerticalFonts = False
487        FontDialog1.AllowScriptChange = True
488        FontDialog1.AllowSimulations = True
489        FontDialog1.AllowVectorFonts = True
490        FontDialog1.FixedPitchOnly = False
491        FontDialog1.FontMustExist = True
492        FontDialog1.ScriptsOnly = False
493        FontDialog1.ShowApply = False
494        FontDialog1.ShowEffects = True
495        FontDialog1.ShowColor = True
496
497        Select Case Btn.Name
498            Case "btnUnread"
499                FontDialog1.Color = lblUnRead.ForeColor
500                FontDialog1.Font = lblUnRead.Font
501            Case "btnReaded"
502                FontDialog1.Color = lblReaded.ForeColor
503                FontDialog1.Font = lblReaded.Font
504            Case "btnDetail"
505                FontDialog1.Font = lblDetail.Font
506                FontDialog1.ShowColor = False
507                FontDialog1.ShowEffects = False
508        End Select
509
510        rtn = FontDialog1.ShowDialog
511
512        If rtn = Windows.Forms.DialogResult.Cancel Then Exit Sub
513
514        Select Case Btn.Name
515            Case "btnUnread"
516                lblUnRead.ForeColor = FontDialog1.Color
517                lblUnRead.Font = FontDialog1.Font
518            Case "btnReaded"
519                lblReaded.ForeColor = FontDialog1.Color
520                lblReaded.Font = FontDialog1.Font
521            Case "btnDetail"
522                lblDetail.Font = FontDialog1.Font
523        End Select
524
525    End Sub
526
527    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
528        Dim Btn As Button = CType(sender, Button)
529        Dim rtn As DialogResult
530
531        ColorDialog1.AllowFullOpen = True
532        ColorDialog1.AnyColor = True
533        ColorDialog1.FullOpen = False
534        ColorDialog1.SolidColorOnly = False
535
536        Select Case Btn.Name
537            Case "btnSelf"
538                ColorDialog1.Color = lblSelf.BackColor
539            Case "btnAtSelf"
540                ColorDialog1.Color = lblAtSelf.BackColor
541            Case "btnTarget"
542                ColorDialog1.Color = lblTarget.BackColor
543            Case "btnAtTarget"
544                ColorDialog1.Color = lblAtTarget.BackColor
545            Case "btnAtFromTarget"
546                ColorDialog1.Color = lblAtFromTarget.BackColor
547            Case "btnFav"
548                ColorDialog1.Color = lblFav.ForeColor
549            Case "btnOWL"
550                ColorDialog1.Color = lblOWL.ForeColor
551        End Select
552
553        rtn = ColorDialog1.ShowDialog
554
555        If rtn = Windows.Forms.DialogResult.Cancel Then Exit Sub
556
557        Select Case Btn.Name
558            Case "btnSelf"
559                lblSelf.BackColor = ColorDialog1.Color
560            Case "btnAtSelf"
561                lblAtSelf.BackColor = ColorDialog1.Color
562            Case "btnTarget"
563                lblTarget.BackColor = ColorDialog1.Color
564            Case "btnAtTarget"
565                lblAtTarget.BackColor = ColorDialog1.Color
566            Case "btnAtFromTarget"
567                lblAtFromTarget.BackColor = ColorDialog1.Color
568            Case "btnFav"
569                lblFav.ForeColor = ColorDialog1.Color
570            Case "btnOWL"
571                lblOWL.ForeColor = ColorDialog1.Color
572        End Select
573    End Sub
574
575    Public Property UserID() As String
576        Get
577            Return _MyuserID
578        End Get
579        Set(ByVal value As String)
580            _MyuserID = value
581        End Set
582    End Property
583
584    Public Property PasswordStr() As String
585        Get
586            Return _Mypassword
587        End Get
588        Set(ByVal value As String)
589            _Mypassword = value
590        End Set
591    End Property
592
593    Public Property TimelinePeriodInt() As Integer
594        Get
595            Return _MytimelinePeriod
596        End Get
597        Set(ByVal value As Integer)
598            _MytimelinePeriod = value
599        End Set
600    End Property
601
602    Public Property DMPeriodInt() As Integer
603        Get
604            Return _MyDMPeriod
605        End Get
606        Set(ByVal value As Integer)
607            _MyDMPeriod = value
608        End Set
609    End Property
610
611    Public Property NextPageThreshold() As Integer
612        Get
613            Return _MynextThreshold
614        End Get
615        Set(ByVal value As Integer)
616            _MynextThreshold = value
617        End Set
618    End Property
619    Public Property MaxPostNum() As Integer
620        Get
621            Return _MyMaxPostNum
622        End Get
623        Set(ByVal value As Integer)
624            _MyMaxPostNum = value
625        End Set
626    End Property
627
628    Public Property NextPagesInt() As Integer
629        Get
630            Return _MyNextPages
631        End Get
632        Set(ByVal value As Integer)
633            _MyNextPages = value
634        End Set
635    End Property
636
637    Public Property LogDays() As Integer
638        Get
639            Return _MyLogDays
640        End Get
641        Set(ByVal value As Integer)
642            _MyLogDays = value
643        End Set
644    End Property
645
646    Public Property LogUnit() As LogUnitEnum
647        Get
648            Return _MyLogUnit
649        End Get
650        Set(ByVal value As LogUnitEnum)
651            _MyLogUnit = value
652        End Set
653    End Property
654
655    Public Property ReadPages() As Integer
656        Get
657            Return _MyReadPages
658        End Get
659        Set(ByVal value As Integer)
660            _MyReadPages = value
661        End Set
662    End Property
663
664    Public Property ReadPagesReply() As Integer
665        Get
666            Return _MyReadPagesReply
667        End Get
668        Set(ByVal value As Integer)
669            _MyReadPagesReply = value
670        End Set
671    End Property
672
673    Public Property ReadPagesDM() As Integer
674        Get
675            Return _MyReadPagesDM
676        End Get
677        Set(ByVal value As Integer)
678            _MyReadPagesDM = value
679        End Set
680    End Property
681
682    Public Property Readed() As Boolean
683        Get
684            Return _MyReaded
685        End Get
686        Set(ByVal value As Boolean)
687            _MyReaded = value
688        End Set
689    End Property
690
691    'Public Property ListLock() As Boolean
692    '    Get
693    '        Return _MyListLock
694    '    End Get
695    '    Set(ByVal value As Boolean)
696    '        _MyListLock = value
697    '    End Set
698    'End Property
699
700    Public Property IconSz() As IconSizes
701        Get
702            Return _MyIconSize
703        End Get
704        Set(ByVal value As IconSizes)
705            _MyIconSize = value
706        End Set
707    End Property
708
709    Public Property Status() As String
710        Get
711            Return _MyStatusText
712        End Get
713        Set(ByVal value As String)
714            _MyStatusText = value
715        End Set
716    End Property
717
718    Public Property UnreadManage() As Boolean
719        Get
720            Return _MyUnreadManage
721        End Get
722        Set(ByVal value As Boolean)
723            _MyUnreadManage = value
724        End Set
725    End Property
726
727    Public Property PlaySound() As Boolean
728        Get
729            Return _MyPlaySound
730        End Get
731        Set(ByVal value As Boolean)
732            _MyPlaySound = value
733        End Set
734    End Property
735
736    Public Property OneWayLove() As Boolean
737        Get
738            Return _MyOneWayLove
739        End Get
740        Set(ByVal value As Boolean)
741            _MyOneWayLove = value
742        End Set
743    End Property
744
745    Public Property FontUnread() As Font
746        Get
747            Return _fntUnread
748        End Get
749        Set(ByVal value As Font)
750            _fntUnread = value
751        End Set
752    End Property
753
754    Public Property ColorUnread() As Color
755        Get
756            Return _clUnread
757        End Get
758        Set(ByVal value As Color)
759            _clUnread = value
760        End Set
761    End Property
762
763    Public Property FontReaded() As Font
764        Get
765            Return _fntReaded
766        End Get
767        Set(ByVal value As Font)
768            _fntReaded = value
769        End Set
770    End Property
771
772    Public Property ColorReaded() As Color
773        Get
774            Return _clReaded
775        End Get
776        Set(ByVal value As Color)
777            _clReaded = value
778        End Set
779    End Property
780
781    Public Property ColorFav() As Color
782        Get
783            Return _clFav
784        End Get
785        Set(ByVal value As Color)
786            _clFav = value
787        End Set
788    End Property
789
790    Public Property ColorOWL() As Color
791        Get
792            Return _clOWL
793        End Get
794        Set(ByVal value As Color)
795            _clOWL = value
796        End Set
797    End Property
798
799    Public Property FontDetail() As Font
800        Get
801            Return _fntDetail
802        End Get
803        Set(ByVal value As Font)
804            _fntDetail = value
805        End Set
806    End Property
807
808    Public Property ColorSelf() As Color
809        Get
810            Return _clSelf
811        End Get
812        Set(ByVal value As Color)
813            _clSelf = value
814        End Set
815    End Property
816
817    Public Property ColorAtSelf() As Color
818        Get
819            Return _clAtSelf
820        End Get
821        Set(ByVal value As Color)
822            _clAtSelf = value
823        End Set
824    End Property
825
826    Public Property ColorTarget() As Color
827        Get
828            Return _clTarget
829        End Get
830        Set(ByVal value As Color)
831            _clTarget = value
832        End Set
833    End Property
834
835    Public Property ColorAtTarget() As Color
836        Get
837            Return _clAtTarget
838        End Get
839        Set(ByVal value As Color)
840            _clAtTarget = value
841        End Set
842    End Property
843
844    Public Property ColorAtFromTarget() As Color
845        Get
846            Return _clAtFromTarget
847        End Get
848        Set(ByVal value As Color)
849            _clAtFromTarget = value
850        End Set
851    End Property
852
853    Public Property NameBalloon() As NameBalloonEnum
854        Get
855            Return _MyNameBalloon
856        End Get
857        Set(ByVal value As NameBalloonEnum)
858            _MyNameBalloon = value
859        End Set
860    End Property
861
862    Public Property PostCtrlEnter() As Boolean
863        Get
864            Return _MyPostCtrlEnter
865        End Get
866        Set(ByVal value As Boolean)
867            _MyPostCtrlEnter = value
868        End Set
869    End Property
870
871    Public Property UseAPI() As Boolean
872        Get
873            Return _useAPI
874        End Get
875        Set(ByVal value As Boolean)
876            _useAPI = value
877        End Set
878    End Property
879
880    Public Property CheckReply() As Boolean
881        Get
882            Return _MyCheckReply
883        End Get
884        Set(ByVal value As Boolean)
885            _MyCheckReply = value
886        End Set
887    End Property
888
889    Public Property UseRecommendStatus() As Boolean
890        Get
891            Return _MyUseRecommendStatus
892        End Get
893        Set(ByVal value As Boolean)
894            _MyUseRecommendStatus = value
895        End Set
896    End Property
897
898    Public Property DispUsername() As Boolean
899        Get
900            Return _MyDispUsername
901        End Get
902        Set(ByVal value As Boolean)
903            _MyDispUsername = value
904        End Set
905    End Property
906
907    Public Property CloseToExit() As Boolean
908        Get
909            Return _MyCloseToExit
910        End Get
911        Set(ByVal value As Boolean)
912            _MyCloseToExit = value
913        End Set
914    End Property
915
916    Public Property MinimizeToTray() As Boolean
917        Get
918            Return _MyMinimizeToTray
919        End Get
920        Set(ByVal value As Boolean)
921            _MyMinimizeToTray = value
922        End Set
923    End Property
924    Public Property DispLatestPost() As DispTitleEnum
925        Get
926            Return _MyDispLatestPost
927        End Get
928        Set(ByVal value As DispTitleEnum)
929            _MyDispLatestPost = value
930        End Set
931    End Property
932
933    Public Property HubServer() As String
934        Get
935            Return _hubServer
936        End Get
937        Set(ByVal value As String)
938            _hubServer = value
939        End Set
940    End Property
941
942    Private Sub HubServerDomain_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles HubServerDomain.Validating
943        If HubServerDomain.Text.Trim = "" Then
944            MessageBox.Show("�󗓂ɂ͂ł��܂���f�t�H���g�l�utwitter.com�v���ݒ肳�����B", "�h���C���w�� MessageBoxButtons.OK, MessageBoxIcon.Warning)
945            HubServerDomain.Text = "twitter.com"
946        End If
947    End Sub
948
949    Public Property BrowserPath() As String
950        Get
951            Return _browserpath
952        End Get
953        Set(ByVal value As String)
954            _browserpath = value
955        End Set
956    End Property
957
958    Public Property TinyUrlResolve() As Boolean
959        Get
960            Return _MyTinyUrlResolve
961        End Get
962        Set(ByVal value As Boolean)
963            _MyTinyUrlResolve = value
964        End Set
965    End Property
966
967    Private Sub CheckUseRecommendStatus_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckUseRecommendStatus.CheckedChanged
968        If CheckUseRecommendStatus.Checked = True Then
969            StatusText.Enabled = False
970        Else
971            StatusText.Enabled = True
972        End If
973    End Sub
974
975    Public Property SortOrderLock() As Boolean
976        Get
977            Return _MySortOrderLock
978        End Get
979        Set(ByVal value As Boolean)
980            _MySortOrderLock = value
981        End Set
982    End Property
983
984    Public Property ProxyType() As ProxyTypeEnum
985        Get
986            Return _MyProxyType
987        End Get
988        Set(ByVal value As ProxyTypeEnum)
989            _MyProxyType = value
990        End Set
991    End Property
992
993    Public Property ProxyAddress() As String
994        Get
995            Return _MyProxyAddress
996        End Get
997        Set(ByVal value As String)
998            _MyProxyAddress = value
999        End Set
1000    End Property
1001
1002    Public Property ProxyPort() As Integer
1003        Get
1004            Return _MyProxyPort
1005        End Get
1006        Set(ByVal value As Integer)
1007            _MyProxyPort = value
1008        End Set
1009    End Property
1010
1011    Public Property ProxyUser() As String
1012        Get
1013            Return _MyProxyUser
1014        End Get
1015        Set(ByVal value As String)
1016            _MyProxyUser = value
1017        End Set
1018    End Property
1019
1020    Public Property ProxyPassword() As String
1021        Get
1022            Return _MyProxyPassword
1023        End Get
1024        Set(ByVal value As String)
1025            _MyProxyPassword = value
1026        End Set
1027    End Property
1028
1029    Public Property PeriodAdjust() As Boolean
1030        Get
1031            Return _MyPeriodAdjust
1032        End Get
1033        Set(ByVal value As Boolean)
1034            _MyPeriodAdjust = value
1035        End Set
1036    End Property
1037
1038    Public Property StartupVersion() As Boolean
1039        Get
1040            Return _MyStartupVersion
1041        End Get
1042        Set(ByVal value As Boolean)
1043            _MyStartupVersion = value
1044        End Set
1045    End Property
1046
1047    Public Property StartupKey() As Boolean
1048        Get
1049            Return _MyStartupKey
1050        End Get
1051        Set(ByVal value As Boolean)
1052            _MyStartupKey = value
1053        End Set
1054    End Property
1055
1056    Public Property StartupFollowers() As Boolean
1057        Get
1058            Return _MyStartupFollowers
1059        End Get
1060        Set(ByVal value As Boolean)
1061            _MyStartupFollowers = value
1062        End Set
1063    End Property
1064
1065    Public Property RestrictFavCheck() As Boolean
1066        Get
1067            Return _MyRestrictFavCheck
1068        End Get
1069        Set(ByVal value As Boolean)
1070            _MyRestrictFavCheck = value
1071        End Set
1072    End Property
1073
1074    Public Property AlwaysTop() As Boolean
1075        Get
1076            Return _MyAlwaysTop
1077        End Get
1078        Set(ByVal value As Boolean)
1079            _MyAlwaysTop = value
1080        End Set
1081    End Property
1082
1083    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
1084        Dim filedlg As New OpenFileDialog()
1085
1086        filedlg.Filter = "��s�`���t�@�C��(*.exe)|*.exe|���ׂẴt�@�C��(*.*)|*.*"
1087        filedlg.FilterIndex = 1
1088        filedlg.Title = "�u���E�U��肵�Ă�������"
1089        filedlg.RestoreDirectory = True
1090
1091        If filedlg.ShowDialog() = Windows.Forms.DialogResult.OK Then
1092            BrowserPathText.Text = filedlg.FileName
1093
1094        End If
1095    End Sub
1096
1097    Private Sub RadioProxySpecified_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioProxySpecified.CheckedChanged
1098        Dim chk As Boolean = RadioProxySpecified.Checked
1099        LabelProxyAddress.Enabled = chk
1100        TextProxyAddress.Enabled = chk
1101        LabelProxyPort.Enabled = chk
1102        TextProxyPort.Enabled = chk
1103        LabelProxyUser.Enabled = chk
1104        TextProxyUser.Enabled = chk
1105        LabelProxyPassword.Enabled = chk
1106        TextProxyPassword.Enabled = chk
1107    End Sub
1108
1109    Private Sub TextProxyPort_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextProxyPort.Validating
1110        Dim port As Integer
1111        If TextProxyPort.Text.Trim() = "" Then TextProxyPort.Text = "0"
1112        If Integer.TryParse(TextProxyPort.Text.Trim(), port) = False Then
1113            MessageBox.Show("�|�[�g�ԍ��ɂ͐����l��肵�Ă��������B")
1114            e.Cancel = True
1115            Exit Sub
1116        End If
1117        If port < 0 Or port > 65535 Then
1118            MessageBox.Show("�|�[�g�ԍ��ɂ��`65535��肵�Ă��������B")
1119            e.Cancel = True
1120            Exit Sub
1121        End If
1122    End Sub
1123
1124    Private Sub MaxPostNum_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MaxPost.Validating
1125        Dim pstnm As Integer
1126        Try
1127            pstnm = CType(MaxPost.Text, Integer)
1128        Catch ex As Exception
1129            MessageBox.Show("1���ԓ�������ST�񐔂ɂ͐��l�i1�`999�j��肵�Ă��������B")
1130            e.Cancel = True
1131            Exit Sub
1132        End Try
1133
1134        If pstnm < 1 Or pstnm > 999 Then
1135            MessageBox.Show("1���ԓ�������ST�񐔂ɂ͐��l�i1�`999�j��肵�Ă��������B")
1136            e.Cancel = True
1137        End If
1138    End Sub
1139End Class
Note: See TracBrowser for help on using the browser.