worker prints start success but no attachment yet
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
x:Class="UnifiedFarmLauncher.Views.GlobalSettingsWindow"
|
||||
x:DataType="vm:GlobalSettingsViewModel"
|
||||
Title="Global Settings"
|
||||
Width="500" Height="300"
|
||||
MinWidth="400" MinHeight="250">
|
||||
Width="500" Height="350"
|
||||
MinWidth="400" MinHeight="300">
|
||||
<Grid RowDefinitions="Auto,*,Auto" Margin="10">
|
||||
<!-- Settings Content -->
|
||||
<TabControl Grid.Row="1" Margin="0,10">
|
||||
@@ -29,6 +29,21 @@
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Header="Flamenco">
|
||||
<StackPanel Margin="10" Spacing="10">
|
||||
<TextBlock Text="Worker Path:"/>
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<TextBox Name="FlamencoWorkerPathTextBox"
|
||||
Grid.Column="0"
|
||||
Text="{Binding FlamencoWorkerPath}"
|
||||
Margin="0,0,5,0"/>
|
||||
<Button Name="BrowseFlamencoPathButton"
|
||||
Grid.Column="1"
|
||||
Content="Browse..."
|
||||
Width="80"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
<!-- Buttons -->
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Platform.Storage;
|
||||
using UnifiedFarmLauncher.Services;
|
||||
using UnifiedFarmLauncher.ViewModels;
|
||||
|
||||
@@ -30,6 +31,7 @@ namespace UnifiedFarmLauncher.Views
|
||||
this.FindControl<Button>("OkButton")!.Click += OkButton_Click;
|
||||
this.FindControl<Button>("CancelButton")!.Click += CancelButton_Click;
|
||||
this.FindControl<Button>("ToggleRenderKeyButton")!.Click += ToggleRenderKeyButton_Click;
|
||||
this.FindControl<Button>("BrowseFlamencoPathButton")!.Click += BrowseFlamencoPathButton_Click;
|
||||
}
|
||||
|
||||
private void OkButton_Click(object? sender, RoutedEventArgs e)
|
||||
@@ -68,6 +70,23 @@ namespace UnifiedFarmLauncher.Views
|
||||
}
|
||||
}
|
||||
|
||||
private async void BrowseFlamencoPathButton_Click(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
if (topLevel?.StorageProvider.CanPickFolder == true)
|
||||
{
|
||||
var folders = await topLevel.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
||||
{
|
||||
Title = "Select Flamenco Worker Path"
|
||||
});
|
||||
|
||||
if (folders.Count > 0 && folders[0].TryGetLocalPath() is { } localPath)
|
||||
{
|
||||
_viewModel.FlamencoWorkerPath = localPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> ShowDialogAsync(Window parent)
|
||||
{
|
||||
await base.ShowDialog(parent);
|
||||
|
||||
@@ -55,13 +55,13 @@
|
||||
<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="Note: Worker Path is configured in Global Settings."
|
||||
IsVisible="{Binding HasFlamenco}"
|
||||
Margin="0,0,0,10"
|
||||
Foreground="Gray"
|
||||
TextWrapping="Wrap"/>
|
||||
|
||||
<TextBlock Text="Network Drives:" IsVisible="{Binding HasFlamenco}" Margin="0,10,0,0"/>
|
||||
<TextBlock Text="Network Drives:" IsVisible="{Binding HasFlamenco}"/>
|
||||
<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">
|
||||
|
||||
@@ -39,7 +39,6 @@ namespace UnifiedFarmLauncher.Views
|
||||
{
|
||||
this.FindControl<Button>("OkButton")!.Click += OkButton_Click;
|
||||
this.FindControl<Button>("CancelButton")!.Click += CancelButton_Click;
|
||||
this.FindControl<Button>("BrowseFlamencoPathButton")!.Click += BrowseFlamencoPathButton_Click;
|
||||
this.FindControl<Button>("AddDriveButton")!.Click += AddDriveButton_Click;
|
||||
this.FindControl<Button>("RemoveDriveButton")!.Click += RemoveDriveButton_Click;
|
||||
this.FindControl<Button>("AddPathButton")!.Click += AddPathButton_Click;
|
||||
@@ -78,23 +77,6 @@ namespace UnifiedFarmLauncher.Views
|
||||
Close();
|
||||
}
|
||||
|
||||
private async void BrowseFlamencoPathButton_Click(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
if (topLevel?.StorageProvider.CanPickFolder == true)
|
||||
{
|
||||
var folders = await topLevel.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
||||
{
|
||||
Title = "Select Flamenco Worker Path"
|
||||
});
|
||||
|
||||
if (folders.Count > 0 && folders[0].TryGetLocalPath() is { } localPath)
|
||||
{
|
||||
_viewModel.FlamencoWorkerPath = localPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddDriveButton_Click(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
// Simplified: use a simple input box
|
||||
|
||||
Reference in New Issue
Block a user