Skip to content

Commit

Permalink
Update MotdControl layout and enhance message processing
Browse files Browse the repository at this point in the history
- Incremented AssemblyFileVersion from 1.6.5.2 to 1.6.5.3.
- Adjusted Grid.ColumnDefinitions in MotdControl.xaml for better layout.
- Swapped Grid.Column assignments for date and severity StackPanels.
- Enhanced TbMessage TextBlock with TextAlignment="Justify" and TextWrapping="Wrap".
- Added using directive for Songify_Slim.Util.General in MotdControl.xaml.cs.
- Updated TbMessage.Text assignment to use IOManager.InterpretEscapeCharacters.
  • Loading branch information
Inzaniity committed Sep 1, 2024
1 parent de290cb commit 42bf546
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Songify Slim/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.6.5.2")]
[assembly: AssemblyFileVersion("1.6.5.2")]
[assembly: AssemblyFileVersion("1.6.5.3")]
[assembly: NeutralResourcesLanguage("en")]
[assembly: Guid("442379e3-32d8-42d1-ab09-cba229672453")]
14 changes: 8 additions & 6 deletions Songify Slim/UserControls/MotdControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@
CornerRadius="10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel
Grid.Row="0"
Grid.Column="0"
Grid.Column="1"
Orientation="Horizontal">
<TextBlock Text="Date: " />
<TextBlock x:Name="TbDate" />
</StackPanel>
<StackPanel
Grid.Row="0"
Grid.Column="1"
Grid.Column="0"
Orientation="Horizontal">
<TextBlock Text="Severity: " />
<Border
Expand All @@ -58,7 +58,9 @@
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="3"
Margin="6" />
Margin="6"
TextAlignment="Justify"
TextWrapping="Wrap" />
</Grid>
</Border>
</UserControl>
3 changes: 2 additions & 1 deletion Songify Slim/UserControls/MotdControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using System.Windows.Navigation;
using System.Windows.Shapes;
using Songify_Slim.Models;
using Songify_Slim.Util.General;

namespace Songify_Slim.UserControls
{
Expand All @@ -26,7 +27,7 @@ public MotdControl(Motd motd)
InitializeComponent();
TbAuthor.Text = motd.Author;
TbDate.Text = motd.CreatedAtDateTime?.ToString("dd.MM.yyyy HH:mm");
TbMessage.Text = motd.MessageText;
TbMessage.Text = IOManager.InterpretEscapeCharacters(motd.MessageText);
TbSeverity.Text = motd.Severity;

Brush severitybrush = motd.Severity switch
Expand Down

0 comments on commit 42bf546

Please sign in to comment.