Bläddra i källkod

Preloader rewrite, misc

Ruben 6 år sedan
förälder
incheckning
5c5f93a715

+ 0 - 545
CodeMap1.dgml

@@ -1,545 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<DirectedGraph DataVirtualized="True" Layout="Sugiyama" ZoomLevel="-1" xmlns="http://schemas.microsoft.com/vs/2009/dgml">
-  <Nodes>
-    <Node Id="(@1)" Category="CodeSchema_Assembly" AssemblyTimestamp="03/17/2017 19:19:17" Bounds="164.93040638252,190.334209713098,1077.38779099871,604.435951562449" CodeSchemaProperty_StrongName="PicView, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" CommonLabel="PicView" DelayedChildNodesState="Incomplete" DelayedCrossGroupLinksState="Fetched" FilePath="$(VsSolution)\PicView\bin\Release\PicView.exe" Group="Expanded" Label="PicView.exe" UseManualLocation="True" />
-    <Node Id="(@2 Namespace=PicView Type=App)" Category="CodeSchema_Class" Bounds="596.085500993916,17.9782139199011,82.8466666666668,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="App" UseManualLocation="True" />
-    <Node Id="@10" Category="CodeSchema_Namespace" Bounds="717.891316147698,298.36437875056,97.48,25" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="2" Group="Collapsed" Label="PicView" UseManualLocation="True" />
-    <Node Id="@12" Category="CodeSchema_Namespace" Bounds="204.93040638252,443.019761275546,976.550000000003,311.7502" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="12" Group="Expanded" Label="PicView‎.lib" />
-    <Node Id="@14" Category="CodeSchema_Namespace" Bounds="221.610006876643,370.497660600069,183.853333333334,25" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="12" Group="Collapsed" Label="PicView‎.lib‎.UserControls" UseManualLocation="True" />
-    <Node Id="@16" Category="CodeSchema_Namespace" Bounds="98.687648197765,542.887779801125,153.85,25" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="PicView‎.Properties" UseManualLocation="True" />
-    <Node Id="@18" Category="CodeSchema_Namespace" Bounds="871.712406565957,327.318129308778,148.851334533334,25.0013600031999" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="5" Group="Collapsed" Label="PicView‎.Windows" UseManualLocation="True" />
-    <Node Id="@19" Category="CodeSchema_Class" Bounds="1140.14798481315,-11.2860507268887,93.6800000000003,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="About" UseManualLocation="True" />
-    <Node Id="@20" Category="CodeSchema_Class" Bounds="343.756844623036,284.326914187868,125.876666666667,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="AjaxLoading" UseManualLocation="True" />
-    <Node Id="@21" Category="CodeSchema_Class" Bounds="1024.39131814648,43.7140492731113,117.193333333334,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="AllSettings" UseManualLocation="True" />
-    <Node Id="@22" Category="CodeSchema_Class" Bounds="390.060768730468,526.058578446466,150.88,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="AnimationHelper" UseManualLocation="True" />
-    <Node Id="@23" Category="CodeSchema_Class" Bounds="713.35040638252,596.394861275546,152.436666666667,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="ArchiveExtraction" />
-    <Node Id="@24" Category="CodeSchema_Class" Bounds="666.253511289703,284.327014187868,138.696666666667,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="AutoScrollSign" UseManualLocation="True" />
-    <Node Id="@25" Category="CodeSchema_Class" Bounds="483.34017795637,229.326814187868,117.54,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="ClickArrow" UseManualLocation="True" />
-    <Node Id="@26" Category="CodeSchema_Class" Bounds="1171.58465147982,43.7140492731113,128.473333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="FakeWindow" UseManualLocation="True" />
-    <Node Id="@27" Category="CodeSchema_Class" Bounds="724.658739715854,539.707361275546,129.82,25" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="FileFunctions" />
-    <Node Id="@28" Category="CodeSchema_Class" Bounds="343.756844623036,229.326814187868,109.583333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="FileMenu" UseManualLocation="True" />
-    <Node Id="@29" Category="CodeSchema_Class" Bounds="1024.39131814648,-11.2860507268886,85.7566666666667,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Help" UseManualLocation="True" />
-    <Node Id="@3" Category="CodeSchema_Assembly" Bounds="184.93040638252,230.334309713098,1037.38779099871,544.435751562448" CodeSchemaProperty_StrongName="PicView, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" CommonLabel="PicView" DelayedChildNodesState="Incomplete" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="8" FilePath="$(9b5425dc-4329-4a7a-a0c5-f93161f77245.OutputPath)" Group="Expanded" Label="PicView.exe" UseManualLocation="True">
-      <Category Ref="CodeMap_WpfProject" />
-    </Node>
-    <Node Id="@30" Category="CodeSchema_Class" Bounds="741.46540638252,709.769861275546,96.2066666666667,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Helper" />
-    <Node Id="@31" Category="CodeSchema_Class" Bounds="224.93040638252,653.082361275547,141.276666666667,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="ImageManager" />
-    <Node Id="@32" Category="CodeSchema_Class" Bounds="499.633511289703,284.326914187868,136.62,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="ImageSettings" UseManualLocation="True" />
-    <Node Id="@33" Category="CodeSchema_Class" Bounds="596.085500993916,72.9783139199011,131.256666666667,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="MainWindow" UseManualLocation="True" />
-    <Node Id="@34" Category="CodeSchema_Class" Bounds="445.68017795637,174.326714187868,130.606666666667,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="MyEventArgs" UseManualLocation="True" />
-    <Node Id="@35" Category="CodeSchema_Delegate" Bounds="646.296844623036,119.326814187868,143.373333333333,25" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="MyEventHandler" UseManualLocation="True" />
-    <Node Id="@36" Category="CodeSchema_Class" Bounds="562.478739715854,653.082361275546,142.18,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="NativeMethods" />
-    <Node Id="@37" Category="CodeSchema_Class" Bounds="454.693511289703,64.3265141878684,112.58,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="PicGallery" UseManualLocation="True" />
-    <Node Id="@38" Category="CodeSchema_Class" Bounds="343.756844623036,119.326614187868,136.453333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="PicGalleryItem" UseManualLocation="True" />
-    <Node Id="@39" Category="CodeSchema_Class" Bounds="733.703739715854,483.019861275546,111.73,24.9999999999999" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Preloader" />
-    <Node Id="@40" Category="CodeSchema_Class" Bounds="343.756844623036,339.327014187868,164.523333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="QuickSettingsMenu" UseManualLocation="True" />
-    <Node Id="@41" Category="CodeSchema_Class" Bounds="1041.65707304919,596.394861275546,119.823333333332,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="RecentFiles" />
-    <Node Id="@42" Category="CodeSchema_Class" Bounds="630.88017795637,229.326814187868,123.293333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="SexyToolTip" UseManualLocation="True" />
-    <Node Id="@43" Category="CodeSchema_Enum" Bounds="896.382073049187,596.394861275546,114.373333333333,25" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="SortFilesBy" />
-    <Node Id="@44" Category="CodeSchema_Class" Bounds="735.47040638252,653.082361275546,108.196666666667,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Variables" />
-    <Node Id="@45" Category="CodeSchema_Class" Bounds="488.407073049187,596.394861275546,114.323333333333,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Wallpaper" />
-    <Node Id="@46" Category="CodeSchema_Enum" Bounds="396.88540638252,653.082361275546,135.366666666667,25" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="WallpaperStyle" />
-    <Node Id="@47" Category="CodeSchema_Class" Bounds="541.71017795637,119.326614187868,74.5466666666666,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="X2" UseManualLocation="True" />
-    <Node Id="@48" Category="CodeSchema_Class" Bounds="1024.39131814648,98.7141492731113,172.06,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="YesNoDialogWindow" UseManualLocation="True" />
-    <Node Id="@5" Category="CodeSchema_Assembly" Bounds="477.522687359386,380.617399226502,219.913333333334,25" CodeSchemaProperty_StrongName="Magick.NET-Q16-HDRI-x64, Version=7.0.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec" DelayedChildNodesState="NotFetched" FilePath="$(VsSolution)\packages\Magick.NET-Q16-HDRI-x64.7.0.4.701\lib\net40-client\Magick.NET-Q16-HDRI-x64.dll" Group="Collapsed" Label="Magick.NET-Q16-HDRI-x64.dll" UseManualLocation="True" />
-    <Node Id="@7" Category="CodeSchema_Assembly" Bounds="942.475633203607,270.334409713098,168.093333333333,24.9999999999999" CodeSchemaProperty_StrongName="XamlAnimatedGif, Version=1.1.6.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(VsSolution)\packages\XamlAnimatedGif.1.1.6\lib\net45\XamlAnimatedGif.dll" Group="Collapsed" Label="XamlAnimatedGif.dll" UseManualLocation="True" />
-    <Node Id="@9" Category="CodeSchema_Assembly" Bounds="927.858197381229,382.320949315178,274.46,25" CodeSchemaProperty_StrongName="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(VsSolution)\PicView\Microsoft.WindowsAPICodePack.Shell.dll" Group="Collapsed" Label="Microsoft.WindowsAPICodePack.Shell.dll" UseManualLocation="True" />
-  </Nodes>
-  <Links>
-    <Link Source="(@1)" Target="@3" Category="Contains" />
-    <Link Source="@10" Target="(@2 Namespace=PicView Type=App)" Category="Contains" FetchingParent="@10" />
-    <Link Source="@10" Target="@33" Category="Contains" FetchingParent="@10" />
-    <Link Source="@12" Target="@22" Category="Contains" FetchingParent="@12" />
-    <Link Source="@12" Target="@23" Category="Contains" FetchingParent="@12" />
-    <Link Source="@12" Target="@27" Category="Contains" FetchingParent="@12" />
-    <Link Source="@12" Target="@30" Category="Contains" FetchingParent="@12" />
-    <Link Source="@12" Target="@31" Category="Contains" FetchingParent="@12" />
-    <Link Source="@12" Target="@36" Category="Contains" FetchingParent="@12" />
-    <Link Source="@12" Target="@39" Category="Contains" FetchingParent="@12" />
-    <Link Source="@12" Target="@41" Category="Contains" FetchingParent="@12" />
-    <Link Source="@12" Target="@43" Category="Contains" FetchingParent="@12" />
-    <Link Source="@12" Target="@44" Category="Contains" FetchingParent="@12" />
-    <Link Source="@12" Target="@45" Category="Contains" FetchingParent="@12" />
-    <Link Source="@12" Target="@46" Category="Contains" FetchingParent="@12" />
-    <Link Source="@14" Target="@20" Category="Contains" FetchingParent="@14" />
-    <Link Source="@14" Target="@24" Category="Contains" FetchingParent="@14" />
-    <Link Source="@14" Target="@25" Category="Contains" FetchingParent="@14" />
-    <Link Source="@14" Target="@28" Category="Contains" FetchingParent="@14" />
-    <Link Source="@14" Target="@32" Category="Contains" FetchingParent="@14" />
-    <Link Source="@14" Target="@34" Category="Contains" FetchingParent="@14" />
-    <Link Source="@14" Target="@35" Category="Contains" FetchingParent="@14" />
-    <Link Source="@14" Target="@37" Category="Contains" FetchingParent="@14" />
-    <Link Source="@14" Target="@38" Category="Contains" FetchingParent="@14" />
-    <Link Source="@14" Target="@40" Category="Contains" FetchingParent="@14" />
-    <Link Source="@14" Target="@42" Category="Contains" FetchingParent="@14" />
-    <Link Source="@14" Target="@47" Category="Contains" FetchingParent="@14" />
-    <Link Source="@18" Target="@19" Category="Contains" FetchingParent="@18" />
-    <Link Source="@18" Target="@21" Category="Contains" FetchingParent="@18" />
-    <Link Source="@18" Target="@26" Category="Contains" FetchingParent="@18" />
-    <Link Source="@18" Target="@29" Category="Contains" FetchingParent="@18" />
-    <Link Source="@18" Target="@48" Category="Contains" FetchingParent="@18" />
-    <Link Source="@19" Target="@22" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="22" />
-    <Link Source="@19" Target="@44" Category="CodeSchema_FieldRead" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="48" />
-    <Link Source="@21" Target="@16" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="77" />
-    <Link Source="@21" Target="@22" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="40" />
-    <Link Source="@21" Target="@44" Category="CodeSchema_FieldRead" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="96" />
-    <Link Source="@22" Target="@16" Category="CodeSchema_Calls" Bounds="268.240174558428,106.718885389784,102.044520330457,383.048320226656" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="296" />
-    <Link Source="@23" Target="@27" Category="CodeSchema_Calls" Bounds="785.071838378906,573.707092285156,0.07525634765625,22.687744140625" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@23" Target="@44" Category="CodeSchema_Calls" Bounds="789.568739715854,621.394861275546,0,22.6875" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="5" />
-    <Link Source="@25" Target="@22" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4" />
-    <Link Source="@27" Target="@16" Category="CodeSchema_Calls" Bounds="408.620893467417,102.0911098312,320.825922467561,162.61359578524" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" />
-    <Link Source="@27" Target="@23" Category="CodeSchema_Calls" Bounds="791.003234863281,564.707336425781,0.087890625,22.6875610351563" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@27" Target="@36" Category="CodeSchema_Calls" Bounds="650.262268066406,564.707336425781,106.853271484375,81.5668334960938" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@27" Target="@41" Category="CodeSchema_Calls" Bounds="852.552539856018,563.650932334666,181.389614918011,32.9568070373867" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@27" Target="@43" Category="References" Bounds="825.731915019051,564.707361275546,83.1674651974008,28.7472907523028" IsSourceVirtualized="True" Weight="1" />
-    <Link Source="@27" Target="@44" Category="CodeSchema_Calls" Bounds="822.021911621094,564.707336425781,54.4717407226563,85.1340942382813" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="23">
-      <Category Ref="CodeSchema_FieldWrite" />
-    </Link>
-    <Link Source="@28" Target="@22" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="21" />
-    <Link Source="@28" Target="@44" Category="CodeSchema_FieldRead" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="16" />
-    <Link Source="@29" Target="@22" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="7" />
-    <Link Source="@3" Target="@10" Category="Contains" FetchingParent="@3" />
-    <Link Source="@3" Target="@12" Category="Contains" FetchingParent="@3" />
-    <Link Source="@3" Target="@14" Category="Contains" FetchingParent="@3" />
-    <Link Source="@3" Target="@18" Category="Contains" FetchingParent="@3" />
-    <Link Source="@3" Target="@5" Category="CodeMap_ExternalReference" Bounds="315.274759184057,690.599122606996,87.6448287666699,160.289641282992">
-      <Category Ref="Contains" />
-    </Link>
-    <Link Source="@3" Target="@7" Category="CodeMap_ExternalReference" Bounds="733.773512899187,643.698334177421,91.2060009456164,206.852023217533">
-      <Category Ref="Contains" />
-    </Link>
-    <Link Source="@3" Target="@9" Category="CodeMap_ExternalReference" Bounds="582.739163339476,690.599197606996,4.56975981447511,159.189893881073">
-      <Category Ref="Contains" />
-    </Link>
-    <Link Source="@30" Target="@9" Category="CodeSchema_Calls" Bounds="711.75635485523,144.943361538302,248.689728539583,295.562359609855" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="11" />
-    <Link Source="@31" Target="@30" Category="CodeSchema_Calls" Bounds="365.921997070313,674.746520996094,366.59033203125,41.6725463867188" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@31" Target="@5" Category="CodeSchema_Calls" Bounds="221.004815815762,142.403431768914,257.7154032206,234.012527330199" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="41" />
-    <Link Source="@32" Target="@22" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="18" />
-    <Link Source="@33" Target="@16" Category="CodeSchema_Calls" Bounds="366.367493887743,116.226849861527,235.939897564519,46.3411850108318" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="194" />
-    <Link Source="@33" Target="@19" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@33" Target="@20" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" />
-    <Link Source="@33" Target="@21" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@33" Target="@22" Category="CodeSchema_Calls" Bounds="228.667517237561,187.024426309512,328.966048198954,183.025245458909" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="69" />
-    <Link Source="@33" Target="@24" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@33" Target="@25" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" />
-    <Link Source="@33" Target="@26" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2">
-      <Category Ref="CodeSchema_FieldRead" />
-    </Link>
-    <Link Source="@33" Target="@27" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="72" />
-    <Link Source="@33" Target="@28" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="12">
-      <Category Ref="CodeSchema_FieldRead" />
-    </Link>
-    <Link Source="@33" Target="@29" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@33" Target="@30" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="29" />
-    <Link Source="@33" Target="@31" Category="CodeSchema_Calls" Bounds="599.60030131005,185.688032465089,253.212696234672,162.320185902471" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="6" />
-    <Link Source="@33" Target="@32" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="28">
-      <Category Ref="CodeSchema_FieldRead" />
-    </Link>
-    <Link Source="@33" Target="@34" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="9">
-      <Category Ref="CodeSchema_Calls" />
-    </Link>
-    <Link Source="@33" Target="@35" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" />
-    <Link Source="@33" Target="@36" Category="CodeSchema_Calls" Bounds="460.822240079955,185.691197490319,115.301650129283,362.40745408067" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="24" />
-    <Link Source="@33" Target="@37" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="38">
-      <Category Ref="CodeSchema_FieldRead" />
-      <Category Ref="CodeSchema_FieldWrite" />
-    </Link>
-    <Link Source="@33" Target="@39" Category="CodeSchema_Calls" Bounds="587.809389029958,185.688032465089,98.8466315607342,160.28702719017" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="18" />
-    <Link Source="@33" Target="@40" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="12">
-      <Category Ref="CodeSchema_FieldRead" />
-    </Link>
-    <Link Source="@33" Target="@41" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="6" />
-    <Link Source="@33" Target="@42" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2">
-      <Category Ref="CodeSchema_FieldRead" />
-    </Link>
-    <Link Source="@33" Target="@44" Category="CodeSchema_Calls" Bounds="522.533713030117,185.688032465089,54.7142231055991,239.731705075117" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="933">
-      <Category Ref="CodeSchema_FieldRead" />
-      <Category Ref="CodeSchema_FieldWrite" />
-    </Link>
-    <Link Source="@33" Target="@45" Category="CodeSchema_Calls" Bounds="363.990806459403,185.688032465089,205.554743602465,243.426574389739" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="8" />
-    <Link Source="@33" Target="@47" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@33" Target="@48" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="19" />
-    <Link Source="@33" Target="@7" Category="CodeSchema_Calls" Bounds="694.580726635621,19.0064877405464,141.92294454704,53.9764085449025" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@35" Target="@34" Category="References" Bounds="566.727255629536,144.326814187868,104.210715577367,27.6887871289064" IsSourceVirtualized="True" Weight="2" />
-    <Link Source="@37" Target="@31" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" />
-    <Link Source="@37" Target="@34" Category="CodeSchema_Calls" Bounds="510.983511289703,89.3265141878686,1.13686837721616E-13,76.0001999999998" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" />
-    <Link Source="@37" Target="@35" Category="References" Bounds="558.028709224987,89.3265141878686,104.211404043841,27.6891714291423" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="16">
-      <Category Ref="CodeSchema_Calls" />
-    </Link>
-    <Link Source="@37" Target="@38" Category="References" Bounds="442.350882492102,89.3265141878686,46.1326697066172,25.629307546777" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2">
-      <Category Ref="CodeSchema_Calls" />
-    </Link>
-    <Link Source="@37" Target="@44" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="7">
-      <Category Ref="CodeSchema_FieldRead" />
-    </Link>
-    <Link Source="@37" Target="@47" Category="References" Bounds="526.438028645126,89.3265141878686,30.0933706725491,24.3402705342244" IsSourceVirtualized="True" Weight="1" />
-    <Link Source="@38" Target="@22" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="3" />
-    <Link Source="@39" Target="@27" Category="CodeSchema_Calls" Bounds="789.568739715854,508.019861275546,2.27373675443232E-13,22.6875000000003" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" />
-    <Link Source="@39" Target="@31" Category="CodeSchema_Calls" Bounds="334.747650146484,508.020446777344,416.104705810547,141.680480957031" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@39" Target="@44" Category="CodeSchema_Calls" Bounds="705.593200683594,508.019866943359,55.7442626953125,141.813629150391" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="51">
-      <Category Ref="CodeSchema_FieldRead" />
-    </Link>
-    <Link Source="@40" Target="@22" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="30" />
-    <Link Source="@40" Target="@44" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="69">
-      <Category Ref="CodeSchema_FieldRead" />
-    </Link>
-    <Link Source="@40" Target="@45" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="5" />
-    <Link Source="@44" Target="@20" Category="References" IsSourceVirtualized="True" Weight="1" />
-    <Link Source="@44" Target="@24" Category="References" IsSourceVirtualized="True" Weight="1" />
-    <Link Source="@44" Target="@25" Category="References" IsSourceVirtualized="True" Weight="2" />
-    <Link Source="@44" Target="@28" Category="References" IsSourceVirtualized="True" Weight="1" />
-    <Link Source="@44" Target="@30" Category="CodeSchema_Calls" Bounds="789.568739715854,678.082361275546,1.13686837721616E-13,22.6875" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@44" Target="@32" Category="References" IsSourceVirtualized="True" Weight="1" />
-    <Link Source="@44" Target="@37" Category="References" IsSourceVirtualized="True" Weight="1" />
-    <Link Source="@44" Target="@40" Category="References" IsSourceVirtualized="True" Weight="1" />
-    <Link Source="@44" Target="@42" Category="References" IsSourceVirtualized="True" Weight="1" />
-    <Link Source="@44" Target="@47" Category="References" IsSourceVirtualized="True" Weight="1" />
-    <Link Source="@45" Target="@31" Category="CodeSchema_Calls" Bounds="359.472717483215,621.103735817656,132.253135608121,29.9883984991417" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@45" Target="@36" Category="CodeSchema_Calls" Bounds="564.97337036635,621.394861275547,41.6246751656993,26.8136224256313" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
-    <Link Source="@45" Target="@44" Category="CodeSchema_Calls" Bounds="598.837904310658,621.270663603284,130.568067574518,30.334333322256" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="3">
-      <Category Ref="CodeSchema_FieldRead" />
-    </Link>
-    <Link Source="@45" Target="@46" Category="References" Bounds="489.803442032144,621.394861275547,37.9042171985931,26.5271026227808" IsSourceVirtualized="True" Weight="3" />
-    <Link Source="@47" Target="@22" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" />
-    <Link Source="@48" Target="@22" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4" />
-    <Link Source="@5" Target="@16" Category="Contains" />
-  </Links>
-  <Categories>
-    <Category Id="CodeMap_ExternalReference" Label="External Reference" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Referenced By" OutgoingActionLabel="References" />
-    <Category Id="CodeMap_WpfProject" Label="WPF Project" CanBeDataDriven="True" IsProviderRoot="False" NavigationActionLabel="WPF Projects" />
-    <Category Id="CodeSchema_Assembly" Label="Assembly" BasedOn="File" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="CodeSchema_Assembly" NavigationActionLabel="Assemblies" />
-    <Category Id="CodeSchema_Calls" Label="Calls" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Called By" OutgoingActionLabel="Calls" />
-    <Category Id="CodeSchema_Class" Label="Class" BasedOn="CodeSchema_Type" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Member" Icon="CodeSchema_Class" NavigationActionLabel="Classes" />
-    <Category Id="CodeSchema_Delegate" Label="Delegate" BasedOn="CodeSchema_Class" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="CodeSchema_Delegate" NavigationActionLabel="Delegates" />
-    <Category Id="CodeSchema_Enum" Label="Enum" BasedOn="CodeSchema_Type" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Member" Icon="CodeSchema_Enum" NavigationActionLabel="Enums" />
-    <Category Id="CodeSchema_FieldRead" Label="Field Read" BasedOn="CodeSchema_FieldReference" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Read By" OutgoingActionLabel="Reads Fields" />
-    <Category Id="CodeSchema_FieldReference" Label="Field Reference" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Referenced By" OutgoingActionLabel="References Fields" />
-    <Category Id="CodeSchema_FieldWrite" Label="Field Write" BasedOn="CodeSchema_FieldReference" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Written By" OutgoingActionLabel="Writes Fields" />
-    <Category Id="CodeSchema_Namespace" Label="Namespace" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Type" Icon="CodeSchema_Namespace" NavigationActionLabel="Namespaces" />
-    <Category Id="CodeSchema_Type" Label="Type" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Member" Icon="CodeSchema_Class" NavigationActionLabel="Types" />
-    <Category Id="Contains" Label="Contains" Description="Whether the source of the link contains the target object" CanBeDataDriven="False" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Contained By" IsContainment="True" OutgoingActionLabel="Contains" />
-    <Category Id="File" Label="File" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="File" NavigationActionLabel="Files" />
-    <Category Id="References" Label="References" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Referenced By" OutgoingActionLabel="References" />
-  </Categories>
-  <Properties>
-    <Property Id="AssemblyTimestamp" DataType="System.DateTime" />
-    <Property Id="Bounds" DataType="System.Windows.Rect" />
-    <Property Id="CanBeDataDriven" Label="CanBeDataDriven" Description="CanBeDataDriven" DataType="System.Boolean" />
-    <Property Id="CanLinkedNodesBeDataDriven" Label="CanLinkedNodesBeDataDriven" Description="CanLinkedNodesBeDataDriven" DataType="System.Boolean" />
-    <Property Id="CodeSchemaProperty_IsAbstract" Label="Is Abstract" Description="Flag to indicate member is 'Abstract' does not provide a full implementation" DataType="System.Boolean" />
-    <Property Id="CodeSchemaProperty_IsFinal" Label="Is Final" Description="Flag to indicate the member is 'Final' and cannot be derived from" DataType="System.Boolean" />
-    <Property Id="CodeSchemaProperty_IsInternal" Label="Is Internal" Description="Flag to indicate the method is 'Internal'" DataType="System.Boolean" />
-    <Property Id="CodeSchemaProperty_IsPublic" Label="Is Public" Description="Flag to indicate the scope is Public" DataType="System.Boolean" />
-    <Property Id="CodeSchemaProperty_StrongName" Label="StrongName" Description="StrongName" DataType="System.String" />
-    <Property Id="CommonLabel" DataType="System.String" />
-    <Property Id="DataVirtualized" Label="Data Virtualized" Description="If true, the graph can contain nodes and links that represent data for virtualized nodes/links (i.e. not actually created in the graph)." DataType="System.Boolean" />
-    <Property Id="DefaultAction" Label="DefaultAction" Description="DefaultAction" DataType="System.String" />
-    <Property Id="DelayedChildNodesState" Label="Delayed Child Nodes State" Description="Unspecified if the delayed child nodes state is not specified. NotFetched if the group contains child nodes that are not fetched into the graph yet. Fetched if the group has all its delayed child nodes already fetched." DataType="Microsoft.VisualStudio.GraphModel.DelayedDataState" />
-    <Property Id="DelayedCrossGroupLinksState" Label="Delayed Cross-Group Links State" Description="Unspecified if the delayed cross-group links state is not specified. NotFetched if delayed cross-group links on this node are not fetched into the graph yet. Fetched if all delayed cross-group links have already fetched." DataType="Microsoft.VisualStudio.GraphModel.DelayedDataState" />
-    <Property Id="Expression" DataType="System.String" />
-    <Property Id="FetchedChildrenCount" DataType="System.Int32" />
-    <Property Id="FetchingParent" DataType="Microsoft.VisualStudio.GraphModel.GraphNodeId" />
-    <Property Id="FilePath" Label="File Path" Description="File Path" DataType="System.String" />
-    <Property Id="Group" Label="Group" Description="Display the node as a group" DataType="Microsoft.VisualStudio.GraphModel.GraphGroupStyle" />
-    <Property Id="GroupLabel" DataType="System.String" />
-    <Property Id="Icon" Label="Icon" Description="Icon" DataType="System.String" />
-    <Property Id="IncomingActionLabel" Label="IncomingActionLabel" Description="IncomingActionLabel" DataType="System.String" />
-    <Property Id="IsContainment" DataType="System.Boolean" />
-    <Property Id="IsEnabled" DataType="System.Boolean" />
-    <Property Id="IsProviderRoot" Label="IsProviderRoot" Description="IsProviderRoot" DataType="System.Boolean" />
-    <Property Id="IsSourceVirtualized" Label="Link Source Virtualized" Description="If true, the link source end contains data for virtualized nodes/links (i.e. not actually created in the graph)." DataType="System.Boolean" />
-    <Property Id="IsTargetVirtualized" Label="Link Target Virtualized" Description="If true, the link target end contains data for virtualized nodes/links (i.e. not actually created in the graph)." DataType="System.Boolean" />
-    <Property Id="Label" Label="Label" Description="Displayable label of an Annotatable object" DataType="System.String" />
-    <Property Id="Layout" DataType="System.String" />
-    <Property Id="NavigationActionLabel" Label="NavigationActionLabel" Description="NavigationActionLabel" DataType="System.String" />
-    <Property Id="OutgoingActionLabel" Label="OutgoingActionLabel" Description="OutgoingActionLabel" DataType="System.String" />
-    <Property Id="TargetType" DataType="System.Type" />
-    <Property Id="UseManualLocation" DataType="System.Boolean" />
-    <Property Id="Value" DataType="System.String" />
-    <Property Id="ValueLabel" DataType="System.String" />
-    <Property Id="Visibility" Label="Visibility" Description="Defines whether a node in the graph is visible or not" DataType="System.Windows.Visibility" />
-    <Property Id="Weight" Label="Weight" Description="Weight" DataType="System.Double" />
-    <Property Id="ZoomLevel" DataType="System.String" />
-  </Properties>
-  <QualifiedNames>
-    <Name Id="Assembly" Label="Assembly" ValueType="Uri" />
-    <Name Id="Namespace" Label="Namespace" ValueType="System.String" />
-    <Name Id="Type" Label="Type" ValueType="System.Object" />
-  </QualifiedNames>
-  <IdentifierAliases>
-    <Alias n="1" Uri="Assembly=$(VsSolutionUri)/PicView/bin/Release/PicView.exe" />
-    <Alias n="2" Uri="Assembly=$(9b5425dc-4329-4a7a-a0c5-f93161f77245.OutputPathUri)" />
-    <Alias n="3" Id="(@2)" />
-    <Alias n="4" Uri="Assembly=$(VsSolutionUri)/packages/Magick.NET-Q16-HDRI-x64.7.0.4.701/lib/net40-client/Magick.NET-Q16-HDRI-x64.dll" />
-    <Alias n="5" Id="(@4)" />
-    <Alias n="6" Uri="Assembly=$(VsSolutionUri)/packages/XamlAnimatedGif.1.1.6/lib/net45/XamlAnimatedGif.dll" />
-    <Alias n="7" Id="(@6)" />
-    <Alias n="8" Uri="Assembly=$(VsSolutionUri)/PicView/Microsoft.WindowsAPICodePack.Shell.dll" />
-    <Alias n="9" Id="(@8)" />
-    <Alias n="10" Id="(@2 Namespace=PicView)" />
-    <Alias n="11" Id="Namespace=PicView.lib" />
-    <Alias n="12" Id="(@2 @11)" />
-    <Alias n="13" Id="Namespace=PicView.lib.UserControls" />
-    <Alias n="14" Id="(@2 @13)" />
-    <Alias n="16" Id="(@2 Namespace=PicView.Properties)" />
-    <Alias n="17" Id="Namespace=PicView.Windows" />
-    <Alias n="18" Id="(@2 @17)" />
-    <Alias n="19" Id="(@2 @17 Type=About)" />
-    <Alias n="20" Id="(@2 @13 Type=AjaxLoading)" />
-    <Alias n="21" Id="(@2 @17 Type=AllSettings)" />
-    <Alias n="22" Id="(@2 @11 Type=AnimationHelper)" />
-    <Alias n="23" Id="(@2 @11 Type=ArchiveExtraction)" />
-    <Alias n="24" Id="(@2 @13 Type=AutoScrollSign)" />
-    <Alias n="25" Id="(@2 @13 Type=ClickArrow)" />
-    <Alias n="26" Id="(@2 @17 Type=FakeWindow)" />
-    <Alias n="27" Id="(@2 @11 Type=FileFunctions)" />
-    <Alias n="28" Id="(@2 @13 Type=FileMenu)" />
-    <Alias n="29" Id="(@2 @17 Type=Help)" />
-    <Alias n="30" Id="(@2 @11 Type=Helper)" />
-    <Alias n="31" Id="(@2 @11 Type=ImageManager)" />
-    <Alias n="32" Id="(@2 @13 Type=ImageSettings)" />
-    <Alias n="33" Id="(@2 Namespace=PicView Type=MainWindow)" />
-    <Alias n="34" Id="(@2 @13 Type=MyEventArgs)" />
-    <Alias n="35" Id="(@2 @13 Type=MyEventHandler)" />
-    <Alias n="36" Id="(@2 @11 Type=NativeMethods)" />
-    <Alias n="37" Id="(@2 @13 Type=PicGallery)" />
-    <Alias n="38" Id="(@2 @13 Type=PicGalleryItem)" />
-    <Alias n="39" Id="(@2 @11 Type=Preloader)" />
-    <Alias n="40" Id="(@2 @13 Type=QuickSettingsMenu)" />
-    <Alias n="41" Id="(@2 @11 Type=RecentFiles)" />
-    <Alias n="42" Id="(@2 @13 Type=SexyToolTip)" />
-    <Alias n="43" Id="(@2 @11 Type=SortFilesBy)" />
-    <Alias n="44" Id="(@2 @11 Type=Variables)" />
-    <Alias n="45" Id="(@2 @11 Type=Wallpaper)" />
-    <Alias n="46" Id="(@2 @11 Type=WallpaperStyle)" />
-    <Alias n="47" Id="(@2 @13 Type=X2)" />
-    <Alias n="48" Id="(@2 @17 Type=YesNoDialogWindow)" />
-  </IdentifierAliases>
-  <Styles>
-    <Style TargetType="Node" GroupLabel="Error" ValueLabel="Error Level">
-      <Condition Expression="HasValue('ErrorLevel')" />
-      <Setter Property="Icon" Value="Node.Error" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Results" ValueLabel="True">
-      <Condition Expression="HasCategory('QueryResult')" />
-      <Setter Property="Background" Value="#FFBCFFBE" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Test Project" ValueLabel="Test Project">
-      <Condition Expression="HasCategory('CodeMap_TestProject')" />
-      <Setter Property="Icon" Value="CodeMap_TestProject" />
-      <Setter Property="Background" Value="#FF307A69" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Web Project" ValueLabel="Web Project">
-      <Condition Expression="HasCategory('CodeMap_WebProject')" />
-      <Setter Property="Icon" Value="CodeMap_WebProject" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Windows Store Project" ValueLabel="Windows Store Project">
-      <Condition Expression="HasCategory('CodeMap_WindowsStoreProject')" />
-      <Setter Property="Icon" Value="CodeMap_WindowsStoreProject" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Phone Project" ValueLabel="Phone Project">
-      <Condition Expression="HasCategory('CodeMap_PhoneProject')" />
-      <Setter Property="Icon" Value="CodeMap_PhoneProject" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Portable Library" ValueLabel="Portable Library">
-      <Condition Expression="HasCategory('CodeMap_PortableLibraryProject')" />
-      <Setter Property="Icon" Value="CodeMap_PortableLibraryProject" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="WPF Project" ValueLabel="WPF Project">
-      <Condition Expression="HasCategory('CodeMap_WpfProject')" />
-      <Setter Property="Icon" Value="CodeMap_WpfProject" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="VSIX Project" ValueLabel="VSIX Project">
-      <Condition Expression="HasCategory('CodeMap_VsixProject')" />
-      <Setter Property="Icon" Value="CodeMap_VsixProject" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Modeling Project" ValueLabel="Modeling Project">
-      <Condition Expression="HasCategory('CodeMap_ModelingProject')" />
-      <Setter Property="Icon" Value="CodeMap_ModelingProject" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Assembly" ValueLabel="Has category">
-      <Condition Expression="HasCategory('CodeSchema_Assembly')" />
-      <Setter Property="Background" Value="#FF094167" />
-      <Setter Property="Stroke" Value="#FF094167" />
-      <Setter Property="Icon" Value="CodeSchema_Assembly" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Namespace" ValueLabel="Has category">
-      <Condition Expression="HasCategory('CodeSchema_Namespace')" />
-      <Setter Property="Background" Value="#FF0E619A" />
-      <Setter Property="Stroke" Value="#FF0E619A" />
-      <Setter Property="Icon" Value="CodeSchema_Namespace" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Interface" ValueLabel="Has category">
-      <Condition Expression="HasCategory('CodeSchema_Interface')" />
-      <Setter Property="Background" Value="#FF1382CE" />
-      <Setter Property="Stroke" Value="#FF1382CE" />
-      <Setter Property="Icon" Value="CodeSchema_Interface" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Struct" ValueLabel="Has category">
-      <Condition Expression="HasCategory('CodeSchema_Struct')" />
-      <Setter Property="Background" Value="#FF1382CE" />
-      <Setter Property="Stroke" Value="#FF1382CE" />
-      <Setter Property="Icon" Value="CodeSchema_Struct" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Enumeration" ValueLabel="Has category">
-      <Condition Expression="HasCategory('CodeSchema_Enum')" />
-      <Setter Property="Background" Value="#FF1382CE" />
-      <Setter Property="Stroke" Value="#FF1382CE" />
-      <Setter Property="Icon" Value="CodeSchema_Enum" />
-      <Setter Property="LayoutSettings" Value="List" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Delegate" ValueLabel="Has category">
-      <Condition Expression="HasCategory('CodeSchema_Delegate')" />
-      <Setter Property="Background" Value="#FF1382CE" />
-      <Setter Property="Stroke" Value="#FF1382CE" />
-      <Setter Property="Icon" Value="CodeSchema_Delegate" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Class" ValueLabel="Has category">
-      <Condition Expression="HasCategory('CodeSchema_Type')" />
-      <Setter Property="Background" Value="#FF1382CE" />
-      <Setter Property="Stroke" Value="#FF1382CE" />
-      <Setter Property="Icon" Value="CodeSchema_Class" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Property" ValueLabel="Has category">
-      <Condition Expression="HasCategory('CodeSchema_Property')" />
-      <Setter Property="Background" Value="#FFE0E0E0" />
-      <Setter Property="Stroke" Value="#FFE0E0E0" />
-      <Setter Property="Icon" Value="CodeSchema_Property" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Method" ValueLabel="Has category">
-      <Condition Expression="HasCategory('CodeSchema_Method') Or HasCategory('CodeSchema_CallStackUnresolvedMethod')" />
-      <Setter Property="Background" Value="#FFE0E0E0" />
-      <Setter Property="Stroke" Value="#FFE0E0E0" />
-      <Setter Property="Icon" Value="CodeSchema_Method" />
-      <Setter Property="LayoutSettings" Value="List" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Event" ValueLabel="Has category">
-      <Condition Expression="HasCategory('CodeSchema_Event')" />
-      <Setter Property="Background" Value="#FFE0E0E0" />
-      <Setter Property="Stroke" Value="#FFE0E0E0" />
-      <Setter Property="Icon" Value="CodeSchema_Event" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Field" ValueLabel="Has category">
-      <Condition Expression="HasCategory('CodeSchema_Field')" />
-      <Setter Property="Background" Value="#FFE0E0E0" />
-      <Setter Property="Stroke" Value="#FFE0E0E0" />
-      <Setter Property="Icon" Value="CodeSchema_Field" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Out Parameter" ValueLabel="Has category">
-      <Condition Expression="CodeSchemaProperty_IsOut = 'True'" />
-      <Setter Property="Icon" Value="CodeSchema_OutParameter" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Parameter" ValueLabel="Has category">
-      <Condition Expression="HasCategory('CodeSchema_Parameter')" />
-      <Setter Property="Icon" Value="CodeSchema_Parameter" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Local Variable" ValueLabel="Has category">
-      <Condition Expression="HasCategory('CodeSchema_LocalExpression')" />
-      <Setter Property="Icon" Value="CodeSchema_LocalExpression" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Externals" ValueLabel="Has category">
-      <Condition Expression="HasCategory('Externals')" />
-      <Setter Property="Background" Value="#FF424242" />
-      <Setter Property="Stroke" Value="#FF424242" />
-    </Style>
-    <Style TargetType="Link" GroupLabel="Inherits From" ValueLabel="True">
-      <Condition Expression="HasCategory('InheritsFrom')" />
-      <Setter Property="Stroke" Value="#FF00A600" />
-      <Setter Property="StrokeDashArray" Value="2 0" />
-      <Setter Property="DrawArrow" Value="true" />
-    </Style>
-    <Style TargetType="Link" GroupLabel="Implements" ValueLabel="True">
-      <Condition Expression="HasCategory('Implements')" />
-      <Setter Property="Stroke" Value="#8000A600" />
-      <Setter Property="StrokeDashArray" Value="2 2" />
-      <Setter Property="DrawArrow" Value="true" />
-    </Style>
-    <Style TargetType="Link" GroupLabel="Calls" ValueLabel="True">
-      <Condition Expression="HasCategory('CodeSchema_Calls')" />
-      <Setter Property="Stroke" Value="#FFFF00FF" />
-      <Setter Property="StrokeDashArray" Value="2 0" />
-      <Setter Property="DrawArrow" Value="true" />
-    </Style>
-    <Style TargetType="Link" GroupLabel="Function Pointer" ValueLabel="True">
-      <Condition Expression="HasCategory('CodeSchema_FunctionPointer')" />
-      <Setter Property="Stroke" Value="#FFFF00FF" />
-      <Setter Property="StrokeDashArray" Value="2 2" />
-      <Setter Property="DrawArrow" Value="true" />
-    </Style>
-    <Style TargetType="Link" GroupLabel="Field Read" ValueLabel="True">
-      <Condition Expression="HasCategory('CodeSchema_FieldRead')" />
-      <Setter Property="Stroke" Value="#FF00AEEF" />
-      <Setter Property="StrokeDashArray" Value="2 2" />
-      <Setter Property="DrawArrow" Value="true" />
-    </Style>
-    <Style TargetType="Link" GroupLabel="Field Write" ValueLabel="True">
-      <Condition Expression="HasCategory('CodeSchema_FieldWrite')" />
-      <Setter Property="Stroke" Value="#FF00AEEF" />
-      <Setter Property="DrawArrow" Value="true" />
-      <Setter Property="IsHidden" Value="false" />
-    </Style>
-    <Style TargetType="Link" GroupLabel="Inherits From" ValueLabel="True" Visibility="Hidden">
-      <Condition Expression="HasCategory('InheritsFrom') And Target.HasCategory('CodeSchema_Class')" />
-      <Setter Property="TargetDecorator" Value="OpenArrow" />
-    </Style>
-    <Style TargetType="Link" GroupLabel="Implements" ValueLabel="True" Visibility="Hidden">
-      <Condition Expression="HasCategory('Implements') And Target.HasCategory('CodeSchema_Interface')" />
-      <Setter Property="TargetDecorator" Value="OpenArrow" />
-    </Style>
-    <Style TargetType="Link" GroupLabel="Comment Link" ValueLabel="True" Visibility="Hidden">
-      <Condition Expression="Source.HasCategory('Comment')" />
-      <Setter Property="Stroke" Value="#FFE5C365" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Cursor Location Changed" ValueLabel="True" Visibility="Hidden">
-      <Condition Expression="IsCursorLocation" />
-      <Setter Property="IndicatorWest" Value="WestIndicator" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Disabled Breakpoint Location Changed" ValueLabel="True" Visibility="Hidden">
-      <Condition Expression="DisabledBreakpointCount" />
-      <Setter Property="IndicatorWest" Value="WestIndicator" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Enabled Breakpoint Location Changed" ValueLabel="True" Visibility="Hidden">
-      <Condition Expression="EnabledBreakpointCount" />
-      <Setter Property="IndicatorWest" Value="WestIndicator" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Instruction Pointer Location Changed" ValueLabel="True" Visibility="Hidden">
-      <Condition Expression="IsInstructionPointerLocation" />
-      <Setter Property="IndicatorWest" Value="WestIndicator" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Current Callstack Changed" ValueLabel="True" Visibility="Hidden">
-      <Condition Expression="IsCurrentCallstackFrame" />
-      <Setter Property="IndicatorWest" Value="WestIndicator" />
-    </Style>
-    <Style TargetType="Link" GroupLabel="Return" ValueLabel="True" Visibility="Hidden">
-      <Condition Expression="HasCategory('CodeSchema_ReturnTypeLink')" />
-    </Style>
-    <Style TargetType="Link" GroupLabel="References" ValueLabel="True" Visibility="Hidden">
-      <Condition Expression="HasCategory('References')" />
-    </Style>
-    <Style TargetType="Link" GroupLabel="Uses Attribute" ValueLabel="True" Visibility="Hidden">
-      <Condition Expression="HasCategory('CodeSchema_AttributeUse')" />
-    </Style>
-    <Style TargetType="Node" GroupLabel="Solution Folder" ValueLabel="True" Visibility="Hidden">
-      <Condition Expression="HasCategory('CodeMap_SolutionFolder')" />
-      <Setter Property="Background" Value="#FFDEBA83" />
-    </Style>
-    <Style TargetType="Link" GroupLabel="Project Reference" ValueLabel="Project Reference">
-      <Condition Expression="HasCategory('CodeMap_ProjectReference')" />
-      <Setter Property="Stroke" Value="#9A9A9A" />
-      <Setter Property="StrokeDashArray" Value="2 2" />
-      <Setter Property="DrawArrow" Value="true" />
-    </Style>
-    <Style TargetType="Link" GroupLabel="External Reference" ValueLabel="External Reference">
-      <Condition Expression="HasCategory('CodeMap_ExternalReference')" />
-      <Setter Property="Stroke" Value="#9A9A9A" />
-      <Setter Property="StrokeDashArray" Value="2 2" />
-      <Setter Property="DrawArrow" Value="true" />
-    </Style>
-  </Styles>
-  <Paths>
-    <Path Id="9b5425dc-4329-4a7a-a0c5-f93161f77245.OutputPath" Value="F:\Projects\PicView\PicView\bin\Debug\PicView.exe" />
-    <Path Id="9b5425dc-4329-4a7a-a0c5-f93161f77245.OutputPathUri" Value="file:///F:/Projects/PicView/PicView/bin/Debug/PicView.exe" />
-    <Path Id="VsSolution" Value="F:\Projects\PicView" />
-    <Path Id="VsSolutionUri" Value="file:///F:/Projects/PicView" />
-  </Paths>
-</DirectedGraph>

