• R/O
  • SSH
  • HTTPS

listwi: Commit


Commit MetaInfo

Revision58 (tree)
Time2010-05-24 20:42:38
Authorazyobuzin

Log Message

(empty log message)

Change Summary

Incremental Difference

--- Testing/りすにんぐついったー/Forms/ListeningMessender.Designer.cs (revision 57)
+++ Testing/りすにんぐついったー/Forms/ListeningMessender.Designer.cs (revision 58)
@@ -30,15 +30,20 @@
3030 {
3131 this.sendBtn = new System.Windows.Forms.Button();
3232 this.twitterCheckbox = new System.Windows.Forms.CheckBox();
33+ this.textBox1 = new System.Windows.Forms.TextBox();
34+ this.label1 = new System.Windows.Forms.Label();
35+ this.label2 = new System.Windows.Forms.Label();
36+ this.textBox2 = new System.Windows.Forms.TextBox();
37+ this.helpBtn = new System.Windows.Forms.Button();
3338 this.SuspendLayout();
3439 //
3540 // sendBtn
3641 //
3742 this.sendBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
38- this.sendBtn.Location = new System.Drawing.Point(260, 227);
43+ this.sendBtn.Location = new System.Drawing.Point(251, 89);
3944 this.sendBtn.Name = "sendBtn";
4045 this.sendBtn.Size = new System.Drawing.Size(75, 23);
41- this.sendBtn.TabIndex = 1;
46+ this.sendBtn.TabIndex = 6;
4247 this.sendBtn.Text = "送信";
4348 this.sendBtn.UseVisualStyleBackColor = true;
4449 //
@@ -46,20 +51,71 @@
4651 //
4752 this.twitterCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
4853 this.twitterCheckbox.AutoSize = true;
49- this.twitterCheckbox.Location = new System.Drawing.Point(161, 231);
54+ this.twitterCheckbox.Location = new System.Drawing.Point(152, 93);
5055 this.twitterCheckbox.Name = "twitterCheckbox";
5156 this.twitterCheckbox.Size = new System.Drawing.Size(93, 16);
52- this.twitterCheckbox.TabIndex = 2;
57+ this.twitterCheckbox.TabIndex = 5;
5358 this.twitterCheckbox.Text = "Twitterに投稿";
5459 this.twitterCheckbox.UseVisualStyleBackColor = true;
5560 this.twitterCheckbox.CheckedChanged += new System.EventHandler(this.twitterCheckbox_CheckedChanged);
5661 //
62+ // textBox1
63+ //
64+ this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
65+ | System.Windows.Forms.AnchorStyles.Right)));
66+ this.textBox1.Location = new System.Drawing.Point(53, 12);
67+ this.textBox1.Name = "textBox1";
68+ this.textBox1.Size = new System.Drawing.Size(273, 19);
69+ this.textBox1.TabIndex = 1;
70+ //
71+ // label1
72+ //
73+ this.label1.AutoSize = true;
74+ this.label1.Location = new System.Drawing.Point(12, 15);
75+ this.label1.Name = "label1";
76+ this.label1.Size = new System.Drawing.Size(35, 12);
77+ this.label1.TabIndex = 0;
78+ this.label1.Text = "曲名 :";
79+ //
80+ // label2
81+ //
82+ this.label2.AutoSize = true;
83+ this.label2.Location = new System.Drawing.Point(12, 53);
84+ this.label2.Name = "label2";
85+ this.label2.Size = new System.Drawing.Size(75, 12);
86+ this.label2.TabIndex = 2;
87+ this.label2.Text = "アーティスト名 :";
88+ //
89+ // textBox2
90+ //
91+ this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
92+ | System.Windows.Forms.AnchorStyles.Right)));
93+ this.textBox2.Location = new System.Drawing.Point(93, 50);
94+ this.textBox2.Name = "textBox2";
95+ this.textBox2.Size = new System.Drawing.Size(233, 19);
96+ this.textBox2.TabIndex = 3;
97+ //
98+ // helpBtn
99+ //
100+ this.helpBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
101+ this.helpBtn.Location = new System.Drawing.Point(12, 89);
102+ this.helpBtn.Name = "helpBtn";
103+ this.helpBtn.Size = new System.Drawing.Size(75, 23);
104+ this.helpBtn.TabIndex = 4;
105+ this.helpBtn.Text = "ヘルプ";
106+ this.helpBtn.UseVisualStyleBackColor = true;
107+ //
57108 // ListeningMessender
58109 //
59110 this.AcceptButton = this.sendBtn;
60111 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
61112 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
62- this.ClientSize = new System.Drawing.Size(347, 262);
113+ this.ClientSize = new System.Drawing.Size(338, 124);
114+ this.Controls.Add(this.helpBtn);
115+ this.Controls.Add(this.textBox2);
116+ this.Controls.Add(this.label2);
117+ this.Controls.Add(this.label1);
118+ this.Controls.Add(this.textBox1);
63119 this.Controls.Add(this.twitterCheckbox);
64120 this.Controls.Add(this.sendBtn);
65121 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
@@ -77,5 +133,10 @@
77133
78134 private System.Windows.Forms.Button sendBtn;
79135 private System.Windows.Forms.CheckBox twitterCheckbox;
136+ private System.Windows.Forms.TextBox textBox1;
137+ private System.Windows.Forms.Label label1;
138+ private System.Windows.Forms.Label label2;
139+ private System.Windows.Forms.TextBox textBox2;
140+ private System.Windows.Forms.Button helpBtn;
80141 }
81142 }
\ No newline at end of file
--- Testing/りすにんぐついったー/SendToIM.cs (nonexistent)
+++ Testing/りすにんぐついったー/SendToIM.cs (revision 58)
@@ -0,0 +1,48 @@
1+//http://www.k4.dion.ne.jp/~anis7742/codevault/00040.html をコピペしました。
2+using System;
3+using System.Runtime.InteropServices;
4+
5+namespace Azyobuzi.りすにんぐついったー
6+{
7+ class SendToIM
8+ {
9+ private const int WM_COPYDATA = 0x004A;
10+ private const int MAGIC_MUMBER = 1351;
11+
12+ [StructLayout(LayoutKind.Sequential)]
13+ private struct COPYDATASTRUCT
14+ {
15+ public int dwData;
16+ public int cbData;
17+ public IntPtr lpData;
18+ }
19+
20+ [DllImport("user32.dll")]
21+ private extern static IntPtr FindWindow(string lpClassName, string lpWindowName);
22+
23+ [DllImport("user32.dll")]
24+ private extern static int SendMessage(IntPtr hWnd, int msg, IntPtr wParam, ref COPYDATASTRUCT lParam);
25+
26+ public static void sendToIM(string applicationName, string title, string artist, int play1Stop0)
27+ {
28+ IntPtr im = FindWindow("MsnMsgrUIManager", null);
29+
30+ if (im == IntPtr.Zero) return;
31+
32+ string sendData = applicationName + @"\0Music\0" + play1Stop0.ToString() + @"\0{0} - {1}\0" + title + @"\0" + artist + @"\0\0";
33+
34+ COPYDATASTRUCT cds;
35+ cds.dwData = MAGIC_MUMBER;
36+ cds.cbData = (sendData.Length + 1) * 2;
37+ cds.lpData = Marshal.StringToHGlobalUni(sendData);
38+ try
39+ {
40+ SendMessage(im, WM_COPYDATA, IntPtr.Zero, ref cds);
41+ }
42+ finally
43+ {
44+ Marshal.FreeHGlobal(cds.lpData);
45+ }
46+ }
47+ }
48+}
\ No newline at end of file
Show on old repository browser