Here is a list of the changes:
1. In `CarouselItems.axaml`, the `ItemsPerLine` property of `spp:FixedWrapPanel` has been updated to use a binding to the parent `spp:CarouselItems`'s `ItemsPerPage` property. This change allows the number of items per line to dynamically adjust based on the parent's `ItemsPerPage` property.
2. In `HomePage.axaml`, a large block of code related to an `ItemsControl` has been commented out and replaced with a new block of code that sets up a `spp:CarouselItems` control with a custom `ItemTemplate`. This change simplifies the code and makes it easier to manage the items in the carousel.
3. In `GameAcceleratorService.cs`, a new line of code has been added to update the `LastAccelerateTime` property of the `app` object to the current time when the `startCode` is `101`. This change ensures that the `LastAccelerateTime` property is always up-to-date.
4. In `GameInfoPageViewModel.cs`, two new lines of code have been added to set the `SelectedArea` and `SelectedServer` properties of `XunYouGame` to `null` in the `BackSelectArea` method. This change resets the selected area and server when the user goes back to the select area page.
5. In `GameAppItem.axaml`, several changes have been made to the styles and properties of various elements. These changes improve the appearance of the game app item.
6. In `AcceleratorPage2.axaml.cs`, the `SearchGameBox_SelectionChanged` event handler has been replaced with a `SearchGameBox_DropDownClosed` event handler. This change improves the user experience by resetting the search box and scrolling the game list to the top after a game is selected.
1. The default value for `PingValue` in `XunYouGameViewModel` has been changed from an empty string to a constant string `DefaultPingValue` set to `"--"`.
2. `RestoreGameStatus` method in `GameAcceleratorService` now sets `PingValue` to `DefaultPingValue` instead of `"0"`.
3. The logic for adding and updating games in `GameAcceleratorService` has been modified. If the game is found in `MyGames`, it is now removed before being added again.
4. The condition for early return in the game area selection method in `GameAcceleratorService` now checks if `SelectedArea` is null on `vm.XunYouGame` instead of `app`.
5. The layout of the game accelerator page in `AcceleratorPage2.axaml` has been changed. The `ScrollViewer` has been moved inside the `ContentLoader` and the `GameDetail` component has been moved outside the `ScrollViewer`.
6. The `ItemsRepeater` in `GameListPage.axaml` now has a `VerticalCacheLength` of `300`.
Changes:
1. The `GameAcceleratorService` class now uses `game2` instead of `game` in the switch case for `XunYouState.加速中` and `XunYouState.加速已完成`. The properties `IsAccelerated`, `IsAccelerating`, and `LastAccelerateTime` are now set directly on `game2` (Code Change 1).
2. The `GameAcceleratorService` class now includes `SelectedArea` and `SelectedServer` in the `GameInfoPageViewModel` instance creation (Code Change 2).
3. The `GameAcceleratorService` class now uses an async version of `GameAccelerator` (Code Change 3).
4. The `GameInfoPageViewModel` class has been updated to change the second parameter of `WhenPropertyChanged` from `false` to `true` for `XunYouGame.SelectedArea` (Code Change 4).
5. The `GameAppItem.axaml` file has been updated with a new style for `Grid Panel.AppName TextBlock.LeftMargin` and new properties for `spp:Image2`. The `Margin` property of `TextBlock` has been moved to a new class `Classes.LeftMargin` (Code Change 5).
6. The `GameDetail.axaml` file has been updated to move the `spp:Image2` inside a `StackPanel` and add `IsVisible` and `Margin` properties to it. The `Margin` property of `TextBlock` has been removed (Code Change 6).
7. The `AcceleratorPage2.axaml.cs` file has been updated to add a new dictionary `dictPinYinArray` and a new method `GameContains` that checks if a game contains a given text using case-insensitive comparison and Pinyin comparison. The `TextSelector` and `TextFilter` properties of `SearchGameBox` have been set to `null` and `GameContains` respectively (Code Change 7).
List of changes:
1. A new else block has been added to the `AuthenticatorHomePageViewModel.cs` file. This block sets `IsVerificationPass` to true when the if statement's condition is not met.
2. In the `AuthenticatorHomePage.axaml` file, the visibility of the `StackPanel` is now directly bound to the `IsVerificationPass` property. This change simplifies the visibility condition of the `StackPanel`.
3. The `MultiBinding` converter code, which was previously used to bind `IsVerificationPass` and `Auths.Count` to the visibility of the `StackPanel`, has been commented out. This indicates that it is no longer in use but is kept for possible future reference.
4. No changes have been made to the `TextBlock` element. It is included for context.
Changes:
1. The `GameAccelerator` method in the `GameAcceleratorService` class has been changed from an asynchronous void method to an asynchronous Task method. This change allows for better error handling and control flow.
2. The `GameAcceleratorCommand` ReactiveCommand has been updated to use `CreateFromTask` instead of `Create`, reflecting the change in the `GameAccelerator` method.
3. A new property `IsAccelerating` has been added to the `XunYouGameViewModel` class. This property is set to `true` at the start of the `GameAccelerator` method and is set to `false` in various places where the method may return early due to an error or condition not being met. This change allows for better tracking of the state of the game acceleration process.
4. The line setting `app.IsAccelerating` to `true` has been removed from the end of the `GameAccelerator` method, as it is now set at the start of the method.
5. In the case where the game acceleration is stopped successfully, the line setting `app.IsAccelerating` to `true` has been removed. In the case where stopping the game acceleration fails, `app.IsAccelerating` is now set to `false`.
---------------------------
Stopped program because of exception, name: AppDomain, isTerminating: True
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at System.Log.get_Factory()
at System.Log.CreateLogger(String tag)
at System.Log.Error(String tag, String msg, Object[] args)
at BD.WTTS.Services.Implementation.BackendAcceleratorServiceImpl.XunYouAccelStateToFrontendCallback(XunYouAccelStateModel m) in C:\Code\2023\SteamTools\src\BD.WTTS.Client.Plugins.Accelerator\Services.Implementation\BackendAcceleratorServiceImpl.XunYou.cs:line 49
at BD.WTTS.Services.Implementation.BackendAcceleratorServiceImpl.XunYouAccelStateCallback(XunYouState status, IntPtr thisptr) in C:\Code\2023\SteamTools\src\BD.WTTS.Client.Plugins.Accelerator\Services.Implementation\BackendAcceleratorServiceImpl.XunYou.cs:line 30
---------------------------
确定
---------------------------