| | |
| | | if (e.Button.Tag.ToString() == "Import") |
| | | { |
| | | var dlg = new System.Windows.Forms.OpenFileDialog(); |
| | | dlg.Filter = "EXCEL 文件(*.xls)|*.xls"; |
| | | dlg.Title = "选择图片文件"; |
| | | dlg.Filter = "图片|*.png;*.jpg"; |
| | | dlg.CheckFileExists = true; |
| | | if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK) |
| | | return; |
| | | this.btnEditPicture.Text = dlg.FileName; |
| | | this.pumpChartImageImportCtrl1.SetBindingData(this.btnEditPicture.Text); |
| | | } |
| | | else if (e.Button.Tag.ToString() == "Download") |
| | | { |
| | | var dlg = new OpenFileDialog(); |
| | | dlg.Title = "选择图片文件"; |
| | | dlg.Filter = "图片|*.png;*.jpg"; |
| | | if (dlg.ShowDialog() == DialogResult.OK) |
| | | { |
| | | var fileName = dlg.FileName; |
| | | this.btnEditPicture.EditValue = fileName; |
| | | this.pumpChartImageImportCtrl1.SetBindingData(fileName); |
| | | } |
| | | } |
| | | } |
| | | } |