svnno****@sourc*****
svnno****@sourc*****
2011年 1月 23日 (日) 00:57:35 JST
Revision: 1398 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1398 Author: syo68k Date: 2011-01-23 00:57:35 +0900 (Sun, 23 Jan 2011) Log Message: ----------- ・コントロール名変更 ・TreeView_MouseDownコード見直し Modified Paths: -------------- trunk/Tween/AppendSettingDialog.Designer.vb trunk/Tween/AppendSettingDialog.en.resx trunk/Tween/AppendSettingDialog.resx trunk/Tween/AppendSettingDialog.vb trunk/Tween/Tween.vbproj -------------- next part -------------- Modified: trunk/Tween/AppendSettingDialog.Designer.vb =================================================================== --- trunk/Tween/AppendSettingDialog.Designer.vb 2011-01-21 23:47:33 UTC (rev 1397) +++ trunk/Tween/AppendSettingDialog.Designer.vb 2011-01-22 15:57:35 UTC (rev 1398) @@ -24,7 +24,7 @@ Private Sub InitializeComponent() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(AppendSettingDialog)) Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() - Me.TreeView1 = New System.Windows.Forms.TreeView() + Me.TreeViewSetting = New System.Windows.Forms.TreeView() Me.ActionPanel = New System.Windows.Forms.Panel() Me.CheckOpenUserTimeline = New System.Windows.Forms.CheckBox() Me.GroupBox3 = New System.Windows.Forms.GroupBox() @@ -293,7 +293,7 @@ ' 'SplitContainer1.Panel1 ' - Me.SplitContainer1.Panel1.Controls.Add(Me.TreeView1) + Me.SplitContainer1.Panel1.Controls.Add(Me.TreeViewSetting) ' 'SplitContainer1.Panel2 ' @@ -316,14 +316,14 @@ Me.SplitContainer1.Panel2.Controls.Add(Me.ActionPanel) Me.SplitContainer1.TabStop = False ' - 'TreeView1 + 'TreeViewSetting ' - Me.TreeView1.Cursor = System.Windows.Forms.Cursors.Hand - resources.ApplyResources(Me.TreeView1, "TreeView1") - Me.TreeView1.HideSelection = False - Me.TreeView1.Name = "TreeView1" - Me.TreeView1.Nodes.AddRange(New System.Windows.Forms.TreeNode() {CType(resources.GetObject("TreeView1.Nodes"), System.Windows.Forms.TreeNode), CType(resources.GetObject("TreeView1.Nodes1"), System.Windows.Forms.TreeNode), CType(resources.GetObject("TreeView1.Nodes2"), System.Windows.Forms.TreeNode), CType(resources.GetObject("TreeView1.Nodes3"), System.Windows.Forms.TreeNode), CType(resources.GetObject("TreeView1.Nodes4"), System.Windows.Forms.TreeNode)}) - Me.TreeView1.ShowLines = False + Me.TreeViewSetting.Cursor = System.Windows.Forms.Cursors.Hand + resources.ApplyResources(Me.TreeViewSetting, "TreeViewSetting") + Me.TreeViewSetting.HideSelection = False + Me.TreeViewSetting.Name = "TreeViewSetting" + Me.TreeViewSetting.Nodes.AddRange(New System.Windows.Forms.TreeNode() {CType(resources.GetObject("TreeViewSetting.Nodes"), System.Windows.Forms.TreeNode), CType(resources.GetObject("TreeViewSetting.Nodes1"), System.Windows.Forms.TreeNode), CType(resources.GetObject("TreeViewSetting.Nodes2"), System.Windows.Forms.TreeNode), CType(resources.GetObject("TreeViewSetting.Nodes3"), System.Windows.Forms.TreeNode), CType(resources.GetObject("TreeViewSetting.Nodes4"), System.Windows.Forms.TreeNode)}) + Me.TreeViewSetting.ShowLines = False ' 'ActionPanel ' @@ -1951,7 +1951,7 @@ End Sub Friend WithEvents SplitContainer1 As System.Windows.Forms.SplitContainer - Friend WithEvents TreeView1 As System.Windows.Forms.TreeView + Friend WithEvents TreeViewSetting As System.Windows.Forms.TreeView Friend WithEvents BasedPanel As System.Windows.Forms.Panel Friend WithEvents AuthBasicRadio As System.Windows.Forms.RadioButton Friend WithEvents AuthOAuthRadio As System.Windows.Forms.RadioButton Modified: trunk/Tween/AppendSettingDialog.en.resx =================================================================== --- trunk/Tween/AppendSettingDialog.en.resx 2011-01-21 23:47:33 UTC (rev 1397) +++ trunk/Tween/AppendSettingDialog.en.resx 2011-01-22 15:57:35 UTC (rev 1398) @@ -117,7 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <data name="TreeView1.Nodes" mimetype="application/x-microsoft.net.object.binary.base64"> + <data name="TreeViewSetting.Nodes" mimetype="application/x-microsoft.net.object.binary.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB1TeXN0 @@ -143,7 +143,7 @@ ZWFtTm9kZQD/////CQUAAAD/////CQUAAAAAAAAACw== </value> </data> - <data name="TreeView1.Nodes1" mimetype="application/x-microsoft.net.object.binary.base64"> + <data name="TreeViewSetting.Nodes1" mimetype="application/x-microsoft.net.object.binary.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB1TeXN0 @@ -157,7 +157,7 @@ AAD/////CQUAAAAAAAAACw== </value> </data> - <data name="TreeView1.Nodes2" mimetype="application/x-microsoft.net.object.binary.base64"> + <data name="TreeViewSetting.Nodes2" mimetype="application/x-microsoft.net.object.binary.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB1TeXN0 @@ -171,7 +171,7 @@ /wkFAAAAAAAAAAs= </value> </data> - <data name="TreeView1.Nodes3" mimetype="application/x-microsoft.net.object.binary.base64"> + <data name="TreeViewSetting.Nodes3" mimetype="application/x-microsoft.net.object.binary.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB1TeXN0 @@ -185,7 +185,7 @@ BQAAAAAAAAAL </value> </data> - <data name="TreeView1.Nodes4" mimetype="application/x-microsoft.net.object.binary.base64"> + <data name="TreeViewSetting.Nodes4" mimetype="application/x-microsoft.net.object.binary.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB1TeXN0 @@ -207,7 +207,7 @@ TAYQAAAADFNob3J0VXJsTm9kZQD/////CQUAAAD/////CQUAAAAAAAAACw== </value> </data> - <data name="TreeView1.Nodes5" mimetype="application/x-microsoft.net.object.binary.base64"> + <data name="TreeViewSetting.Nodes5" mimetype="application/x-microsoft.net.object.binary.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB1TeXN0 Modified: trunk/Tween/AppendSettingDialog.resx =================================================================== --- trunk/Tween/AppendSettingDialog.resx 2011-01-21 23:47:33 UTC (rev 1397) +++ trunk/Tween/AppendSettingDialog.resx 2011-01-22 15:57:35 UTC (rev 1398) @@ -129,13 +129,13 @@ <data name="SplitContainer1.Location" type="System.Drawing.Point, System.Drawing"> <value>0, 0</value> </data> - <data name="TreeView1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> + <data name="TreeViewSetting.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <value>Fill</value> </data> - <data name="TreeView1.Location" type="System.Drawing.Point, System.Drawing"> + <data name="TreeViewSetting.Location" type="System.Drawing.Point, System.Drawing"> <value>0, 0</value> </data> - <data name="TreeView1.Nodes" mimetype="application/x-microsoft.net.object.binary.base64"> + <data name="TreeViewSetting.Nodes" mimetype="application/x-microsoft.net.object.binary.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB1TeXN0 @@ -161,7 +161,7 @@ clN0cmVhbQYUAAAADlVzZXJTdHJlYW1Ob2RlAP////8JBQAAAP////8JBQAAAAAAAAAL </value> </data> - <data name="TreeView1.Nodes1" mimetype="application/x-microsoft.net.object.binary.base64"> + <data name="TreeViewSetting.Nodes1" mimetype="application/x-microsoft.net.object.binary.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB1TeXN0 @@ -179,7 +179,7 @@ DFR3ZWV0QWN0Tm9kZQD/////CQUAAAD/////CQUAAAAAAAAACw== </value> </data> - <data name="TreeView1.Nodes2" mimetype="application/x-microsoft.net.object.binary.base64"> + <data name="TreeViewSetting.Nodes2" mimetype="application/x-microsoft.net.object.binary.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB1TeXN0 @@ -193,7 +193,7 @@ /////wkFAAAA/////wkFAAAAAAAAAAs= </value> </data> - <data name="TreeView1.Nodes3" mimetype="application/x-microsoft.net.object.binary.base64"> + <data name="TreeViewSetting.Nodes3" mimetype="application/x-microsoft.net.object.binary.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB1TeXN0 @@ -207,7 +207,7 @@ BQAAAP////8JBQAAAAAAAAAL </value> </data> - <data name="TreeView1.Nodes4" mimetype="application/x-microsoft.net.object.binary.base64"> + <data name="TreeViewSetting.Nodes4" mimetype="application/x-microsoft.net.object.binary.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB1TeXN0 @@ -229,22 +229,22 @@ TAYQAAAADFNob3J0VXJsTm9kZQD/////CQUAAAD/////CQUAAAAAAAAACw== </value> </data> - <data name="TreeView1.Size" type="System.Drawing.Size, System.Drawing"> + <data name="TreeViewSetting.Size" type="System.Drawing.Size, System.Drawing"> <value>169, 368</value> </data> - <data name="TreeView1.TabIndex" type="System.Int32, mscorlib"> + <data name="TreeViewSetting.TabIndex" type="System.Int32, mscorlib"> <value>0</value> </data> - <data name=">>TreeView1.Name" xml:space="preserve"> - <value>TreeView1</value> + <data name=">>TreeViewSetting.Name" xml:space="preserve"> + <value>TreeViewSetting</value> </data> - <data name=">>TreeView1.Type" xml:space="preserve"> + <data name=">>TreeViewSetting.Type" xml:space="preserve"> <value>System.Windows.Forms.TreeView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </data> - <data name=">>TreeView1.Parent" xml:space="preserve"> + <data name=">>TreeViewSetting.Parent" xml:space="preserve"> <value>SplitContainer1.Panel1</value> </data> - <data name=">>TreeView1.ZOrder" xml:space="preserve"> + <data name=">>TreeViewSetting.ZOrder" xml:space="preserve"> <value>0</value> </data> <data name=">>SplitContainer1.Panel1.Name" xml:space="preserve"> Modified: trunk/Tween/AppendSettingDialog.vb =================================================================== --- trunk/Tween/AppendSettingDialog.vb 2011-01-21 23:47:33 UTC (rev 1397) +++ trunk/Tween/AppendSettingDialog.vb 2011-01-22 15:57:35 UTC (rev 1398) @@ -130,7 +130,6 @@ Private _MyOpenUserTimeline As Boolean Private _ValidationError As Boolean = False - Private FirstExpandNode As Boolean = True Private _curPanel As Panel = Nothing Private _MyEventNotifyEnabled As Boolean Private _MyEventNotifyFlag As EVENTTYPE @@ -140,9 +139,8 @@ Private _soundfileListup As Boolean = False Private _MyEventSoundFile As String - - Private Sub TreeView1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TreeView1.MouseDown - Dim Node As TreeNode = TreeView1.GetNodeAt(e.X, e.Y) + Private Sub TreeViewSetting_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TreeViewSetting.MouseDown + Dim Node As TreeNode = TreeViewSetting.GetNodeAt(e.X, e.Y) If Node Is Nothing Then Exit Sub Dim pnl = DirectCast(Node.Tag, Panel) If pnl Is Nothing Then Exit Sub @@ -150,7 +148,10 @@ If pnl.Name <> _curPanel.Name Then _curPanel.Enabled = False _curPanel.Visible = False - _curPanel = Nothing + + _curPanel = pnl + pnl.Enabled = True + pnl.Visible = True End If End If @@ -159,72 +160,8 @@ Else Node.Expand() End If - If _curPanel Is Nothing Then - _curPanel = pnl - pnl.Enabled = True - pnl.Visible = True - End If End Sub - 'Private Sub TreeView1_BeforeSelect(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewCancelEventArgs) Handles TreeView1.BeforeSelect - ' If e.Node Is Nothing Then Exit Sub - ' Dim pnl = DirectCast(e.Node.Tag, Panel) - ' If pnl Is Nothing Then Exit Sub - ' If _curPanel IsNot Nothing Then - ' If pnl.Name = _curPanel.Name Then Exit Sub - ' _curPanel.Enabled = False - ' _curPanel.Visible = False - ' _curPanel = Nothing - ' End If - ' If e.Action = TreeViewAction.ByMouse Then - ' If e.Node.IsExpanded Then - ' e.Node.Collapse() - ' Else - ' e.Node.Expand() - ' End If - ' TreeView1.SelectedNode = Nothing - ' End If - ' _curPanel = pnl - ' pnl.Enabled = True - ' pnl.Visible = True - 'End Sub - - 'Private Sub TreeView1_BeforeSelect(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewCancelEventArgs) Handles TreeView1.BeforeSelect - ' If _curPanel IsNot Nothing Then Exit Sub - ' If Me.TreeView1.SelectedNode Is Nothing Then Exit Sub - ' Dim pnl = DirectCast(Me.TreeView1.SelectedNode.Tag, Panel) - ' If pnl Is Nothing Then Exit Sub - ' pnl.Enabled = False - ' pnl.Visible = False - 'End Sub - - 'Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterSelect - ' If e.Node Is Nothing Then Exit Sub - ' Dim pnl = DirectCast(e.Node.Tag, Panel) - ' If pnl Is Nothing Then Exit Sub - ' If _curPanel IsNot Nothing Then - ' If pnl.Name = _curPanel.Name Then Exit Sub - ' _curPanel.Enabled = False - ' _curPanel.Visible = False - ' _curPanel = Nothing - ' End If - ' If FirstExpandNode Then - ' FirstExpandNode = False - ' Else - ' e.Node.Expand() - ' _curPanel = pnl - ' TreeView1.SelectedNode = Nothing - ' End If - ' pnl.Enabled = True - ' pnl.Visible = True - 'End Sub - - 'Private Sub TreeView1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TreeView1.KeyDown - ' If e.KeyCode = Keys.Down OrElse e.KeyCode = Keys.Up OrElse e.KeyCode = Keys.Left OrElse e.KeyCode = Keys.Right Then - ' FirstExpandNode = True - ' End If - 'End Sub - Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click If TweenMain.IsNetworkAvailable() AndAlso _ (ComboBoxAutoShortUrlFirst.SelectedIndex = UrlConverter.Bitly OrElse ComboBoxAutoShortUrlFirst.SelectedIndex = UrlConverter.Jmp) AndAlso _ @@ -232,7 +169,7 @@ If Not BitlyValidation(TextBitlyId.Text, TextBitlyPw.Text) Then MessageBox.Show(My.Resources.SettingSave_ClickText1) _ValidationError = True - TreeView1.SelectedNode.Name = "TweetActNode" ' 動作タブを選択 + TreeViewSetting.SelectedNode.Name = "TweetActNode" ' 動作タブを選択 TextBitlyId.Focus() Exit Sub Else @@ -446,7 +383,7 @@ End Sub Private Sub Setting_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing - If TreeView1.SelectedNode IsNot Nothing Then _curPanel = CType(TreeView1.SelectedNode.Tag, Panel) + If TreeViewSetting.SelectedNode IsNot Nothing Then _curPanel = CType(TreeViewSetting.SelectedNode.Tag, Panel) If tw IsNot Nothing AndAlso tw.Username = "" AndAlso e.CloseReason = CloseReason.None Then If MessageBox.Show(My.Resources.Setting_FormClosing1, "Confirm", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Cancel Then e.Cancel = True @@ -718,7 +655,7 @@ ListTextCountApi.Enabled = UseChangeGetCount.Checked CheckOpenUserTimeline.Checked = _MyOpenUserTimeline - With Me.TreeView1 + With Me.TreeViewSetting .Nodes("BasedNode").Tag = BasedPanel .Nodes("BasedNode").Nodes("PeriodNode").Tag = GetPeriodPanel .Nodes("BasedNode").Nodes("StartUpNode").Tag = StartupPanel @@ -745,7 +682,7 @@ _curPanel = BasedPanel _curPanel.Enabled = True _curPanel.Visible = True - TreeView1.SelectedNode = Nothing + TreeViewSetting.SelectedNode = Nothing ActiveControl = Username End Sub Modified: trunk/Tween/Tween.vbproj =================================================================== --- trunk/Tween/Tween.vbproj 2011-01-21 23:47:33 UTC (rev 1397) +++ trunk/Tween/Tween.vbproj 2011-01-22 15:57:35 UTC (rev 1398) @@ -283,6 +283,7 @@ <ItemGroup> <EmbeddedResource Include="AppendSettingDialog.en.resx"> <DependentUpon>AppendSettingDialog.vb</DependentUpon> + <SubType>Designer</SubType> </EmbeddedResource> <EmbeddedResource Include="AppendSettingDialog.resx"> <DependentUpon>AppendSettingDialog.vb</DependentUpon>