コード例 #1
0
 public void ReadMemory()
 {
     using (var memory = new MemoryAccessor(Pid.Value))
     {
         Remaining = memory.I4(AddrRemaining);
         Width     = memory.I4(AddrWidth);
         Height    = memory.I4(AddrHeight);
         Time      = memory.I4(AddrTime);
         Mines     = memory.Buffer(AddrMine, Mines.Length);
     }
 }
コード例 #2
0
ファイル: Sweeper.cs プロジェクト: zmjack/NWin32
        public void ReadMemory()
        {
            using var memory = new MemoryAccessor(Pid.Value);

            Remaining = memory.I4(AddrRemaining);
            Width     = memory.I4(AddrWidth);
            Height    = memory.I4(AddrHeight);
            Time      = memory.I4(AddrTime);

            if ((Width * Height).For(n => 0 < n && n <= Mines.Length))
            {
                Mines = memory.Buffer(AddrMine, Mines.Length);
                Valid = true;
            }
            else
            {
                Valid = false;
            }
        }