From 97ee881e0b3a3a4b7adf3b7aaf4809cd83d60ab1 Mon Sep 17 00:00:00 2001 From: Art Trenton <48064181+atrenton@users.noreply.github.com> Date: Sun, 5 Dec 2021 12:22:30 -0500 Subject: [PATCH] Release 16.3.0 codebase --- Build.ps1 | 2 +- CHANGELOG.md | 15 + README.md | 23 +- docs/HowTo-Select-OneDrive-Storage-Account.md | 25 ++ docs/HowTo-Select-Rule-Lines.md | 2 + docs/debugging/README.md | 8 +- docs/known-issues.md | 40 +- docs/troubleshooting/OneNote-Library.ps1 | 4 +- docs/usage/select-storage-account.png | Bin 0 -> 3090 bytes scripts/Common-Library.ps1 | 4 +- scripts/Get-OneNote-Desktop-Info.ps1 | 377 ++++++++++++++++++ src/NuGet.config | 7 + src/add-in/API/ApplicationExtensions.cs | 5 +- src/add-in/Add-In.csproj | 16 +- src/add-in/Templates/Outline.cs | 4 +- src/add-in/UI/OptionsForm.Designer.cs | 202 +++++----- src/add-in/UI/OptionsForm.cs | 27 +- 17 files changed, 614 insertions(+), 147 deletions(-) create mode 100644 docs/HowTo-Select-OneDrive-Storage-Account.md create mode 100644 docs/usage/select-storage-account.png create mode 100644 scripts/Get-OneNote-Desktop-Info.ps1 create mode 100644 src/NuGet.config diff --git a/Build.ps1 b/Build.ps1 index e29729b..4258fa6 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -30,7 +30,7 @@ Set-Location $PSScriptRoot # EXAMPLE: "/p:SourceRevisionId=g$(Git-Latest-Commit)" #------------------------------------------------------------------------------- $properties = @('/p:Configuration=Release', "/p:Platform=$Platform", - '/p:Version=16.2.1-beta') + "/p:SourceRevisionId=g$(Git-Latest-Commit)") $sln = '"{0}"' -f "$PSScriptRoot\src\MyJournal.Notebook.sln" diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a2a459..2ced1f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). +## [16.3.0] - 2021-12-05 + +### Added + +- Feature request: configure the notebook used • Issue \#[3] • released from beta + +### Changed + +- Upgraded OneNote XML schema from 2010 to 2013 version + +### Removed + +- OneNote 2010 is no longer supported + ## [16.2.1-beta] - 2021-04-07 ### Added @@ -35,3 +49,4 @@ This project adheres to [Semantic Versioning](https://semver.org/). [16.1.0]:https://github.com/atrenton/MyJournal.Notebook/releases/tag/v16.1.0 [16.2.0]:https://github.com/atrenton/MyJournal.Notebook/releases/tag/v16.2.0 [16.2.1-beta]:https://github.com/atrenton/MyJournal.Notebook/releases/tag/v16.2.1-beta +[16.3.0]:https://github.com/atrenton/MyJournal.Notebook/releases/tag/v16.3.0 diff --git a/README.md b/README.md index b78c8aa..511b83b 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,13 @@ ![screenshot](docs/README-screenshot.png) -[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/atrenton/MyJournal.Notebook?logo=github)](https://github.com/atrenton/MyJournal.Notebook/releases/latest)  [![Gitter chat](https://img.shields.io/gitter/room/atrenton/MyJournalNotebook?logo=gitter)](https://gitter.im/MyJournal-Notebook/community)  [![Keybase chat](https://img.shields.io/static/v1.svg?label=chat&message=on%20keybase&logo=keybase)](https://keybase.io/atrenton/chat)  [![GitHub issues](https://img.shields.io/github/issues/atrenton/MyJournal.Notebook?logo=github)](https://github.com/atrenton/MyJournal.Notebook/issues)  [![Tweets](https://img.shields.io/twitter/url?label=tweets&logo=twitter&style=plastic&url=https%3A%2F%2Ftwitter.com%2FArtTrenton)](https://twitter.com/ArtTrenton) +[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/atrenton/MyJournal.Notebook?color=blue&include_prereleases&logo=github)](https://github.com/atrenton/MyJournal.Notebook/releases)  [![GitHub Discussions](https://img.shields.io/github/discussions/atrenton/MyJournal.Notebook?color=green&logo=github)](https://github.com/atrenton/MyJournal.Notebook/discussions)  [![GitHub issues](https://img.shields.io/github/issues/atrenton/MyJournal.Notebook?logo=github)](https://github.com/atrenton/MyJournal.Notebook/issues)  [![Keybase chat](https://img.shields.io/static/v1.svg?label=chat&message=on%20keybase&logo=keybase)](https://keybase.io/atrenton/chat)  [![Tweets](https://img.shields.io/twitter/url?label=tweets&logo=twitter&style=plastic&url=https%3A%2F%2Ftwitter.com%2FArtTrenton)](https://twitter.com/ArtTrenton) ## About -Record your daily interactions, ideas and inspirations with this add-in for Microsoft® OneNote® 2010 / 2013 / 2016 Windows desktop versions. +Record your daily interactions, ideas and inspirations with this add-in for Microsoft® OneNote® Windows desktop software. +
@@ -26,7 +27,7 @@ Record your daily interactions, ideas and inspirations with this add-in for Micr
Settings
    -
  • OneDrive storage account (beta)
  • +
  • OneDrive storage account (NEW)
  • Page color
  • Page title date format
  • Page rule lines
  • @@ -58,24 +59,27 @@ Record your daily interactions, ideas and inspirations with this add-in for Micr
