Add context menu for analysis
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -59,6 +59,38 @@
|
||||
</ToolBar>
|
||||
</ToolBarTray>
|
||||
<ListBox ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}">
|
||||
<ListBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="Fix version" Command="{Binding AddNewVersionCommand}" ToolTip="Create new version of analysis from selected one">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Height="16" Width="16">
|
||||
<ContentControl ContentTemplate="{StaticResource CopyAnalysis}"/>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Restore version" Command="{Binding ReturnToVersionCommand}" ToolTip="Restore to selected version">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Height="16" Width="16">
|
||||
<ContentControl ContentTemplate="{StaticResource RestoreAndDelete}"/>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Delete version" Command="{Binding DeleteVersionCommand}" ToolTip="Delete selected version">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Height="16" Width="16">
|
||||
<ContentControl ContentTemplate="{StaticResource DeleteAnalysis}"/>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Export version" Command="{Binding ExportToNewCommand}" ToolTip="Export to new analysis">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Height="16" Width="16">
|
||||
<ContentControl ContentTemplate="{StaticResource ExportToNewAnalysis}"/>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</ListBox.ContextMenu>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid MinWidth="375">
|
||||
|
||||
@@ -100,7 +100,12 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ToolBar>
|
||||
<Button Style="{StaticResource ToolButton24}" Command="{Binding CopyCommand}" ToolTip="Copy Analysis">
|
||||
<Button Style="{StaticResource ToolButton24}" Command="{Binding CopyCommand}">
|
||||
<Button.ToolTip>
|
||||
<uc:ButtonToolTipEh HeaderText="Copy Analysis"
|
||||
IconContent="{StaticResource CopyAnalysis}"
|
||||
DescriptionText="Creates copy of selected analysis"/>
|
||||
</Button.ToolTip>
|
||||
<Viewbox Width="24" Height="24">
|
||||
<ContentControl ContentTemplate="{DynamicResource CopyAnalysis}"/>
|
||||
</Viewbox>
|
||||
@@ -115,19 +120,34 @@
|
||||
<ContentControl ContentTemplate="{DynamicResource AnalysisVersions}"/>
|
||||
</Viewbox>
|
||||
</Button>
|
||||
<Button Style="{StaticResource ToolButton24}" Command="{Binding EditCommand}" ToolTip="Edit Analysis">
|
||||
<Button Style="{StaticResource ToolButton24}" Command="{Binding EditCommand}">
|
||||
<Button.ToolTip>
|
||||
<uc:ButtonToolTipEh HeaderText="Edit Analysis"
|
||||
IconContent="{StaticResource EditAnalysis}"
|
||||
DescriptionText="Edit selected analysis"/>
|
||||
</Button.ToolTip>
|
||||
<Viewbox Width="24" Height="24">
|
||||
<ContentControl ContentTemplate="{DynamicResource EditAnalysis}"/>
|
||||
</Viewbox>
|
||||
</Button>
|
||||
<Button Style="{StaticResource ToolButton24}" Command="{Binding DeleteCommand}" ToolTip="Delete Analysis">
|
||||
<Button Style="{StaticResource ToolButton24}" Command="{Binding DeleteCommand}">
|
||||
<Button.ToolTip>
|
||||
<uc:ButtonToolTipEh HeaderText="Delete Analysis"
|
||||
IconContent="{StaticResource DeleteAnalysis }"
|
||||
DescriptionText="Delete selected analysis"/>
|
||||
</Button.ToolTip>
|
||||
<Viewbox Width="24" Height="24">
|
||||
<ContentControl ContentTemplate="{DynamicResource DeleteAnalysis}"/>
|
||||
</Viewbox>
|
||||
</Button>
|
||||
</ToolBar>
|
||||
<ToolBar HorizontalAlignment="Right">
|
||||
<Button Style="{StaticResource ToolButton24}" Command="{Binding RunCommand}" ToolTip="Run Analysis">
|
||||
<Button Style="{StaticResource ToolButton24}" Command="{Binding RunCommand}">
|
||||
<Button.ToolTip>
|
||||
<uc:ButtonToolTipEh HeaderText="Run Analysis"
|
||||
IconContent="{StaticResource RunAnalysis}"
|
||||
DescriptionText="Run selected analysis (not available if nothing selected)"/>
|
||||
</Button.ToolTip>
|
||||
<Viewbox Width="24" Height="24">
|
||||
<ContentControl ContentTemplate="{DynamicResource RunAnalysis}"/>
|
||||
</Viewbox>
|
||||
@@ -136,7 +156,48 @@
|
||||
</ToolBar>
|
||||
<ListBox Grid.Row="1"
|
||||
ItemsSource="{Binding FilteredAnalyses}"
|
||||
SelectedItem="{Binding SelectedAnalysis}" MouseDoubleClick="ListBox_MouseDoubleClick">
|
||||
SelectedItem="{Binding SelectedAnalysis}"
|
||||
MouseDoubleClick="ListBox_MouseDoubleClick">
|
||||
<ListBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="Run" Command="{Binding RunCommand}" ToolTip="Run selected analysis">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Height="16" Width="16">
|
||||
<ContentControl ContentTemplate="{StaticResource RunAnalysis}"/>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator/>
|
||||
<MenuItem Header="Copy" Command="{Binding CopyCommand}" ToolTip="Create copy of analysis">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Height="16" Width="16">
|
||||
<ContentControl ContentTemplate="{StaticResource CopyAnalysis}"/>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Versions" Command="{Binding VersionsCommand}" ToolTip="Shows all versions of analysis">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Height="16" Width="16">
|
||||
<ContentControl ContentTemplate="{StaticResource AnalysisVersions}"/>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Edit" Command="{Binding EditCommand}" ToolTip="Create copy of analysis">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Height="16" Width="16">
|
||||
<ContentControl ContentTemplate="{StaticResource CopyAnalysis}"/>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Delete" Command="{Binding DeleteCommand}" ToolTip="Delete analysis">
|
||||
<MenuItem.Icon>
|
||||
<Viewbox Height="16" Width="16">
|
||||
<ContentControl ContentTemplate="{StaticResource DeleteAnalysis}"/>
|
||||
</Viewbox>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</ListBox.ContextMenu>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance local:CrossSectionViewModel}"
|
||||
Title="StructureHelper" Height="700" Width="1000" MinHeight="400" MinWidth="600">
|
||||
Title="StructureHelper" Height="700" Width="1000" MinHeight="400" MinWidth="600" WindowStartupLocation="CenterScreen">
|
||||
<Window.Resources>
|
||||
<DataTemplate DataType="{x:Type dataContexts:RectangleViewPrimitive}">
|
||||
<dataTemplates:RectangleTemplate/>
|
||||
|
||||
Reference in New Issue
Block a user