Compare commits

..

No commits in common. "f71125d8f355a4bba1cc4e0cd4974d1740e2c4d8" and "98d4801b7eca4ea9bdcae710c0b8d5e5bac7887c" have entirely different histories.

6 changed files with 91 additions and 62 deletions

65
Directory.Build.props Normal file
View file

@ -0,0 +1,65 @@
<Project>
<PropertyGroup>
<Version>7.7.0</Version>
</PropertyGroup>
<PropertyGroup>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<ErrorReport>none</ErrorReport>
<NoWarn>CA1031;CS1591;NU1507</NoWarn>
<Nullable>annotations</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AnalysisLevel>latest-all</AnalysisLevel>
<Authors>2dust</Authors>
<Company>2dust</Company>
<PackageLicenseExpression>GPL-3.0</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Copyright>Copyright © 2017-$([System.DateTime]::UtcNow.Year) $(Company)</Copyright>
<Description>A GUI client for Windows, Linux and macOS, supports Xray, sing-box and others.</Description>
<RepositoryType>Git</RepositoryType>
<RepositoryBranch>master</RepositoryBranch>
<RepositoryUrl>$(PackageProjectUrl).git</RepositoryUrl>
<PackageProjectUrl>https://github.com/$(Company)/v2rayN</PackageProjectUrl>
<PackageReleaseNotes>$(PackageProjectUrl)/releases</PackageReleaseNotes>
<TargetFramework>net8.0-windows10.0.17763</TargetFramework>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<RollForward>latestMinor</RollForward>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DebugType>embedded</DebugType>
<Optimize>false</Optimize>
<InvariantGlobalization>false</InvariantGlobalization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebuggerSupport>false</DebuggerSupport>
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<EventSourceSupport>false</EventSourceSupport>
<StackTraceSupport>false</StackTraceSupport>
<MetricsSupport>false</MetricsSupport>
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
<MetadataUpdaterSupport>false</MetadataUpdaterSupport>
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
<UseNativeHttpHandler>true</UseNativeHttpHandler>
<AutoreleasePoolSupport>false</AutoreleasePoolSupport>
<InvariantGlobalization>false</InvariantGlobalization>
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<PublishTrimmed>false</PublishTrimmed>
<PublishReadyToRun>false</PublishReadyToRun>
<PublishSingleFile>true</PublishSingleFile>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
</PropertyGroup>
</Project>

View file

@ -1,32 +0,0 @@
<Project>
<PropertyGroup>
<Version>7.7.0</Version>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<NoWarn>CA1031;CS1591;NU1507</NoWarn>
<Nullable>annotations</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Authors>2dust</Authors>
<PackageLicenseExpression>GPL-3.0</PackageLicenseExpression>
<Copyright>Copyright © 2017-$([System.DateTime]::UtcNow.Year) $(Authors)</Copyright>
<InvariantGlobalization>false</InvariantGlobalization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<EventSourceSupport>false</EventSourceSupport>
<StackTraceSupport>false</StackTraceSupport>
<MetricsSupport>false</MetricsSupport>
<MetadataUpdaterSupport>false</MetadataUpdaterSupport>
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<PublishSingleFile>true</PublishSingleFile>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
</PropertyGroup>
</Project>

View file

@ -52,6 +52,5 @@ internal class Program
//.WithInterFont()
.WithFontByDefault()
.LogToTrace()
.UseReactiveUI()
.With(new MacOSPlatformOptions { ShowInDock = false});
.UseReactiveUI();
}

View file

@ -389,8 +389,7 @@ namespace v2rayN.Desktop.Views
_blCloseByUser = true;
StorageUI();
await ViewModel?.MyAppExitAsync(false);
Close();
await ViewModel?.MyAppExitAsync(false);
}
#endregion Event
@ -399,28 +398,28 @@ namespace v2rayN.Desktop.Views
public void ShowHideWindow(bool? blShow)
{
var bl = blShow ?? (!_config.UiItem.ShowInTaskbar ^ (WindowState==WindowState.Minimized));
if (bl)
{
this.Show();
if (this.WindowState == WindowState.Minimized)
{
this.WindowState = WindowState.Normal;
}
this.Activate();
this.Focus();
}
else
{
if (Utils.IsOSX() || _config.UiItem.Hide2TrayWhenClose)
{
this.Hide();
}
else
{
this.WindowState = WindowState.Minimized;
}
}
var bl = blShow ?? !_config.UiItem.ShowInTaskbar;
if (bl)
{
this.Show();
if (this.WindowState == WindowState.Minimized)
{
this.WindowState = WindowState.Normal;
}
this.Activate();
this.Focus();
}
else
{
if (_config.UiItem.Hide2TrayWhenClose)
{
this.Hide();
}
else
{
this.WindowState = WindowState.Minimized;
}
}
_config.UiItem.ShowInTaskbar = bl;
}

View file

@ -1,13 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.17763</TargetFramework>
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
<OutputType>WinExe</OutputType>
<UseWPF>true</UseWPF>
<ApplicationIcon>Resources\v2rayN.ico</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
</PropertyGroup>
<ItemGroup>