private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.checkBox3 = new System.Windows.Forms.CheckBox();
this.checkBox4 = new System.Windows.Forms.CheckBox();
this.checkBox5 = new System.Windows.Forms.CheckBox();
this.checkBox6 = new System.Windows.Forms.CheckBox();
this.button1 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.checkBox3);
this.groupBox1.Controls.Add(this.checkBox2);
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(342, 89);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "片头";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.checkBox6);
this.groupBox2.Controls.Add(this.checkBox5);
this.groupBox2.Controls.Add(this.checkBox4);
this.groupBox2.Location = new System.Drawing.Point(12, 107);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(342, 102);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "片尾";
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.ForeColor = System.Drawing.Color.Fuchsia;
this.checkBox1.Location = new System.Drawing.Point(38, 21);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(72, 16);
this.checkBox1.TabIndex = 0;
this.checkBox1.Text = "60秒彩条";
this.checkBox1.UseVisualStyleBackColor = true;
//
// checkBox2
//
this.checkBox2.AutoSize = true;
this.checkBox2.ForeColor = System.Drawing.SystemColors.ControlText;
this.checkBox2.Location = new System.Drawing.Point(38, 43);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(72, 16);
this.checkBox2.TabIndex = 1;
this.checkBox2.Text = "30秒黑场";
this.checkBox2.UseVisualStyleBackColor = true;
//
// checkBox3
//
this.checkBox3.AutoSize = true;
this.checkBox3.Location = new System.Drawing.Point(38, 65);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(72, 16);
this.checkBox3.TabIndex = 2;
this.checkBox3.Text = "20秒黑场";
this.checkBox3.UseVisualStyleBackColor = true;
//
// checkBox4
//
this.checkBox4.AutoSize = true;
this.checkBox4.Location = new System.Drawing.Point(38, 20);
this.checkBox4.Name = "checkBox4";
this.checkBox4.Size = new System.Drawing.Size(72, 16);
this.checkBox4.TabIndex = 0;
this.checkBox4.Text = "30秒黑场";
this.checkBox4.UseVisualStyleBackColor = true;
//
// checkBox5
//
this.checkBox5.AutoSize = true;
this.checkBox5.Location = new System.Drawing.Point(38, 42);
this.checkBox5.Name = "checkBox5";
this.checkBox5.Size = new System.Drawing.Size(72, 16);
this.checkBox5.TabIndex = 1;
this.checkBox5.Text = "15秒黑场";
this.checkBox5.UseVisualStyleBackColor = true;
//
// checkBox6
//
this.checkBox6.AutoSize = true;
this.checkBox6.Location = new System.Drawing.Point(38, 64);
this.checkBox6.Name = "checkBox6";
this.checkBox6.Size = new System.Drawing.Size(66, 16);
this.checkBox6.TabIndex = 2;
this.checkBox6.Text = "5秒黑场";
this.checkBox6.UseVisualStyleBackColor = true;
//
// button1
//
this.button1.Location = new System.Drawing.Point(267, 244);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2;
this.button1.Text = "确定";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// TitlesCreditsControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(366, 282);
this.Controls.Add(this.button1);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Name = "TitlesCreditsControl";
this.Text = "片头片尾彩条黑场添加";
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
}
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.checkBox3 = new System.Windows.Forms.CheckBox();
this.checkBox4 = new System.Windows.Forms.CheckBox();
this.checkBox5 = new System.Windows.Forms.CheckBox();
this.checkBox6 = new System.Windows.Forms.CheckBox();
this.button1 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.checkBox3);
this.groupBox1.Controls.Add(this.checkBox2);
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(342, 89);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "片头";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.checkBox6);
this.groupBox2.Controls.Add(this.checkBox5);
this.groupBox2.Controls.Add(this.checkBox4);
this.groupBox2.Location = new System.Drawing.Point(12, 107);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(342, 102);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "片尾";
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.ForeColor = System.Drawing.Color.Fuchsia;
this.checkBox1.Location = new System.Drawing.Point(38, 21);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(72, 16);
this.checkBox1.TabIndex = 0;
this.checkBox1.Text = "60秒彩条";
this.checkBox1.UseVisualStyleBackColor = true;
//
// checkBox2
//
this.checkBox2.AutoSize = true;
this.checkBox2.ForeColor = System.Drawing.SystemColors.ControlText;
this.checkBox2.Location = new System.Drawing.Point(38, 43);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(72, 16);
this.checkBox2.TabIndex = 1;
this.checkBox2.Text = "30秒黑场";
this.checkBox2.UseVisualStyleBackColor = true;
//
// checkBox3
//
this.checkBox3.AutoSize = true;
this.checkBox3.Location = new System.Drawing.Point(38, 65);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(72, 16);
this.checkBox3.TabIndex = 2;
this.checkBox3.Text = "20秒黑场";
this.checkBox3.UseVisualStyleBackColor = true;
//
// checkBox4
//
this.checkBox4.AutoSize = true;
this.checkBox4.Location = new System.Drawing.Point(38, 20);
this.checkBox4.Name = "checkBox4";
this.checkBox4.Size = new System.Drawing.Size(72, 16);
this.checkBox4.TabIndex = 0;
this.checkBox4.Text = "30秒黑场";
this.checkBox4.UseVisualStyleBackColor = true;
//
// checkBox5
//
this.checkBox5.AutoSize = true;
this.checkBox5.Location = new System.Drawing.Point(38, 42);
this.checkBox5.Name = "checkBox5";
this.checkBox5.Size = new System.Drawing.Size(72, 16);
this.checkBox5.TabIndex = 1;
this.checkBox5.Text = "15秒黑场";
this.checkBox5.UseVisualStyleBackColor = true;
//
// checkBox6
//
this.checkBox6.AutoSize = true;
this.checkBox6.Location = new System.Drawing.Point(38, 64);
this.checkBox6.Name = "checkBox6";
this.checkBox6.Size = new System.Drawing.Size(66, 16);
this.checkBox6.TabIndex = 2;
this.checkBox6.Text = "5秒黑场";
this.checkBox6.UseVisualStyleBackColor = true;
//
// button1
//
this.button1.Location = new System.Drawing.Point(267, 244);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2;
this.button1.Text = "确定";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// TitlesCreditsControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(366, 282);
this.Controls.Add(this.button1);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Name = "TitlesCreditsControl";
this.Text = "片头片尾彩条黑场添加";
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
}
解决方案 »
- windows service接口处理中的多线程问题
- GSM 向小灵通发送短信,发送成功,但是小灵通是收不到!
- 必须声明标量变量@ContentId 的问题
- 请问用C#写的winform如何获自身所占用的内存大小?
- 怎样把这个进制转换弄出来(水平有限,只做出了前半部分)!分少,本人奴隶!!
- 写一个form窗体渐变显示的方法!让一个窗体慢慢的显示出来!!
- .net做的安装程序如何读写注册表?
- 如何使生成的安装程序只打成一个Setup.exe文件
- [求助]请问怎样得到显示器当前的分辨率和刷新率?
- 请问toolbar里面的button该如何设置他的快捷键?设置(&字母)没响应啊?
- 配置文件如何添加自定义节点?
- C# 正则表达式替换HTML 中的 script 标签
是不是几个checkbox(复选框)只允许勾选一个?
可以改用radiobutton(单选)或者写事件来限制
多选N就用checkbox。
如果是多选一或者多选0,那就要看怎么方便了,可以radiobutton加清除按钮,或者checkbox控制互斥。如果你说没法做,那只能说明你的逻辑思维能力太差!
checkbox1_Click(object sender, EventArgs e)
{
(CheckBox)cb = (CheckBox)sender;
if (cb.Checked)
{
foreach (Control ctl in cb.GetContainerControl().Controls)
{
CheckBox cb1 = ctl as CheckBox;
if (cb1 != null && cb1 != cb) cb1.Checked = false;
}
}
}
那就checkbox模拟互斥就可以了,
逻辑很简单,不知道你有什么好为难的。