Skip to content

Commit

Permalink
Merge pull request #44 from ghost1372/vs-extension
Browse files Browse the repository at this point in the history
Vs extension
  • Loading branch information
ghost1372 authored Nov 28, 2020
2 parents 33e3f7b + 462bd71 commit f9c806d
Show file tree
Hide file tree
Showing 25 changed files with 173 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("2.5.3.2")]
[assembly: AssemblyFileVersion("2.5.3.2")]
[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersion("3.0.0.0")]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" ?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="16adb6c8-d74c-451c-9c7e-a93ef604d0b9" Version="2.5.3.2" Language="en-US" Publisher="Mahdi Hosseini" />
<Identity Id="16adb6c8-d74c-451c-9c7e-a93ef604d0b9" Version="3.0.0.0" Language="en-US" Publisher="Mahdi Hosseini" />
<DisplayName>HandyControls for VS2019</DisplayName>
<Description xml:space="preserve">Contains some simple and commonly used WPF controls based on HandyControl
This VSIX Project will help people initialize a HandyControls project.</Description>
Expand Down
5 changes: 5 additions & 0 deletions Installers/VS2019/WpfApp/DesignTimeResources.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/HandyControl;Component/Themes/Theme.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
7 changes: 6 additions & 1 deletion Installers/VS2019/WpfApp/ProjectTemplate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="HandyControls">
<Version>2.5.3.2</Version>
<Version>3.0.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -69,6 +69,11 @@
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Page Include="Properties\DesignTimeResources.xaml" Condition="'$(DesignTime)'=='true' OR ('$(SolutionPath)'!='' AND Exists('$(SolutionPath)') AND '$(BuildingInsideVisualStudio)'!='true' AND '$(BuildingInsideExpressionBlend)'!='true')">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<ContainsDesignTimeResources>true</ContainsDesignTimeResources>
</Page>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
6 changes: 6 additions & 0 deletions Installers/VS2019/WpfApp/WpfApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<None Include="DesignTimeResources.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
7 changes: 4 additions & 3 deletions Installers/VS2019/WpfApp/WpfApp.vstemplate
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" Type="Project" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" xmlns:sdk="http://schemas.microsoft.com/developer/vstemplate-sdkextension/2010">
<TemplateData>
<Name>HandyControl WPF App(.NET Framework)</Name>
<Description>Creates a HandyControl WPF App(.NET Framework)</Description>
<Name>HandyControl App (.Net Framework)</Name>
<Description>A project template for creating a HandyControl WPF App with .NET Framework</Description>
<Icon>icon.ico</Icon>
<ProjectType>CSharp</ProjectType>
<RequiredFrameworkVersion>4.0</RequiredFrameworkVersion>
<MaxFrameworkVersion>4.7.2</MaxFrameworkVersion>
<TemplateID>38e0a2df-5858-4bde-b373-7c50bc982906</TemplateID>
<CreateNewFolder>true</CreateNewFolder>
<DefaultName>HandyControlProject</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<LanguageTag>csharp</LanguageTag>
<LanguageTag>XAML</LanguageTag>
<PlatformTag>windows</PlatformTag>
<ProjectTypeTag>desktop</ProjectTypeTag>
<ProjectTypeTag>HandyControl</ProjectTypeTag>
</TemplateData>
<TemplateContent>
<Project File="ProjectTemplate.csproj" ReplaceParameters="true">
<ProjectItem ReplaceParameters="true" TargetFileName="Properties\AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="Properties\DesignTimeResources.xaml">DesignTimeResources.xaml</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="App.xaml">App.xaml</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="App.xaml.cs">App.xaml.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="MainWindow.xaml">MainWindow.xaml</ProjectItem>
Expand Down
7 changes: 3 additions & 4 deletions Installers/VS2019/WpfAppMVVMPrism/App.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<prism:PrismApplication x:Class="$safeprojectname$.App"
<Application x:Class="$safeprojectname$.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prism="http://prismlibrary.com/">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
Expand All @@ -10,4 +9,4 @@
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</prism:PrismApplication>
</Application>
21 changes: 9 additions & 12 deletions Installers/VS2019/WpfAppMVVMPrism/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,19 @@
using HandyControl.Tools;
using System.Windows;
using System;
using Prism.Ioc;
using $safeprojectname$.Views;
namespace $safeprojectname$
{
public partial class App
{
protected override Window CreateShell()
{
return Container.Resolve<MainWindow>();
}
public partial class App : Application
{

protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
var boot = new Bootstrapper();
boot.Run();
}

}
internal void UpdateSkin(SkinType skin)
internal void UpdateSkin(SkinType skin)
{
SharedResourceDictionary.SharedDictionaries.Clear();
Resources.MergedDictionaries.Add(ResourceHelper.GetSkin(skin));
Expand Down
19 changes: 19 additions & 0 deletions Installers/VS2019/WpfAppMVVMPrism/Bootstrapper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Prism.DryIoc;
using Prism.Ioc;
using System.Windows;
using $safeprojectname$.Views;
namespace $safeprojectname$
{
public class Bootstrapper : PrismBootstrapper
{
protected override DependencyObject CreateShell()
{
return Container.Resolve<MainWindow>();
}

protected override void RegisterTypes(IContainerRegistry containerRegistry)
{

}
}
}
5 changes: 5 additions & 0 deletions Installers/VS2019/WpfAppMVVMPrism/DesignTimeResources.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/HandyControl;Component/Themes/Theme.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
2 changes: 1 addition & 1 deletion Installers/VS2019/WpfAppMVVMPrism/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace $safeprojectname$.ViewModels
{
public class MainWindowViewModel : BindableBase
{
private string _title = "Prism Application";
private string _title = "HandyControl Application";
public string Title
{
get { return _title; }
Expand Down
10 changes: 8 additions & 2 deletions Installers/VS2019/WpfAppMVVMPrism/ProjectTemplate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="HandyControls">
<Version>2.5.3.2</Version>
<Version>3.0.0</Version>
</PackageReference>
<PackageReference Include="Prism.DryIoc" Version="7.2.0.1422" />
<PackageReference Include="Prism.DryIoc" Version="8.0.0.1909" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
Expand All @@ -54,6 +54,7 @@
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="ViewModels\MainWindowViewModel.cs" />
<Compile Include="Bootstrapper.cs" />
<Page Include="Views\MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand All @@ -71,6 +72,11 @@
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Page Include="Properties\DesignTimeResources.xaml" Condition="'$(DesignTime)'=='true' OR ('$(SolutionPath)'!='' AND Exists('$(SolutionPath)') AND '$(BuildingInsideVisualStudio)'!='true' AND '$(BuildingInsideExpressionBlend)'!='true')">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<ContainsDesignTimeResources>true</ContainsDesignTimeResources>
</Page>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
7 changes: 7 additions & 0 deletions Installers/VS2019/WpfAppMVVMPrism/WpfAppMVVMPrism.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<None Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
</None>
<None Include="Bootstrapper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
Expand All @@ -88,6 +89,12 @@
<ItemGroup>
<None Include="icon.ico" />
</ItemGroup>
<ItemGroup>
<None Include="DesignTimeResources.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
8 changes: 5 additions & 3 deletions Installers/VS2019/WpfAppMVVMPrism/WpfAppMVVMPrism.vstemplate
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" Type="Project" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" xmlns:sdk="http://schemas.microsoft.com/developer/vstemplate-sdkextension/2010">
<TemplateData>
<Name>HandyControl WPF App(.NET Framework - Prism)</Name>
<Description>Creates a HandyControl WPF App with Prism DryIoc MVVM Pattern(.NET Framework)</Description>
<Name>HandyControl App (.NET Framework - MVVM)</Name>
<Description>A project template for creating a HandyControl WPF App with .NET Framework and Prism MVVM Pattern</Description>
<Icon>icon.ico</Icon>
<ProjectType>CSharp</ProjectType>
<RequiredFrameworkVersion>4.5</RequiredFrameworkVersion>
<MaxFrameworkVersion>4.7.2</MaxFrameworkVersion>
<TemplateID>feb74271-5261-4730-9af2-8fa899f989ce</TemplateID>
<CreateNewFolder>true</CreateNewFolder>
<DefaultName>HandyControlProject</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<LanguageTag>csharp</LanguageTag>
<LanguageTag>XAML</LanguageTag>
<PlatformTag>windows</PlatformTag>
<ProjectTypeTag>desktop</ProjectTypeTag>
<ProjectTypeTag>HandyControl</ProjectTypeTag>
</TemplateData>
<TemplateContent>
<Project File="ProjectTemplate.csproj" ReplaceParameters="true">
<ProjectItem ReplaceParameters="true" TargetFileName="Properties\AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="Properties\DesignTimeResources.xaml">DesignTimeResources.xaml</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="Views\MainWindow.xaml">MainWindow.xaml</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="Views\MainWindow.xaml.cs">MainWindow.xaml.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="App.xaml">App.xaml</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="App.xaml.cs">App.xaml.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="ViewModels\MainWindowViewModel.cs">MainWindowViewModel.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="Bootstrapper.cs">Bootstrapper.cs</ProjectItem>
</Project>
</TemplateContent>
</VSTemplate>
5 changes: 5 additions & 0 deletions Installers/VS2019/WpfCoreApp/DesignTimeResources.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/HandyControl;Component/Themes/Theme.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
11 changes: 9 additions & 2 deletions Installers/VS2019/WpfCoreApp/ProjectTemplate.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<AssemblyName>$safeprojectname$</AssemblyName>
<RootNamespace>$safeprojectname$</RootNamespace>
Expand All @@ -19,6 +19,13 @@
<DefineConstants>TRACE;Core</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="HandyControls" Version="2.5.3.2" />
<PackageReference Include="HandyControls" Version="3.0.0" />
</ItemGroup>
<ItemGroup>
<Page Include="Properties\DesignTimeResources.xaml" Condition="'$(DesignTime)'=='true' OR ('$(SolutionPath)'!='' AND Exists('$(SolutionPath)') AND '$(BuildingInsideVisualStudio)'!='true' AND '$(BuildingInsideExpressionBlend)'!='true')">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<ContainsDesignTimeResources>true</ContainsDesignTimeResources>
</Page>
</ItemGroup>
</Project>
6 changes: 6 additions & 0 deletions Installers/VS2019/WpfCoreApp/WpfCoreApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<None Include="DesignTimeResources.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
8 changes: 5 additions & 3 deletions Installers/VS2019/WpfCoreApp/WpfCoreApp.vstemplate
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" Type="Project" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" xmlns:sdk="http://schemas.microsoft.com/developer/vstemplate-sdkextension/2010">
<TemplateData>
<Name>HandyControl WPF App(.NET Core)</Name>
<Description>Creates a HandyControl WPF App(.NET Core)</Description>
<Icon>icon.ico</Icon>
<Name>HandyControl Application</Name>
<Description>A project template for creating a HandyControl WPF App with .Net Core</Description>
<Icon>icon.ico</Icon>
<ProjectType>CSharp</ProjectType>
<CreateNewFolder>true</CreateNewFolder>
<DefaultName>HandyControlProject</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<LanguageTag>csharp</LanguageTag>
<LanguageTag>XAML</LanguageTag>
<PlatformTag>windows</PlatformTag>
<ProjectTypeTag>desktop</ProjectTypeTag>
<ProjectTypeTag>HandyControl</ProjectTypeTag>
Expand All @@ -22,6 +23,7 @@
<ProjectItem ReplaceParameters="true" TargetFileName="App.xaml.cs">App.xaml.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="MainWindow.xaml">MainWindow.xaml</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="MainWindow.xaml.cs">MainWindow.xaml.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="Properties\DesignTimeResources.xaml">DesignTimeResources.xaml</ProjectItem>
</Project>
</TemplateContent>
</VSTemplate>
7 changes: 3 additions & 4 deletions Installers/VS2019/WpfCoreAppPrism/App.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<prism:PrismApplication x:Class="$safeprojectname$.App"
<Application x:Class="$safeprojectname$.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prism="http://prismlibrary.com/">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
Expand All @@ -10,4 +9,4 @@
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</prism:PrismApplication>
</Application>
Loading

0 comments on commit f9c806d

Please sign in to comment.