duheng
2024-12-23 9576b66b52fa7c9985489c950a3b726671d5fd1a
WinFrmUI/HStation.WinFrmUI.Assets.Core/01-pump/07-PumpChart/01-import/02-image/ImportPumpPerform2dByImageDlg.cs
@@ -100,24 +100,13 @@
            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);
                }
            }
        }
    }