マスタエディタ:NAND使用量のMB表示を途中の桁で切り上げせずに最終桁まで表示させることに変更。(サイズは16KB単位なので最悪でも16/1024の桁数で足りる。)

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@144 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
nishikawa_takeshi 2009-01-27 02:33:56 +00:00
parent 003de4f19b
commit 17c61bd59b
8 changed files with 1226 additions and 1215 deletions

View File

@ -126,7 +126,8 @@ void Form1::setSrlForms(void)
this->tboxTmdSizeFS->Text = MasterEditorTWL::transSizeToStringKB( this->hSrl->hNandUsedSize->TmdSizeRoundUp );
// 総和
this->tboxSumSize->Text = MasterEditorTWL::transSizeToStringKB( this->hSrl->hNandUsedSize->NandUsedSize );
this->tboxSumSizeMB->Text = MasterEditorTWL::transSizeToStringMB( this->hSrl->hNandUsedSize->NandUsedSize, 2 );
//this->tboxSumSizeMB->Text = MasterEditorTWL::transSizeToStringMB( this->hSrl->hNandUsedSize->NandUsedSize, 2 );
this->tboxSumSizeMB->Text = MasterEditorTWL::transSizeToStringMB( this->hSrl->hNandUsedSize->NandUsedSize );
this->tboxShopBlock->Text = this->hSrl->hNandUsedSize->NandUsedSizeBlock.ToString();
// アプリ種別

View File

@ -527,7 +527,8 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet(
}
if( node->FirstChild->Value->Equals( "TagUsedNandSizeMB" ) )
{
node->FirstChild->Value = MasterEditorTWL::transSizeToStringMB( hSrl->hNandUsedSize->NandUsedSize, 2 );
//node->FirstChild->Value = MasterEditorTWL::transSizeToStringMB( hSrl->hNandUsedSize->NandUsedSize, 2 );
node->FirstChild->Value = MasterEditorTWL::transSizeToStringMB( hSrl->hNandUsedSize->NandUsedSize );
}
if( node->FirstChild->Value->Equals( "TagHWBlocks" ) )
{

View File

@ -134,6 +134,17 @@ System::String^ MasterEditorTWL::transSizeToStringKB( const System::UInt32 size
}
// MB
System::String^ MasterEditorTWL::transSizeToStringMB( const System::UInt32 size )
{
if( size == 0 )
{
return size.ToString();
}
System::Double MB = 1024.0 * 1024.0;
System::Double result = ((System::Double)size) / MB; // <20>¬<EFBFBD>
return (result.ToString() + " MB");
}
// 第2引数で小数点の桁数を指定(それ以下の桁は切り上げ)
System::String^ MasterEditorTWL::transSizeToStringMB( const System::UInt32 size, const System::UInt32 decimals )
{

View File

@ -41,6 +41,7 @@ namespace MasterEditorTWL
//
System::String^ transSizeToString( const System::UInt32 size );
System::String^ transSizeToStringKB( const System::UInt32 size );
System::String^ transSizeToStringMB( const System::UInt32 size ); // <20>¬<EFBFBD>”“_•\ަ
System::String^ transSizeToStringMB( const System::UInt32 size, const System::UInt32 decimals ); // 第2引数で小数点桁数を指定(それ以下の桁は切り上げ)
//