public void Init(uint addr)
        {
            this.Address           = addr;
            this.ValueTextBox.Text = U.ToHexString(addr);

            uint x = Program.RAM.u8(addr);

            this.ReWriteValueX.Value       = x;
            this.ReWriteValueX.Maximum     = 255;
            this.ReWriteValueX.Hexadecimal = false;

            uint y = Program.RAM.u8(addr + 1);

            this.ReWriteValueY.Value       = y;
            this.ReWriteValueY.Maximum     = 255;
            this.ReWriteValueY.Hexadecimal = false;

            this.MapPictureBox.SetPoint("", (int)x, (int)y);
            this.MapPictureBox.SetDefaultIcon(ImageSystemIconForm.Blank16());

            this.ReWriteValueX.BackColor = OptionForm.Color_InputDecimal_BackColor();
            this.ReWriteValueX.ForeColor = OptionForm.Color_InputDecimal_ForeColor();
            this.ReWriteValueY.BackColor = OptionForm.Color_InputDecimal_BackColor();
            this.ReWriteValueY.ForeColor = OptionForm.Color_InputDecimal_ForeColor();
            this.ActiveControl           = ReWriteValueX;
        }
Ejemplo n.º 2
0
        public void Init(uint addr, uint typeOf, bool isHex)
        {
            this.Address           = addr;
            this.TypeOf            = typeOf;
            this.ValueTextBox.Text = U.ToHexString(addr);

            if (typeOf == 1)
            {
                this.ReWriteValue.Value   = Program.RAM.u8(addr);
                this.ReWriteValue.Maximum = 255;
            }
            else if (typeOf == 2)
            {
                this.ReWriteValue.Value   = Program.RAM.u16(addr);
                this.ReWriteValue.Maximum = 65535;
            }
            else if (typeOf == 3)
            {
                this.ReWriteValue.Value   = Program.RAM.u24(addr);
                this.ReWriteValue.Maximum = 16777215;
            }
            else
            {
                this.ReWriteValue.Value   = Program.RAM.u32(addr);
                this.ReWriteValue.Maximum = 4294967295;
            }

            this.ReWriteValue.Hexadecimal = isHex;
            if (isHex)
            {//16進数
                this.ReWriteValue.BackColor = OptionForm.Color_Input_BackColor();
                this.ReWriteValue.ForeColor = OptionForm.Color_Input_ForeColor();
            }
            else
            {//10進数
                this.ReWriteValue.BackColor = OptionForm.Color_InputDecimal_BackColor();
                this.ReWriteValue.ForeColor = OptionForm.Color_InputDecimal_ForeColor();
            }
            this.ActiveControl = ReWriteValue;
        }