+ 1 - 1
PicView/App.config

@@ -6,7 +6,7 @@
         </sectionGroup>
     </configSections>
     <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
     </startup>
     <userSettings>
         <PicView.Properties.Settings>

+ 3 - 1
PicView/Error Handling/Error_Handling.cs

@@ -82,13 +82,14 @@ namespace PicView
             // Retry if exists, fixes rare error
             if (File.Exists(file))
             {
-                Preloader.Add(file);
+                //Preloader.Add(file);
                 BitmapSource pic = Preloader.Load(file);
                 if (pic != null)
                 {
                     Pic(file);
                     return true;
                 }
+                return false;
             }
 
             // Continue to remove file if can't be rendered
@@ -129,6 +130,7 @@ namespace PicView
             Preloader.Clear();
             DeleteTempFiles();
             PreloadCount = 0;
+            freshStartup = true;
 
             if (Properties.Settings.Default.PicGallery > 0)
                 PicGalleryLogic.Clear();

+ 0 - 21
PicView/Helpers/Helper.cs

@@ -40,27 +40,6 @@ namespace PicView
             prog.SetProgressState(TaskbarProgressBarState.NoProgress);
         }
 
-        /// <summary>
-        ///  Only preload every second entry
-        ///  and determine if going backwards or forwards
-        /// </summary>
-        /// <returns></returns>
-        internal static bool? PreloadDirection()
-        {
-            if (freshStartup)
-                return false;
-
-            if (!reverse)
-            {
-                if (PreloadCount > 2)
-                    return false;
-            }
-            else if (PreloadCount < -1)
-                return true;
-
-            return false;
-        }
-
         /// <summary>
         /// Returns a Windows Thumbnail
         /// </summary>

