[Tween-svn] [1090] メニューとKeyDownの動作を追加

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2010年 11月 22日 (月) 13:49:19 JST


Revision: 1090
          http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1090
Author:   f_swallow
Date:     2010-11-22 13:49:19 +0900 (Mon, 22 Nov 2010)

Log Message:
-----------
メニューとKeyDownの動作を追加

Modified Paths:
--------------
    trunk/Tween/My Project/Resources.Designer.vb
    trunk/Tween/My Project/Resources.en.resx
    trunk/Tween/My Project/Resources.resx
    trunk/Tween/My Project/Resources.zh-CHS.resx
    trunk/Tween/Tween.vb


-------------- next part --------------
Modified: trunk/Tween/My Project/Resources.Designer.vb
===================================================================
--- trunk/Tween/My Project/Resources.Designer.vb	2010-11-22 01:31:15 UTC (rev 1089)
+++ trunk/Tween/My Project/Resources.Designer.vb	2010-11-22 04:49:19 UTC (rev 1090)
@@ -886,6 +886,15 @@
         End Property
         
         '''<summary>
+        '''  Favoriteに追加してRetweetします。よろしいですか? に類似しているローカライズされた文字列を検索します。
+        '''</summary>
+        Friend ReadOnly Property FavoritesRetweetQuestionText2() As String
+            Get
+                Return ResourceManager.GetString("FavoritesRetweetQuestionText2", resourceCulture)
+            End Get
+        End Property
+        
+        '''<summary>
         '''  選択された発言をFavoritesから削除します。よろしいですか? に類似しているローカライズされた文字列を検索します。
         '''</summary>
         Friend ReadOnly Property FavRemoveToolStripMenuItem_ClickText1() As String

Modified: trunk/Tween/My Project/Resources.en.resx
===================================================================
--- trunk/Tween/My Project/Resources.en.resx	2010-11-22 01:31:15 UTC (rev 1089)
+++ trunk/Tween/My Project/Resources.en.resx	2010-11-22 04:49:19 UTC (rev 1090)
@@ -951,4 +951,7 @@
   <data name="FavoriteRetweetQuestionText1" xml:space="preserve">
     <value>選択された発言をFavoriteに追加してRetweetします。よろしいですか?</value>
   </data>
+  <data name="FavoritesRetweetQuestionText2" xml:space="preserve">
+    <value>Favoriteに追加してRetweetします。よろしいですか?</value>
+  </data>
 </root>
\ No newline at end of file

Modified: trunk/Tween/My Project/Resources.resx
===================================================================
--- trunk/Tween/My Project/Resources.resx	2010-11-22 01:31:15 UTC (rev 1089)
+++ trunk/Tween/My Project/Resources.resx	2010-11-22 04:49:19 UTC (rev 1090)
@@ -1030,4 +1030,7 @@
   <data name="FavoriteRetweetQuestionText1" xml:space="preserve">
     <value>選択された発言をFavoriteに追加してRetweetします。よろしいですか?</value>
   </data>
+  <data name="FavoritesRetweetQuestionText2" xml:space="preserve">
+    <value>Favoriteに追加してRetweetします。よろしいですか?</value>
+  </data>
 </root>
\ No newline at end of file

Modified: trunk/Tween/My Project/Resources.zh-CHS.resx
===================================================================
--- trunk/Tween/My Project/Resources.zh-CHS.resx	2010-11-22 01:31:15 UTC (rev 1089)
+++ trunk/Tween/My Project/Resources.zh-CHS.resx	2010-11-22 04:49:19 UTC (rev 1090)
@@ -984,4 +984,7 @@
   <data name="FavoriteRetweetQuestionText1" xml:space="preserve">
     <value>選択された発言をFavoriteに追加してRetweetします。よろしいですか?</value>
   </data>
+  <data name="FavoritesRetweetQuestionText2" xml:space="preserve">
+    <value>Favoriteに追加してRetweetします。よろしいですか?</value>
+  </data>
 </root>
