Пример #1
0
        public void TestRepeater()
        {
            var gs       = new GamesharkCode(0x50002040, 0xFFF0);
            var repeater = new GamesharkCode.Repeater(gs);

            Assert.AreEqual(0x20, repeater.Count);
            Assert.AreEqual(0x40, repeater.AddressStep);
            Assert.AreEqual(-16, repeater.ValueStep);
        }
Пример #2
0
        public void TestCode()
        {
            var gs = new GamesharkCode(0x81002340, 0x2400);

            Assert.AreEqual(0x2400, gs.Value);
            Assert.AreEqual(0x2340U, gs.Address);
            Assert.AreEqual(GamesharkCode.Type.Write16, gs.CodeType);
            Assert.AreEqual(0x81002340U, gs.Code);
        }
Пример #3
0
 private void DeleteCommandOnExecuted(object sender, ExecutedRoutedEventArgs e)
 {
     lock (GamesharkController.Codes)
     {
         var items = new GamesharkCode[GamesharkCodesView.SelectedItems.Count];
         GamesharkCodesView.SelectedItems.CopyTo(items, 0);
         foreach (var item in items)
         {
             GamesharkController.Codes.Remove(item);
         }
     }
 }
Пример #4
0
 public Repeater(GamesharkCode code) => _inner = code;