• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

OpenTweenのfork


Commit MetaInfo

修訂d391baa79560c52159349987076325cf8c66b004 (tree)
時間2012-02-22 19:49:03
作者Kimura Youichi <kim.upsilon@bucy...>
CommiterKimura Youichi

Log Message

Port InputTabName.vb to C#

Change Summary

差異

--- a/Tween/InputTabName.Designer.vb
+++ /dev/null
@@ -1,138 +0,0 @@
1-Option Strict On
2-<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
3-Partial Class InputTabName
4- Inherits System.Windows.Forms.Form
5-
6- 'フォームがコンポーネントの一覧をクリーンアップするために dispose をオーバーライドします。
7- <System.Diagnostics.DebuggerNonUserCode()> _
8- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
9- Try
10- If disposing AndAlso components IsNot Nothing Then
11- components.Dispose()
12- End If
13- Finally
14- MyBase.Dispose(disposing)
15- End Try
16- End Sub
17-
18- 'Windows フォーム デザイナで必要です。
19- Private components As System.ComponentModel.IContainer
20-
21- 'メモ: 以下のプロシージャは Windows フォーム デザイナで必要です。
22- 'Windows フォーム デザイナを使用して変更できます。
23- 'コード エディタを使って変更しないでください。
24- <System.Diagnostics.DebuggerStepThrough()> _
25- Private Sub InitializeComponent()
26- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(InputTabName))
27- Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel
28- Me.OK_Button = New System.Windows.Forms.Button
29- Me.Cancel_Button = New System.Windows.Forms.Button
30- Me.LabelDescription = New System.Windows.Forms.Label
31- Me.TextTabName = New System.Windows.Forms.TextBox
32- Me.LabelUsage = New System.Windows.Forms.Label
33- Me.ComboUsage = New System.Windows.Forms.ComboBox
34- Me.TableLayoutPanel1.SuspendLayout()
35- Me.SuspendLayout()
36- '
37- 'TableLayoutPanel1
38- '
39- Me.TableLayoutPanel1.AccessibleDescription = Nothing
40- Me.TableLayoutPanel1.AccessibleName = Nothing
41- resources.ApplyResources(Me.TableLayoutPanel1, "TableLayoutPanel1")
42- Me.TableLayoutPanel1.BackgroundImage = Nothing
43- Me.TableLayoutPanel1.Controls.Add(Me.OK_Button, 0, 0)
44- Me.TableLayoutPanel1.Controls.Add(Me.Cancel_Button, 1, 0)
45- Me.TableLayoutPanel1.Font = Nothing
46- Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
47- '
48- 'OK_Button
49- '
50- Me.OK_Button.AccessibleDescription = Nothing
51- Me.OK_Button.AccessibleName = Nothing
52- resources.ApplyResources(Me.OK_Button, "OK_Button")
53- Me.OK_Button.BackgroundImage = Nothing
54- Me.OK_Button.Font = Nothing
55- Me.OK_Button.Name = "OK_Button"
56- '
57- 'Cancel_Button
58- '
59- Me.Cancel_Button.AccessibleDescription = Nothing
60- Me.Cancel_Button.AccessibleName = Nothing
61- resources.ApplyResources(Me.Cancel_Button, "Cancel_Button")
62- Me.Cancel_Button.BackgroundImage = Nothing
63- Me.Cancel_Button.DialogResult = System.Windows.Forms.DialogResult.Cancel
64- Me.Cancel_Button.Font = Nothing
65- Me.Cancel_Button.Name = "Cancel_Button"
66- '
67- 'LabelDescription
68- '
69- Me.LabelDescription.AccessibleDescription = Nothing
70- Me.LabelDescription.AccessibleName = Nothing
71- resources.ApplyResources(Me.LabelDescription, "LabelDescription")
72- Me.LabelDescription.Font = Nothing
73- Me.LabelDescription.Name = "LabelDescription"
74- '
75- 'TextTabName
76- '
77- Me.TextTabName.AccessibleDescription = Nothing
78- Me.TextTabName.AccessibleName = Nothing
79- resources.ApplyResources(Me.TextTabName, "TextTabName")
80- Me.TextTabName.BackgroundImage = Nothing
81- Me.TextTabName.Font = Nothing
82- Me.TextTabName.Name = "TextTabName"
83- '
84- 'LabelUsage
85- '
86- Me.LabelUsage.AccessibleDescription = Nothing
87- Me.LabelUsage.AccessibleName = Nothing
88- resources.ApplyResources(Me.LabelUsage, "LabelUsage")
89- Me.LabelUsage.Font = Nothing
90- Me.LabelUsage.Name = "LabelUsage"
91- '
92- 'ComboUsage
93- '
94- Me.ComboUsage.AccessibleDescription = Nothing
95- Me.ComboUsage.AccessibleName = Nothing
96- resources.ApplyResources(Me.ComboUsage, "ComboUsage")
97- Me.ComboUsage.BackgroundImage = Nothing
98- Me.ComboUsage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
99- Me.ComboUsage.Font = Nothing
100- Me.ComboUsage.FormattingEnabled = True
101- Me.ComboUsage.Name = "ComboUsage"
102- '
103- 'InputTabName
104- '
105- Me.AcceptButton = Me.OK_Button
106- Me.AccessibleDescription = Nothing
107- Me.AccessibleName = Nothing
108- resources.ApplyResources(Me, "$this")
109- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
110- Me.BackgroundImage = Nothing
111- Me.CancelButton = Me.Cancel_Button
112- Me.Controls.Add(Me.ComboUsage)
113- Me.Controls.Add(Me.LabelUsage)
114- Me.Controls.Add(Me.TextTabName)
115- Me.Controls.Add(Me.LabelDescription)
116- Me.Controls.Add(Me.TableLayoutPanel1)
117- Me.Font = Nothing
118- Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
119- Me.Icon = Nothing
120- Me.MaximizeBox = False
121- Me.MinimizeBox = False
122- Me.Name = "InputTabName"
123- Me.ShowInTaskbar = False
124- Me.TopMost = True
125- Me.TableLayoutPanel1.ResumeLayout(False)
126- Me.ResumeLayout(False)
127- Me.PerformLayout()
128-
129- End Sub
130- Friend WithEvents TableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel
131- Friend WithEvents OK_Button As System.Windows.Forms.Button
132- Friend WithEvents Cancel_Button As System.Windows.Forms.Button
133- Friend WithEvents LabelDescription As System.Windows.Forms.Label
134- Friend WithEvents TextTabName As System.Windows.Forms.TextBox
135- Friend WithEvents LabelUsage As System.Windows.Forms.Label
136- Friend WithEvents ComboUsage As System.Windows.Forms.ComboBox
137-
138-End Class
--- a/Tween/InputTabName.vb
+++ /dev/null
@@ -1,105 +0,0 @@
1-' Tween - Client of Twitter
2-' Copyright (c) 2007-2011 kiri_feather (@kiri_feather) <kiri.feather@gmail.com>
3-' (c) 2008-2011 Moz (@syo68k)
4-' (c) 2008-2011 takeshik (@takeshik) <http://www.takeshik.org/>
5-' (c) 2010-2011 anis774 (@anis774) <http://d.hatena.ne.jp/anis774/>
6-' (c) 2010-2011 fantasticswallow (@f_swallow) <http://twitter.com/f_swallow>
7-' All rights reserved.
8-'
9-' This file is part of Tween.
10-'
11-' This program is free software; you can redistribute it and/or modify it
12-' under the terms of the GNU General Public License as published by the Free
13-' Software Foundation; either version 3 of the License, or (at your option)
14-' any later version.
15-'
16-' This program is distributed in the hope that it will be useful, but
17-' WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18-' or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19-' for more details.
20-'
21-' You should have received a copy of the GNU General Public License along
22-' with this program. If not, see <http://www.gnu.org/licenses/>, or write to
23-' the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
24-' Boston, MA 02110-1301, USA.
25-
26-Imports System.Windows.Forms
27-
28-Public Class InputTabName
29-
30- Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
31- Me.DialogResult = System.Windows.Forms.DialogResult.OK
32- Me.Close()
33- End Sub
34-
35- Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
36- TextTabName.Text = ""
37- Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
38- Me.Close()
39- End Sub
40-
41- Public Property TabName() As String
42- Get
43- Return Me.TextTabName.Text.Trim()
44- End Get
45- Set(ByVal value As String)
46- TextTabName.Text = value.Trim()
47- End Set
48- End Property
49-
50- Public WriteOnly Property FormTitle() As String
51- Set(ByVal value As String)
52- Me.Text = value
53- End Set
54- End Property
55-
56- Public WriteOnly Property FormDescription() As String
57- Set(ByVal value As String)
58- Me.LabelDescription.Text = value
59- End Set
60- End Property
61-
62- Private _isShowUsage As Boolean
63- Public WriteOnly Property IsShowUsage() As Boolean
64- Set(ByVal value As Boolean)
65- _isShowUsage = value
66- End Set
67- End Property
68-
69- Private _usage As TabUsageType
70- Public ReadOnly Property Usage() As TabUsageType
71- Get
72- Return _usage
73- End Get
74- End Property
75-
76- Private Sub InputTabName_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
77- Me.LabelUsage.Visible = False
78- Me.ComboUsage.Visible = False
79- Me.ComboUsage.Items.Add(My.Resources.InputTabName_Load1)
80- Me.ComboUsage.Items.Add("Lists")
81- Me.ComboUsage.Items.Add("PublicSearch")
82- Me.ComboUsage.SelectedIndex = 0
83- End Sub
84-
85- Private Sub InputTabName_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
86- ActiveControl = TextTabName
87- If _isShowUsage Then
88- Me.LabelUsage.Visible = True
89- Me.ComboUsage.Visible = True
90- End If
91- End Sub
92-
93- Private Sub ComboUsage_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboUsage.SelectedIndexChanged
94- Select Case ComboUsage.SelectedIndex
95- Case 0
96- _usage = TabUsageType.UserDefined
97- Case 1
98- _usage = TabUsageType.Lists
99- Case 2
100- _usage = TabUsageType.PublicSearch
101- Case Else
102- _usage = TabUsageType.Undefined
103- End Select
104- End Sub
105-End Class
--- a/Tween/Tween.vbproj
+++ b/Tween/Tween.vbproj
@@ -151,12 +151,6 @@
151151 </Compile>
152152 <Compile Include="ImageDictionary.vb" />
153153 <Compile Include="ImageListViewItem.vb" />
154- <Compile Include="InputTabName.Designer.vb">
155- <DependentUpon>InputTabName.vb</DependentUpon>
156- </Compile>
157- <Compile Include="InputTabName.vb">
158- <SubType>Form</SubType>
159- </Compile>
160154 <Compile Include="ListAvailable.Designer.vb">
161155 <DependentUpon>ListAvailable.vb</DependentUpon>
162156 </Compile>
@@ -270,18 +264,6 @@
270264 <DependentUpon>HashtagManage.vb</DependentUpon>
271265 <SubType>Designer</SubType>
272266 </EmbeddedResource>
273- <EmbeddedResource Include="InputTabName.en.resx">
274- <DependentUpon>InputTabName.vb</DependentUpon>
275- <SubType>Designer</SubType>
276- </EmbeddedResource>
277- <EmbeddedResource Include="InputTabName.resx">
278- <SubType>Designer</SubType>
279- <DependentUpon>InputTabName.vb</DependentUpon>
280- </EmbeddedResource>
281- <EmbeddedResource Include="InputTabName.zh-CHS.resx">
282- <DependentUpon>InputTabName.vb</DependentUpon>
283- <SubType>Designer</SubType>
284- </EmbeddedResource>
285267 <EmbeddedResource Include="ListAvailable.en.resx">
286268 <SubType>Designer</SubType>
287269 <DependentUpon>ListAvailable.vb</DependentUpon>
--- /dev/null
+++ b/TweenCS/InputTabName.Designer.cs
@@ -0,0 +1,120 @@
1+namespace Tween
2+{
3+ partial class InputTabName
4+ {
5+ /// <summary>
6+ /// Required designer variable.
7+ /// </summary>
8+ private System.ComponentModel.IContainer components = null;
9+
10+ /// <summary>
11+ /// Clean up any resources being used.
12+ /// </summary>
13+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
14+ protected override void Dispose(bool disposing)
15+ {
16+ if (disposing && (components != null))
17+ {
18+ components.Dispose();
19+ }
20+ base.Dispose(disposing);
21+ }
22+
23+ #region Windows Form Designer generated code
24+
25+ /// <summary>
26+ /// Required method for Designer support - do not modify
27+ /// the contents of this method with the code editor.
28+ /// </summary>
29+ private void InitializeComponent()
30+ {
31+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InputTabName));
32+ this.ComboUsage = new System.Windows.Forms.ComboBox();
33+ this.LabelUsage = new System.Windows.Forms.Label();
34+ this.TextTabName = new System.Windows.Forms.TextBox();
35+ this.LabelDescription = new System.Windows.Forms.Label();
36+ this.OK_Button = new System.Windows.Forms.Button();
37+ this.Cancel_Button = new System.Windows.Forms.Button();
38+ this.TableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
39+ this.TableLayoutPanel1.SuspendLayout();
40+ this.SuspendLayout();
41+ //
42+ // ComboUsage
43+ //
44+ this.ComboUsage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
45+ this.ComboUsage.FormattingEnabled = true;
46+ resources.ApplyResources(this.ComboUsage, "ComboUsage");
47+ this.ComboUsage.Name = "ComboUsage";
48+ this.ComboUsage.SelectedIndexChanged += new System.EventHandler(this.ComboUsage_SelectedIndexChanged);
49+ //
50+ // LabelUsage
51+ //
52+ resources.ApplyResources(this.LabelUsage, "LabelUsage");
53+ this.LabelUsage.Name = "LabelUsage";
54+ //
55+ // TextTabName
56+ //
57+ resources.ApplyResources(this.TextTabName, "TextTabName");
58+ this.TextTabName.Name = "TextTabName";
59+ //
60+ // LabelDescription
61+ //
62+ resources.ApplyResources(this.LabelDescription, "LabelDescription");
63+ this.LabelDescription.Name = "LabelDescription";
64+ //
65+ // OK_Button
66+ //
67+ resources.ApplyResources(this.OK_Button, "OK_Button");
68+ this.OK_Button.Name = "OK_Button";
69+ this.OK_Button.Click += new System.EventHandler(this.OK_Button_Click);
70+ //
71+ // Cancel_Button
72+ //
73+ resources.ApplyResources(this.Cancel_Button, "Cancel_Button");
74+ this.Cancel_Button.DialogResult = System.Windows.Forms.DialogResult.Cancel;
75+ this.Cancel_Button.Name = "Cancel_Button";
76+ this.Cancel_Button.Click += new System.EventHandler(this.Cancel_Button_Click);
77+ //
78+ // TableLayoutPanel1
79+ //
80+ resources.ApplyResources(this.TableLayoutPanel1, "TableLayoutPanel1");
81+ this.TableLayoutPanel1.Controls.Add(this.OK_Button, 0, 0);
82+ this.TableLayoutPanel1.Controls.Add(this.Cancel_Button, 1, 0);
83+ this.TableLayoutPanel1.Name = "TableLayoutPanel1";
84+ //
85+ // InputTabName
86+ //
87+ this.AcceptButton = this.OK_Button;
88+ resources.ApplyResources(this, "$this");
89+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
90+ this.CancelButton = this.Cancel_Button;
91+ this.Controls.Add(this.ComboUsage);
92+ this.Controls.Add(this.LabelUsage);
93+ this.Controls.Add(this.TextTabName);
94+ this.Controls.Add(this.LabelDescription);
95+ this.Controls.Add(this.TableLayoutPanel1);
96+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
97+ this.MaximizeBox = false;
98+ this.MinimizeBox = false;
99+ this.Name = "InputTabName";
100+ this.ShowInTaskbar = false;
101+ this.TopMost = true;
102+ this.Load += new System.EventHandler(this.InputTabName_Load);
103+ this.Shown += new System.EventHandler(this.InputTabName_Shown);
104+ this.TableLayoutPanel1.ResumeLayout(false);
105+ this.ResumeLayout(false);
106+ this.PerformLayout();
107+
108+ }
109+
110+ #endregion
111+
112+ internal System.Windows.Forms.ComboBox ComboUsage;
113+ internal System.Windows.Forms.Label LabelUsage;
114+ internal System.Windows.Forms.TextBox TextTabName;
115+ internal System.Windows.Forms.Label LabelDescription;
116+ internal System.Windows.Forms.Button OK_Button;
117+ internal System.Windows.Forms.Button Cancel_Button;
118+ internal System.Windows.Forms.TableLayoutPanel TableLayoutPanel1;
119+ }
120+}
\ No newline at end of file
--- /dev/null
+++ b/TweenCS/InputTabName.cs
@@ -0,0 +1,99 @@
1+using System;
2+using System.Collections.Generic;
3+using System.ComponentModel;
4+using System.Data;
5+using System.Drawing;
6+using System.Linq;
7+using System.Text;
8+using System.Windows.Forms;
9+
10+namespace Tween
11+{
12+ public partial class InputTabName : Form
13+ {
14+ public InputTabName()
15+ {
16+ InitializeComponent();
17+ }
18+
19+ private void OK_Button_Click(object sender, EventArgs e)
20+ {
21+ this.DialogResult = DialogResult.OK;
22+ this.Close();
23+ }
24+
25+ private void Cancel_Button_Click(object sender, EventArgs e)
26+ {
27+ TextTabName.Text = "";
28+ this.DialogResult = DialogResult.Cancel;
29+ this.Close();
30+ }
31+
32+ public string TabName
33+ {
34+ get { return this.TextTabName.Text.Trim(); }
35+ set { TextTabName.Text = value.Trim(); }
36+ }
37+
38+ public string FormTitle
39+ {
40+ set { this.Text = value; }
41+ }
42+
43+ public string FormDescription
44+ {
45+ set { this.LabelDescription.Text = value; }
46+ }
47+
48+ private bool _isShowUsage;
49+ public bool IsShowUsage
50+ {
51+ set { _isShowUsage = value; }
52+ }
53+
54+ private MyCommon.TabUsageType _usage;
55+ public MyCommon.TabUsageType Usage
56+ {
57+ get { return _usage; }
58+ }
59+
60+ private void InputTabName_Load(object sender, EventArgs e)
61+ {
62+ this.LabelUsage.Visible = false;
63+ this.ComboUsage.Visible = false;
64+ this.ComboUsage.Items.Add(Properties.Resources.InputTabName_Load1);
65+ this.ComboUsage.Items.Add("Lists");
66+ this.ComboUsage.Items.Add("PublicSearch");
67+ this.ComboUsage.SelectedIndex = 0;
68+ }
69+
70+ private void InputTabName_Shown(object sender, EventArgs e)
71+ {
72+ ActiveControl = TextTabName;
73+ if (_isShowUsage)
74+ {
75+ this.LabelUsage.Visible = true;
76+ this.ComboUsage.Visible = true;
77+ }
78+ }
79+
80+ private void ComboUsage_SelectedIndexChanged(object sender, EventArgs e)
81+ {
82+ switch (ComboUsage.SelectedIndex)
83+ {
84+ case 0:
85+ _usage = MyCommon.TabUsageType.UserDefined;
86+ break;
87+ case 1:
88+ _usage = MyCommon.TabUsageType.Lists;
89+ break;
90+ case 2:
91+ _usage = MyCommon.TabUsageType.PublicSearch;
92+ break;
93+ default:
94+ _usage = MyCommon.TabUsageType.Undefined;
95+ break;
96+ }
97+ }
98+ }
99+}
--- a/TweenCS/TweenCS.csproj
+++ b/TweenCS/TweenCS.csproj
@@ -84,6 +84,12 @@
8484 </Compile>
8585 <Compile Include="Growl.cs" />
8686 <Compile Include="HookGlobalHotkey.cs" />
87+ <Compile Include="InputTabName.cs">
88+ <SubType>Form</SubType>
89+ </Compile>
90+ <Compile Include="InputTabName.Designer.cs">
91+ <DependentUpon>InputTabName.cs</DependentUpon>
92+ </Compile>
8793 <Compile Include="MyCommon.cs" />
8894 <Compile Include="MySpecialPath.cs" />
8995 <Compile Include="nicoms.cs" />
@@ -152,6 +158,15 @@
152158 <EmbeddedResource Include="FormInfo.resx">
153159 <DependentUpon>FormInfo.cs</DependentUpon>
154160 </EmbeddedResource>
161+ <EmbeddedResource Include="InputTabName.en.resx">
162+ <DependentUpon>InputTabName.cs</DependentUpon>
163+ </EmbeddedResource>
164+ <EmbeddedResource Include="InputTabName.resx">
165+ <DependentUpon>InputTabName.cs</DependentUpon>
166+ </EmbeddedResource>
167+ <EmbeddedResource Include="InputTabName.zh-CHS.resx">
168+ <DependentUpon>InputTabName.cs</DependentUpon>
169+ </EmbeddedResource>
155170 <EmbeddedResource Include="OpenURL.en.resx">
156171 <DependentUpon>OpenURL.cs</DependentUpon>
157172 </EmbeddedResource>