会社情報を終了時に保存するように変更.

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@455 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
nishikawa_takeshi 2010-01-05 05:41:23 +00:00
parent 14bb17c493
commit ab122e805d
11 changed files with 148 additions and 80 deletions

View File

@ -4508,6 +4508,10 @@ private: System::Windows::Forms::RadioButton^ rPurposeCardTouchTryDS;
System::Boolean parseTmp( System::Xml::XmlElement ^root, System::String ^xpath, System::Windows::Forms::TextBox ^tbox );
System::Boolean parseTmp( System::Xml::XmlElement ^root, System::String ^xpath, System::Windows::Forms::DateTimePicker ^date );
// 会社情報の保存と読み出し
System::Void saveCompany( System::String ^filename );
System::Void loadCompany( System::String ^filename );
private:
// ----------------------------------------------
// フォームの設定変更
@ -4905,6 +4909,11 @@ private: System::Windows::Forms::RadioButton^ rPurposeCardTouchTryDS;
{
return (this->getResDir() + "rominfolist.xsl");
}
// 会社情報のXML
System::String^ getCompanyInfoFile(void)
{
return (this->getBinDir() + "company.xml");
}
private:
// ----------------------------------------------

View File

@ -119,6 +119,9 @@ void Form1::construct(void)
// 引数処理
this->handleArgs();
//System::Diagnostics::Debug::WriteLine( "constructed" );
// 会社情報の自動読み出し
this->loadCompany( this->getCompanyInfoFile() );
}
@ -127,6 +130,9 @@ void Form1::construct(void)
// ----------------------------------------------
void Form1::destruct(void)
{
// 会社情報の自動保存
this->saveCompany( this->getCompanyInfoFile() );
// TAD読み出しの際に作成される一時SRLファイルを削除(書き出しをせずに終了したときに起こりうる)
System::String ^srlfile = this->getSplitTadTmpFile();
if( System::IO::File::Exists( srlfile ) )

View File

@ -161,6 +161,7 @@ void Form1::loadTmp( System::String ^filename )
{
(void)ex;
this->errMsg( "E_LoadTemp" );
return;
}
System::Xml::XmlElement ^root = doc->DocumentElement;
System::String ^text;
@ -276,14 +277,6 @@ void Form1::loadTmp( System::String ^filename )
this->parseTmp( root, "/MasterEditorTWL/Form/InputPerson2", this->cboxIsInputPerson2 );
this->gboxPerson2->Enabled = false;
this->tboxCompany2->Enabled = false;
this->tboxDepart2->Enabled = false;
this->tboxPerson2->Enabled = false;
this->tboxFurigana2->Enabled = false;
this->tboxTel2->Enabled = false;
this->tboxFax2->Enabled = false;
this->tboxMail2->Enabled = false;
this->tboxNTSC2->Enabled = false;
this->tboxCompany2->Clear();
this->tboxDepart2->Clear();
this->tboxPerson2->Clear();
@ -295,14 +288,6 @@ void Form1::loadTmp( System::String ^filename )
if( this->cboxIsInputPerson2->Checked )
{
this->gboxPerson2->Enabled = true;
this->tboxCompany2->Enabled = true;
this->tboxDepart2->Enabled = true;
this->tboxPerson2->Enabled = true;
this->tboxFurigana2->Enabled = true;
this->tboxTel2->Enabled = true;
this->tboxFax2->Enabled = true;
this->tboxMail2->Enabled = true;
this->tboxNTSC2->Enabled = true;
this->parseTmp( root, "/MasterEditorTWL/Form/Company2", this->tboxCompany2 );
this->parseTmp( root, "/MasterEditorTWL/Form/Depart2", this->tboxDepart2 );
this->parseTmp( root, "/MasterEditorTWL/Form/Name2", this->tboxPerson2 );
@ -349,6 +334,105 @@ void Form1::loadTmp( System::String ^filename )
//this->maskDLCategoryForms();
} //loadTmp()
// ----------------------------------------------
// 会社情報の保存
// ----------------------------------------------
System::Void Form1::saveCompany( System::String ^filename )
{
System::Xml::XmlDocument ^doc = gcnew System::Xml::XmlDocument();
doc->AppendChild( doc->CreateXmlDeclaration("1.0","UTF-8",nullptr) );
System::Xml::XmlElement ^root = doc->CreateElement( "MasterEditorTWL" );
doc->AppendChild( root );
// フォーム
System::Xml::XmlElement ^form = doc->CreateElement( "CompanyInfo" );
root->AppendChild( form );
MasterEditorTWL::appendXmlTag( doc, form, "Company1", this->tboxCompany1->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Depart1", this->tboxDepart1->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Name1", this->tboxPerson1->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Furigana1", this->tboxFurigana1->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Tel1", this->tboxTel1->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Fax1", this->tboxFax1->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Mail1", this->tboxMail1->Text );
MasterEditorTWL::appendXmlTag( doc, form, "NTSC1", this->tboxNTSC1->Text );
MasterEditorTWL::appendXmlTag( doc, form, "InputPerson2", (this->cboxIsInputPerson2->Checked)?"Y":"N" );
MasterEditorTWL::appendXmlTag( doc, form, "Company2", this->tboxCompany2->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Depart2", this->tboxDepart2->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Name2", this->tboxPerson2->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Furigana2", this->tboxFurigana2->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Tel2", this->tboxTel2->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Fax2", this->tboxFax2->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Mail2", this->tboxMail2->Text );
MasterEditorTWL::appendXmlTag( doc, form, "NTSC2", this->tboxNTSC2->Text );
// バージョン
MasterEditorTWL::appendXmlTag( doc, root, "MasterEditorVersion", this->getVersion() );
try
{
doc->Save( filename );
}
catch( System::Exception ^ex )
{
(void)ex;
return; // ファイルがないとき何もしない
}
} //saveTmp()
// ----------------------------------------------
// 会社情報の読み込み
// ----------------------------------------------
void Form1::loadCompany( System::String ^filename )
{
System::Xml::XmlDocument ^doc = gcnew System::Xml::XmlDocument;
try
{
doc->Load( filename );
}
catch( System::Exception ^ex )
{
(void)ex;
return; // ファイルがないとき何もしない
}
System::Xml::XmlElement ^root = doc->DocumentElement;
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/Company1", this->tboxCompany1 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/Depart1", this->tboxDepart1 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/Name1", this->tboxPerson1 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/Furigana1", this->tboxFurigana1 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/Tel1", this->tboxTel1 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/Fax1", this->tboxFax1 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/Mail1", this->tboxMail1 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/NTSC1", this->tboxNTSC1 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/InputPerson2", this->cboxIsInputPerson2 );
this->gboxPerson2->Enabled = false;
this->tboxCompany2->Clear();
this->tboxDepart2->Clear();
this->tboxPerson2->Clear();
this->tboxFurigana2->Clear();
this->tboxTel2->Clear();
this->tboxFax2->Clear();
this->tboxMail2->Clear();
this->tboxNTSC2->Clear();
if( this->cboxIsInputPerson2->Checked )
{
this->gboxPerson2->Enabled = true;
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/Company2", this->tboxCompany2 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/Depart2", this->tboxDepart2 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/Name2", this->tboxPerson2 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/Furigana2", this->tboxFurigana2 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/Tel2", this->tboxTel2 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/Fax2", this->tboxFax2 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/Mail2", this->tboxMail2 );
this->parseTmp( root, "/MasterEditorTWL/CompanyInfo/NTSC2", this->tboxNTSC2 );
}
} //loadCompany()
// ----------------------------------------------
// 一時保存情報をフォーム情報に変換
// ----------------------------------------------

View File

@ -81,6 +81,12 @@
}
"Entry"
{
"MsmKey" = "8:_9081D70FB535474FA8789DC9AFE4637C"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_A3417E9C9F294832AE49B5BDAF95E373"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@ -99,40 +105,10 @@
}
"Entry"
{
"MsmKey" = "8:_EB97861D2BE24B1889C25826A31A7639"
"OwnerKey" = "8:_F5BECC59B4FF45CA9F9146470B41D52D"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_F5BECC59B4FF45CA9F9146470B41D52D"
"OwnerKey" = "8:_7746D2D347F0423FB46FA2300F6158A4"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_FE56DE664C36410FB05BBF909ADE9DBE"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_7746D2D347F0423FB46FA2300F6158A4"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_BFEA9BAA0DBF4332913A71EDE89FC3CD"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_7DAFD42678FC4D69A3A6BC6E6726AB10"
"MsmSig" = "8:_UNDEFINED"
}
}
"Configurations"
{
@ -444,6 +420,26 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_9081D70FB535474FA8789DC9AFE4637C"
{
"SourcePath" = "8:..\\company.xml"
"TargetName" = "8:company.xml"
"Tag" = "8:"
"Folder" = "8:_1494B8B199184797B9C812877A4DFB7F"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A3417E9C9F294832AE49B5BDAF95E373"
{
"SourcePath" = "8:..\\resource\\ini.xml"
@ -1160,34 +1156,6 @@
}
"MergeModule"
{
"{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_EB97861D2BE24B1889C25826A31A7639"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:TRUE"
"SourcePath" = "8:microsoft_vc90_crt_x86.msm"
"Properties"
{
}
"LanguageId" = "3:0"
"Exclude" = "11:FALSE"
"Folder" = "8:"
"Feature" = "8:"
"IsolateTo" = "8:"
}
"{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_F5BECC59B4FF45CA9F9146470B41D52D"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:TRUE"
"SourcePath" = "8:policy_9_0_Microsoft_VC90_CRT_x86.msm"
"Properties"
{
}
"LanguageId" = "3:0"
"Exclude" = "11:FALSE"
"Folder" = "8:"
"Feature" = "8:"
"IsolateTo" = "8:"
}
}
"ProjectOutput"
{

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MasterEditorTWL>
<CompanyInfo>
<InputPerson2>N</InputPerson2>
</CompanyInfo>
<MasterEditorVersion>1.8</MasterEditorVersion>
</MasterEditorTWL>

View File

@ -34,12 +34,6 @@
<begin>28</begin><end>2b</end><modify>False</modify><affect>True</affect>
</RomStartAddress>
<DebugDwc>
<name>DWCライブラリ</name>
<sentence>開発用サーバにアクセスする関数が使用されています。</sentence>
<begin>28</begin><end>2b</end><modify>False</modify><affect>True</affect>
</DebugDwc>
<DigestArea>
<name>ダイジェスト</name>
<sentence>ファイルサイズがダイジェストの対象範囲よりも小さくなっています。ROM末尾のパディングやROMの一部が削除されている可能性があります。</sentence>