svnno****@sourc*****
svnno****@sourc*****
2010年 11月 13日 (土) 11:24:32 JST
Revision: 1065 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1065 Author: f_swallow Date: 2010-11-13 11:24:32 +0900 (Sat, 13 Nov 2010) Log Message: ----------- ユーザーIDをコピーするメニューを作成した(編集のメニューにしかないのでどうにかしたいところ、ショートカットキーとかも一切設定してない) Modified Paths: -------------- trunk/Tween/Tween.Designer.vb trunk/Tween/Tween.resx trunk/Tween/Tween.vb -------------- next part -------------- Modified: trunk/Tween/Tween.Designer.vb =================================================================== --- trunk/Tween/Tween.Designer.vb 2010-11-13 00:38:17 UTC (rev 1064) +++ trunk/Tween/Tween.Designer.vb 2010-11-13 02:24:32 UTC (rev 1065) @@ -28,6 +28,8 @@ Me.ToolStripContainer1 = New System.Windows.Forms.ToolStripContainer() Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() Me.StatusLabelUrl = New System.Windows.Forms.ToolStripStatusLabel() + Me.StatusLabel = New Tween.TweenCustomControl.ToolStripLabelHistory() + Me.ToolStripStatusLabel1 = New System.Windows.Forms.ToolStripStatusLabel() Me.HashStripSplitButton = New System.Windows.Forms.ToolStripSplitButton() Me.ContextMenuPostMode = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ToolStripMenuItemUrlMultibyteSplit = New System.Windows.Forms.ToolStripMenuItem() @@ -266,8 +268,7 @@ Me.TimerRefreshIcon = New System.Windows.Forms.Timer(Me.components) Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog() Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) - Me.ToolStripStatusLabel1 = New System.Windows.Forms.ToolStripStatusLabel() - Me.StatusLabel = New Tween.TweenCustomControl.ToolStripLabelHistory() + Me.CopyUserIdStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripContainer1.BottomToolStripPanel.SuspendLayout() Me.ToolStripContainer1.ContentPanel.SuspendLayout() Me.ToolStripContainer1.TopToolStripPanel.SuspendLayout() @@ -334,6 +335,20 @@ Me.StatusLabelUrl.Name = "StatusLabelUrl" Me.StatusLabelUrl.Spring = True ' + 'StatusLabel + ' + Me.StatusLabel.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right + Me.StatusLabel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text + Me.StatusLabel.DoubleClickEnabled = True + Me.StatusLabel.Name = "StatusLabel" + resources.ApplyResources(Me.StatusLabel, "StatusLabel") + ' + 'ToolStripStatusLabel1 + ' + resources.ApplyResources(Me.ToolStripStatusLabel1, "ToolStripStatusLabel1") + Me.ToolStripStatusLabel1.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right + Me.ToolStripStatusLabel1.Name = "ToolStripStatusLabel1" + ' 'HashStripSplitButton ' Me.HashStripSplitButton.AutoToolTip = False @@ -953,7 +968,7 @@ ' 'MenuItemEdit ' - Me.MenuItemEdit.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.UndoRemoveTabMenuItem, Me.ToolStripSeparator12, Me.CopySTOTMenuItem, Me.CopyURLMenuItem, Me.ToolStripSeparator6, Me.MenuItemSubSearch, Me.MenuItemSearchNext, Me.MenuItemSearchPrev, Me.ToolStripSeparator22, Me.PublicSearchQueryMenuItem}) + Me.MenuItemEdit.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.UndoRemoveTabMenuItem, Me.ToolStripSeparator12, Me.CopySTOTMenuItem, Me.CopyURLMenuItem, Me.CopyUserIdStripMenuItem, Me.ToolStripSeparator6, Me.MenuItemSubSearch, Me.MenuItemSearchNext, Me.MenuItemSearchPrev, Me.ToolStripSeparator22, Me.PublicSearchQueryMenuItem}) Me.MenuItemEdit.Name = "MenuItemEdit" resources.ApplyResources(Me.MenuItemEdit, "MenuItemEdit") ' @@ -1663,20 +1678,11 @@ ' Me.OpenFileDialog1.FileName = "OpenFileDialog1" ' - 'ToolStripStatusLabel1 + 'CopyUserIdStripMenuItem ' - resources.ApplyResources(Me.ToolStripStatusLabel1, "ToolStripStatusLabel1") - Me.ToolStripStatusLabel1.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right - Me.ToolStripStatusLabel1.Name = "ToolStripStatusLabel1" + Me.CopyUserIdStripMenuItem.Name = "CopyUserIdStripMenuItem" + resources.ApplyResources(Me.CopyUserIdStripMenuItem, "CopyUserIdStripMenuItem") ' - 'StatusLabel - ' - Me.StatusLabel.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right - Me.StatusLabel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text - Me.StatusLabel.DoubleClickEnabled = True - Me.StatusLabel.Name = "StatusLabel" - resources.ApplyResources(Me.StatusLabel, "StatusLabel") - ' 'TweenMain ' Me.AllowDrop = True @@ -1967,5 +1973,6 @@ Friend WithEvents ListManageToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents SourceLinkLabel As System.Windows.Forms.LinkLabel Friend WithEvents ToolStripStatusLabel1 As System.Windows.Forms.ToolStripStatusLabel + Friend WithEvents CopyUserIdStripMenuItem As System.Windows.Forms.ToolStripMenuItem End Class Modified: trunk/Tween/Tween.resx =================================================================== --- trunk/Tween/Tween.resx 2010-11-13 00:38:17 UTC (rev 1064) +++ trunk/Tween/Tween.resx 2010-11-13 02:24:32 UTC (rev 1065) @@ -130,7 +130,7 @@ </data> <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="StatusLabelUrl.Size" type="System.Drawing.Size, System.Drawing"> - <value>287, 22</value> + <value>318, 22</value> </data> <data name="StatusLabelUrl.Text" xml:space="preserve"> <value>ToolStripStatusLabel1</value> @@ -1566,6 +1566,12 @@ <data name="CopyURLMenuItem.Text" xml:space="preserve"> <value>コピー(ステータスURL)(&S)</value> </data> + <data name="CopyUserIdStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> + <value>259, 22</value> + </data> + <data name="CopyUserIdStripMenuItem.Text" xml:space="preserve"> + <value>コピー(ユーザーID)</value> + </data> <data name="ToolStripSeparator6.Size" type="System.Drawing.Size, System.Drawing"> <value>256, 6</value> </data> @@ -2490,6 +2496,18 @@ <data name=">>StatusLabelUrl.Type" xml:space="preserve"> <value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </data> + <data name=">>StatusLabel.Name" xml:space="preserve"> + <value>StatusLabel</value> + </data> + <data name=">>StatusLabel.Type" xml:space="preserve"> + <value>Tween.TweenCustomControl.ToolStripLabelHistory, Tween, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null</value> + </data> + <data name=">>ToolStripStatusLabel1.Name" xml:space="preserve"> + <value>ToolStripStatusLabel1</value> + </data> + <data name=">>ToolStripStatusLabel1.Type" xml:space="preserve"> + <value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> <data name=">>HashStripSplitButton.Name" xml:space="preserve"> <value>HashStripSplitButton</value> </data> @@ -3720,18 +3738,12 @@ <data name=">>ToolTip1.Type" xml:space="preserve"> <value>System.Windows.Forms.ToolTip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </data> - <data name=">>ToolStripStatusLabel1.Name" xml:space="preserve"> - <value>ToolStripStatusLabel1</value> + <data name=">>CopyUserIdStripMenuItem.Name" xml:space="preserve"> + <value>CopyUserIdStripMenuItem</value> </data> - <data name=">>ToolStripStatusLabel1.Type" xml:space="preserve"> - <value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + <data name=">>CopyUserIdStripMenuItem.Type" xml:space="preserve"> + <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </data> - <data name=">>StatusLabel.Name" xml:space="preserve"> - <value>StatusLabel</value> - </data> - <data name=">>StatusLabel.Type" xml:space="preserve"> - <value>Tween.TweenCustomControl.ToolStripLabelHistory, Tween, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null</value> - </data> <data name=">>$this.Name" xml:space="preserve"> <value>TweenMain</value> </data> Modified: trunk/Tween/Tween.vb =================================================================== --- trunk/Tween/Tween.vb 2010-11-13 00:38:17 UTC (rev 1064) +++ trunk/Tween/Tween.vb 2010-11-13 02:24:32 UTC (rev 1065) @@ -9025,9 +9025,11 @@ If _curPost Is Nothing Then Me.CopySTOTMenuItem.Enabled = False Me.CopyURLMenuItem.Enabled = False + Me.CopyUserIdStripMenuItem.Enabled = False Else Me.CopySTOTMenuItem.Enabled = True Me.CopyURLMenuItem.Enabled = True + Me.CopyUserIdStripMenuItem.Enabled = True If _curPost.IsProtect Then Me.CopySTOTMenuItem.Enabled = False End If End Sub @@ -9514,4 +9516,17 @@ RtCountMenuItem.Enabled = True End If End Sub + + Private Sub CopyUserIdStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CopyUserIdStripMenuItem.Click + CopyUserId() + End Sub + Private Sub CopyUserId() + If _curPost Is Nothing Then Exit Sub + Dim clstr As String = _curPost.Name + Try + Clipboard.SetDataObject(clstr, False, 5, 100) + Catch ex As Exception + MessageBox.Show(ex.Message) + End Try + End Sub End Class