| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- <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:wpf="clr-namespace:InABox.WPF;assembly=InABox.Wpf"
- mc:Ignorable="d"
- Title="{Binding SelectedSection.Key, FallbackValue='Integration Mappings'}" Height="800" Width="1400" WindowStartupLocation="CenterScreen">
- <Window.DataContext>
- <local:AWGMappingWindowViewModel x:Name="ViewModel" />
- </Window.DataContext>
-
- <Window.Resources>
- <local:SectionToVisibilityConverter x:Key="StylesGridVisible" Key="Styles" />
- <local:SectionToVisibilityConverter x:Key="GroupsGridVisible" Key="Groups" />
- <local:SectionToVisibilityConverter x:Key="SuppliersGridVisible" Key="Suppliers" />
- <local:SectionToVisibilityConverter x:Key="DiscountsGridVisible" Key="Discounts" />
- <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" />
- <wpf:EnumerableToVisibilityConverter x:Key="IsNotEmpty"/>
- </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="120"
- 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 StyleMappings}"
- CreateEntity="{Binding CreateStyle}"
- SourceType="{Binding SourceType}"
- OnChanged="BaseDynamicGrid_OnOnChanged"/>
-
- <local:ProductGroupIntegrationGrid
- Grid.Row="0"
- Grid.Column="1"
- Margin="5,0,0,0"
- Visibility="{Binding SelectedSection, Converter={StaticResource GroupsGridVisible}}"
- ItemsSource="{Binding GroupMappings}"
- CreateEntity="{Binding CreateGroup}"
- SourceType="{Binding SourceType}"
- OnChanged="BaseDynamicGrid_OnOnChanged"/>
-
- <local:SupplierIntegrationGrid
- Grid.Row="0"
- Grid.Column="1"
- Margin="5,0,0,0"
- Visibility="{Binding SelectedSection, Converter={StaticResource SuppliersGridVisible}}"
- ItemsSource="{Binding SupplierMappings}"
- CreateEntity="{Binding CreateSupplier}"
- SourceType="{Binding SourceType}"
- OnChanged="BaseDynamicGrid_OnOnChanged"/>
-
- <local:DiscountIntegrationGrid
- Grid.Row="0"
- Grid.Column="1"
- Margin="5,0,0,0"
- Visibility="{Binding SelectedSection, Converter={StaticResource DiscountsGridVisible}}"
- ItemsSource="{Binding DiscountMappings}"
- CreateEntity="{Binding CreateDiscount}"
- AfterCreateEntity="{Binding AfterCreateDiscount}"
- SourceType="{Binding SourceType}"
- OnChanged="BaseDynamicGrid_OnOnChanged"/>
-
- <local:ProfileIntegrationGrid
- Grid.Row="0"
- Grid.Column="1"
- Margin="5,0,0,0"
- Visibility="{Binding SelectedSection, Converter={StaticResource ProfilesGridVisible}}"
- ItemsSource="{Binding ProfileMappings}"
- CreateEntity="{Binding CreateProfile}"
- AfterCreateEntity="{Binding AfterCreateProduct}"
- SourceType="{Binding SourceType}"
- OnChanged="BaseDynamicGrid_OnOnChanged"/>
-
- <local:GasketIntegrationGrid
- Grid.Row="0"
- Grid.Column="1"
- Margin="5,0,0,0"
- Visibility="{Binding SelectedSection, Converter={StaticResource GasketsGridVisible}}"
- ItemsSource="{Binding GasketMappings}"
- CreateEntity="{Binding CreateGasket}"
- AfterCreateEntity="{Binding AfterCreateProduct}"
- SourceType="{Binding SourceType}"
- OnChanged="BaseDynamicGrid_OnOnChanged"/>
-
- <local:ComponentIntegrationGrid
- Grid.Row="0"
- Grid.Column="1"
- Margin="5,0,0,0"
- Visibility="{Binding SelectedSection, Converter={StaticResource ComponentsGridVisible}}"
- ItemsSource="{Binding ComponentMappings}"
- CreateEntity="{Binding CreateComponent}"
- AfterCreateEntity="{Binding AfterCreateProduct}"
- SourceType="{Binding SourceType}"
- OnChanged="BaseDynamicGrid_OnOnChanged"/>
-
- <local:GlassIntegrationGrid
- Grid.Row="0"
- Grid.Column="1"
- Margin="5,0,0,0"
- Visibility="{Binding SelectedSection, Converter={StaticResource GlassGridVisible}}"
- ItemsSource="{Binding GlassMappings}"
- CreateEntity="{Binding CreateGlass}"
- AfterCreateEntity="{Binding AfterCreateProduct}"
- SourceType="{Binding SourceType}"
- OnChanged="BaseDynamicGrid_OnOnChanged"/>
-
- <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}"
- OnChanged="BaseDynamicGrid_OnOnChanged"/>
-
- <DockPanel
- Grid.Row="1"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- LastChildFill="False">
-
- <CheckBox
- DockPanel.Dock="Left"
- VerticalAlignment="Center"
- Margin="5,0,10,0"
- IsChecked="{Binding StylesChecked}"
- Visibility="{Binding Styles, Converter={StaticResource IsNotEmpty}}">Finishes</CheckBox>
-
-
- <CheckBox
- DockPanel.Dock="Left"
- VerticalAlignment="Center"
- Margin="5,0,10,0"
- IsChecked="{Binding GroupsChecked}"
- Visibility="{Binding Groups, Converter={StaticResource IsNotEmpty}}">Groups</CheckBox>
-
- <CheckBox
- DockPanel.Dock="Left"
- VerticalAlignment="Center"
- Margin="5,0,10,0"
- IsChecked="{Binding SuppliersChecked}"
- Visibility="{Binding Suppliers, Converter={StaticResource IsNotEmpty}}">Suppliers</CheckBox>
-
- <CheckBox
- DockPanel.Dock="Left"
- VerticalAlignment="Center"
- Margin="5,0,10,0"
- IsChecked="{Binding DiscountsChecked}"
- Visibility="{Binding Discounts, Converter={StaticResource IsNotEmpty}}">Discounts</CheckBox>
-
- <CheckBox
- DockPanel.Dock="Left"
- VerticalAlignment="Center"
- Margin="5,0,10,0"
- IsChecked="{Binding ProfilesChecked}"
- Visibility="{Binding Profiles, Converter={StaticResource IsNotEmpty}}">Profiles</CheckBox>
-
- <CheckBox
- DockPanel.Dock="Left"
- VerticalAlignment="Center"
- Margin="5,0,10,0"
- IsChecked="{Binding GasketsChecked}"
- Visibility="{Binding Gaskets, Converter={StaticResource IsNotEmpty}}">Gaskets</CheckBox>
-
- <CheckBox
- DockPanel.Dock="Left"
- VerticalAlignment="Center"
- Margin="5,0,10,0"
- IsChecked="{Binding ComponentsChecked}"
- Visibility="{Binding Components, Converter={StaticResource IsNotEmpty}}">Components</CheckBox>
-
- <CheckBox
- DockPanel.Dock="Left"
- VerticalAlignment="Center"
- Margin="5,0,10,0"
- IsChecked="{Binding GlassChecked}"
- Visibility="{Binding Glass, Converter={StaticResource IsNotEmpty}}">Glass</CheckBox>
-
- <CheckBox
- DockPanel.Dock="Left"
- VerticalAlignment="Center"
- Margin="5,0,10,0"
- IsChecked="{Binding LabourChecked}"
- Visibility="{Binding Labour, Converter={StaticResource IsNotEmpty}}">Labour</CheckBox>
-
- <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>
|