예제 #1
0
        public HexBoardLine Clone()
        {
            var res = new HexBoardLine {
                Address = Address
            };

            for (var i = 0; i < _bytes.Length; i++)
            {
                res.Bytes[i].Value = _bytes[i].Value;
            }
            return(res);
        }
예제 #2
0
        private HexBoardLine EnsureLine(int adr)
        {
            adr = (adr >> 4) << 4;
            var line = FindLine(adr);

            if (line == null)
            {
                var i = 0;
                while (i < _lines.Count && _lines[i].Address < adr)
                {
                    i++;
                }

                line = new HexBoardLine {
                    Address = adr
                };
                _lines.Insert(i, line);
            }
            return(line);
        }