123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace OTSIncAReportApp._1_UI.Control_Grids
- {
- public partial class SpectrumExportConfirmation : Form
- {
- bool m_SpectrumConfirmation = false;
- bool m_SpectrumData = false;
- bool m_Picture = false;
- string m_savepath = "";
- public bool SpectrumConfirmation
- {
- get
- {
- return m_SpectrumConfirmation;
- }
- set
- {
- m_SpectrumConfirmation = value;
- }
- }
- public bool SpectrumData
- {
- get
- {
- return m_SpectrumData;
- }
- set
- {
- m_SpectrumData = value;
- }
- }
- public bool Picture
- {
- get
- {
- return m_Picture;
- }
- set
- {
- m_Picture = value;
- }
- }
- public string FileName
- {
- get
- {
- return m_savepath;
- }
- set
- {
- m_savepath = value;
- }
- }
- public SpectrumExportConfirmation()
- {
- InitializeComponent();
- }
- private void bt_Path_Click(object sender, EventArgs e)
- {
- //将所有的数据导出到EXCEL中
- SaveFileDialog sfd = new SaveFileDialog();
- sfd.Filter = "Excel File(*.xlsx)|*.xlsx";
- //设置默认文件类型显示顺序
- sfd.FilterIndex = 1;
- sfd.FileName = "ParticlesInfo";
- //保存对话框是否记忆上次打开的目录
- sfd.RestoreDirectory = true;
- if (sfd.ShowDialog() == DialogResult.OK)
- {
- tBox1.Text = sfd.FileName;
- }
- }
- private void cB_SpectrumConfirmation_CheckedChanged(object sender, EventArgs e)
- {
- if(cB_SpectrumConfirmation.Checked)
- {
- m_SpectrumConfirmation = true;
- }
- else
- {
- m_SpectrumConfirmation = false;
- }
- }
- private void bt_Export_Click(object sender, EventArgs e)
- {
- if(tBox1.Text == "")
- {
- MessageBox.Show("save path can not be null!");
- }
- else
- {
- m_savepath = tBox1.Text;
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
-
- }
- private void checkBox1_CheckedChanged(object sender, EventArgs e)
- {
- }
- private void cB_SpectrumData_CheckedChanged(object sender, EventArgs e)
- {
- if (cB_SpectrumData.Checked)
- {
- m_SpectrumData = true;
- }
- else
- {
- m_SpectrumData = false;
- }
- }
- private void cB_Picture_CheckedChanged(object sender, EventArgs e)
- {
- if (cB_Picture.Checked)
- {
- m_Picture = true;
- }
- else
- {
- m_Picture = false;
- }
- }
- }
- }
|