From 36b644bb9b3ce2696205bb9391f1408977f815ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EF=BC=B4=EF=BC=B2?= <31824852+TetsuOtter@users.noreply.github.com> Date: Sun, 17 Nov 2024 22:50:24 +0900 Subject: [PATCH 01/19] =?UTF-8?q?dotnet=20version=E3=82=929=E3=81=AB?= =?UTF-8?q?=E4=B8=8A=E3=81=92=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd-action.yml | 12 ++++++------ .../TRViS.LocationService.Tests.csproj | 2 +- TRViS/TRViS.csproj | 8 ++++---- iosSim.sh | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cd-action.yml b/.github/workflows/cd-action.yml index 8fe969ea..6c1a7a43 100644 --- a/.github/workflows/cd-action.yml +++ b/.github/workflows/cd-action.yml @@ -19,12 +19,12 @@ env: CSPROJ_PATH: ./TRViS/TRViS.csproj THIRD_PARTY_LICENSE_INFO_DIR: ./TRViS/Resources/Raw/licenses THIRD_PARTY_LICENSE_LIST_NAME: license_list - TARGET_FRAMEWORK: net8.0-ios + TARGET_FRAMEWORK: net9.0-ios TARGET_RUNTIME: ios-arm64 - TARGET_FRAMEWORK_MAC: net8.0-maccatalyst + TARGET_FRAMEWORK_MAC: net9.0-maccatalyst TARGET_RUNTIME_MAC: osx - TARGET_FRAMEWORK_ANDROID: net8.0-android - TARGET_FRAMEWORK_WIN: net8.0-windows10.0.19041.0 + TARGET_FRAMEWORK_ANDROID: net9.0-android + TARGET_FRAMEWORK_WIN: net9.0-windows10.0.19041.0 TARGET_RUNTIME_WINX64: win10-x64 TARGET_RUNTIME_WINX86: win10-x86 OUTPUT_DIR: ./out @@ -36,9 +36,9 @@ env: ASSET_NAME_WIN_X86: TRViS-win-x86 ASSET_NAME_WIN_X64_SELF_CONTAINED: TRViS-win-x64-self-contained ASSET_NAME_WIN_X86_SELF_CONTAINED: TRViS-win-x86-self-contained - SDK_VERSION: '8.0.401' + SDK_VERSION: '9.0.100' APP_CENTER_SECRETS_FILE_NAME: ./TRViS/AppCenterSecrets.cs - IOS_DSYM_PATH: ./TRViS/bin/Release/net8.0-ios/ios-arm64 + IOS_DSYM_PATH: ./TRViS/bin/Release/net9.0-ios/ios-arm64 IOS_DSYM_FILENAME: TRViS.app.dSYM jobs: diff --git a/TRViS.LocationService.Tests/TRViS.LocationService.Tests.csproj b/TRViS.LocationService.Tests/TRViS.LocationService.Tests.csproj index e66ce188..9af04c1d 100644 --- a/TRViS.LocationService.Tests/TRViS.LocationService.Tests.csproj +++ b/TRViS.LocationService.Tests/TRViS.LocationService.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable enable diff --git a/TRViS/TRViS.csproj b/TRViS/TRViS.csproj index 2a73da9f..ccf0c70e 100644 --- a/TRViS/TRViS.csproj +++ b/TRViS/TRViS.csproj @@ -1,9 +1,9 @@ - net8.0-android; - $(TargetFrameworks);net8.0-windows10.0.19041.0 - $(TargetFrameworks);net8.0-ios;net8.0-maccatalyst + net9.0-android; + $(TargetFrameworks);net9.0-windows10.0.19041.0 + $(TargetFrameworks);net9.0-ios;net9.0-maccatalyst true Exe TRViS @@ -20,7 +20,7 @@ 0.1.0 1 - 11.0 + 12.2 14.0 21.0 10.0.17763.0 diff --git a/iosSim.sh b/iosSim.sh index 03572b28..9bef993d 100755 --- a/iosSim.sh +++ b/iosSim.sh @@ -3,7 +3,7 @@ cd `dirname $0` TARGET_PROJ="TRViS/TRViS.csproj" -TARGET_FRAMEWORK="net8.0-ios" +TARGET_FRAMEWORK="net9.0-ios" UDID_PATTERN="[[:alnum:]]{8}-[[:alnum:]]{4}-[[:alnum:]]{4}-[[:alnum:]]{4}-[[:alnum:]]{12}" From afa8700dba89be91e5761b6c58bd6be353b9757b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EF=BC=B4=EF=BC=B2?= <31824852+TetsuOtter@users.noreply.github.com> Date: Sun, 17 Nov 2024 22:50:39 +0900 Subject: [PATCH 02/19] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TRViS.NetworkSyncService/TRViS.NetworkSyncService.csproj | 2 +- TRViS/TRViS.csproj | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TRViS.NetworkSyncService/TRViS.NetworkSyncService.csproj b/TRViS.NetworkSyncService/TRViS.NetworkSyncService.csproj index 4aa8f0e2..c2a9bba7 100644 --- a/TRViS.NetworkSyncService/TRViS.NetworkSyncService.csproj +++ b/TRViS.NetworkSyncService/TRViS.NetworkSyncService.csproj @@ -11,7 +11,7 @@ - + diff --git a/TRViS/TRViS.csproj b/TRViS/TRViS.csproj index ccf0c70e..89240e3f 100644 --- a/TRViS/TRViS.csproj +++ b/TRViS/TRViS.csproj @@ -62,7 +62,7 @@ + Version="9.0.10" /> @@ -73,10 +73,10 @@ ExcludeAssets="runtime" /> + Version="9.0.0" /> + Version="9.1.1" /> From 1da9ca8007db3058653abf5792d6bdeae2a128c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EF=BC=B4=EF=BC=B2?= <31824852+TetsuOtter@users.noreply.github.com> Date: Sun, 17 Nov 2024 23:36:43 +0900 Subject: [PATCH 03/19] =?UTF-8?q?Obsolete=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TRViS/App.xaml.cs | 8 ++-- TRViS/AppShell.xaml | 6 +-- TRViS/AppShell.xaml.cs | 6 +-- TRViS/DTAC/DTACElementStyles.cs | 4 +- TRViS/DTAC/HakoParts/SimpleRow.cs | 44 ++++++++++++------- .../TimetableParts/LocationServiceButton.cs | 40 ++++++++++------- TRViS/DTAC/TimetableParts/MarkerButton.xaml | 25 ++++++----- .../DTAC/TimetableParts/MarkerButton.xaml.cs | 2 +- .../TimetableParts/SelectMarkerPopup.xaml | 14 +++--- .../TimetableParts/StartEndRunButton.xaml | 11 +++-- .../TimetableParts/StartEndRunButton.xaml.cs | 2 +- .../DTAC/TimetableParts/TimetableHeader.xaml | 10 +++-- TRViS/DTAC/VerticalStylePage.xaml | 37 ++++++++++------ TRViS/DTAC/VerticalStylePage.xaml.cs | 12 ++--- TRViS/DTAC/ViewHost.xaml | 2 +- TRViS/DTAC/ViewHost.xaml.cs | 9 ++-- TRViS/Resources/Styles/Styles.xaml | 15 ------- TRViS/RootPages/AppCenterSettingPage.xaml | 22 +++++----- TRViS/RootPages/EasterEggPage.xaml | 14 +++--- TRViS/RootPages/SelectTrainPage.xaml | 13 +++--- TRViS/RootPages/ThirdPartyLicenses.xaml | 8 ++-- TRViS/RootStyles.cs | 2 +- TRViS/TRViS.csproj | 2 +- TRViS/Utils/ShowAlert.cs | 4 +- 24 files changed, 164 insertions(+), 148 deletions(-) diff --git a/TRViS/App.xaml.cs b/TRViS/App.xaml.cs index 1b300ac1..d491e2ce 100644 --- a/TRViS/App.xaml.cs +++ b/TRViS/App.xaml.cs @@ -14,14 +14,12 @@ public App() InitializeComponent(); - MainPage = new AppShell(); - logger.Trace("App Created"); } protected override Window CreateWindow(IActivationState? activationState) { - Window window = base.CreateWindow(activationState); + Window window = new(new AppShell()); logger.Info("Window Created"); @@ -59,9 +57,9 @@ public static void SetAppLinkUri(string uri) return; } - if (app.MainPage is null) + if (app.Windows.Count == 0) { - logger.Warn("App.Current.MainPage is null"); + logger.Warn("app.Windows is Empty"); AppLinkUri = uri; return; } diff --git a/TRViS/AppShell.xaml b/TRViS/AppShell.xaml index 04a38b02..94e6ae9b 100644 --- a/TRViS/AppShell.xaml +++ b/TRViS/AppShell.xaml @@ -18,15 +18,15 @@ - diff --git a/TRViS/AppShell.xaml.cs b/TRViS/AppShell.xaml.cs index e04a17bd..e3cea09e 100644 --- a/TRViS/AppShell.xaml.cs +++ b/TRViS/AppShell.xaml.cs @@ -90,12 +90,12 @@ protected override void OnPropertyChanged([CallerMemberName] string? propertyNam } } - protected override SizeRequest OnMeasure(double widthConstraint, double heightConstraint) + protected override Size MeasureOverride(double widthConstraint, double heightConstraint) { InstanceManager.AppViewModel.WindowWidth = widthConstraint; InstanceManager.AppViewModel.WindowHeight = heightConstraint; - logger.Trace("OnMeasure: {0}x{1}", widthConstraint, heightConstraint); - return base.OnMeasure(widthConstraint, heightConstraint); + logger.Trace("MeasureOverride: {0}x{1}", widthConstraint, heightConstraint); + return base.MeasureOverride(widthConstraint, heightConstraint); } public event ValueChangedEventHandler? SafeAreaMarginChanged; diff --git a/TRViS/DTAC/DTACElementStyles.cs b/TRViS/DTAC/DTACElementStyles.cs index 0b4adf2d..fad693db 100644 --- a/TRViS/DTAC/DTACElementStyles.cs +++ b/TRViS/DTAC/DTACElementStyles.cs @@ -53,8 +53,8 @@ public static readonly AppThemeGenericsBindingExtension MarkerMarkButtonB public static readonly AppThemeColorBindingExtension ForegroundBlackWhite = genColor(0x00, 0xFF); public static readonly AppThemeGenericsBindingExtension ForegroundBlackWhiteBrush = ForegroundBlackWhite.ToBrushTheme(); - public static readonly AppThemeColorBindingExtension LocationServiceSelectedSideFrameColor = genColor(0xFF, 0xAA); - public static readonly AppThemeColorBindingExtension LocationServiceSelectedSideDisabledFrameColor = genColor(0xDD, 0x99); + public static readonly AppThemeColorBindingExtension LocationServiceSelectedSideBorderColor = genColor(0xFF, 0xAA); + public static readonly AppThemeColorBindingExtension LocationServiceSelectedSideDisabledBorderColor = genColor(0xDD, 0x99); public static readonly AppThemeColorBindingExtension LocationServiceSelectedSideTextColor = genColor(0xFF, 0xDD); public static readonly AppThemeColorBindingExtension LocationServiceNotSelectedSideTextColor = genColor(0x00, 0x00); public static readonly AppThemeColorBindingExtension LocationServiceNotSelectedSideBaseColor = genColor(0xFF, 0xDD); diff --git a/TRViS/DTAC/HakoParts/SimpleRow.cs b/TRViS/DTAC/HakoParts/SimpleRow.cs index 655a88c8..aea0f342 100644 --- a/TRViS/DTAC/HakoParts/SimpleRow.cs +++ b/TRViS/DTAC/HakoParts/SimpleRow.cs @@ -51,40 +51,50 @@ static Label GenTimeLabel(int rowIndex, int colIndex, TimeData? time) return v; } - readonly Frame SelectTrainButtonFrame; - static readonly Color SelectTrainButtonFrameBorderColor = new(0.6f); - static readonly Shadow SelectTrainButtonFrameShadow = new() + readonly Border SelectTrainButtonBorder; + static readonly Color SelectTrainButtonBorderStrokeColor = new(0.6f); + static readonly Shadow SelectTrainButtonShadow = new() { Brush = Colors.Black, Offset = new(0, 0), Radius = 4, Opacity = 0.4f, }; - static Frame GenSelectTrainButtonFrame(Label TrainNumberLabel) + static readonly Shadow SelectTrainButtonEmptyShadow = new() { - Frame v = new() + Brush = Colors.Transparent, + Offset = new(0, 0), + Radius = 4, + Opacity = 0, + }; + static Border GenSelectTrainButtonBorder(Label TrainNumberLabel) + { + Border v = new() { Margin = StaNameTrainNumButtonMargin, Padding = TrainNumButtonPadding, VerticalOptions = LayoutOptions.End, HorizontalOptions = LayoutOptions.Center, MinimumWidthRequest = 120, - HasShadow = true, - Shadow = SelectTrainButtonFrameShadow, - BorderColor = SelectTrainButtonFrameBorderColor, + Shadow = SelectTrainButtonEmptyShadow, + Stroke = SelectTrainButtonBorderStrokeColor, + StrokeShape = new RoundRectangle() + { + CornerRadius = 8, + }, }; - DTACElementStyles.DefaultBGColor.Apply(v, Frame.BackgroundColorProperty); + DTACElementStyles.DefaultBGColor.Apply(v, Border.BackgroundColorProperty); v.Content = TrainNumberLabel; return v; } readonly ToggleButton SelectTrainButton; - static ToggleButton GenSelectTrainButton(Frame SelectTrainButtonFrame, EventHandler> IsSelectedChanged, int rowIndex) + static ToggleButton GenSelectTrainButton(Border SelectTrainButtonBorder, EventHandler> IsSelectedChanged, int rowIndex) { ToggleButton v = new() { - Content = SelectTrainButtonFrame, + Content = SelectTrainButtonBorder, IsRadio = true, }; @@ -150,8 +160,8 @@ public SimpleRow(Grid parentGrid, int dataIndex, TrainData TrainData) int rowIndex_time = rowIndex_StaName_SelectBtn + 1; TrainNumberLabel = GenTrainNumberLabel(TrainData); - SelectTrainButtonFrame = GenSelectTrainButtonFrame(TrainNumberLabel); - SelectTrainButton = GenSelectTrainButton(SelectTrainButtonFrame, (sender, e) => + SelectTrainButtonBorder = GenSelectTrainButtonBorder(TrainNumberLabel); + SelectTrainButton = GenSelectTrainButton(SelectTrainButtonBorder, (sender, e) => { IsSelectedChanged?.Invoke(this, e.OldValue, e.NewValue); SetTrainNumberButtonState(); @@ -183,13 +193,13 @@ void SetTrainNumberButtonState() { if (SelectTrainButton.IsEnabled && SelectTrainButton.IsChecked) { - DTACElementStyles.DefaultGreen.Apply(SelectTrainButtonFrame, Frame.BorderColorProperty); - SelectTrainButtonFrame.HasShadow = false; + DTACElementStyles.DefaultGreen.Apply(SelectTrainButtonBorder, Border.StrokeProperty); + SelectTrainButtonBorder.Shadow = SelectTrainButtonEmptyShadow; } else { - SelectTrainButtonFrame.BorderColor = SelectTrainButtonFrameBorderColor; - SelectTrainButtonFrame.HasShadow = true; + SelectTrainButtonBorder.Stroke = SelectTrainButtonBorderStrokeColor; + SelectTrainButtonBorder.Shadow = SelectTrainButtonShadow; } } diff --git a/TRViS/DTAC/TimetableParts/LocationServiceButton.cs b/TRViS/DTAC/TimetableParts/LocationServiceButton.cs index 5a1bfad5..6827180c 100644 --- a/TRViS/DTAC/TimetableParts/LocationServiceButton.cs +++ b/TRViS/DTAC/TimetableParts/LocationServiceButton.cs @@ -1,5 +1,6 @@ using System.Runtime.CompilerServices; using Microsoft.AppCenter.Crashes; +using Microsoft.Maui.Controls.Shapes; using TRViS.Controls; namespace TRViS.DTAC; @@ -16,23 +17,28 @@ public class LocationServiceButton : ToggleButton readonly Label Label_ON = DTACElementStyles.LabelStyle - + - + + +