Microsoft and OneNote are registered trademarks of Microsoft Corporation.
+
For additional information, check out the [**Wiki**](https://github.com/atrenton/MyJournal.Notebook/wiki). -## Requirements +## Prerequisites - Microsoft Windows 7 OS or later
- Microsoft .NET Framework 4.6.2 or later
-- Microsoft OneNote 2010 / 2013 / 2016 Windows desktop software (32-bit or 64-bit)
+- Microsoft [OneNote for Windows] desktop application software (32-bit or 64-bit)
- Microsoft Visual Studio 2017 version 15.9 or later (developers only)
## Installation -- To use this add-in, you must have a full Windows desktop version of OneNote 2010 / 2013 / 2016 that supports the creation of a local notebook. Both 32- and 64-bit versions of OneNote are supported as of [release 16.2.0]. +- To use this add-in, you must have a Windows desktop version of OneNote installed as part of Office or [Microsoft 365](https://www.microsoft.com/en-us/microsoft-365). You can also download OneNote as a free standalone Windows desktop app with limited features (OneDrive notebook storage only). See the **Where to get it** section of the following document: + - [What's the difference between the OneNote versions?](https://support.microsoft.com/en-us/office/what-s-the-difference-between-the-onenote-versions-a624e692-b78b-4c09-b07f-46181958118f) - Unsupported versions of OneNote: - - OneNote for Windows 10 + - [OneNote for Windows 10] + - [OneNote 2010](https://docs.microsoft.com/en-us/lifecycle/products/microsoft-onenote-2010 "Microsoft Lifecycle Extended End Date: 10/13/2020") — if you are still using it, install [release 16.2.0]. @@ -89,6 +93,9 @@ For additional information, check out the [**Wiki**](https://github.com/atrenton - [Select journal page color](docs/HowTo-Select-Page-Color.md) - [Select journal page title date format](docs/HowTo-Select-Page-Title.md) - [Select journal page rule lines format](docs/HowTo-Select-Rule-Lines.md) +- [Select OneDrive storage account](docs/HowTo-Select-OneDrive-Storage-Account.md) (NEW) -[latest release]:https://github.com/atrenton/MyJournal.Notebook/releases/latest +[latest release]:https://github.com/atrenton/MyJournal.Notebook/releases "latest by date including pre-releases" [release 16.2.0]:https://github.com/atrenton/MyJournal.Notebook/releases/tag/v16.2.0 +[OneNote for Windows]:https://support.microsoft.com/en-us/office/what-s-the-difference-between-the-onenote-versions-a624e692-b78b-4c09-b07f-46181958118f#windows "What's the difference between the OneNote versions?" +[OneNote for Windows 10]:https://support.microsoft.com/en-us/office/what-s-the-difference-between-the-onenote-versions-a624e692-b78b-4c09-b07f-46181958118f#windows "What's the difference between the OneNote versions?" diff --git a/docs/HowTo-Select-OneDrive-Storage-Account.md b/docs/HowTo-Select-OneDrive-Storage-Account.md new file mode 100644 index 0000000..e9df707 --- /dev/null +++ b/docs/HowTo-Select-OneDrive-Storage-Account.md @@ -0,0 +1,25 @@ +# *MyJournal.Notebook* + +--- + +## Usage + +### :star: How-to: Select OneDrive Storage Account + +![screenshot](usage/select-storage-account.png) + +- The default add-in configuration saves your ***My Journal*** notebook on `local` storage. + +- To save your notebook on your `OneDrive - Personal` cloud storage, you can select your Microsoft account in the **My Journal Notebook Options** dialog ```Save``` tab. + +- To configure OneDrive access in OneNote 2016 and 2013: + Go to **File** » **Account** » **Connected Services** » select **Add a Service** then **Storage** and choose OneDrive. See [How to add OneDrive as a service](https://support.microsoft.com/en-us/office/how-to-add-onedrive-as-a-service-3ae78a39-c0de-4c86-8abc-ad519b6de44e) if you need more help. + +- To move an existing local notebook to OneDrive, see [Move a OneNote notebook to OneDrive](https://support.microsoft.com/en-us/office/move-a-onenote-notebook-to-onedrive-0af0a141-0bdf-49ab-9e50-45dbcca44082 "OneNote 2016, OneNote 2013, Office for business"). + +**PLEASE NOTE:** Microsoft® OneNote® – not this add-in – handles all the syncing of your notes between your computer and OneDrive. Your internet speed is a factor. For more information, see [Best practices for syncing notes in OneNote](https://support.microsoft.com/en-us/office/best-practices-for-syncing-notes-in-onenote-9c6e8fcc-3307-419c-ba77-58cadfe651d7). + +

+ :arrow_left: README – Usage
+ :arrow_left: Wiki Configuration – Quick Start Videos +

diff --git a/docs/HowTo-Select-Rule-Lines.md b/docs/HowTo-Select-Rule-Lines.md index 48c46d9..4067c06 100644 --- a/docs/HowTo-Select-Rule-Lines.md +++ b/docs/HowTo-Select-Rule-Lines.md @@ -8,6 +8,8 @@ ![screenshot](usage/select-page-rule-lines-format.gif) +If rule lines are not working, check [Known Issues](./known-issues.md#rule-lines) for additional information. +

:arrow_left: README – Usage
:arrow_left: Wiki Configuration – Quick Start Videos diff --git a/docs/debugging/README.md b/docs/debugging/README.md index a453e80..42bcce7 100644 --- a/docs/debugging/README.md +++ b/docs/debugging/README.md @@ -1,6 +1,6 @@ -# About the DebugView-Filters.ini file +# About the DebugView-Filter.ini file -The **`DebugView-Filters.ini`** file is a [Sysinternals DebugView](https://docs.microsoft.com/en-us/sysinternals/downloads/debugview) filters file for debugging the **MyJournal.Notebook** add-in. +The **`DebugView-Filter.ini`** file is a [Windows Sysinternals DebugView](https://docs.microsoft.com/en-us/sysinternals/downloads/debugview) filters file for debugging the **MyJournal.Notebook** add-in. ## DebugView Menu Settings @@ -20,11 +20,11 @@ The **`DebugView-Filters.ini`** file is a [Sysinternals DebugView](https://docs. - Computer - Select Connect Local -## How to load the **`DebugView-Filters.ini`** file +## How to load the **`DebugView-Filter.ini`** file 1. From the DebugView menu, select Edit > Filter/Highlight... (Ctrl + L) 1. Click the Load button -1. Navigate to the repo `docs\debugging` subdirectory and select the `DebugView-Filters.ini` file +1. Navigate to the repo `docs\debugging` subdirectory and select the `DebugView-Filter.ini` file 1. Click the Open button 1. Click the OK button 1. Save the filters configuration by closing and reopening DebugView diff --git a/docs/known-issues.md b/docs/known-issues.md index ccbb480..fce00dc 100644 --- a/docs/known-issues.md +++ b/docs/known-issues.md @@ -1,10 +1,15 @@ # Known Issues -This document describes known issues with the My Journal Add-In for Microsoft OneNote. +Last Updated December 4, 2021 + +The following is the list of Known Issues for the **My Journal Add-In for Microsoft OneNote**: + +- [Paper Size](./known-issues.md#paper-size) +- [Rule Lines](./known-issues.md#rule-lines) ## Paper Size -### Background: +### Background This feature was added in release 16.1.0 to support a user's paper size preference when printing a journal page. It defaults to the OneNote Auto (automatic) paper size. @@ -17,7 +22,7 @@ Setting the paper size to any value other than Automatic will result in a fixed height page size. Content exceeding this height overflows the background page color. -### Workaround: +### Workaround - Leave the My Journal Notebook paper size option set to Automatic. - Use **File \> Print \> Print Preview** to see where your page breaks are. @@ -27,3 +32,32 @@ color. > And because OneNote is designed to capture your notes, not print out traditional > pages, you won't find a page break option in OneNote. Go to **File \> Print \>** > **Print Preview** to see how your pages will look when printed. + +
+ +## Rule Lines + +### Background + +The Add-In can be configured to create notebook pages with 4 different rule line +styles or none at all. + +### Issue: Rule lines do not display in OneNote 2016 or later + +Rule lines are not displayed in journal pages created by the Add-In with OneNote +2016 or later; works fine in earlier versions of OneNote. + +### Workaround + +- In OneNote, select **File \> Options \> Display** to change how OneNote looks. + +- Check the following **Display** option: + :white_check_mark: Create all new pages with rule lines + +- If you have set the **Rule Lines** style to `None` in the Add-In's **Page Settings**, +you can still set rule lines for the current page via the OneNote **View \> +Rule Lines** menu option. + +- Also take note that the browser-based **OneNote for the web** (formerly OneNote +Web App) cannot display rule lines and page color. See [Differences between using +a notebook in the browser and in OneNote](https://support.microsoft.com/en-us/office/differences-between-using-a-notebook-in-the-browser-and-in-onenote-a3d1fc13-ac74-456b-b391-b633a62aa83f). diff --git a/docs/troubleshooting/OneNote-Library.ps1 b/docs/troubleshooting/OneNote-Library.ps1 index 9709af0..4d3400c 100644 --- a/docs/troubleshooting/OneNote-Library.ps1 +++ b/docs/troubleshooting/OneNote-Library.ps1 @@ -127,8 +127,8 @@ Function Get-RegAsm-x86-ChildPath { Function Press-Any-Key { - if ($Host.Name -notmatch 'ISE') { - Write-Host 'Press any key to continue. . .' -NoNewline + if (($Host.Name -eq 'ConsoleHost') -and (-not $env:WT_SESSION)) { + Write-Host "`nPress any key to continue. . ." -NoNewline $Host.UI.RawUI.ReadKey('NoEcho, IncludeKeyDown') | Out-Null } } diff --git a/docs/usage/select-storage-account.png b/docs/usage/select-storage-account.png new file mode 100644 index 0000000000000000000000000000000000000000..895aaff276765cc3fdf375fc5a9714c2a1070da2 GIT binary patch literal 3090 zcmaJ@XH*l|5)LR&0TBTOqzeKfCMZY=Rf>cVDFy`TMQVglLT?eJ7(kE~Kxrb`o<(4{?g&)akM?Ad)kZkaoC=gj%$elr(iYzSdv;bQ>+0Ble_9XJ5M zAbY&eI?Z@Ii=Dp2db}{8;1Df9Rj&Z$SUBmbX`l%J;F4JP9hi<~W^X+U6aa9x_4mQh z?p5Lh0I(KAbu>+bY*%vByaYNqZtdosWZD;FIe$ZR^%SpRbSnc3$ie%S_d8LrNVXo} zf|PM#f_~wrg2*Q`w~R$TWwA;6Z7!LjyJ_Cw*2>9nb|z0F&p;y*vUz1jOT_4KW8Led zW+qGVf)V;KUF5V_B=)2Oh@2wQ&1A_L)o=^;_&Sdp^xPsNkh#S=UtBYjwdV3^)Ugpx ze}Ao=a7Z7nzX#V!p_`^x%o^8*ty8wzo8qrFz_0mN)ec`k4&;g z4eD@rVcWJ-5fT0K=mW~;@VH9aH|-G7Z)!ON>oITPYVm3@t+{JyDvYv!!-CsCJ^7^3>Q@_7WDkD3yR@T2hcRRe}c?a1du)}jYXoX7J zHjQl*ox}@5J7@i*wBUz>gVq}rJc}?5PCJHORhISzM1L95i*UGFOf^zU7dD&C11>Um z(oftbj5W&-#OHnNb4i&ZTFGECximX=4fVVG`ZDN06NjL|<0&;ceV7~FBKk{k?>3Hh zs>yua&9X*lY?YZ-`p2+sus?4~NS%Nb*w3WXg4HBg>eq-xWm&e9Qwy7Xu8vfDNLQkZT0NkOLCg{7%J?p@A|~#jWhLui4S=V`n)nhjGm9 z^v4nUkX18r?IY^wDnu8#bk`HVA~1H=f61sjPQPu}rFU2snSvNM{gF*bN-zF84W>*0 z^O5THvYQMkv9 z_)w4>ec`pKdaNIBN@HtB)PrFE+ct6s=1L2SH-a4=JS4{pkMVOG*K2=Je9DH3sQ5L_ z99IwVOy4x2P6AuXMbG;$DxZS;e0ZAjGT8 zlQ};LxG~$GtvPx9lqF;42_Qo^PLoJ@c?op-`{|Ji=N&ar6BBTzWP~61SpsKle|H3! z;ZQFzt5LmPH$ik3a)>p@nbzSKa{RALB$sC~IuZC~rg*47I&-qkwcC+0b|Q2+!vWKke#^o)!;zx&D9 zW-+-tA!*oAXhMA5^`$D8Je0+G>>pUW5z$r&TEQCj&O5GYzj>g~#(LXp7=*fMZE4M&JWv}8ZI)c3R@pre=bmfCv6Bswkdr(xUYqy5M z5lwdGdbx(rVTnG5jkE5L;3{jwjE^I^syF$P>R86-3{ljieRqNFB3z~0zc^_IMkDSw zTm34ok>g*?bD_~fBm$Qs46nUaQ*SiwDjC*{7%_W@)Fh@W@dC9ucEf{qy4rb62EC8e zLHMtFf-yhT=go$kolwbQ=r{yDCi%jm12SLwFbEXv0F{GA%>Q#DacnndSYu=~%Ozj1#5`SgW6 zEfx!i{gX|RSis`{A={s7nkj5sx=yuN46V5gA~3Rlw;y?h-8EM^r4dTF9Dv92hYDrR zgxL$;Z0h$lba=JE>lRF=dDo|PAr2oKZw^QLuGOOD-FBR7ikHmI*N`77OamG7(%+vK z9PpSi;>^j-&1*{QPIGxiqV!TS#_Hlb{bGLe|236!rz!WQkK5jbGQ-_2>Uyg~brtq# znIn&jN)Rce`dooPZw7BaM>B=)z*w|1qW12s;=114=;la55j6@4ZO<_WvAtJQdkbI4 zhXgHi4pBg*8Kpz1#cZD2I==S{&t^@ubJu7g#t=eR?9IzQnZ%weVFesUQBupH^Qx1Bs$BHC6( zK7C3q%ir6#y!f2;)RQbz@S$h2R80hUc`pi?IH-wTY!*^83MKN5DWBMjS(xlgw{Dz{ zPuG}lsh4WlDf`&_<#Rz!O?EKIGTNXe@dEC+*wo0lf6)2s5I&kiC3y4~fiCf4Gt^5E4+HuGk6Z{HMFbFQ}eAR3C4MPH|G2Y)FKVs + + + + + diff --git a/src/add-in/API/ApplicationExtensions.cs b/src/add-in/API/ApplicationExtensions.cs index 1a53167..6458a1c 100644 --- a/src/add-in/API/ApplicationExtensions.cs +++ b/src/add-in/API/ApplicationExtensions.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Runtime.InteropServices; using System.Text.RegularExpressions; -using System.Threading; using System.Xml.Linq; using Microsoft.Win32; using MyJournal.Notebook.Diagnostics; @@ -15,7 +14,7 @@ namespace MyJournal.Notebook.API { ///

- /// Extends the OneNote 2010 Application Interface. + /// Extends the OneNote Application Interface. /// static class ApplicationExtensions { @@ -35,7 +34,7 @@ const OneNote.HierarchyScope OneNote.SpecialLocation.slDefaultNotebookFolder; const OneNote.XMLSchema ONE_XML_SCHEMA = - OneNote.XMLSchema.xs2010; + OneNote.XMLSchema.xs2013; private static Dictionary s_errorCodeTable; diff --git a/src/add-in/Add-In.csproj b/src/add-in/Add-In.csproj index 9a051dd..95c5950 100644 --- a/src/add-in/Add-In.csproj +++ b/src/add-in/Add-In.csproj @@ -6,6 +6,7 @@ MyJournal.Notebook MyJournal.Notebook net462 + flow-analysis;strict x86;x64 true App.snk @@ -14,10 +15,11 @@ Copyright © 2012-2021 Art Trenton MyJournal.Notebook en-US - 16.2.* - 16.2.1.0 - 16.2.1 - beta + 16.3.* + 16.3.0.0 + 16.3.0 + + App.ico false true @@ -27,12 +29,12 @@ true - + $(DefineConstants);WIN32 My Journal Add-In for Microsoft OneNote (32-bit) - + $(DefineConstants);WIN64 My Journal Add-In for Microsoft OneNote (64-bit) @@ -79,7 +81,7 @@ all runtime; build; native; contentfiles; analyzers - + all runtime; build; native; contentfiles; analyzers diff --git a/src/add-in/Templates/Outline.cs b/src/add-in/Templates/Outline.cs index 637e619..0dac0d9 100644 --- a/src/add-in/Templates/Outline.cs +++ b/src/add-in/Templates/Outline.cs @@ -81,13 +81,13 @@ internal static void SetPosition(XElement outline) { case PageSize.Automatic: xPosition = "36.0"; - yPosition = "68.4000015258789"; + yPosition = "68.11085510253906"; break; case PageSize.Letter: case PageSize.Legal: case PageSize.A4: xPosition = "72.0"; - yPosition = "90.0"; + yPosition = "89.71085357666015"; break; default: throw new NotSupportedException( diff --git a/src/add-in/UI/OptionsForm.Designer.cs b/src/add-in/UI/OptionsForm.Designer.cs index e2f932f..ff75b17 100644 --- a/src/add-in/UI/OptionsForm.Designer.cs +++ b/src/add-in/UI/OptionsForm.Designer.cs @@ -29,143 +29,142 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { this.tabControl1 = new System.Windows.Forms.TabControl(); - this.tabPage4 = new System.Windows.Forms.TabPage(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.cboStorageAccount = new System.Windows.Forms.ComboBox(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.cboPageTemplates = new System.Windows.Forms.ComboBox(); - this.tabPage3 = new System.Windows.Forms.TabPage(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.cboPageSize = new System.Windows.Forms.ComboBox(); + this.StorageAccount = new System.Windows.Forms.ComboBox(); this.tabPage2 = new System.Windows.Forms.TabPage(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.PageTemplates = new System.Windows.Forms.ComboBox(); + this.tabPage3 = new System.Windows.Forms.TabPage(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.PageSize = new System.Windows.Forms.ComboBox(); + this.tabPage4 = new System.Windows.Forms.TabPage(); this.textBox1 = new System.Windows.Forms.TextBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.tabControl1.SuspendLayout(); - this.tabPage4.SuspendLayout(); - this.groupBox3.SuspendLayout(); this.tabPage1.SuspendLayout(); this.groupBox1.SuspendLayout(); - this.tabPage3.SuspendLayout(); - this.groupBox2.SuspendLayout(); this.tabPage2.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.tabPage3.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.tabPage4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // tabControl1 // - this.tabControl1.Controls.Add(this.tabPage4); this.tabControl1.Controls.Add(this.tabPage1); - this.tabControl1.Controls.Add(this.tabPage3); this.tabControl1.Controls.Add(this.tabPage2); - this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Controls.Add(this.tabPage3); + this.tabControl1.Controls.Add(this.tabPage4); + this.tabControl1.Location = new System.Drawing.Point(8, 8); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(284, 111); + this.tabControl1.Size = new System.Drawing.Size(290, 108); this.tabControl1.TabIndex = 0; // - // tabPage4 - // - this.tabPage4.Controls.Add(this.groupBox3); - this.tabPage4.Location = new System.Drawing.Point(4, 22); - this.tabPage4.Name = "tabPage4"; - this.tabPage4.Padding = new System.Windows.Forms.Padding(3); - this.tabPage4.Size = new System.Drawing.Size(276, 85); - this.tabPage4.TabIndex = 1; - this.tabPage4.Text = "Save"; - this.tabPage4.UseVisualStyleBackColor = true; - // - // groupBox3 - // - this.groupBox3.Controls.Add(this.cboStorageAccount); - this.groupBox3.Location = new System.Drawing.Point(8, 10); - this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(260, 68); - this.groupBox3.TabIndex = 0; - this.groupBox3.TabStop = false; - this.groupBox3.Text = "Select storage account"; - // - // cboStorageAccount - // - this.cboStorageAccount.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cboStorageAccount.FormattingEnabled = true; - this.cboStorageAccount.Location = new System.Drawing.Point(22, 30); - this.cboStorageAccount.Name = "cboStorageAccount"; - this.cboStorageAccount.Size = new System.Drawing.Size(216, 21); - this.cboStorageAccount.TabIndex = 0; - // // tabPage1 // this.tabPage1.Controls.Add(this.groupBox1); this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(276, 85); + this.tabPage1.Size = new System.Drawing.Size(282, 82); this.tabPage1.TabIndex = 0; - this.tabPage1.Text = "Template"; + this.tabPage1.Text = "Save"; this.tabPage1.UseVisualStyleBackColor = true; // // groupBox1 // - this.groupBox1.Controls.Add(this.cboPageTemplates); + this.groupBox1.Controls.Add(this.StorageAccount); this.groupBox1.Location = new System.Drawing.Point(8, 10); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(260, 68); + this.groupBox1.Size = new System.Drawing.Size(265, 65); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; - this.groupBox1.Text = "Select page template"; + this.groupBox1.Text = "Select storage account"; + // + // StorageAccount + // + this.StorageAccount.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.StorageAccount.FormattingEnabled = true; + this.StorageAccount.Location = new System.Drawing.Point(18, 28); + this.StorageAccount.Name = "StorageAccount"; + this.StorageAccount.Size = new System.Drawing.Size(230, 21); + this.StorageAccount.TabIndex = 0; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.groupBox2); + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(282, 82); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "Template"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // groupBox2 // - // cboPageTemplates + this.groupBox2.Controls.Add(this.PageTemplates); + this.groupBox2.Location = new System.Drawing.Point(8, 10); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(265, 65); + this.groupBox2.TabIndex = 1; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Select page template"; // - this.cboPageTemplates.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cboPageTemplates.FormattingEnabled = true; - this.cboPageTemplates.Location = new System.Drawing.Point(22, 30); - this.cboPageTemplates.Name = "cboPageTemplates"; - this.cboPageTemplates.Size = new System.Drawing.Size(216, 21); - this.cboPageTemplates.TabIndex = 0; + // PageTemplates + // + this.PageTemplates.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.PageTemplates.FormattingEnabled = true; + this.PageTemplates.Location = new System.Drawing.Point(18, 28); + this.PageTemplates.Name = "PageTemplates"; + this.PageTemplates.Size = new System.Drawing.Size(230, 21); + this.PageTemplates.TabIndex = 0; // // tabPage3 // - this.tabPage3.Controls.Add(this.groupBox2); + this.tabPage3.Controls.Add(this.groupBox3); this.tabPage3.Location = new System.Drawing.Point(4, 22); this.tabPage3.Name = "tabPage3"; this.tabPage3.Padding = new System.Windows.Forms.Padding(3); - this.tabPage3.Size = new System.Drawing.Size(276, 85); - this.tabPage3.TabIndex = 0; + this.tabPage3.Size = new System.Drawing.Size(282, 82); + this.tabPage3.TabIndex = 2; this.tabPage3.Text = "Size"; this.tabPage3.UseVisualStyleBackColor = true; // - // groupBox2 + // groupBox3 // - this.groupBox2.Controls.Add(this.cboPageSize); - this.groupBox2.Location = new System.Drawing.Point(8, 10); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(260, 68); - this.groupBox2.TabIndex = 0; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Select paper size"; + this.groupBox3.Controls.Add(this.PageSize); + this.groupBox3.Location = new System.Drawing.Point(8, 10); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(265, 65); + this.groupBox3.TabIndex = 2; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Select paper size"; // - // cboPageSize + // PageSize // - this.cboPageSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cboPageSize.FormattingEnabled = true; - this.cboPageSize.Location = new System.Drawing.Point(22, 30); - this.cboPageSize.Name = "cboPageSize"; - this.cboPageSize.Size = new System.Drawing.Size(216, 21); - this.cboPageSize.TabIndex = 0; + this.PageSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.PageSize.FormattingEnabled = true; + this.PageSize.Location = new System.Drawing.Point(18, 28); + this.PageSize.Name = "PageSize"; + this.PageSize.Size = new System.Drawing.Size(230, 21); + this.PageSize.TabIndex = 0; // - // tabPage2 + // tabPage4 // - this.tabPage2.Controls.Add(this.textBox1); - this.tabPage2.Controls.Add(this.pictureBox1); - this.tabPage2.Location = new System.Drawing.Point(4, 22); - this.tabPage2.Name = "tabPage2"; - this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(276, 85); - this.tabPage2.TabIndex = 0; - this.tabPage2.Text = "About"; - this.tabPage2.UseVisualStyleBackColor = true; + this.tabPage4.Controls.Add(this.textBox1); + this.tabPage4.Controls.Add(this.pictureBox1); + this.tabPage4.Location = new System.Drawing.Point(4, 22); + this.tabPage4.Name = "tabPage4"; + this.tabPage4.Padding = new System.Windows.Forms.Padding(3); + this.tabPage4.Size = new System.Drawing.Size(282, 82); + this.tabPage4.TabIndex = 3; + this.tabPage4.Text = "About"; + this.tabPage4.UseVisualStyleBackColor = true; // // textBox1 // @@ -178,6 +177,7 @@ private void InitializeComponent() this.textBox1.ReadOnly = true; this.textBox1.Size = new System.Drawing.Size(207, 48); this.textBox1.TabIndex = 1; + this.textBox1.TabStop = false; // // pictureBox1 // @@ -191,7 +191,7 @@ private void InitializeComponent() // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(284, 111); + this.ClientSize = new System.Drawing.Size(304, 121); this.Controls.Add(this.tabControl1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.KeyPreview = true; @@ -204,14 +204,14 @@ private void InitializeComponent() this.Load += new System.EventHandler(this.Form_Load); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form_KeyDown); this.tabControl1.ResumeLayout(false); - this.tabPage4.ResumeLayout(false); - this.groupBox3.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.groupBox1.ResumeLayout(false); - this.tabPage3.ResumeLayout(false); - this.groupBox2.ResumeLayout(false); this.tabPage2.ResumeLayout(false); - this.tabPage2.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.tabPage3.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); + this.tabPage4.ResumeLayout(false); + this.tabPage4.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); @@ -221,16 +221,16 @@ private void InitializeComponent() private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; - private System.Windows.Forms.TabPage tabPage2; - private System.Windows.Forms.PictureBox pictureBox1; - private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.ComboBox cboPageTemplates; - private System.Windows.Forms.TabPage tabPage3; + private System.Windows.Forms.ComboBox StorageAccount; private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.ComboBox cboPageSize; - private System.Windows.Forms.TabPage tabPage4; + private System.Windows.Forms.ComboBox PageTemplates; + private System.Windows.Forms.TabPage tabPage3; private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.ComboBox cboStorageAccount; + private System.Windows.Forms.ComboBox PageSize; + private System.Windows.Forms.TabPage tabPage4; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TabPage tabPage2; } -} +} \ No newline at end of file diff --git a/src/add-in/UI/OptionsForm.cs b/src/add-in/UI/OptionsForm.cs index 845c1c3..56e88cb 100644 --- a/src/add-in/UI/OptionsForm.cs +++ b/src/add-in/UI/OptionsForm.cs @@ -2,7 +2,6 @@ using System.Drawing; using System.Windows.Forms; using MyJournal.Notebook.Diagnostics; -using MyJournal.Notebook.Templates; namespace MyJournal.Notebook.UI { @@ -71,27 +70,27 @@ private void Form_Load(object sender, EventArgs e) _settingsChangedCount++; } - cboPageTemplates.Items.AddRange(TemplateFactory.Items); - cboPageTemplates.SelectedIndex = cboPageTemplates.Items.IndexOf( + PageTemplates.Items.AddRange(Templates.TemplateFactory.Items); + PageTemplates.SelectedIndex = PageTemplates.Items.IndexOf( Properties.Settings.Default.PageTemplate); - cboPageTemplates.SelectedIndexChanged += + PageTemplates.SelectedIndexChanged += PageTemplates_SelectedIndexChanged; - cboPageSize.Items.AddRange(PageSize.Items); - cboPageSize.SelectedIndex = cboPageSize.Items.IndexOf( + PageSize.Items.AddRange(Templates.PageSize.Items); + PageSize.SelectedIndex = PageSize.Items.IndexOf( Properties.Settings.Default.PaperSize); - cboPageSize.SelectedIndexChanged += PageSize_SelectedIndexChanged; + PageSize.SelectedIndexChanged += PageSize_SelectedIndexChanged; - cboStorageAccount.Items.AddRange(new Config.StorageAccount().Items); - cboStorageAccount.SelectedIndex = cboStorageAccount.Items.IndexOf( + StorageAccount.Items.AddRange(new Config.StorageAccount().Items); + StorageAccount.SelectedIndex = StorageAccount.Items.IndexOf( Properties.Settings.Default.StorageAccount); - cboStorageAccount.SelectedIndexChanged += StorageAccount_SelectedIndexChanged; + StorageAccount.SelectedIndexChanged += StorageAccount_SelectedIndexChanged; } private void PageSize_SelectedIndexChanged(object sender, EventArgs e) { Properties.Settings.Default.PaperSize = - cboPageSize.SelectedItem as string; + PageSize.SelectedItem as string; _settingsChangedCount++; Tracer.WriteTraceMethodLine("Paper Size = {0}", @@ -101,7 +100,7 @@ private void PageSize_SelectedIndexChanged(object sender, EventArgs e) private void PageTemplates_SelectedIndexChanged(object sender, EventArgs e) { Properties.Settings.Default.PageTemplate = - cboPageTemplates.SelectedItem as string; + PageTemplates.SelectedItem as string; _settingsChangedCount++; Tracer.WriteTraceMethodLine("PageTemplate = {0}", @@ -111,13 +110,13 @@ private void PageTemplates_SelectedIndexChanged(object sender, EventArgs e) private void StorageAccount_SelectedIndexChanged(object sender, EventArgs e) { Properties.Settings.Default.StorageAccount = - cboStorageAccount.SelectedItem as string; + StorageAccount.SelectedItem as string; _settingsChangedCount++; Tracer.WriteTraceMethodLine("StorageAccount = {0}", Properties.Settings.Default.StorageAccount); } - int _settingsChangedCount = 0; + private int _settingsChangedCount = 0; } }