CRVM-redis-6/Host/controls/titileSet.cs
2025-11-07 02:02:31 +08:00

53 lines
1.2 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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);
}
}
}
}