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
2 changes: 1 addition & 1 deletion src/DiffEngineTray.Tests/DiffEngineTray.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<NoWarn>CA1416</NoWarn>
</PropertyGroup>
<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/DiffEngineTray/DiffEngineTray.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<PackAsTool>True</PackAsTool>
<Description>A utility that runs in the windows tray and handles the results of file differences.</Description>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<NoWarn>NETSDK1137;WFAC010;NU5119</NoWarn>
<ApplicationManifest>app.manifest</ApplicationManifest>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<RollForward>LatestMajor</RollForward>
</PropertyGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/DiffEngineTray/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ static class Program
static async Task Main()
{
Logging.Init();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.SetHighDpiMode(HighDpiMode.SystemAware);

try
{
Expand Down
3 changes: 3 additions & 0 deletions src/DiffEngineTray/Settings/HotKeyControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public HotKeyControl()
keyCombo.Items.AddRange(GetAlphabet().ToArray());
}

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public HotKey? HotKey
{
get
Expand Down Expand Up @@ -39,12 +40,14 @@ public HotKey? HotKey
}
}

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Label
{
get => hotKeyEnabled.Text;
set => hotKeyEnabled.Text = value;
}

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string? Help
{
get => (string?) helpLabel.Text;
Expand Down
10 changes: 2 additions & 8 deletions src/DiffEngineTray/Settings/OptionsFormLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ static class OptionsFormLauncher
{
static OptionsForm? instance;

static EventHandler formOnClosed = (_, _) =>
{
instance!.Closed -= formOnClosed;
instance = null;
};

public static async Task Launch(KeyRegister keyRegister, Tracker tracker)
{
if (instance != null)
Expand All @@ -21,8 +15,8 @@ public static async Task Launch(KeyRegister keyRegister, Tracker tracker)
settings,
newSettings => Save(keyRegister, tracker, newSettings));
instance = form;
form.Closed += formOnClosed;
form.ShowDialog();
await form.ShowDialogAsync();
instance = null;
}

static async Task<IReadOnlyCollection<string>> Save(KeyRegister keyRegister, Tracker tracker, Settings settings)
Expand Down
34 changes: 0 additions & 34 deletions src/DiffEngineTray/app.manifest

This file was deleted.