Skip to content

Commit

Permalink
Merge pull request #237 from haevg-rz/lastChanges
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasMeissner2000 committed Aug 13, 2020
2 parents 64d7977 + 80b50fa commit 8c90346
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 44 deletions.
6 changes: 2 additions & 4 deletions TrustCenterSearch.Presentation/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,8 @@
IsEnabled="{Binding Source={StaticResource ViewModel}, Path=UserInputIsEnabled}">
<Button.Content>
<WrapPanel Background="Transparent">
<TextBlock
Style="{DynamicResource TrustCenterHistoryElementAddTextBlockStyle}" />
<TextBlock Width="150" VerticalAlignment="Center"
Text="{Binding TrustCenterMetaInfo.Name}" />
<TextBlock Style="{DynamicResource TrustCenterHistoryElementAddTextBlockStyle}" />
<TextBlock Width="150" VerticalAlignment="Center" Text="{Binding TrustCenterMetaInfo.Name}" />
<Button Style="{DynamicResource InfoButtonStyle}"
CommandParameter="{Binding}"
Command="{Binding Source={StaticResource ViewModel}, Path=InfoAboutTrustCenterCommand}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}" >
<!-- BorderThickness="1" BorderBrush="Transparent" CornerRadius="1" -->

<ContentPresenter VerticalAlignment="Center" />
<ContentPresenter VerticalAlignment="Center" />
</Border>
</ControlTemplate>
</Setter.Value>
Expand All @@ -73,9 +71,7 @@
<Setter Property="ToolTip" Value="Add Trust Center to filter" />
</DataTrigger>
<Trigger Property="IsMouseOver" Value="True">
<!-- <Setter Property="BorderBrush" Value="Blue" /> -->
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontStyle" Value="Italic" />
</Trigger>
</Style.Triggers>
</Style>
Expand Down Expand Up @@ -181,7 +177,7 @@
</Style>

<Style TargetType="Button" x:Key="OpenConfigButtonStyle">
<Setter Property="Padding" Value="3" />
<Setter Property="Padding" Value="7,4,7,4" />
<Setter Property="Content" Value="Config" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="Margin" Value="10,5,10,10" />
Expand Down
24 changes: 0 additions & 24 deletions TrustCenterSearch.Presentation/Resources/Styles/IconStyles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@
<Setter Property="BorderBrush" TargetName="border"
Value="{StaticResource Button.Pressed.Border}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border"
Value="{StaticResource Button.Disabled.Background}" />
<Setter Property="BorderBrush" TargetName="border"
Value="{StaticResource Button.Disabled.Border}" />
<Setter Property="TextElement.Foreground" TargetName="contentPresenter"
Value="{StaticResource Button.Disabled.Foreground}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
Expand Down Expand Up @@ -118,14 +110,6 @@
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource infoIcon}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border"
Value="{StaticResource Button.Disabled.Background}" />
<Setter Property="BorderBrush" TargetName="border"
Value="{StaticResource Button.Disabled.Border}" />
<Setter Property="TextElement.Foreground" TargetName="contentPresenter"
Value="{StaticResource Button.Disabled.Foreground}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
Expand Down Expand Up @@ -186,14 +170,6 @@
<Setter Property="BorderBrush" TargetName="border"
Value="{StaticResource Button.Pressed.Border}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border"
Value="{StaticResource Button.Disabled.Background}" />
<Setter Property="BorderBrush" TargetName="border"
Value="{StaticResource Button.Disabled.Border}" />
<Setter Property="TextElement.Foreground" TargetName="contentPresenter"
Value="{StaticResource Button.Disabled.Foreground}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,19 @@

<Style TargetType="TextBlock" x:Key="TrustCenterHistoryElementAddTextBlockStyle">
<Setter Property="Margin" Value="5,0,5,0" />
<Setter Property="FontWeight" Value="ExtraBold" />
<Setter Property="Text" Value="-" />
<Setter Property="Width" Value="10" />
<Setter Property="FontSize" Value="13" />
<Setter Property="TextAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" />

<Style.Triggers>
<DataTrigger Binding="{Binding Active}" Value="true">
<Setter Property="Text" Value="-" />
<Setter Property="FontSize" Value="15" />
</DataTrigger>
<DataTrigger Binding="{Binding Active}" Value="false">
<Setter Property="Text" Value="+" />
<Setter Property="FontSize" Value="13" />
<Setter Property="FontSize" Value="15" />
</DataTrigger>
</Style.Triggers>
</Style>
Expand All @@ -57,7 +54,7 @@
<!-- Links and Version -->

<Style TargetType="TextBlock" x:Key="VersionTextBlockStyle">
<Setter Property="Text" Value="v0.3.0"/>
<Setter Property="Text" Value="v1.0.0"/>
<Setter Property="Foreground" Value="Gray"/>
<Setter Property="Margin" Value="10"/>
</Style>
Expand Down
11 changes: 6 additions & 5 deletions TrustCenterSearch.Presentation/ViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,7 @@ public ViewModel()
#endregion

#region Commandhandling
internal void CopySearchResultToClipboardCommandExecute(Certificate certificate)
{
var jsonString = JsonConvert.SerializeObject(certificate,Formatting.Indented);
Clipboard.SetText(jsonString);
}

private async void LoadDataAsyncCommandExecute()
{
this.UserInputIsEnabled = false;
Expand All @@ -135,6 +131,11 @@ private async void LoadDataAsyncCommandExecute()

this.UserInputIsEnabled = true;
}
internal void CopySearchResultToClipboardCommandExecute(Certificate certificate)
{
var jsonString = JsonConvert.SerializeObject(certificate, Formatting.Indented);
Clipboard.SetText(jsonString);
}

internal void CollapseSidebarCommandExecute()
{
Expand Down

0 comments on commit 8c90346

Please sign in to comment.