using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Outlook2013TodoAddIn.Forms
{
public partial class FormConfiguration : Form
{
#region "Properties"
///
/// Number of days (including today) to retrieve appointments from in the future
///
public decimal NumDays
{
get { return this.numRangeDays.Value; }
set { this.numRangeDays.Value = value; }
}
///
/// Gets/sets whether mail notifications are enabled or not
///
public bool MailAlertsEnabled
{
get { return this.chkMailAlerts.Checked; }
set { this.chkMailAlerts.Checked = value; }
}
///
/// Gets/sets whether to show past appointments in the current day or not
///
public bool ShowPastAppointments
{
get { return this.chkShowPastAppointments.Checked; }
set { this.chkShowPastAppointments.Checked = value; }
}
#endregion "Properties"
#region "Methods"
///
/// Default constructor
///
public FormConfiguration()
{
InitializeComponent();
}
///
/// On load, display saved configuration
///
/// Sender
/// EventArgs
private void FormConfiguration_Load(object sender, EventArgs e)
{
this.numRangeDays.Value = Properties.Settings.Default.NumDays;
this.chkMailAlerts.Checked = Properties.Settings.Default.MailAlertsEnabled;
this.chkShowPastAppointments.Checked = Properties.Settings.Default.ShowPastAppointments;
}
///
/// Clicking the OK button
///
/// Sender
/// EventArgs
private void btnOK_Click(object sender, EventArgs e)
{
Properties.Settings.Default.NumDays = this.numRangeDays.Value;
Properties.Settings.Default.MailAlertsEnabled = this.chkMailAlerts.Checked;
Properties.Settings.Default.ShowPastAppointments = this.chkShowPastAppointments.Checked;
}
#endregion "Methods"
}
}