Skip to content

Conversation

@hoffe86
Copy link
Collaborator

@hoffe86 hoffe86 commented Dec 17, 2023

No description provided.

Signed-off-by: Christoph Hofmann <[email protected]>
Signed-off-by: Christoph Hofmann <[email protected]>
Signed-off-by: Christoph Hofmann <[email protected]>
Signed-off-by: Christoph Hofmann <[email protected]>
Signed-off-by: Christoph Hofmann <[email protected]>
Signed-off-by: Christoph Hofmann <[email protected]>
Signed-off-by: Christoph Hofmann <[email protected]>
Signed-off-by: Christoph Hofmann <[email protected]>
Signed-off-by: Christoph Hofmann <[email protected]>
Signed-off-by: Christoph Hofmann <[email protected]>
…t reference for "openHAB.Common", removal of namespaces from "NotificationManager.cs", addition of a new parameter in "ResolveIconPath" method, and the inclusion of a new dependency in "IconCaching.cs". Several converters were removed from "App.xaml" and usage of certain converters was removed from multiple files. The logic for resolving the icon path was updated in "ImageLabel.xaml.cs" and a boolean return type was added to "DownloadAndSaveIconToCache" method in "IconCaching.cs". Code formatting and alignment changes were made in multiple files for better readability. The type of `Widget` property was changed in `WidgetBase.cs` and the logic for generating the icon path was simplified in `IconToBitmapConverter.cs`. The `Visibility` property binding was simplified in all `.xaml` files. The `IconToPathConverter.cs`, `StringToColorBrushConverter.cs` files were removed from the project. Various UI elements were updated in `MainWindow.xaml` and a `nativeDebugging` property was added to the `openHAB.Windows (Package)` profile in `launchSettings.json`. A new file `WidgetViewModel.cs` was added to the project.

Here is a list of the changes:

1. The project reference for "openHAB.Common" was updated to use a different project type GUID.
2. The "openHAB.Core.Client" and "openHAB.Core.Common" namespaces were removed from the "NotificationManager.cs" file.
3. The method signature for "ResolveIconPath" in "IIconCaching.cs" was updated to include a new parameter for "state".
4. The "IconCaching.cs" file was updated to include a new dependency on "ISettingsService", and the "ResolveIconPath" method was updated to construct the icon URL based on the server version and state.
5. Several converters were removed from "App.xaml".
6. The "ChartWidget.xaml", "ColorWidget.xaml", "FrameWidget.xaml", "ImageWidget.xaml", "MapViewWidget.xaml", "MjpegWidget.xaml", "PageLinkWidget.xaml", "RollershutterWidget.xaml", and "SectionSwitchWidget.xaml" files were updated to remove usage of the "BooleanToVisibilityConverter", "IconToPathConverter", and "StringToColorConverter". The "IconPath" property is now directly bound to the "IconPath" property of the widget.
7. The "ImageLabel.xaml.cs" file was updated to remove the dependency on "IIconCaching" and to update the logic for resolving the icon path.
8. The "DownloadAndSaveIconToCache" method in "IconCaching.cs" was updated to return a boolean indicating whether the download was successful.
9. Code formatting and alignment changes were made in multiple files for better readability.
10. The type of `Widget` property was changed in `WidgetBase.cs` and the logic for generating the icon path was simplified in `IconToBitmapConverter.cs`.
11. The `Visibility` property binding was simplified in all `.xaml` files.
12. The `IconToPathConverter.cs`, `StringToColorBrushConverter.cs` files were removed from the project.
13. Various UI elements were updated in `MainWindow.xaml` and a `nativeDebugging` property was added to the `openHAB.Windows (Package)` profile in `launchSettings.json`.
14. A new file `WidgetViewModel.cs` was added to the project.
…C# version, renaming of classes, replacement of the JSON library, and updates to package versions.

1. The `openHAB.Core.Client.csproj` file has been updated to target the .NET Standard 2.0 framework and use C# version 11.0. It also includes additional project sources for package restoration and adds package references for `Azure.Core` and `Microsoft.Azure.AutoRest.CSharp`.

2. The `openHAB.Common.csproj` file has been updated to use newer versions of the `Microsoft.WindowsAppSDK` and `Microsoft.Windows.SDK.BuildTools` packages.

3. Several classes have been renamed, such as `OpenHABSitemap` to `Sitemap`, `OpenHABItem` to `Item`, and `OpenHABWidget` to `WidgetViewModel`. This suggests a simplification or standardization of class names.

4. The JSON library used for serialization and deserialization has been changed from `Newtonsoft.Json` to `System.Text.Json.Serialization`.

5. The versions of several package references, such as `Microsoft.WindowsAppSDK`, `Microsoft.Windows.SDK.BuildTools`, and `Microsoft.Extensions.Logging.Abstractions`, have been updated.

6. The namespace `openHAB.Core.Services` was changed to `openHAB.Windows.Services` in `WidgetNavigationService.cs`, `MainPage.xaml.cs`, and `SitemapPage.xaml.cs`.

7. The `Page` class was replaced with `Microsoft.UI.Xaml.Controls.Page` in `MainPage.xaml.cs` and `SitemapPage.xaml.cs`.

