53 lines
1.2 KiB
C#
53 lines
1.2 KiB
C#
|
|
using System;
|
|||
|
|
|
|||
|
|
namespace CRVM
|
|||
|
|
{
|
|||
|
|
public partial class titileSet : WizardBaseChannel
|
|||
|
|
{
|
|||
|
|
public delegate void Change(bool opened);
|
|||
|
|
public event Change change;
|
|||
|
|
|
|||
|
|
public titileSet()
|
|||
|
|
{
|
|||
|
|
InitializeComponent();
|
|||
|
|
}
|
|||
|
|
private bool _opened;
|
|||
|
|
|
|||
|
|
public string labelText
|
|||
|
|
{
|
|||
|
|
set
|
|||
|
|
{
|
|||
|
|
if (value.Contains(">"))
|
|||
|
|
{
|
|||
|
|
_opened = false;
|
|||
|
|
}
|
|||
|
|
if (value.Contains("∨"))
|
|||
|
|
{
|
|||
|
|
_opened = true;
|
|||
|
|
}
|
|||
|
|
button1.Text = value;
|
|||
|
|
}
|
|||
|
|
get { return button1.Text; }
|
|||
|
|
}
|
|||
|
|
private void button1_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
string tempText = this.button1.Text;
|
|||
|
|
if (_opened)
|
|||
|
|
{
|
|||
|
|
button1.Text = tempText.Replace('∨', '>');
|
|||
|
|
_opened = false;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
button1.Text = tempText.Replace('>', '∨');
|
|||
|
|
_opened = true;
|
|||
|
|
}
|
|||
|
|
if (change != null)
|
|||
|
|
{
|
|||
|
|
change(_opened);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|