public void CoolOff() { foreach (var coord in AllCoordinates) { var contents = Current[coord]; Current[coord] = new MemoryContents { AccessState = MemoryAccessState.Cold, Value = contents.Value, }; } RegionUpdated?.Invoke(this, new AddressRegionEventArgs()); }
private void OnRegionUpdated() { var info = new OcrExcludeInfo(); foreach (var selector in RemovableSelectors) { info.Data.Add(new Rectangle(selector.SelectorViewModel.CurrentX, selector.SelectorViewModel.CurrentY, selector.SelectorViewModel.CurrentWidth, selector.SelectorViewModel.CurrentHeight)); } RegionUpdated?.Invoke(this, info); }
public void InitializeEmptyMemorySpace() { foreach (var coord in AllCoordinates) { Default[coord] = string.Empty; } foreach (var coord in AllCoordinates) { EncryptionState[coord] = false; } RegionUpdated?.Invoke(this, new AddressRegionEventArgs()); }
public void SetMemoryToDefault() { foreach (var coord in AllCoordinates) { Current[coord] = new MemoryContents { Value = Default[coord] } } ; RegionUpdated?.Invoke(this, new AddressRegionEventArgs()); }
public string Read(MemoryCoordinate coord) { var currentValue = this.Current[coord].Value; this.Current[coord] = new MemoryContents { Value = currentValue, AccessState = MemoryAccessState.Read, }; RegionUpdated?.Invoke(this, new AddressRegionEventArgs { Coordinate = coord }); return(currentValue); }
public void Write(MemoryCoordinate coord, string value) { if (ReadOnly) { throw new ArgumentException("Readonly."); } this.Current[coord] = new MemoryContents { AccessState = MemoryAccessState.Write, Value = value, }; RegionUpdated?.Invoke(this, new AddressRegionEventArgs { Coordinate = coord }); }