Skip to content

Commit

Permalink
Upgrade window settings implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-ward committed Feb 26, 2015
1 parent 3a6ea29 commit 55ca682
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/MarkdownEdit/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public partial class App

private void OnStartup(object sender, StartupEventArgs ea)
{
var upgradeSettings = Settings.Default.UpgradeSettings;
InitializeSettings();

var container = TinyIoCContainer.Current;
Expand All @@ -29,12 +30,11 @@ private void OnStartup(object sender, StartupEventArgs ea)
container.Register<ISnippetManager, SnippetManager>();

var mainWindow = container.Resolve<MainWindow>();
var windowPlacementSettings = mainWindow.GetWindowPlacementSettings();

if (windowPlacementSettings.UpgradeSettings)
if (upgradeSettings)
{
var windowPlacementSettings = mainWindow.GetWindowPlacementSettings();
windowPlacementSettings.Upgrade();
windowPlacementSettings.UpgradeSettings = false;
windowPlacementSettings.Save();
}

Expand Down
6 changes: 3 additions & 3 deletions src/MarkdownEdit/MarkdownEdit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\AvalonEdit.5.0.2\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath>
</Reference>
<Reference Include="MahApps.Metro, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
<Reference Include="MahApps.Metro, Version=1.1.1.0, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\MahApps.Metro.1.1.0.0\lib\net45\MahApps.Metro.dll</HintPath>
<HintPath>..\packages\MahApps.Metro.1.1.1.0\lib\net45\MahApps.Metro.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.DwayneNeed, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
Expand All @@ -98,7 +98,7 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MahApps.Metro.1.1.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
<HintPath>..\packages\MahApps.Metro.1.1.1.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xaml">
Expand Down
2 changes: 1 addition & 1 deletion src/MarkdownEdit/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package id="AvalonEdit" version="5.0.2" targetFramework="net452" />
<package id="CommonMark.NET" version="0.8.4" targetFramework="net452" />
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net452" />
<package id="MahApps.Metro" version="1.1.0.0" targetFramework="net452" />
<package id="MahApps.Metro" version="1.1.1.0" targetFramework="net452" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net452" />
<package id="NHunspell" version="1.2.5359.26126" targetFramework="net452" />
<package id="TinyIoC" version="1.3" targetFramework="net452" />
Expand Down

0 comments on commit 55ca682

Please sign in to comment.