mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-27 14:12:16 +00:00
8b98ce09c1
- Flipped top/bottom in 3D Floor Mode plugin dialogs to be consistent with the edit sector dialog @ fixed all compiler warnings in 3D Floor Mode plugin
67 lines
1.5 KiB
C#
67 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
|
{
|
|
public partial class ControlSectorAreaConfig : Form
|
|
{
|
|
private ControlSectorArea csa;
|
|
|
|
public ControlSectorAreaConfig(ControlSectorArea csa)
|
|
{
|
|
this.csa = csa;
|
|
|
|
InitializeComponent();
|
|
|
|
useTagRange.Checked = csa.UseCustomTagRnage;
|
|
firstTag.Text = csa.FirstTag.ToString();
|
|
lastTag.Text = csa.LastTag.ToString();
|
|
}
|
|
|
|
private void useTagRange_CheckedChanged(object sender, EventArgs e)
|
|
{
|
|
if (useTagRange.Checked)
|
|
{
|
|
firstTag.Enabled = true;
|
|
lastTag.Enabled = true;
|
|
}
|
|
else
|
|
{
|
|
firstTag.Enabled = false;
|
|
lastTag.Enabled = false;
|
|
}
|
|
}
|
|
|
|
private void cancelButton_Click(object sender, EventArgs e)
|
|
{
|
|
this.DialogResult = DialogResult.Cancel;
|
|
this.Close();
|
|
}
|
|
|
|
private void okButton_Click(object sender, EventArgs e)
|
|
{
|
|
if (useTagRange.Checked && int.Parse(lastTag.Text) < int.Parse(firstTag.Text))
|
|
{
|
|
MessageBox.Show("Last tag of range must be bigger than first tag of range", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
return;
|
|
}
|
|
|
|
csa.UseCustomTagRnage = useTagRange.Checked;
|
|
|
|
if (useTagRange.Checked)
|
|
{
|
|
csa.FirstTag = int.Parse(firstTag.Text);
|
|
csa.LastTag = int.Parse(lastTag.Text);
|
|
}
|
|
|
|
this.DialogResult = DialogResult.OK;
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|