diff --git a/src/.nuget/NuGet.Config b/src/.nuget/NuGet.Config new file mode 100644 index 0000000..67f8ea0 --- /dev/null +++ b/src/.nuget/NuGet.Config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/.nuget/NuGet.exe b/src/.nuget/NuGet.exe new file mode 100644 index 0000000..8dd7e45 Binary files /dev/null and b/src/.nuget/NuGet.exe differ diff --git a/src/.nuget/NuGet.targets b/src/.nuget/NuGet.targets new file mode 100644 index 0000000..3f8c37b --- /dev/null +++ b/src/.nuget/NuGet.targets @@ -0,0 +1,144 @@ + + + + $(MSBuildProjectDirectory)\..\ + + + false + + + false + + + true + + + false + + + + + + + + + + + $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) + + + + + $(SolutionDir).nuget + + + + $(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config + $(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config + + + + $(MSBuildProjectDirectory)\packages.config + $(PackagesProjectConfig) + + + + + $(NuGetToolsPath)\NuGet.exe + @(PackageSource) + + "$(NuGetExePath)" + mono --runtime=v4.0.30319 "$(NuGetExePath)" + + $(TargetDir.Trim('\\')) + + -RequireConsent + -NonInteractive + + "$(SolutionDir) " + "$(SolutionDir)" + + + $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir) + $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols + + + + RestorePackages; + $(BuildDependsOn); + + + + + $(BuildDependsOn); + BuildPackage; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ProgressDialogEx/App.xaml b/src/ProgressDialogEx/App.xaml index ed6b04f..0ac3d97 100644 --- a/src/ProgressDialogEx/App.xaml +++ b/src/ProgressDialogEx/App.xaml @@ -1,12 +1,7 @@  - - - - + + + + + \ No newline at end of file diff --git a/src/ProgressDialogEx/ProgressDialogEx.csproj b/src/ProgressDialogEx/ProgressDialogEx.csproj index bc7afd8..5d1283d 100644 --- a/src/ProgressDialogEx/ProgressDialogEx.csproj +++ b/src/ProgressDialogEx/ProgressDialogEx.csproj @@ -41,20 +41,23 @@ false - - packages\MvvmLightLibs.4.1.27.0\lib\net45\GalaSoft.MvvmLight.Extras.WPF45.dll + + ..\packages\MvvmLightLibs.5.0.2.0\lib\net45\GalaSoft.MvvmLight.dll - - packages\MvvmLightLibs.4.1.27.0\lib\net45\GalaSoft.MvvmLight.WPF45.dll + + ..\packages\MvvmLightLibs.5.0.2.0\lib\net45\GalaSoft.MvvmLight.Extras.dll + + + ..\packages\MvvmLightLibs.5.0.2.0\lib\net45\GalaSoft.MvvmLight.Platform.dll - packages\CommonServiceLocator.1.0\lib\NET35\Microsoft.Practices.ServiceLocation.dll + ..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll + - packages\MvvmLightLibs.4.1.27.0\lib\net45\System.Windows.Interactivity.dll + ..\packages\MvvmLightLibs.5.0.2.0\lib\net45\System.Windows.Interactivity.dll - 4.0 @@ -69,6 +72,8 @@ + + MSBuild:Compile Designer diff --git a/src/ProgressDialogEx/ViewModel/MainViewModel.cs b/src/ProgressDialogEx/ViewModel/MainViewModel.cs new file mode 100644 index 0000000..4b043ec --- /dev/null +++ b/src/ProgressDialogEx/ViewModel/MainViewModel.cs @@ -0,0 +1,34 @@ +using GalaSoft.MvvmLight; + +namespace ProgressDialogEx.ViewModel +{ + /// + /// This class contains properties that the main View can data bind to. + /// + /// Use the mvvminpc snippet to add bindable properties to this ViewModel. + /// + /// + /// You can also use Blend to data bind with the tool's support. + /// + /// + /// See http://www.galasoft.ch/mvvm + /// + /// + public class MainViewModel : ViewModelBase + { + /// + /// Initializes a new instance of the MainViewModel class. + /// + public MainViewModel() + { + ////if (IsInDesignMode) + ////{ + //// // Code runs in Blend --> create design time data. + ////} + ////else + ////{ + //// // Code runs "for real" + ////} + } + } +} \ No newline at end of file diff --git a/src/ProgressDialogEx/ViewModel/ViewModelLocator.cs b/src/ProgressDialogEx/ViewModel/ViewModelLocator.cs new file mode 100644 index 0000000..6d821d2 --- /dev/null +++ b/src/ProgressDialogEx/ViewModel/ViewModelLocator.cs @@ -0,0 +1,61 @@ +/* + In App.xaml: + + + + + In the View: + DataContext="{Binding Source={StaticResource Locator}, Path=ViewModelName}" + + You can also use Blend to do all this with the tool's support. + See http://www.galasoft.ch/mvvm +*/ + +using GalaSoft.MvvmLight; +using GalaSoft.MvvmLight.Ioc; +using Microsoft.Practices.ServiceLocation; + +namespace ProgressDialogEx.ViewModel +{ + /// + /// This class contains static references to all the view models in the + /// application and provides an entry point for the bindings. + /// + public class ViewModelLocator + { + /// + /// Initializes a new instance of the ViewModelLocator class. + /// + public ViewModelLocator() + { + ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); + + ////if (ViewModelBase.IsInDesignModeStatic) + ////{ + //// // Create design time view services and models + //// SimpleIoc.Default.Register(); + ////} + ////else + ////{ + //// // Create run time view services and models + //// SimpleIoc.Default.Register(); + ////} + + SimpleIoc.Default.Register(); + } + + public MainViewModel Main + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static void Cleanup() + { + // TODO Clear the ViewModels + } + } +} \ No newline at end of file diff --git a/src/ProgressDialogEx/packages.config b/src/ProgressDialogEx/packages.config index cc014b7..af3f3a2 100644 --- a/src/ProgressDialogEx/packages.config +++ b/src/ProgressDialogEx/packages.config @@ -1,5 +1,6 @@  - - + + + \ No newline at end of file