+++ /dev/null
-using System;\r
-using System.Collections.Generic;\r
-using System.Text;\r
-using System.Windows.Forms;\r
-using System.ComponentModel;\r
-using DTXCreator.Properties;\r
-using FDK;\r
-\r
-namespace DTXCreator.譜面\r
-{\r
- public partial class C置換ダイアログ : Form\r
- {\r
- public bool b単純置換RadioButtonがチェックされている\r
- {\r
- get\r
- {\r
- return this.radioButton単純置換.Checked;\r
- }\r
- }\r
- public bool b表裏反転RadioButtonがチェックされている\r
- {\r
- get\r
- {\r
- return this.radioButton表裏反転.Checked;\r
- }\r
- }\r
- public int n元番号\r
- {\r
- get\r
- {\r
- if( ( this.textBox元番号.Text.Length != 1 ) && ( this.textBox元番号.Text.Length != 2 ) )\r
- {\r
- return -1;\r
- }\r
- string text = this.textBox元番号.Text;\r
- if( text.Length == 1 )\r
- {\r
- text = "0" + text;\r
- }\r
- return C変換.n36進数2桁の文字列を数値に変換して返す( text );\r
- }\r
- set\r
- {\r
- this.textBox元番号.Text = C変換.str数値を36進数2桁に変換して返す( value );\r
- }\r
- }\r
- public int n先番号\r
- {\r
- get\r
- {\r
- if( ( this.textBox先番号.Text.Length != 1 ) && ( this.textBox先番号.Text.Length != 2 ) )\r
- {\r
- return -1;\r
- }\r
- string text = this.textBox先番号.Text;\r
- if( text.Length == 1 )\r
- {\r
- text = "0" + text;\r
- }\r
- return C変換.n36進数2桁の文字列を数値に変換して返す( text );\r
- }\r
- }\r
-\r
- public C置換ダイアログ()\r
- {\r
- this.InitializeComponent();\r
- this.radioButton単純置換.Select();\r
- this.textBox元番号.Focus();\r
- }\r
-\r
- private void C置換ダイアログ_FormClosing( object sender, FormClosingEventArgs e )\r
- {\r
- if( ( base.DialogResult == DialogResult.OK ) && this.b単純置換RadioButtonがチェックされている )\r
- {\r
- if( this.n元番号 < 0 )\r
- {\r
- MessageBox.Show( Resources.strチップ番号に誤りがありますMSG + Environment.NewLine + "'" + this.textBox元番号.Text + "'", Resources.strエラーダイアログのタイトル, MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1 );\r
- this.textBox元番号.Focus();\r
- this.textBox元番号.SelectAll();\r
- e.Cancel = true;\r
- }\r
- else if( this.n先番号 < 0 )\r
- {\r
- MessageBox.Show( Resources.strチップ番号に誤りがありますMSG + Environment.NewLine + "'" + this.textBox先番号.Text + "'", Resources.strエラーダイアログのタイトル, MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1 );\r
- this.textBox先番号.Focus();\r
- this.textBox先番号.SelectAll();\r
- e.Cancel = true;\r
- }\r
- }\r
- }\r
- private void radioButton単純置換_KeyDown( object sender, KeyEventArgs e )\r
- {\r
- if( e.KeyCode == Keys.Return )\r
- {\r
- this.button置換.PerformClick();\r
- }\r
- else if( e.KeyCode == Keys.Escape )\r
- {\r
- this.buttonキャンセル.PerformClick();\r
- }\r
- }\r
- private void radioButton表裏反転_KeyDown( object sender, KeyEventArgs e )\r
- {\r
- if( e.KeyCode == Keys.Return )\r
- {\r
- this.button置換.PerformClick();\r
- }\r
- else if( e.KeyCode == Keys.Escape )\r
- {\r
- this.buttonキャンセル.PerformClick();\r
- }\r
- }\r
- private void textBox元番号_KeyDown( object sender, KeyEventArgs e )\r
- {\r
- if( e.KeyCode == Keys.Return )\r
- {\r
- this.button置換.PerformClick();\r
- }\r
- else if( e.KeyCode == Keys.Escape )\r
- {\r
- this.buttonキャンセル.PerformClick();\r
- }\r
- }\r
- private void textBox先番号_KeyDown( object sender, KeyEventArgs e )\r
- {\r
- if( e.KeyCode == Keys.Return )\r
- {\r
- this.button置換.PerformClick();\r
- }\r
- else if( e.KeyCode == Keys.Escape )\r
- {\r
- this.buttonキャンセル.PerformClick();\r
- }\r
- }\r
- }\r
-}\r