Changeset 23890
- Timestamp:
- 11/17/08 13:58:34 (5 years ago)
- Location:
- lang/vb2005/Tween/Tween
- Files:
-
- 3 modified
-
Setting.vb (modified) (25 diffs)
-
StatusDictionary.vb (modified) (13 diffs)
-
TwConfig.vb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/vb2005/Tween/Tween/Setting.vb
r23163 r23890 1 ' Tween - Client of Twitter 2 ' Copyright © 2007-2008 kiri_feather (@kiri_feather) <kiri_feather@gmail.com> 3 ' © 2008 Moz (@syo68k) <http://iddy.jp/profile/moz/> 4 ' © 2008 takeshik (@takeshik) <http://www.takeshik.org/> 5 ' All rights reserved. 6 ' 7 ' This file is part of Tween. 8 ' 9 ' This program is free software; you can redistribute it and/or modify it 10 ' under the terms of the GNU General Public License as published by the Free 11 ' Software Foundation; either version 3 of the License, or (at your option) 12 ' any later version. 13 ' 14 ' This program is distributed in the hope that it will be useful, but 15 ' WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 16 ' or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17 ' for more details. 18 ' 19 ' You should have received a copy of the GNU General Public License along 20 ' with this program. If not, see <http://www.gnu.org/licenses/>, or write to 21 ' the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, 22 ' Boston, MA 02110-1301, USA. 23 1 24 Imports System.Xml 2 25 … … 165 188 Else 166 189 xdocument.AppendChild(xdocument.CreateXmlDeclaration("1.0", "utf-8", Nothing)) 167 xdocument.AppendChild(xdocument.CreateComment(" ���̐ݒ��@�C����Tween �ɂ������������������B�蓮�ŕύX���Ȃ��ł��������B"))190 xdocument.AppendChild(xdocument.CreateComment("この設定ファイルは Tween により自動生成されました。手動で変更しないでください。")) 168 191 xdocument.AppendChild(xdocument.CreateElement("tween-configuration")) 169 192 xdocument.Save(fileName) … … 193 216 Password.Text.Trim = "" Then 194 217 Me.DialogResult = Windows.Forms.DialogResult.Cancel 195 MessageBox.Show(" ���[�U�[���ƃp�X���[�h��肵�Ă��������B")218 MessageBox.Show("ユーザー名とパスワードを指定してください。") 196 219 Exit Sub 197 220 End If 198 221 If Username.Text.Contains("@") Then 199 222 Me.DialogResult = Windows.Forms.DialogResult.Cancel 200 MessageBox.Show(" ���[�U�[���Ɂw@�x��߂Ȃ��ł��������B�i���[���A�h���X�s�j")223 MessageBox.Show("ユーザー名に『@』を含めないでください。(メールアドレス不可)") 201 224 Exit Sub 202 225 End If … … 312 335 313 336 Catch ex As Exception 314 MessageBox.Show(" �ݒ��Ɍ����������B")337 MessageBox.Show("設定値に誤りがあります。") 315 338 Me.DialogResult = Windows.Forms.DialogResult.Cancel 316 339 Exit Sub … … 454 477 prd = CType(TimelinePeriod.Text, Integer) 455 478 Catch ex As Exception 456 MessageBox.Show(" �X�V�Ԋu�ɂ͐��l�i0�܂���5�`600�j��肵�Ă��������B")479 MessageBox.Show("更新間隔には数値(0または15~600)を指定してください。") 457 480 e.Cancel = True 458 481 Exit Sub … … 460 483 461 484 If prd <> 0 And (prd < 15 Or prd > 600) Then 462 MessageBox.Show(" �X�V�Ԋu�ɂ͐��l�i0�܂���5�`600�j��肵�Ă��������B")485 MessageBox.Show("更新間隔には数値(0または15~600)を指定してください。") 463 486 e.Cancel = True 464 487 End If … … 470 493 thr = CType(NextThreshold.Text, Integer) 471 494 Catch ex As Exception 472 MessageBox.Show(" 臒l�ɂ͐��l�i1�`20�j��肵�Ă��������B")495 MessageBox.Show("閾値には数値(1~20)を指定してください。") 473 496 e.Cancel = True 474 497 Exit Sub … … 476 499 477 500 If thr < 1 Or thr > 20 Then 478 MessageBox.Show(" 臒l�ɂ͐��l�i1�`20�j��肵�Ă��������B")501 MessageBox.Show("閾値には数値(1~20)を指定してください。") 479 502 e.Cancel = True 480 503 End If … … 486 509 thr = CType(NextPages.Text, Integer) 487 510 Catch ex As Exception 488 MessageBox.Show(" �y�[�W���ɂ͐��l�i1�`20�j��肵�Ă��������B")511 MessageBox.Show("ページ数には数値(1~20)を指定してください。") 489 512 e.Cancel = True 490 513 Exit Sub … … 492 515 493 516 If thr < 1 Or thr > 20 Then 494 MessageBox.Show(" �y�[�W���ɂ͐��l�i1�`20�j��肵�Ă��������B")517 MessageBox.Show("ページ数には数値(1~20)を指定してください。") 495 518 e.Cancel = True 496 519 End If … … 502 525 prd = CType(DMPeriod.Text, Integer) 503 526 Catch ex As Exception 504 MessageBox.Show(" �X�V�Ԋu�ɂ͐��l�i0�܂���5�`600�j��肵�Ă��������B")527 MessageBox.Show("更新間隔には数値(0または15~600)を指定してください。") 505 528 e.Cancel = True 506 529 Exit Sub … … 508 531 509 532 If prd <> 0 And (prd < 15 Or prd > 600) Then 510 MessageBox.Show(" �X�V�Ԋu�ɂ͐��l�i0�܂���5�`600�j��肵�Ă��������B")533 MessageBox.Show("更新間隔には数値(0または15~600)を指定してください。") 511 534 e.Cancel = True 512 535 End If … … 518 541 ' days = CType(ReadLogDays.Text, Integer) 519 542 'Catch ex As Exception 520 ' MessageBox.Show(" �ǂݍ��ݓ��͐��l�i0�`7�j��肵�Ă��������B")543 ' MessageBox.Show("読み込み日数には数値(0~7)を指定してください。") 521 544 ' e.Cancel = True 522 545 ' Exit Sub … … 524 547 525 548 'If days < 0 Or days > 7 Then 526 ' MessageBox.Show(" �ǂݍ��ݓ��͐��l�i0�`7�j��肵�Ă��������B")549 ' MessageBox.Show("読み込み日数には数値(0~7)を指定してください。") 527 550 ' e.Cancel = True 528 551 'End If … … 534 557 pages = CType(StartupReadPages.Text, Integer) 535 558 Catch ex As Exception 536 MessageBox.Show(" �ǂݍ��݃y�[�W���ɂ͐��l�i1�`999�j��肵�Ă��������B")559 MessageBox.Show("読み込みページ数には数値(1~999)を指定してください。") 537 560 e.Cancel = True 538 561 Exit Sub … … 540 563 541 564 If pages < 1 Or pages > 999 Then 542 MessageBox.Show(" �ǂݍ��݃y�[�W���ɂ͐��l�i1�`999�j��肵�Ă��������B")565 MessageBox.Show("読み込みページ数には数値(1~999)を指定してください。") 543 566 e.Cancel = True 544 567 End If … … 550 573 pages = CType(StartupReadReply.Text, Integer) 551 574 Catch ex As Exception 552 MessageBox.Show(" �ǂݍ��݃y�[�W���ɂ͐��l�i0�`999�j��肵�Ă��������B")575 MessageBox.Show("読み込みページ数には数値(0~999)を指定してください。") 553 576 e.Cancel = True 554 577 Exit Sub … … 556 579 557 580 If pages < 0 Or pages > 999 Then 558 MessageBox.Show(" �ǂݍ��݃y�[�W���ɂ͐��l�i0�`999�j��肵�Ă��������B")581 MessageBox.Show("読み込みページ数には数値(0~999)を指定してください。") 559 582 e.Cancel = True 560 583 End If … … 566 589 pages = CType(StartupReadDM.Text, Integer) 567 590 Catch ex As Exception 568 MessageBox.Show(" �ǂݍ��݃y�[�W���ɂ͐��l�i1�`999�j��肵�Ă��������B")591 MessageBox.Show("読み込みページ数には数値(1~999)を指定してください。") 569 592 e.Cancel = True 570 593 Exit Sub … … 572 595 573 596 If pages < 1 Or pages > 999 Then 574 MessageBox.Show(" �ǂݍ��݃y�[�W���ɂ͐��l�i1�`999�j��肵�Ă��������B")597 MessageBox.Show("読み込みページ数には数値(1~999)を指定してください。") 575 598 e.Cancel = True 576 599 End If … … 1049 1072 Private Sub HubServerDomain_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles HubServerDomain.Validating 1050 1073 If HubServerDomain.Text.Trim = "" Then 1051 MessageBox.Show(" �ɂ͂ł��܂���f�t�H���g�l�utwitter.com�v���ݒ肳�����B", "�h���C���w��MessageBoxButtons.OK, MessageBoxIcon.Warning)1074 MessageBox.Show("空欄にはできません。デフォルト値「twitter.com」が設定されます。", "ドメイン指定", MessageBoxButtons.OK, MessageBoxIcon.Warning) 1052 1075 HubServerDomain.Text = "twitter.com" 1053 1076 End If … … 1191 1214 Dim filedlg As New OpenFileDialog() 1192 1215 1193 filedlg.Filter = " ��s�`���t�@�C��(*.exe)|*.exe|���ׂẴt�@�C��(*.*)|*.*"1216 filedlg.Filter = "実行形式ファイル(*.exe)|*.exe|すべてのファイル(*.*)|*.*" 1194 1217 filedlg.FilterIndex = 1 1195 filedlg.Title = " �u���E�U��肵�Ă�������"1218 filedlg.Title = "ブラウザを指定してください" 1196 1219 filedlg.RestoreDirectory = True 1197 1220 … … 1218 1241 If TextProxyPort.Text.Trim() = "" Then TextProxyPort.Text = "0" 1219 1242 If Integer.TryParse(TextProxyPort.Text.Trim(), port) = False Then 1220 MessageBox.Show(" �|�[�g�ԍ��ɂ͐����l��肵�Ă��������B")1243 MessageBox.Show("ポート番号には整数値を指定してください。") 1221 1244 e.Cancel = True 1222 1245 Exit Sub 1223 1246 End If 1224 1247 If port < 0 Or port > 65535 Then 1225 MessageBox.Show(" �|�[�g�ԍ��ɂ��`65535��肵�Ă��������B")1248 MessageBox.Show("ポート番号には0~65535を指定してください。") 1226 1249 e.Cancel = True 1227 1250 Exit Sub … … 1234 1257 pstnm = CType(MaxPost.Text, Integer) 1235 1258 Catch ex As Exception 1236 MessageBox.Show("1 ���ԓ�������ST�ɂ͐��l�i1�`999�j��肵�Ă��������B")1259 MessageBox.Show("1時間当たり最大POST回数には数値(1~999)を指定してください。") 1237 1260 e.Cancel = True 1238 1261 Exit Sub … … 1240 1263 1241 1264 If pstnm < 1 Or pstnm > 999 Then 1242 MessageBox.Show("1 ���ԓ�������ST�ɂ͐��l�i1�`999�j��肵�Ă��������B")1265 MessageBox.Show("1時間当たり最大POST回数には数値(1~999)を指定してください。") 1243 1266 e.Cancel = True 1244 1267 End If -
lang/vb2005/Tween/Tween/StatusDictionary.vb
r22965 r23890 1 ' Tween - Client of Twitter 2 ' Copyright © 2007-2008 kiri_feather (@kiri_feather) <kiri_feather@gmail.com> 3 ' © 2008 Moz (@syo68k) <http://iddy.jp/profile/moz/> 4 ' © 2008 takeshik (@takeshik) <http://www.takeshik.org/> 5 ' All rights reserved. 6 ' 7 ' This file is part of Tween. 8 ' 9 ' This program is free software; you can redistribute it and/or modify it 10 ' under the terms of the GNU General Public License as published by the Free 11 ' Software Foundation; either version 3 of the License, or (at your option) 12 ' any later version. 13 ' 14 ' This program is distributed in the hope that it will be useful, but 15 ' WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 16 ' or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17 ' for more details. 18 ' 19 ' You should have received a copy of the GNU General Public License along 20 ' with this program. If not, see <http://www.gnu.org/licenses/>, or write to 21 ' the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, 22 ' Boston, MA 02110-1301, USA. 23 1 24 Imports System.Collections.Generic 2 25 Imports System.Collections.ObjectModel … … 13 36 14 37 Public Sub BeginUpdate() 15 _addedIds = New Specialized.StringCollection() '�^�u�lj�pID�R���N�V�������� End Sub 38 _addedIds = New Specialized.StringCollection() 'タブ追加用IDコレクション準備 39 End Sub 16 40 17 41 Public Function EndUpdate() As String 18 Dim NotifyString As String = _tabs.Distribute(_addedIds) ' �^�u�ɒlj�19 _tabs.Sort() ' �\�[�g20 Return NotifyString ' �ʒm�p���b�Z�[�W���42 Dim NotifyString As String = _tabs.Distribute(_addedIds) 'タブに追加 43 _tabs.Sort() 'ソート 44 Return NotifyString '通知用メッセージを戻す 21 45 End Function 22 46 … … 40 64 41 65 'Public Class StatusDictionary 42 ' Private _tabs As TabInformations ' �v�fTabsClass�N���X�̃W�F�l���b�N���X�g�C���X�^���X�i�^�u���p�j66 ' Private _tabs As TabInformations '要素TabsClassクラスのジェネリックリストインスタンス(タブ情報用) 43 67 ' Private _statuses As New Dictionary(Of String, MyListItem) 44 68 ' Private _setting As Setting … … 287 311 288 312 Public Class TabInformations 289 ' �ʃ^�u�̏���tionary�ŕێ�313 '個別タブの情報をDictionaryで保持 290 314 Private _sorter As ListViewItemComparerClass 291 315 Private _tabs As New Dictionary(Of String, TabClass)() … … 348 372 349 373 Public Function Distribute(ByVal AddedIDs As Specialized.StringCollection) As String 350 ' �e�^�u�̃t�B���^�[�Əƍ��B���v�������u��D�lj�351 Return " �ʒm���b�Z�[�W"374 '各タブのフィルターと照合。合致したらタブにID追加 375 Return "通知メッセージ" 352 376 End Function 353 377 … … 529 553 530 554 '''' <summary> 531 '''' �������@555 '''' 比較する方法 532 556 '''' </summary> 533 557 'Public Enum ComparerMode … … 544 568 545 569 '''' <summary> 546 '''' ��ёւ���stView��ԍ�570 '''' 並び替えるListView列の番号 547 571 '''' </summary> 548 572 'Public Property Column() As Integer … … 565 589 566 590 ''' <summary> 567 ''' �������~����591 ''' 昇順か降順か 568 592 ''' </summary> 569 593 Public Property Order() As SortOrder … … 577 601 578 602 '''' <summary> 579 '''' ��ёւ��̕� '''' </summary> 603 '''' 並び替えの方法 604 '''' </summary> 580 605 'Public Property Mode() As ComparerMode 581 606 ' Get … … 588 613 589 614 '''' <summary> 590 '''' �Ƃ̕�ёւ��̕� '''' </summary> 615 '''' 列ごとの並び替えの方法 616 '''' </summary> 591 617 'Public WriteOnly Property ColumnModes() As ComparerMode() 592 618 ' Set(ByVal Value As ComparerMode()) … … 596 622 597 623 ''' <summary> 598 ''' ListViewItemComparer �N���X�̃R���X�g���N�^624 ''' ListViewItemComparerクラスのコンストラクタ 599 625 ''' </summary> 600 ''' <param name="col"> ��ёւ����ԍ�</param>601 ''' <param name="ord"> �������~����</param>602 ''' <param name="cmod"> ��ёւ��̕�param>626 ''' <param name="col">並び替える列番号</param> 627 ''' <param name="ord">昇順か降順か</param> 628 ''' <param name="cmod">並び替えの方法</param> 603 629 Public Sub New(ByVal ord As SortOrder) 604 630 _order = ord … … 609 635 End Sub 610 636 611 'x ��y���������Ƃ��̓}�C�i�X�̐��A�傫���Ƃ��̓v���X�̐��A612 ' �����Ƃ������637 'xがyより小さいときはマイナスの数、大きいときはプラスの数、 638 '同じときは0を返す 613 639 Public Function Compare(ByVal x As String, ByVal y As String) _ 614 640 As Integer Implements IComparer(Of String).Compare … … 616 642 617 643 result = String.Compare(x, y) 618 '�~���̎��͌��ʂ�t�ɂ��� If _order = SortOrder.Descending Then 644 '降順の時は結果を+-逆にする 645 If _order = SortOrder.Descending Then 619 646 result = -result 620 647 End If -
lang/vb2005/Tween/Tween/TwConfig.vb
r23269 r23890 1 ' Tween - Client of Twitter 2 ' Copyright © 2007-2008 kiri_feather (@kiri_feather) <kiri_feather@gmail.com> 3 ' © 2008 Moz (@syo68k) <http://iddy.jp/profile/moz/> 4 ' © 2008 takeshik (@takeshik) <http://www.takeshik.org/> 5 ' All rights reserved. 6 ' 7 ' This file is part of Tween. 8 ' 9 ' This program is free software; you can redistribute it and/or modify it 10 ' under the terms of the GNU General Public License as published by the Free 11 ' Software Foundation; either version 3 of the License, or (at your option) 12 ' any later version. 13 ' 14 ' This program is distributed in the hope that it will be useful, but 15 ' WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 16 ' or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17 ' for more details. 18 ' 19 ' You should have received a copy of the GNU General Public License along 20 ' with this program. If not, see <http://www.gnu.org/licenses/>, or write to 21 ' the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, 22 ' Boston, MA 02110-1301, USA. 23 1 24 Imports System.Configuration 2 25 … … 1619 1642 1620 1643 Private Function EncryptString(ByVal str As String) As String 1621 '������o�C�g�^�z����� Dim bytesIn As Byte() = System.Text.Encoding.UTF8.GetBytes(str) 1622 1623 'DESCryptoServiceProvider�I�u�W�F�N�g�̍쐬 1644 '文字列をバイト型配列にする 1645 Dim bytesIn As Byte() = System.Text.Encoding.UTF8.GetBytes(str) 1646 1647 'DESCryptoServiceProviderオブジェクトの作成 1624 1648 Dim des As New System.Security.Cryptography.DESCryptoServiceProvider 1625 1649 1626 '���L�L�[�Ə����N�^��� '�p�X���[�h��C�g�z����� Dim bytesKey As Byte() = System.Text.Encoding.UTF8.GetBytes("_tween_encrypt_key_") 1627 '���L�L�[�Ə����N�^��� des.Key = ResizeBytesArray(bytesKey, des.Key.Length) 1650 '共有キーと初期化ベクタを決定 1651 'パスワードをバイト配列にする 1652 Dim bytesKey As Byte() = System.Text.Encoding.UTF8.GetBytes("_tween_encrypt_key_") 1653 '共有キーと初期化ベクタを設定 1654 des.Key = ResizeBytesArray(bytesKey, des.Key.Length) 1628 1655 des.IV = ResizeBytesArray(bytesKey, des.IV.Length) 1629 1656 1630 ' �Í������ꂽ�f�[�^����o�����߂�emoryStream1657 '暗号化されたデータを書き出すためのMemoryStream 1631 1658 Using msOut As New System.IO.MemoryStream 1632 'DES �Í����I�u�W�F�N�g�̍쐬1659 'DES暗号化オブジェクトの作成 1633 1660 Using desdecrypt As System.Security.Cryptography.ICryptoTransform = _ 1634 1661 des.CreateEncryptor() 1635 1662 1636 ' �������ނ��߂�ryptoStream�̍쐬1663 '書き込むためのCryptoStreamの作成 1637 1664 Using cryptStream As New System.Security.Cryptography.CryptoStream( _ 1638 1665 msOut, desdecrypt, _ 1639 1666 System.Security.Cryptography.CryptoStreamMode.Write) 1640 ' ��������1667 '書き込む 1641 1668 cryptStream.Write(bytesIn, 0, bytesIn.Length) 1642 1669 cryptStream.FlushFinalBlock() 1643 ' �Í������ꂽ�f�[�^���1670 '暗号化されたデータを取得 1644 1671 Dim bytesOut As Byte() = msOut.ToArray() 1645 1672 1646 '���� cryptStream.Close() 1673 '閉じる 1674 cryptStream.Close() 1647 1675 msOut.Close() 1648 1676 1649 'Base64 �ŕ�����ύX���Č��ʂ��1677 'Base64で文字列に変更して結果を返す 1650 1678 Return System.Convert.ToBase64String(bytesOut) 1651 1679 End Using … … 1655 1683 1656 1684 Private Function DecryptString(ByVal str As String) As String 1657 'DESCryptoServiceProvider �I�u�W�F�N�g�̍쐬1685 'DESCryptoServiceProviderオブジェクトの作成 1658 1686 Dim des As New System.Security.Cryptography.DESCryptoServiceProvider 1659 1687 1660 '���L�L�[�Ə����N�^��� '�p�X���[�h��C�g�z����� Dim bytesKey As Byte() = System.Text.Encoding.UTF8.GetBytes("_tween_encrypt_key_") 1661 '���L�L�[�Ə����N�^��� des.Key = ResizeBytesArray(bytesKey, des.Key.Length) 1688 '共有キーと初期化ベクタを決定 1689 'パスワードをバイト配列にする 1690 Dim bytesKey As Byte() = System.Text.Encoding.UTF8.GetBytes("_tween_encrypt_key_") 1691 '共有キーと初期化ベクタを設定 1692 des.Key = ResizeBytesArray(bytesKey, des.Key.Length) 1662 1693 des.IV = ResizeBytesArray(bytesKey, des.IV.Length) 1663 1694 1664 'Base64 �ŕ�����o�C�g�z��߂�1695 'Base64で文字列をバイト配列に戻す 1665 1696 Dim bytesIn As Byte() = System.Convert.FromBase64String(str) 1666 ' �Í������ꂽ�f�[�^��ݍ��ނ��߂�emoryStream1697 '暗号化されたデータを読み込むためのMemoryStream 1667 1698 Using msIn As New System.IO.MemoryStream(bytesIn) 1668 'DES �������I�u�W�F�N�g�̍쐬1699 'DES復号化オブジェクトの作成 1669 1700 Using desdecrypt As System.Security.Cryptography.ICryptoTransform = _ 1670 1701 des.CreateDecryptor() 1671 ' �ǂݍ��ނ��߂�ryptoStream�̍쐬1702 '読み込むためのCryptoStreamの作成 1672 1703 Using cryptStreem As New System.Security.Cryptography.CryptoStream( _ 1673 1704 msIn, desdecrypt, _ 1674 1705 System.Security.Cryptography.CryptoStreamMode.Read) 1675 1706 1676 ' ���������ꂽ�f�[�^������邽�߂�treamReader1707 '復号化されたデータを取得するためのStreamReader 1677 1708 Using srOut As New System.IO.StreamReader( _ 1678 1709 cryptStreem, System.Text.Encoding.UTF8) 1679 '���������ꂽ�f�[�^������� Dim result As String = srOut.ReadToEnd() 1680 1681 '���� srOut.Close() 1710 '復号化されたデータを取得する 1711 Dim result As String = srOut.ReadToEnd() 1712 1713 '閉じる 1714 srOut.Close() 1682 1715 cryptStreem.Close() 1683 1716 msIn.Close()
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)