User manual - DT-5100カシオライブラリマニュアル for.NET【概要編】ver.3.00(2004年3月8日)
DT-5100 .NET ライブラリマニュアル
【概要編】
3.6 C#.NET アプリケーションでの使用例
カシオライブラリのシステムライブラリ関数を利用する場合のサンプルを以下に示します。
アプリケーション作成時に提供クラスライブラリファイル(CalibCs.dll)をプロジェクトに追加します。
アプリケーション側の記述例
us
i
ng
S
ystem;
using CalibCs;
namespace ClbsysSmp1
{
・・・・・・・・・・・・・・・・・
public class CeApiSample
{
public void ApiCe1( )
{
uint a1 = new uint();
//
Wakeup 要因による電源許可禁止の取得
// BOOL CLBGetBootableButtons( DWORD * )
bool x2 = ClbSysCs.CLBGetBootableButtons( ref a1 );
左トリガーキーによる電源 ON は有効に
uint a2 = (a1 | (uint)ClbSysCs.CLB_BUTTON_LEFTTRIGGER);
//
//
Wakeup 要因による電源 ON 許可禁止
// BOOL CLBSetBootableButtons( DWORD )
bool x1 = ClbSysCs.CLBSetBootableButtons( a2 );
・・・・・・・・・・・・・・・・・・
uint b1 = new uint();
uint b2 = new uint();
// 電源 OFF を禁止する時間の取得
// BOOL CLBGetOffMaskTime( DWORD *, DWORD * )
bool x4 = ClbSysCs.CLBGetOffMaskTime( ref b1, ref b2 );
// 電源 ON 後指定時間 OFF を禁止する
// BOOL CLBSetOffMaskTime( DWORD, DWORD )
bool x3 = ClbSysCs.CLBSetOffMaskTime( 10, 0 );
・・・・・・・・・・・・・・・・・・
}
public void ApiCe2( )
{
・・・・・・・・・・・・・・・・・・
// カードのアクセス終了を待って電源 OFF
// void CLBPowerOff( void )
ClbSysCs.CLBPowerOff();
}
}
}
8