マスタエディタ:GUIのチェックエラーをxmlタグに置き換え。あとはMRCメッセージの英語を登録するだけ。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@197 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
nishikawa_takeshi 2009-03-03 10:21:49 +00:00
parent b27db67cff
commit a73cd51f7b
11 changed files with 106 additions and 83 deletions

View File

@ -4438,7 +4438,7 @@ private: System::Windows::Forms::Label^ labCountryCodeL;
// フォーム入力が正しいか書き込み前チェック
void checkRatingForms( System::Boolean inRegion,
System::Windows::Forms::ComboBox ^comb, System::String ^msg );
System::Windows::Forms::ComboBox ^comb, System::String ^ogn );
// クリアする
void clearRating( System::Windows::Forms::ComboBox ^comb );
@ -4467,19 +4467,14 @@ private: System::Windows::Forms::Label^ labCountryCodeL;
// ----------------------------------------------
// テキスト入力がされているかチェック
System::Boolean checkTextForm( System::String ^formtext,
System::String ^labelJ, System::String ^labelE, System::Boolean affectRom );
System::Boolean checkTextForm( System::String ^formtext, System::String ^tag );
// 数値入力が正常かどうかチェック
System::Boolean checkNumRange(
System::Int32 val, System::Int32 min, System::Int32 max,
System::String ^labelJ, System::String ^labelE, System::Boolean affectRom );
System::Boolean checkNumRange( System::Int32 val, System::Int32 min, System::Int32 max, System::String ^tag );
System::Boolean checkNumRange( System::String ^strval, System::Int32 min, System::Int32 max, System::String ^tag );
System::Boolean checkNumRange( System::String ^strval, System::Int32 min, System::Int32 max,
System::String ^labelJ, System::String ^labelE, System::Boolean affectRom );
// コンボボックスをチェック
System::Boolean checkBoxIndex( System::Windows::Forms::ComboBox ^box,
System::String ^labelJ, System::String ^labelE, System::Boolean affectRom );
System::Boolean checkComboBoxIndex( System::Windows::Forms::ComboBox ^box, System::String ^tag, System::Boolean isAffectRom );
// -----------------------------------------------------------------
// 提出情報(SRLに影響しない箇所のみ)とフォーム間のデータのやりとり
@ -4564,6 +4559,10 @@ private: System::Windows::Forms::Label^ labCountryCodeL;
// エラー情報の登録
// --------------------------------------------------------
// ƒGƒ‰<C692>[<5B>î•ñÌ<E2809A>ì<EFBFBD>¬
RCMrcError^ makeErrorMsg(
System::Boolean isAffectRom, System::String ^labeltag, System::String ^msgtag, ... cli::array<System::String^> ^args );
// 読み込み時エラーの登録
void setGridError( void );
void setGridWarn( void );

View File

