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); }
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); }
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); } } }
public Repeater(GamesharkCode code) => _inner = code;