private void btnEntropy_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (this.ActiveDataForm != null && !this.ActiveDataForm.IsBusy) { var targetform = this.ActiveDataForm; var targettable = targetform.GetDataTable(); ConfigForm.AttributeSelectionForm configform = new ConfigForm.AttributeSelectionForm(targettable.Name, targettable.GetColumnsList(false, typeof(string), typeof(DateTime), typeof(bool))); if (configform.ShowDialog() == DialogResult.OK) { try { MdiForm.MdiEntropyResultForm resultform = new MdiForm.MdiEntropyResultForm(targetform); Protocol.Structure.WaitObject wt = new Protocol.Structure.WaitObject(); targetform.DoMethod("计算信息熵", (ThreadPool) => { resultform.Result = Kernel.BusinessLogicOperation.DataProcessOperation.Entropy(targettable, configform.SelectedColumns, wt); }, wt, () => { this.Invoke(new Action(() => { resultform.ShowResult(); resultform.Show(); })); }); } catch (Exception ex) { MessageBox.Show(ex.Message); } } } }