118 lines
5.8 KiB
XML
118 lines
5.8 KiB
XML
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:GTPCorrgir"
|
||
xmlns:av="http://schemas.microsoft.com/expression/blend/2008"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="av"
|
||
x:Class="GTPCorrgir.ContextMenuWindow" Title="Menu" WindowStyle="None" AllowsTransparency="True"
|
||
Background="Transparent" ShowInTaskbar="False" Topmost="True" SizeToContent="WidthAndHeight"
|
||
KeyDown="Window_KeyDown" Deactivated="Window_Deactivated" av:DesignHeight="700">
|
||
|
||
<Window.Resources>
|
||
<local:NullToBooleanConverter x:Key="NullToBooleanConverter" />
|
||
<Style x:Key="CloseButtonStyle" TargetType="{x:Type Button}">
|
||
<Setter Property="Background" Value="Transparent" />
|
||
<Setter Property="Foreground" Value="#757575" />
|
||
<Setter Property="BorderThickness" Value="0" />
|
||
<Setter Property="FontSize" Value="14" />
|
||
<Setter Property="Cursor" Value="Hand" />
|
||
<Setter Property="Template">
|
||
<Setter.Value>
|
||
<ControlTemplate TargetType="{x:Type Button}">
|
||
<Grid Background="Transparent">
|
||
<Border x:Name="border" Background="{TemplateBinding Background}"
|
||
BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2"
|
||
Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
|
||
<TextBlock Text="{TemplateBinding Content}" HorizontalAlignment="Center"
|
||
VerticalAlignment="Center" FontSize="{TemplateBinding FontSize}" />
|
||
</Border>
|
||
</Grid>
|
||
<ControlTemplate.Triggers>
|
||
<Trigger Property="IsMouseOver" Value="True">
|
||
<Setter TargetName="border" Property="Background" Value="#20000000" />
|
||
<Setter Property="Foreground" Value="#FF4081" />
|
||
</Trigger>
|
||
<Trigger Property="IsPressed" Value="True">
|
||
<Setter TargetName="border" Property="Background" Value="#40000000" />
|
||
</Trigger>
|
||
</ControlTemplate.Triggers>
|
||
</ControlTemplate>
|
||
</Setter.Value>
|
||
</Setter>
|
||
</Style>
|
||
</Window.Resources>
|
||
|
||
<Border Background="#F5F5F5" BorderBrush="#CCCCCC" BorderThickness="1" CornerRadius="3" Margin="5">
|
||
<Border.ContextMenu>
|
||
<ContextMenu>
|
||
<MenuItem Header="Abrir Log" Click="OpenLog_Click">
|
||
<MenuItem.Icon>
|
||
<TextBlock Text="📄" FontSize="14" />
|
||
</MenuItem.Icon>
|
||
</MenuItem>
|
||
<MenuItem Header="Limpiar Log" Click="ClearLog_Click">
|
||
<MenuItem.Icon>
|
||
<TextBlock Text="🗑️" FontSize="14" />
|
||
</MenuItem.Icon>
|
||
</MenuItem>
|
||
<Separator />
|
||
<MenuItem Header="Acerca de" Click="About_Click">
|
||
<MenuItem.Icon>
|
||
<TextBlock Text="ℹ️" FontSize="14" />
|
||
</MenuItem.Icon>
|
||
</MenuItem>
|
||
</ContextMenu>
|
||
</Border.ContextMenu>
|
||
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<!-- Header con título y botón de cerrar -->
|
||
<Grid Grid.Row="0" Height="20" Margin="10,5,10,5">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="Auto" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<TextBlock Text="Modo de Uso:" FontWeight="Bold" Grid.Column="0" VerticalAlignment="Center" />
|
||
|
||
<Button x:Name="CloseButton" Content="✕" Click="CloseButton_Click" Grid.Column="1" Width="20"
|
||
Height="20" Style="{StaticResource CloseButtonStyle}" />
|
||
</Grid>
|
||
|
||
<!-- Contenido principal -->
|
||
<Grid Grid.Row="1" Margin="10,0,10,10">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<ListBox x:Name="ModeListBox" Grid.Row="0" Margin="0,0,0,10">
|
||
<ListBox.ItemTemplate>
|
||
<DataTemplate>
|
||
<TextBlock Text="{Binding DisplayName}" Padding="5,3" />
|
||
</DataTemplate>
|
||
</ListBox.ItemTemplate>
|
||
</ListBox>
|
||
|
||
<StackPanel Grid.Row="1" Margin="0,0,0,10">
|
||
<TextBlock Text="Modelo LLM:" FontWeight="Bold" Margin="0,0,0,5" />
|
||
<ListBox x:Name="LLMListBox" Height="205">
|
||
<ListBox.ItemTemplate>
|
||
<DataTemplate>
|
||
<TextBlock Text="{Binding DisplayName}" Padding="5,3" />
|
||
</DataTemplate>
|
||
</ListBox.ItemTemplate>
|
||
</ListBox>
|
||
</StackPanel>
|
||
|
||
<Button Grid.Row="2" Content="Aceptar" Height="30" Width="80" HorizontalAlignment="Center"
|
||
Click="AcceptButton_Click" Margin="0,0,0,0">
|
||
<!-- ... resto del estilo del botón ... -->
|
||
</Button>
|
||
</Grid>
|
||
</Grid>
|
||
</Border>
|
||
</Window> |