8. The `WigetNavigation` class was replaced with `WidgetNavigationMessage` in `MainViewModel.cs` and `SitemapViewModel.cs`.

9. The `ObservableCollection<OpenHABWidget>` was replaced with `ObservableCollection<WidgetViewModel>` in `MainViewModel.cs`.

10. The `ObservableCollection<OpenHABSitemap>` was replaced with `ObservableCollection<Sitemap>` in `MainViewModel.cs`.

11. The `List<OpenHABSitemap>` was replaced with `List<Sitemap>` in `MainViewModel.cs`.

12. The `ICollection<OpenHABWidget>` was replaced with `ICollection<Widget>` in `SitemapViewModel.cs`.

13. The `ICollection<OpenHABWidgetMapping>` was replaced with `ICollection<WidgetMapping>` in `SitemapViewModel.cs`.

14. The `OpenHABItem` class was replaced with `Item` in `WidgetViewModel.cs`.

15. The `ObservableCollection<WidgetViewModel>` was added to `WidgetViewModel.cs`.

16. The `Encoding` property was added to `WidgetViewModel.cs`.

17. The `Parent` property was added to `WidgetViewModel.cs`.

18. The `Visibility` property was added to `WidgetViewModel.cs`.

19. The `CreateAsync` method was added to `WidgetViewModel.cs`.

20. The `LoadData` method was added to `WidgetViewModel.cs`.

21. The `CacheAndRetrieveLocalIconPath` method was added to `WidgetViewModel.cs`.

22. The `ConvertColorCodeToColor` method was added to `WidgetViewModel.cs`.

23. The version of the `Mapsui` and `Mapsui.WinUI` packages in the `openHAB.Windows.csproj` file have been updated from `4.1.3` to `4.1.4`.

