using DevExpress.XtraEditors; using System.Windows.Forms; namespace TProduct.WinFrmUI.TValve { /// /// 性能测试 /// public partial class FeatTestViewMainPage { private void barBtn导出测试报告_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { SetTestReportInfoDlg dlg = new SetTestReportInfoDlg(); dlg.SetBindingData(this._testProject); if (dlg.ShowDialog() != DialogResult.OK) return; var file_path = dlg.GetFilePah(); var file_helepr = new TProduct.DataFile.ValveReport.TestReportFile1(); var user_name = new BLL.LoginUser().GetRealNameByID(this._testProject.CreateUserID); //file_helepr.SetPumpGraph(GetFeatChartImage()); file_helepr.SetBindingData( this._currentValve, this._currentPart, this._testProject, this._featTestItem, user_name ); if (file_helepr.Create(file_path, (info, type) => { MessageBox.Show(info); }) == null) { TProduct.WinFrmUI.FileMessageBox.Show(file_path, TProduct.UserSetting.Localization.Current); } } /// /// /// /// /// private void bbi导出性能曲线图_CAD_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { } /// /// /// /// /// private void bbi导出性能曲线图_图片_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { } private void bbi导出性能曲线图_XML_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { } string InvalidFileNameChar = "/:*?\"<>|"; private bool CheckInvalidFileName(string fileName) { for (int i = 0; i < InvalidFileNameChar.Length; i++) { if (fileName.Contains(InvalidFileNameChar[i].ToString())) { XtraMessageBox.Show(string.Format("{0},含有特殊符号,{1},", "不能作为文件名,请修改", InvalidFileNameChar[i])); return false; } } return true; } } }