2022-11-25 17:14:35 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.BuilderModes
|
|
|
|
|
{
|
|
|
|
|
internal partial class DrawLineOptionsPanel : UserControl
|
|
|
|
|
{
|
|
|
|
|
public event EventHandler OnContinuousDrawingChanged;
|
2016-03-14 10:25:27 +00:00
|
|
|
|
public event EventHandler OnAutoCloseDrawingChanged;
|
2016-04-21 21:00:58 +00:00
|
|
|
|
public event EventHandler OnShowGuidelinesChanged;
|
2022-11-25 17:14:35 +00:00
|
|
|
|
|
|
|
|
|
public bool ContinuousDrawing { get { return continuousdrawing.Checked; } set { continuousdrawing.Checked = value; } }
|
2016-03-14 10:25:27 +00:00
|
|
|
|
public bool AutoCloseDrawing { get { return autoclosedrawing.Checked; } set { autoclosedrawing.Checked = value; } }
|
2016-04-21 21:00:58 +00:00
|
|
|
|
public bool ShowGuidelines { get { return showguidelines.Checked; } set { showguidelines.Checked = value; } }
|
2022-11-25 17:14:35 +00:00
|
|
|
|
|
|
|
|
|
public DrawLineOptionsPanel()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Register()
|
|
|
|
|
{
|
|
|
|
|
General.Interface.AddButton(continuousdrawing);
|
2016-03-14 10:25:27 +00:00
|
|
|
|
General.Interface.AddButton(autoclosedrawing);
|
2016-04-21 21:00:58 +00:00
|
|
|
|
General.Interface.AddButton(showguidelines);
|
2022-11-25 17:14:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Unregister()
|
|
|
|
|
{
|
2016-04-21 21:00:58 +00:00
|
|
|
|
General.Interface.RemoveButton(showguidelines);
|
2016-03-14 10:25:27 +00:00
|
|
|
|
General.Interface.RemoveButton(autoclosedrawing);
|
2022-11-25 17:14:35 +00:00
|
|
|
|
General.Interface.RemoveButton(continuousdrawing);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void continuousdrawing_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if(OnContinuousDrawingChanged != null) OnContinuousDrawingChanged(continuousdrawing.Checked, EventArgs.Empty);
|
|
|
|
|
}
|
2016-03-14 10:25:27 +00:00
|
|
|
|
|
|
|
|
|
private void autoclosedrawing_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if(OnAutoCloseDrawingChanged != null) OnAutoCloseDrawingChanged(autoclosedrawing.Checked, EventArgs.Empty);
|
|
|
|
|
}
|
2016-04-21 21:00:58 +00:00
|
|
|
|
|
|
|
|
|
private void showguidelines_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if(OnShowGuidelinesChanged != null) OnShowGuidelinesChanged(showguidelines.Checked, EventArgs.Empty);
|
|
|
|
|
}
|
2022-11-25 17:14:35 +00:00
|
|
|
|
}
|
|
|
|
|
}
|