update to v1.2.0
This commit is contained in:
1 parent
c402f428fb
commit
4afd1097de
90 files changed
+2992
-1652
No files matched your search
@@ -0,0 +1,80 @@
|
||||
<#@ template debug="false" hostspecific="false" language="C#" #>
|
||||
<#@ import namespace="System.Collections.Generic"#>
|
||||
<#@ output extension=".cs" #>
|
||||
<#
|
||||
var singleList = new List<string>
|
||||
{
|
||||
"MainContent",
|
||||
"LeftMainContent"
|
||||
};
|
||||
var controlList = new List<string>
|
||||
{
|
||||
"GrowlDemoCtl",
|
||||
"LoadingDemoCtl",
|
||||
"ImageBrowserDemoCtl",
|
||||
"ColorPickerDemoCtl",
|
||||
"CarouselDemoCtl",
|
||||
"CompareSliderDemoCtl",
|
||||
"TimeBarDemoCtl",
|
||||
"PaginationDemoCtl",
|
||||
"AnimationPathDemoCtl"
|
||||
};
|
||||
var styleList = new List<string>
|
||||
{
|
||||
"ButtonDemoCtl",
|
||||
"ToggleButtonDemoCtl",
|
||||
"ExpanderDemoCtl",
|
||||
"ProgressBarDemoCtl"
|
||||
};
|
||||
#>
|
||||
using System;
|
||||
using CommonServiceLocator;
|
||||
using GalaSoft.MvvmLight.Ioc;
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 控件定位器
|
||||
/// </summary>
|
||||
public class ControlLocator
|
||||
{
|
||||
private ControlLocator()
|
||||
{
|
||||
<#foreach(var item in singleList){#>
|
||||
SimpleIoc.Default.Register<<#=item#>>();
|
||||
<#}#>
|
||||
<#foreach(var item in controlList){#>
|
||||
SimpleIoc.Default.Register<<#=item#>>();
|
||||
<#}#>
|
||||
<#foreach(var item in styleList){#>
|
||||
SimpleIoc.Default.Register<<#=item#>>();
|
||||
<#}#>
|
||||
}
|
||||
|
||||
public static ControlLocator Instance => new Lazy<ControlLocator>(() => new ControlLocator()).Value;
|
||||
|
||||
#region Main
|
||||
|
||||
<#foreach(var item in singleList){#>
|
||||
public <#=item#> <#=item#> => ServiceLocator.Current.GetInstance<<#=item#>>();
|
||||
|
||||
<#}#>
|
||||
#endregion
|
||||
|
||||
#region Controls
|
||||
|
||||
<#foreach(var item in controlList){#>
|
||||
public <#=item#> <#=item#> => new <#=item#>();
|
||||
|
||||
<#}#>
|
||||
#endregion
|
||||
|
||||
#region Styles
|
||||
|
||||
<#foreach(var item in styleList){#>
|
||||
public <#=item#> <#=item#> => new <#=item#>();
|
||||
|
||||
<#}#>
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user