用途の選択を提出確認書に反映させる。tmpファイルも同様。用途の選択可能なラジオボタンをROMメディアに応じてマスキング。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@419 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
nishikawa_takeshi 2009-10-27 12:27:14 +00:00
parent 6d43083a21
commit 90bed8ce5c
10 changed files with 1587 additions and 1386 deletions

View File

@ -3844,6 +3844,7 @@ private: System::Windows::Forms::RadioButton^ rPurposeZone;
this->rPurposeDSStation->Name = L"rPurposeDSStation";
this->rPurposeDSStation->TabStop = true;
this->rPurposeDSStation->UseVisualStyleBackColor = true;
this->rPurposeDSStation->CheckedChanged += gcnew System::EventHandler(this, &Form1::rPurposeDSStation_CheckedChanged);
//
// rPurposeZone
//
@ -3855,6 +3856,7 @@ private: System::Windows::Forms::RadioButton^ rPurposeZone;
this->rPurposeZone->Name = L"rPurposeZone";
this->rPurposeZone->TabStop = true;
this->rPurposeZone->UseVisualStyleBackColor = true;
this->rPurposeZone->CheckedChanged += gcnew System::EventHandler(this, &Form1::rPurposeZone_CheckedChanged);
//
// rPurposeDSiWare
//
@ -3866,6 +3868,7 @@ private: System::Windows::Forms::RadioButton^ rPurposeZone;
this->rPurposeDSiWare->Name = L"rPurposeDSiWare";
this->rPurposeDSiWare->TabStop = true;
this->rPurposeDSiWare->UseVisualStyleBackColor = true;
this->rPurposeDSiWare->CheckedChanged += gcnew System::EventHandler(this, &Form1::rPurposeDSiWare_CheckedChanged);
//
// tboxPurposeOther
//
@ -3884,8 +3887,8 @@ private: System::Windows::Forms::RadioButton^ rPurposeZone;
this->rPurposeOther->BackgroundImage = nullptr;
this->rPurposeOther->Font = nullptr;
this->rPurposeOther->Name = L"rPurposeOther";
this->rPurposeOther->TabStop = true;
this->rPurposeOther->UseVisualStyleBackColor = true;
this->rPurposeOther->CheckedChanged += gcnew System::EventHandler(this, &Form1::rPurposeOther_CheckedChanged);
//
// gboxPurposeCard
//
@ -3911,6 +3914,7 @@ private: System::Windows::Forms::RadioButton^ rPurposeZone;
this->rPurposeCardProduction->Name = L"rPurposeCardProduction";
this->rPurposeCardProduction->TabStop = true;
this->rPurposeCardProduction->UseVisualStyleBackColor = true;
this->rPurposeCardProduction->CheckedChanged += gcnew System::EventHandler(this, &Form1::rPurposeCardProduction_CheckedChanged);
//
// rPurposeCardDistribution
//
@ -3921,6 +3925,7 @@ private: System::Windows::Forms::RadioButton^ rPurposeZone;
this->rPurposeCardDistribution->Font = nullptr;
this->rPurposeCardDistribution->Name = L"rPurposeCardDistribution";
this->rPurposeCardDistribution->UseVisualStyleBackColor = true;
this->rPurposeCardDistribution->CheckedChanged += gcnew System::EventHandler(this, &Form1::rPurposeCardDistribution_CheckedChanged);
//
// rPurposeCardKiosk
//
@ -3931,6 +3936,7 @@ private: System::Windows::Forms::RadioButton^ rPurposeZone;
this->rPurposeCardKiosk->Font = nullptr;
this->rPurposeCardKiosk->Name = L"rPurposeCardKiosk";
this->rPurposeCardKiosk->UseVisualStyleBackColor = true;
this->rPurposeCardKiosk->CheckedChanged += gcnew System::EventHandler(this, &Form1::rPurposeCardKiosk_CheckedChanged);
//
// labProductNameLimit
//
@ -4584,6 +4590,113 @@ private: System::Windows::Forms::RadioButton^ rPurposeZone;
return ret;
}
// "用途"の項目で1つのラジオボタンしか押されないようにする
// (本来はグループボックスが自動的に処理してくれるが, グループボックスが複数あるためグループボックスをまたいだ排他処理が必要)
void changePurposeForms(System::Windows::Forms::RadioButton ^rbut)
{
// イベントが発生しないようにイベントを無効にする
this->rPurposeCardProduction->CheckedChanged -= gcnew System::EventHandler(this, &Form1::rPurposeCardProduction_CheckedChanged);
this->rPurposeCardDistribution->CheckedChanged -= gcnew System::EventHandler(this, &Form1::rPurposeCardDistribution_CheckedChanged);
this->rPurposeCardKiosk->CheckedChanged -= gcnew System::EventHandler(this, &Form1::rPurposeCardKiosk_CheckedChanged);
this->rPurposeDSiWare->CheckedChanged -= gcnew System::EventHandler(this, &Form1::rPurposeDSiWare_CheckedChanged);
this->rPurposeDSStation->CheckedChanged -= gcnew System::EventHandler(this, &Form1::rPurposeDSStation_CheckedChanged);
this->rPurposeZone->CheckedChanged -= gcnew System::EventHandler(this, &Form1::rPurposeZone_CheckedChanged);
this->rPurposeOther->CheckedChanged -= gcnew System::EventHandler(this, &Form1::rPurposeOther_CheckedChanged);
// いったんすべてチェックを外す
this->rPurposeCardProduction->Checked = false;
this->rPurposeCardDistribution->Checked = false;
this->rPurposeCardKiosk->Checked = false;
this->rPurposeDSiWare->Checked = false;
this->rPurposeDSStation->Checked = false;
this->rPurposeZone->Checked = false;
this->rPurposeOther->Checked = false;
// 選択されたもののみチェックする
rbut->Checked = true;
// "その他"のテキストボックスを有効にする
if( rbut->Equals(this->rPurposeOther) )
{
this->tboxPurposeOther->Enabled = true;
}
else
{
this->tboxPurposeOther->Clear();
this->tboxPurposeOther->Enabled = false;
}
// イベントを有効にする
this->rPurposeCardProduction->CheckedChanged += gcnew System::EventHandler(this, &Form1::rPurposeCardProduction_CheckedChanged);
this->rPurposeCardDistribution->CheckedChanged += gcnew System::EventHandler(this, &Form1::rPurposeCardDistribution_CheckedChanged);
this->rPurposeCardKiosk->CheckedChanged += gcnew System::EventHandler(this, &Form1::rPurposeCardKiosk_CheckedChanged);
this->rPurposeDSiWare->CheckedChanged += gcnew System::EventHandler(this, &Form1::rPurposeDSiWare_CheckedChanged);
this->rPurposeDSStation->CheckedChanged += gcnew System::EventHandler(this, &Form1::rPurposeDSStation_CheckedChanged);
this->rPurposeZone->CheckedChanged += gcnew System::EventHandler(this, &Form1::rPurposeZone_CheckedChanged);
this->rPurposeOther->CheckedChanged += gcnew System::EventHandler(this, &Form1::rPurposeOther_CheckedChanged);
} //changePurposeForms()
// ROMメディアにあわせて"用途"の選択可能なラジオボタンを絞る
void maskPurposeForms(void)
{
// カードアプリで選択可能な項目
cli::array<System::Windows::Forms::RadioButton ^> ^rbutsCard = gcnew cli::array<System::Windows::Forms::RadioButton ^>
{
this->rPurposeCardProduction,
this->rPurposeCardDistribution,
this->rPurposeCardKiosk,
this->rPurposeDSStation, // カードアプリとして作成
};
// NANDアプリで選択可能な項目
cli::array<System::Windows::Forms::RadioButton ^> ^rbutsNand = gcnew cli::array<System::Windows::Forms::RadioButton ^>
{
this->rPurposeDSiWare,
this->rPurposeZone
};
if( this->hSrl->IsMediaNand )
{
for each( System::Windows::Forms::RadioButton ^r in rbutsCard )
{
r->Enabled = false;
if( r->Checked ) // カードアプリの選択可能項目にチェックがついていたらチェックをつけかえる
{
this->changePurposeForms(this->rPurposeDSiWare);
}
}
for each( System::Windows::Forms::RadioButton ^r in rbutsNand )
{
r->Enabled = true;
}
}
else
{
for each( System::Windows::Forms::RadioButton ^r in rbutsNand )
{
r->Enabled = false;
if( r->Checked )
{
this->changePurposeForms(this->rPurposeCardProduction);
}
}
for each( System::Windows::Forms::RadioButton ^r in rbutsCard )
{
r->Enabled = true;
}
}
// 日本向けでは"店頭試遊台(単独型)"をなくす
if( this->hSrl->IsRegionJapan )
{
this->rPurposeCardKiosk->Enabled = false;
if( this->rPurposeCardKiosk->Checked )
{
this->changePurposeForms(this->rPurposeOther); // わざわざこれを選ぶには特別な理由があるだろうから"その他"にチェックをつけかえる
}
}
} //maskPurposeForms()
private:
// ----------------------------------------------
// ŒÅèƒtƒ@ƒCƒ¼ÌŽæ“¾
@ -5641,13 +5754,42 @@ private: System::Windows::Forms::RadioButton^ rPurposeZone;
this->updateGrid();
}
}
// 用途の項目のラジオボタン
private:
System::Void rPurposeCardProduction_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
{
this->changePurposeForms(this->rPurposeCardProduction);
}
private:
System::Void rPurposeCardDistribution_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
{
this->changePurposeForms(this->rPurposeCardDistribution);
}
private:
System::Void rPurposeCardKiosk_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
{
this->changePurposeForms(this->rPurposeCardKiosk);
}
private:
System::Void rPurposeDSiWare_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
{
this->changePurposeForms(this->rPurposeDSiWare);
}
private:
System::Void rPurposeDSStation_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
{
this->changePurposeForms(this->rPurposeDSStation);
}
private:
System::Void rPurposeZone_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
{
this->changePurposeForms(this->rPurposeZone);
}
private:
System::Void rPurposeOther_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
{
this->changePurposeForms(this->rPurposeOther);
}
}; // enf of ref class Form1
} // end of namespace MasterEditorTWL

