Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,31 @@ permissions:
contents: write
jobs:
publish:
runs-on: windows-latest
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@main
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@main
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x.x'

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@main
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: '5.x'

- name: Determine Version
uses: gittools/actions/gitversion/execute@main
uses: gittools/actions/gitversion/execute@v0

- name: Publish
run: dotnet publish --configuration Release -p:DebugType=embedded -p:AssemblyVersion=$env:GitVersion_AssemblySemVer -p:FileVersion=$env:GitVersion_AssemblySemFileVer -p:InformationalVersion=$env:GitVersion_InformationalVersion
run: dotnet publish --framework net40 --configuration Release -p:DebugType=embedded -p:AssemblyVersion=$env:GitVersion_AssemblySemVer -p:FileVersion=$env:GitVersion_AssemblySemFileVer -p:InformationalVersion=$env:GitVersion_InformationalVersion

- name: Zip
run: 7z a -r ${{ format('CnCNet.LauncherStub-v{0}-net471.zip', env.GitVersion_SemVer) }} ./bin/Release/net471/publish/*.*
run: 7z a -r ${{ format('CnCNet.LauncherStub-v{0}-net40.zip', env.GitVersion_SemVer) }} ./bin/Release/net40/publish/*.*

- name: Prerelease
if: ${{ env.GitVersion_PreReleaseTag != '' }}
Expand Down
44 changes: 0 additions & 44 deletions .github/workflows/publishcustomicon.yml

This file was deleted.

6 changes: 3 additions & 3 deletions AdvancedMessageBoxViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public ObservableCollection<CommandViewModel> Commands
set
{
commands = value;
NotifyPropertyChanged();
NotifyPropertyChanged("Commands");
}
}

Expand All @@ -24,7 +24,7 @@ public string Title
set
{
title = value;
NotifyPropertyChanged();
NotifyPropertyChanged("Title");
}
}

Expand All @@ -36,7 +36,7 @@ public string Message
set
{
message = value;
NotifyPropertyChanged();
NotifyPropertyChanged("Message");
}
}
}
25 changes: 3 additions & 22 deletions CnCNet.LauncherStub.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFramework>net471</TargetFramework>
<LangVersion>11.0</LangVersion>
<TargetFrameworks>net40; net471</TargetFrameworks>
<LangVersion>12.0</LangVersion>
<OutputType>WinExe</OutputType>
<UseWPF>true</UseWPF>
<Title>CnCNet Launcher</Title>
<Description>Launcher for CnCNet Client</Description>
<Company>CnCNet</Company>
<Product>CnCNet Client Launcher</Product>
<Copyright>Copyright © CnCNet, Rampastring 2011-2023</Copyright>
<Copyright>Copyright © CnCNet, Rampastring 2011-2024</Copyright>
<Trademark></Trademark>
<AssemblyName>CnCNet.LauncherStub</AssemblyName>
<RootNamespace>CnCNet.LauncherStub</RootNamespace>
Expand All @@ -25,23 +25,4 @@
<ItemGroup>
<Content Include="mainclienticon.ico" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml"/>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
</ItemGroup>
</Project>
1 change: 0 additions & 1 deletion CnCNet.LauncherStub.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{31CF936D-B0E9-4B0B-9D87-255E3514164A}"
ProjectSection(SolutionItems) = preProject
.github\workflows\publish.yml = .github\workflows\publish.yml
.github\workflows\publishcustomicon.yml = .github\workflows\publishcustomicon.yml
EndProjectSection
EndProject
Global
Expand Down
4 changes: 2 additions & 2 deletions CommandViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public string Text
set
{
text = value;
NotifyPropertyChanged();
NotifyPropertyChanged("Text");
}
}

Expand All @@ -24,7 +24,7 @@ public ICommand Command
set
{
command = value;
NotifyPropertyChanged();
NotifyPropertyChanged("Command");
}
}
}
7 changes: 5 additions & 2 deletions NotifyPropertyChangedBase.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
namespace CnCNet.LauncherStub;

using System.ComponentModel;
using System.Runtime.CompilerServices;

public abstract class NotifyPropertyChangedBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;

#if NET45_OR_GREATER || NETSTANDARD || NET
/// <summary>
/// This method is called by the Set accessor of each property. <br/>
/// The CallerMemberName attribute that is applied to the optional propertyName parameter causes the property name of the caller to be substituted as an argument.
/// </summary>
/// <param name="propertyName">The property name. Default to the caller.</param>
internal void NotifyPropertyChanged([CallerMemberName] string propertyName = "") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
internal void NotifyPropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = "") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
#else
internal void NotifyPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
#endif
}
Loading