private void mtb_read_Click(object sender, System.EventArgs e) { OpenFlowDialog ofd=new OpenFlowDialog(); if(ofd.ShowDialog()==DialogResult.OK) { this.selectFileName=ofd.OpenFileName; if(ofd.OpenType.Equals("OpenXml")) { StreamReader sr=new StreamReader(Application.StartupPath+"\\WorkFlowXml\\"+this.selectFileName); DrawForXml(sr.ReadToEnd(),this.selectFileName); sr.Close(); } else { StreamReader sr=new StreamReader(Application.StartupPath+"\\WorkFlowMode\\"+this.selectFileName); DrawForXml(sr.ReadToEnd(),this.selectFileName); sr.Close(); } } }
/// <summary> /// ��ȡ����ͼ��ģ������ /// </summary> /// <param name="fileandmode"></param> /// <returns></returns> public void GetFilesAndModes(string fileandmode) { loadingForm.Hide(); OpenFlowDialog ofd=new OpenFlowDialog(); if(ofd.ShowDialog()==DialogResult.OK) { selectFileName=ofd.OpenFileName; } }