private void openFileCallBack(object obj, LoadingForm form) { try { object[] objs = (object[])obj; string fileName = objs[1].ToString(); MethodParamInvoker mpi = new MethodParamInvoker(form.setLoadingText); this.BeginInvoke(mpi, "加载文件."); System.Threading.Thread.Sleep(60 * 1000); } catch (Exception e) { MessageBox.Show("openFileCallBack:" + e.Message); } }
private void openFileCallBack(object obj,LoadingForm form) { try { object[] objs=(object[])obj; string fileName = objs[1].ToString(); //MethodInvoker mi = new MethodInvoker(form.setLoadingText); //this.BeginInvoke(mi); MethodParamInvoker mpi = new MethodParamInvoker(form.setLoadingText); this.BeginInvoke(mpi, "加载.Mesh文件."); MeshDisControl meshDisControl = (MeshDisControl)objs[0]; //form.loadingText = "加载.Mesh文件."; meshDisControl.MeshDis(fileName.ToString()); } catch (Exception e) { MessageBox.Show("openFileCallBack:"+e.Message); } }