diff --git a/Outlook2013TodoAddIn/AppointmentsControl.cs b/Outlook2013TodoAddIn/AppointmentsControl.cs index 4f1da8d..5605a47 100644 --- a/Outlook2013TodoAddIn/AppointmentsControl.cs +++ b/Outlook2013TodoAddIn/AppointmentsControl.cs @@ -309,24 +309,13 @@ namespace Outlook2013TodoAddIn /// EventArgs private void apptCalendar_DoubleClickEx(object sender, EventArgs e) { - // TODO: Clicking in days outside of the current month will cause the calendar to refresh to that day, reposition all days and - // select the wrong one - //MessageBox.Show(this.apptCalendar.SelectionStart.ToShortDateString()); - - // Get the Outlook folder for the calendar to retrieve the appointments - Outlook.Folder calFolder = - Globals.ThisAddIn.Application.Session.GetDefaultFolder( - Outlook.OlDefaultFolders.olFolderCalendar) - as Outlook.Folder; - - //Outlook.View view = Globals.ThisAddIn.Application.ActiveExplorer().CurrentView; - - foreach (Outlook.View view in Globals.ThisAddIn.Application.ActiveExplorer().CurrentFolder.Views) - { - MessageBox.Show("New view: {0}", view.Name); - } - - //calFolder.Display(); + // TODO: Clicking in days outside of the current month will cause the calendar to refresh to that day + // reposition all days and select the wrong one + Outlook.Folder f = Globals.ThisAddIn.Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar) as Outlook.Folder; + Globals.ThisAddIn.Application.ActiveExplorer().CurrentFolder = f; + Outlook.CalendarView cv = (Outlook.CalendarView)(Globals.ThisAddIn.Application.ActiveExplorer().CurrentView); + cv.CalendarViewMode = Outlook.OlCalendarViewMode.olCalendarViewDay; + cv.GoToDate(this.apptCalendar.SelectionStart); } #endregion "Methods" diff --git a/Outlook2013TodoAddIn/FormRecurringOpen.Designer.cs b/Outlook2013TodoAddIn/FormRecurringOpen.Designer.cs index 4ec929f..c7640df 100644 --- a/Outlook2013TodoAddIn/FormRecurringOpen.Designer.cs +++ b/Outlook2013TodoAddIn/FormRecurringOpen.Designer.cs @@ -38,9 +38,9 @@ // btnOK // this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnOK.Location = new System.Drawing.Point(57, 195); + this.btnOK.Location = new System.Drawing.Point(45, 181); this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(75, 23); + this.btnOK.Size = new System.Drawing.Size(87, 37); this.btnOK.TabIndex = 0; this.btnOK.Text = "OK"; this.btnOK.UseVisualStyleBackColor = true; @@ -48,9 +48,9 @@ // btnCancel // this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(192, 195); + this.btnCancel.Location = new System.Drawing.Point(187, 181); this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.Size = new System.Drawing.Size(87, 37); this.btnCancel.TabIndex = 1; this.btnCancel.Text = "Cancel"; this.btnCancel.UseVisualStyleBackColor = true; @@ -103,6 +103,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "FormRecurringOpen"; + this.ShowIcon = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Open Recurring Item"; this.ResumeLayout(false);