Added double-click to switch to calendar folder on the selected day
This commit is contained in:
parent
4501a61b08
commit
4475ef3b10
@ -309,24 +309,13 @@ namespace Outlook2013TodoAddIn
|
||||
/// <param name="e">EventArgs</param>
|
||||
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"
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user