Пример #1
0
        public void Init(MapChangeForm.ChangeSt change)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.ChangeData   = change;
            if (this.ChangeData.no == U.NOT_FOUND)
            {//メインマップ
                X.Enabled = false;
                Y.Enabled = false;
                X.Minimum = 0;
                Y.Minimum = 0;

                U.SelectedIndexSafety(W, 15, (int)W.Maximum, 15);
                U.SelectedIndexSafety(H, 10, (int)H.Maximum, 10);
            }
            else
            {//変更
                X.Enabled = true;
                Y.Enabled = true;
                X.Minimum = 0;
                Y.Minimum = 0;

                U.SelectedIndexSafety(W, 1, (int)W.Maximum, 1);
                U.SelectedIndexSafety(H, 1, (int)H.Maximum, 1);
            }

            if (change.x < 0)
            {
                change.x = 0;
            }
            if (change.y < 0)
            {
                change.y = 0;
            }
            if (change.width < W.Minimum)
            {
                change.width = (uint)W.Minimum;
            }
            if (change.height < H.Minimum)
            {
                change.height = (uint)H.Minimum;
            }

            X.Value = change.x;
            Y.Value = change.y;
            W.Value = change.width;
            H.Value = change.height;
            T.Value = 0;
            B.Value = 0;
            L.Value = 0;
            R.Value = 0;
        }
        public void Init(uint datasize, MapChangeForm.ChangeSt changedata)
        {
            this.DataSize   = datasize;
            this.ChangeData = changedata;

            if (this.ChangeData.no == U.NOT_FOUND)
            {//メインマップ
                W.Value   = 15;
                W.Minimum = 15;
            }
            else
            {//変更
                W.Value   = 1;
                W.Minimum = 1;
            }

            W_ValueChanged(null, null);
        }