Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 25 additions & 20 deletions src/Notifications/NotificationsView.xaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<Window x:Class="Dynamo.Notifications.NotificationsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Dynamo.Notifications"
xmlns:Logging="clr-namespace:Dynamo.Logging;assembly=DynamoCore"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

xmlns:local="clr-namespace:Dynamo.Notifications"
xmlns:p="clr-namespace:Dynamo.Notifications.Properties"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this namespace for extracting resource string

xmlns:ui="clr-namespace:Dynamo.UI;assembly=DynamoCoreWpf"
Title="Notifications"
Height="450"
Width="400"
Background="#555"
MinWidth="400"
MaxWidth="400"
xmlns:ui="clr-namespace:Dynamo.UI;assembly=DynamoCoreWpf"
d:DataContext="{d:DesignInstance Type = local:NotificationsViewExtension}"
mc:Ignorable="d">
mc:Ignorable="d">

<Window.Resources>
<ResourceDictionary>
Expand Down Expand Up @@ -62,34 +61,40 @@
<StackPanel.Background>
<SolidColorBrush Color="{DynamicResource ResourceKey=BorderDarkColor}"></SolidColorBrush>
</StackPanel.Background>

<StackPanel Margin="10,10,20,10">
<TextBox Style="{DynamicResource ResourceKey =SDarkTextBox }" Name="Title" Text="{Binding Path=Title, Mode=OneWay}" FontWeight="Bold" IsReadOnly="True" TextWrapping="Wrap" Visibility="Visible" Grid.Row="0" Grid.Column="0" ></TextBox>
<TextBox Style="{DynamicResource ResourceKey =SDarkTextBox }" Name="ShortErrorMessage" Text="{Binding Path= ShortMessage,Mode=OneWay}" FontSize="11" IsReadOnly="True" TextWrapping="Wrap" Visibility="Visible" Grid.Row="0" Grid.Column="0" ></TextBox>
</StackPanel>

<Border BorderThickness="1" BorderBrush="Black">

<Border BorderThickness="1" BorderBrush="Black">
<StackPanel Orientation="Horizontal">
<StackPanel.Background>
<SolidColorBrush Color="{DynamicResource ResourceKey=BorderDarkColor}"></SolidColorBrush>
</StackPanel.Background>
<Button Margin="20,20,20,20" Style="{DynamicResource ResourceKey=STextButton}" Tag="{Binding ElementName=Details}" Click="ShowDetails_ButtonClick" >Show Details</Button>
<Button Margin="50,20,20,20" HorizontalAlignment="Right" Style="{DynamicResource ResourceKey=STextButton}" Click="OKButton_Click">OK</Button>
</StackPanel>
</Border>
<StackPanel Margin="0,0,20,0">

<Button Margin="20,20,20,20"
Style="{DynamicResource ResourceKey=STextButton}"
Tag="{Binding ElementName=Details}"
Click="ShowDetails_ButtonClick"
Content="{x:Static p:Resources.ButtonDetails}">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch to use resource string

</Button>
<Button Margin="50,20,20,20"
HorizontalAlignment="Right"
Style="{DynamicResource ResourceKey=STextButton}"
Click="OKButton_Click"
Content="{x:Static p:Resources.ButtonOK}">
</Button>
</StackPanel>
</Border>
<StackPanel Margin="0,0,20,0">

<StackPanel.Background>
<SolidColorBrush Color="{DynamicResource ResourceKey=BorderMediumColor}"></SolidColorBrush>
</StackPanel.Background>
<TextBox Style="{DynamicResource ResourceKey =SDarkTextBox }" FontSize="10" IsReadOnly="True" Text="{Binding Path=DetailedMessage,Mode=OneWay}" Name="Details" TextWrapping="Wrap" Background="WhiteSmoke" Visibility="Collapsed"></TextBox>
</StackPanel>
</StackPanel>


</DataTemplate>

</ListBox.ItemTemplate>

</ListBox>
Expand Down
18 changes: 18 additions & 0 deletions src/Notifications/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/Notifications/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ButtonDetails" xml:space="preserve">
<value>Show Details</value>
</data>
<data name="ButtonOK" xml:space="preserve">
<value>OK</value>
</data>
<data name="Dismiss" xml:space="preserve">
<value>Dismiss All Notifications</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions src/Notifications/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ButtonDetails" xml:space="preserve">
<value>Show Details</value>
</data>
<data name="ButtonOK" xml:space="preserve">
<value>OK</value>
</data>
<data name="Dismiss" xml:space="preserve">
<value>Dismiss All Notifications</value>
</data>
Expand Down