\ No newline at end of file

Modified: trunk/Tween/Tween.vb
===================================================================
--- trunk/Tween/Tween.vb	2010-11-22 01:31:15 UTC (rev 1089)
+++ trunk/Tween/Tween.vb	2010-11-22 04:49:19 UTC (rev 1090)
@@ -2431,18 +2431,11 @@
 
 
     Private Sub FavoriteRetweetMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FavoriteRetweetMenuItem.Click, FavoriteRetweetContextMenu.Click
-        If _curList.SelectedIndices.Count > 1 AndAlso
-        MessageBox.Show(My.Resources.FavoriteRetweetQuestionText1, "Fav&Retweet", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) <> DialogResult.Yes Then
-            Exit Sub
-        End If
-
-        FavoriteChange(True, False)
-        doReTweetOfficial(False, False)
+        FavoritesRetweetOriginal()
     End Sub
 
     Private Sub FavoriteRetweetUnofficialMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FavoriteRetweetUnofficialMenuItem.Click, FavoriteRetweetUnofficialContextMenu.Click
-        FavoriteChange(True)
-        doReTweetUnofficial()
+        FavoritesRetweetUnofficial()
     End Sub
 
     Private Sub FavoriteChange(ByVal FavAdd As Boolean, Optional ByVal multiFavoriteChangeDialogEnable As Boolean = True)
@@ -2636,10 +2629,13 @@
             ReTweetStripMenuItem.Enabled = False
             ReTweetOriginalStripMenuItem.Enabled = False
             QuoteStripMenuItem.Enabled = False
+            FavoriteRetweetContextMenu.Enabled = False
+            FavoriteRetweetUnofficialContextMenu.Enabled = False
             If _curPost IsNot Nothing AndAlso _curPost.IsDm Then DeleteStripMenuItem.Enabled = True
         Else
             If _curPost.IsMe Then
                 ReTweetOriginalStripMenuItem.Enabled = False
+                FavoriteRetweetContextMenu.Enabled = False
                 DeleteStripMenuItem.Enabled = True
             Else
                 DeleteStripMenuItem.Enabled = False
@@ -2647,10 +2643,14 @@
                     ReTweetOriginalStripMenuItem.Enabled = False
                     ReTweetStripMenuItem.Enabled = False
                     QuoteStripMenuItem.Enabled = False
+                    FavoriteRetweetContextMenu.Enabled = False
+                    FavoriteRetweetUnofficialContextMenu.Enabled = False
                 Else
                     ReTweetOriginalStripMenuItem.Enabled = True
                     ReTweetStripMenuItem.Enabled = True
                     QuoteStripMenuItem.Enabled = True
+                    FavoriteRetweetContextMenu.Enabled = True
+                    FavoriteRetweetUnofficialContextMenu.Enabled = True
                 End If
             End If
         End If
@@ -4979,6 +4979,19 @@
             End If
         End If
 
+        If e.Alt AndAlso e.Control Then
+            ' CTRL+ALTキーが押されている場合
+            If e.KeyCode = Keys.S Then
+                e.Handled = True
+                e.SuppressKeyPress = True
+                FavoritesRetweetOriginal()
+            ElseIf e.KeyCode = Keys.R Then
+                e.Handled = True
+                e.SuppressKeyPress = True
+                FavoritesRetweetUnofficial()
+            End If
+        End If
+
     End Sub
 
     Private Sub ScrollDownPostBrowser(ByVal forward As Boolean)
@@ -5696,6 +5709,20 @@
                 Thumbnail.ScrollThumbnail(True)
             End If
         End If
+
+        ' Alt + Control キー
+        If e.Alt AndAlso e.Control Then
+            If e.KeyCode = Keys.S Then
+                e.Handled = True
+                e.SuppressKeyPress = True
+                FavoritesRetweetOriginal()
+            ElseIf e.KeyCode = Keys.R Then
+                e.Handled = True
+                e.SuppressKeyPress = True
+                FavoritesRetweetUnofficial()
+            End If
+        End If
+
         Me.StatusText_TextChanged(Nothing, Nothing)
     End Sub
 
