- added EffectorWindow

This commit is contained in:
Emmanuele Sassi
2025-02-17 22:52:59 +01:00
parent dd180b1128
commit 54e2f27a44
3 changed files with 115 additions and 0 deletions
@@ -154,6 +154,9 @@
<Resource Include="Resources\Effector.ico" />
<Resource Include="Resources\EgalwareLogo.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="EffectorWindow\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>copy $(TargetPath) c:\EgtData\Effector\Plugin\Effector.Plugin.DoorArreda\Effector.Plugin.Lib.dll
@@ -0,0 +1,109 @@
<local:EgtWindow x:Class="EffectorWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Effector.Plugin.Lib"
TitleBarHeight="40">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="{Binding TitleBarHeight, RelativeSource={RelativeSource AncestorType={x:Type Lib:EgtWindow}}}"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Grid.Column="0"
Grid.ColumnSpan="6"
BorderThickness="0"
BorderBrush="{StaticResource Effector_Blue}"
Background="{StaticResource Effector_Blue}"/>
<Image Grid.Column="0"
MinWidth="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
Source="/Resources/Effector.ico"/>
<ContentControl Grid.Column="1"
Content="{Binding ContentMenu}"/>
<TextBlock Grid.Column="2"
Margin="4 0 0 0"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="14"
Text="{Binding sTitle}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<DataTrigger Binding="{Binding IsActive, RelativeSource={RelativeSource AncestorType=Window}}" Value="False">
<Setter Property="Foreground" Value="{DynamicResource WindowTitleBarInactiveText}" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<Button Grid.Column="3"
Click="OnMinimizeButtonClick"
RenderOptions.EdgeMode="Aliased"
Style="{StaticResource TitleBar_Button}">
<Path Width="46"
Height="32"
Data="M 18,15 H 28"
Stroke="{Binding Path=Foreground,
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1" />
</Button>
<Button Name="MaximizeBtn"
Grid.Column="4"
Click="OnMaximizeRestoreButtonClick">
<Button.Style>
<Style TargetType="Button" BasedOn="{StaticResource TitleBar_Button}">
<Style.Resources>
<Grid x:Key="max">
<Path Width="46"
Height="32"
Data="M 18.5,12.5 H 25.5 V 19.5 H 18.5 Z M 20.5,12.5 V 10.5 H 27.5 V 17.5 H 25.5"
Stroke="{Binding Path=Foreground,
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1" />
</Grid>
<Grid x:Key="normal">
<Path Width="46"
Height="32"
Data="M 18.5,10.5 H 27.5 V 19.5 H 18.5 Z"
Stroke="{Binding Path=Foreground,
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1" />
</Grid>
</Style.Resources>
<Style.Triggers>
<DataTrigger Binding="{Binding WindowState, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:EffectorWindowV}}}" Value="Maximized">
<Setter Property="Content" Value="{StaticResource max}" />
</DataTrigger>
<DataTrigger Binding="{Binding WindowState, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:EffectorWindowV}}}" Value="Normal">
<Setter Property="Content" Value="{StaticResource normal}" />
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<Button Grid.Column="5"
Click="OnCloseButtonClick"
Style="{StaticResource TitleBar_Button}">
<Path Width="46"
Height="32"
Data="M 18,11 27,20 M 18,20 27,11"
Stroke="{Binding Path=Foreground,
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1" />
</Button>
</Grid>
<ContentPresenter Grid.Row="1"/>
</Grid>
</local:EgtWindow>
@@ -0,0 +1,3 @@
Public Class EffectorWindowV
End Class