• R/O
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

練習用です。いろんなものがごちゃまぜです。


Commit MetaInfo

Revision75 (tree)
Time2015-11-03 15:33:16
Authorbellyoshi

Log Message

Change Summary

Incremental Difference

--- Lianix/whois/whois/Form1.Designer.cs (nonexistent)
+++ Lianix/whois/whois/Form1.Designer.cs (revision 75)
@@ -0,0 +1,118 @@
1+namespace whois
2+{
3+ partial class Form1
4+ {
5+ /// <summary>
6+ /// 必要なデザイナー変数です。
7+ /// </summary>
8+ private System.ComponentModel.IContainer components = null;
9+
10+ /// <summary>
11+ /// 使用中のリソースをすべてクリーンアップします。
12+ /// </summary>
13+ /// <param name="disposing">マネージ リソースを破棄する場合は true を指定し、その他の場合は 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 フォーム デザイナーで生成されたコード
24+
25+ /// <summary>
26+ /// デザイナー サポートに必要なメソッドです。このメソッドの内容を
27+ /// コード エディターで変更しないでください。
28+ /// </summary>
29+ private void InitializeComponent()
30+ {
31+ this.btn_search = new System.Windows.Forms.Button();
32+ this.label1 = new System.Windows.Forms.Label();
33+ this.label2 = new System.Windows.Forms.Label();
34+ this.tbox_server = new System.Windows.Forms.TextBox();
35+ this.tbox_source = new System.Windows.Forms.TextBox();
36+ this.rtbox_show = new System.Windows.Forms.RichTextBox();
37+ this.SuspendLayout();
38+ //
39+ // btn_search
40+ //
41+ this.btn_search.Location = new System.Drawing.Point(465, 37);
42+ this.btn_search.Name = "btn_search";
43+ this.btn_search.Size = new System.Drawing.Size(75, 23);
44+ this.btn_search.TabIndex = 0;
45+ this.btn_search.Text = "サーチ";
46+ this.btn_search.UseVisualStyleBackColor = true;
47+ this.btn_search.Click += new System.EventHandler(this.btn_search_Click);
48+ //
49+ // label1
50+ //
51+ this.label1.AutoSize = true;
52+ this.label1.Location = new System.Drawing.Point(12, 19);
53+ this.label1.Name = "label1";
54+ this.label1.Size = new System.Drawing.Size(54, 15);
55+ this.label1.TabIndex = 1;
56+ this.label1.Text = "Domain";
57+ //
58+ // label2
59+ //
60+ this.label2.AutoSize = true;
61+ this.label2.Location = new System.Drawing.Point(259, 19);
62+ this.label2.Name = "label2";
63+ this.label2.Size = new System.Drawing.Size(89, 15);
64+ this.label2.TabIndex = 1;
65+ this.label2.Text = "Whois server";
66+ //
67+ // tbox_server
68+ //
69+ this.tbox_server.Location = new System.Drawing.Point(262, 37);
70+ this.tbox_server.Name = "tbox_server";
71+ this.tbox_server.Size = new System.Drawing.Size(197, 22);
72+ this.tbox_server.TabIndex = 2;
73+ this.tbox_server.Text = "whois.jprs.jp";
74+ //
75+ // tbox_source
76+ //
77+ this.tbox_source.Location = new System.Drawing.Point(12, 38);
78+ this.tbox_source.Name = "tbox_source";
79+ this.tbox_source.Size = new System.Drawing.Size(244, 22);
80+ this.tbox_source.TabIndex = 2;
81+ //
82+ // rtbox_show
83+ //
84+ this.rtbox_show.Location = new System.Drawing.Point(12, 66);
85+ this.rtbox_show.Name = "rtbox_show";
86+ this.rtbox_show.Size = new System.Drawing.Size(528, 263);
87+ this.rtbox_show.TabIndex = 3;
88+ this.rtbox_show.Text = "";
89+ //
90+ // Form1
91+ //
92+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
93+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
94+ this.ClientSize = new System.Drawing.Size(552, 341);
95+ this.Controls.Add(this.rtbox_show);
96+ this.Controls.Add(this.tbox_source);
97+ this.Controls.Add(this.tbox_server);
98+ this.Controls.Add(this.label2);
99+ this.Controls.Add(this.label1);
100+ this.Controls.Add(this.btn_search);
101+ this.Name = "Form1";
102+ this.Text = "Form1";
103+ this.ResumeLayout(false);
104+ this.PerformLayout();
105+
106+ }
107+
108+ #endregion
109+
110+ private System.Windows.Forms.Button btn_search;
111+ private System.Windows.Forms.Label label1;
112+ private System.Windows.Forms.Label label2;
113+ private System.Windows.Forms.TextBox tbox_server;
114+ private System.Windows.Forms.TextBox tbox_source;
115+ private System.Windows.Forms.RichTextBox rtbox_show;
116+ }
117+}
118+
--- Lianix/whois/whois/Form1.cs (nonexistent)
+++ Lianix/whois/whois/Form1.cs (revision 75)
@@ -0,0 +1,74 @@
1+using System;
2+using System.Windows.Forms;
3+using System.Net;
4+using System.Net.Sockets;
5+using System.Threading;
6+using System.IO;
7+
8+namespace whois
9+{
10+ public partial class Form1 : Form
11+ {
12+ private TcpClient tcpC;
13+ private String domain = "";
14+ private String whoisServer = "";
15+ private NetworkStream netStream;
16+
17+ delegate void appendTextDelegate(string text);
18+ private void appendText(string text)
19+ {
20+ if (this.IsDisposed) return;
21+ Invoke(new appendTextDelegate(rtbox_show.AppendText), text);
22+ }
23+
24+ public Form1()
25+ {
26+ InitializeComponent();
27+ }
28+
29+ private void btn_search_Click(object sender, EventArgs e)
30+ {
31+ domain = tbox_source.Text.Trim();
32+ if (domain == String.Empty)
33+ {
34+ MessageBox.Show("検索したいドメインを入力してください。");
35+ return;
36+ }
37+ domain += "\r\n";
38+ whoisServer = tbox_server.Text.Trim();
39+ if (whoisServer == String.Empty)
40+ {
41+ MessageBox.Show("whoisサーバが指定されていません。");
42+ return;
43+ }
44+ Thread tMain = new Thread(new ThreadStart(search));
45+ tMain.IsBackground = true;
46+ tMain.Start();
47+ }
48+ private void search()
49+ {
50+ try
51+ {
52+ String server = Dns.GetHostByName(whoisServer).AddressList[0].ToString();
53+ tcpC = new TcpClient(server, 43);
54+ }catch(Exception ee)
55+ {
56+ MessageBox.Show("サーバに接続できません。" + "\r\n" + ee.Message);
57+ return;
58+ }
59+ netStream = tcpC.GetStream();
60+ byte[] bb = new byte[64];
61+ String msg = null;
62+ bb = System.Text.Encoding.ASCII.GetBytes(domain.ToCharArray());
63+ netStream.Write(bb, 0, bb.Length);
64+
65+ StreamReader sr = new StreamReader(netStream, System.Text.Encoding.UTF8);
66+ while((msg = sr.ReadLine()) != null)
67+ {
68+ appendText(msg + "\r\n");
69+ }
70+ appendText("finished!");
71+ tcpC.Close();
72+ }
73+ }
74+}
--- Lianix/whois/whois/Program.cs (nonexistent)
+++ Lianix/whois/whois/Program.cs (revision 75)
@@ -0,0 +1,22 @@
1+using System;
2+using System.Collections.Generic;
3+using System.Linq;
4+using System.Threading.Tasks;
5+using System.Windows.Forms;
6+
7+namespace whois
8+{
9+ static class Program
10+ {
11+ /// <summary>
12+ /// アプリケーションのメイン エントリ ポイントです。
13+ /// </summary>
14+ [STAThread]
15+ static void Main()
16+ {
17+ Application.EnableVisualStyles();
18+ Application.SetCompatibleTextRenderingDefault(false);
19+ Application.Run(new Form1());
20+ }
21+ }
22+}
--- Lianix/whois/whois/Properties/Resources.Designer.cs (nonexistent)
+++ Lianix/whois/whois/Properties/Resources.Designer.cs (revision 75)
@@ -0,0 +1,71 @@
1+//------------------------------------------------------------------------------
2+// <auto-generated>
3+// このコードはツールによって生成されました。
4+// ランタイム バージョン:4.0.30319.42000
5+//
6+// このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
7+// コードが再生成されるときに損失したりします
8+// </auto-generated>
9+//------------------------------------------------------------------------------
10+
11+namespace whois.Properties
12+{
13+
14+
15+ /// <summary>
16+ /// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。
17+ /// </summary>
18+ // このクラスは StronglyTypedResourceBuilder クラスが ResGen
19+ // または Visual Studio のようなツールを使用して自動生成されました。
20+ // メンバーを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に
21+ // ResGen を実行し直すか、または VS プロジェクトをリビルドします。
22+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25+ internal class Resources
26+ {
27+
28+ private static global::System.Resources.ResourceManager resourceMan;
29+
30+ private static global::System.Globalization.CultureInfo resourceCulture;
31+
32+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33+ internal Resources()
34+ {
35+ }
36+
37+ /// <summary>
38+ /// このクラスで使用されるキャッシュされた ResourceManager インスタンスを返します。
39+ /// </summary>
40+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41+ internal static global::System.Resources.ResourceManager ResourceManager
42+ {
43+ get
44+ {
45+ if ((resourceMan == null))
46+ {
47+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("whois.Properties.Resources", typeof(Resources).Assembly);
48+ resourceMan = temp;
49+ }
50+ return resourceMan;
51+ }
52+ }
53+
54+ /// <summary>
55+ /// 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、
56+ /// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。
57+ /// </summary>
58+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59+ internal static global::System.Globalization.CultureInfo Culture
60+ {
61+ get
62+ {
63+ return resourceCulture;
64+ }
65+ set
66+ {
67+ resourceCulture = value;
68+ }
69+ }
70+ }
71+}
--- Lianix/whois/whois/Properties/AssemblyInfo.cs (nonexistent)
+++ Lianix/whois/whois/Properties/AssemblyInfo.cs (revision 75)
@@ -0,0 +1,36 @@
1+using System.Reflection;
2+using System.Runtime.CompilerServices;
3+using System.Runtime.InteropServices;
4+
5+// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
6+// アセンブリに関連付けられている情報を変更するには、
7+// これらの属性値を変更してください。
8+[assembly: AssemblyTitle("whois")]
9+[assembly: AssemblyDescription("")]
10+[assembly: AssemblyConfiguration("")]
11+[assembly: AssemblyCompany("")]
12+[assembly: AssemblyProduct("whois")]
13+[assembly: AssemblyCopyright("Copyright © 2015")]
14+[assembly: AssemblyTrademark("")]
15+[assembly: AssemblyCulture("")]
16+
17+// ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから
18+// 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、
19+// その型の ComVisible 属性を true に設定してください。
20+[assembly: ComVisible(false)]
21+
22+// このプロジェクトが COM に公開される場合、次の GUID が typelib の ID になります
23+[assembly: Guid("f95d3437-aaa9-4dd4-ad52-d90619a145a5")]
24+
25+// アセンブリのバージョン情報は次の 4 つの値で構成されています:
26+//
27+// メジャー バージョン
28+// マイナー バージョン
29+// ビルド番号
30+// Revision
31+//
32+// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
33+// 既定値にすることができます:
34+// [assembly: AssemblyVersion("1.0.*")]
35+[assembly: AssemblyVersion("1.0.0.0")]
36+[assembly: AssemblyFileVersion("1.0.0.0")]
--- Lianix/whois/whois/Properties/Settings.Designer.cs (nonexistent)
+++ Lianix/whois/whois/Properties/Settings.Designer.cs (revision 75)
@@ -0,0 +1,30 @@
1+//------------------------------------------------------------------------------
2+// <auto-generated>
3+// This code was generated by a tool.
4+// Runtime Version:4.0.30319.42000
5+//
6+// Changes to this file may cause incorrect behavior and will be lost if
7+// the code is regenerated.
8+// </auto-generated>
9+//------------------------------------------------------------------------------
10+
11+namespace whois.Properties
12+{
13+
14+
15+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18+ {
19+
20+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21+
22+ public static Settings Default
23+ {
24+ get
25+ {
26+ return defaultInstance;
27+ }
28+ }
29+ }
30+}