Skip to content

Commit

Permalink
0750
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@3 e39ad16e-3079-482e-bb30-4b4d378143b6
  • Loading branch information
kiri_feather authored and upsilon committed Feb 18, 2012
0 parents commit f1ddf63
Show file tree
Hide file tree
Showing 96 changed files with 48,530 additions and 0 deletions.
30 changes: 30 additions & 0 deletions LICENSE.ja.txt
@@ -0,0 +1,30 @@
謝辞

本ソフトウェアにおいて、Tween/Resources ディレクトリに含まれる
以下のファイル:
1o.ico
2b.ico
3b.ico
4b.ico
4r.ico
4y.ico
5b.ico
5o.ico
5r.ico
5y.ico
6b.ico
6o.ico
re.ico
re2.ico
re3.ico
re4.ico
は Minami <http://www.pi-kun.com/> によって作成されました。
上記のファイルは GNU General Public License (GPL) (GNU 一般公衆利用許諾書)
によってライセンスされていません。上記のファイルに対する問い合わせは、
Tween の著作者ではなくアイコンの著者にお問い合わせください。

謝辞終わり。

GNU General Public License (GPL) (GNU 一般公衆利用許諾書) の非公式な
日本語訳は 2008 年 11 月 17 日 (日本時間) の時点で
http://sourceforge.jp/magazine/07/09/02/130237 にて公開されています。
702 changes: 702 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions Tween.sln
@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Tween", "Tween\Tween.vbproj", "{41B54F21-5442-47D4-80F0-872D56D9E1FD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{41B54F21-5442-47D4-80F0-872D56D9E1FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41B54F21-5442-47D4-80F0-872D56D9E1FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41B54F21-5442-47D4-80F0-872D56D9E1FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41B54F21-5442-47D4-80F0-872D56D9E1FD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file added Tween.suo
Binary file not shown.
44 changes: 44 additions & 0 deletions Tween/AnalyzeKey.vb
@@ -0,0 +1,44 @@
Public Module AnalyzeKey
' このファイルはデバッグビルドのTweenにより自動作成されました 作成日時 2009/05/08 10:59:14

Public _splitPost As String = "<li id=""status_"
Public _splitPostRecent As String = "<li id=""status_"
Public _statusIdTo As String = """"
Public _splitDM As String = "<li id=""direct_message_"
Public _parseName As String = "://twitter.com/"
Public _parseNameTo As String = """"
Public _parseNick As String = "<img alt="""
Public _parseNickTo As String = """"
Public _parseImg As String = "src="""
Public _parseImgTo As String = """"
Public _parseMsg1 As String = "<span class=""entry-content"">"
Public _parseMsg2 As String = "</span>"
Public _parseDM1 As String = "<span class=""entry-content"">"
Public _parseDM11 As String = "<span class=""protected"">"
Public _parseDM2 As String = "</span>"
Public _parseDate As String = "data=""{time:'"
Public _parseDateTo As String = "'}"">"
Public _getAuthKey As String = "<input name=""authenticity_token"" value="""
Public _getAuthKeyTo As String = """"
Public _parseStar As String = "<a class="""
Public _parseStarTo As String = """"
Public _parseStarEmpty As String = "fav-action non-fav"
Public _followerList As String = "<select id=""direct_message_user_id"" name=""user[id]""><option value="""" selected=""selected"">"
Public _followerMbr1 As String = "/option>"
Public _followerMbr2 As String = """>"
Public _followerMbr3 As String = "<"
Public _getInfoTwitter As String = "<div class=""bulletin info"">"
Public _getInfoTwitterTo As String = "</div>"
Public _isProtect As String = "<span class=""lock-icon"""
Public _isReplyEng As String = ">in reply to "
Public _isReplyJpn As String = ">u8fd4u4fe1: "
Public _isReplyTo As String = "<"
Public _parseProtectMsg1 As String = "."" />"
Public _parseProtectMsg2 As String = "<span class=""meta entry-meta"">"
Public _parseDMcountFrom As String = "<span id=""message_count"" class=""stat_count"">"
Public _parseDMcountTo As String = "</span>"
Public _parseSourceFrom As String = "<span>from <a href="
Public _parseSource2 As String = """>"
Public _parseSourceTo As String = "</a>"
Public _removeClass As String = "<li class="""
End Module
140 changes: 140 additions & 0 deletions Tween/ApplicationEvents.vb
@@ -0,0 +1,140 @@
' Tween - Client of Twitter
' Copyright (c) 2007-2009 kiri_feather (@kiri_feather) <kiri_feather@gmail.com>
' (c) 2008-2009 Moz (@syo68k) <http://iddy.jp/profile/moz/>
' (c) 2008-2009 takeshik (@takeshik) <http://www.takeshik.org/>
' All rights reserved.
'
' This file is part of Tween.
'
' This program is free software; you can redistribute it and/or modify it
' under the terms of the GNU General Public License as published by the Free
' Software Foundation; either version 3 of the License, or (at your option)
' any later version.
'
' This program is distributed in the hope that it will be useful, but
' WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
' or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
' for more details.
'
' You should have received a copy of the GNU General Public License along
' with this program. If not, see <http://www.gnu.org/licenses/>, or write to
' the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
' Boston, MA 02110-1301, USA.

Option Strict On

Imports System.Diagnostics
Namespace My

' 次のイベントは MyApplication に対して利用できます:
'
' Startup: アプリケーションが開始されたとき、スタートアップ フォームが作成される前に発生します。
' Shutdown: アプリケーション フォームがすべて閉じられた後に発生します。このイベントは、通常の終了以外の方法でアプリケーションが終了されたときには発生しません。
' UnhandledException: ハンドルされていない例外がアプリケーションで発生したときに発生するイベントです。
' StartupNextInstance: 単一インスタンス アプリケーションが起動され、それが既にアクティブであるときに発生します。
' NetworkAvailabilityChanged: ネットワーク接続が接続されたとき、または切断されたときに発生します。
Partial Friend Class MyApplication
Private mt As System.Threading.Mutex

Private Sub MyApplication_Shutdown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shutdown
Try
mt.ReleaseMutex()
mt.Close()
Catch ex As Exception

End Try
End Sub

Private Sub MyApplication_Startup(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup

'InitCulture()

Dim pt As String = Application.Info.DirectoryPath.Replace("\", "/") + "/" + Application.Info.ProductName
mt = New System.Threading.Mutex(False, pt)
Try
If Not mt.WaitOne(0, False) Then
' 実行中の同じアプリケーションのウィンドウ・ハンドルの取得
Dim prevProcess As Process = GetPreviousProcess()
If prevProcess IsNot Nothing AndAlso _
IntPtr.op_Inequality(prevProcess.MainWindowHandle, IntPtr.Zero) Then
' 起動中のアプリケーションを最前面に表示
WakeupWindow(prevProcess.MainWindowHandle)
Else
If prevProcess IsNot Nothing Then
'プロセス特定は出来たが、ウィンドウハンドルが取得できなかった(アイコン化されている)
'タスクトレイアイコンのクリックをエミュレート
'注:アイコン特定はTooltipの文字列で行うため、多重起動時は先に見つけた物がアクティブになる
Dim rslt As Boolean = ClickTasktrayIcon("Tween")
If Not rslt Then
' 警告を表示(見つからない、またはその他の原因で失敗)
MessageBox.Show(My.Resources.StartupText1, My.Resources.StartupText2, MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
Else
' 警告を表示(プロセス見つからない場合)
MessageBox.Show(My.Resources.StartupText1, My.Resources.StartupText2, MessageBoxButtons.OK, MessageBoxIcon.Information)
'MessageBox.Show("すでに起動しています。2つ同時には起動できません。", "多重起動禁止")
End If

End If
'起動キャンセル
e.Cancel = True
Exit Sub
End If
Catch ex As Exception
End Try

GC.KeepAlive(mt)

End Sub

Private Sub MyApplication_UnhandledException(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs) Handles Me.UnhandledException
'GDI+のエラー原因を特定したい
If e.Exception.Message <> "A generic error occurred in GDI+." AndAlso _
e.Exception.Message <> "GDI+ で汎用エラーが発生しました。" Then
e.ExitApplication = ExceptionOut(e.Exception)
End If
End Sub

Public ReadOnly Property CultureCode() As String
Get
Static _ccode As String = Nothing
If _ccode Is Nothing Then
Dim filename As String = System.IO.Path.Combine(Application.Info.DirectoryPath, "TweenConf.xml")
If IO.File.Exists(filename) Then
Try
Using config As New IO.StreamReader(filename)
Dim xmlDoc As New Xml.XmlDocument
xmlDoc.Load(config)
Dim ns As New Xml.XmlNamespaceManager(xmlDoc.NameTable)
ns.AddNamespace("conf", "urn:XSpect.Configuration.XmlConfiguration")
_ccode = xmlDoc.SelectSingleNode("//conf:configuration/entry[@key='cultureCode']", ns).SelectSingleNode("string").InnerText
End Using
Catch ex As Exception

End Try

End If
End If
Return _ccode
End Get
End Property

Public Overloads Sub InitCulture(ByVal code As String)
Try
ChangeUICulture(code)
Catch ex As Exception

End Try
End Sub
Public Overloads Sub InitCulture()
Try
ChangeUICulture(Me.CultureCode)
Catch ex As Exception

End Try
End Sub

End Class

End Namespace

84 changes: 84 additions & 0 deletions Tween/AtIdSupplement.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f1ddf63

Please sign in to comment.