/// <summary> /// 设置接口实例 /// </summary> private void GetInterface() { this.Clear(); //通过反射方式读取Factory文件 这样 可以将 Factory与其他相关的类型文件全部挪出UFC 实现自定义 MatFactory factory = new MatFactory(); this.IManager = factory.GetApplyInstance(this.PrivType, this); if (this.IManager == null) { System.Windows.Forms.MessageBox.Show("根据申请类别获取对应接口实例失败"); return; } this.neuSpread1_Sheet1.DataAutoSizeColumns = false; this.neuSpread1_Sheet1.DataSource = null; //为了实现过滤 赋值DefaultView DataTable dtTemp = this.IManager.InitDataTable(); if (dtTemp != null) { this.neuSpread1_Sheet1.DataSource = dtTemp.DefaultView; } else { this.neuSpread1_Sheet1.DataSource = dtTemp; } this.IManager.SetFormat(); //格式化 this.IManager.SetFocusSelect(); //焦点设置 this.neuPanel1.SuspendLayout(); this.neuPanel3.SuspendLayout(); this.neuPanel4.SuspendLayout(); this.panelItemSelect.SuspendLayout(); this.SuspendLayout(); this.AddItemInputUC(this.IManager.InputModualUC); this.neuPanel1.ResumeLayout(); this.neuPanel3.ResumeLayout(); this.neuPanel4.ResumeLayout(); this.panelItemSelect.ResumeLayout(); this.ResumeLayout(); }