+ 6 - 3
PicView/Image Logic/ImageManager.cs

@@ -25,10 +25,12 @@ namespace PicView
                 var mrs = new MagickReadSettings()
                 {
                     Density = new Density(300, 300),
-                };
+                    //Width = Fields.MonitorInfo.Width,
+                    //Height = Fields.MonitorInfo.Height,
+                    BackgroundColor = MagickColors.Transparent,
+                    //Format = MagickFormat.Jpeg
+                };           
 
-                // Make background transparent
-                mrs.BackgroundColor = MagickColors.Transparent;
                 try
                 {
                     magick.Read(file, mrs);
@@ -44,6 +46,7 @@ namespace PicView
 
                 var pic = magick.ToBitmapSource();
                 pic.Freeze();
+                magick.Dispose();
                 return pic;
             }
 

+ 15 - 23
PicView/Image Logic/Navigation.cs

@@ -139,8 +139,7 @@ namespace PicView
             }
             if (x < 0)
             {
-                var b = PicErrorFix(x);
-                if (!b)
+                if (!PicErrorFix(x))
                     return;
             }
 
@@ -189,15 +188,21 @@ namespace PicView
                     {
                         // Try again while loading?                      
                         await Task.Delay(25);
-                        pic = Preloader.Load(Pics[x]);
+                        if (x < Pics.Count)
+                            pic = Preloader.Load(Pics[x]);
                     } while (Preloader.IsLoading);
                 }
                 
                 // If pic is still null, image can't be rendered
                 if (pic == null)
                 {
-                    PicErrorFix(x);
-                    return;
+                    if (!PicErrorFix(x))
+                    {
+                        // Fixes error when Skipping to last or first pic
+                        await Task.Run(() => pic = RenderToBitmapSource(Pics[x]));
+                        if (pic == null)
+                            Reload(true);
+                    }
                 }
             }
             else
@@ -248,11 +253,8 @@ namespace PicView
             }
 
             // Preload images \\
-            if (PreloadDirection().HasValue)
-            {
-                PreloadCount = 0;
-                await Preloader.PreLoad(x, reverse);
-            }
+            if (Preloader.StartPreload())
+                await Preloader.PreLoad(x);
 
             if (!freshStartup)
                 RecentFiles.Add(Pics[x]);
@@ -312,19 +314,8 @@ namespace PicView
             if (end)
             {
                 FolderIndex = next ? Pics.Count - 1 : 0;
-
-                if (!Preloader.Contains(Pics[FolderIndex]))
-                {
-                    PreloadCount = 0;
-                    Preloader.Clear();
-                }
-                else
-                {
-                    if (next)
-                        PreloadCount++;
-                    else
-                        PreloadCount--;
-                }
+                PreloadCount = 4;
+                Preloader.Clear();
             }
             // Go to next or previous
             else
@@ -366,6 +357,7 @@ namespace PicView
                     reverse = true;
                 }
             }
+
             Pic(FolderIndex);
         }
 

+ 386 - 135
PicView/Loading/Preloader.cs

@@ -1,11 +1,12 @@
 using System;
 using System.Collections.Concurrent;
+using System.Diagnostics;
 using System.IO;
 using System.Linq;
 using System.Threading.Tasks;
 using System.Windows.Media.Imaging;
-using static PicView.FileLists;
 using static PicView.Fields;
+using static PicView.FileLists;
 
 namespace PicView.PreLoading
 {
@@ -15,16 +16,44 @@ namespace PicView.PreLoading
     internal static class Preloader
     {
         /// <summary>
-        /// Contains A list of BitmapSources
+        ///  Start preload every third entry
+        /// </summary>
+        /// <returns></returns>
+        internal static bool StartPreload()
+        {
+            if (freshStartup || PreloadCount > 2 || PreloadCount < -2)
+            {
+                PreloadCount = 0;
+                return true;
+            }
+
+            return false;
+        }
+
+
+        /// <summary>
+        /// Preloader list of BitmapSources
         /// </summary>
-        private static readonly ConcurrentDictionary<string, BitmapSource> Sources = new ConcurrentDictionary<string, BitmapSource>();
+        private static ConcurrentDictionary<string, BitmapSource> Sources = new ConcurrentDictionary<string, BitmapSource>();
 
+        /// <summary>
+        /// When Preloader is adding an image
+        /// </summary>
         internal static bool IsLoading;
 
+        //internal static int Count { get { return Sources.Count; } }
+
+        /// <summary>
+        /// Add file to prelader
+        /// </summary>
+        /// <param name="file">file path</param>
         internal static void Add(string file)
         {
             if (Contains(file))
+            {
+                IsLoading = false;
                 return;
+            }
 
             IsLoading = true;
 
@@ -36,9 +65,16 @@ namespace PicView.PreLoading
             }
             pic.Freeze();
             Sources.TryAdd(file, pic);
+#if DEBUG
+            Trace.WriteLine("Added = " + file + " to Preloader, index " + Pics.IndexOf(file));
+#endif
             IsLoading = false;
         }
 
+        /// <summary>
+        /// Add file to preloader from index
+        /// </summary>
+        /// <param name="i">Index of Pics</param>
         internal static void Add(int i)
         {
             if (i >= Pics.Count || i < 0)
@@ -53,37 +89,71 @@ namespace PicView.PreLoading
             if (File.Exists(Pics[i]))
             {
                 if (!Contains(Pics[i]))
+                {
                     Add(Pics[i]);
+                }
             }
             else
+            {
                 Pics.Remove(Pics[i]);
+#if DEBUG
+                Trace.WriteLine("Preloader removed = " + Pics[i] + " from Pics, index " + i);
+#endif
+                IsLoading = false;
+            }
+           
 
-            IsLoading = false;
+            
         }
 
-        internal static void Add(BitmapSource bmp, string key)
+        //internal static void Add(BitmapSource bmp, string key)
+        //{
+        //    if (string.IsNullOrWhiteSpace(key))
+        //        return;
+        //    if (Contains(key))
+        //        return;
+        //    if (bmp == null)
+        //        return;
+        //    if (!bmp.IsFrozen)
+        //        bmp.Freeze();
+        //    Sources.TryAdd(key, bmp);
+        //}
+
+        /// <summary>
+        /// Removes the key, after checking if it exists
+        /// </summary>
+        /// <param name="key"></param>
+        internal static void Remove(string key)
         {
-            if (string.IsNullOrWhiteSpace(key))
-                return;
-            if (Contains(key))
+            if (key == null)
                 return;
-            if (bmp == null)
+            if (!Contains(key))
                 return;
-            if (!bmp.IsFrozen)
-                bmp.Freeze();
-            Sources.TryAdd(key, bmp);
+
+            _ = Sources[key];
+            Sources.TryRemove(key, out _);
+
+#if DEBUG
+            Trace.WriteLine("Removed = " + key + " from Preloader, index " + Pics.IndexOf(key));
+#endif
         }
 
         /// <summary>
         /// Removes the key, after checking if it exists
         /// </summary>
         /// <param name="key"></param>
-        internal static void Remove(string key)
+        internal static void Remove(int i)
         {
-            if (key == null) return;
-            if (!Contains(key)) return;
-            _ = Sources[key];
-            Sources.TryRemove(key, out _);
+            if (i >= Pics.Count || i < 0)
+                return;
+
+            if (File.Exists(Pics[i]))
+            {
+                if (Contains(Pics[i]))
+                {
+                    Remove(Pics[i]);
+                }
+            }
         }
 
         /// <summary>
@@ -91,8 +161,11 @@ namespace PicView.PreLoading
         /// </summary>
         internal static void Clear()
         {
-            // Add elemnts to Clear method and set timer to fast
-            Clear(Sources.Keys.ToArray());
+            Sources.Clear();
+            PreloadCount = 4; // Reset to make sure
+#if DEBUG
+            Trace.WriteLine("Cleared Preloader");
+#endif
         }
 
         /// <summary>
@@ -105,6 +178,10 @@ namespace PicView.PreLoading
             {
                 Remove(array[i]);
                 GC.Collect();
+
+#if DEBUG
+                Trace.WriteLine("Removed = " + array[i] + " from Preloader");
+#endif
             }
         }
 
