mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-14 13:45:07 -05:00
Each open nest gets a tab along the bottom of the window, above the status bar: the shown one is white with a blue line, a dot marks unsaved Auto Nest results, x closes it and + opens another. Inside a tab, Plates and Drawings tabs sit at the top of the left panel (Drawings lists each drawing's nested and required quantity) and the plate header with first/previous/next/last sits over the plate view. Each nest keeps its own plate and zoom when you switch. File > Open takes several files, and a file already open switches to its tab. File > Close and Close All, View > Next/Previous Nest and Ctrl+Tab/Ctrl+Shift+Tab switch or close nests. This version cannot save, so closing a nest with Auto Nest results, or exiting with any, asks first (Cancel is the default). Other nests can be opened and viewed while Auto Nest runs; the nest being nested cannot be closed until it finishes. Several nest paths on the command line open in tabs.
42 lines
2.1 KiB
XML
42 lines
2.1 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:c="using:OpenNest.Avalonia.Controls"
|
|
xmlns:local="using:OpenNest.Avalonia"
|
|
x:Class="OpenNest.Avalonia.NestView">
|
|
<Grid ColumnDefinitions="290,4,*">
|
|
<Border Grid.Column="0" Background="White">
|
|
<TabControl x:Name="SideTabs" Padding="0">
|
|
<TabItem Header="Plates" FontSize="14" MinHeight="34">
|
|
<ListBox x:Name="PlateList" SelectionChanged="OnPlateSelected" />
|
|
</TabItem>
|
|
<TabItem Header="Drawings" FontSize="14" MinHeight="34">
|
|
<DataGrid x:Name="DrawingGrid" x:DataType="local:DrawingRow" IsReadOnly="True"
|
|
FontSize="13" AutoGenerateColumns="False"
|
|
GridLinesVisibility="Horizontal" CanUserSortColumns="True">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="Drawing" Binding="{Binding Name}" Width="*" />
|
|
<DataGridTextColumn Header="Nested" Binding="{Binding Nested}" />
|
|
<DataGridTextColumn Header="Required" Binding="{Binding Required}" />
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</TabItem>
|
|
</TabControl>
|
|
</Border>
|
|
<GridSplitter Grid.Column="1" ResizeDirection="Columns" Background="#D0D4D8" />
|
|
<DockPanel Grid.Column="2">
|
|
<Border DockPanel.Dock="Top" Padding="8,4" Background="White"
|
|
BorderBrush="#D0D4D8" BorderThickness="0,0,0,1">
|
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
|
<Button Content="⏮" ToolTip.Tip="First plate" Click="OnFirstPlate" />
|
|
<Button Content="◀" ToolTip.Tip="Previous plate (Page Up)"
|
|
Click="OnPreviousPlate" />
|
|
<TextBlock x:Name="PlateLabel" VerticalAlignment="Center" FontSize="13" Margin="6,0" />
|
|
<Button Content="▶" ToolTip.Tip="Next plate (Page Down)" Click="OnNextPlate" />
|
|
<Button Content="⏭" ToolTip.Tip="Last plate" Click="OnLastPlate" />
|
|
</StackPanel>
|
|
</Border>
|
|
<c:PlateCanvas x:Name="Canvas" />
|
|
</DockPanel>
|
|
</Grid>
|
|
</UserControl>
|