Changeset 21380
- Timestamp:
- 10/15/08 18:46:47 (5 years ago)
- Location:
- lang/vb2005/Tween/Tween
- Files:
-
- 7 modified
-
MyCommon.vb (modified) (1 diff)
-
MySocket.vb (modified) (4 diffs)
-
Setting.Designer.vb (modified) (8 diffs)
-
Setting.vb (modified) (5 diffs)
-
TwConfig.vb (modified) (1 diff)
-
Tween.vb (modified) (13 diffs)
-
Twitter.vb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/vb2005/Tween/Tween/MyCommon.vb
r21157 r21380 30 30 End Enum 31 31 32 Public Enum ProxyTypeEnum 33 None 34 IE 35 Specified 36 End Enum 32 37 End Module -
lang/vb2005/Tween/Tween/MySocket.vb
r21257 r21380 10 10 Private _uid As String 11 11 Private _pwd As String 12 Private _proxy As System.Net.WebProxy 13 Private _proxyType As ProxyTypeEnum 12 14 13 15 Public Enum REQ_TYPE … … 25 27 End Enum 26 28 27 Public Sub New(ByVal EncodeType As String, Optional ByVal Username As String = "", Optional ByVal Password As String = "") 29 Public Sub New(ByVal EncodeType As String, _ 30 ByVal Username As String, _ 31 ByVal Password As String, _ 32 ByVal ProxyType As ProxyTypeEnum, _ 33 ByVal ProxyAddress As String, _ 34 ByVal ProxyPort As Integer, _ 35 ByVal ProxyUser As String, _ 36 ByVal ProxyPassword As String) 28 37 _enc = Encoding.GetEncoding(EncodeType) 29 38 ServicePointManager.Expect100Continue = False … … 34 43 _pwd = Password 35 44 End If 45 Select Case ProxyType 46 Case ProxyTypeEnum.None 47 _proxy = Nothing 48 Case ProxyTypeEnum.Specified 49 _proxy = New WebProxy("http://" + ProxyAddress + ":" + ProxyPort.ToString) 50 If ProxyUser <> "" Or ProxyPassword <> "" Then 51 _proxy.Credentials = New NetworkCredential(ProxyUser, ProxyPassword) 52 End If 53 'IE�ݒ��V�X�e���ݒ��̓f�t�H���g�l�Ȃ̂ŏ������Ȃ� 54 End Select 55 _proxyType = ProxyType 36 56 End Sub 37 57 … … 60 80 If reqType = REQ_TYPE.ReqGetNoCache Then 61 81 webReq.CachePolicy = cpolicy 82 End If 83 If _proxyType <> ProxyTypeEnum.IE Then 84 webReq.Proxy = _proxy 62 85 End If 63 86 -
lang/vb2005/Tween/Tween/Setting.Designer.vb
r21368 r21380 142 142 Me.TabPage3 = New System.Windows.Forms.TabPage 143 143 Me.TabPage4 = New System.Windows.Forms.TabPage 144 Me.TabPage5 = New System.Windows.Forms.TabPage 145 Me.GroupBox2 = New System.Windows.Forms.GroupBox 146 Me.RadioProxyNone = New System.Windows.Forms.RadioButton 147 Me.RadioProxyIE = New System.Windows.Forms.RadioButton 148 Me.RadioProxySpecified = New System.Windows.Forms.RadioButton 149 Me.LabelProxyAddress = New System.Windows.Forms.Label 150 Me.TextProxyAddress = New System.Windows.Forms.TextBox 151 Me.LabelProxyPort = New System.Windows.Forms.Label 152 Me.TextProxyPort = New System.Windows.Forms.TextBox 153 Me.LabelProxyUser = New System.Windows.Forms.Label 154 Me.TextProxyUser = New System.Windows.Forms.TextBox 155 Me.LabelProxyPassword = New System.Windows.Forms.Label 156 Me.TextProxyPassword = New System.Windows.Forms.TextBox 157 Me.Label55 = New System.Windows.Forms.Label 144 158 Me.Label52 = New System.Windows.Forms.Label 145 159 Me.MaxPost = New System.Windows.Forms.TextBox … … 150 164 Me.TabPage3.SuspendLayout() 151 165 Me.TabPage4.SuspendLayout() 166 Me.TabPage5.SuspendLayout() 167 Me.GroupBox2.SuspendLayout() 152 168 Me.SuspendLayout() 153 169 ' … … 1215 1231 Me.TabControl1.Controls.Add(Me.TabPage3) 1216 1232 Me.TabControl1.Controls.Add(Me.TabPage4) 1233 Me.TabControl1.Controls.Add(Me.TabPage5) 1217 1234 Me.TabControl1.Location = New System.Drawing.Point(12, 12) 1218 1235 Me.TabControl1.Name = "TabControl1" … … 1362 1379 Me.TabPage4.UseVisualStyleBackColor = True 1363 1380 ' 1381 'TabPage5 1382 ' 1383 Me.TabPage5.Controls.Add(Me.GroupBox2) 1384 Me.TabPage5.Location = New System.Drawing.Point(4, 21) 1385 Me.TabPage5.Name = "TabPage5" 1386 Me.TabPage5.Padding = New System.Windows.Forms.Padding(3) 1387 Me.TabPage5.Size = New System.Drawing.Size(372, 437) 1388 Me.TabPage5.TabIndex = 4 1389 Me.TabPage5.Text = "通信" 1390 Me.TabPage5.UseVisualStyleBackColor = True 1391 ' 1364 1392 'Label52 1365 1393 ' … … 1371 1399 Me.Label52.Text = "1時間あたりの最大POST回数" 1372 1400 ' 1401 'GroupBox2 1402 ' 1403 Me.GroupBox2.Controls.Add(Me.Label55) 1404 Me.GroupBox2.Controls.Add(Me.TextProxyPassword) 1405 Me.GroupBox2.Controls.Add(Me.LabelProxyPassword) 1406 Me.GroupBox2.Controls.Add(Me.TextProxyUser) 1407 Me.GroupBox2.Controls.Add(Me.LabelProxyUser) 1408 Me.GroupBox2.Controls.Add(Me.TextProxyPort) 1409 Me.GroupBox2.Controls.Add(Me.LabelProxyPort) 1410 Me.GroupBox2.Controls.Add(Me.TextProxyAddress) 1411 Me.GroupBox2.Controls.Add(Me.LabelProxyAddress) 1412 Me.GroupBox2.Controls.Add(Me.RadioProxySpecified) 1413 Me.GroupBox2.Controls.Add(Me.RadioProxyIE) 1414 Me.GroupBox2.Controls.Add(Me.RadioProxyNone) 1415 Me.GroupBox2.Location = New System.Drawing.Point(7, 7) 1416 Me.GroupBox2.Name = "GroupBox2" 1417 Me.GroupBox2.Size = New System.Drawing.Size(359, 161) 1418 Me.GroupBox2.TabIndex = 0 1419 Me.GroupBox2.TabStop = False 1420 Me.GroupBox2.Text = "プロキシの設定" 1421 ' 1373 1422 'MaxPost 1374 1423 ' … … 1377 1426 Me.MaxPost.Size = New System.Drawing.Size(62, 19) 1378 1427 Me.MaxPost.TabIndex = 26 1428 ' 1429 'RadioProxyNone 1430 ' 1431 Me.RadioProxyNone.AutoSize = True 1432 Me.RadioProxyNone.Location = New System.Drawing.Point(6, 18) 1433 Me.RadioProxyNone.Name = "RadioProxyNone" 1434 Me.RadioProxyNone.Size = New System.Drawing.Size(76, 16) 1435 Me.RadioProxyNone.TabIndex = 0 1436 Me.RadioProxyNone.Text = "使用しない" 1437 Me.RadioProxyNone.UseVisualStyleBackColor = True 1438 ' 1439 'RadioProxyIE 1440 ' 1441 Me.RadioProxyIE.AutoSize = True 1442 Me.RadioProxyIE.Checked = True 1443 Me.RadioProxyIE.Location = New System.Drawing.Point(6, 40) 1444 Me.RadioProxyIE.Name = "RadioProxyIE" 1445 Me.RadioProxyIE.Size = New System.Drawing.Size(190, 16) 1446 Me.RadioProxyIE.TabIndex = 1 1447 Me.RadioProxyIE.TabStop = True 1448 Me.RadioProxyIE.Text = "InternetExplorerの設定を使用する" 1449 Me.RadioProxyIE.UseVisualStyleBackColor = True 1450 ' 1451 'RadioProxySpecified 1452 ' 1453 Me.RadioProxySpecified.AutoSize = True 1454 Me.RadioProxySpecified.Location = New System.Drawing.Point(6, 62) 1455 Me.RadioProxySpecified.Name = "RadioProxySpecified" 1456 Me.RadioProxySpecified.Size = New System.Drawing.Size(66, 16) 1457 Me.RadioProxySpecified.TabIndex = 2 1458 Me.RadioProxySpecified.Text = "指定する" 1459 Me.RadioProxySpecified.UseVisualStyleBackColor = True 1460 ' 1461 'LabelProxyAddress 1462 ' 1463 Me.LabelProxyAddress.AutoSize = True 1464 Me.LabelProxyAddress.Location = New System.Drawing.Point(38, 81) 1465 Me.LabelProxyAddress.Name = "LabelProxyAddress" 1466 Me.LabelProxyAddress.Size = New System.Drawing.Size(58, 12) 1467 Me.LabelProxyAddress.TabIndex = 3 1468 Me.LabelProxyAddress.Text = "プロキシ(&X)" 1469 ' 1470 'TextProxyAddress 1471 ' 1472 Me.TextProxyAddress.Location = New System.Drawing.Point(102, 78) 1473 Me.TextProxyAddress.Name = "TextProxyAddress" 1474 Me.TextProxyAddress.Size = New System.Drawing.Size(135, 19) 1475 Me.TextProxyAddress.TabIndex = 4 1476 ' 1477 'LabelProxyPort 1478 ' 1479 Me.LabelProxyPort.AutoSize = True 1480 Me.LabelProxyPort.Location = New System.Drawing.Point(243, 81) 1481 Me.LabelProxyPort.Name = "LabelProxyPort" 1482 Me.LabelProxyPort.Size = New System.Drawing.Size(48, 12) 1483 Me.LabelProxyPort.TabIndex = 5 1484 Me.LabelProxyPort.Text = "ポート(&P)" 1485 ' 1486 'TextProxyPort 1487 ' 1488 Me.TextProxyPort.Location = New System.Drawing.Point(297, 78) 1489 Me.TextProxyPort.Name = "TextProxyPort" 1490 Me.TextProxyPort.Size = New System.Drawing.Size(45, 19) 1491 Me.TextProxyPort.TabIndex = 6 1492 ' 1493 'LabelProxyUser 1494 ' 1495 Me.LabelProxyUser.AutoSize = True 1496 Me.LabelProxyUser.Location = New System.Drawing.Point(62, 106) 1497 Me.LabelProxyUser.Name = "LabelProxyUser" 1498 Me.LabelProxyUser.Size = New System.Drawing.Size(63, 12) 1499 Me.LabelProxyUser.TabIndex = 7 1500 Me.LabelProxyUser.Text = "ユーザ名(&U)" 1501 ' 1502 'TextProxyUser 1503 ' 1504 Me.TextProxyUser.Location = New System.Drawing.Point(131, 103) 1505 Me.TextProxyUser.Name = "TextProxyUser" 1506 Me.TextProxyUser.Size = New System.Drawing.Size(68, 19) 1507 Me.TextProxyUser.TabIndex = 8 1508 ' 1509 'LabelProxyPassword 1510 ' 1511 Me.LabelProxyPassword.AutoSize = True 1512 Me.LabelProxyPassword.Location = New System.Drawing.Point(205, 106) 1513 Me.LabelProxyPassword.Name = "LabelProxyPassword" 1514 Me.LabelProxyPassword.Size = New System.Drawing.Size(69, 12) 1515 Me.LabelProxyPassword.TabIndex = 9 1516 Me.LabelProxyPassword.Text = "パスワード(&W)" 1517 ' 1518 'TextProxyPassword 1519 ' 1520 Me.TextProxyPassword.Location = New System.Drawing.Point(274, 103) 1521 Me.TextProxyPassword.Name = "TextProxyPassword" 1522 Me.TextProxyPassword.Size = New System.Drawing.Size(68, 19) 1523 Me.TextProxyPassword.TabIndex = 10 1524 Me.TextProxyPassword.UseSystemPasswordChar = True 1525 ' 1526 'Label55 1527 ' 1528 Me.Label55.AutoSize = True 1529 Me.Label55.ForeColor = System.Drawing.SystemColors.ActiveCaption 1530 Me.Label55.Location = New System.Drawing.Point(28, 134) 1531 Me.Label55.Name = "Label55" 1532 Me.Label55.Size = New System.Drawing.Size(314, 12) 1533 Me.Label55.TabIndex = 11 1534 Me.Label55.Text = "※認証が不要な場合は、ユーザ名とパスワードは空にしてください。" 1379 1535 ' 1380 1536 'Setting … … 1405 1561 Me.TabPage3.PerformLayout() 1406 1562 Me.TabPage4.ResumeLayout(False) 1563 Me.TabPage5.ResumeLayout(False) 1564 Me.GroupBox2.ResumeLayout(False) 1565 Me.GroupBox2.PerformLayout() 1407 1566 Me.ResumeLayout(False) 1408 1567 … … 1527 1686 Friend WithEvents CheckTinyURL As System.Windows.Forms.CheckBox 1528 1687 Friend WithEvents Label50 As System.Windows.Forms.Label 1688 Friend WithEvents TabPage5 As System.Windows.Forms.TabPage 1689 Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox 1690 Friend WithEvents RadioProxySpecified As System.Windows.Forms.RadioButton 1691 Friend WithEvents RadioProxyIE As System.Windows.Forms.RadioButton 1692 Friend WithEvents RadioProxyNone As System.Windows.Forms.RadioButton 1693 Friend WithEvents TextProxyPort As System.Windows.Forms.TextBox 1694 Friend WithEvents LabelProxyPort As System.Windows.Forms.Label 1695 Friend WithEvents TextProxyAddress As System.Windows.Forms.TextBox 1696 Friend WithEvents LabelProxyAddress As System.Windows.Forms.Label 1697 Friend WithEvents TextProxyPassword As System.Windows.Forms.TextBox 1698 Friend WithEvents LabelProxyPassword As System.Windows.Forms.Label 1699 Friend WithEvents TextProxyUser As System.Windows.Forms.TextBox 1700 Friend WithEvents LabelProxyUser As System.Windows.Forms.Label 1701 Friend WithEvents Label55 As System.Windows.Forms.Label 1529 1702 Friend WithEvents MaxPost As System.Windows.Forms.TextBox 1530 1703 Friend WithEvents Label52 As System.Windows.Forms.Label -
lang/vb2005/Tween/Tween/Setting.vb
r21368 r21380 43 43 Private _MyCloseToExit As Boolean 44 44 Private _MyTinyUrlResolve As Boolean 45 Private _MyProxyType As ProxyTypeEnum 46 Private _MyProxyAddress As String 47 Private _MyProxyPort As Integer 48 Private _MyProxyUser As String 49 Private _MyProxyPassword As String 45 50 Private _MyMaxPostNum As Integer 46 51 … … 176 181 _MySortOrderLock = CheckSortOrderLock.Checked 177 182 _MyTinyUrlResolve = CheckTinyURL.Checked 183 If RadioProxyNone.Checked Then 184 _MyProxyType = ProxyTypeEnum.None 185 ElseIf RadioProxyIE.Checked Then 186 _MyProxyType = ProxyTypeEnum.IE 187 Else 188 _MyProxyType = ProxyTypeEnum.Specified 189 End If 190 _MyProxyAddress = TextProxyAddress.Text.Trim() 191 _MyProxyPort = Integer.Parse(TextProxyPort.Text.Trim()) 192 _MyProxyUser = TextProxyUser.Text.Trim() 193 _MyProxyPassword = TextProxyPassword.Text.Trim() 178 194 179 195 'TweenMain.SetMainWindowTitle() … … 280 296 CheckSortOrderLock.Checked = _MySortOrderLock 281 297 CheckTinyURL.Checked = _MyTinyUrlResolve 298 Select Case _MyProxyType 299 Case ProxyTypeEnum.None 300 RadioProxyNone.Checked = True 301 Case ProxyTypeEnum.IE 302 RadioProxyIE.Checked = True 303 Case Else 304 RadioProxySpecified.Checked = True 305 End Select 306 Dim chk As Boolean = RadioProxySpecified.Checked 307 LabelProxyAddress.Enabled = chk 308 TextProxyAddress.Enabled = chk 309 LabelProxyPort.Enabled = chk 310 TextProxyPort.Enabled = chk 311 LabelProxyUser.Enabled = chk 312 TextProxyUser.Enabled = chk 313 LabelProxyPassword.Enabled = chk 314 TextProxyPassword.Enabled = chk 315 316 TextProxyAddress.Text = _MyProxyAddress 317 TextProxyPort.Text = _MyProxyPort.ToString 318 TextProxyUser.Text = _MyProxyUser 319 TextProxyPassword.Text = _MyProxyPassword 282 320 283 321 'TweenMain.SetMainWindowTitle() … … 926 964 End Property 927 965 966 Public Property ProxyType() As ProxyTypeEnum 967 Get 968 Return _MyProxyType 969 End Get 970 Set(ByVal value As ProxyTypeEnum) 971 _MyProxyType = value 972 End Set 973 End Property 974 975 Public Property ProxyAddress() As String 976 Get 977 Return _MyProxyAddress 978 End Get 979 Set(ByVal value As String) 980 _MyProxyAddress = value 981 End Set 982 End Property 983 984 Public Property ProxyPort() As Integer 985 Get 986 Return _MyProxyPort 987 End Get 988 Set(ByVal value As Integer) 989 _MyProxyPort = value 990 End Set 991 End Property 992 993 Public Property ProxyUser() As String 994 Get 995 Return _MyProxyUser 996 End Get 997 Set(ByVal value As String) 998 _MyProxyUser = value 999 End Set 1000 End Property 1001 1002 Public Property ProxyPassword() As String 1003 Get 1004 Return _MyProxyPassword 1005 End Get 1006 Set(ByVal value As String) 1007 _MyProxyPassword = value 1008 End Set 1009 End Property 1010 928 1011 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click 929 1012 Dim filedlg As New OpenFileDialog() … … 937 1020 BrowserPathText.Text = filedlg.FileName 938 1021 1022 End If 1023 End Sub 1024 1025 Private Sub RadioProxySpecified_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioProxySpecified.CheckedChanged 1026 Dim chk As Boolean = RadioProxySpecified.Checked 1027 LabelProxyAddress.Enabled = chk 1028 TextProxyAddress.Enabled = chk 1029 LabelProxyPort.Enabled = chk 1030 TextProxyPort.Enabled = chk 1031 LabelProxyUser.Enabled = chk 1032 TextProxyUser.Enabled = chk 1033 LabelProxyPassword.Enabled = chk 1034 TextProxyPassword.Enabled = chk 1035 End Sub 1036 1037 Private Sub TextProxyPort_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextProxyPort.Validating 1038 Dim port As Integer 1039 If TextProxyPort.Text.Trim() = "" Then TextProxyPort.Text = "0" 1040 If Integer.TryParse(TextProxyPort.Text.Trim(), port) = False Then 1041 MessageBox.Show("�|�[�g�ԍ��ɂ͐����l��肵�Ă��������B") 1042 e.Cancel = True 1043 Exit Sub 1044 End If 1045 If port < 0 Or port > 65535 Then 1046 MessageBox.Show("�|�[�g�ԍ��ɂ��`65535��肵�Ă��������B") 1047 e.Cancel = True 1048 Exit Sub 939 1049 End If 940 1050 End Sub -
lang/vb2005/Tween/Tween/TwConfig.vb
r21368 r21380 1468 1468 Set(ByVal value As Boolean) 1469 1469 Me("tinyurlresolve") = value 1470 End Set 1471 End Property 1472 1473 <ConfigurationProperty("proxytype", DefaultValue:=ProxyTypeEnum.IE)> _ 1474 Public Property ProxyType() As ProxyTypeEnum 1475 Get 1476 Return Me("proxytype") 1477 End Get 1478 Set(ByVal value As ProxyTypeEnum) 1479 Me("proxytype") = value 1480 End Set 1481 End Property 1482 1483 <ConfigurationProperty("proxyaddress", DefaultValue:="127.0.0.1")> _ 1484 Public Property ProxyAddress() As String 1485 Get 1486 Return Me("proxyaddress") 1487 End Get 1488 Set(ByVal value As String) 1489 Me("proxyaddress") = value 1490 End Set 1491 End Property 1492 1493 <ConfigurationProperty("proxyport", DefaultValue:=80)> _ 1494 Public Property ProxyPort() As Integer 1495 Get 1496 Return Me("proxyport") 1497 End Get 1498 Set(ByVal value As Integer) 1499 Me("proxyport") = value 1500 End Set 1501 End Property 1502 1503 <ConfigurationProperty("proxyuser", DefaultValue:="")> _ 1504 Public Property ProxyUser() As String 1505 Get 1506 Return Me("proxyuser") 1507 End Get 1508 Set(ByVal value As String) 1509 Me("proxyuser") = value 1510 End Set 1511 End Property 1512 1513 <ConfigurationProperty("proxypassword", DefaultValue:="")> _ 1514 Public Property ProxyPassword() As String 1515 Get 1516 Dim pwd As String = "" 1517 If CStr(Me("proxypassword")).Length > 0 Then 1518 Try 1519 pwd = DecryptString(CStr(Me("proxypassword"))) 1520 Catch ex As Exception 1521 pwd = "" 1522 End Try 1523 End If 1524 Return pwd 1525 End Get 1526 Set(ByVal value As String) 1527 Dim pwd As String = value.Trim() 1528 If pwd.Length > 0 Then 1529 Try 1530 Me("proxypassword") = EncryptString(value) 1531 Catch ex As Exception 1532 Me("proxypassword") = "" 1533 End Try 1534 Else 1535 Me("proxypassword") = "" 1536 End If 1470 1537 End Set 1471 1538 End Property -
lang/vb2005/Tween/Tween/Tween.vb
r21368 r21380 76 76 FavAdd 'Fav追加 77 77 FavRemove 'Fav削除 78 CreateNewSocket 'Socket再作成 78 79 End Enum 79 80 … … 103 104 104 105 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 105 'バージョンチェック(引数:起動時チェックの場合はTrue・・・チェック結果のメッセージを表示しない)106 Call CheckNewVersion(True)107 108 106 'OSバージョン判定。ビジュアルスタイルのRenderMode切り替え(メニュー関連の描画方法) 109 107 If System.Environment.OSVersion.Version.Major = 4 Or _ … … 313 311 SettingDialog.SortOrderLock = _section.SortOrderLock 314 312 SettingDialog.TinyUrlResolve = _section.TinyURLResolve 313 SettingDialog.ProxyType = _section.ProxyType 314 SettingDialog.ProxyAddress = _section.ProxyAddress 315 SettingDialog.ProxyPort = _section.ProxyPort 316 SettingDialog.ProxyUser = _section.ProxyUser 317 SettingDialog.ProxyPassword = _section.ProxyPassword 315 318 316 319 'ユーザー名、パスワードが未設定なら設定画面を表示(初回起動時など) … … 345 348 End If 346 349 350 'バージョンチェック(引数:起動時チェックの場合はTrue・・・チェック結果のメッセージを表示しない) 351 Call CheckNewVersion(True) 352 347 353 'ウィンドウ設定 348 354 Me.WindowState = FormWindowState.Normal '通常状態 … … 379 385 380 386 'Twitter用通信クラス初期化 381 clsTw = New Twitter(_username, _password )382 clsTwPost = New Twitter(_username, _password )387 clsTw = New Twitter(_username, _password, SettingDialog.ProxyType, SettingDialog.ProxyAddress, SettingDialog.ProxyPort, SettingDialog.ProxyUser, SettingDialog.ProxyPassword) 388 clsTwPost = New Twitter(_username, _password, SettingDialog.ProxyType, SettingDialog.ProxyAddress, SettingDialog.ProxyPort, SettingDialog.ProxyUser, SettingDialog.ProxyPassword) 383 389 Call clsTw.GetWedata() 384 390 clsTw.NextThreshold = SettingDialog.NextPageThreshold '次頁取得閾値 … … 606 612 Private Sub Network_NetworkAvailabilityChanged(ByVal sender As Object, ByVal e As Devices.NetworkAvailableEventArgs) 607 613 If e.IsNetworkAvailable Then 608 Call clsTw.CreateNewSocket() 609 Call clsTwPost.CreateNewSocket() 614 Dim args As New GetWorkerArg 615 args.type = WORKERTYPE.CreateNewSocket 616 Do While GetTimelineWorker.IsBusy 617 Threading.Thread.Sleep(100) 618 Application.DoEvents() 619 Loop 620 GetTimelineWorker.RunWorkerAsync(args) 621 Do While PostWorker.IsBusy 622 Threading.Thread.Sleep(100) 623 Application.DoEvents() 624 Loop 625 PostWorker.RunWorkerAsync(args) 610 626 PostButton.Enabled = True 611 627 'ReplyStripMenuItem.Enabled = True … … 626 642 _refreshIconCnt = 0 627 643 TimerRefreshIcon.Enabled = True 628 Dim args As New GetWorkerArg629 644 args.page = 1 630 645 args.endPage = 1 … … 1466 1481 Case WORKERTYPE.FavRemove 1467 1482 ret = clsTw.PostFavRemove(args.ids(args.page)) 1483 Case WORKERTYPE.CreateNewSocket 1484 Call clsTw.CreateNewSocket() 1468 1485 End Select 1469 1486 If args.type = WORKERTYPE.PostMessage Then … … 1583 1600 1584 1601 Select Case rslt.type 1602 Case WORKERTYPE.CreateNewSocket 1603 Exit Sub 1585 1604 Case WORKERTYPE.Timeline 1586 1605 StatusLabel.Text = "Recent更新完了" … … 3023 3042 clsTw.HubServer = SettingDialog.HubServer 3024 3043 clsTwPost.HubServer = SettingDialog.HubServer 3044 clsTw.ProxyType = SettingDialog.ProxyType 3045 clsTw.ProxyAddress = SettingDialog.ProxyAddress 3046 clsTw.ProxyPort = SettingDialog.ProxyPort 3047 clsTw.ProxyUser = SettingDialog.ProxyUser 3048 clsTw.ProxyPassword = SettingDialog.ProxyPassword 3049 Dim args As New GetWorkerArg 3050 args.type = WORKERTYPE.CreateNewSocket 3051 Do While GetTimelineWorker.IsBusy 3052 Threading.Thread.Sleep(100) 3053 Application.DoEvents() 3054 Loop 3055 GetTimelineWorker.RunWorkerAsync(args) 3056 clsTwPost.ProxyType = SettingDialog.ProxyType 3057 clsTwPost.ProxyAddress = SettingDialog.ProxyAddress 3058 clsTwPost.ProxyPort = SettingDialog.ProxyPort 3059 clsTwPost.ProxyUser = SettingDialog.ProxyUser 3060 clsTwPost.ProxyPassword = SettingDialog.ProxyPassword 3061 Do While PostWorker.IsBusy 3062 Threading.Thread.Sleep(100) 3063 Application.DoEvents() 3064 Loop 3065 PostWorker.RunWorkerAsync(args) 3025 3066 'If isz <> SettingDialog.IconSz Then 3026 3067 ' Select Case SettingDialog.IconSz … … 4362 4403 4363 4404 Private Sub CheckNewVersion(Optional ByVal startup As Boolean = False) 4364 Dim _mySock As New MySocket("Shift_JIS") 4405 Dim _mySock As New MySocket("Shift_JIS", "", "", _ 4406 SettingDialog.ProxyType, _ 4407 SettingDialog.ProxyAddress, _ 4408 SettingDialog.ProxyPort, _ 4409 SettingDialog.ProxyUser, _ 4410 SettingDialog.ProxyPassword) 4365 4411 Dim retMsg As String 4366 4412 Dim resStatus As String = "" … … 5774 5820 Dim args As GetWorkerArg = DirectCast(e.Argument, GetWorkerArg) 5775 5821 Try 5776 ' For i As Integer = 0 To 2 5777 CheckReplyTo(args.status) 5778 5779 ret = clsTwPost.PostStatus(args.status, _reply_to_id) 5780 5781 _reply_to_id = 0 5782 _reply_to_name = Nothing 5822 If args.type = WORKERTYPE.CreateNewSocket Then 5823 Call clsTwPost.CreateNewSocket() 5824 Else 5825 ' For i As Integer = 0 To 2 5826 CheckReplyTo(args.status) 5827 5828 ret = clsTwPost.PostStatus(args.status, _reply_to_id) 5829 5830 _reply_to_id = 0 5831 _reply_to_name = Nothing 5832 End If 5783 5833 rslt.retMsg = ret 5784 5834 rslt.TLine = Nothing … … 5847 5897 5848 5898 Select Case rslt.type 5899 Case WORKERTYPE.CreateNewSocket 5900 Exit Sub 5849 5901 Case WORKERTYPE.PostMessage 5850 5902 StatusText.Enabled = True -
lang/vb2005/Tween/Tween/Twitter.vb
r21318 r21380 11 11 Private _uid As String 12 12 Private _pwd As String 13 Private _proxyType As ProxyTypeEnum 14 Private _proxyAddress As String 15 Private _proxyPort As Integer 16 Private _proxyUser As String 17 Private _proxyPassword As String 18 13 19 'Private _lastId As String 14 20 'Private _lastName As String … … 164 170 End Enum 165 171 166 Public Sub New(Optional ByVal Username As String = "", Optional ByVal Password As String = "") 172 Public Sub New(ByVal Username As String, _ 173 ByVal Password As String, _ 174 ByVal ProxyType As ProxyTypeEnum, _ 175 ByVal ProxyAddress As String, _ 176 ByVal ProxyPort As Integer, _ 177 ByVal ProxyUser As String, _ 178 ByVal ProxyPassword As String) 167 179 'Proxyを考慮したSocketの宛先設定 168 180 'TIconSmallList = New ImageList 169 181 'TIconSmallList.ImageSize = New Size(_iconSz, _iconSz) 170 182 'TIconSmallList.ColorDepth = ColorDepth.Depth32Bit 171 _mySock = New MySocket("UTF-8", Username, Password )183 _mySock = New MySocket("UTF-8", Username, Password, ProxyType, ProxyAddress, ProxyPort, ProxyUser, ProxyPassword) 172 184 _uid = Username 173 185 _pwd = Password 174 186 follower.Add(_uid) 187 _proxyType = ProxyType 188 _proxyAddress = ProxyAddress 189 _proxyPort = ProxyPort 190 _proxyUser = ProxyUser 191 _proxyPassword = ProxyPassword 175 192 End Sub 176 193 … … 1579 1596 End Property 1580 1597 1598 Public WriteOnly Property ProxyType() As ProxyTypeEnum 1599 Set(ByVal value As ProxyTypeEnum) 1600 _proxyType = value 1601 End Set 1602 End Property 1603 1604 Public WriteOnly Property ProxyAddress() As String 1605 Set(ByVal value As String) 1606 _proxyAddress = value 1607 End Set 1608 End Property 1609 1610 Public WriteOnly Property ProxyPort() As Integer 1611 Set(ByVal value As Integer) 1612 _proxyPort = value 1613 End Set 1614 End Property 1615 1616 Public WriteOnly Property ProxyUser() As String 1617 Set(ByVal value As String) 1618 _proxyUser = value 1619 End Set 1620 End Property 1621 1622 Public WriteOnly Property ProxyPassword() As String 1623 Set(ByVal value As String) 1624 _proxyPassword = value 1625 End Set 1626 End Property 1627 1581 1628 Public Sub CreateNewSocket() 1582 1629 _mySock = Nothing 1583 _mySock = New MySocket("UTF-8", Username, Password )1630 _mySock = New MySocket("UTF-8", Username, Password, _proxyType, _proxyAddress, _proxyPort, _proxyUser, _proxyPassword) 1584 1631 _signed = False 1585 1632 End Sub
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)