public static DialogResult ShowShift(IWin32Window owner, Point2I levelSize) { using (LevelResizeShiftForm form = new LevelResizeShiftForm()) { LevelResizeShiftForm.levelSize = levelSize; LevelResizeShiftForm.levelShift = Point2I.Zero; LevelResizeShiftForm.shiftMode = true; form.Text = "Shift Level"; form.labelWidth.Text = "X:"; form.labelHeight.Text = "Y:"; form.numericLevelWidth.Minimum = -levelSize.X; form.numericLevelHeight.Minimum = -levelSize.Y; form.numericLevelWidth.Maximum = levelSize.X; form.numericLevelWidth.Maximum = levelSize.Y; form.numericLevelWidth.Value = 0; form.numericLevelHeight.Value = 0; return(form.ShowDialog(owner)); } }
//----------------------------------------------------------------------------- // Show //----------------------------------------------------------------------------- public static DialogResult ShowResize(IWin32Window owner, Point2I levelSize) { using (LevelResizeShiftForm form = new LevelResizeShiftForm()) { LevelResizeShiftForm.levelSize = levelSize; LevelResizeShiftForm.levelShift = Point2I.Zero; LevelResizeShiftForm.shiftMode = false; form.Text = "Resize Level"; form.labelWidth.Text = "Width:"; form.labelHeight.Text = "Height:"; form.numericLevelWidth.Minimum = 1; form.numericLevelHeight.Minimum = 1; form.numericLevelWidth.Maximum = 100; form.numericLevelHeight.Maximum = 100; form.numericLevelWidth.Value = levelSize.X; form.numericLevelHeight.Value = levelSize.Y; return(form.ShowDialog(owner)); } }
//----------------------------------------------------------------------------- // Show //----------------------------------------------------------------------------- public static DialogResult ShowResize(IWin32Window owner, Point2I levelSize) { using (LevelResizeShiftForm form = new LevelResizeShiftForm()) { LevelResizeShiftForm.levelSize = levelSize; LevelResizeShiftForm.levelShift = Point2I.Zero; LevelResizeShiftForm.shiftMode = false; form.Text = "Resize Level"; form.labelWidth.Text = "Width:"; form.labelHeight.Text = "Height:"; form.numericLevelWidth.Minimum = 1; form.numericLevelHeight.Minimum = 1; form.numericLevelWidth.Maximum = 100; form.numericLevelHeight.Maximum = 100; form.numericLevelWidth.Value = levelSize.X; form.numericLevelHeight.Value = levelSize.Y; return form.ShowDialog(owner); } }
public static DialogResult ShowShift(IWin32Window owner, Point2I levelSize) { using (LevelResizeShiftForm form = new LevelResizeShiftForm()) { LevelResizeShiftForm.levelSize = levelSize; LevelResizeShiftForm.levelShift = Point2I.Zero; LevelResizeShiftForm.shiftMode = true; form.Text = "Shift Level"; form.labelWidth.Text = "X:"; form.labelHeight.Text = "Y:"; form.numericLevelWidth.Minimum = -levelSize.X; form.numericLevelHeight.Minimum = -levelSize.Y; form.numericLevelWidth.Maximum = levelSize.X; form.numericLevelWidth.Maximum = levelSize.Y; form.numericLevelWidth.Value = 0; form.numericLevelHeight.Value = 0; return form.ShowDialog(owner); } }