@ -288,60 +288,50 @@ System::Boolean Form1::checkDeliverableForms(void)
// 不正な場合はダイアログで注意してreturn
// 提出情報
this->checkTextForm( this->tboxProductName->Text, LANG_PRODUCT_NAME_J, LANG_PRODUCT_NAME_E, false ); // SRL作成には問題のないエラー
this->checkTextForm( this->tboxProductCode1->Text, LANG_PRODUCT_CODE_J, LANG_PRODUCT_CODE_E, false );
this->checkTextForm( this->tboxProductCode2->Text, LANG_PRODUCT_CODE_J, LANG_PRODUCT_CODE_E, false );
this->checkTextForm( this->tboxProductName->Text, "LabelProductName" ); // SRL作成には問題のないエラー
this->checkTextForm( this->tboxProductCode1->Text, "LabelProductCode" );
this->checkTextForm( this->tboxProductCode2->Text, "LabelProductCode" );
this->checkComboBoxIndex( this->combCountryCode, "LabelCountryCode", false );
if( this->cboxReleaseForeign->Checked == true )
{
this->checkTextForm( this->tboxProductNameForeign->Text, LANG_PRODUCT_NAME_F_J, LANG_PRODUCT_NAME_F_E, false );
this->checkTextForm( this->tboxProductCode1Foreign->Text, LANG_PRODUCT_CODE_F_J, LANG_PRODUCT_CODE_F_E, false );
this->checkTextForm( this->tboxProductCode2Foreign1->Text, LANG_PRODUCT_CODE_F_J, LANG_PRODUCT_CODE_F_E, false );
this->checkTextForm( this->tboxProductNameForeign->Text, "LabelProductNameForeign" );
this->checkTextForm( this->tboxProductCode1Foreign->Text, "LabelProductCodeForeign" );
this->checkTextForm( this->tboxProductCode2Foreign1->Text,"LabelProductCodeForeign" );
}
if( this->rUsageOther->Checked == true )
{
this->checkTextForm( this->tboxUsageOther->Text, LANG_USAGE_J, LANG_USAGE_E, false );
this->checkTextForm( this->tboxUsageOther->Text, "LabelUsage" );
}
this->checkBoxIndex( this->combCountryCode, LANG_PRODUCT_CODE_J, LANG_PRODUCT_CODE_E, false );
// 会社情報
this->checkTextForm( this->tboxPerson1->Text, LANG_PERSON_J, LANG_PERSON_E, false );
this->checkTextForm( this->tboxCompany1->Text, LANG_COMPANY_J, LANG_COMPANY_E, false );
this->checkTextForm( this->tboxDepart1->Text, LANG_DEPART_J, LANG_DEPART_E, false );
this->checkTextForm( this->tboxPerson1->Text, "LabelPerson1" );
this->checkTextForm( this->tboxCompany1->Text, "LabelCompany1" );
this->checkTextForm( this->tboxDepart1->Text, "LabelDepart2" );
if( this->isJapanese() == true )
{
this->checkTextForm( this->tboxFurigana1->Text, LANG_FURIGANA_J, LANG_FURIGANA_J, false );
this->checkTextForm( this->tboxFurigana1->Text, "LabelFurigana1" );
}
this->checkTextForm( this->tboxTel1->Text, LANG_TEL_J, LANG_TEL_E, false );
//this->checkTextForm( this->tboxFax1->Text, LANG_FAX_J, LANG_FAX_E, false );
this->checkTextForm( this->tboxMail1->Text, LANG_MAIL_J, LANG_MAIL_E, false );
//if( this->isJapanese() == true )
//{
// this->checkTextForm( this->tboxNTSC1->Text, LANG_NTSC_1_J + " " + LANG_NTSC_2_J, LANG_NTSC_1_J + " " + LANG_NTSC_2_J, false );
//}
this->checkTextForm( this->tboxTel1->Text, "LabelTel1" );
this->checkTextForm( this->tboxMail1->Text, "LabelMail1" );
if( this->cboxIsInputPerson2->Checked == true )
{
this->checkTextForm( this->tboxPerson2->Text, LANG_PERSON_J, LANG_PERSON_E, false );
this->checkTextForm( this->tboxCompany2->Text, LANG_COMPANY_J, LANG_COMPANY_E, false );
this->checkTextForm( this->tboxDepart2->Text, LANG_DEPART_J, LANG_DEPART_E, false );
this->checkTextForm( this->tboxPerson2->Text, "LabelPerson2" );
this->checkTextForm( this->tboxCompany2->Text, "LabelCompany2" );
this->checkTextForm( this->tboxDepart2->Text, "LabelDepart2" );
if( this->isJapanese() == true )
{
this->checkTextForm( this->tboxFurigana2->Text, LANG_FURIGANA_J, LANG_FURIGANA_J, false );
this->checkTextForm( this->tboxFurigana2->Text, "LabelFurigana2" );
}
this->checkTextForm( this->tboxTel2->Text, LANG_TEL_J, LANG_TEL_E, false );
//this->checkTextForm( this->tboxFax2->Text, LANG_FAX_J, LANG_FAX_E, false );
this->checkTextForm( this->tboxMail2->Text, LANG_MAIL_J, LANG_MAIL_E, false );
//if( this->isJapanese() == true )
//{
// this->checkTextForm( this->tboxNTSC2->Text, LANG_NTSC_1_J + " " + LANG_NTSC_2_J, LANG_NTSC_1_J + " " + LANG_NTSC_2_J, false );
//}
this->checkTextForm( this->tboxTel2->Text, "LabelTel2" );
this->checkTextForm( this->tboxMail2->Text, "LabelMail2" );
}
// 一部のROM情報(SRLバイナリに反映されない情報)をここでチェックする
this->checkBoxIndex( this->combBackup, LANG_BACKUP_J, LANG_BACKUP_E, false );
this->checkComboBoxIndex( this->combBackup, "LabelBackup", false );
if( this->combBackup->SelectedIndex == (this->combBackup->Items->Count - 1) )
{
this->checkTextForm( this->tboxBackupOther->Text, LANG_BACKUP_J, LANG_BACKUP_E, false );
this->checkTextForm( this->tboxBackupOther->Text, "LabelBackup" );
}
// ひととおりエラー登録をした後で

