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>
|
/// <param name="e">EventArgs</param>
|
||||||
private void apptCalendar_DoubleClickEx(object sender, EventArgs e)
|
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
|
// TODO: Clicking in days outside of the current month will cause the calendar to refresh to that day
|
||||||
// select the wrong one
|
// reposition all days and select the wrong one
|
||||||
//MessageBox.Show(this.apptCalendar.SelectionStart.ToShortDateString());
|
Outlook.Folder f = Globals.ThisAddIn.Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar) as Outlook.Folder;
|
||||||
|
Globals.ThisAddIn.Application.ActiveExplorer().CurrentFolder = f;
|
||||||
// Get the Outlook folder for the calendar to retrieve the appointments
|
Outlook.CalendarView cv = (Outlook.CalendarView)(Globals.ThisAddIn.Application.ActiveExplorer().CurrentView);
|
||||||
Outlook.Folder calFolder =
|
cv.CalendarViewMode = Outlook.OlCalendarViewMode.olCalendarViewDay;
|
||||||
Globals.ThisAddIn.Application.Session.GetDefaultFolder(
|
cv.GoToDate(this.apptCalendar.SelectionStart);
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion "Methods"
|
#endregion "Methods"
|
||||||
|
@ -38,9 +38,9 @@
|
|||||||
// btnOK
|
// btnOK
|
||||||
//
|
//
|
||||||
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
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.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.TabIndex = 0;
|
||||||
this.btnOK.Text = "OK";
|
this.btnOK.Text = "OK";
|
||||||
this.btnOK.UseVisualStyleBackColor = true;
|
this.btnOK.UseVisualStyleBackColor = true;
|
||||||
@ -48,9 +48,9 @@
|
|||||||
// btnCancel
|
// btnCancel
|
||||||
//
|
//
|
||||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
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.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.TabIndex = 1;
|
||||||
this.btnCancel.Text = "Cancel";
|
this.btnCancel.Text = "Cancel";
|
||||||
this.btnCancel.UseVisualStyleBackColor = true;
|
this.btnCancel.UseVisualStyleBackColor = true;
|
||||||
@ -103,6 +103,7 @@
|
|||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
this.Name = "FormRecurringOpen";
|
this.Name = "FormRecurringOpen";
|
||||||
|
this.ShowIcon = false;
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
this.Text = "Open Recurring Item";
|
this.Text = "Open Recurring Item";
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user