private void btnRecordar_Click_1(object sender, RoutedEventArgs e) { ClaseRecordatorios record = new ClaseRecordatorios(); string longitud = string.Format("{0:n3}", Double.Parse(txtlongitud.Text)); string latitud = string.Format("{0:n3}", Double.Parse(txtlatitud.Text)); string mensaje = string.Format("{0} / {1}", longitud, latitud); record.AddRecordatorio(DateTime.Now, mensaje, mensaje); }
private void btnGuardar_Click_1(object sender, RoutedEventArgs e) { ClaseRecordatorios record = new ClaseRecordatorios(); DateTime fecha = dpFecha.Value.HasValue ? dpFecha.Value.Value : DateTime.Now; TimeSpan hora = dpHora.Value.HasValue ? dpHora.Value.Value.TimeOfDay : DateTime.Now.TimeOfDay; string mensaje = txtMensaje.Text; fecha = fecha.Date + hora; record.AddRecordatorio(fecha, txtTitulo.Text, mensaje); }