2026-06-08 10:39:11 -05:00
|
|
|
<Window xmlns="https://github.com/avaloniaui"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2026-06-08 15:18:19 -05:00
|
|
|
xmlns:vm="using:finder2e_foundry_converter.ViewModels"
|
2026-06-08 10:39:11 -05:00
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="600"
|
2026-06-08 15:18:19 -05:00
|
|
|
x:Class="finder2e_foundry_converter.Views.MainWindow"
|
2026-06-08 10:39:11 -05:00
|
|
|
x:DataType="vm:MainWindowViewModel"
|
|
|
|
|
Icon="/Assets/avalonia-logo.ico"
|
|
|
|
|
Title="Finder2e Foundry Converter"
|
|
|
|
|
Width="500" Height="600"
|
|
|
|
|
DragDrop.AllowDrop="True">
|
|
|
|
|
|
|
|
|
|
<Design.DataContext>
|
|
|
|
|
<!-- This only sets the DataContext for the previewer in an IDE,
|
|
|
|
|
to set the actual DataContext at runtime, set the DataContext property in code (look at App.axaml.cs) -->
|
|
|
|
|
<vm:MainWindowViewModel/>
|
|
|
|
|
</Design.DataContext>
|
|
|
|
|
|
2026-06-08 10:50:01 -05:00
|
|
|
<ScrollViewer DragDrop.AllowDrop="True">
|
|
|
|
|
<StackPanel Margin="20" Spacing="10" DragDrop.AllowDrop="True">
|
2026-06-08 10:39:11 -05:00
|
|
|
<Label Content="Provider:"/>
|
|
|
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
|
|
|
<ComboBox Grid.Column="0" HorizontalAlignment="Stretch"
|
|
|
|
|
ItemsSource="{Binding Providers}"
|
|
|
|
|
SelectedItem="{Binding SelectedProvider}"/>
|
|
|
|
|
<Button Grid.Column="1" Content="Address" Command="{Binding ToggleAddressCommand}" Margin="5,0,0,0"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="{Binding ErrorText}" Foreground="Red" HorizontalAlignment="Center" IsVisible="{Binding IsErrorVisible}"/>
|
|
|
|
|
|
|
|
|
|
<StackPanel IsVisible="{Binding IsAddressVisible}" Spacing="5">
|
|
|
|
|
<Label Content="LM Studio Address:"/>
|
|
|
|
|
<TextBox Text="{Binding LmStudioAddress}" PlaceholderText="http://localhost:1234"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<Label Content="Model:"/>
|
|
|
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
|
|
|
<ComboBox Grid.Column="0" HorizontalAlignment="Stretch"
|
|
|
|
|
ItemsSource="{Binding Models}"
|
|
|
|
|
SelectedItem="{Binding SelectedModel}"
|
|
|
|
|
PlaceholderText="Select Model"/>
|
|
|
|
|
<Button Grid.Column="1" Content="Refresh" Command="{Binding RefreshModelsCommand}" Margin="5,0,0,0"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<Label Content="Description:"/>
|
|
|
|
|
<TextBox Text="{Binding Description}" AcceptsReturn="True" Height="100" PlaceholderText="Enter description here..."/>
|
|
|
|
|
|
|
|
|
|
<Label Content="Images:"/>
|
|
|
|
|
<ScrollViewer Height="180">
|
|
|
|
|
<ItemsControl ItemsSource="{Binding ImageItems}">
|
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
|
<WrapPanel />
|
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<Grid Margin="5">
|
|
|
|
|
<Border BorderBrush="Gray" BorderThickness="1" CornerRadius="4" ClipToBounds="True">
|
|
|
|
|
<Image Source="{Binding Thumbnail}" Width="100" Height="100" Stretch="UniformToFill" />
|
|
|
|
|
</Border>
|
|
|
|
|
<Button Content="X"
|
|
|
|
|
Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).RemoveImageCommand}"
|
|
|
|
|
CommandParameter="{Binding}"
|
|
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Top"
|
|
|
|
|
Background="#80000000" Foreground="White" Padding="5,2"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
|
|
|
|
|
<Button Content="Select Image" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" Click="SelectImage_Click"/>
|
|
|
|
|
|
|
|
|
|
<Button Content="Generate" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
|
|
|
|
|
Command="{Binding GenerateCommand}" FontWeight="Bold"/>
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="{Binding StatusMessage}" TextWrapping="Wrap" Margin="0,10,0,0"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
|
|
|
|
|
</Window>
|