View File

@ -1478,7 +1478,10 @@
<value>データ配信ROM</value>
</data>
<data name="rPurposeCardKiosk.Size" type="System.Drawing.Size, System.Drawing">
<value>118, 16</value>
<value>127, 16</value>
</data>
<data name="rPurposeCardKiosk.Text" xml:space="preserve">
<value>店頭体験版(単独型)</value>
</data>
<data name="gboxPurposeCard.Text" xml:space="preserve">
<value>カード生産ソフト</value>
@ -1609,8 +1612,4 @@
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value> Pゴシック, 9pt</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
</root>

View File

@ -93,22 +93,26 @@ void Form1::setDeliverableProperties(void)
}
// —p“r
//if( this->rUsageSale->Checked == true )
//{
// this->hDeliv->hUsage = this->rUsageSale->Text;
//}
//else if( this->rUsageSample->Checked == true )
//{
// this->hDeliv->hUsage = this->rUsageSample->Text;
//}
//else if( this->rUsageDst->Checked == true )
//{
// this->hDeliv->hUsage = this->rUsageDst->Text;
//}
//else if( this->rUsageOther->Checked == true )
//{
// this->hDeliv->hUsage = this->tboxUsageOther->Text;
//}
cli::array<System::Windows::Forms::RadioButton ^> ^rbuts = gcnew cli::array<System::Windows::Forms::RadioButton ^>
{
this->rPurposeCardProduction,
this->rPurposeCardDistribution,
this->rPurposeCardKiosk,
this->rPurposeDSiWare,
this->rPurposeDSStation,
this->rPurposeZone
};
for each( System::Windows::Forms::RadioButton ^r in rbuts )
{
if( r->Checked )
{
this->hDeliv->hUsage = r->Text;
}
}
if( this->rPurposeOther->Checked )
{
this->hDeliv->hUsage = this->rPurposeOther->Text + "(" + this->tboxPurposeOther->Text + ")";
}
// ‰ïŽÐ<C5BD>î•ñ
this->hDeliv->hCompany1 = this->tboxCompany1->Text + " " + this->tboxDepart1->Text;
@ -318,10 +322,10 @@ System::Boolean Form1::checkDeliverableForms(void)
this->checkTextForm( this->tboxProductCode1Foreign->Text, "LabelProductCodeForeign" );
this->checkTextForm( this->tboxProductCode2Foreign1->Text,"LabelProductCodeForeign" );
}
//if( this->rUsageOther->Checked == true )
//{
// this->checkTextForm( this->tboxUsageOther->Text, "LabelUsage" );
//}
if( this->rPurposeOther->Checked )
{
this->checkTextForm( this->tboxPurposeOther->Text, "LabelUsage" );
}
// ‰ïŽÐ<C5BD>î•ñ
this->checkTextForm( this->tboxPerson1->Text, "LabelPerson1" );

