Fixed initial selected date issue and improved startup time.
This commit is contained in:
parent
06ed1cbd60
commit
cbb4618c7e
@ -40,6 +40,15 @@ namespace Outlook2013TodoAddIn
|
|||||||
set { this.chkMailAlerts.Checked = value; }
|
set { this.chkMailAlerts.Checked = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets/sets the selected calendar date
|
||||||
|
/// </summary>
|
||||||
|
public DateTime SelectedDate
|
||||||
|
{
|
||||||
|
get { return this.apptCalendar.SelectedDate; }
|
||||||
|
set { this.apptCalendar.SelectedDate = value; }
|
||||||
|
}
|
||||||
|
|
||||||
#endregion "Properties"
|
#endregion "Properties"
|
||||||
|
|
||||||
#region "Methods"
|
#region "Methods"
|
||||||
|
@ -106,7 +106,6 @@ namespace Outlook2013TodoAddIn
|
|||||||
public CustomCalendar()
|
public CustomCalendar()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
//this.SelectedDate = DateTime.Today;
|
|
||||||
this.FirstDayOfWeek = DayOfWeek.Sunday;
|
this.FirstDayOfWeek = DayOfWeek.Sunday;
|
||||||
//TODO: Thread.CurrentThread.CurrentCulture.DateTimeFormat.FirstDayOfWeek
|
//TODO: Thread.CurrentThread.CurrentCulture.DateTimeFormat.FirstDayOfWeek
|
||||||
this.CurrentMonthForeColor = Color.Black;
|
this.CurrentMonthForeColor = Color.Black;
|
||||||
@ -131,7 +130,7 @@ namespace Outlook2013TodoAddIn
|
|||||||
{
|
{
|
||||||
// TODO: check initial double firing
|
// TODO: check initial double firing
|
||||||
// TODO: Mark dates with colors from outlook
|
// TODO: Mark dates with colors from outlook
|
||||||
this.UpdateCalendar();
|
// this.UpdateCalendar();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -41,8 +41,7 @@ namespace Outlook2013TodoAddIn
|
|||||||
this.AppControl = new AppointmentsControl();
|
this.AppControl = new AppointmentsControl();
|
||||||
this.AppControl.MailAlertsEnabled = Properties.Settings.Default.MailAlertsEnabled;
|
this.AppControl.MailAlertsEnabled = Properties.Settings.Default.MailAlertsEnabled;
|
||||||
this.AppControl.NumDays = Properties.Settings.Default.NumDays; // Setting the value will load the appointments
|
this.AppControl.NumDays = Properties.Settings.Default.NumDays; // Setting the value will load the appointments
|
||||||
this.AppControl.RetrieveAppointments();
|
|
||||||
|
|
||||||
ToDoTaskPane = this.CustomTaskPanes.Add(this.AppControl, "Appointments");
|
ToDoTaskPane = this.CustomTaskPanes.Add(this.AppControl, "Appointments");
|
||||||
ToDoTaskPane.Visible = Properties.Settings.Default.Visible;
|
ToDoTaskPane.Visible = Properties.Settings.Default.Visible;
|
||||||
ToDoTaskPane.Width = Properties.Settings.Default.Width;
|
ToDoTaskPane.Width = Properties.Settings.Default.Width;
|
||||||
@ -51,6 +50,11 @@ namespace Outlook2013TodoAddIn
|
|||||||
ToDoTaskPane.VisibleChanged += ToDoTaskPane_VisibleChanged;
|
ToDoTaskPane.VisibleChanged += ToDoTaskPane_VisibleChanged;
|
||||||
this.AppControl.SizeChanged += appControl_SizeChanged;
|
this.AppControl.SizeChanged += appControl_SizeChanged;
|
||||||
|
|
||||||
|
// Selecting the date will retrieve the appointments
|
||||||
|
// Otherwise it'll take the one used when the designer changed!
|
||||||
|
this.AppControl.SelectedDate = DateTime.Today;
|
||||||
|
// this.AppControl.RetrieveAppointments();
|
||||||
|
|
||||||
Globals.ThisAddIn.Application.ActiveExplorer().Deactivate += ThisAddIn_Deactivate;
|
Globals.ThisAddIn.Application.ActiveExplorer().Deactivate += ThisAddIn_Deactivate;
|
||||||
|
|
||||||
// TODO: Make sure there are no memory leaks (dispose COM objects)
|
// TODO: Make sure there are no memory leaks (dispose COM objects)
|
||||||
|
Loading…
Reference in New Issue
Block a user