public fGraficoNatureza(char origem) { this.origem = origem; InitializeComponent(); if (origem == 'p') { titulos_pagar = new cTitulosPagar(); } else { titulos_receber = new cTitulosXeceber(); } valores = new ArrayList(); descricoes = new ArrayList(); dtpInicial.Value = DateTime.Now; int d = DateTime.Now.Day; int m = DateTime.Now.Month; int a = DateTime.Now.Year; dtpInicial.Value = Globais.StrToDateTime(string.Format("{0}/{1}/{2}", m, 1, a)); if (m == 12) { a++; } else { m++; } dtpFinal.Value = Globais.StrToDateTime(string.Format("{0}/{1}/{2}", m, 1, a)).AddDays(-1); }