mirror of
https://github.com/holgerb83/ModernWpfPlayground.git
synced 2025-04-08 02:10:01 +02:00
refactoring and working with cake
This commit is contained in:
parent
ae6192bd1f
commit
538789078a
18
.config/dotnet-tools.json
Normal file
18
.config/dotnet-tools.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"cake.tool": {
|
||||
"version": "2.0.0-rc0002",
|
||||
"commands": [
|
||||
"dotnet-cake"
|
||||
]
|
||||
},
|
||||
"gitversion.tool": {
|
||||
"version": "5.8.1",
|
||||
"commands": [
|
||||
"dotnet-gitversion"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -338,4 +338,5 @@ ASALocalRun/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
.ionide
|
||||
.ionide
|
||||
/tools
|
||||
|
@ -1,3 +0,0 @@
|
||||
global using System;
|
||||
global using MvvmGen;
|
||||
global using System.Windows;
|
@ -1,32 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
<Nullable>enable</Nullable>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<SelfContained>true</SelfContained>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FastMember" Version="1.5.0" />
|
||||
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="1.1.0" />
|
||||
<PackageReference Include="ModernWpfUis" Version="1.2.0" />
|
||||
<PackageReference Include="MvvmGen" Version="1.1.1" />
|
||||
<PackageReference Include="YamlDotNet" Version="11.2.1" />
|
||||
<PackageReference Include="MahApps.Metro.IconPacks.FontAwesome" Version="4.11.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Controls\Controls.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="MvvmStuff" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -1,13 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -1,9 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Markup;
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: CLSCompliant(true)]
|
||||
|
||||
[assembly: XmlnsDefinition("http://wpflib.de/", "Controls")]
|
@ -1,2 +0,0 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=propertypresenter/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
@ -1,11 +1,13 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30002.166
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31912.275
|
||||
MinimumVisualStudioVersion = 15.0.26124.0
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModernWpfPlayground", "App\ModernWpfPlayground.csproj", "{E090F4BD-69CD-4D8B-A3A2-620DCE22AE29}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{216EA1DF-5F39-4D23-9E1F-887785D1FF6C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls", "Controls\Controls.csproj", "{3884FD41-5A46-4A67-A147-57C36F0059DC}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModernWpfPlayground", "src\App\ModernWpfPlayground.csproj", "{D7364CD3-5150-4FA8-90D9-07093354D7A0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Controls", "src\Controls\Controls.csproj", "{3AAA0309-C1C0-44C8-A53F-E3CE8556A4D4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -13,18 +15,22 @@ Global
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E090F4BD-69CD-4D8B-A3A2-620DCE22AE29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E090F4BD-69CD-4D8B-A3A2-620DCE22AE29}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E090F4BD-69CD-4D8B-A3A2-620DCE22AE29}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E090F4BD-69CD-4D8B-A3A2-620DCE22AE29}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3884FD41-5A46-4A67-A147-57C36F0059DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3884FD41-5A46-4A67-A147-57C36F0059DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3884FD41-5A46-4A67-A147-57C36F0059DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3884FD41-5A46-4A67-A147-57C36F0059DC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D7364CD3-5150-4FA8-90D9-07093354D7A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D7364CD3-5150-4FA8-90D9-07093354D7A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D7364CD3-5150-4FA8-90D9-07093354D7A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D7364CD3-5150-4FA8-90D9-07093354D7A0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3AAA0309-C1C0-44C8-A53F-E3CE8556A4D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3AAA0309-C1C0-44C8-A53F-E3CE8556A4D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3AAA0309-C1C0-44C8-A53F-E3CE8556A4D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3AAA0309-C1C0-44C8-A53F-E3CE8556A4D4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{D7364CD3-5150-4FA8-90D9-07093354D7A0} = {216EA1DF-5F39-4D23-9E1F-887785D1FF6C}
|
||||
{3AAA0309-C1C0-44C8-A53F-E3CE8556A4D4} = {216EA1DF-5F39-4D23-9E1F-887785D1FF6C}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {21075E5E-39D9-4681-91A0-D9E7E0BDBB85}
|
||||
EndGlobalSection
|
||||
|
60
build.cake
Normal file
60
build.cake
Normal file
@ -0,0 +1,60 @@
|
||||
#tool "dotnet:?package=GitVersion.Tool"
|
||||
|
||||
using System;
|
||||
var target = Argument("target", "Publish");
|
||||
var configuration = Argument("configuration", "Release");
|
||||
|
||||
var gitVersion = GitVersion(new GitVersionSettings());
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// TASKS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task("Clean")
|
||||
.WithCriteria(c => HasArgument("rebuild"))
|
||||
.Does(() =>
|
||||
{
|
||||
CleanDirectory($"./src/App/bin/{configuration}");
|
||||
});
|
||||
|
||||
Task("Build")
|
||||
.IsDependentOn("Clean")
|
||||
.Does(() =>
|
||||
{
|
||||
DotNetBuild("./ModernWpfPlayground.sln", new DotNetBuildSettings
|
||||
{
|
||||
Configuration = configuration, ArgumentCustomization = c=> c.Append($"/p:Version={gitVersion.AssemblySemVer}")
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Task("Publish")
|
||||
.IsDependentOn("Build")
|
||||
.Does(() =>
|
||||
{
|
||||
DotNetPublish("./src/App/ModernWpfPlayground.csproj", new DotNetPublishSettings{
|
||||
Configuration = configuration,
|
||||
EnableCompressionInSingleFile = true,
|
||||
PublishReadyToRun = true,
|
||||
PublishSingleFile = true,
|
||||
Runtime = "win-x64",
|
||||
SelfContained = true,
|
||||
});
|
||||
});
|
||||
|
||||
// Task("Test")
|
||||
// .IsDependentOn("Build")
|
||||
// .Does(() =>
|
||||
// {
|
||||
// DotNetCoreTest("./src/Example.sln", new DotNetCoreTestSettings
|
||||
// {
|
||||
// Configuration = configuration,
|
||||
// NoBuild = true,
|
||||
// });
|
||||
// });
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// EXECUTION
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
RunTarget(target);
|
@ -1,4 +1,5 @@
|
||||
using ModernWpf;
|
||||
using System.Windows;
|
||||
using ModernWpf;
|
||||
using ModernWpfPlayground.Types;
|
||||
|
||||
namespace ModernWpfPlayground
|
||||
@ -15,4 +16,4 @@ namespace ModernWpfPlayground
|
||||
ThemeManager.Current.AccentColor = AccentColors.Green.ToWindowsColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
using System.Windows;
|
||||
|
||||
[assembly:ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
@ -5,4 +7,4 @@
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
)]
|
@ -1,4 +1,6 @@
|
||||
namespace ModernWpfPlayground
|
||||
using System.Windows;
|
||||
|
||||
namespace ModernWpfPlayground
|
||||
{
|
||||
public partial class ContentDialogExample
|
||||
{
|
||||
@ -16,4 +18,4 @@
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -2,12 +2,12 @@
|
||||
x:Class="ModernWpfPlayground.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="http://wpflib.de/"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
|
||||
xmlns:local="clr-namespace:ModernWpfPlayground"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
xmlns:controls="clr-namespace:Controls;assembly=Controls"
|
||||
x:Name="Window"
|
||||
Title="{Binding Title}"
|
||||
Width="{Binding WindowWidth, Mode=TwoWay}"
|
@ -1,4 +1,6 @@
|
||||
using ModernWpfPlayground.Types;
|
||||
using System.Windows;
|
||||
using ModernWpfPlayground.Types;
|
||||
using MvvmGen;
|
||||
using static ModernWpf.ThemeManager;
|
||||
|
||||
namespace ModernWpfPlayground
|
39
src/App/ModernWpfPlayground.csproj
Normal file
39
src/App/ModernWpfPlayground.csproj
Normal file
@ -0,0 +1,39 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Controls\Controls.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FastMember" Version="1.5.0" />
|
||||
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="1.1.0" />
|
||||
<PackageReference Include="ModernWpfUis" Version="1.2.0" />
|
||||
<PackageReference Include="MvvmGen" Version="1.1.2" />
|
||||
<PackageReference Include="YamlDotNet" Version="11.2.1" />
|
||||
<PackageReference Include="MahApps.Metro.IconPacks.FontAwesome" Version="4.11.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Update="App.xaml">
|
||||
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</ApplicationDefinition>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Page Update="ContentDialogExample.xaml">
|
||||
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
|
||||
</Page>
|
||||
<Page Update="MainWindow.xaml">
|
||||
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,4 +1,6 @@
|
||||
using System.Globalization;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Markup;
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.Windows.Media;
|
||||
using System;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace ModernWpfPlayground.Types
|
||||
{
|
@ -1,4 +1,5 @@
|
||||
using System.ComponentModel;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using ModernWpf;
|
||||
|
||||
namespace ModernWpfPlayground.Types
|
||||
@ -21,6 +22,6 @@ namespace ModernWpfPlayground.Types
|
||||
ThemeMode.UseSystemSetting => default,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(themeMode), themeMode, null)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
10
src/Controls/AssemblyInfo.cs
Normal file
10
src/Controls/AssemblyInfo.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
20
src/Controls/Controls.csproj
Normal file
20
src/Controls/Controls.csproj
Normal file
@ -0,0 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Page Update="PropertyPresenter\PropertyPresenter.xaml">
|
||||
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user