| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <Window x:Class="PRSDesktop.Integrations.Common.AWGMappingWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PRSDesktop.Integrations.Common"
- xmlns:dynamicGrid="clr-namespace:InABox.DynamicGrid;assembly=InABox.Wpf"
- mc:Ignorable="d"
- Title="{Binding SelectedSection.Key, FallbackValue='Integration Mappings'}" Height="1000" Width="1000" WindowStartupLocation="CenterScreen">
- <Window.DataContext>
- <local:AWGMappingWindowViewModel x:Name="ViewModel" />
- </Window.DataContext>
-
- <Window.Resources>
- <local:SectionToVisibilityConverter x:Key="StylesGridVisible" Key="Finishes" />
- <local:SectionToVisibilityConverter x:Key="ProfilesGridVisible" Key="Profiles" />
- <local:SectionToVisibilityConverter x:Key="GasketsGridVisible" Key="Gaskets" />
- <local:SectionToVisibilityConverter x:Key="ComponentsGridVisible" Key="Components" />
- <local:SectionToVisibilityConverter x:Key="GlassGridVisible" Key="Glass" />
- <local:SectionToVisibilityConverter x:Key="LabourGridVisible" Key="Labour" />
- </Window.Resources>
-
- <Grid Margin="5">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
-
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
-
- <ListView
- Grid.Row="0"
- Grid.Column="0"
- Width="100"
- SelectedItem="{Binding SelectedSection}"
- ItemsSource="{Binding Sections}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- ScrollViewer.VerticalScrollBarVisibility="Auto">
- <ListView.ItemContainerStyle>
- <Style TargetType="ListViewItem">
- <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
- </Style>
- </ListView.ItemContainerStyle>
- <ListView.ItemTemplate>
- <DataTemplate>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="50"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <Image
- Grid.Row="0"
- Source="{Binding Value}"
- VerticalAlignment="Center"
- HorizontalAlignment="Center"
- Margin="2"/>
- <Label
- Grid.Row="1"
- Content="{Binding Key}"
- Margin="5,0,5,5"
- HorizontalAlignment="Center"/>
- </Grid>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
-
- <local:ProductStyleIntegrationGrid
- Grid.Row="0"
- Grid.Column="1"
- Margin="5,0,0,0"
- Visibility="{Binding SelectedSection, Converter={StaticResource StylesGridVisible}}"
- ItemsSource="{Binding FinishMappings}"
- CreateEntity="{Binding CreateStyle}"
- SourceType="{Binding SourceType}"/>
-
- <local:ProductIntegrationGrid
- Grid.Row="0"
- Grid.Column="1"
- Margin="5,0,0,0"
- Visibility="{Binding SelectedSection, Converter={StaticResource ProfilesGridVisible}}"
- ItemsSource="{Binding ProfileMappings}"
- CreateEntity="{Binding CreateProfile}"
- SourceType="{Binding SourceType}"/>
-
- <local:ProductIntegrationGrid
- Grid.Row="0"
- Grid.Column="1"
- Margin="5,0,0,0"
- Visibility="{Binding SelectedSection, Converter={StaticResource GasketsGridVisible}}"
- ItemsSource="{Binding GasketMappings}"
- CreateEntity="{Binding CreateGasket}"
- SourceType="{Binding SourceType}"/>
-
- <local:ProductIntegrationGrid
- Grid.Row="0"
- Grid.Column="1"
- Margin="5,0,0,0"
- Visibility="{Binding SelectedSection, Converter={StaticResource ComponentsGridVisible}}"
- ItemsSource="{Binding ComponentMappings}"
- CreateEntity="{Binding CreateComponent}"
- SourceType="{Binding SourceType}"/>
-
- <local:ProductIntegrationGrid
- Grid.Row="0"
- Grid.Column="1"
- Margin="5,0,0,0"
- Visibility="{Binding SelectedSection, Converter={StaticResource GlassGridVisible}}"
- ItemsSource="{Binding GlassMappings}"
- CreateEntity="{Binding CreateGlass}"
- SourceType="{Binding SourceType}"/>
-
- <local:ActivityIntegrationGrid
- Grid.Row="0"
- Grid.Column="1"
- Margin="5,0,0,0"
- Visibility="{Binding SelectedSection, Converter={StaticResource LabourGridVisible}}"
- ItemsSource="{Binding LabourMappings}"
- CreateEntity="{Binding CreateActivity}"
- SourceType="{Binding SourceType}"/>
-
- <DockPanel
- Grid.Row="1"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- LastChildFill="False">
-
- <Button
- DockPanel.Dock="Right"
- Width="80"
- Height="40"
- Content="Cancel"
- Margin="5,5,0,0"
- Click="CancelClick"/>
-
- <Button
- DockPanel.Dock="Right"
- Width="80"
- Height="40"
- Content="OK"
- Margin="5,5,0,0"
- Click="OKClick"
- IsEnabled="{Binding MappingsComplete}"/>
-
- </DockPanel>
- </Grid>
- </Window>
|