updated packages to the latest versions and minor cleanup

This commit is contained in:
2017-02-05 21:01:13 +02:00
parent a1170e244c
commit faa702ff13
6 changed files with 68 additions and 144 deletions
+1 -13
View File
@@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:GalaSoft_MvvmLight_Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP71"
xmlns:GalaSoft_MvvmLight_Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Platform"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
@@ -114,16 +114,4 @@
</StackPanel>
</Grid>
</Grid>
<!--Sample code showing usage of ApplicationBar-->
<!--<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
<shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1" />
<shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2" />
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem Text="MenuItem 1" />
<shell:ApplicationBarMenuItem Text="MenuItem 2" />
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>-->
</phone:PhoneApplicationPage>
+21 -8
View File
@@ -103,19 +103,30 @@
<Reference Include="Coding4Fun.Phone.Controls.Toolkit">
<HintPath>..\packages\Coding4Fun.Phone.Controls.Complete.1.4.6\lib\Coding4Fun.Phone.Controls.Toolkit.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.Extras.WP71, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" />
<Reference Include="GalaSoft.MvvmLight.WP71, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" />
<Reference Include="MicroIoc">
<HintPath>..\packages\microioc.1.0\lib\MicroIoc.dll</HintPath>
<Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\wp8\GalaSoft.MvvmLight.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\wp8\GalaSoft.MvvmLight.Extras.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19033, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\wp8\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference>
<Reference Include="MicroIoc, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\microioc.2.0\lib\portable-win+net40+sl40+wp\MicroIoc.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Phone.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Phone.Controls.Toolkit, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b772ad94eb9ca604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\SilverlightToolkitWP.4.2011.8.17\lib\sl4-windowsphone71\Microsoft.Phone.Controls.Toolkit.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Interactivity, Version=3.8.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="Telerik.Windows.Controls.Primitives, Version=2011.3.817.1040, Culture=neutral, PublicKeyToken=5803cfa389c90ce7" />
<Reference Include="Telerik.Windows.Core, Version=2011.3.817.1040, Culture=neutral, PublicKeyToken=5803cfa389c90ce7" />
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Interactivity, Version=3.9.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\wp8\System.Windows.Interactivity.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AboutPage.xaml.cs">
@@ -231,7 +242,9 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
<None Include="Properties\AppManifest.xml" />
<None Include="Properties\WMAppManifest.xml">
<SubType>Designer</SubType>
+28 -102
View File
@@ -1,29 +1,28 @@
<phone:PhoneApplicationPage xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
x:Class="CompassVO.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Preview="clr-namespace:Phone7.Fx.Preview;assembly=Phone7.Fx.Preview"
xmlns:compass_orienteering="clr-namespace:CompassVO.Themes.compass_orienteering"
xmlns:Views="clr-namespace:CompassVO.Views"
xmlns:GalaSoft_MvvmLight_Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP71"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
mc:Ignorable="d"
d:DesignWidth="480"
d:DesignHeight="768"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait"
Orientation="Portrait"
shell:SystemTray.IsVisible="True"
Unloaded="PhoneApplicationPage_Unloaded"
DataContext="{Binding Main, Source={StaticResource Locator}}"
BackKeyPress="PhoneApplicationPage_BackKeyPress">
<phone:PhoneApplicationPage
x:Class="CompassVO.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Preview="clr-namespace:Phone7.Fx.Preview;assembly=Phone7.Fx.Preview"
xmlns:Views="clr-namespace:CompassVO.Views"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
xmlns:GalaSoft_MvvmLight_Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Platform"
mc:Ignorable="d"
d:DesignWidth="480"
d:DesignHeight="768"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait"
Orientation="Portrait"
shell:SystemTray.IsVisible="True"
Unloaded="PhoneApplicationPage_Unloaded"
DataContext="{Binding Main, Source={StaticResource Locator}}"
BackKeyPress="PhoneApplicationPage_BackKeyPress">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Loaded">
@@ -113,43 +112,6 @@
<Grid x:Name="compassContainer"
Opacity="{Binding CompasUIOpacity}">
<!--<compass_orienteering:compass_orienteering />-->
<!--<StackPanel Orientation="Horizontal">
<TextBlock x:Name="lblAngleMagnetic"
FontSize="28"
Margin="6">Angle magnetic:</TextBlock>
<TextBlock x:Name="lblAngleMagneticValue"
Margin="6"
FontSize="28"
Text="{Binding Path=MagneticHeading, Mode=OneWay, StringFormat='0'}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="lblAngleTrue"
FontSize="28"
Margin="6">Angle true:</TextBlock>
<TextBlock x:Name="lblAngleTrueValue"
Margin="6"
FontSize="28"
Text="{Binding Path=TrueHeading, Mode=OneWay, StringFormat='0'}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="lblAngleMD"
FontSize="28"
Margin="6">Magnetic declination:</TextBlock>
<TextBlock x:Name="lblAngleMDValue"
Margin="6"
FontSize="28"
Text="{Binding Path=MagneticDeclination, Mode=OneWay}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="lblAccuracy"
FontSize="28"
Margin="6">Accuracy:</TextBlock>
<TextBlock x:Name="lblAccuracyValue"
Margin="6"
FontSize="28"
Text="{Binding Path=HeadingAccuracy, Mode=OneWay}" />
</StackPanel>-->
</Grid>
<Grid HorizontalAlignment="Stretch"
@@ -203,56 +165,20 @@
</Grid>
<!--Calibration UI-->
<telerikPrimitives:RadWindow x:Name="winCalibration"
IsFullScreen="True"
IsOpen="{Binding NeedsCalibration}"
IsClosedOnBackButton="False"
IsClosedOnOutsideTap="False">
<Grid x:Name="winCalibration"
Visibility="{Binding NeedsCalibration,Converter={StaticResource BooleanToVisibilityConverter}}">
<Border Background="Black">
<Views:compass_calibration x:Name="pnlCalibration"
Width="380"
Height="600" />
</Border>
</telerikPrimitives:RadWindow>
</Grid>
<!--app bar-->
<Preview:BindableApplicationBar x:Name="AppBar"
BarOpacity="0.8"
IsMenuEnabled="True">
<!--<Preview:BindableApplicationBarIconButton Command="{Binding Main.BackPictureEdit, Mode=OneWay, Source={StaticResource Locator}}"
IconUri="/Images/icon_background_white.png"
IsEnabled="{Binding IsCompassMode}"
Text="edit back" />
<Preview:BindableApplicationBarIconButton Command="{Binding Main.CompassDialEdit, Mode=OneWay, Source={StaticResource Locator}}"
IconUri="/Images/icon_dial_white.png"
IsEnabled="{Binding IsCompassMode}"
Text="edit dial" />
<Preview:BindableApplicationBarIconButton Command="{Binding Main.ShowSettings, Mode=OneWay, Source={StaticResource Locator}}"
IconUri="/Images/appbar.feature.settings.rest.png"
IsEnabled="{Binding IsCompassMode}"
Text="setting" />
<Preview:BindableApplicationBarIconButton Command="{Binding Main.AcceptDialEdit, Mode=OneWay, Source={StaticResource Locator}}"
IconUri="/Images/appbar.check.rest.png"
IsEnabled="{Binding IsDialEdit}"
Text="accept" />-->
<!--<Preview:BindableApplicationBar.MenuItems>
<Preview:BindableApplicationBarMenuItem Text="about"
Command="{Binding ShowAbout}" />
</Preview:BindableApplicationBar.MenuItems>-->
</Preview:BindableApplicationBar>
</Grid>
<!--Sample code showing usage of ApplicationBar-->
<!--<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
<shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1" />
<shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2" />
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem Text="MenuItem 1" />
<shell:ApplicationBarMenuItem Text="MenuItem 2" />
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>-->
</phone:PhoneApplicationPage>
+8 -18
View File
@@ -1,4 +1,4 @@
<phone:PhoneApplicationPage xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
<phone:PhoneApplicationPage
x:Class="CompassVO.SettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -28,10 +28,10 @@
<controls:PivotItem Header="theme">
<Grid>
<telerikPrimitives:RadDataBoundListBox ItemsSource="{Binding Themes, Mode=OneWay}"
SelectedItem="{Binding CurrentTheme, Mode=TwoWay}"
SelectionChanged="RadDataBoundListBox_SelectionChanged">
<telerikPrimitives:RadDataBoundListBox.ItemTemplate>
<ListBox ItemsSource="{Binding Themes, Mode=OneWay}"
SelectedItem="{Binding CurrentTheme, Mode=TwoWay}"
SelectionChanged="RadDataBoundListBox_SelectionChanged">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Margin="0, 0, 0, 12">
<TextBlock
@@ -48,8 +48,8 @@
</Button>
</StackPanel>
</DataTemplate>
</telerikPrimitives:RadDataBoundListBox.ItemTemplate>
</telerikPrimitives:RadDataBoundListBox>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</controls:PivotItem>
@@ -66,15 +66,5 @@
</controls:Pivot>
</Grid>
<!--Sample code showing usage of ApplicationBar-->
<!--<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
<shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/Images/appbar_button1.png" Text="Button 1" />
<shell:ApplicationBarIconButton x:Name="appbar_button2" IconUri="/Images/appbar_button2.png" Text="Button 2" />
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem x:Name="menuItem1" Text="MenuItem 1" />
<shell:ApplicationBarMenuItem x:Name="menuItem2" Text="MenuItem 2" />
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>-->
</phone:PhoneApplicationPage>
+6 -1
View File
@@ -28,6 +28,7 @@ namespace CompassVO.ViewModel
private double initDialAngleDrag = 0;
private double startDialAngle = 0;
private double deltaDialAngle = 0;
private bool hadShownWarningCompassSensor;
#region Public Properties
@@ -908,7 +909,11 @@ namespace CompassVO.ViewModel
}
else
{
MessageBox.Show("Your device doesn't have compass sensor!");
if (!hadShownWarningCompassSensor)
{
hadShownWarningCompassSensor = true;
MessageBox.Show("Your device doesn't have compass sensor!");
}
}
}
+4 -2
View File
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Coding4Fun.Phone.Controls.Complete" version="1.4.6" />
<package id="microioc" version="1.0" />
<package id="MvvmLight" version="3.0.3" />
<package id="CommonServiceLocator" version="1.3" targetFramework="wp8" />
<package id="microioc" version="2.0" targetFramework="wp8" />
<package id="MvvmLight" version="5.3.0.0" targetFramework="wp8" />
<package id="MvvmLightLibs" version="5.3.0.0" targetFramework="wp8" />
<package id="SilverlightToolkitWP" version="4.2011.8.17" />
</packages>