@@ -129,12 +206,12 @@ namespace PicView.PreLoading
         /// <returns></returns>
         internal static bool Contains(string key)
         {
-            if (string.IsNullOrWhiteSpace(key))
+            if (string.IsNullOrWhiteSpace(key) || Sources.Count <= 0)
                 return false;
             return Sources.ContainsKey(key);
         }
 
-        internal static int Count { get { return Sources.Count; } }
+        
 
         /// <summary>
         /// Starts decoding images into memory,
@@ -142,160 +219,334 @@ namespace PicView.PreLoading
         /// </summary>
         /// <param name="index"></param>
         /// <param name="reverse"></param>
-        internal static Task PreLoad(int index, bool reverse)
+        internal static Task PreLoad(int index)
         {
+#if DEBUG
+            Trace.WriteLine("Preolader started, " 
+                + string.Concat(Properties.Settings.Default.Looping ? "looping " : string.Empty) 
+                + string.Concat(reverse ? "backwards" : "forwards"));
+#endif
+
             return Task.Run(() =>
             {
-                int i;
+                var toLoad = 5;
+                var extraToLoad = 3;
+                var cleanUpLoad = toLoad + extraToLoad;
+
 
+                // Not looping
                 if (!Properties.Settings.Default.Looping)
                 {
-                    if (!reverse && index < Pics.Count)
+                    // Forwards
+                    if (!reverse)
                     {
-                        //Add first three
-                        i = index + 1 >= Pics.Count ? Pics.Count : index + 1;
-                        Add(i);
-                        i += 1 >= Pics.Count ? Pics.Count - 1 : i += 1;
-                        Add(i);
-                        i += 1 >= Pics.Count ? Pics.Count - 1 : i += 1;
-                        Add(i);
-
-                        //Add two behind
-                        i = index - 1 < 0 ? 0 : index - 1;
-                        Add(i);
-                        i = i - 1 < 0 ? 0 : i - 1;
-                        Add(i);
-
-                        //Add one more infront
-                        i = index + 4 >= Pics.Count ? Pics.Count : index + 4;
-                        Add(i);
+                        // Add 5 elements
+                        for (int i = index; i < index + toLoad; i++)
+                        {
+                            if (i > Pics.Count)
+                                break;
+                            Add(i);
+                        }
+                        // Add 3 elements behind
+                        for (int i = index - 1; i >= index - extraToLoad; i--)
+                        {
+                            if (i < 0)
+                                break;
+                            Add(i);
+                        }
 
+                        //Clean up behind
                         if (Pics.Count > 20 && !freshStartup)
                         {
-                            //Clean up behind
-                            var arr = new string[3];
-                            i = index - 3 < 0 ? (Pics.Count - index) - 3 : index - 3;
-                            if (i > -1 && i < Pics.Count)
-                                arr[0] = Pics[i];
-                            i = i - 1 < 0 ? (Pics.Count - index) - 1 : i - 1;
-                            if (i > -1 && i < Pics.Count)
-                                arr[1] = Pics[i];
-                            i = i - 1 < 0 ? (Pics.Count - index) - 1 : i - 1;
-                            if (i > -1 && i < Pics.Count)
-                                arr[2] = Pics[i];
-                            Clear(arr);
+                            for (int i = index - cleanUpLoad; i < index - toLoad; i++)
+                            {
+                                if (i < 0)
+                                    continue;
+                                if (i > Pics.Count)
+                                    break;
+
+                                Remove(i);
+                            }
                         }
                     }
+                    // Backwards
                     else
                     {
-                        //Add first three
-                        i = index - 1 < 0 ? Pics.Count - index : index - 1;
-                        Add(i);
-                        i = i - 1 < 0 ? 0 : i - 1;
-                        Add(i);
-                        i = i - 1 < 0 ? 0 : i - 1;
-                        Add(i);
-
-                        //Add two infront
-                        i = index + 1 >= Pics.Count ? Pics.Count : index + 1;
-                        Add(i);
-                        i = i + 1 >= Pics.Count ? (i + 1) - Pics.Count : i + 1;
-                        Add(i);
-
-                        //Add one more behind
-                        i = index - 4 < 0 ? (index + 4) - Pics.Count : index - 4;
-                        Add(i);
+                        // Add 5 elements behind
+                        for (int i = index - 1; i > index - toLoad; i--)
+                        {
+                            if (i < 0)
+                                break;
+                            Add(i);
+                        }
+                        // Add 3 elements
+                        for (int i = index; i <= index + toLoad; i++)
+                        {
+                            if (i > Pics.Count)
+                                break;
+                            Add(i);
+                        }
 
+                        //Clean up infront
                         if (Pics.Count > 20 && !freshStartup)
                         {
-                            //Clean up behind
-                            var arr = new string[3];
-                            i = index + 3 > Pics.Count - 1 ? Pics.Count - 1 : index + 3;
-                            arr[0] = Pics[i];
-                            i = index + 4 > Pics.Count - 1 ? Pics.Count - 1 : index + 4;
-                            arr[1] = Pics[i];
-                            i = index + 5 > Pics.Count - 1 ? Pics.Count - 1 : index + 5;
-                            arr[2] = Pics[i];
-                            Clear(arr);
+                            for (int i = index + toLoad; i < index + cleanUpLoad; i++)
+                            {
+                                if (i > Pics.Count)
+                                    break;
+                                Remove(i);
+                            }
                         }
                     }
                 }
+                
+                // Looping!
                 else
                 {
+                    // Forwards
                     if (!reverse)
                     {
-                        //Add first three
-                        i = index + 1 >= Pics.Count ? (index + 1) - Pics.Count : index + 1;
-                        Add(i);
-                        i = i + 1 >= Pics.Count ? (i + 1) - Pics.Count : i + 1;
-                        Add(i);
-                        i = i + 1 >= Pics.Count ? (i + 1) - Pics.Count : i + 1;
-                        Add(i);
-
-                        //Add two behind, but nof if just started
-                        if (!freshStartup)
+                        // Add 5 elements
+                        for (int i = index; i <= index + toLoad; i++)
                         {
-                            i = index - 1 < 0 ? Pics.Count - index : index - 1;
-                            Add(i);
-                            i = i - 1 < 0 ? Pics.Count - i : i - 1;
-                            Add(i);
+                            Add(i % Pics.Count);
+                        }
+                        // Add 3 elements behind
+                        for (int i = index - extraToLoad; i < index; i++)
+                        {
+                            Add(i % Pics.Count);
                         }
-                        //Add one more infront
-                        i = index + 4 >= Pics.Count ? (index + 4) - Pics.Count : index + 4;
-                        Add(i);
 
+                        //Clean up behind
                         if (Pics.Count > 20 && !freshStartup)
                         {
-                            //Clean up behind
-                            var arr = new string[3];
-                            i = index - 3 < 0 ? (Pics.Count - index) - 3 : index - 3;
-                            if (i > -1 && i < Pics.Count)
-                                arr[0] = Pics[i];
-                            i = i - 1 < 0 ? (Pics.Count - index) - 1 : i - 1;
-                            if (i > -1 && i < Pics.Count)
-                                arr[1] = Pics[i];
-                            i = i - 1 < 0 ? (Pics.Count - index) - 1 : i - 1;
-                            if (i > -1 && i < Pics.Count)
-                                arr[2] = Pics[i];
-                            Clear(arr);
+                            for (int i = index - cleanUpLoad + Pics.Count; i < index + Pics.Count; i++)
+                            {
+                                Remove(i % Pics.Count);
+                            }
                         }
                     }
-
+                    // Backwards
                     else
                     {
-                        //Add first three
-                        i = index - 1 < 0 ? Pics.Count : index - 1;
-                        Add(i);
-                        i = i - 1 < 0 ? Pics.Count : i - 1;
-                        Add(i);
-                        i = i - 1 < 0 ? Pics.Count : i - 1;
-                        Add(i);
-
-                        //Add two behind
-                        i = index + 1 >= Pics.Count ? (i + 1) - Pics.Count : index + 1;
-                        Add(i);
-                        i = i + 1 >= Pics.Count ? (i + 1) - Pics.Count : i + 1;
-                        Add(i);
-
-                        //Add one more infront
-                        i = index - 4 < 0 ? (index + 4) - Pics.Count : index - 4;
-                        Add(i);
+                        // Add 5 elements behind
+                        for (int i = index; i <= toLoad; i++) // Need proper working solution
+                        {
+                            Add(i % Pics.Count); 
+                        }
+
+                        // Non-working, runs more than it should
+                        //for (int i = index - 1; i >= index - (toLoad + 1); i--)
+                        //{
+                        //    if (i == 0)
+                        //        i = Pics.Count - 1;
+
+                        //    Add(i % Pics.Count);
+                        //}
 
+                        // Add 3 elements
+                        for (int i = index; i <= index + extraToLoad; i++) // Somewhat untested
+                        {
+                            Add(i % Pics.Count);
+                        }
+
+                        //Clean up infront
                         if (Pics.Count > 20 && !freshStartup)
                         {
-                            //Clean up behind
-                            var arr = new string[3];
-                            i = index + 3 > Pics.Count - 1 ? Pics.Count - 1 : index + 3;
-                            arr[0] = Pics[i];
-                            i = index + 4 > Pics.Count - 1 ? Pics.Count - 1 : index + 4;
-                            arr[1] = Pics[i];
-                            i = index + 5 > Pics.Count - 1 ? Pics.Count - 1 : index + 5;
-                            arr[2] = Pics[i];
-                            Clear(arr);
+                            for (int i = index + toLoad; i <= index + cleanUpLoad; i++)
+                            {
+                                Remove(i % Pics.Count);
+                            }
                         }
+
+                        ////Add first three
+                        //int i = index - 1 < 0 ? Pics.Count : index - 1;
+                        //Add(i);
+                        //i = i - 1 < 0 ? Pics.Count : i - 1;
+                        //Add(i);
+                        //i = i - 1 < 0 ? Pics.Count : i - 1;
+                        //Add(i);
+
+                        ////Add two behind
+                        //i = index + 1 >= Pics.Count ? (i + 1) - Pics.Count : index + 1;
+                        //Add(i);
+                        //i = i + 1 >= Pics.Count ? (i + 1) - Pics.Count : i + 1;
+                        //Add(i);
+
+                        ////Add one more infront
+                        //i = index - 4 < 0 ? (index + 4) - Pics.Count : index - 4;
+                        //Add(i);
+
+                        //if (Pics.Count > 20 && !freshStartup)
+                        //{
+                        //    //Clean up behind
+                        //    var arr = new string[3];
+                        //    i = index + 3 > Pics.Count - 1 ? Pics.Count - 1 : index + 3;
+                        //    arr[0] = Pics[i];
+                        //    i = index + 4 > Pics.Count - 1 ? Pics.Count - 1 : index + 4;
+                        //    arr[1] = Pics[i];
+                        //    i = index + 5 > Pics.Count - 1 ? Pics.Count - 1 : index + 5;
+                        //    arr[2] = Pics[i];
+                        //    Clear(arr);
+                        //}
                     }
                 }
 
+                IsLoading = false; // Fixes loading erros
+
+                #region Discarded code
+                //int i;
+
+                //if (!Properties.Settings.Default.Looping)
+                //{
+                //    if (!reverse && index < Pics.Count)
+                //    {
+                //        //Add first three
+                //        i = index + 1 >= Pics.Count ? Pics.Count : index + 1;
+                //        Add(i);
+                //        i += 1 >= Pics.Count ? Pics.Count - 1 : i += 1;
+                //        Add(i);
+                //        i += 1 >= Pics.Count ? Pics.Count - 1 : i += 1;
+                //        Add(i);
+
+                //        //Add two behind
+                //        i = index - 1 < 0 ? 0 : index - 1;
+                //        Add(i);
+                //        i = i - 1 < 0 ? 0 : i - 1;
+                //        Add(i);
+
+                //        //Add one more infront
+                //        i = index + 4 >= Pics.Count ? Pics.Count : index + 4;
+                //        Add(i);
+
+                //        if (Pics.Count > 20 && !freshStartup)
+                //        {
+                //            //Clean up behind
+                //            var arr = new string[3];
+                //            i = index - 3 < 0 ? (Pics.Count - index) - 3 : index - 3;
+                //            if (i > -1 && i < Pics.Count)
+                //                arr[0] = Pics[i];
+                //            i = i - 1 < 0 ? (Pics.Count - index) - 1 : i - 1;
+                //            if (i > -1 && i < Pics.Count)
+                //                arr[1] = Pics[i];
+                //            i = i - 1 < 0 ? (Pics.Count - index) - 1 : i - 1;
+                //            if (i > -1 && i < Pics.Count)
+                //                arr[2] = Pics[i];
+                //            Clear(arr);
+                //        }
+                //    }
+                //    else
+                //    {
+                //        //Add first three
+                //        i = index - 1 < 0 ? Pics.Count - index : index - 1;
+                //        Add(i);
+                //        i = i - 1 < 0 ? 0 : i - 1;
+                //        Add(i);
+                //        i = i - 1 < 0 ? 0 : i - 1;
+                //        Add(i);
+
+                //        //Add two infront
+                //        i = index + 1 >= Pics.Count ? Pics.Count : index + 1;
+                //        Add(i);
+                //        i = i + 1 >= Pics.Count ? (i + 1) - Pics.Count : i + 1;
+                //        Add(i);
+
+                //        //Add one more behind
+                //        i = index - 4 < 0 ? (index + 4) - Pics.Count : index - 4;
+                //        Add(i);
+
+                //        if (Pics.Count > 20 && !freshStartup)
+                //        {
+                //            //Clean up behind
+                //            var arr = new string[3];
+                //            i = index + 3 > Pics.Count - 1 ? Pics.Count - 1 : index + 3;
+                //            arr[0] = Pics[i];
+                //            i = index + 4 > Pics.Count - 1 ? Pics.Count - 1 : index + 4;
+                //            arr[1] = Pics[i];
+                //            i = index + 5 > Pics.Count - 1 ? Pics.Count - 1 : index + 5;
+                //            arr[2] = Pics[i];
+                //            Clear(arr);
+                //        }
+                //    }
+                //}
+                //else
+                //{
+                //    if (!reverse)
+                //    {
+                //        //Add first three
+                //        i = index + 1 >= Pics.Count ? (index + 1) - Pics.Count : index + 1;
+                //        Add(i);
+                //        i = i + 1 >= Pics.Count ? (i + 1) - Pics.Count : i + 1;
+                //        Add(i);
+                //        i = i + 1 >= Pics.Count ? (i + 1) - Pics.Count : i + 1;
+                //        Add(i);
+
+                //        //Add two behind, but nof if just started
+                //        if (!freshStartup)
+                //        {
+                //            i = index - 1 < 0 ? Pics.Count - index : index - 1;
+                //            Add(i);
+                //            i = i - 1 < 0 ? Pics.Count - i : i - 1;
+                //            Add(i);
+                //        }
+                //        //Add one more infront
+                //        i = index + 4 >= Pics.Count ? (index + 4) - Pics.Count : index + 4;
+                //        Add(i);
+
+                //        if (Pics.Count > 20 && !freshStartup)
+                //        {
+                //            //Clean up behind
+                //            var arr = new string[3];
+                //            i = index - 3 < 0 ? (Pics.Count - index) - 3 : index - 3;
+                //            if (i > -1 && i < Pics.Count)
+                //                arr[0] = Pics[i];
+                //            i = i - 1 < 0 ? (Pics.Count - index) - 1 : i - 1;
+                //            if (i > -1 && i < Pics.Count)
+                //                arr[1] = Pics[i];
+                //            i = i - 1 < 0 ? (Pics.Count - index) - 1 : i - 1;
+                //            if (i > -1 && i < Pics.Count)
+                //                arr[2] = Pics[i];
+                //            Clear(arr);
+                //        }
+                //    }
+
+                //    else
+                //    {
+                //        //Add first three
+                //        i = index - 1 < 0 ? Pics.Count : index - 1;
+                //        Add(i);
+                //        i = i - 1 < 0 ? Pics.Count : i - 1;
+                //        Add(i);
+                //        i = i - 1 < 0 ? Pics.Count : i - 1;
+                //        Add(i);
+
+                //        //Add two behind
+                //        i = index + 1 >= Pics.Count ? (i + 1) - Pics.Count : index + 1;
+                //        Add(i);
+                //        i = i + 1 >= Pics.Count ? (i + 1) - Pics.Count : i + 1;
+                //        Add(i);
+
+                //        //Add one more infront
+                //        i = index - 4 < 0 ? (index + 4) - Pics.Count : index - 4;
+                //        Add(i);
+
+                //        if (Pics.Count > 20 && !freshStartup)
+                //        {
+                //            //Clean up behind
+                //            var arr = new string[3];
+                //            i = index + 3 > Pics.Count - 1 ? Pics.Count - 1 : index + 3;
+                //            arr[0] = Pics[i];
+                //            i = index + 4 > Pics.Count - 1 ? Pics.Count - 1 : index + 4;
+                //            arr[1] = Pics[i];
+                //            i = index + 5 > Pics.Count - 1 ? Pics.Count - 1 : index + 5;
+                //            arr[2] = Pics[i];
+                //            Clear(arr);
+                //        }
+                //    }
+                //}
+
+                #endregion
+
                 // Update Pics if needed
                 var tmp = FileList(Path.GetDirectoryName(PicPath));
                 if (tmp.Count != Pics.Count)

+ 1 - 1
PicView/PicVIew.csproj

@@ -9,7 +9,7 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>PicView</RootNamespace>
     <AssemblyName>PicView</AssemblyName>
-    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
     <WarningLevel>4</WarningLevel>

+ 1 - 1
PicView/Properties/Resources.Designer.cs

@@ -19,7 +19,7 @@ namespace PicView.Properties {
     // class via a tool like ResGen or Visual Studio.
     // To add or remove a member, edit your .ResX file then rerun ResGen
     // with the /str option, or rebuild your VS project.
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
     internal class Resources {

+ 1 - 1
PicView/Properties/Settings.Designer.cs

@@ -12,7 +12,7 @@ namespace PicView.Properties {
     
     
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.2.0.0")]
     internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
         
         private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));