protected override void okButton_Click(object sender, EventArgs e) { lock (item.Board.ParentControl) { List <UndoRedoAction> actions = new List <UndoRedoAction>(); if (xInput.Value != item.X || yInput.Value != item.Y) { actions.Add(UndoRedoManager.ItemMoved(item, new Microsoft.Xna.Framework.Point(item.X, item.Y), new Microsoft.Xna.Framework.Point((int)xInput.Value, (int)yInput.Value))); item.Move((int)xInput.Value, (int)yInput.Value); } if (actions.Count > 0) { item.Board.UndoRedoMan.AddUndoBatch(actions); } item.rx0Shift = (int)rx0Box.Value; item.rx1Shift = (int)rx1Box.Value; item.yShift = (int)yShiftBox.Value; item.MobTime = GetOptionalInt(mobTimeEnable, mobTimeBox); item.Info = GetOptionalInt(infoEnable, infoBox); item.Team = GetOptionalInt(teamEnable, teamBox); //item.TypeStr = GetOptionalStr(typeEnable, typeBox); item.LimitedName = GetOptionalStr(limitedNameEnable, limitedNameBox); item.Hide = hideBox.Checked; item.Flip = flipBox.Checked; } Close(); }
private void okButton_Click(object sender, EventArgs e) { List <UndoRedoAction> actions = new List <UndoRedoAction>(); if (xInput.Value != item.X || yInput.Value != item.Y) { actions.Add(UndoRedoManager.ItemMoved(item, new Microsoft.Xna.Framework.Point(item.X, item.Y), new Microsoft.Xna.Framework.Point(xInput.Value, yInput.Value))); item.Move(xInput.Value, yInput.Value); } if (actions.Count > 0) { item.Board.UndoRedoMan.AddUndoBatch(actions); } item.rx0 = rx0Box.Value; item.rx1 = rx1Box.Value; item.MobTime = GetOptionalInt(mobTimeEnable, mobTimeBox); item.Info = GetOptionalInt(infoEnable, infoBox); item.Team = GetOptionalInt(teamEnable, teamBox); //item.TypeStr = GetOptionalStr(typeEnable, typeBox); item.LimitedName = GetOptionalStr(limitedNameEnable, limitedNameBox); item.Hide = hideBox.Checked; Close(); }