Fix color and newline handling

This commit is contained in:
2024-10-17 20:50:57 -04:00
parent 7c196787c9
commit 5849525029
4 changed files with 6 additions and 6 deletions

View File

@@ -212,7 +212,7 @@ public class FloatingStatusWindow : IDisposable
public void SetText(string text)
{
_mainWindow.HtmlLabel.Text = text;
_mainWindow.HtmlLabel.Html = text;
}
private void HandleLockedMenuItemClicked(object sender, RoutedEventArgs e)

View File

@@ -20,11 +20,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="ChrisKaczor.Wpf.Application.StartWithWindows" Version="1.0.5" />
<PackageReference Include="ChrisKaczor.Wpf.Controls.HtmlTextBlock" Version="1.0.3" />
<PackageReference Include="ChrisKaczor.Wpf.Controls.HtmlTextBlock" Version="1.0.6" />
<PackageReference Include="ChrisKaczor.Wpf.Windows.ControlBox" Version="1.0.3" />
<PackageReference Include="ChrisKaczor.Wpf.Windows.SnappingWindow" Version="1.0.4" />
<PackageReference Include="Extended.Wpf.Toolkit" Version="4.5.0" />
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.108" />
<PackageReference Include="Extended.Wpf.Toolkit" Version="4.6.1" />
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.1.3" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">

View File

@@ -5,7 +5,7 @@ using System.Windows;
[assembly: ComVisible(false)]
[assembly: SupportedOSPlatform("windows")]
[assembly: SupportedOSPlatform("windows5.1.2600")]
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]

View File

@@ -27,7 +27,7 @@ internal class WindowSource1 : IWindowSource, IDisposable
private void HandleTimerElapsed(object sender, ElapsedEventArgs e)
{
_dispatcher.InvokeAsync(() => _floatingStatusWindow.SetText(DateTime.Now.ToString(CultureInfo.InvariantCulture)));
_dispatcher.InvokeAsync(() => _floatingStatusWindow.SetText($"<font color='green'>{DateTime.Now.ToString(CultureInfo.InvariantCulture)}</font><br/><font color='red'>{DateTime.Now.ToString(CultureInfo.InvariantCulture)}</font>"));
}
public void Dispose()