Files
StructureHelper/StructureHelper/Windows/MainWindow/Analyses/VersionsView.xaml
Evgeny Redikultsev 346378222c Add work with versions
2024-12-01 17:32:17 +05:00

81 lines
4.6 KiB
XML

<Window x:Class="StructureHelper.Windows.MainWindow.Analyses.VersionsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:StructureHelper.Windows.MainWindow.Analyses"
xmlns:uc="clr-namespace:StructureHelper.Windows.UserControls"
d:DataContext="{d:DesignInstance local:VersionsViewModel}"
mc:Ignorable="d"
Title="Version Viewer" Height="250" Width="400" MinHeight="250" MinWidth="400" MaxHeight="800" MaxWidth="1000" WindowStartupLocation="CenterScreen">
<Grid>
<DockPanel>
<ToolBarTray DockPanel.Dock="Top">
<ToolBar>
<Button Style="{StaticResource ToolButton}"
Command="{Binding AddNewVersionCommand}">
<Button.ToolTip>
<uc:ButtonToolTipEh HeaderText="Fix current version"
IconContent="{StaticResource CopyAnalysis}"
DescriptionText="Create new version of analysis from selected one"/>
</Button.ToolTip>
<Viewbox>
<ContentControl ContentTemplate="{DynamicResource CopyAnalysis}"/>
</Viewbox>
</Button>
<Button Style="{StaticResource ToolButton}"
Command="{Binding ReturnToVersionCommand}">
<Button.ToolTip>
<uc:ButtonToolTipEh HeaderText="Restore to selected version"
IconContent="{StaticResource RestoreAndDelete}"
DescriptionText="Removes all versions which are younger than selected one"/>
</Button.ToolTip>
<Viewbox>
<ContentControl ContentTemplate="{DynamicResource RestoreAndDelete}"/>
</Viewbox>
</Button>
<Button Style="{StaticResource ToolButton}"
Command="{Binding DeleteVersionCommand}">
<Button.ToolTip>
<uc:ButtonToolTipEh HeaderText="Delete selected version"
IconContent="{StaticResource DeleteAnalysis}"
DescriptionText="Deletes selected version (not available for unique version)"/>
</Button.ToolTip>
<Viewbox>
<ContentControl ContentTemplate="{DynamicResource DeleteAnalysis}"/>
</Viewbox>
</Button>
<Button Style="{StaticResource ToolButton}"
Command="{Binding ExportToNewCommand}">
<Button.ToolTip>
<uc:ButtonToolTipEh HeaderText="Export to new analysis"
IconContent="{StaticResource ExportToNewAnalysis}"
DescriptionText="Exports selected version to new analysis"/>
</Button.ToolTip>
<Viewbox>
<ContentControl ContentTemplate="{DynamicResource ExportToNewAnalysis}"/>
</Viewbox>
</Button>
</ToolBar>
</ToolBarTray>
<ListBox ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid MinWidth="375">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="20"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="1" Text="{Binding DateTime}"/>
<TextBox Grid.Column="3" Text="{Binding Comment}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>
</Grid>
</Window>