View File

@ -467,6 +467,16 @@ void MasterEditorTWL::Form1::changeLanguage( System::String ^langname )
resources->ApplyResources(this->colWarnBegin, L"colWarnBegin");
resources->ApplyResources(this->colWarnEnd, L"colWarnEnd");
resources->ApplyResources(this->colWarnCause, L"colWarnCause");
resources->ApplyResources(this->rPurposeCardProduction, L"rPurposeCardProduction");
resources->ApplyResources(this->rPurposeCardDistribution, L"rPurposeCardDistribution");
resources->ApplyResources(this->rPurposeCardKiosk, L"rPurposeCardKiosk");
resources->ApplyResources(this->rPurposeDSiWare, L"rPurposeDSiWare");
resources->ApplyResources(this->rPurposeDSStation, L"rPurposeDSStation");
resources->ApplyResources(this->rPurposeZone, L"rPurposeZone");
resources->ApplyResources(this->rPurposeOther, L"rPurposeOther");
resources->ApplyResources(this->gboxPurposeCard, L"gboxPurposeCard");
resources->ApplyResources(this->gboxPurposeNetwork, L"gboxPurposeNetwork");
resources->ApplyResources(this->gboxPurpose, L"gboxPurpose");
resources->ApplyResources(this, L"$this");
// テキストボックスの表記を変更