@@ -6109,6 +6136,18 @@
 
         End If
 
+        'CtrlKey + AltKey + 何か
+        If e.Modifiers = (Keys.Control Or Keys.Alt) Then
+            Select Case e.KeyCode
+                Case Keys.R
+                    e.IsInputKey = True
+                    FavoritesRetweetUnofficial()
+                Case Keys.S
+                    e.IsInputKey = True
+                    FavoritesRetweetOriginal()
+            End Select
+        End If
+
     End Sub
     Public Function TabRename(ByRef tabName As String) As Boolean
         'タブ名変更
@@ -8245,7 +8284,9 @@
                 End Select
             Else
                 If Not SettingDialog.RetweetNoConfirm Then
-                    If isConfirm AndAlso MessageBox.Show(My.Resources.RetweetQuestion1, "Retweet", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Cancel Then
+                    Dim Questiontext As String = My.Resources.RetweetQuestion1
+                    If Not multiReTweetDialogEnable Then Questiontext = My.Resources.FavoritesRetweetQuestionText2
+                    If isConfirm AndAlso MessageBox.Show(Questiontext, "Retweet", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Cancel Then
                         Exit Sub
                     End If
                 End If
@@ -8267,6 +8308,22 @@
         doReTweetOfficial(True)
     End Sub
 
+    Private Sub FavoritesRetweetOriginal()
+        If _curList.SelectedIndices.Count > 1 AndAlso
+        MessageBox.Show(My.Resources.FavoriteRetweetQuestionText1, "Fav&Retweet", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) <> DialogResult.Yes Then
+            Exit Sub
+        End If
+        doReTweetOfficial(False, False)
+        FavoriteChange(True, False)
+    End Sub
+
+    Private Sub FavoritesRetweetUnofficial()
+        If _curPost IsNot Nothing AndAlso Not _curPost.IsDm Then
+            FavoriteChange(True)
+            If Not _curPost.IsProtect Then doReTweetUnofficial()
+        End If
+    End Sub
+
     Private Function CreateRetweetUnofficial(ByVal status As String) As String
 
         ' Twitterにより省略されているURLを含むaタグをキャプチャしてリンク先URLへ置き換える
@@ -8973,12 +9030,16 @@
             Me.RtOpMenuItem.Enabled = False
             Me.RtUnOpMenuItem.Enabled = False
             Me.QtOpMenuItem.Enabled = False
+            Me.FavoriteRetweetMenuItem.Enabled = False
+            Me.FavoriteRetweetUnofficialMenuItem.Enabled = False
             If _curPost IsNot Nothing AndAlso _curPost.IsDm Then Me.DelOpMenuItem.Enabled = True
         Else
             If _curPost.IsProtect Then
                 Me.RtOpMenuItem.Enabled = False
                 Me.RtUnOpMenuItem.Enabled = False
                 Me.QtOpMenuItem.Enabled = False
+                Me.FavoriteRetweetMenuItem.Enabled = False
+                Me.FavoriteRetweetUnofficialMenuItem.Enabled = False
                 If _curPost.IsMe Then
                     Me.DelOpMenuItem.Enabled = True
                 Else
@@ -8988,8 +9049,11 @@
                 Me.RtOpMenuItem.Enabled = True
                 Me.RtUnOpMenuItem.Enabled = True
                 Me.QtOpMenuItem.Enabled = True
+                Me.FavoriteRetweetMenuItem.Enabled = True
+                Me.FavoriteRetweetUnofficialMenuItem.Enabled = True
                 If _curPost.IsMe Then
                     Me.RtOpMenuItem.Enabled = False
+                    Me.FavoriteRetweetMenuItem.Enabled = False
                     Me.DelOpMenuItem.Enabled = True
                 Else
                     Me.DelOpMenuItem.Enabled = False



Tween-svn メーリングリストの案内
アーカイブの一覧に戻る