1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

GitHub Copilot活用 - 画面定義書からWinFormコントロールを自動生成する

1
Posted at

GitHub Copilot活用 - 画面定義書からWinFormコントロールを自動生成する

⚠️ 注意事項

免責事項:

  • 実際の業務環境での動作を保証するものではありません
  • 商用利用の際は、使用するツール・ライブラリのライセンスを必ず確認してください
  • GitHub Copilotの生成結果は必ずレビューしてください

📝 TL;DR

  • 主張: WinFormでも生成AIは使える。GUIデザイナーとは相性が悪くても、.designer.csを直接生成するコードファーストのアプローチなら話は別だ
  • 課題: 画面定義書を見ながら手動でWinFormコントロールを配置している
  • 解決策: GitHub Copilotに画面定義書を渡してC#コードを自動生成
  • 効果: コントロール配置作業の大幅削減(目安:30分 → 5分)
  • 導入工数: 約 1 時間(プロンプトテンプレート整備含む)

📊 改善効果サマリー

項目 改善前 改善後 削減率
コントロール配置時間 30分 5分 約83%削減
定義書との乖離リスク -
導入コスト - GitHub Copilot契約費用 -
学習コスト - -

🎯 背景

なぜこの改善に取り組んだか

  • 画面定義書を確認しながら手動でコントロールを配置するのは繰り返し作業
  • 定義書とコードの乖離が発生しやすく、後から不一致に気づくことが多い
  • VS2026でGitHub Copilotの精度が上がり、コード生成が実用レベルになった
  • WinFormのGUIデザイナーはドラッグ&ドロップが中心のため生成AIと相性が悪い。しかし.designer.csを直接生成するコードファーストのアプローチなら活用できると気づいた

対象読者

  • WinForm開発で手動配置に時間をかけている方
  • GitHub Copilotを活用したい.NET,.NETFramework開発者
  • 業務系システムの画面開発を効率化したい方

😓 課題

実装工程の業務フロー

image.png

従来の業務フロー

従来の業務フロー
1. 画面定義書(Excel/MD)を確認(5分)
2. Visual StudioのデザイナーでコントロールをD&D配置(15分)
3. プロパティウィンドウで各プロパティを設定(10分)
4. 定義書と見比べて確認(5分)

合計: 約30分/画面

具体的な問題点

  1. 手動配置の繰り返し作業

    • 詳細: コントロール1つずつD&Dして配置する
    • 影響: 画面数が多いほど工数が線形に増える
    • 頻度: 画面追加・修正のたびに発生
  2. 定義書とコードの乖離

    • 詳細: 手動で設定するためミスが発生しやすい
    • 影響: 後から仕様と異なるコントロールが見つかる
  3. 属人化リスク

    • 詳細: コントロールの命名規則が担当者によってブレる
    • 影響: コードレビューや引き継ぎコストが増える

定量的な影響

定量的な影響試算
1画面あたり: 30分
月間画面作成数: 5画面
月間: 30分 × 5画面 = 150分 = 2.5時間

→ 年間 2.5時間 × 12ヶ月 = 30時間の繰り返し作業

💡 解決策

採用したアプローチ

画面定義書(Markdownの表形式)をGitHub Copilotに渡し、WinFormのC#コードを自動生成する。

選定理由:

  • ✅ 既存の画面定義書をそのまま入力として使える
  • ✅ VS2026に統合されているため追加ツール不要
  • ✅ 生成後の微調整が容易

代替案との比較:

項目 GitHub Copilot スクリプト自作 既製ツール
導入コスト
学習コスト
カスタマイズ性
保守性

改善後の業務フロー

改善後の業務フロー
1. 画面イメージ(スクリーンショット・スケッチ)を用意(5分)
2. GitHub Copilotに画面イメージをもとに画面定義書(MD表形式)を生成(5分)
3. GitHub CopilotにMD表とプロンプトを貼り付け(1分)
4. 生成されたC#コードをレビュー・微調整(3分)
5. コードをプロジェクトに貼り付け(1分)

合計: 約15分/画面
※ 画面イメージで要件を固めてからコード生成するため手戻りが少ない

🔧 実装

開発環境

項目 詳細
OS Windows 11
Visual Studio Community 2026
GitHub Copilot VS2026統合版 課金済み
言語 C# / .NET

画面定義書のフォーマット例

ステップ1: 画面定義書をMarkdown表形式で作成

画面イメージ(スクリーンショット・スケッチ)を用意して、GitHub Copilotに画面定義書を出力させます。

画面イメージ(例:仕入先マスタ画面)

image.png

プロンプト内容

プロンプト内容
画像の画面の設計書をmd形式で出力してくれ。
座標、サイズも出力してくれ

出力結果

出力結果(Markdown)
# 画面定義書 - 仕入先マスタ

## 基本情報

| 項目 | 内容 |
|------|------|
| 画面名 | 仕入先マスタ |
| フォーム名 | Form1 |
| クライアントサイズ | 800 x 700 px (推定) |
| AutoScaleMode | Font |

---

## レイアウト概要

┌─────────────────────────────────────────────────────────────┐
│ 仕入先マスタ (タイトルバー / 青背景ヘッダー) │
├──────────────────────────────┬──────────────────────────────┤
│ 左カラム (仕入先情報) │ 右カラム (メタ情報) │
├──────────────────────────────┴──────────────────────────────┤
│ 下部カラム (支払・取引先情報) │
└─────────────────────────────────────────────────────────────┘


---

## コントロール一覧

### ヘッダー領域

