Skip to content

Commit

Permalink
Update TFM and references.
Browse files Browse the repository at this point in the history
  • Loading branch information
kingcean committed Dec 13, 2024
1 parent 6d7c70a commit eca892d
Show file tree
Hide file tree
Showing 39 changed files with 532 additions and 161 deletions.
Binary file modified DiffPlex.App/Assets/LockScreenLogo.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DiffPlex.App/Assets/LockScreenLogo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DiffPlex.App/Assets/LockScreenLogo.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DiffPlex.App/Assets/SplashScreen.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DiffPlex.App/Assets/Square150x150Logo.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DiffPlex.App/Assets/Square150x150Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DiffPlex.App/Assets/Square150x150Logo.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DiffPlex.App/Assets/Square44x44Logo.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DiffPlex.App/Assets/Square44x44Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DiffPlex.App/Assets/Square44x44Logo.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DiffPlex.App/Assets/StoreLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DiffPlex.App/Assets/StoreLogo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DiffPlex.App/Assets/StoreLogo.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DiffPlex.App/Assets/Wide310x150Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 9 additions & 8 deletions DiffPlex.App/DiffPlex.App.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net9.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<WindowsSdkPackageVersion>10.0.19041.48</WindowsSdkPackageVersion>
<RootNamespace>DiffPlex.UI</RootNamespace>
<AssemblyName>DiffPlex.App</AssemblyName>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Version>1.1.0</Version>
<Version>1.2.0</Version>
<PackageTags>diff</PackageTags>
<Description>Diff files and text.</Description>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<LangVersion>12.0</LangVersion>
<AssemblyVersion>1.2.0.0</AssemblyVersion>
<FileVersion>1.2.0.0</FileVersion>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
<Authors>Kingcean Tuan; Matthew Manela</Authors>
Expand Down Expand Up @@ -42,8 +44,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231115000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.241114003" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions DiffPlex.App/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</StackPanel>
<local:DiffTextView x:Name="MainElement" Background="#20808080" Grid.Row="1" >
<local:DiffTextView.SecondaryCommands>
<AppBarButton x:Uid="/DiffPlex.Windows/InternalResources/AboutLabel" Label="About" Click="OnAboutClick" >
<AppBarButton x:Uid="/DiffPlex.Windows/InternalResources/AboutLabel" Label="About" Click="OnAboutClick" AccessKey="A" >
<AppBarButton.Icon>
<FontIcon Glyph="&#xE946;" />
</AppBarButton.Icon>
Expand All @@ -32,7 +32,7 @@
<TextBlock x:Name="VersionText" HorizontalAlignment="Center" Margin="0,0,0,20" />
<HyperlinkButton Content="Open source on GitHub (Apache-2.0 license)" Padding="8,0" NavigateUri="https://github.com/mmanela/diffplex" HorizontalAlignment="Center" />
<TextBlock Text="Copyright © 2022 Matthew Manela. All rights reserved." HorizontalAlignment="Center" />
<Button Content="OK" Style="{StaticResource AccentButtonStyle}" Width="100" Margin="0,20,0,60" HorizontalAlignment="Center" Click="OnExitAboutClick" />
<Button x:Name="OkButton" Content="OK" Style="{StaticResource AccentButtonStyle}" Width="100" Margin="0,20,0,60" HorizontalAlignment="Center" Click="OnExitAboutClick" />
</StackPanel>
</ScrollViewer>
</Grid>
Expand Down
15 changes: 11 additions & 4 deletions DiffPlex.App/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ public MainWindow()
Title = "DiffPlex";
ExtendsContentIntoTitleBar = true;
SetTitleBar(HeaderBar);
var osVer = Environment.OSVersion.Version;
if (osVer.Major < 10 || (osVer.Major == 10 && osVer.Minor == 0 && osVer.Build < 22000)) return;
MainElement.OpenFileToReadText = GetFileTextAsync;
#if DEBUG
LoadData();
Expand All @@ -43,7 +41,7 @@ public MainWindow()
var appWindow = VisualUtility.TryGetAppWindow(this);
try
{
if (appWindow != null) appWindow.SetIcon("DiffPlex.ico");
appWindow?.SetIcon("DiffPlex.ico");
}
catch (ArgumentException)
{
Expand Down Expand Up @@ -95,7 +93,16 @@ private Task<string> GetFileTextAsync()
=> InternalUtilities.TryGetFileTextAsync(this);

private void OnAboutClick(object sender, RoutedEventArgs e)
=> AboutPanel.Visibility = Visibility.Visible;
{
AboutPanel.Visibility = Visibility.Visible;
_ = FocusOkButtonAsync();
}

private async Task FocusOkButtonAsync()
{
await Task.Delay(200);
if (AboutPanel.Visibility == Visibility.Visible) OkButton.Focus(FocusState.Programmatic);
}

private void OnExitAboutClick(object sender, RoutedEventArgs e)
=> AboutPanel.Visibility = Visibility.Collapsed;
Expand Down
20 changes: 20 additions & 0 deletions DiffPlex.App/Properties/PublishProfiles/win-arm64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>arm64</Platform>
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<!--
See https://github.com/microsoft/CsWinRT/issues/373
<PublishTrimmed>True</PublishTrimmed>
-->
</PropertyGroup>
</Project>
20 changes: 20 additions & 0 deletions DiffPlex.App/Properties/PublishProfiles/win-x64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x64</Platform>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<!--
See https://github.com/microsoft/CsWinRT/issues/373
<PublishTrimmed>True</PublishTrimmed>
-->
</PropertyGroup>
</Project>
20 changes: 20 additions & 0 deletions DiffPlex.App/Properties/PublishProfiles/win-x86.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x86</Platform>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<!--
See https://github.com/microsoft/CsWinRT/issues/373
<PublishTrimmed>True</PublishTrimmed>
-->
</PropertyGroup>
</Project>
39 changes: 0 additions & 39 deletions DiffPlex.Windows/Converters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,42 +129,3 @@ public NewDiffChangeTypeConverter()
{
}
}

