2025-12-17 15:34:34 -07:00
|
|
|
<Window xmlns="https://github.com/avaloniaui"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2025-12-17 15:55:45 -07:00
|
|
|
xmlns:vm="using:UnifiedFarmLauncher.ViewModels"
|
2025-12-17 15:34:34 -07:00
|
|
|
x:Class="UnifiedFarmLauncher.Views.WorkerEditWindow"
|
2025-12-17 15:55:45 -07:00
|
|
|
x:DataType="vm:WorkerEditViewModel"
|
2025-12-17 15:34:34 -07:00
|
|
|
Title="Edit Worker"
|
|
|
|
|
Width="600" Height="700"
|
|
|
|
|
MinWidth="500" MinHeight="600">
|
|
|
|
|
<Grid RowDefinitions="Auto,*,Auto" Margin="10">
|
|
|
|
|
<!-- Tabs -->
|
|
|
|
|
<TabControl Grid.Row="1" Margin="0,10">
|
|
|
|
|
<!-- Basic Info Tab -->
|
|
|
|
|
<TabItem Header="Basic Info">
|
|
|
|
|
<StackPanel Margin="10" Spacing="10">
|
|
|
|
|
<TextBlock Text="Worker Name:"/>
|
|
|
|
|
<TextBox Name="NameTextBox" Text="{Binding Name}"/>
|
|
|
|
|
|
|
|
|
|
<CheckBox Name="EnabledCheckBox" Content="Enabled" IsChecked="{Binding Enabled}" Margin="0,10,0,0"/>
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="SSH Host:" Margin="0,10,0,0"/>
|
|
|
|
|
<TextBox Name="SshHostTextBox" Text="{Binding SshHost}"/>
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="SSH Port:" Margin="0,10,0,0"/>
|
|
|
|
|
<NumericUpDown Name="SshPortNumeric" Value="{Binding SshPort}" Minimum="1" Maximum="65535"/>
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="SSH Args:" Margin="0,10,0,0"/>
|
|
|
|
|
<TextBox Name="SshArgsTextBox" Text="{Binding SshArgs}"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
|
|
<!-- SheepIt Tab -->
|
|
|
|
|
<TabItem Header="SheepIt">
|
|
|
|
|
<StackPanel Margin="10" Spacing="10">
|
|
|
|
|
<CheckBox Name="HasSheepItCheckBox" Content="Enable SheepIt Worker" IsChecked="{Binding HasSheepIt}" Margin="0,0,0,10"/>
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="GPU:" IsVisible="{Binding HasSheepIt}"/>
|
|
|
|
|
<ComboBox Name="GpuComboBox" IsVisible="{Binding HasSheepIt}" SelectedItem="{Binding SheepItGpu}">
|
|
|
|
|
<ComboBox.Items>
|
|
|
|
|
<ComboBoxItem Content="OPTIX_0"/>
|
|
|
|
|
<ComboBoxItem Content="CUDA_0"/>
|
|
|
|
|
<ComboBoxItem Content="OPENCL_0"/>
|
|
|
|
|
</ComboBox.Items>
|
|
|
|
|
</ComboBox>
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="Username:" IsVisible="{Binding HasSheepIt}" Margin="0,10,0,0"/>
|
|
|
|
|
<TextBox Name="SheepItUsernameTextBox" Text="{Binding SheepItUsername}" IsVisible="{Binding HasSheepIt}"/>
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="Render Key:" IsVisible="{Binding HasSheepIt}" Margin="0,10,0,0"/>
|
|
|
|
|
<TextBox Name="SheepItRenderKeyTextBox" Text="{Binding SheepItRenderKey}" IsVisible="{Binding HasSheepIt}" PasswordChar="*"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
|
|
<!-- Flamenco Tab -->
|
|
|
|
|
<TabItem Header="Flamenco">
|
|
|
|
|
<StackPanel Margin="10" Spacing="10">
|
|
|
|
|
<CheckBox Name="HasFlamencoCheckBox" Content="Enable Flamenco Worker" IsChecked="{Binding HasFlamenco}" Margin="0,0,0,10"/>
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="Worker Path:" IsVisible="{Binding HasFlamenco}"/>
|
|
|
|
|
<Grid IsVisible="{Binding HasFlamenco}" ColumnDefinitions="*,Auto">
|
|
|
|
|
<TextBox Name="FlamencoPathTextBox" Grid.Column="0" Text="{Binding FlamencoWorkerPath}" Margin="0,0,5,0"/>
|
|
|
|
|
<Button Name="BrowseFlamencoPathButton" Grid.Column="1" Content="Browse..." Width="80"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="Network Drives:" IsVisible="{Binding HasFlamenco}" Margin="0,10,0,0"/>
|
|
|
|
|
<Grid IsVisible="{Binding HasFlamenco}" RowDefinitions="*,Auto" Margin="0,5,0,0">
|
|
|
|
|
<ListBox Name="NetworkDrivesListBox" Grid.Row="0" ItemsSource="{Binding NetworkDrives}" MaxHeight="100"/>
|
|
|
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,5,0,0">
|
|
|
|
|
<Button Name="AddDriveButton" Content="Add" Width="60" Margin="0,0,5,0"/>
|
|
|
|
|
<Button Name="RemoveDriveButton" Content="Remove" Width="60"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="Network Paths:" IsVisible="{Binding HasFlamenco}" Margin="0,10,0,0"/>
|
|
|
|
|
<Grid IsVisible="{Binding HasFlamenco}" RowDefinitions="*,Auto" Margin="0,5,0,0">
|
|
|
|
|
<ListBox Name="NetworkPathsListBox" Grid.Row="0" ItemsSource="{Binding NetworkPaths}" MaxHeight="100"/>
|
|
|
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,5,0,0">
|
|
|
|
|
<Button Name="AddPathButton" Content="Add" Width="60" Margin="0,0,5,0"/>
|
|
|
|
|
<Button Name="RemovePathButton" Content="Remove" Width="60"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</TabItem>
|
|
|
|
|
</TabControl>
|
|
|
|
|
|
|
|
|
|
<!-- Buttons -->
|
|
|
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="2" Spacing="10" Margin="0,10,0,0">
|
|
|
|
|
<Button Name="OkButton" Content="OK" Width="80" IsDefault="True"/>
|
|
|
|
|
<Button Name="CancelButton" Content="Cancel" Width="80" IsCancel="True"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Window>
|
|
|
|
|
|