<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yukun&#039;s Blog &#187; C Sharp</title>
	<atom:link href="http://www.yukun.info/blog/tag/c-sharp/feed" rel="self" type="application/rss+xml" />
	<link>http://www.yukun.info</link>
	<description>難しいことは分かりやすく、簡単なことは面白く紹介</description>
	<lastBuildDate>Thu, 26 Jan 2012 03:33:59 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>C#でキッチンタイマーを作ろう</title>
		<link>http://www.yukun.info/blog/2008/02/csharp-timer.html</link>
		<comments>http://www.yukun.info/blog/2008/02/csharp-timer.html#comments</comments>
		<pubDate>Sun, 24 Feb 2008 11:55:09 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[C Sharp]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[Time]]></category>

		<guid isPermaLink="false">http://www.yukun.info/trump/20080224/c%e3%81%a7%e3%82%ad%e3%83%83%e3%83%81%e3%83%b3%e3%82%bf%e3%82%a4%e3%83%9e%e3%83%bc%e3%82%92%e4%bd%9c%e3%82%8d%e3%81%86</guid>
		<description><![CDATA[カウントダウンタイマーとも言うのかな。 さて、今回学んだことは、 X秒からh:m:s形式での表示。 タイマースレッドの利用。 かな。 タイマーイベント毎に重い処理を行うと表示時間と実時間のずれが大きくなるので注意。そうい &#8230; <a href="http://www.yukun.info/blog/2008/02/csharp-timer.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2008/02/csharp-timer.html">C#でキッチンタイマーを作ろう</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>カウントダウンタイマーとも言うのかな。<br />
さて、今回学んだことは、</p>
<ul>
<li>X秒からh:m:s形式での表示。</li>
<li>タイマースレッドの利用。</li>
</ul>
<p>かな。<br />
タイマーイベント毎に重い処理を行うと表示時間と実時間のずれが大きくなるので注意。そういった場合はイベント発生間隔を長めに取ってみる。</p>
<h2>プログラムの実行結果</h2>
<h3>起動時</h3>
<p><a href="http://www.yukun.info/wp-content/uploads/timer01.png"><img src="http://www.yukun.info/wp-content/uploads/timer01.png" alt="C#カウントダウンタイマー1" title="timer01" width="188" height="156" class="alignnone size-full wp-image-2025" /></a></p>
<h3>実行時</h3>
<p><a href="http://www.yukun.info/wp-content/uploads/timer02.png"><img src="http://www.yukun.info/wp-content/uploads/timer02.png" alt="C#カウントダウンタイマー2" title="timer02" width="188" height="156" class="alignnone size-full wp-image-2026" /></a></p>
<p>ちなみにボタンをロックするにはボタンインスタンスのEnabledプロパティにfalseを代入します(ロック解除はture)。</p>
<p>例(butstartはボタンクラスのインスタンス変数)：</p>
<pre>butstart.Enabled = false; // スタートボタンをロック(スタートが押されたら場合)</pre>
<h2>ソースコード</h2>
<h3>FormTimer.cs</h3>
<pre>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
/**
 * キッチンタイマー
 * Web page: http://www.yukun.info/
 * license GPLv2
 */
namespace Sample
{
  public partial class FormTimer : Form
  {
    public FormTimer()
    {
      InitializeComponent();
      // マウスポインタの場所に表示
      this.DesktopLocation = new Point(System.Windows.Forms.Cursor.Position.X,
        System.Windows.Forms.Cursor.Position.Y);
    }
    int sec = 0; // 計測時間

    private void viewtime()
    {
      stLabel1.Text = "" + sec / 36000 % 10 + sec / 3600 % 10 +
                     ":" + sec / 600 % 6 + sec / 60 % 10 +
                     ":" + sec / 10 % 6 + sec % 10;
    }

    private void timer1_Tick(object sender, EventArgs e)
    {
      sec--;
      if (0 == sec)
      {
        sttimer.Enabled = false;
        System.Media.SystemSounds.Beep.Play();
        this.Activate();
      }
      viewtime();
    }

    private void butsec_Click(object sender, EventArgs e)
    {
      sec += 10;
      viewtime();
    }

    private void butmin_Click(object sender, EventArgs e)
    {
      sec += 60;
      viewtime();
    }

    private void buthour_Click(object sender, EventArgs e)
    {
      sec += 3600;
      if (sec >= 360000) sec = 0;
      viewtime();
    }

    private void butstart_Click(object sender, EventArgs e)
    {
      if (0 == sec) return;
      sttimer.Enabled = true;
      this.butstop.Enabled = true;
      this.butstart.Enabled = false;
      this.buthour.Enabled = false;
      this.butmin.Enabled = false;
      this.butsec.Enabled = false;
      this.butreset.Enabled = false;
    }

    private void butstop_Click(object sender, EventArgs e)
    {
      sttimer.Enabled = false;
      this.butstop.Enabled = false;
      this.butstart.Enabled = true;
      this.buthour.Enabled = true;
      this.butmin.Enabled = true;
      this.butsec.Enabled = true;
      this.butreset.Enabled = true;
    }

    private void butreset_Click(object sender, EventArgs e)
    {
      stLabel1.Text = "00:00:00";
      sec = 0;
    }

    private void 常に手前に表示ToolStripMenuItem_Click(object sender, EventArgs e)
    {
      //クリックするごとにこのフォームを常に手前または解除します。
      this.TopMost = !this.TopMost;
    }
  }
}
</pre>
<h3>FormTimer.Designer.cs</h3>
<pre>
namespace Sample
{
  partial class FormTimer
  {
    /// &lt;summary&gt;
    /// 必要なデザイナ変数です。
    /// &lt;/summary&gt;
    private System.ComponentModel.IContainer components = null;

    /// &lt;summary&gt;
    /// 使用中のリソースをすべてクリーンアップします。
    /// &lt;/summary&gt;
    /// &lt;param name=&quot;disposing&quot;&gt;マネージ リソースが破棄される場合 true、破棄されない場合は false です。&lt;/param&gt;
    protected override void Dispose(bool disposing)
    {
      if (disposing &amp;&amp; (components != null))
      {
        components.Dispose();
      }
      base.Dispose(disposing);
    }

    #region Windows フォーム デザイナで生成されたコード

    /// &lt;summary&gt;
    /// デザイナ サポートに必要なメソッドです。このメソッドの内容を
    /// コード エディタで変更しないでください。
    /// &lt;/summary&gt;
    private void InitializeComponent()
    {
      this.components = new System.ComponentModel.Container();
      this.sttimer = new System.Windows.Forms.Timer(this.components);
      this.buthour = new System.Windows.Forms.Button();
      this.butmin = new System.Windows.Forms.Button();
      this.butsec = new System.Windows.Forms.Button();
      this.butstart = new System.Windows.Forms.Button();
      this.stLabel1 = new System.Windows.Forms.Label();
      this.butstop = new System.Windows.Forms.Button();
      this.butreset = new System.Windows.Forms.Button();
      this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
      this.常に手前に表示ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
      this.contextMenuStrip1.SuspendLayout();
      this.SuspendLayout();
      //
      // sttimer
      //
      this.sttimer.Interval = 1000;
      this.sttimer.Tick += new System.EventHandler(this.timer1_Tick);
      //
      // buthour
      //
      this.buthour.Location = new System.Drawing.Point(6, 66);
      this.buthour.Name = &quot;buthour&quot;;
      this.buthour.Size = new System.Drawing.Size(50, 23);
      this.buthour.TabIndex = 0;
      this.buthour.Text = &quot;HOUR&quot;;
      this.buthour.UseVisualStyleBackColor = true;
      this.buthour.Click += new System.EventHandler(this.buthour_Click);
      //
      // butmin
      //
      this.butmin.Location = new System.Drawing.Point(62, 66);
      this.butmin.Name = &quot;butmin&quot;;
      this.butmin.Size = new System.Drawing.Size(50, 23);
      this.butmin.TabIndex = 1;
      this.butmin.Text = &quot;MIN&quot;;
      this.butmin.UseVisualStyleBackColor = true;
      this.butmin.Click += new System.EventHandler(this.butmin_Click);
      //
      // butsec
      //
      this.butsec.Location = new System.Drawing.Point(118, 66);
      this.butsec.Name = &quot;butsec&quot;;
      this.butsec.Size = new System.Drawing.Size(50, 23);
      this.butsec.TabIndex = 2;
      this.butsec.Text = &quot;SEC&quot;;
      this.butsec.UseVisualStyleBackColor = true;
      this.butsec.Click += new System.EventHandler(this.butsec_Click);
      //
      // butstart
      //
      this.butstart.Location = new System.Drawing.Point(6, 100);
      this.butstart.Name = &quot;butstart&quot;;
      this.butstart.Size = new System.Drawing.Size(50, 23);
      this.butstart.TabIndex = 3;
      this.butstart.Text = &quot;スタート&quot;;
      this.butstart.UseVisualStyleBackColor = true;
      this.butstart.Click += new System.EventHandler(this.butstart_Click);
      //
      // stLabel1
      //
      this.stLabel1.AutoSize = true;
      this.stLabel1.BackColor = System.Drawing.SystemColors.Control;
      this.stLabel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
      this.stLabel1.Font = new System.Drawing.Font(&quot;Times New Roman&quot;, 30F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
      this.stLabel1.Location = new System.Drawing.Point(6, 9);
      this.stLabel1.Name = &quot;stLabel1&quot;;
      this.stLabel1.Size = new System.Drawing.Size(163, 42);
      this.stLabel1.TabIndex = 4;
      this.stLabel1.Text = &quot;00:00:00&quot;;
      //
      // butstop
      //
      this.butstop.Location = new System.Drawing.Point(62, 100);
      this.butstop.Name = &quot;butstop&quot;;
      this.butstop.Size = new System.Drawing.Size(50, 23);
      this.butstop.TabIndex = 5;
      this.butstop.Text = &quot;ストップ&quot;;
      this.butstop.UseVisualStyleBackColor = true;
      this.butstop.Click += new System.EventHandler(this.butstop_Click);
      //
      // butreset
      //
      this.butreset.Location = new System.Drawing.Point(118, 100);
      this.butreset.Name = &quot;butreset&quot;;
      this.butreset.Size = new System.Drawing.Size(50, 23);
      this.butreset.TabIndex = 6;
      this.butreset.Text = &quot;リセット&quot;;
      this.butreset.UseVisualStyleBackColor = true;
      this.butreset.Click += new System.EventHandler(this.butreset_Click);
      //
      // contextMenuStrip1
      //
      this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
      this.常に手前に表示ToolStripMenuItem});
      this.contextMenuStrip1.Name = &quot;contextMenuStrip1&quot;;
      this.contextMenuStrip1.Size = new System.Drawing.Size(171, 26);
      //
      // 常に手前に表示ToolStripMenuItem
      //
      this.常に手前に表示ToolStripMenuItem.CheckOnClick = true;
      this.常に手前に表示ToolStripMenuItem.Name = &quot;常に手前に表示ToolStripMenuItem&quot;;
      this.常に手前に表示ToolStripMenuItem.Size = new System.Drawing.Size(170, 22);
      this.常に手前に表示ToolStripMenuItem.Text = &quot;常に Top に表示する&quot;;
      this.常に手前に表示ToolStripMenuItem.Click += new System.EventHandler(this.常に手前に表示ToolStripMenuItem_Click);
      //
      // FormTimer
      //
      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
      this.ClientSize = new System.Drawing.Size(180, 129);
      this.ContextMenuStrip = this.contextMenuStrip1;
      this.Controls.Add(this.butreset);
      this.Controls.Add(this.butstop);
      this.Controls.Add(this.stLabel1);
      this.Controls.Add(this.butstart);
      this.Controls.Add(this.butsec);
      this.Controls.Add(this.butmin);
      this.Controls.Add(this.buthour);
      this.Name = &quot;FormTimer&quot;;
      this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
      this.Text = &quot;タイマー&quot;;
      this.contextMenuStrip1.ResumeLayout(false);
      this.ResumeLayout(false);
      this.PerformLayout();

    }

    #endregion

    private System.Windows.Forms.Button buthour;
    private System.Windows.Forms.Button butmin;
    private System.Windows.Forms.Button butsec;
    private System.Windows.Forms.Button butstart;
    private System.Windows.Forms.Label stLabel1;
    private System.Windows.Forms.Button butstop;
    private System.Windows.Forms.Button butreset;
    private System.Windows.Forms.Timer sttimer;
    private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
    private System.Windows.Forms.ToolStripMenuItem 常に手前に表示ToolStripMenuItem;
  }
}
</pre>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2008/01/csharp-web-service-client.html" rel="bookmark" title="2008年1月2日">イースト辞書Webサービスを利用したC#(with .Net)クライアントプログラミング</a></li>
<li><a href="http://www.yukun.info/blog/2009/03/java-observe-event-model-view.html" rel="bookmark" title="2009年3月17日">Java: イベント駆動によるModelとViewの分離 &#8211; Observer パターン</a></li>
<li><a href="http://www.yukun.info/blog/2008/10/android-integer-to-binary-string.html" rel="bookmark" title="2008年10月29日">Android: 10進数→2進数変換アプリ</a></li>
<li><a href="http://www.yukun.info/blog/2008/12/air-actionscript-sqlite-statement.html" rel="bookmark" title="2008年12月22日">AIR: SQLiteでデータの挿入と検索 &#8211; SQLConnection、SQLStatementクラス</a></li>
<li><a href="http://www.yukun.info/blog/2008/11/actionscript-flash-load-server-image-file.html" rel="bookmark" title="2008年11月21日">ActionScript: 画像ファイルをダウンロードして表示 &#8211; Loaderクラス</a></li>
</ul>
<p><!-- Similar Posts took 7.483 ms --></p>
<p><a href="http://www.yukun.info/blog/2008/02/csharp-timer.html">C#でキッチンタイマーを作ろう</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2008/02/csharp-timer.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>イースト辞書Webサービスを利用したC#(with .Net)クライアントプログラミング</title>
		<link>http://www.yukun.info/blog/2008/01/csharp-web-service-client.html</link>
		<comments>http://www.yukun.info/blog/2008/01/csharp-web-service-client.html#comments</comments>
		<pubDate>Tue, 01 Jan 2008 15:00:00 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[C Sharp]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.yukun.info/trump/19700101/%e3%82%a4%e3%83%bc%e3%82%b9%e3%83%88%e8%be%9e%e6%9b%b8web%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%82%92%e5%88%a9%e7%94%a8%e3%81%97%e3%81%9fcwith-net%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3</guid>
		<description><![CDATA[C#からWebサービスを扱う練習をしてみました。例として、イースト辞書Webサービスを利用しようと思い宇宙仮面の C# プログラミングのこちらのページのソースコードを参考にしました(謝々)。 SOAP版APIの最新バージ &#8230; <a href="http://www.yukun.info/blog/2008/01/csharp-web-service-client.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2008/01/csharp-web-service-client.html">イースト辞書Webサービスを利用したC#(with .Net)クライアントプログラミング</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>C#からWebサービスを扱う練習をしてみました。例として、<a href="http://www.btonic.com/ws/index.html">イースト辞書Webサービス</a>を利用しようと思い<a href="http://uchukamen.com/">宇宙仮面の C# プログラミング</a>の<a href="http://uchukamen.com/Programming4/WebDict/index.htm">こちらのページ</a>のソースコードを参考にしました(謝々)。<br />
SOAP版APIの最新バージョンがv10になり、仕様が変更になったので以下にそれに対応したソースコードを示します。</p>
<h3>実行結果</h3>
<p><a href="http://www.yukun.info/wp-content/uploads/re_webdict01.png"><img src="http://www.yukun.info/wp-content/uploads/re_webdict01.png" alt="C#でWeb辞書サービス" title="C#でWeb辞書サービス" width="370" height="400" class="alignnone size-full wp-image-1990" /></a></p>
<h2>ソースコード</h2>
<h3>Form1.cs</h3>
<pre>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using netdictist.jp.co.est.btonic; // Webサービスの名前空間を追加

namespace netdictist
{
  public partial class Form1 : Form
  {
    public Form1()
    {
      InitializeComponent();
    }

    private NetDicV10 netDicV10 = null; // Web Service インスタンス格納用変数
    private DicInfo[] dicInfoList = null; // 辞書情報の配列（出力）
    private DicInfo currentDict = null; // 辞書
    private DicItem[] itemList = null; // 辞書項目の配列（出力）

    private void Form1_Load(object sender, EventArgs e)
    {
      #region ComboBox に辞書リストを設定する。

      // Web辞書検索サービスのインスタンスを作成する。
      this.netDicV10 = new NetDicV10();
      // 辞書のリストを取得する。
      dicInfoList = netDicV10.GetDicList("");
      foreach (DicInfo dicInfo in dicInfoList)
      {
        // comboBox1に項目を追加
        int index = this.comboBox1.Items.Add(dicInfo.FullName);
        if (index == 2) break;
      }
      this.comboBox1.SelectedIndex = 0;

      #endregion
    }

    // 辞書が変更になった。
    private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
    {
      this.currentDict = this.dicInfoList[this.comboBox1.SelectedIndex];
    }

    private void button1_Click(object sender, EventArgs e)
    {
      DicInfo d = this.currentDict; // 選択された辞書
      uint reqItemIndex = 0; // 取得する辞書項目の開始インデックス
      uint reqItemTitleCount = 10; // 取得する辞書項目の数
      uint reqItemContentCount = 10; // 内容も同時に取得する辞書項目の数
      uint itemCountTotal;  // 見つかった辞書項目数（出力）

      Cursor cursor = this.Cursor;
      this.Cursor = Cursors.WaitCursor; // Wait Cursor にする。
      Query[] qw = new Query[1]; // クエリ構造体
      qw[0] = new Query();
      qw[0].Words = this.tbSearchText.Text;
      qw[0].ScopeID = d.ScopeList[0].ID;
      //グローバル一意識別子(GUID)の作成
      Guid[] dicGuid = new Guid[1];
      dicGuid[0] = System.Guid.NewGuid();
      dicGuid[0] = d.DicID;
      ContentProfile cp = new ContentProfile();
      cp.CharsetOption = CharsetOption.UNICODE; // 使用文字セット指定
      cp.FormatType = "XHTML";
      cp.ResourceOption = ResourceOption.URI;

      itemCountTotal = netDicV10.SearchDicItem(
        "", // 認証チケット文字列
        dicGuid, // 辞書ID
        qw, // 検索語(クエリ構造体)
        cp, // ContentProfile構造体
        "", // ソート用(使用しない)
        reqItemIndex,  // 取得する辞書項目の開始インデックス
        reqItemTitleCount, // 取得する辞書項目の数
        reqItemContentCount, // 内容も同時に取得する辞書項目の数
        out itemList  // 辞書項目の配列（出力）
        );
      this.Cursor = cursor;   // Cursor を元に戻す。

      this.labelMessage.Text =
        itemCountTotal.ToString() +
          "件みつかりました。最大１０件まで表示します。";
      this.listBox1.Items.Clear();
      foreach (DicItem dicItem in itemList)
      {
        this.listBox1.Items.Add(dicItem.Title.InnerText);
      }
    }

    // 検索結果のリストをセレクトしたので、詳細を表示する。
    private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
    {
      string dictext =
        this.itemList[this.listBox1.SelectedIndex].Body.InnerText;
      this.richTextBox1.Text = dictext;
    }
  }
}
</pre>
<h3>Form1.Designer.cs</h3>
<pre>
namespace netdictist
{
  partial class Form1
  {
    /// &lt;summary&gt;
    /// 必要なデザイナ変数です。
    /// &lt;/summary&gt;
    private System.ComponentModel.IContainer components = null;

    /// &lt;summary&gt;
    /// 使用中のリソースをすべてクリーンアップします。
    /// &lt;/summary&gt;
    /// &lt;param name=&quot;disposing&quot;&gt;マネージ リソースが破棄される場合 true、破棄されない場合は false です。&lt;/param&gt;
    protected override void Dispose(bool disposing)
    {
      if (disposing &amp;&amp; (components != null))
      {
        components.Dispose();
      }
      base.Dispose(disposing);
    }

    #region Windows フォーム デザイナで生成されたコード

    /// &lt;summary&gt;
    /// デザイナ サポートに必要なメソッドです。このメソッドの内容を
    /// コード エディタで変更しないでください。
    /// &lt;/summary&gt;
    private void InitializeComponent()
    {
      this.comboBox1 = new System.Windows.Forms.ComboBox();
      this.tbSearchText = new System.Windows.Forms.TextBox();
      this.button1 = new System.Windows.Forms.Button();
      this.labelMessage = new System.Windows.Forms.Label();
      this.listBox1 = new System.Windows.Forms.ListBox();
      this.richTextBox1 = new System.Windows.Forms.RichTextBox();
      this.SuspendLayout();
      //
      // comboBox1
      //
      this.comboBox1.FormattingEnabled = true;
      this.comboBox1.Location = new System.Drawing.Point(14, 12);
      this.comboBox1.Name = &quot;comboBox1&quot;;
      this.comboBox1.Size = new System.Drawing.Size(204, 20);
      this.comboBox1.TabIndex = 0;
      this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
      //
      // tbSearchText
      //
      this.tbSearchText.Location = new System.Drawing.Point(14, 51);
      this.tbSearchText.Name = &quot;tbSearchText&quot;;
      this.tbSearchText.Size = new System.Drawing.Size(204, 19);
      this.tbSearchText.TabIndex = 1;
      //
      // button1
      //
      this.button1.Location = new System.Drawing.Point(14, 87);
      this.button1.Name = &quot;button1&quot;;
      this.button1.Size = new System.Drawing.Size(204, 31);
      this.button1.TabIndex = 2;
      this.button1.Text = &quot;検索&quot;;
      this.button1.UseVisualStyleBackColor = true;
      this.button1.Click += new System.EventHandler(this.button1_Click);
      //
      // labelMessage
      //
      this.labelMessage.AutoSize = true;
      this.labelMessage.Location = new System.Drawing.Point(12, 136);
      this.labelMessage.Name = &quot;labelMessage&quot;;
      this.labelMessage.Size = new System.Drawing.Size(136, 12);
      this.labelMessage.TabIndex = 3;
      this.labelMessage.Text = &quot;最大１０件まで表示します。&quot;;
      //
      // listBox1
      //
      this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)));
      this.listBox1.FormattingEnabled = true;
      this.listBox1.ItemHeight = 12;
      this.listBox1.Location = new System.Drawing.Point(235, 12);
      this.listBox1.Name = &quot;listBox1&quot;;
      this.listBox1.Size = new System.Drawing.Size(160, 136);
      this.listBox1.TabIndex = 4;
      this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
      //
      // richTextBox1
      //
      this.richTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
      this.richTextBox1.Location = new System.Drawing.Point(14, 169);
      this.richTextBox1.Name = &quot;richTextBox1&quot;;
      this.richTextBox1.Size = new System.Drawing.Size(381, 241);
      this.richTextBox1.TabIndex = 5;
      this.richTextBox1.Text = &quot;&quot;;
      //
      // Form1
      //
      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
      this.ClientSize = new System.Drawing.Size(407, 422);
      this.Controls.Add(this.richTextBox1);
      this.Controls.Add(this.listBox1);
      this.Controls.Add(this.labelMessage);
      this.Controls.Add(this.button1);
      this.Controls.Add(this.tbSearchText);
      this.Controls.Add(this.comboBox1);
      this.Name = &quot;Form1&quot;;
      this.Text = &quot;Form1&quot;;
      this.Load += new System.EventHandler(this.Form1_Load);
      this.ResumeLayout(false);
      this.PerformLayout();

    }

    #endregion

    private System.Windows.Forms.ComboBox comboBox1;
    private System.Windows.Forms.TextBox tbSearchText;
    private System.Windows.Forms.Button button1;
    private System.Windows.Forms.Label labelMessage;
    private System.Windows.Forms.ListBox listBox1;
    private System.Windows.Forms.RichTextBox richTextBox1;
  }
}
</pre>
<p>とりあえずこれで一応の動作はしますが、XMLの扱いがずさんなので、これから学んでいく必要があります。<br />
ともあれ、コーディング中感じたのは、Visual Studioのコード補正と宣言元へのジャンプ機能の強力さ。統合開発環境も使いこなしていきたいです。</p>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2008/02/csharp-timer.html" rel="bookmark" title="2008年2月24日">C#でキッチンタイマーを作ろう</a></li>
<li><a href="http://www.yukun.info/blog/2008/11/actionscript-flash-load-server-image-file.html" rel="bookmark" title="2008年11月21日">ActionScript: 画像ファイルをダウンロードして表示 &#8211; Loaderクラス</a></li>
<li><a href="http://www.yukun.info/blog/2008/06/python-dict2.html" rel="bookmark" title="2008年6月4日">Python: 辞書の全てのキーと値をたどる &#8211; items(), keys(), values()メソッド</a></li>
<li><a href="http://www.yukun.info/blog/2009/03/java-observe-event-model-view.html" rel="bookmark" title="2009年3月17日">Java: イベント駆動によるModelとViewの分離 &#8211; Observer パターン</a></li>
<li><a href="http://www.yukun.info/blog/2008/12/air-actionscript-sqlite-statement.html" rel="bookmark" title="2008年12月22日">AIR: SQLiteでデータの挿入と検索 &#8211; SQLConnection、SQLStatementクラス</a></li>
</ul>
<p><!-- Similar Posts took 10.861 ms --></p>
<p><a href="http://www.yukun.info/blog/2008/01/csharp-web-service-client.html">イースト辞書Webサービスを利用したC#(with .Net)クライアントプログラミング</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2008/01/csharp-web-service-client.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

