12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Linq;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using DevExpress.XtraEditors;
- namespace Uninpho.Tools.components.SomethingSetting
- {
- public partial class DownloadDemoFrom : DevExpress.XtraEditors.XtraForm
- {
- public DownloadDemoFrom()
- {
- InitializeComponent();
- }
- private void comboBoxEdit1_SelectedIndexChanged(object sender, EventArgs e)
- {
- }
- private void simpleButton1_Click(object sender, EventArgs e)
- {
- SaveFileDialog ofd = new SaveFileDialog();
- ofd.FileName = comboBoxEdit1.Text;
- ofd.Title = "请选择保存位置";
- ofd.Filter = "Excel文件(*.xls)|*.xls|All files(*.*)|*.*";
- if (ofd.ShowDialog() == DialogResult.OK)
- {
- string saveurl = ofd.FileName;
- switch (comboBoxEdit1.Text)
- {
- case "曲线台账模板":
- DataAnalysis.DACommon.FileCopy(Application.StartupPath + "//demoF//曲线台账.xls",saveurl);
- break;
- case "道岔台账模板":
- DataAnalysis.DACommon.FileCopy(Application.StartupPath + "//demoF//道岔台账.xls", saveurl);
- break;
- case "管界台账模板":
- DataAnalysis.DACommon.FileCopy(Application.StartupPath + "//demoF//管界台账.xls", saveurl);
- break;
- default:
- break;
- }
- XtraMessageBox.Show("下载完成!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
- }
- }
- }
|