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;
        }
Ejemplo n.º 3
0
        public MoveToFreeSapceForm()
        {
            InitializeComponent();

            //移動後に再スキャンをしないといけないので、時間のかかるスキャンは停止する
            Program.AsmMapFileAsmCache.StopRequest();

            this.NewDataInit.SelectedIndex = 0;                                    //1行目でコピー
            this.DataPointerList.Items.Clear();
            this.TreatmentOldData.SelectedIndex = 0;                               //元データは 0クリア
            this.PaddingSpace.SelectedIndex     = 1;                               //前方16バイトの余白
            this.CondFreeSpace.SelectedIndex    = OptionForm.rom_extends_option(); // 0x09000000以降の拡張領域で、0x00がFREE_SPACE_SIZE個+必要データ数連続している領域
            this.FreeSpaceList.Items.Clear();
            this.CallbackAfterRun = null;

            InputFormRef.WriteButtonToYellow(this.RunButton, true);
            SimpleShowNewSize.ForeColor  = OptionForm.Color_InputDecimal_ForeColor();
            SimpleShowDiffSize.ForeColor = OptionForm.Color_InputDecimal_ForeColor();
            ShowMoveSize.ForeColor       = OptionForm.Color_InputDecimal_ForeColor();
            ShowNewSize.ForeColor        = OptionForm.Color_InputDecimal_ForeColor();

            SimpleNewDataCount.Focus();
        }