View File

@ -435,6 +435,22 @@ void MasterEditorTWL::Form1::changeLanguage( System::String ^langname )
this->unnecessaryRating( this->combOFLC );
}
// 日本語のみの入力項目
if( langname->StartsWith("ja") )
{
this->tboxFurigana1->Enabled = true;
this->tboxNTSC1->Enabled = true;
this->tboxFurigana2->Enabled = true;
this->tboxNTSC2->Enabled = true;
}
else
{
this->tboxFurigana1->Enabled = false;
this->tboxNTSC1->Enabled = false;
this->tboxFurigana2->Enabled = false;
this->tboxNTSC2->Enabled = false;
}
// 複数行表示の改行を挿入
this->tboxGuideRomEditInfo->Text = this->tboxGuideRomEditInfo->Text->Replace( "<newline>", "\r\n" );
this->tboxGuideNandSizeInfo->Text = this->tboxGuideNandSizeInfo->Text->Replace( "<newline>", "\r\n" );

View File

@ -269,7 +269,7 @@ void Form1::changeUnnecessaryRatingForms( System::Boolean bInitial )
}
// ペアレンタルコントロール関連のフォーム入力が正しいか書き込み前チェック
void Form1::checkRatingForms( System::Boolean inRegion, System::Windows::Forms::ComboBox ^comb, System::String ^msg )
void Form1::checkRatingForms( System::Boolean inRegion, System::Windows::Forms::ComboBox ^comb, System::String ^ogn )
{
// リージョンに含まれていないとき: 0クリアが保証されるのでチェック必要なし
if( !inRegion )
@ -278,22 +278,13 @@ void Form1::checkRatingForms( System::Boolean inRegion, System::Windows::Forms::
// 設定されていないときエラー
if( (comb->SelectedIndex < 0) || (comb->SelectedIndex >= comb->Items->Count) )
{
this->hErrorList->Add( gcnew RCMrcError(
"ペアレンタルコントロール情報", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE,
msg + ": レーティングを選択してください。",
"Parental Control",
msg + ": Please set rating.", true, true ) );
this->hErrorList->Add( this->makeErrorMsg(true, "LabelRating", "RatingInput", ogn) );
}
// 審査中のとき警告
if( comb->SelectedIndex == (comb->Items->Count - 1) )
{
this->hWarnList->Add( gcnew RCMrcError(
"ペアレンタルコントロール情報", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE,
msg + ": 審査中指定がされています。審査が決まりしだい、再提出してください。",
"Parental Control",
msg + ": In your selection, no rating yet. Please submit again when rating is dicided.",
true, true ) );
this->hWarnList->Add( this->makeErrorMsg(true, "LabelRating", "RatingPendingSelect", ogn) );
}
} //checkRatingForms()

View File

@ -327,7 +327,7 @@ void Form1::setSrlFormsTextBox()
System::Boolean Form1::checkSrlForms(void)
{
// リージョン
if( this->checkBoxIndex( this->combRegion, LANG_REGION_J, LANG_REGION_E, true ) == false )
if( this->checkComboBoxIndex( this->combRegion, "LabelRegion", true ) == false )
return false;
// リージョンを決める
@ -381,12 +381,7 @@ System::Boolean Form1::checkSrlForms(void)
// ペアレンタルコントロール
if( this->cboxIsUnnecessaryRating->Checked )
{
this->hWarnList->Add( gcnew RCMrcError(
"ペアレンタルコントロール情報", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE,
"レーティング表示が不要であると指定されています。この指定は、ソフトがゲームでないツール類のときのみ選択可能です。レーティング表示が不要であるかどうかは弊社窓口にご相談ください。",
"Parental Control",
"In your selection, rating is unnecessary. This selection is available for only tool application which is not game. Please contact Nintendo for checking validation of this selection",
true, true ) );
this->hWarnList->Add( this->makeErrorMsg(true, "LabelRating", "RatingUnnecessarySelect") );
}
else
{

View File

@ -22,57 +22,58 @@ using namespace MasterEditorTWL;
// ----------------------------------------------
// テキスト入力がされているかチェック
System::Boolean Form1::checkTextForm( System::String ^formtext, System::String ^labelJ, System::String ^labelE, System::Boolean affectRom )
System::Boolean Form1::checkTextForm( System::String ^formtext, System::String ^tag )
{
System::String ^msgJ = gcnew System::String( "入力されていません。" );
System::String ^msgE = gcnew System::String( "No item is set. Please retry to input." );
System::String ^tmp = formtext->Replace( " ", "" ); // スペースのみの文字列もエラー
if( (formtext == nullptr) || formtext->Equals("") || tmp->Equals("") )
{
this->hErrorList->Add( gcnew RCMrcError( labelJ, METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE, msgJ, labelE, msgE, true, affectRom ) );
System::String ^labelJ = this->hMsg->getMessage(tag,"J");
System::String ^labelE = this->hMsg->getMessage(tag,"E");
System::String ^msgJ = this->hMsg->getMessage("TextBoxInput", "J");
System::String ^msgE = this->hMsg->getMessage("TextBoxInput", "E");
this->hErrorList->Add( gcnew RCMrcError( labelJ, 0, 0, msgJ, labelE, msgE, true, false ) );
return false;
}
return true;
}
// 数値入力が正常かどうかチェック
System::Boolean Form1::checkNumRange(
System::Int32 val, System::Int32 min, System::Int32 max, System::String ^labelJ, System::String ^labelE, System::Boolean affectRom )
System::Boolean Form1::checkNumRange( System::Int32 val, System::Int32 min, System::Int32 max, System::String ^tag )
{
System::String ^msgJ = gcnew System::String( "値の範囲が不正です。やり直してください。" );
System::String ^msgE = gcnew System::String( "Invalidate range of value. Please retry." );
if( (val < min) || (max < val) )
{
this->hErrorList->Add( gcnew RCMrcError( labelJ, METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE, msgJ, labelE, msgE, true, affectRom ) );
System::String ^labelJ = this->hMsg->getMessage(tag,"J");
System::String ^labelE = this->hMsg->getMessage(tag,"E");
System::String ^msgJ = this->hMsg->getMessage("NumRangeInput", "J");
System::String ^msgE = this->hMsg->getMessage("NumRangeInput", "E");
this->hErrorList->Add( gcnew RCMrcError( labelJ, 0, 0, msgJ, labelE, msgE, true, false ) );
return false;
}
return true;
}
System::Boolean Form1::checkNumRange( System::String ^strval, System::Int32 min, System::Int32 max,
System::String ^labelJ, System::String ^labelE, System::Boolean affectRom )
System::Boolean Form1::checkNumRange( System::String ^strval, System::Int32 min, System::Int32 max, System::String ^tag )
{
try
{
System::Int32 i = System::Int32::Parse(strval);
return (this->checkNumRange( i, min, max, labelJ, labelE, affectRom ));
return (this->checkNumRange( i, min, max, tag ));
}
catch ( System::FormatException ^ex )
{
(void)ex;
return (this->checkNumRange( max+1, min, max, labelJ, labelE, affectRom )); // 必ず失敗するように max+1 を検査
return (this->checkNumRange( max+1, min, max, tag )); // 必ず失敗するように max+1 を検査
}
}
// コンボボックスをチェック
System::Boolean Form1::checkBoxIndex( System::Windows::Forms::ComboBox ^box, System::String ^labelJ, System::String ^labelE, System::Boolean affectRom )
System::Boolean Form1::checkComboBoxIndex( System::Windows::Forms::ComboBox ^box, System::String ^tag, System::Boolean isAffectRom )
{
System::String ^msgJ = gcnew System::String( "選択されていません。" );
System::String ^msgE = gcnew System::String( "One item is not selected." );
if( box->SelectedIndex < 0 )
{
System::String ^labelJ = this->hMsg->getMessage(tag,"J");
System::String ^labelE = this->hMsg->getMessage(tag,"E");
System::String ^msgJ = this->hMsg->getMessage("ComboBoxInput", "J");
System::String ^msgE = this->hMsg->getMessage("ComboBoxInput", "E");
this->hErrorList->Add( gcnew RCMrcError(
labelJ, METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE, msgJ, labelE, msgE, true, affectRom ) );
labelJ, 0, 0, msgJ, labelE, msgE, true, isAffectRom ) );
}
return true;
}
@ -82,6 +83,21 @@ System::Boolean Form1::checkBoxIndex( System::Windows::Forms::ComboBox ^box, Sys
// エラー情報の登録
// --------------------------------------------------------
// エラー情報の作成
RCMrcError^ Form1::makeErrorMsg( System::Boolean isAffectRom, System::String ^labeltag, System::String ^msgtag, ... cli::array<System::String^> ^args )
{
// 外部ファイルから項目名を取得
System::String ^nameJ = this->hMsg->getMessage( labeltag, "J" );
System::String ^nameE = this->hMsg->getMessage( labeltag, "E" );
// メッセージを取得
System::String ^fmtJ = this->hMsg->getMessage( msgtag, "J" ); // メッセージファイルから書式を取得
System::String ^msgJ = System::String::Format( fmtJ, args ); // 書式をStringに展開
System::String ^fmtE = this->hMsg->getMessage( msgtag, "E" );
System::String ^msgE = System::String::Format( fmtE, args );
return (gcnew RCMrcError( nameJ, 0, 0, msgJ, nameE, msgE, true, isAffectRom ));
}
// 読み込み時エラーの登録
void Form1::setGridError( void )
{

View File

@ -86,18 +86,26 @@ Exception:{0}
<LabelProductCode>Product Code</LabelProductCode>
<LabelCountryCode>Product Code(Region Code)</LabelCountryCode>
<LabelProductNameForeign>Product Name(Roreign Version)</LabelProductNameForeign>
<LabelProductNameForeign>Product Code(Roreign Version)</LabelProductNameForeign>
<LabelProductCodeForeign>Product Code(Roreign Version)</LabelProductCodeForeign>
<LabelUsage>Usage</LabelUsage>
<LabelBackup>Backup Memory</LabelBackup>
<LabelPerson1>Contact1</LabelPerson1>
<LabelFurigana1>Furigana</LabelFurigana1>
<LabelCompany1>Company(Contact1)</LabelCompany1>
<LabelDepart1>Dept.(Contact1)</LabelDepart1>
<LabelTel1>TEL(Contact1)</LabelTel1>
<LabelMail1>e-mail(Contact1)</LabelMail1>
<LabelPerson2>Contact2</LabelPerson2>
<LabelFurigana2>Furigana</LabelFurigana2>
<LabelCompany2>Company(Contact2)</LabelCompany2>
<LabelDepart2>Dept.(Contact2)</LabelDepart2>
<LabelTel2>TEL(Contact2)</LabelTel2>
<LabelMail2>e-mail(Contact2)</LabelMail2>
<LabelRegion>Market</LabelRegion>
<LabelRating>Rating</LabelRating>
<RatingInput>{0}: Select data.</RatingInput>
<RatingPendingSelect>{0}: "Rating Pending" has been specified. Re-submit when examination is finished.</RatingPendingSelect>
<RatingUnnecessarySelect>Selected if rating does not need to be shown. This choice can only be selected when the software is a kind of tool and not a game. Contact support@noa.com to determine if the rating does not need to be displayed.</RatingUnnecessarySelect>
</message>

View File

@ -86,18 +86,26 @@
<LabelProductCode>製品コード</LabelProductCode>
<LabelCountryCode>製品コード(仕向地仕様コード)</LabelCountryCode>
<LabelProductNameForeign>製品名(海外版)</LabelProductNameForeign>
<LabelProductNameForeign>製品コード(海外版)</LabelProductNameForeign>
<LabelProductCodeForeign>製品コード(海外版)</LabelProductCodeForeign>
<LabelUsage>目的</LabelUsage>
<LabelBackup>バックアップメモリ</LabelBackup>
<LabelPerson1>ご氏名(担当者1)</LabelPerson1>
<LabelFurigana1>ふりがな(担当者1)</LabelFurigana1>
<LabelCompany1>貴社名(担当者1)</LabelCompany1>
<LabelDepart1>部署名(担当者1)</LabelDepart1>
<LabelTel1>TEL(担当者1)</LabelTel1>
<LabelMail1>e-mail(担当者1)</LabelMail1>
<LabelPerson2>ご氏名(担当者2)</LabelPerson2>
<LabelFurigana2>ふりがな(担当者2)</LabelFurigana2>
<LabelCompany2>貴社名(担当者2)</LabelCompany2>
<LabelDepart2>部署名(担当者2)</LabelDepart2>
<LabelTel2>TEL(担当者2)</LabelTel2>
<LabelMail2>e-mail(担当者2)</LabelMail2>
<LabelRegion>リージョン</LabelRegion>
<LabelRating>レーティング</LabelRating>
<RatingInput>{0}: 選択してください。</RatingInput>
<RatingPendingSelect>{0}: 審査中であると指定されています。審査が決まりしだい、再提出してください。</RatingPendingSelect>
<RatingUnnecessarySelect>レーティング表示が不要であると設定されています。この指定は、ソフトがゲームでないツール類のときのみ選択可能です。レーティング表示が不要であるかどうかは弊社窓口にご相談ください。</RatingUnnecessarySelect>
</message>