fexes references
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
using GalaSoft.MvvmLight;
|
||||
|
||||
namespace xUnitRevit.ViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// This class contains properties that the main View can data bind to.
|
||||
/// <para>
|
||||
/// Use the <strong>mvvminpc</strong> snippet to add bindable properties to this ViewModel.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// You can also use Blend to data bind with the tool's support.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// See http://www.galasoft.ch/mvvm
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public class MainViewModel : ViewModelBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the MainViewModel class.
|
||||
/// </summary>
|
||||
public MainViewModel()
|
||||
{
|
||||
////if (IsInDesignMode)
|
||||
////{
|
||||
//// // Code runs in Blend --> create design time data.
|
||||
////}
|
||||
////else
|
||||
////{
|
||||
//// // Code runs "for real"
|
||||
////}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
In App.xaml:
|
||||
<Application.Resources>
|
||||
<vm:ViewModelLocator xmlns:vm="clr-namespace:xUnitRevit"
|
||||
x:Key="Locator" />
|
||||
</Application.Resources>
|
||||
|
||||
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 xUnitRevit.ViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// This class contains static references to all the view models in the
|
||||
/// application and provides an entry point for the bindings.
|
||||
/// </summary>
|
||||
public class ViewModelLocator
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the ViewModelLocator class.
|
||||
/// </summary>
|
||||
public ViewModelLocator()
|
||||
{
|
||||
ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
|
||||
|
||||
////if (ViewModelBase.IsInDesignModeStatic)
|
||||
////{
|
||||
//// // Create design time view services and models
|
||||
//// SimpleIoc.Default.Register<IDataService, DesignDataService>();
|
||||
////}
|
||||
////else
|
||||
////{
|
||||
//// // Create run time view services and models
|
||||
//// SimpleIoc.Default.Register<IDataService, DataService>();
|
||||
////}
|
||||
|
||||
SimpleIoc.Default.Register<MainViewModel>();
|
||||
}
|
||||
|
||||
public MainViewModel Main
|
||||
{
|
||||
get
|
||||
{
|
||||
return ServiceLocator.Current.GetInstance<MainViewModel>();
|
||||
}
|
||||
}
|
||||
|
||||
public static void Cleanup()
|
||||
{
|
||||
// TODO Clear the ViewModels
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="CommonServiceLocator" version="2.0.2" targetFramework="net48" />
|
||||
<package id="ModPlus.Revit.API.2021" version="1.0.0" targetFramework="net48" />
|
||||
<package id="MvvmLight" version="5.4.1.1" targetFramework="net48" />
|
||||
<package id="MvvmLightLibs" version="5.4.1.1" targetFramework="net48" />
|
||||
<package id="speckle.xunit.runner.wpf" version="1.0.3" targetFramework="net48" />
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
<RevitVersion>2021</RevitVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="AdWindows, Version=3.0.4.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ModPlus.Revit.API.2021.1.0.0\lib\AdWindows.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CommonServiceLocator, Version=2.0.2.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CommonServiceLocator.2.0.2\lib\net47\CommonServiceLocator.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -65,13 +68,11 @@
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="RevitAPI">
|
||||
<HintPath>$(ProgramW6432)\Autodesk\Revit 2021\RevitAPI.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Reference Include="RevitAPI, Version=21.0.0.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>..\packages\ModPlus.Revit.API.2021.1.0.0\lib\RevitAPI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RevitAPIUI">
|
||||
<HintPath>$(ProgramW6432)\Autodesk\Revit 2021\RevitAPIUI.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Reference Include="RevitAPIUI, Version=21.0.0.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>..\packages\ModPlus.Revit.API.2021.1.0.0\lib\RevitAPIUI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="speckle.xunit.runner.wpf, Version=1.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\speckle.xunit.runner.wpf.1.0.3\lib\net48\speckle.xunit.runner.wpf.dll</HintPath>
|
||||
@@ -122,8 +123,6 @@
|
||||
<Compile Include="ExternalEventHandler.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Runner.cs" />
|
||||
<Compile Include="ViewModel\MainViewModel.cs" />
|
||||
<Compile Include="ViewModel\ViewModelLocator.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
|
||||
Reference in New Issue
Block a user