コード例 #1
0
 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());
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        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());
        }
コード例 #4
0
        public void SetMemoryToDefault()
        {
            foreach (var coord in AllCoordinates)
            {
                Current[coord] = new MemoryContents {
                    Value = Default[coord]
                }
            }
            ;



            RegionUpdated?.Invoke(this, new AddressRegionEventArgs());
        }
コード例 #5
0
        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);
        }
コード例 #6
0
        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
            });
        }