| # | コントロール種別 | コントロール名 | 表示テキスト | Location (X, Y) | Size (W, H) | 備考 |
|---|--------------|-------------|------------|-----------------|-------------|------|
| 1 | Panel | pnlHeader | - | (0, 0) | (800, 50) | 背景色: 水色 (#ADD8E6) |
| 2 | Label | lblTitle |  | (20, 13) | (200, 24) | フォントサイズ大 |

---

### 左カラム - 仕入先情報

| # | コントロール種別 | コントロール名 | ラベルテキスト | Label Location (X, Y) | TextBox Location (X, Y) | TextBox Size (W, H) | 初期値 / サンプル | 備考 |
|---|--------------|-------------|-------------|----------------------|------------------------|---------------------|-----------------|------|
| 3 | Label + TextBox | lblSirCode / txtSirCode |  | (30, 75) | (135, 72) | (110, 23) | T000000000 | 必須・先頭フォーカス |
| 4 | Label + TextBox | lblSirBranch / txtSirBranch |  | (30, 103) | (135, 100) | (50, 23) | 1 | 数値 |
| 5 | Label + TextBox | lblSirName / txtSirName |  | (30, 131) | (135, 128) | (200, 23) | 有限会社XYZ工業 | |
| 6 | Label + TextBox | lblSirNameKana / txtSirNameKana |  | (30, 159) | (135, 156) | (220, 23) | ユウゲンガイシャエックスワイジーコウ… | カナ入力 |
| 7 | Label + TextBox | lblSirPic / txtSirPic |  | (30, 187) | (135, 184) | (150, 23) | 中村 二郎 | |
| 8 | Label + TextBox | lblSirDept / txtSirDept |  | (30, 215) | (135, 212) | (200, 23) | 営業部 | |
| 9 | Label + TextBox | lblSirZip / txtSirZip |  | (30, 243) | (135, 240) | (100, 23) | 530-0001 | ハイフン付き |
| 10 | Label + TextBox | lblSirPref / txtSirPref |  | (30, 271) | (135, 268) | (80, 23) | 大阪府 | |
| 11 | Label + TextBox | lblSirAddr1 / txtSirAddr1 |  | (30, 299) | (135, 296) | (240, 44) | 大阪市北区梅田2-2 | Multiline可 |
| 12 | Label + TextBox | lblSirAddr2 / txtSirAddr2 |  | (30, 350) | (135, 347) | (240, 44) | (空白) | Multiline可 |
| 13 | Label + TextBox | lblSirTel / txtSirTel |  | (30, 401) | (135, 398) | (150, 23) | 06-0000-0001 | |
| 14 | Label + TextBox | lblSirFax / txtSirFax |  | (30, 429) | (135, 426) | (150, 23) | 06-0000-0002 | |
| 15 | Label + TextBox | lblSirEmail / txtSirEmail |  | (30, 457) | (135, 454) | (240, 44) | xyz@example.com | Multiline可 |

---

### 右カラム - メタ情報

| # | コントロール種別 | コントロール名 | ラベルテキスト | Label Location (X, Y) | TextBox Location (X, Y) | TextBox Size (W, H) | 初期値 / サンプル | 備考 |
|---|--------------|-------------|-------------|----------------------|------------------------|---------------------|-----------------|------|
| 16 | Label + TextBox | lblMailAddr / txtMailAddr |  | (430, 75) | (530, 72) | (200, 23) | (空白) | |
| 17 | Label + TextBox | lblCreatedAt / txtCreatedAt |  | (430, 115) | (520, 112) | (120, 23) | ########## | ReadOnly・日時表示 |
| 18 | Label + TextBox | lblUpdatedAt / txtUpdatedAt |  | (430, 143) | (520, 140) | (120, 23) | ########## | ReadOnly・日時表示 |
| 19 | Label + TextBox | lblUpdatedBy / txtUpdatedBy |  | (430, 171) | (520, 168) | (80, 23) | 管理者 | ReadOnly |

---

### 下部カラム - 支払・取引先情報

| # | コントロール種別 | コントロール名 | ラベルテキスト | Label Location (X, Y) | TextBox Location (X, Y) | TextBox Size (W, H) | 初期値 / サンプル | 備考 |
|---|--------------|-------------|-------------|----------------------|------------------------|---------------------|-----------------|------|
| 20 | Label + TextBox | lblCloseDay / txtCloseDay |  | (30, 510) | (135, 507) | (50, 23) | 31 | 数値 |
| 21 | Label + TextBox | lblPayNextMonth / txtPayNextMonth |  | (30, 538) | (135, 535) | (50, 23) | 1 | 数値 |
| 22 | Label + TextBox | lblPayMethod / txtPayMethod |  | (30, 566) | (135, 563) | (50, 23) | 1 | 数値・区分コード |
| 23 | Label + TextBox | lblCustPic / txtCustPic |  | (30, 594) | (135, 591) | (150, 23) | (空白) | |
| 24 | Label + TextBox | lblDeptName / txtDeptName |  | (30, 622) | (135, 619) | (200, 23) | (空白) | |
| 25 | Label + TextBox | lblTel / txtTel |  | (30, 650) | (135, 647) | (150, 23) | (空白) | |
| 26 | Label + TextBox | lblFax / txtFax |  | (30, 678) | (135, 675) | (150, 23) | (空白) | |

---

## 座標まとめ図 (クライアント座標)

X=0 X=30 X=135 X=380 X=430 X=520 X=750
│ │ │ │ │ │ │
│ [ヘッダー: 仕入先マスタ] │ Y=0
│ │ Y=50
│ 仕入先コード [T000000000] メールアドレス [ ]│ Y=72
│ 仕入先枝番 [1 ] │ Y=100
│ 仕入先名 [有限会社XYZ工業] 作成日時 [######]│ Y=128
│ 仕入先名カナ [ユウゲン..] 更新日時 [######] │ Y=156
│ 仕入先担当者 [中村 二郎 ] 更新者名 [管理者] │ Y=184
│ 仕入先部門名 [営業部 ] │ Y=212
│ 仕入先郵便番号 [530-0001 ] │ Y=240
│ 仕入先都道府県 [大阪府 ] │ Y=268
│ 仕入先住所1 [大阪市北区梅田2-2 ] │ Y=296
│ │
│ 仕入先住所2 [ ] │ Y=347
│ │
│ 仕入先電話番号 [06-0000-0001] │ Y=398
│ 仕入先FAX番号 [06-0000-0002] │ Y=426
│ 仕入先メールア [xyz@example.com ] │ Y=454
│ │
│ ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ─ │ Y=490
│ 締め日 [31] │ Y=507
│ 支払翌月 [1 ] │ Y=535
│ 支払方法区分 [1 ] │ Y=563
│ 取引先担当者 [ ] │ Y=591
│ 部門名 [ ] │ Y=619
│ 電話番号 [ ] │ Y=647
│ FAX番号 [ ] │ Y=675
└─────────────────────────────────────────────────────────┘


---

## プロパティ補足

### TextBox 共通設定

| プロパティ | 値 |
|----------|-----|
| Height | 23 px |
| Font | MS UI Gothic 9pt (または游ゴシック) |
| BorderStyle | Fixed3D |

### ReadOnly TextBox (作成日時・更新日時・更新者名)

| プロパティ | 値 |
|----------|-----|
| ReadOnly | true |
| BackColor | Control (グレー) |

### Multiline TextBox (住所1・住所2・メールア)

| プロパティ | 値 |
|----------|-----|
| Multiline | true |
| Height | 44 px |
| ScrollBars | Vertical |

---

## 備考・制約

- 座標はスクリーンショットからの推定値。Designer.cs に定義が存在しないため実測値ではない。
- 実際に実装する際は AutoScaleMode = Font の影響で DPI に応じてスケールされる。
- `######` 表示はカラム幅不足による日時の文字化け(TextBox 幅を広げること)。
- 仕入先名カナのテキストボックスは表示上省略されているため、幅を十分に確保すること。



ポイント:

  • コントロール名はハンガリアン記法で統一(txt/dtp/cmb/btn)
  • 備考列に制約・注意事項を記載しておく

ステップ2: Copilotへのプロンプトを作成

以下の画面定義書をもとに、WinFormのC#コードを生成してください。

copilot実施時の様子
image.png

プロンプト全文(画面定義書含む)


【条件】
・コントロールの配置はTableLayoutPanelを使用
・命名規則はハンガリアン記法
・バリデーションはLeaveイベントで実装
・読み取り専用はReadOnly = trueで設定
・数値のみのTextBoxはKeyPressイベントで制御

【画面定義書】
# 画面定義書 - 仕入先マスタ

## 基本情報

| 項目 | 内容 |
|------|------|
| 画面名 | 仕入先マスタ |
| フォーム名 | Form1 |
| クライアントサイズ | 800 x 700 px (推定) |
| AutoScaleMode | Font |

## コントロール一覧

### ヘッダー領域

| # | コントロール種別 | コントロール名 | 表示テキスト | Location (X, Y) | Size (W, H) | 備考 |
|---|--------------|-------------|------------|-----------------|-------------|------|
| 1 | Panel | pnlHeader | - | (0, 0) | (800, 50) | 背景色: 水色 (#ADD8E6) |
| 2 | Label | lblTitle |  | (20, 13) | (200, 24) | フォントサイズ大 |

### 左カラム - 仕入先情報

| # | コントロール種別 | コントロール名 | ラベルテキスト | Label Location (X, Y) | TextBox Location (X, Y) | TextBox Size (W, H) | 初期値 / サンプル | 備考 |
|---|--------------|-------------|-------------|----------------------|------------------------|---------------------|-----------------|------|
| 3 | Label + TextBox | lblSirCode / txtSirCode |  | (30, 75) | (135, 72) | (110, 23) | T000000000 | 必須・先頭フォーカス |
| 4 | Label + TextBox | lblSirBranch / txtSirBranch |  | (30, 103) | (135, 100) | (50, 23) | 1 | 数値 |
| 5 | Label + TextBox | lblSirName / txtSirName |  | (30, 131) | (135, 128) | (200, 23) | 有限会社XYZ工業 | |
| 6 | Label + TextBox | lblSirNameKana / txtSirNameKana |  | (30, 159) | (135, 156) | (220, 23) | ユウゲンガイシャエックスワイジーコウ… | カナ入力 |
| 7 | Label + TextBox | lblSirPic / txtSirPic |  | (30, 187) | (135, 184) | (150, 23) | 中村 二郎 | |
| 8 | Label + TextBox | lblSirDept / txtSirDept |  | (30, 215) | (135, 212) | (200, 23) | 営業部 | |
| 9 | Label + TextBox | lblSirZip / txtSirZip |  | (30, 243) | (135, 240) | (100, 23) | 530-0001 | ハイフン付き |
| 10 | Label + TextBox | lblSirPref / txtSirPref |  | (30, 271) | (135, 268) | (80, 23) | 大阪府 | |
| 11 | Label + TextBox | lblSirAddr1 / txtSirAddr1 |  | (30, 299) | (135, 296) | (240, 44) | 大阪市北区梅田2-2 | Multiline可 |
| 12 | Label + TextBox | lblSirAddr2 / txtSirAddr2 |  | (30, 350) | (135, 347) | (240, 44) | (空白) | Multiline可 |
| 13 | Label + TextBox | lblSirTel / txtSirTel |  | (30, 401) | (135, 398) | (150, 23) | 06-0000-0001 | |
| 14 | Label + TextBox | lblSirFax / txtSirFax |  | (30, 429) | (135, 426) | (150, 23) | 06-0000-0002 | |
| 15 | Label + TextBox | lblSirEmail / txtSirEmail |  | (30, 457) | (135, 454) | (240, 44) | xyz@example.com | Multiline可 |

### 右カラム - メタ情報

| # | コントロール種別 | コントロール名 | ラベルテキスト | Label Location (X, Y) | TextBox Location (X, Y) | TextBox Size (W, H) | 初期値 / サンプル | 備考 |
|---|--------------|-------------|-------------|----------------------|------------------------|---------------------|-----------------|------|
| 16 | Label + TextBox | lblMailAddr / txtMailAddr |  | (430, 75) | (530, 72) | (200, 23) | (空白) | |
| 17 | Label + TextBox | lblCreatedAt / txtCreatedAt |  | (430, 115) | (520, 112) | (120, 23) | ########## | ReadOnly・日時表示 |
| 18 | Label + TextBox | lblUpdatedAt / txtUpdatedAt |  | (430, 143) | (520, 140) | (120, 23) | ########## | ReadOnly・日時表示 |
| 19 | Label + TextBox | lblUpdatedBy / txtUpdatedBy |  | (430, 171) | (520, 168) | (80, 23) | 管理者 | ReadOnly |

### 下部カラム - 支払・取引先情報

| # | コントロール種別 | コントロール名 | ラベルテキスト | Label Location (X, Y) | TextBox Location (X, Y) | TextBox Size (W, H) | 初期値 / サンプル | 備考 |
|---|--------------|-------------|-------------|----------------------|------------------------|---------------------|-----------------|------|
| 20 | Label + TextBox | lblCloseDay / txtCloseDay |  | (30, 510) | (135, 507) | (50, 23) | 31 | 数値 |
| 21 | Label + TextBox | lblPayNextMonth / txtPayNextMonth |  | (30, 538) | (135, 535) | (50, 23) | 1 | 数値 |
| 22 | Label + TextBox | lblPayMethod / txtPayMethod |  | (30, 566) | (135, 563) | (50, 23) | 1 | 数値・区分コード |
| 23 | Label + TextBox | lblCustPic / txtCustPic |  | (30, 594) | (135, 591) | (150, 23) | (空白) | |
| 24 | Label + TextBox | lblDeptName / txtDeptName |  | (30, 622) | (135, 619) | (200, 23) | (空白) | |
| 25 | Label + TextBox | lblTel / txtTel |  | (30, 650) | (135, 647) | (150, 23) | (空白) | |
| 26 | Label + TextBox | lblFax / txtFax |  | (30, 678) | (135, 675) | (150, 23) | (空白) | |

## プロパティ補足

| プロパティ | 対象 | 値 |
|----------|------|-----|
| Height | TextBox共通 | 23 px |
| Font | TextBox共通 | MS UI Gothic 9pt |
| BorderStyle | TextBox共通 | Fixed3D |
| ReadOnly | 作成日時・更新日時・更新者名 | true |
| BackColor | ReadOnly TextBox | Control(グレー) |
| Multiline | 住所1・住所2・メールア | true |
| Height | Multiline TextBox | 44 px |
| ScrollBars | Multiline TextBox | Vertical |

ステップ3: 生成コードのレビュー

生成されたコードを確認する際のチェックポイント:

  • コントロール名が定義書と一致しているか
  • サイズ・配置が正しいか
  • 備考欄の制約が実装されているか

テンプレートの提供

プロンプトテンプレート

プロンプトテンプレート
以下の画面定義書をもとに、WinFormのC#コードを生成してください。

【条件】
・コントロールの配置はTableLayoutPanelを使用
・命名規則はハンガリアン記法(TextBox→txt、Button→btn、ComboBox→cmb、DateTimePicker→dtp)
・バリデーションはLeaveイベントで実装
・読み取り専用はReadOnly = trueで設定

【画面定義書】
ファイルパス

生成されるcs

生成されたコード(Form2.designer.cs)
Form2.designer.cs
namespace WinFormsApp3
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.pnlHeader = new System.Windows.Forms.Panel();
            this.lblTitle = new System.Windows.Forms.Label();
            this.lblSirCode = new System.Windows.Forms.Label();
            this.txtSirCode = new System.Windows.Forms.TextBox();
            this.lblSirBranch = new System.Windows.Forms.Label();
            this.txtSirBranch = new System.Windows.Forms.TextBox();
            this.lblSirName = new System.Windows.Forms.Label();
            this.txtSirName = new System.Windows.Forms.TextBox();
            this.lblSirNameKana = new System.Windows.Forms.Label();
            this.txtSirNameKana = new System.Windows.Forms.TextBox();
            this.lblSirPic = new System.Windows.Forms.Label();
            this.txtSirPic = new System.Windows.Forms.TextBox();
            this.lblSirDept = new System.Windows.Forms.Label();
            this.txtSirDept = new System.Windows.Forms.TextBox();
            this.lblSirZip = new System.Windows.Forms.Label();
            this.txtSirZip = new System.Windows.Forms.TextBox();
            this.lblSirPref = new System.Windows.Forms.Label();
            this.txtSirPref = new System.Windows.Forms.TextBox();
            this.lblSirAddr1 = new System.Windows.Forms.Label();
            this.txtSirAddr1 = new System.Windows.Forms.TextBox();
            this.lblSirAddr2 = new System.Windows.Forms.Label();
            this.txtSirAddr2 = new System.Windows.Forms.TextBox();
            this.lblSirTel = new System.Windows.Forms.Label();
            this.txtSirTel = new System.Windows.Forms.TextBox();
            this.lblSirFax = new System.Windows.Forms.Label();
            this.txtSirFax = new System.Windows.Forms.TextBox();
            this.lblSirEmail = new System.Windows.Forms.Label();
            this.txtSirEmail = new System.Windows.Forms.TextBox();
            this.lblMailAddr = new System.Windows.Forms.Label();
            this.txtMailAddr = new System.Windows.Forms.TextBox();
            this.lblCreatedAt = new System.Windows.Forms.Label();
            this.txtCreatedAt = new System.Windows.Forms.TextBox();
            this.lblUpdatedAt = new System.Windows.Forms.Label();
            this.txtUpdatedAt = new System.Windows.Forms.TextBox();
            this.lblUpdatedBy = new System.Windows.Forms.Label();
            this.txtUpdatedBy = new System.Windows.Forms.TextBox();
            this.lblCloseDay = new System.Windows.Forms.Label();
            this.txtCloseDay = new System.Windows.Forms.TextBox();
            this.lblPayNextMonth = new System.Windows.Forms.Label();
            this.txtPayNextMonth = new System.Windows.Forms.TextBox();
            this.lblPayMethod = new System.Windows.Forms.Label();
            this.txtPayMethod = new System.Windows.Forms.TextBox();
            this.lblCustPic = new System.Windows.Forms.Label();
            this.txtCustPic = new System.Windows.Forms.TextBox();
            this.lblDeptName = new System.Windows.Forms.Label();
            this.txtDeptName = new System.Windows.Forms.TextBox();
            this.lblTel = new System.Windows.Forms.Label();
            this.txtTel = new System.Windows.Forms.TextBox();
            this.lblFax = new System.Windows.Forms.Label();
            this.txtFax = new System.Windows.Forms.TextBox();
            this.pnlHeader.SuspendLayout();
            this.SuspendLayout();
            // 
            // pnlHeader
            // 
            this.pnlHeader.BackColor = System.Drawing.Color.LightBlue;
            this.pnlHeader.Controls.Add(this.lblTitle);
            this.pnlHeader.Location = new System.Drawing.Point(0, 0);
            this.pnlHeader.Name = "pnlHeader";
            this.pnlHeader.Size = new System.Drawing.Size(800, 50);
            this.pnlHeader.TabIndex = 0;
            // 
            // lblTitle
            // 
            this.lblTitle.AutoSize = true;
            this.lblTitle.Font = new System.Drawing.Font("MS UI Gothic", 14F);
            this.lblTitle.Location = new System.Drawing.Point(20, 13);
            this.lblTitle.Name = "lblTitle";
            this.lblTitle.Size = new System.Drawing.Size(130, 24);
            this.lblTitle.TabIndex = 0;
            this.lblTitle.Text = "仕入先マスタ";
            // 
            // lblSirCode
            // 
            this.lblSirCode.AutoSize = true;
            this.lblSirCode.Location = new System.Drawing.Point(30, 75);
            this.lblSirCode.Name = "lblSirCode";
            this.lblSirCode.Size = new System.Drawing.Size(85, 15);
            this.lblSirCode.TabIndex = 1;
            this.lblSirCode.Text = "仕入先コード";
            // 
            // txtSirCode
            // 
            this.txtSirCode.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtSirCode.Location = new System.Drawing.Point(135, 72);
            this.txtSirCode.Name = "txtSirCode";
            this.txtSirCode.Size = new System.Drawing.Size(110, 23);
            this.txtSirCode.TabIndex = 1;
            this.txtSirCode.Text = "T000000000";
            // 
            // lblSirBranch
            // 
            this.lblSirBranch.AutoSize = true;
            this.lblSirBranch.Location = new System.Drawing.Point(30, 103);
            this.lblSirBranch.Name = "lblSirBranch";
            this.lblSirBranch.Size = new System.Drawing.Size(85, 15);
            this.lblSirBranch.TabIndex = 2;
            this.lblSirBranch.Text = "仕入先枝番";
            // 
            // txtSirBranch
            // 
            this.txtSirBranch.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtSirBranch.Location = new System.Drawing.Point(135, 100);
            this.txtSirBranch.Name = "txtSirBranch";
            this.txtSirBranch.Size = new System.Drawing.Size(50, 23);
            this.txtSirBranch.TabIndex = 2;
            this.txtSirBranch.Text = "1";
            // 
            // lblSirName
            // 
            this.lblSirName.AutoSize = true;
            this.lblSirName.Location = new System.Drawing.Point(30, 131);
            this.lblSirName.Name = "lblSirName";
            this.lblSirName.Size = new System.Drawing.Size(70, 15);
            this.lblSirName.TabIndex = 3;
            this.lblSirName.Text = "仕入先名";
            // 
            // txtSirName
            // 
            this.txtSirName.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtSirName.Location = new System.Drawing.Point(135, 128);
            this.txtSirName.Name = "txtSirName";
            this.txtSirName.Size = new System.Drawing.Size(200, 23);
            this.txtSirName.TabIndex = 3;
            this.txtSirName.Text = "有限会社XYZ工業";
            // 
            // lblSirNameKana
            // 
            this.lblSirNameKana.AutoSize = true;
            this.lblSirNameKana.Location = new System.Drawing.Point(30, 159);
            this.lblSirNameKana.Name = "lblSirNameKana";
            this.lblSirNameKana.Size = new System.Drawing.Size(98, 15);
            this.lblSirNameKana.TabIndex = 4;
            this.lblSirNameKana.Text = "仕入先名カナ";
            // 
            // txtSirNameKana
            // 
            this.txtSirNameKana.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtSirNameKana.Location = new System.Drawing.Point(135, 156);
            this.txtSirNameKana.Name = "txtSirNameKana";
            this.txtSirNameKana.Size = new System.Drawing.Size(220, 23);
            this.txtSirNameKana.TabIndex = 4;
            this.txtSirNameKana.Text = "ユウゲンガイシャエックスワイジーコウギョウ";
            // 
            // lblSirPic
            // 
            this.lblSirPic.AutoSize = true;
            this.lblSirPic.Location = new System.Drawing.Point(30, 187);
            this.lblSirPic.Name = "lblSirPic";
            this.lblSirPic.Size = new System.Drawing.Size(98, 15);
            this.lblSirPic.TabIndex = 5;
            this.lblSirPic.Text = "仕入先担当者";
            // 
            // txtSirPic
            // 
            this.txtSirPic.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtSirPic.Location = new System.Drawing.Point(135, 184);
            this.txtSirPic.Name = "txtSirPic";
            this.txtSirPic.Size = new System.Drawing.Size(150, 23);
            this.txtSirPic.TabIndex = 5;
            this.txtSirPic.Text = "中村 二郎";
            // 
            // lblSirDept
            // 
            this.lblSirDept.AutoSize = true;
            this.lblSirDept.Location = new System.Drawing.Point(30, 215);
            this.lblSirDept.Name = "lblSirDept";
            this.lblSirDept.Size = new System.Drawing.Size(98, 15);
            this.lblSirDept.TabIndex = 6;
            this.lblSirDept.Text = "仕入先部門名";
            // 
            // txtSirDept
            // 
            this.txtSirDept.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtSirDept.Location = new System.Drawing.Point(135, 212);
            this.txtSirDept.Name = "txtSirDept";
            this.txtSirDept.Size = new System.Drawing.Size(200, 23);
            this.txtSirDept.TabIndex = 6;
            this.txtSirDept.Text = "営業部";
            // 
            // lblSirZip
            // 
            this.lblSirZip.AutoSize = true;
            this.lblSirZip.Location = new System.Drawing.Point(30, 243);
            this.lblSirZip.Name = "lblSirZip";
            this.lblSirZip.Size = new System.Drawing.Size(113, 15);
            this.lblSirZip.TabIndex = 7;
            this.lblSirZip.Text = "仕入先郵便番号";
            // 
            // txtSirZip
            // 
            this.txtSirZip.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtSirZip.Location = new System.Drawing.Point(135, 240);
            this.txtSirZip.Name = "txtSirZip";
            this.txtSirZip.Size = new System.Drawing.Size(100, 23);
            this.txtSirZip.TabIndex = 7;
            this.txtSirZip.Text = "530-0001";
            // 
            // lblSirPref
            // 
            this.lblSirPref.AutoSize = true;
            this.lblSirPref.Location = new System.Drawing.Point(30, 271);
            this.lblSirPref.Name = "lblSirPref";
            this.lblSirPref.Size = new System.Drawing.Size(98, 15);
            this.lblSirPref.TabIndex = 8;
            this.lblSirPref.Text = "仕入先都道府県";
            // 
            // txtSirPref
            // 
            this.txtSirPref.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtSirPref.Location = new System.Drawing.Point(135, 268);
            this.txtSirPref.Name = "txtSirPref";
            this.txtSirPref.Size = new System.Drawing.Size(80, 23);
            this.txtSirPref.TabIndex = 8;
            this.txtSirPref.Text = "大阪府";
            // 
            // lblSirAddr1
            // 
            this.lblSirAddr1.AutoSize = true;
            this.lblSirAddr1.Location = new System.Drawing.Point(30, 299);
            this.lblSirAddr1.Name = "lblSirAddr1";
            this.lblSirAddr1.Size = new System.Drawing.Size(91, 15);
            this.lblSirAddr1.TabIndex = 9;
            this.lblSirAddr1.Text = "仕入先住所1";
            // 
            // txtSirAddr1
            // 
            this.txtSirAddr1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtSirAddr1.Location = new System.Drawing.Point(135, 296);
            this.txtSirAddr1.Multiline = true;
            this.txtSirAddr1.Name = "txtSirAddr1";
            this.txtSirAddr1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.txtSirAddr1.Size = new System.Drawing.Size(240, 44);
            this.txtSirAddr1.TabIndex = 9;
            this.txtSirAddr1.Text = "大阪市北区梅田2-2";
            // 
            // lblSirAddr2
            // 
            this.lblSirAddr2.AutoSize = true;
            this.lblSirAddr2.Location = new System.Drawing.Point(30, 350);
            this.lblSirAddr2.Name = "lblSirAddr2";
            this.lblSirAddr2.Size = new System.Drawing.Size(91, 15);
            this.lblSirAddr2.TabIndex = 10;
            this.lblSirAddr2.Text = "仕入先住所2";
            // 
            // txtSirAddr2
            // 
            this.txtSirAddr2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtSirAddr2.Location = new System.Drawing.Point(135, 347);
            this.txtSirAddr2.Multiline = true;
            this.txtSirAddr2.Name = "txtSirAddr2";
            this.txtSirAddr2.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.txtSirAddr2.Size = new System.Drawing.Size(240, 44);
            this.txtSirAddr2.TabIndex = 10;
            // 
            // lblSirTel
            // 
            this.lblSirTel.AutoSize = true;
            this.lblSirTel.Location = new System.Drawing.Point(30, 401);
            this.lblSirTel.Name = "lblSirTel";
            this.lblSirTel.Size = new System.Drawing.Size(98, 15);
            this.lblSirTel.TabIndex = 11;
            this.lblSirTel.Text = "仕入先電話番号";
            // 
            // txtSirTel
            // 
            this.txtSirTel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtSirTel.Location = new System.Drawing.Point(135, 398);
            this.txtSirTel.Name = "txtSirTel";
            this.txtSirTel.Size = new System.Drawing.Size(150, 23);
            this.txtSirTel.TabIndex = 11;
            this.txtSirTel.Text = "06-0000-0001";
            // 
            // lblSirFax
            // 
            this.lblSirFax.AutoSize = true;
            this.lblSirFax.Location = new System.Drawing.Point(30, 429);
            this.lblSirFax.Name = "lblSirFax";
            this.lblSirFax.Size = new System.Drawing.Size(106, 15);
            this.lblSirFax.TabIndex = 12;
            this.lblSirFax.Text = "仕入先FAX番号";
            // 
            // txtSirFax
            // 
            this.txtSirFax.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtSirFax.Location = new System.Drawing.Point(135, 426);
            this.txtSirFax.Name = "txtSirFax";
            this.txtSirFax.Size = new System.Drawing.Size(150, 23);
            this.txtSirFax.TabIndex = 12;
            this.txtSirFax.Text = "06-0000-0002";
            // 
            // lblSirEmail
            // 
            this.lblSirEmail.AutoSize = true;
            this.lblSirEmail.Location = new System.Drawing.Point(30, 457);
            this.lblSirEmail.Name = "lblSirEmail";
            this.lblSirEmail.Size = new System.Drawing.Size(126, 15);
            this.lblSirEmail.TabIndex = 13;
            this.lblSirEmail.Text = "仕入先メールアドレス";
            // 
            // txtSirEmail
            // 
            this.txtSirEmail.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtSirEmail.Location = new System.Drawing.Point(135, 454);
            this.txtSirEmail.Multiline = true;
            this.txtSirEmail.Name = "txtSirEmail";
            this.txtSirEmail.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.txtSirEmail.Size = new System.Drawing.Size(240, 44);
            this.txtSirEmail.TabIndex = 13;
            this.txtSirEmail.Text = "xyz@example.com";
            // 
            // lblMailAddr
            // 
            this.lblMailAddr.AutoSize = true;
            this.lblMailAddr.Location = new System.Drawing.Point(430, 75);
            this.lblMailAddr.Name = "lblMailAddr";
            this.lblMailAddr.Size = new System.Drawing.Size(91, 15);
            this.lblMailAddr.TabIndex = 14;
            this.lblMailAddr.Text = "メールアドレス";
            // 
            // txtMailAddr
            // 
            this.txtMailAddr.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtMailAddr.Location = new System.Drawing.Point(530, 72);
            this.txtMailAddr.Name = "txtMailAddr";
            this.txtMailAddr.Size = new System.Drawing.Size(200, 23);
            this.txtMailAddr.TabIndex = 14;
            // 
            // lblCreatedAt
            // 
            this.lblCreatedAt.AutoSize = true;
            this.lblCreatedAt.Location = new System.Drawing.Point(430, 115);
            this.lblCreatedAt.Name = "lblCreatedAt";
            this.lblCreatedAt.Size = new System.Drawing.Size(70, 15);
            this.lblCreatedAt.TabIndex = 15;
            this.lblCreatedAt.Text = "作成日時";
            // 
            // txtCreatedAt
            // 
            this.txtCreatedAt.BackColor = System.Drawing.SystemColors.Control;
            this.txtCreatedAt.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtCreatedAt.Location = new System.Drawing.Point(520, 112);
            this.txtCreatedAt.Name = "txtCreatedAt";
            this.txtCreatedAt.ReadOnly = true;
            this.txtCreatedAt.Size = new System.Drawing.Size(120, 23);
            this.txtCreatedAt.TabIndex = 15;
            this.txtCreatedAt.Text = "##########";
            // 
            // lblUpdatedAt
            // 
            this.lblUpdatedAt.AutoSize = true;
            this.lblUpdatedAt.Location = new System.Drawing.Point(430, 143);
            this.lblUpdatedAt.Name = "lblUpdatedAt";
            this.lblUpdatedAt.Size = new System.Drawing.Size(70, 15);
            this.lblUpdatedAt.TabIndex = 16;
            this.lblUpdatedAt.Text = "更新日時";
            // 
            // txtUpdatedAt
            // 
            this.txtUpdatedAt.BackColor = System.Drawing.SystemColors.Control;
            this.txtUpdatedAt.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtUpdatedAt.Location = new System.Drawing.Point(520, 140);
            this.txtUpdatedAt.Name = "txtUpdatedAt";
            this.txtUpdatedAt.ReadOnly = true;
            this.txtUpdatedAt.Size = new System.Drawing.Size(120, 23);
            this.txtUpdatedAt.TabIndex = 16;
            this.txtUpdatedAt.Text = "##########";
            // 
            // lblUpdatedBy
            // 
            this.lblUpdatedBy.AutoSize = true;
            this.lblUpdatedBy.Location = new System.Drawing.Point(430, 171);
            this.lblUpdatedBy.Name = "lblUpdatedBy";
            this.lblUpdatedBy.Size = new System.Drawing.Size(70, 15);
            this.lblUpdatedBy.TabIndex = 17;
            this.lblUpdatedBy.Text = "更新者名";
            // 
            // txtUpdatedBy
            // 
            this.txtUpdatedBy.BackColor = System.Drawing.SystemColors.Control;
            this.txtUpdatedBy.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtUpdatedBy.Location = new System.Drawing.Point(520, 168);
            this.txtUpdatedBy.Name = "txtUpdatedBy";
            this.txtUpdatedBy.ReadOnly = true;
            this.txtUpdatedBy.Size = new System.Drawing.Size(80, 23);
            this.txtUpdatedBy.TabIndex = 17;
            this.txtUpdatedBy.Text = "管理者";
            // 
            // lblCloseDay
            // 
            this.lblCloseDay.AutoSize = true;
            this.lblCloseDay.Location = new System.Drawing.Point(30, 510);
            this.lblCloseDay.Name = "lblCloseDay";
            this.lblCloseDay.Size = new System.Drawing.Size(49, 15);
            this.lblCloseDay.TabIndex = 18;
            this.lblCloseDay.Text = "締め日";
            // 
            // txtCloseDay
            // 
            this.txtCloseDay.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtCloseDay.Location = new System.Drawing.Point(135, 507);
            this.txtCloseDay.Name = "txtCloseDay";
            this.txtCloseDay.Size = new System.Drawing.Size(50, 23);
            this.txtCloseDay.TabIndex = 18;
            this.txtCloseDay.Text = "31";
            // 
            // lblPayNextMonth
            // 
            this.lblPayNextMonth.AutoSize = true;
            this.lblPayNextMonth.Location = new System.Drawing.Point(30, 538);
            this.lblPayNextMonth.Name = "lblPayNextMonth";
            this.lblPayNextMonth.Size = new System.Drawing.Size(70, 15);
            this.lblPayNextMonth.TabIndex = 19;
            this.lblPayNextMonth.Text = "支払翌月";
            // 
            // txtPayNextMonth
            // 
            this.txtPayNextMonth.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtPayNextMonth.Location = new System.Drawing.Point(135, 535);
            this.txtPayNextMonth.Name = "txtPayNextMonth";
            this.txtPayNextMonth.Size = new System.Drawing.Size(50, 23);
            this.txtPayNextMonth.TabIndex = 19;
            this.txtPayNextMonth.Text = "1";
            // 
            // lblPayMethod
            // 
            this.lblPayMethod.AutoSize = true;
            this.lblPayMethod.Location = new System.Drawing.Point(30, 566);
            this.lblPayMethod.Name = "lblPayMethod";
            this.lblPayMethod.Size = new System.Drawing.Size(98, 15);
            this.lblPayMethod.TabIndex = 20;
            this.lblPayMethod.Text = "支払方法区分";
            // 
            // txtPayMethod
            // 
            this.txtPayMethod.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtPayMethod.Location = new System.Drawing.Point(135, 563);
            this.txtPayMethod.Name = "txtPayMethod";
            this.txtPayMethod.Size = new System.Drawing.Size(50, 23);
            this.txtPayMethod.TabIndex = 20;
            this.txtPayMethod.Text = "1";
            // 
            // lblCustPic
            // 
            this.lblCustPic.AutoSize = true;
            this.lblCustPic.Location = new System.Drawing.Point(30, 594);
            this.lblCustPic.Name = "lblCustPic";
            this.lblCustPic.Size = new System.Drawing.Size(98, 15);
            this.lblCustPic.TabIndex = 21;
            this.lblCustPic.Text = "取引先担当者";
            // 
            // txtCustPic
            // 
            this.txtCustPic.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtCustPic.Location = new System.Drawing.Point(135, 591);
            this.txtCustPic.Name = "txtCustPic";
            this.txtCustPic.Size = new System.Drawing.Size(150, 23);
            this.txtCustPic.TabIndex = 21;
            // 
            // lblDeptName
            // 
            this.lblDeptName.AutoSize = true;
            this.lblDeptName.Location = new System.Drawing.Point(30, 622);
            this.lblDeptName.Name = "lblDeptName";
            this.lblDeptName.Size = new System.Drawing.Size(56, 15);
            this.lblDeptName.TabIndex = 22;
            this.lblDeptName.Text = "部門名";
            // 
            // txtDeptName
            // 
            this.txtDeptName.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtDeptName.Location = new System.Drawing.Point(135, 619);
            this.txtDeptName.Name = "txtDeptName";
            this.txtDeptName.Size = new System.Drawing.Size(200, 23);
            this.txtDeptName.TabIndex = 22;
            // 
            // lblTel
            // 
            this.lblTel.AutoSize = true;
            this.lblTel.Location = new System.Drawing.Point(30, 650);
            this.lblTel.Name = "lblTel";
            this.lblTel.Size = new System.Drawing.Size(70, 15);
            this.lblTel.TabIndex = 23;
            this.lblTel.Text = "電話番号";
            // 
            // txtTel
            // 
            this.txtTel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtTel.Location = new System.Drawing.Point(135, 647);
            this.txtTel.Name = "txtTel";
            this.txtTel.Size = new System.Drawing.Size(150, 23);
            this.txtTel.TabIndex = 23;
            // 
            // lblFax
            // 
            this.lblFax.AutoSize = true;
            this.lblFax.Location = new System.Drawing.Point(30, 678);
            this.lblFax.Name = "lblFax";
            this.lblFax.Size = new System.Drawing.Size(70, 15);
            this.lblFax.TabIndex = 24;
            this.lblFax.Text = "FAX番号";
            // 
            // txtFax
            // 
            this.txtFax.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.txtFax.Location = new System.Drawing.Point(135, 675);
            this.txtFax.Name = "txtFax";
            this.txtFax.Size = new System.Drawing.Size(150, 23);
            this.txtFax.TabIndex = 24;
            // 
            // Form1
            // 
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(800, 700);
            this.Controls.Add(this.txtFax);
            this.Controls.Add(this.lblFax);
            this.Controls.Add(this.txtTel);
            this.Controls.Add(this.lblTel);
            this.Controls.Add(this.txtDeptName);
            this.Controls.Add(this.lblDeptName);
            this.Controls.Add(this.txtCustPic);
            this.Controls.Add(this.lblCustPic);
            this.Controls.Add(this.txtPayMethod);
            this.Controls.Add(this.lblPayMethod);
            this.Controls.Add(this.txtPayNextMonth);
            this.Controls.Add(this.lblPayNextMonth);
            this.Controls.Add(this.txtCloseDay);
            this.Controls.Add(this.lblCloseDay);
            this.Controls.Add(this.txtUpdatedBy);
            this.Controls.Add(this.lblUpdatedBy);
            this.Controls.Add(this.txtUpdatedAt);
            this.Controls.Add(this.lblUpdatedAt);
            this.Controls.Add(this.txtCreatedAt);
            this.Controls.Add(this.lblCreatedAt);
            this.Controls.Add(this.txtMailAddr);
            this.Controls.Add(this.lblMailAddr);
            this.Controls.Add(this.txtSirEmail);
            this.Controls.Add(this.lblSirEmail);
            this.Controls.Add(this.txtSirFax);
            this.Controls.Add(this.lblSirFax);
            this.Controls.Add(this.txtSirTel);
            this.Controls.Add(this.lblSirTel);
            this.Controls.Add(this.txtSirAddr2);
            this.Controls.Add(this.lblSirAddr2);
            this.Controls.Add(this.txtSirAddr1);
            this.Controls.Add(this.lblSirAddr1);
            this.Controls.Add(this.txtSirPref);
            this.Controls.Add(this.lblSirPref);
            this.Controls.Add(this.txtSirZip);
            this.Controls.Add(this.lblSirZip);
            this.Controls.Add(this.txtSirDept);
            this.Controls.Add(this.lblSirDept);
            this.Controls.Add(this.txtSirPic);
            this.Controls.Add(this.lblSirPic);
            this.Controls.Add(this.txtSirNameKana);
            this.Controls.Add(this.lblSirNameKana);
            this.Controls.Add(this.txtSirName);
            this.Controls.Add(this.lblSirName);
            this.Controls.Add(this.txtSirBranch);
            this.Controls.Add(this.lblSirBranch);
            this.Controls.Add(this.txtSirCode);
            this.Controls.Add(this.lblSirCode);
            this.Controls.Add(this.pnlHeader);
            this.Name = "Form1";
            this.Text = "仕入先マスタ";
            this.pnlHeader.ResumeLayout(false);
            this.pnlHeader.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        #endregion

        private System.Windows.Forms.Panel pnlHeader;
        private System.Windows.Forms.Label lblTitle;
        private System.Windows.Forms.Label lblSirCode;
        private System.Windows.Forms.TextBox txtSirCode;
        private System.Windows.Forms.Label lblSirBranch;
        private System.Windows.Forms.TextBox txtSirBranch;
        private System.Windows.Forms.Label lblSirName;
        private System.Windows.Forms.TextBox txtSirName;
        private System.Windows.Forms.Label lblSirNameKana;
        private System.Windows.Forms.TextBox txtSirNameKana;
        private System.Windows.Forms.Label lblSirPic;
        private System.Windows.Forms.TextBox txtSirPic;
        private System.Windows.Forms.Label lblSirDept;
        private System.Windows.Forms.TextBox txtSirDept;
        private System.Windows.Forms.Label lblSirZip;
        private System.Windows.Forms.TextBox txtSirZip;
        private System.Windows.Forms.Label lblSirPref;
        private System.Windows.Forms.TextBox txtSirPref;
        private System.Windows.Forms.Label lblSirAddr1;
        private System.Windows.Forms.TextBox txtSirAddr1;
        private System.Windows.Forms.Label lblSirAddr2;
        private System.Windows.Forms.TextBox txtSirAddr2;
        private System.Windows.Forms.Label lblSirTel;
        private System.Windows.Forms.TextBox txtSirTel;
        private System.Windows.Forms.Label lblSirFax;
        private System.Windows.Forms.TextBox txtSirFax;
        private System.Windows.Forms.Label lblSirEmail;
        private System.Windows.Forms.TextBox txtSirEmail;
        private System.Windows.Forms.Label lblMailAddr;
        private System.Windows.Forms.TextBox txtMailAddr;
        private System.Windows.Forms.Label lblCreatedAt;
        private System.Windows.Forms.TextBox txtCreatedAt;
        private System.Windows.Forms.Label lblUpdatedAt;
        private System.Windows.Forms.TextBox txtUpdatedAt;
        private System.Windows.Forms.Label lblUpdatedBy;
        private System.Windows.Forms.TextBox txtUpdatedBy;
        private System.Windows.Forms.Label lblCloseDay;
        private System.Windows.Forms.TextBox txtCloseDay;
        private System.Windows.Forms.Label lblPayNextMonth;
        private System.Windows.Forms.TextBox txtPayNextMonth;
        private System.Windows.Forms.Label lblPayMethod;
        private System.Windows.Forms.TextBox txtPayMethod;
        private System.Windows.Forms.Label lblCustPic;
        private System.Windows.Forms.TextBox txtCustPic;
        private System.Windows.Forms.Label lblDeptName;
        private System.Windows.Forms.TextBox txtDeptName;
        private System.Windows.Forms.Label lblTel;
        private System.Windows.Forms.TextBox txtTel;
        private System.Windows.Forms.Label lblFax;
        private System.Windows.Forms.TextBox txtFax;
    }
}

Form1.cs
Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

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


作成された画面の画像

image.png

📈 効果測定

定量的な効果

作業時間の削減

作業 改善前 改善後 削減時間
コントロール配置 15分 1分 14分
プロパティ設定 10分 2分 8分
定義書との確認 5分 2分 3分
合計 30分 5分 25分(83%削減)

年間削減効果の試算

年間削減効果の試算
1画面あたりの削減時間: 25分
月間画面作成数: 5画面
年間実施回数: 5画面 × 12ヶ月 = 60画面

年間削減時間: 60画面 × 25分 = 1,500分 = 25時間
             = 約3日分の工数削減

定性的な効果

  • 定義書とコードの一致率向上

    • 定義書をそのまま入力にするため乖離が起きにくい
  • 命名規則の統一

    • プロンプトで規則を指定するため担当者によるブレがなくなる
  • コードレビューの効率化

    • 生成コードが一定パターンになり、レビューしやすくなる

🚀 導入方法

導入の流れ

  1. 準備フェーズ(1時間)

    • プロンプトテンプレートを整備する
    • 画面定義書のMDフォーマットを決める
    • 既存画面で試してみる
  2. 実装フェーズ(画面ごと)

    • 画面定義書をMD表形式で作成
    • Copilotにプロンプト+定義書を貼り付け
    • 生成コードをレビュー・微調整
  3. 展開フェーズ

    • チームメンバーにプロンプトテンプレートを共有
    • フィードバックをもとにプロンプトを改善

必要なリソース

技術リソース

  • GitHub Copilot:

時間リソース

  • 初期導入: 約 1時間(プロンプト整備)
  • 学習期間: 約 2〜3時間
  • メンテナンス: ほぼなし

⚠️ 留意点・制約事項

技術的な制約

  1. 複雑なレイアウトは手修正が必要

    • 内容: ネストしたパネルや複雑な配置は生成精度が落ちる
    • 対策: シンプルなコントロール単位で生成して組み合わせる
  2. プロンプト品質に依存する

    • 内容: 定義書の書き方が曖昧だと生成結果がブレる
    • 対策: フォーマットを統一したテンプレートを使う
  3. 既存WinFormの修正には適していない可能性がある

    • 内容: 新規画面のゼロから生成には向いているが、既存コードへの部分的な追加・修正は未検証
    • 対策: 既存画面の修正は従来通り手動で行い、新規画面作成時にのみ本手法を適用する

想定されるリスクと対策

リスク 影響度 発生確率 対策
生成コードの品質不足 必ずレビューを実施
プロンプトの陳腐化 定期的に見直す
Copilotの仕様変更 テンプレートを更新

こんな場合は不向き

  • ❌ 複雑なカスタムコントロールを多用する画面
  • ❌ アニメーションや動的レイアウトが多い画面
  • ❌ 定義書を書かずに画面を作るケース
  • ❌ 既存画面への変更(既存の.designer.csに部分的に手を加えるケースは未検証・手動対応を推奨)

💬 まとめ

この改善で実現できること

  • ✅ 画面定義書からWinFormコードを数分で生成
  • ✅ 定義書とコードの乖離を防ぐ
  • ✅ 命名規則・実装パターンの統一

学んだこと・気づき

  1. AIへの入力品質が出力品質を決める

    • 定義書のフォーマットを統一するほど生成精度が上がる
  2. ゼロから書くよりレビューする方が速い

    • 生成コードのレビューに集中できるため認知負荷が下がる
  3. 上流工程(定義書)の質が自動化の恩恵を左右する

    • 定義書をしっかり書く文化がそのまま自動化の効果につながる
  4. WindowsForm開発業務でも生成AIを活用できる

    • モダンなWeb開発だけでなく、レガシーな業務系システム開発でも生成AIは十分活用できる
    • 「AIはWeb・クラウド向け」という先入観を捨てることが重要

推奨する人

  • ✅ WinForm画面を繰り返し作成している開発者
  • ✅ 画面定義書→実装の工数を削減したい方
  • ✅ GitHub Copilotをコード補完以外に活用したい方

最後に

「WinFormはレガシーだから生成AIは関係ない」と思っていませんか?

GUIデザイナーのドラッグ&ドロップは確かに生成AIと相性が悪い。しかし、.designer.csを直接生成するコードファーストのアプローチなら、WinFormでも生成AIは十分活用できます。

モダンなWeb開発だけが生成AIの舞台ではありません。業務系レガシーシステムこそ、繰り返し作業が多く、生成AIの恩恵を受けやすい領域です。まずは既存の画面1つで試してみることをお勧めします。

補足:
GitHub Copilotは補助ツールとして活用し、最終的な品質確認は必ず人によるレビューとの併用をお勧めします。

📚 参考資料

公式ドキュメント

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?