60 lines
1.3 KiB
C#
60 lines
1.3 KiB
C#
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace DevComponents.Charts.Design
|
|
{
|
|
public partial class ChartStyleDialog : Form
|
|
{
|
|
#region Private variables
|
|
|
|
private CheckBox _CheckedBox;
|
|
private DateTime _LastClick;
|
|
|
|
#endregion
|
|
|
|
public ChartStyleDialog()
|
|
{
|
|
InitializeComponent();
|
|
|
|
_CheckedBox = cbPointPlot;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
public string CbSelected
|
|
{
|
|
get { return (_CheckedBox.Name); }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region CbClicked
|
|
|
|
private void CbClicked(object sender, EventArgs e)
|
|
{
|
|
CheckBox cb = sender as CheckBox;
|
|
|
|
if (cb != null)
|
|
{
|
|
if (_CheckedBox != cb)
|
|
{
|
|
_CheckedBox.Checked = false;
|
|
|
|
_CheckedBox = cb;
|
|
_CheckedBox.Checked = true;
|
|
}
|
|
else
|
|
{
|
|
TimeSpan ts = DateTime.Now - _LastClick;
|
|
|
|
if (ts.TotalMilliseconds < SystemInformation.DoubleClickTime)
|
|
btnOk.PerformClick();
|
|
}
|
|
}
|
|
|
|
_LastClick = DateTime.Now;
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
} |