private void frmPrincipal_Shown(object sender, EventArgs e) { frmEmailContador2 objfrmContador = new frmEmailContador2(); if (objfrmContador.VerificaDiaEmailContador()) { try { string sArquivo = DateTime.Now.Date.ToString("MMyy") + ".zip"; DirectoryInfo info = new DirectoryInfo(Pastas.ENVIADOS + "\\Contador_xml\\"); if (!info.Exists) { info.Create(); } string sCaminho = info.FullName + "\\" + sArquivo; if (!File.Exists(sCaminho)) { frmInformacao frm = new frmInformacao("Hoje é dia de enviar Email para o Contador." + Environment.NewLine + "Verifique suas Pendências."); frm.ShowDialog(); objfrmContador.ShowDialog(); } } catch (Exception ex) { new HLPexception(ex); } } }
private void AbreFormAbaConfig() { try { if (tvFerramentas.SelectedNode != null) { TreeNode nodeItem = tvFerramentas.SelectedNode; switch (nodeItem.Tag.ToString()) { case "frmLoginConfig": AbreFormConfig(); break; case "frmSelecionaConfigs": foreach (Control crt in this.splitContainerTela.Panel2.Controls) { if (crt.GetType().BaseType == typeof(KryptonForm)) { ((Form)crt).Close(); } } frmSelecionaConfigs objfrmConfig = new frmSelecionaConfigs(); objfrmConfig.ShowDialog(); if (objfrmConfig.ArquivoSelecionado) { if (!Acesso.bESCRITA) { frmLogin objfrmLogin = new frmLogin(); objfrmLogin.ShowDialog(); } frmPrincipal_Load(new object(), new EventArgs()); } break; case "frmEmailContador": if (Acesso.VerificaDadosEmail()) { frmEmailContador2 objfrmEmail = new frmEmailContador2(); objfrmEmail.ShowDialog(); } else { KryptonMessageBox.Show(null, "Campos para o envio de e-mail não estão preenchidos corretamente!", Mensagens.CHeader, MessageBoxButtons.OK, MessageBoxIcon.Information); } break; case "Disponibilidade": System.Diagnostics.Process.Start("http://www.nfe.fazenda.gov.br/portal/disponibilidade.aspx?versao=2.00&tipoConteudo=Skeuqr8PQBY="); break; } } } catch (Exception ex) { new HLPexception(ex); } }