24. The version of the `Microsoft.WindowsAppSDK` package in the `openHAB.Windows.csproj` file has been updated from `1.4.231219000` to `1.5.240311000`.
…renceMessenger.Default.Send` and `StrongReferenceMessenger.Default.Register` method calls in `MainWindow.xaml.cs`, `MainViewModel.cs`, and `SitemapViewModel.cs`. These methods now include additional arguments related to the sitemap name. Additionally, the `StrongReferenceMessenger.Default.Unregister` method call was removed from `MainViewModel.cs`. Lastly, several build properties were removed from `openHAB.Windows.GeneratedMSBuildEditorConfig.editorconfig`, indicating potential changes in the project configuration or build process.

List of changes:

1. The namespaces `System` and `System.Threading.Tasks` were removed and then added back in `MainWindow.xaml.cs` and `SitemapViewModel.cs`. This could be due to reordering of the namespaces.
2. The `StrongReferenceMessenger.Default.Send` method calls in `MainWindow.xaml.cs` were modified to include `Vm.SelectedSitemap.Name` as an additional argument.
3. The `StrongReferenceMessenger.Default.Register` method calls in `MainViewModel.cs` and `SitemapViewModel.cs` were modified to include the sitemap name as an additional argument.
4. The `StrongReferenceMessenger.Default.Unregister` method call in `MainViewModel.cs` was removed.
5. The `StrongReferenceMessenger.Default.Send` method calls in `SitemapViewModel.cs` were modified to include `Model.Name` as an additional argument.
6. Several build properties were removed from `openHAB.Windows.GeneratedMSBuildEditorConfig.editorconfig`. This could be due to changes in the project configuration or build process.
hoffe86 added 30 commits January 6, 2025 21:00
…and auto-increment settings

Signed-off-by: Christoph Hofmann <[email protected]>
A new project named `openHAB.Windows.Package.Beta` has been added to the `OpenHAB.Windows.sln` solution file. This project is located at `src\openHAB.Windows.Package.Beta\openHAB.Windows.Package.Beta.wapproj`.

The solution configuration platforms have been updated to include build and deploy configurations for the new project for various platforms (arm64, x64, x86).

A new project file `openHAB.Windows.Package.Beta.wapproj` has been created, including:
- Project configurations for Debug and Release modes for platforms x86, x64, ARM, ARM64, and AnyCPU.
- Property groups defining various project properties.
- Import statements for `Microsoft.DesktopBridge.props` and `Microsoft.DesktopBridge.targets`.
- Item groups for project references, package references, content files, and other resources.

A new `Package.appxmanifest` file has been added, including:
- Package identity information.
- Properties for display name, publisher display name, and logo.
- Dependencies specifying target device families and their versions.
- Resources and applications definitions, including visual elements for the application.
- Extensions for startup tasks, toast notification activation, and COM server registration.
- Capabilities required by the application.

A new XML file `Package.StoreAssociation.xml` has been added to define the store association details for an application, including publisher information, supported locales, product reserved information, and a link to the developer dashboard.

A new XML file `Resources.resw` has been added, following the Microsoft ResX schema, version 2.0, for storing resources in a human-readable XML format. It defines a resource named `AppDisplayName` with the value `openHAB Beta`.

Signed-off-by: Christoph Hofmann <[email protected]>
Modified AppPaths.cs to dynamically retrieve the app's display name
using AppInfo.Current.DisplayInfo.DisplayName instead of a hardcoded
string. Removed single instance enforcement in App.xaml.cs, allowing
multiple instances of the application to run simultaneously.

Signed-off-by: Christoph Hofmann <[email protected]>
Significantly modified XML schema and metadata in `Resources.resw`, including changing the version number from 2.0 to 1.3 and updating `AppDisplayName` to "openHAB Beta".

Reorganized `openHAB.Windows.Package.Beta.wapproj`:
- Moved `EntryPointProjectUniqueName` property.
- Relocated `PRIResource` entry for `Properties\Resources.resw`.
- Modified `ProjectReference` by removing specific attributes.
- Moved `None` entry for `Package.StoreAssociation.xml`.

Signed-off-by: Christoph Hofmann <[email protected]>
Updated OpenHabHttpClientExtension.cs:
- Added CreateConnection method for connection handling.
- Updated AddHttpClient to use CreateConnection.
- Added ConfigureHttpClient for HttpClient configuration.

MainWindow.xaml:
- Commented out TitleBarSearchBox element.

MainWindow.xaml.cs:
- Commented out TitleBarSearchBox related code.

DefaultTheme.xaml:
- Changed Background property values to ControlStrokeColorSecondaryBrush.

Signed-off-by: Christoph Hofmann <[email protected]>
The provided diffs indicate modifications to binary files. The exact changes are not detailed, but the files differ from their previous versions.

Signed-off-by: Christoph Hofmann <[email protected]>
In MapViewWidget.xaml, replaced Background property with Style
property using the same resource key `{StaticResource ContentDialog}`.

In SectionSwitchWidget.xaml, updated Background property to use
`{ThemeResource ControlStrokeColorSecondaryBrush}` instead of
`{StaticResource ContentDialog}`.

Signed-off-by: Christoph Hofmann <[email protected]>
Signed-off-by: Christoph Hofmann <[email protected]>
Signed-off-by: Christoph Hofmann <[email protected]>
Modified TextBlock Foreground binding in ImageLabel.xaml to OneWay.
Updated Background properties in DefaultTheme.xaml styles.
Added WindowsAppSDKSelfContained property to openHAB.Windows.csproj.

Signed-off-by: Christoph Hofmann <[email protected]>
Introduced a new binding for the Foreground property of the TextBlock named Label. This binding connects the Foreground property to LabelForeground in the data context, ensuring that changes to LabelForeground are reflected in the TextBlock's foreground color. The binding mode is set to one-way.

Signed-off-by: Christoph Hofmann <[email protected]>
- Target framework updated to .NET 9.0 across multiple projects.
- Upgraded `Microsoft.WindowsAppSDK` to version `1.7.250606001`.
- Updated `CommunityToolkit.WinUI.Helpers` and related packages.
- Added `PublishTrimmed` property to `win-x64.pubxml` for performance.
- Changed event trigger behaviors in XAML files to use `Interactivity`.
- Improved `DispatcherQueue` initialization in `MainWindow.xaml.cs`.
- Consistent `AppxBundle` property set to `Always` for deployment.
- Updated `NLog.Extensions.Logging` to version `6.0.0`.
- Overall enhancements for compatibility and application structure.

Signed-off-by: Christoph Hofmann <[email protected]>
Enhance project configurations and dependencies by adding new properties such as `AppxBundlePlatforms` and `UapAppxPackageBuildMode` in the `.wapproj` files. Introduce new package references, including `System.Private.Uri` and `System.Text.RegularExpressions`, to improve dependency management. Additionally, include `System.Text.Json` in the `openHAB.Windows.csproj` for JSON handling. These changes aim to modernize the project setup and ensure compatibility across various platforms.

Signed-off-by: Christoph Hofmann <[email protected]>
Added `Microsoft.Net.Sdk.Compilers.Toolset` version `9.0.301` and `Microsoft.WindowsAppSDK` version `1.7.250606001` to enhance project capabilities and support for Windows applications.

Signed-off-by: Christoph Hofmann <[email protected]>
Changed the NuGet restore command in `build.yml` to include the property `/p:BuildWithNetFrameworkHostedCompiler=true` for better compatibility. Removed the `<PackageReference>` for `Microsoft.Net.Sdk.Compilers.Toolset` in `openHAB.Common.csproj`, which may impact the build process.

Signed-off-by: Christoph Hofmann <[email protected]>
- Updated `AppManager.cs` to set both `CurrentCulture` and `CurrentUICulture` based on `langcode`, with fallback to the first language in `GlobalizationPreferences.Languages`.
- Refined comments in `Resources.resw` for better clarity and readability, and added German translations for specific UI elements.
- Specified supported languages in `Package.appxmanifest`, replacing the generic `x-generate`.
- Restructured `openHAB.Windows.Package.wapproj` to define project configurations and include necessary content files.
- Improved XML documentation in `SettingsViewModel.cs`, enhancing clarity on method purposes and parameters.
- Clarified the `PersistSettings` method's comment to better reflect its functionality.

Signed-off-by: Christoph Hofmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants