我已经为 windows 窗体创建了 gui ......!
一方面,我有带复选框的组框和两个按钮“>>”和“<<”,另一方面,我还有一个组框。
如果用户选择了多个我需要引发错误的复选框,我需要一次选择一个复选框。
如果用户选中复选框并单击“>>”按钮,我需要在另一个组框中显示消息数,即在“选定命令列表”中...并单击“>>”选定的消息列表应该从列表中删除。
单击此选项卡时,我已在我的 gui 中包含选项卡控件我需要显示一些命令列表我该怎么做...
谁可以帮我这个事...
这是代码..
namespace Menu_Sample
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
groupBox1.Text = "MSC";
groupBox2.Text = "List Of Selected Commands";
checkBox1.Visible = false;
cb2.Visible = false;
cb3.Visible = false;
cb4.Visible = false;
label1.Visible = false;
label2.Visible = false;
label3.Visible = false;
label4.Visible = false;
}
private void submenu1ToolStripMenuItem_Click(object sender, EventArgs e)
{
groupBox1.Text = "ICP";
checkBox1.Visible = true;
cb2.Visible = true;
cb3.Visible = true;
cb4.Visible = true;
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
if (checkBox1.Checked == true)
{
label1.Visible = true;
label1.Text = "ibit";
groupBox2.Controls.Add(label1);
label2.Visible = true;
label2.Text = "Cbit";
groupBox2.Controls.Add(label2);
label3.Visible = true;
label3.Text = "Kbit";
groupBox2.Controls.Add(label3);
label4.Visible = true;
label4.Text = "ibit";
groupBox2.Controls.Add(label4);
}
if (cb2.Checked == true)
{
label1.Visible = true;
label1.Text = "ibit";
groupBox2.Controls.Add(label1);
label2.Visible = true;
label2.Text = "Cbit";
groupBox2.Controls.Add(label2);
label3.Visible = true;
label3.Text = "Kbit";
groupBox2.Controls.Add(label3);
label4.Visible = true;
label4.Text = "ibit";
groupBox2.Controls.Add(label4);
}
}
private void btn6_Click(object sender, EventArgs e)
{
if (label1.Enabled==true)
{
label1.Text = "";
}
}
private void btn5_Click(object sender, EventArgs e)
{
label1.Text = "";
label2.Text = "";
label3.Text = "";
label4.Text = "";
}
private void submenu2ToolStripMenuItem_Click(object sender, EventArgs e)
{
groupBox1.Text = "MCP";
}
private void mDPToolStripMenuItem_Click(object sender, EventArgs e)
{
groupBox1.Text = "MDP";
}
private void mRPPToolStripMenuItem_Click(object sender, EventArgs e)
{
groupBox1.Text = "MRPP";
}
}
}