Explorar o código

Excluded net8.0-ios from TargetFrameworks when building on Windows
Fixed Station Selection clamping in Factory Floor Screen

frogsoftware hai 3 semanas
pai
achega
581bd2e99b

+ 10 - 1
PRS.Avalonia/PRS.Avalonia/PRS.Avalonia.csproj

@@ -1,11 +1,20 @@
 <Project Sdk="Microsoft.NET.Sdk">
     <PropertyGroup>
-        <TargetFrameworks>net8.0-ios;net8.0;net9.0</TargetFrameworks>
         <Nullable>enable</Nullable>
         <AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
         <Configurations>Debug;Release;DebugDev;Publish</Configurations>
         <Platforms>AnyCPU</Platforms>
     </PropertyGroup>
+    
+    <PropertyGroup>
+        <!-- Default for Windows/Linux (and anything non-macOS): -->
+        <TargetFrameworks>net8.0;net9.0</TargetFrameworks>
+    </PropertyGroup>
+
+    <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">
+        <!-- On macOS, include iOS as well: -->
+        <TargetFrameworks>net8.0-ios;net8.0;net9.0</TargetFrameworks>
+    </PropertyGroup>
 
 	<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDev|AnyCPU'">
 		<DefineConstants>$(DefineConstants);DEBUGDEV</DefineConstants>

+ 10 - 1
prs.classes/PRSClasses.csproj

@@ -4,10 +4,19 @@
         <RootNamespace>Comal.Classes</RootNamespace>
 		<Nullable>enable</Nullable>
 		<Configurations>Debug;Release;Test;Publish</Configurations>
-		<TargetFrameworks>net8.0-ios;net8.0;netstandard2.1</TargetFrameworks>
 		<Platforms>AnyCPU</Platforms>
     </PropertyGroup>
     
+    <PropertyGroup>
+        <!-- Default for Windows/Linux (and anything non-macOS): -->
+        <TargetFrameworks>net8.0;netstandard2.1</TargetFrameworks>
+    </PropertyGroup>
+
+    <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">
+        <!-- On macOS, include iOS as well: -->
+        <TargetFrameworks>net8.0-ios;net8.0;netstandard2.1</TargetFrameworks>
+    </PropertyGroup>
+    
     <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
       <DefineConstants>TRACE;</DefineConstants>
     </PropertyGroup>

+ 1 - 1
prs.desktop/Panels/Factory/FactoryPanel.xaml.cs

@@ -184,7 +184,7 @@ namespace PRSDesktop
             for (var i = 1; i <= (CurrentSection?.Stations ?? 0); i++)
                 Station.Items.Add($"Station #{i}");
 
-            CurrentStation = Math.Max(Math.Min(_settings.Station + 1, 1), iCount); // Note that iCount might be zero, so we can't do a Math.Clamp, lest we get an exception.
+            CurrentStation = Math.Min(Math.Max(_settings.Station + 1, 1), iCount); // Note that iCount might be zero, so we can't do a Math.Clamp, lest we get an exception.
 
             Station.SelectedIndex = CurrentStation - 1;