/// <summary>
/// The converter for visibility and boolean.
/// </summary>
internal class VisibilityBooleanConverter : IValueConverter
{
/// <summary>
/// Converts a source to target.
/// </summary>
public object Convert(object value, Type targetType, object parameter, string language)
{
if (value is bool b)
{
if (targetType == typeof(bool)) return b;
return b ? Visibility.Visible : Visibility.Collapsed;
}

if (value is int i)
{
if (targetType == typeof(bool)) return i > 0;
return i > 0 ? Visibility.Visible : Visibility.Collapsed;
}

if (value is Visibility v)
{
if (targetType == typeof(Visibility)) return v;
return v == Visibility.Visible;
}

if (targetType == typeof(bool)) return false;
return null;
}

/// <summary>
/// Converts the source back.
/// </summary>
public object ConvertBack(object value, Type targetType, object parameter, string language)
=> Convert(value, targetType, parameter, language);
}
18 changes: 10 additions & 8 deletions DiffPlex.Windows/DiffPlex.Windows.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-windows10.0.17763.0;net6.0-windows10.0.19041.0;net6.0-windows10.0.22000.0;net7.0-windows10.0.17763.0;net7.0-windows10.0.19041.0;net7.0-windows10.0.22000.0</TargetFrameworks>
<TargetFrameworks>net9.0-windows10.0.17763.0;net9.0-windows10.0.19041.0;net9.0-windows10.0.22000.0;net9.0-windows10.0.22621.0;net8.0-windows10.0.17763.0;net8.0-windows10.0.19041.0;net8.0-windows10.0.22000.0;net8.0-windows10.0.22621.0</TargetFrameworks>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>DiffPlex.UI</RootNamespace>
<AssemblyName>DiffPlex.Windows</AssemblyName>
<PackageId>DiffPlex.Windows</PackageId>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI>
<Version>1.1.0</Version>
<Version>1.2.0</Version>
<PackageTags>diff</PackageTags>
<PackageIcon>diffplex_icon.png</PackageIcon>
<Description>DiffPlex.Windows is a Windows App SDK control library that allows you to programatically render visual text diffs in your application.</Description>
<AssemblyVersion>1.1.0.0</AssemblyVersion>
<FileVersion>1.1.0.0</FileVersion>
<LangVersion>13.0</LangVersion>
<AssemblyVersion>1.2.0.0</AssemblyVersion>
<FileVersion>1.2.0.0</FileVersion>
<Authors>Kingcean Tuan; Matthew Manela</Authors>
<Copyright>Copyright (c) 2022 Matthew Manela. All rights reserved.</Copyright>
<ApplicationIcon>../DiffPlex.ico</ApplicationIcon>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/mmanela/diffplex</PackageProjectUrl>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
Expand All @@ -33,9 +35,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231115000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
<PackageReference Include="Trivial.WindowsKit" Version="7.1.0" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.241114003" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1742" />
<PackageReference Include="Trivial.WindowsKit" Version="9.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

Expand Down
Loading

0 comments on commit eca892d

Please sign in to comment.