/// <summary> /// 发送按钮 实现 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void toolStripButton2_Click(object sender, EventArgs e) { //发送前先判断 是否已经配置过 发送者邮箱和密码 Config cfg = null; if (!myUtils.existsCache(SysConstant.CACHE_CONFIG)) { cfg = myUtils.XMLReaderByConfig(configFilePath); } else { cfg = (Config)myUtils.getCache(SysConstant.CACHE_CONFIG); } if (cfg == null || string.IsNullOrWhiteSpace(cfg.SenderEmail) || string.IsNullOrWhiteSpace(cfg.EmailPwd)) { configForm cf = new configForm(); cf.ShowDialog(); } else { contentForm form = new contentForm(this.dataGridView1); form.ShowDialog(); } }
/// <summary> /// 系统配置 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void toolStripButton3_Click(object sender, EventArgs e) { configForm config = new configForm(); config.ShowDialog(); }