Ejemplo n.º 1
0
 /// <summary>
 /// 窗体正在关闭事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FrmImportExcel_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (!string.IsNullOrEmpty(txtFileFullPath.Text.Trim()))
     {
         if (File.Exists(txtFileFullPath.Text))
         {
             if (XtraMessageBox.Show(@"确定关闭当前窗体吗?", AppMessage.MSG0000, MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.Cancel)
             {
                 e.Cancel = true;
             }
             else
             {
                 BillPrintHelper.SaveDefaultExcelPath(txtFileFullPath.Text);
                 DialogResult = DialogResult.OK;
             }
         }
     }
 }