// 初期化 public void Initialize(MemoryAllocationData memAllocData, ButtonControl buttonControl) { this.memAllocData = memAllocData; this.buttonControl = buttonControl; }
// メモリ割当データをチェックする private static bool checkMemAllocFile() { MemoryAllocationData memalloc = new MemoryAllocationData(); try { memalloc.Load(); } catch { // 読めない場合→Initializeでエラーとなる。 return true; } // 初回起動時 if (SystemData.machineid == "") { return true; } // 2回目以降 // 前回と機種が同じ if (memalloc.GetMachineName() == SystemData.machineid) { return true; } return false; }