View File

@ -277,6 +277,8 @@ void Form1::setSrlForms(void)
this->maskBackupMemoryForms();
//// カードアプリのときにDSi Wareの販売カテゴリを自動的に「なし」にしておく
//this->maskDLCategoryForms();
// "用途"を絞る
this->maskPurposeForms();
} // setSrlForms()
// ----------------------------------------------

View File

@ -70,17 +70,38 @@ System::Void Form1::saveTmp( System::String ^filename )
MasterEditorTWL::appendXmlTag( doc, form, "SubmitWay", "Mail" );
}
//if( this->rUsageSale->Checked )
// MasterEditorTWL::appendXmlTag( doc, form, "Purpose", "Sale" );
//else if( this->rUsageSample->Checked )
// MasterEditorTWL::appendXmlTag( doc, form, "Purpose", "Sample" );
//else if( this->rUsageDst->Checked )
// MasterEditorTWL::appendXmlTag( doc, form, "Purpose", "Dst" );
//else if( this->rUsageOther->Checked )
// MasterEditorTWL::appendXmlTag( doc, form, "Purpose", "Other" );
//MasterEditorTWL::appendXmlTag( doc, form, "PurposeOther", this->tboxUsageOther->Text );
//MasterEditorTWL::appendXmlTag( doc, form, "ReleaseDate", this->dateRelease->Value.ToString() );
//MasterEditorTWL::appendXmlTag( doc, form, "SubmitDate", this->dateSubmit->Value.ToString() );
// —p“r
cli::array<System::Windows::Forms::RadioButton^> ^rbuts = gcnew cli::array<System::Windows::Forms::RadioButton ^>
{
this->rPurposeCardProduction,
this->rPurposeCardDistribution,
this->rPurposeCardKiosk,
this->rPurposeDSiWare,
this->rPurposeDSStation,
this->rPurposeZone,
this->rPurposeOther
};
cli::array<System::String^> ^strs = gcnew cli::array<System::String^>
{
"CardProduction",
"CardDistribution",
"CardKiosk",
"DSiWare",
"DSStation",
"Zone",
"Other"
};
int i;
for(i=0; i < rbuts->Length; i++ )
{
if( rbuts[i]->Checked )
{
MasterEditorTWL::appendXmlTag( doc, form, "Purpose", strs[i] );
}
}
MasterEditorTWL::appendXmlTag( doc, form, "PurposeOther", this->tboxPurposeOther->Text );
MasterEditorTWL::appendXmlTag( doc, form, "ReleaseDate", this->dateRelease->Value.ToString() );
MasterEditorTWL::appendXmlTag( doc, form, "SubmitDate", this->dateSubmit->Value.ToString() );
//MasterEditorTWL::appendXmlTag( doc, form, "DLCategory", this->combDLCategory->SelectedIndex.ToString() );
//MasterEditorTWL::appendXmlTag( doc, form, "DLCategoryOther", this->tboxDLCategoryOther->Text );
@ -194,16 +215,33 @@ void Form1::loadTmp( System::String ^filename )
strs = gcnew cli::array<System::String^>{"Hand","Mail","Internet"};
this->parseTmp( root, "/MasterEditorTWL/Form/SubmitWay", rbuts, strs );
//rbuts = gcnew cli::array<System::Windows::Forms::RadioButton^>{this->rUsageSale, this->rUsageSample, this->rUsageDst, this->rUsageOther};
//strs = gcnew cli::array<System::String^>{"Sale","Sample","Dst","Other"};
//this->parseTmp( root, "/MasterEditorTWL/Form/Purpose", rbuts, strs );
//this->tboxUsageOther->Enabled = false;
//this->tboxUsageOther->Clear();
//if( this->rUsageOther->Checked )
//{
// this->tboxUsageOther->Enabled = true;
// this->parseTmp( root, "/MasterEditorTWL/Form/PurposeOther", this->tboxUsageOther );
//}
// —p“r
rbuts = gcnew cli::array<System::Windows::Forms::RadioButton ^>
{
this->rPurposeCardProduction,
this->rPurposeCardDistribution,
this->rPurposeCardKiosk,
this->rPurposeDSiWare,
this->rPurposeDSStation,
this->rPurposeZone,
this->rPurposeOther
};
strs = gcnew cli::array<System::String^>
{
"CardProduction",
"CardDistribution",
"CardKiosk",
"DSiWare",
"DSStation",
"Zone",
"Other"
};
this->parseTmp( root, "/MasterEditorTWL/Form/Purpose", rbuts, strs );
if( this->rPurposeOther->Checked )
{
this->tboxPurposeOther->Enabled = true;
this->parseTmp( root, "/MasterEditorTWL/Form/PurposeOther", this->tboxPurposeOther );
}
this->parseTmp( root, "/MasterEditorTWL/Form/ReleaseForeign", this->cboxReleaseForeign );
this->tboxProductNameForeign->Enabled = false;