Exemple #1
0
 private void btEdit_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(_expFile) || !File.Exists(_expFile))
     {
         return;
     }
     using (frmDroughtSetting frm = new frmDroughtSetting(_cur, _expFile))
     {
         if (frm.ShowDialog() != DialogResult.OK)
         {
             Reload();
             //_cur = ReadExpCofficientFile.LoadExpCoefficientFile(_expFile);
         }
     }
     if (_handler != null)
     {
         _handler(GetArgumentValue());
     }
     if (BtnEdit_Click != null)
     {
         BtnEdit_Click(_cur);
     }
 }
        private void btOK_Click(object sender, EventArgs e)
        {
            DRTExpCoefficientCollection exp = null;

            if (File.Exists(expFilename))
            {
                exp = ReadExpCofficientFile.LoadExpCoefficientFile(expFilename);
            }
            else
            {
                exp = new DRTExpCoefficientCollection();
            }
            using (frmDroughtSetting frm = new frmDroughtSetting(exp, expFilename))
            {
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    if (_handler != null)
                    {
                        _handler(GetArgumentValue());
                    }
                }
            }
        }