Added optional localized day names
This commit is contained in:
parent
0d5d1b8027
commit
b5d563fb36
@ -41,6 +41,11 @@ namespace Outlook2013TodoAddIn
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ShowFriendlyGroupHeaders { get; set; }
|
public bool ShowFriendlyGroupHeaders { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets/sets whether to show localized day names next to the days
|
||||||
|
/// </summary>
|
||||||
|
public bool ShowDayNames { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets/sets the selected calendar date
|
/// Gets/sets the selected calendar date
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -236,6 +241,10 @@ namespace Outlook2013TodoAddIn
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.ShowDayNames)
|
||||||
|
{
|
||||||
|
groupHeaderText += " (" + i.Start.ToString("dddd") + ")";
|
||||||
|
}
|
||||||
grp = new ListViewGroup(groupHeaderText, HorizontalAlignment.Left);
|
grp = new ListViewGroup(groupHeaderText, HorizontalAlignment.Left);
|
||||||
this.lstAppointments.Groups.Add(grp); // TODO: Style it?
|
this.lstAppointments.Groups.Add(grp); // TODO: Style it?
|
||||||
sameDay = i.Start.Day;
|
sameDay = i.Start.Day;
|
||||||
@ -455,6 +464,7 @@ namespace Outlook2013TodoAddIn
|
|||||||
this.ShowPastAppointments = cfg.ShowPastAppointments;
|
this.ShowPastAppointments = cfg.ShowPastAppointments;
|
||||||
this.Accounts = cfg.Accounts;
|
this.Accounts = cfg.Accounts;
|
||||||
this.ShowFriendlyGroupHeaders = cfg.ShowFriendlyGroupHeaders;
|
this.ShowFriendlyGroupHeaders = cfg.ShowFriendlyGroupHeaders;
|
||||||
|
this.ShowDayNames = cfg.ShowDayNames;
|
||||||
this.ShowTasks = cfg.ShowTasks;
|
this.ShowTasks = cfg.ShowTasks;
|
||||||
this.FirstDayOfWeek = cfg.FirstDayOfWeek;
|
this.FirstDayOfWeek = cfg.FirstDayOfWeek;
|
||||||
this.RetrieveData();
|
this.RetrieveData();
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
this.chkShowTasks = new System.Windows.Forms.CheckBox();
|
this.chkShowTasks = new System.Windows.Forms.CheckBox();
|
||||||
this.cboFirstDayOfWeek = new System.Windows.Forms.ComboBox();
|
this.cboFirstDayOfWeek = new System.Windows.Forms.ComboBox();
|
||||||
this.lblFirstDayOfWeek = new System.Windows.Forms.Label();
|
this.lblFirstDayOfWeek = new System.Windows.Forms.Label();
|
||||||
|
this.chkShowDayNames = new System.Windows.Forms.CheckBox();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.numRangeDays)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.numRangeDays)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
@ -87,7 +88,7 @@
|
|||||||
// 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(168, 374);
|
this.btnCancel.Location = new System.Drawing.Point(168, 403);
|
||||||
this.btnCancel.Name = "btnCancel";
|
this.btnCancel.Name = "btnCancel";
|
||||||
this.btnCancel.Size = new System.Drawing.Size(87, 37);
|
this.btnCancel.Size = new System.Drawing.Size(87, 37);
|
||||||
this.btnCancel.TabIndex = 11;
|
this.btnCancel.TabIndex = 11;
|
||||||
@ -97,7 +98,7 @@
|
|||||||
// 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(26, 374);
|
this.btnOK.Location = new System.Drawing.Point(26, 403);
|
||||||
this.btnOK.Name = "btnOK";
|
this.btnOK.Name = "btnOK";
|
||||||
this.btnOK.Size = new System.Drawing.Size(87, 37);
|
this.btnOK.Size = new System.Drawing.Size(87, 37);
|
||||||
this.btnOK.TabIndex = 10;
|
this.btnOK.TabIndex = 10;
|
||||||
@ -118,7 +119,7 @@
|
|||||||
// chkListCalendars
|
// chkListCalendars
|
||||||
//
|
//
|
||||||
this.chkListCalendars.FormattingEnabled = true;
|
this.chkListCalendars.FormattingEnabled = true;
|
||||||
this.chkListCalendars.Location = new System.Drawing.Point(26, 259);
|
this.chkListCalendars.Location = new System.Drawing.Point(26, 288);
|
||||||
this.chkListCalendars.Name = "chkListCalendars";
|
this.chkListCalendars.Name = "chkListCalendars";
|
||||||
this.chkListCalendars.Size = new System.Drawing.Size(229, 106);
|
this.chkListCalendars.Size = new System.Drawing.Size(229, 106);
|
||||||
this.chkListCalendars.TabIndex = 13;
|
this.chkListCalendars.TabIndex = 13;
|
||||||
@ -126,7 +127,7 @@
|
|||||||
// lblAccounts
|
// lblAccounts
|
||||||
//
|
//
|
||||||
this.lblAccounts.AutoSize = true;
|
this.lblAccounts.AutoSize = true;
|
||||||
this.lblAccounts.Location = new System.Drawing.Point(23, 239);
|
this.lblAccounts.Location = new System.Drawing.Point(23, 268);
|
||||||
this.lblAccounts.Name = "lblAccounts";
|
this.lblAccounts.Name = "lblAccounts";
|
||||||
this.lblAccounts.Size = new System.Drawing.Size(70, 17);
|
this.lblAccounts.Size = new System.Drawing.Size(70, 17);
|
||||||
this.lblAccounts.TabIndex = 14;
|
this.lblAccounts.TabIndex = 14;
|
||||||
@ -145,7 +146,7 @@
|
|||||||
// chkShowTasks
|
// chkShowTasks
|
||||||
//
|
//
|
||||||
this.chkShowTasks.AutoSize = true;
|
this.chkShowTasks.AutoSize = true;
|
||||||
this.chkShowTasks.Location = new System.Drawing.Point(45, 148);
|
this.chkShowTasks.Location = new System.Drawing.Point(45, 177);
|
||||||
this.chkShowTasks.Name = "chkShowTasks";
|
this.chkShowTasks.Name = "chkShowTasks";
|
||||||
this.chkShowTasks.Size = new System.Drawing.Size(106, 21);
|
this.chkShowTasks.Size = new System.Drawing.Size(106, 21);
|
||||||
this.chkShowTasks.TabIndex = 16;
|
this.chkShowTasks.TabIndex = 16;
|
||||||
@ -157,7 +158,7 @@
|
|||||||
//
|
//
|
||||||
this.cboFirstDayOfWeek.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
this.cboFirstDayOfWeek.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cboFirstDayOfWeek.FormattingEnabled = true;
|
this.cboFirstDayOfWeek.FormattingEnabled = true;
|
||||||
this.cboFirstDayOfWeek.Location = new System.Drawing.Point(45, 201);
|
this.cboFirstDayOfWeek.Location = new System.Drawing.Point(45, 230);
|
||||||
this.cboFirstDayOfWeek.Name = "cboFirstDayOfWeek";
|
this.cboFirstDayOfWeek.Name = "cboFirstDayOfWeek";
|
||||||
this.cboFirstDayOfWeek.Size = new System.Drawing.Size(186, 24);
|
this.cboFirstDayOfWeek.Size = new System.Drawing.Size(186, 24);
|
||||||
this.cboFirstDayOfWeek.TabIndex = 17;
|
this.cboFirstDayOfWeek.TabIndex = 17;
|
||||||
@ -165,12 +166,22 @@
|
|||||||
// lblFirstDayOfWeek
|
// lblFirstDayOfWeek
|
||||||
//
|
//
|
||||||
this.lblFirstDayOfWeek.AutoSize = true;
|
this.lblFirstDayOfWeek.AutoSize = true;
|
||||||
this.lblFirstDayOfWeek.Location = new System.Drawing.Point(42, 181);
|
this.lblFirstDayOfWeek.Location = new System.Drawing.Point(42, 210);
|
||||||
this.lblFirstDayOfWeek.Name = "lblFirstDayOfWeek";
|
this.lblFirstDayOfWeek.Name = "lblFirstDayOfWeek";
|
||||||
this.lblFirstDayOfWeek.Size = new System.Drawing.Size(124, 17);
|
this.lblFirstDayOfWeek.Size = new System.Drawing.Size(124, 17);
|
||||||
this.lblFirstDayOfWeek.TabIndex = 18;
|
this.lblFirstDayOfWeek.TabIndex = 18;
|
||||||
this.lblFirstDayOfWeek.Text = "First Day of Week:";
|
this.lblFirstDayOfWeek.Text = "First Day of Week:";
|
||||||
//
|
//
|
||||||
|
// chkShowDayNames
|
||||||
|
//
|
||||||
|
this.chkShowDayNames.AutoSize = true;
|
||||||
|
this.chkShowDayNames.Location = new System.Drawing.Point(45, 150);
|
||||||
|
this.chkShowDayNames.Name = "chkShowDayNames";
|
||||||
|
this.chkShowDayNames.Size = new System.Drawing.Size(141, 21);
|
||||||
|
this.chkShowDayNames.TabIndex = 19;
|
||||||
|
this.chkShowDayNames.Text = "Show Day Names";
|
||||||
|
this.chkShowDayNames.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
// FormConfiguration
|
// FormConfiguration
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.btnOK;
|
this.AcceptButton = this.btnOK;
|
||||||
@ -178,6 +189,7 @@
|
|||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.CancelButton = this.btnCancel;
|
this.CancelButton = this.btnCancel;
|
||||||
this.ClientSize = new System.Drawing.Size(282, 452);
|
this.ClientSize = new System.Drawing.Size(282, 452);
|
||||||
|
this.Controls.Add(this.chkShowDayNames);
|
||||||
this.Controls.Add(this.lblFirstDayOfWeek);
|
this.Controls.Add(this.lblFirstDayOfWeek);
|
||||||
this.Controls.Add(this.cboFirstDayOfWeek);
|
this.Controls.Add(this.cboFirstDayOfWeek);
|
||||||
this.Controls.Add(this.chkShowTasks);
|
this.Controls.Add(this.chkShowTasks);
|
||||||
@ -218,5 +230,6 @@
|
|||||||
private System.Windows.Forms.CheckBox chkShowTasks;
|
private System.Windows.Forms.CheckBox chkShowTasks;
|
||||||
private System.Windows.Forms.ComboBox cboFirstDayOfWeek;
|
private System.Windows.Forms.ComboBox cboFirstDayOfWeek;
|
||||||
private System.Windows.Forms.Label lblFirstDayOfWeek;
|
private System.Windows.Forms.Label lblFirstDayOfWeek;
|
||||||
|
private System.Windows.Forms.CheckBox chkShowDayNames;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -67,6 +67,15 @@ namespace Outlook2013TodoAddIn.Forms
|
|||||||
set { this.chkFriendlyGroupHeaders.Checked = value; }
|
set { this.chkFriendlyGroupHeaders.Checked = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets/sets whether to show localized day names next to the days
|
||||||
|
/// </summary>
|
||||||
|
public bool ShowDayNames
|
||||||
|
{
|
||||||
|
get { return this.chkShowDayNames.Checked; }
|
||||||
|
set { this.chkShowDayNames.Checked = value; }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets/sets whether to show the tasks list
|
/// Gets/sets whether to show the tasks list
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -108,6 +117,7 @@ namespace Outlook2013TodoAddIn.Forms
|
|||||||
this.chkMailAlerts.Checked = Properties.Settings.Default.MailAlertsEnabled;
|
this.chkMailAlerts.Checked = Properties.Settings.Default.MailAlertsEnabled;
|
||||||
this.chkShowPastAppointments.Checked = Properties.Settings.Default.ShowPastAppointments;
|
this.chkShowPastAppointments.Checked = Properties.Settings.Default.ShowPastAppointments;
|
||||||
this.chkFriendlyGroupHeaders.Checked = Properties.Settings.Default.ShowFriendlyGroupHeaders;
|
this.chkFriendlyGroupHeaders.Checked = Properties.Settings.Default.ShowFriendlyGroupHeaders;
|
||||||
|
this.chkShowDayNames.Checked = Properties.Settings.Default.ShowDayNames;
|
||||||
this.chkShowTasks.Checked = Properties.Settings.Default.ShowTasks;
|
this.chkShowTasks.Checked = Properties.Settings.Default.ShowTasks;
|
||||||
this.LoadStores();
|
this.LoadStores();
|
||||||
this.LoadDays();
|
this.LoadDays();
|
||||||
@ -147,6 +157,7 @@ namespace Outlook2013TodoAddIn.Forms
|
|||||||
Properties.Settings.Default.ShowPastAppointments = this.chkShowPastAppointments.Checked;
|
Properties.Settings.Default.ShowPastAppointments = this.chkShowPastAppointments.Checked;
|
||||||
Properties.Settings.Default.Accounts = this.Accounts;
|
Properties.Settings.Default.Accounts = this.Accounts;
|
||||||
Properties.Settings.Default.ShowFriendlyGroupHeaders = this.chkFriendlyGroupHeaders.Checked;
|
Properties.Settings.Default.ShowFriendlyGroupHeaders = this.chkFriendlyGroupHeaders.Checked;
|
||||||
|
Properties.Settings.Default.ShowDayNames = this.chkShowDayNames.Checked;
|
||||||
Properties.Settings.Default.ShowTasks = this.chkShowTasks.Checked;
|
Properties.Settings.Default.ShowTasks = this.chkShowTasks.Checked;
|
||||||
Properties.Settings.Default.FirstDayOfWeek = (System.DayOfWeek)Enum.Parse(typeof(System.DayOfWeek), this.cboFirstDayOfWeek.SelectedValue.ToString());
|
Properties.Settings.Default.FirstDayOfWeek = (System.DayOfWeek)Enum.Parse(typeof(System.DayOfWeek), this.cboFirstDayOfWeek.SelectedValue.ToString());
|
||||||
}
|
}
|
||||||
|
12
Outlook2013TodoAddIn/Properties/Settings.Designer.cs
generated
12
Outlook2013TodoAddIn/Properties/Settings.Designer.cs
generated
@ -153,5 +153,17 @@ namespace Outlook2013TodoAddIn.Properties {
|
|||||||
this["SplitterDistance"] = value;
|
this["SplitterDistance"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||||
|
public bool ShowDayNames {
|
||||||
|
get {
|
||||||
|
return ((bool)(this["ShowDayNames"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["ShowDayNames"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,5 +35,8 @@
|
|||||||
<Setting Name="SplitterDistance" Type="System.Int32" Scope="User">
|
<Setting Name="SplitterDistance" Type="System.Int32" Scope="User">
|
||||||
<Value Profile="(Default)">400</Value>
|
<Value Profile="(Default)">400</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
|
<Setting Name="ShowDayNames" Type="System.Boolean" Scope="User">
|
||||||
|
<Value Profile="(Default)">True</Value>
|
||||||
|
</Setting>
|
||||||
</Settings>
|
</Settings>
|
||||||
</SettingsFile>
|
</SettingsFile>
|
@ -44,6 +44,7 @@ namespace Outlook2013TodoAddIn
|
|||||||
this.AppControl.ShowPastAppointments = Properties.Settings.Default.ShowPastAppointments;
|
this.AppControl.ShowPastAppointments = Properties.Settings.Default.ShowPastAppointments;
|
||||||
this.AppControl.Accounts = Properties.Settings.Default.Accounts;
|
this.AppControl.Accounts = Properties.Settings.Default.Accounts;
|
||||||
this.AppControl.ShowFriendlyGroupHeaders = Properties.Settings.Default.ShowFriendlyGroupHeaders;
|
this.AppControl.ShowFriendlyGroupHeaders = Properties.Settings.Default.ShowFriendlyGroupHeaders;
|
||||||
|
this.AppControl.ShowDayNames = Properties.Settings.Default.ShowDayNames;
|
||||||
this.AppControl.ShowTasks = Properties.Settings.Default.ShowTasks;
|
this.AppControl.ShowTasks = Properties.Settings.Default.ShowTasks;
|
||||||
this.AppControl.FirstDayOfWeek = Properties.Settings.Default.FirstDayOfWeek;
|
this.AppControl.FirstDayOfWeek = Properties.Settings.Default.FirstDayOfWeek;
|
||||||
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
|
||||||
|
@ -37,6 +37,9 @@
|
|||||||
<setting name="SplitterDistance" serializeAs="String">
|
<setting name="SplitterDistance" serializeAs="String">
|
||||||
<value>400</value>
|
<value>400</value>
|
||||||
</setting>
|
</setting>
|
||||||
|
<setting name="ShowDayNames" serializeAs="String">
|
||||||
|
<value>True</value>
|
||||||
|
</setting>
|
||||||
</Outlook2013TodoAddIn.Properties.Settings>
|
</Outlook2013TodoAddIn.Properties.Settings>
|
||||||
</userSettings>
|
</userSettings>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
||||||
|
Loading…
Reference in New Issue
Block a user