void bool_Translate(Label label, SkinRadioButton valueY, SkinRadioButton valueN, int numValue) { formTool.RadioButtonY = valueY; formTool.RadioButtonN = valueN; formTool.Label = label; formTool.NumValue = numValue; }
private void boolSetting(int selectNum) { Label boolLabelName = new Label(); boolLabelName.Text = labelName.Text; SkinRadioButton skinRadioButton1 = new SkinRadioButton(); skinRadioButton1.Text = "是"; SkinRadioButton skinRadioButton2 = new SkinRadioButton(); skinRadioButton2.Text = "否"; boolLabelName.Font = fontNew; skinRadioButton1.Font = fontNew; skinRadioButton2.Font = fontNew; boolLabelName.ForeColor = colorNew; skinRadioButton1.ForeColor = colorNew; skinRadioButton2.ForeColor = colorNew; boolLabelName.AutoSize = true; skinRadioButton1.AutoSize = true; skinRadioButton2.AutoSize = true; boolTranslate(boolLabelName, skinRadioButton1, skinRadioButton2, selectNum); }
//add a bool setting form and limitation form private void skinButton3_Click(object sender, EventArgs e) { BoolForm boolForm = new BoolForm(); boolForm.boolTranslate += new boolTranslateEventHandler(bool_Translate); boolForm.ShowDialog(); //create the tool Label nlabel = new Label(); SkinRadioButton radioButtonY = new SkinRadioButton(); SkinRadioButton radioButtonN = new SkinRadioButton(); nlabel = formTool.Label; radioButtonN = formTool.RadioButtonN; radioButtonY = formTool.RadioButtonY; //add to the panel skinSplitContainer1.Panel2.Controls.Add(nlabel); skinSplitContainer1.Panel2.Controls.Add(radioButtonY); skinSplitContainer1.Panel2.Controls.Add(radioButtonN); nlabel.Show(); radioButtonN.Show(); radioButtonY.Show(); //可移动设置 DragControlClass obj = new DragControlClass(nlabel); DragControlClass obj1 = new DragControlClass(radioButtonY); DragControlClass obj2 = new DragControlClass(radioButtonN); }