-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The most significant changes in the code include the update of projec…
…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.
- Loading branch information
Showing
34 changed files
with
844 additions
and
683 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,38 @@ | ||
<local:WidgetBase x:Class="openHAB.Windows.Controls.ChartWidget" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="using:openHAB.Windows.Controls" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Visibility="{x:Bind Widget.Visibility, Converter={StaticResource BooleanToVisibilityConverter}}"> | ||
|
||
<Grid Style="{StaticResource Widget}" | ||
Tapped="ImageWidget_OnTapped"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto" /> | ||
<ColumnDefinition Width="*" /> | ||
</Grid.ColumnDefinitions> | ||
<local:ImageLabel Grid.Column="0" | ||
IconPath="{x:Bind Widget, Mode=OneWay, Converter={StaticResource IconToPathConverter}}" | ||
LabelText="{x:Bind Widget.Label, Mode=OneWay}" | ||
LabelForeground="{x:Bind Widget.LabelColor,Converter={StaticResource StringToColorConverter}, Mode=OneWay}"/> | ||
|
||
<ContentDialog x:Name="PopupDialog" | ||
Title="{x:Bind Widget.Label}" | ||
Grid.Column="0" | ||
Grid.ColumnSpan="2" | ||
Background="{StaticResource OpenHABLightColor}" | ||
IsPrimaryButtonEnabled="True" | ||
PrimaryButtonText="Close"> | ||
<Image x:Name="FullImage" | ||
HorizontalAlignment="Right" | ||
Source="http://demo.openhab.org:8080/chart?groups=Weather_Chart&period=w" | ||
Stretch="Uniform" /> | ||
</ContentDialog> | ||
|
||
<Image x:Name="ThumbImage" | ||
Grid.Column="1" | ||
Margin="8" | ||
HorizontalAlignment="Stretch" | ||
VerticalAlignment="Stretch" | ||
Stretch="UniformToFill" /> | ||
</Grid> | ||
</local:WidgetBase> | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="using:openHAB.Windows.Controls" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Visibility="{x:Bind Widget.Visibility}"> | ||
<Grid Style="{StaticResource Widget}" | ||
Tapped="ImageWidget_OnTapped"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto" /> | ||
<ColumnDefinition Width="*" /> | ||
</Grid.ColumnDefinitions> | ||
<local:ImageLabel Grid.Column="0" | ||
IconPath="{x:Bind Widget.IconPath, Mode=OneWay}" | ||
LabelText="{x:Bind Widget.Label, Mode=OneWay}" | ||
LabelForeground="{x:Bind Widget.LabelColor, Mode=OneWay}" /> | ||
<ContentDialog x:Name="PopupDialog" | ||
Title="{x:Bind Widget.Label}" | ||
Grid.Column="0" | ||
Grid.ColumnSpan="2" | ||
Background="{StaticResource OpenHABLightColor}" | ||
IsPrimaryButtonEnabled="True" | ||
PrimaryButtonText="Close"> | ||
<Image x:Name="FullImage" | ||
HorizontalAlignment="Right" | ||
Source="http://demo.openhab.org:8080/chart?groups=Weather_Chart&period=w" | ||
Stretch="Uniform" /> | ||
</ContentDialog> | ||
<Image x:Name="ThumbImage" | ||
Grid.Column="1" | ||
Margin="8" | ||
HorizontalAlignment="Stretch" | ||
VerticalAlignment="Stretch" | ||
Stretch="UniformToFill" /> | ||
</Grid> | ||
</local:WidgetBase> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,39 @@ | ||
<local:WidgetBase x:Class="openHAB.Windows.Controls.ImageWidget" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="using:openHAB.Windows.Controls" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
d:DesignHeight="300" | ||
d:DesignWidth="400" | ||
mc:Ignorable="d" | ||
Visibility="{x:Bind Widget.Visibility, Converter={StaticResource BooleanToVisibilityConverter}}"> | ||
|
||
<Grid Style="{StaticResource Widget}" | ||
Tapped="ImageWidget_OnTapped"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto" /> | ||
<ColumnDefinition Width="*" /> | ||
</Grid.ColumnDefinitions> | ||
<local:ImageLabel Grid.Column="0" | ||
IconPath="{x:Bind Widget, Mode=OneWay, Converter={StaticResource IconToPathConverter}}" | ||
LabelText="{x:Bind Widget.Label, Mode=OneWay}" | ||
LabelForeground="{x:Bind Widget.LabelColor,Converter={StaticResource StringToColorConverter}, Mode=OneWay}"/> | ||
|
||
<ContentDialog x:Name="PopupDialog" | ||
Title="{x:Bind Widget.Label}" | ||
Grid.Column="0" | ||
Grid.ColumnSpan="2" | ||
Background="{StaticResource OpenHABLightColor}" | ||
IsPrimaryButtonEnabled="True" | ||
PrimaryButtonText="Close"> | ||
<Image x:Name="FullImage" | ||
HorizontalAlignment="Right" | ||
Stretch="Uniform" /> | ||
</ContentDialog> | ||
|
||
<Image x:Name="ThumbImage" | ||
Grid.Column="1" | ||
Margin="8" | ||
HorizontalAlignment="Stretch" | ||
VerticalAlignment="Stretch" | ||
Stretch="UniformToFill" /> | ||
</Grid> | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="using:openHAB.Windows.Controls" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
d:DesignHeight="300" | ||
d:DesignWidth="400" | ||
mc:Ignorable="d" | ||
Visibility="{x:Bind Widget.Visibility}"> | ||
<Grid Style="{StaticResource Widget}" | ||
Tapped="ImageWidget_OnTapped"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto" /> | ||
<ColumnDefinition Width="*" /> | ||
</Grid.ColumnDefinitions> | ||
<local:ImageLabel Grid.Column="0" | ||
IconPath="{x:Bind Widget.IconPath, Mode=OneWay}" | ||
LabelText="{x:Bind Widget.Label, Mode=OneWay}" | ||
LabelForeground="{x:Bind Widget.LabelColor, Mode=OneWay}" /> | ||
<ContentDialog x:Name="PopupDialog" | ||
Title="{x:Bind Widget.Label}" | ||
Grid.Column="0" | ||
Grid.ColumnSpan="2" | ||
Background="{StaticResource OpenHABLightColor}" | ||
IsPrimaryButtonEnabled="True" | ||
PrimaryButtonText="Close"> | ||
<Image x:Name="FullImage" | ||
HorizontalAlignment="Right" | ||
Stretch="Uniform" /> | ||
</ContentDialog> | ||
<Image x:Name="ThumbImage" | ||
Grid.Column="1" | ||
Margin="8" | ||
HorizontalAlignment="Stretch" | ||
VerticalAlignment="Stretch" | ||
Stretch="UniformToFill" /> | ||
</Grid> | ||
</local:WidgetBase> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.