mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Migrate image convert from Eto.Forms to Avalonia.
This commit is contained in:
202
Aaru.Gui/Views/ImageConvertWindow.xaml
Normal file
202
Aaru.Gui/Views/ImageConvertWindow.xaml
Normal file
@@ -0,0 +1,202 @@
|
||||
<Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:Aaru.Gui.ViewModels;assembly=Aaru.Gui"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="800"
|
||||
d:DesignHeight="450" x:Class="Aaru.Gui.Views.ImageConvertWindow" Icon="/Assets/aaru-logo.png"
|
||||
Title="{Binding Title}">
|
||||
<Design.DataContext>
|
||||
<vm:ImageConvertViewModel />
|
||||
</Design.DataContext>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="Source image" /> <TextBox Text="{Binding SourceText}" IsReadOnly="True" />
|
||||
<TextBlock Text="Output format" />
|
||||
<ComboBox Items="{Binding PluginsList}" SelectedItem="{Binding SelectedPlugin}"
|
||||
IsEnabled="{Binding FormatReadOnly}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding DestinationText}" IsReadOnly="True" />
|
||||
<Button Command="{Binding DestinationCommand}" IsEnabled="{Binding DestinationEnabled}"
|
||||
IsVisible="{Binding DestinationVisible}">
|
||||
<TextBlock Text="Choose..." />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Vertical" IsVisible="{Binding OptionsVisible}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<NumericUpDown Increment="1" Minimum="1" Maximum="16384" Value="{Binding SectorsValue}" />
|
||||
<TextBlock Text="How many sectors to convert at once." />
|
||||
</StackPanel>
|
||||
<CheckBox IsChecked="{Binding ForceChecked}">
|
||||
<TextBlock Text="Continue conversion even if sector or media tags will be lost in the process." />
|
||||
</CheckBox>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Who (person) created the image?" /> <TextBox Text="{Binding CreatorText}" />
|
||||
<Button Command="{Binding CreatorCommand}" IsVisible="{Binding CreatorVisible}">
|
||||
<TextBlock Text="Get from source image" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Metadata" />
|
||||
<TabControl>
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<TextBlock Text="Media" />
|
||||
</TabItem.Header>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Title" /> <TextBox Text="{Binding MediaTitleText}" />
|
||||
<Button Command="{Binding MediaTitleCommand}" IsVisible="{Binding MediaTitleVisible}">
|
||||
<TextBlock Text="Get from source image" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Manufacturer" /> <TextBox Text="{Binding MediaManufacturerText}" />
|
||||
<Button Command="{Binding MediaManufacturerCommand}"
|
||||
IsVisible="{Binding MediaManufacturerVisible}">
|
||||
<TextBlock Text="Get from source image" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Model" /> <TextBox Text="{Binding MediaModelText}" />
|
||||
<Button Command="{Binding MediaModelCommand}" IsVisible="{Binding MediaModelVisible}">
|
||||
<TextBlock Text="Get from source image" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Serial number" /> <TextBox Text="{Binding MediaSerialNumberText}" />
|
||||
<Button Command="{Binding MediaSerialNumberCommand}"
|
||||
IsVisible="{Binding MediaSerialNumberVisible}">
|
||||
<TextBlock Text="Get from source image" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Barcode" /> <TextBox Text="{Binding MediaBarcodeText}" />
|
||||
<Button Command="{Binding MediaBarcodeCommand}"
|
||||
IsVisible="{Binding MediaBarcodeVisible}">
|
||||
<TextBlock Text="Get from source image" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Part number" /> <TextBox Text="{Binding MediaPartNumberText}" />
|
||||
<Button Command="{Binding MediaPartNumberCommand}"
|
||||
IsVisible="{Binding MediaPartNumberVisible}">
|
||||
<TextBlock Text="Get from source image" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Number in sequence" />
|
||||
<NumericUpDown Increment="1" Value="{Binding MediaSequenceValue}" Minimum="0" />
|
||||
<Button Command="{Binding MediaSequenceCommand}"
|
||||
IsVisible="{Binding MediaSequenceVisible}">
|
||||
<TextBlock Text="Get from source image" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Last media of the sequence" />
|
||||
<NumericUpDown Increment="1" Value="{Binding LastMediaSequenceValue}" Minimum="0" />
|
||||
<Button Command="{Binding LastMediaSequenceCommand}"
|
||||
IsVisible="{Binding LastMediaSequenceVisible}">
|
||||
<TextBlock Text="Get from source image" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<TextBlock Text="Drive" />
|
||||
</TabItem.Header>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Manufacturer" /> <TextBox Text="{Binding DriveManufacturerText}" />
|
||||
<Button Command="{Binding DriveManufacturerCommand}"
|
||||
IsVisible="{Binding DriveManufacturerVisible}">
|
||||
<TextBlock Text="Get from source image" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Model" /> <TextBox Text="{Binding DriveModelText}" />
|
||||
<Button Command="{Binding DriveModelCommand}" IsVisible="{Binding DriveModelVisible}">
|
||||
<TextBlock Text="Get from source image" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Serial number" /> <TextBox Text="{Binding DriveSerialNumberText}" />
|
||||
<Button Command="{Binding DriveSerialNumberCommand}"
|
||||
IsVisible="{Binding DriveSerialNumberVisible}">
|
||||
<TextBlock Text="Get from source image" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Firmware revision" />
|
||||
<TextBox Text="{Binding DriveFirmwareRevisionText}" />
|
||||
<Button Command="{Binding DriveFirmwareRevisionCommand}"
|
||||
IsVisible="{Binding DriveFirmwareRevisionVisible}">
|
||||
<TextBlock Text="Get from source image" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<TextBlock Text="Comments" />
|
||||
</TabItem.Header>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBox Text="{Binding CommentsText}" />
|
||||
<Button Command="{Binding CommentsCommand}" IsVisible="{Binding CommentsVisible}">
|
||||
<TextBlock Text="Get from source image" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<TextBlock Text="Existing CICM XML sidecar" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding CicmXmlText}" IsReadOnly="True" />
|
||||
<Button Command="{Binding CicmXmlFromImageCommand}" IsVisible="{Binding CicmXmlFromImageVisible}">
|
||||
<TextBlock Text="From image..." />
|
||||
</Button>
|
||||
<Button Command="{Binding CicmXmlCommand}">
|
||||
<TextBlock Text="Choose..." />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<TextBlock Text="Existing resume file" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding ResumeFileText}" IsReadOnly="True" />
|
||||
<Button Command="{Binding ResumeFileFromImageCommand}"
|
||||
IsVisible="{Binding ResumeFileFromImageVisible}">
|
||||
<TextBlock Text="From image..." />
|
||||
</Button>
|
||||
<Button Command="{Binding ResumeFileCommand}">
|
||||
<TextBlock Text="Choose..." />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Vertical" IsVisible="{Binding ProgressVisible}">
|
||||
<StackPanel Orientation="Vertical" IsVisible="{Binding Progress1Visible}">
|
||||
<TextBox Text="{Binding ProgressText}" />
|
||||
<ProgressBar Value="{Binding ProgressValue}" Maximum="{Binding ProgressMaxValue}"
|
||||
IsIndeterminate="{Binding ProgressIndeterminate}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Vertical" IsVisible="{Binding Progress2Visible}">
|
||||
<TextBox Text="{Binding Progress2Text}" />
|
||||
<ProgressBar Value="{Binding Progress2Value}" Maximum="{Binding Progress2MaxValue}"
|
||||
IsIndeterminate="{Binding Progress2Indeterminate}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Command="{Binding StartCommand}" IsVisible="{Binding StartVisible}">
|
||||
<TextBlock Text="Start" />
|
||||
</Button>
|
||||
<Button Command="{Binding CloseCommand}" IsVisible="{Binding CloseVisible}">
|
||||
<TextBlock Text="Close" />
|
||||
</Button>
|
||||
<Button Command="{Binding StopCommand}" IsVisible="{Binding StopVisible}" IsEnabled="{Binding StopEnabled}">
|
||||
<TextBlock Text="Stop" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user