CRVM-redis-6/Host/controls/titileSet.cs

53 lines
1.2 KiB
C#
Raw Permalink Normal View History

2025-11-07 02:02:31 +08:00
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);
}
}
}
}