private void addCkdView(CanKaoDianBean cdBean) { CanKaoDianView ckdView = cssCon.canKaoDianAdd(panel1, cdBean, comboBox4.Text, comboBox5.Text); if (ckdView != null) { ckdView.ViewEnable(); ckdView.MouseDown += new MouseEventHandler(CanKaoDianViewMouseDown); ckdView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(CKDView_mouDouble); } }
private void comboBox5_SelectedIndexChanged(object sender, EventArgs e) { if (panel1.Controls.Count > 0) { panel1.Controls.Clear(); } cssCon.comItemSelect2(comboBox4, comboBox5, textBox10, panel1); if (panel1.Controls.Count < 1) { return; } foreach (Control col in panel1.Controls) { if (!(col is CanKaoDianView)) { continue; } CanKaoDianView cView = (CanKaoDianView)col; //cView.Click += new System.EventHandler(this.CanKaoDianView_Click); cView.ViewEnable(); cView.MouseDown += new MouseEventHandler(CanKaoDianViewMouseDown); cView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(CKDView_mouDouble); } }