From 14cc7bcea2970d07bd4c864e68ba041514741cdd Mon Sep 17 00:00:00 2001 From: ClemensF Date: Thu, 10 Oct 2013 00:46:47 +0200 Subject: [PATCH] Version 1.4.0: Fixed RenderTransform issue in MapRectangle, removed ManipulationModes.Rotate from default ManipulationMode in Map.WinRT, added setting of FileSystemAccessRule in ImageFileCache to enable cache write access for multiple users. --- Caching/FileDbCache/Properties/AssemblyInfo.cs | 4 ++-- Caching/ImageFileCache/ImageFileCache.cs | 10 ++++++++++ .../ImageFileCache/Properties/AssemblyInfo.cs | 4 ++-- MapControl/Map.WinRT.cs | 4 +++- MapControl/MapImage.cs | 11 +---------- MapControl/MapRectangle.cs | 17 ++++++----------- MapControl/Properties/AssemblyInfo.cs | 4 ++-- MapControl/WinRT/Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../StoreApplication/Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../WpfApplication/Properties/AssemblyInfo.cs | 4 ++-- .../Properties/Settings.Designer.cs | 2 +- 14 files changed, 39 insertions(+), 41 deletions(-) diff --git a/Caching/FileDbCache/Properties/AssemblyInfo.cs b/Caching/FileDbCache/Properties/AssemblyInfo.cs index bd669f9a..75e784b7 100644 --- a/Caching/FileDbCache/Properties/AssemblyInfo.cs +++ b/Caching/FileDbCache/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.3.10")] -[assembly: AssemblyFileVersion("1.3.10")] +[assembly: AssemblyVersion("1.4.0")] +[assembly: AssemblyFileVersion("1.4.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Caching/ImageFileCache/ImageFileCache.cs b/Caching/ImageFileCache/ImageFileCache.cs index 2796a06d..318a0e11 100644 --- a/Caching/ImageFileCache/ImageFileCache.cs +++ b/Caching/ImageFileCache/ImageFileCache.cs @@ -9,6 +9,8 @@ using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.Caching; +using System.Security.AccessControl; +using System.Security.Principal; namespace Caching { @@ -20,6 +22,10 @@ namespace Caching /// public class ImageFileCache : ObjectCache { + private static readonly FileSystemAccessRule fullControlRule = new FileSystemAccessRule( + new SecurityIdentifier(WellKnownSidType.BuiltinUsersSid, null), + FileSystemRights.FullControl, AccessControlType.Allow); + private readonly string name; private readonly string directory; @@ -184,6 +190,10 @@ namespace Caching { fileStream.Write(buffer, 8, buffer.Length - 8); } + + var fileSecurity = File.GetAccessControl(path); + fileSecurity.AddAccessRule(fullControlRule); + File.SetAccessControl(path, fileSecurity); } catch (Exception ex) { diff --git a/Caching/ImageFileCache/Properties/AssemblyInfo.cs b/Caching/ImageFileCache/Properties/AssemblyInfo.cs index 41cc9659..ba439a95 100644 --- a/Caching/ImageFileCache/Properties/AssemblyInfo.cs +++ b/Caching/ImageFileCache/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.3.10")] -[assembly: AssemblyFileVersion("1.3.10")] +[assembly: AssemblyVersion("1.4.0")] +[assembly: AssemblyFileVersion("1.4.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/Map.WinRT.cs b/MapControl/Map.WinRT.cs index 16ca3627..defde643 100644 --- a/MapControl/Map.WinRT.cs +++ b/MapControl/Map.WinRT.cs @@ -21,7 +21,9 @@ namespace MapControl public Map() { - ManipulationMode = ManipulationModes.All; + ManipulationMode = ManipulationModes.Scale | ManipulationModes.ScaleInertia | + ManipulationModes.TranslateX | ManipulationModes.TranslateY | ManipulationModes.TranslateInertia; + ManipulationDelta += OnManipulationDelta; PointerWheelChanged += OnPointerWheelChanged; PointerPressed += OnPointerPressed; diff --git a/MapControl/MapImage.cs b/MapControl/MapImage.cs index f6746720..292c83cc 100644 --- a/MapControl/MapImage.cs +++ b/MapControl/MapImage.cs @@ -17,11 +17,6 @@ namespace MapControl /// public class MapImage : MapRectangle { - private static readonly Transform imageTransform = new MatrixTransform - { - Matrix = new Matrix(1d, 0d, 0d, -1d, 0d, 1d) - }; - public static readonly DependencyProperty SourceProperty = DependencyProperty.Register( "Source", typeof(ImageSource), typeof(MapImage), new PropertyMetadata(null, (o, e) => ((MapImage)o).SourceChanged((ImageSource)e.NewValue))); @@ -34,11 +29,7 @@ namespace MapControl private void SourceChanged(ImageSource image) { - Fill = new ImageBrush - { - ImageSource = image, - RelativeTransform = imageTransform - }; + Fill = new ImageBrush { ImageSource = image }; } } } diff --git a/MapControl/MapRectangle.cs b/MapControl/MapRectangle.cs index 5e3499ee..d5eba46b 100644 --- a/MapControl/MapRectangle.cs +++ b/MapControl/MapRectangle.cs @@ -34,11 +34,6 @@ namespace MapControl "East", typeof(double), typeof(MapRectangle), new PropertyMetadata(double.NaN, (o, e) => ((MapRectangle)o).UpdateData())); - public MapRectangle() - { - Data = new RectangleGeometry(); - } - public double South { get { return (double)GetValue(SouthProperty); } @@ -65,8 +60,6 @@ namespace MapControl protected override void UpdateData() { - var geometry = (RectangleGeometry)Data; - if (ParentMap != null && !double.IsNaN(South) && !double.IsNaN(North) && !double.IsNaN(West) && !double.IsNaN(East) && @@ -75,13 +68,15 @@ namespace MapControl var p1 = ParentMap.MapTransform.Transform(new Location(South, West)); var p2 = ParentMap.MapTransform.Transform(new Location(North, East)); - geometry.Rect = new Rect(p1.X, p1.Y, p2.X - p1.X, p2.Y - p1.Y); - RenderTransform = ParentMap.ViewportTransform; + Data = new RectangleGeometry + { + Rect = new Rect(p1.X, p1.Y, p2.X - p1.X, p2.Y - p1.Y), + Transform = ParentMap.ViewportTransform + }; } else { - geometry.Rect = Rect.Empty; - ClearValue(RenderTransformProperty); + ClearValue(DataProperty); } } } diff --git a/MapControl/Properties/AssemblyInfo.cs b/MapControl/Properties/AssemblyInfo.cs index 7ef58096..1acb1304 100644 --- a/MapControl/Properties/AssemblyInfo.cs +++ b/MapControl/Properties/AssemblyInfo.cs @@ -15,8 +15,8 @@ using System.Windows; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.3.10")] -[assembly: AssemblyFileVersion("1.3.10")] +[assembly: AssemblyVersion("1.4.0")] +[assembly: AssemblyFileVersion("1.4.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/WinRT/Properties/AssemblyInfo.cs b/MapControl/WinRT/Properties/AssemblyInfo.cs index 23dc9fc0..846fb712 100644 --- a/MapControl/WinRT/Properties/AssemblyInfo.cs +++ b/MapControl/WinRT/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.3.10")] -[assembly: AssemblyFileVersion("1.3.10")] +[assembly: AssemblyVersion("1.4.0")] +[assembly: AssemblyFileVersion("1.4.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs b/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs index 74fe4944..9ff9dd45 100644 --- a/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs +++ b/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.3.10")] -[assembly: AssemblyFileVersion("1.3.10")] +[assembly: AssemblyVersion("1.4.0")] +[assembly: AssemblyFileVersion("1.4.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs b/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs index 6cfba49c..12cadf94 100644 --- a/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.3.10")] -[assembly: AssemblyFileVersion("1.3.10")] +[assembly: AssemblyVersion("1.4.0")] +[assembly: AssemblyFileVersion("1.4.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs index 80d8c7be..fb5f0895 100644 --- a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.3.10")] -[assembly: AssemblyFileVersion("1.3.10")] +[assembly: AssemblyVersion("1.4.0")] +[assembly: AssemblyFileVersion("1.4.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs b/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs index 3d7bc3d9..87a3d7f3 100644 --- a/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.3.10")] -[assembly: AssemblyFileVersion("1.3.10")] +[assembly: AssemblyVersion("1.4.0")] +[assembly: AssemblyFileVersion("1.4.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs index e82fe6a8..f2c0a79b 100644 --- a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.3.10")] -[assembly: AssemblyFileVersion("1.3.10")] +[assembly: AssemblyVersion("1.4.0")] +[assembly: AssemblyFileVersion("1.4.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/WpfApplication/Properties/Settings.Designer.cs b/SampleApps/WpfApplication/Properties/Settings.Designer.cs index 00ec00df..6dc3c897 100644 --- a/SampleApps/WpfApplication/Properties/Settings.Designer.cs +++ b/SampleApps/WpfApplication/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18051 +// Runtime Version:4.0.30319.33440 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated.