<windows:WindowBase x:Class="MPF.UI.Core.Windows.DiscInformationWindow"
        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:controls="clr-namespace:MPF.UI.Core.UserControls"
        xmlns:core="clr-namespace:MPF.UI.Core"
        xmlns:redump="clr-namespace:SabreTools.RedumpLib.Data;assembly=SabreTools.RedumpLib"
        xmlns:windows="clr-namespace:MPF.UI.Core.Windows"
        mc:Ignorable="d"
        Title="Disc Information" Width="515" WindowStyle="None"
        WindowStartupLocation="CenterOwner" ResizeMode="CanMinimize" SizeToContent="Height"
        BorderBrush="DarkGray" BorderThickness="2">

    <Window.Resources>
        <core:ElementConverter x:Key="ElementConverter" />
    </Window.Resources>
    <WindowChrome.WindowChrome>
        <WindowChrome CaptionHeight="0" ResizeBorderThickness="0" />
    </WindowChrome.WindowChrome>
    
    <Grid>
        <StackPanel Orientation="Vertical" Width="500" MaxHeight="650">
            <Grid Margin="0,10,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="25"/>
                    <ColumnDefinition Width="115"/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="50"/>
                </Grid.ColumnDefinitions>

                <Image Grid.Column="0" Source="/Images/Icon.ico" Height="20" Width="20" Margin="1" />
                <Label Grid.Column="1" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" MouseDown="TitleMouseDown">
                    <Label.Content>
                        <TextBlock TextAlignment="Center"><Bold>Disc Information</Bold></TextBlock>
                    </Label.Content>
                    <Label.ContextMenu>
                        <ContextMenu Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                                     Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
                                     Style="{DynamicResource CustomContextMenuStyle}">
                            <MenuItem Header="Minimize" Click="MinimizeButtonClick" Width="185"
                                      Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                                      Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
                                      BorderBrush="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                                      Template="{DynamicResource CustomMenuItemTemplate}"/>
                            <MenuItem Header="Close" Click="CloseButtonClick" Width="185"
                                      Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                                      Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
                                      BorderBrush="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                                      Template="{DynamicResource CustomMenuItemTemplate}"/>
                        </ContextMenu>
                    </Label.ContextMenu>
                </Label>
                <Grid Grid.Column="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>

                    <Button x:Name="MinimizeButton" Grid.Column="0" BorderThickness="0" Background="Transparent" Style="{DynamicResource CustomButtonStyle}" Click="MinimizeButtonClick">
                        <Path Data="M 0,0 L 10,0" Stroke="{Binding Path=Foreground,RelativeSource={RelativeSource AncestorType={x:Type Button}}}" StrokeThickness="1"/>
                    </Button>
                    <Button x:Name="CloseButton" Grid.Column="1" BorderThickness="0" Background="Transparent" Style="{DynamicResource CustomButtonStyle}" Click="CloseButtonClick">
                        <Path Data="M 0,0 L 12,12 M 0,12 L 12,0" Stroke="{Binding Path=Foreground,RelativeSource={RelativeSource AncestorType={x:Type Button}}}" StrokeThickness="1"/>
                    </Button>
                </Grid>
            </Grid>

            <TabControl Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                        Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
                        Style="{DynamicResource CustomTabControlStyle}">
                <TabItem x:Name="CommonInfo" Header="Common Info" Style="{DynamicResource CustomTabItemStyle}">
                    <ScrollViewer CanContentScroll="False" VerticalScrollBarVisibility="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MaxHeight="500">
                        <StackPanel Orientation="Vertical">
                            <GroupBox Header="Common Disc Information" Margin="5" Padding="5" BorderThickness="1" BorderBrush="LightGray"
                                  HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                <StackPanel Orientation="Vertical">
                                    <controls:UserInput Label="Title"
                                                    Text="{Binding SubmissionInfo.CommonDiscInfo.Title, Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="AlternativeTitleTextBox" Label="Alternative Title"
                                                    Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)AlternativeTitle], Mode=TwoWay}"/>
                                    <controls:UserInput Label="Foreign Title (Non-Latin)" 
                                                    Text="{Binding SubmissionInfo.CommonDiscInfo.ForeignTitleNonLatin, Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="AlternativeForeignTitleTextBox" Label="Alternative Foreign Title"
                                                    Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)AlternativeForeignTitle], Mode=TwoWay}"/>
                                    <controls:UserInput Label="Disc Number / Letter"
                                                    Text="{Binding SubmissionInfo.CommonDiscInfo.DiscNumberLetter, Mode=TwoWay}"/>
                                    <controls:UserInput Label="Disc Title"
                                                    Text="{Binding SubmissionInfo.CommonDiscInfo.DiscTitle, Mode=TwoWay}"/>

                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="0.75*" />
                                            <ColumnDefinition Width="1.25*" />
                                        </Grid.ColumnDefinitions>

                                        <Label x:Name="CategoryLabel" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Content="Category" />
                                        <ComboBox x:Name="CategoryComboBox" Grid.Row="0" Grid.Column="1" Height="22" HorizontalAlignment="Stretch"
                                                  ItemsSource="{Binding Categories}" SelectedItem="{Binding SubmissionInfo.CommonDiscInfo.Category, Converter={StaticResource ElementConverter}, Mode=TwoWay}"
                                                  Style="{DynamicResource CustomComboBoxStyle}" />
                                    </Grid>

                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="0.75*" />
                                            <ColumnDefinition Width="1.25*" />
                                        </Grid.ColumnDefinitions>

                                        <Label x:Name="RegionLabel" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Content="Region" />
                                        <ComboBox x:Name="RegionComboBox" Grid.Row="0" Grid.Column="1" Height="22" HorizontalAlignment="Stretch"
                                                  ItemsSource="{Binding Regions}" SelectedItem="{Binding SubmissionInfo.CommonDiscInfo.Region, Converter={StaticResource ElementConverter}, Mode=TwoWay}"
                                                  Style="{DynamicResource CustomComboBoxStyle}" />
                                    </Grid>

                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="0.75*" />
                                            <ColumnDefinition Width="1.25*" />
                                        </Grid.ColumnDefinitions>

                                        <Label x:Name="LanguagesLabel" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Content="Languages" />
                                        <ComboBox x:Name="LanguagesComboBox" Grid.Row="0" Grid.Column="1" Height="24" HorizontalAlignment="Stretch"
                                                  ItemsSource="{Binding Languages}"
                                          SelectedIndex="0" Style="{DynamicResource CustomComboBoxStyle}">
                                            <ComboBox.ItemTemplate>
                                                <DataTemplate>
                                                    <CheckBox Content="{Binding Name}" IsChecked="{Binding IsChecked}" />
                                                </DataTemplate>
                                            </ComboBox.ItemTemplate>
                                        </ComboBox>
                                    </Grid>

                                    <Grid x:Name="LanguageSelectionGrid" Visibility="Collapsed">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="0.75*" />
                                            <ColumnDefinition Width="1.25*" />
                                        </Grid.ColumnDefinitions>

                                        <Label x:Name="LanguageSelectionLabel" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Content="Language Selection Via" />
                                        <ComboBox x:Name="LanguageSelectionComboBox" Grid.Row="0" Grid.Column="1" Height="24" HorizontalAlignment="Stretch"
                                                  ItemsSource="{Binding LanguageSelections}"
                                          SelectedIndex="0" Style="{DynamicResource CustomComboBoxStyle}">
                                            <ComboBox.ItemTemplate>
                                                <DataTemplate>
                                                    <CheckBox Content="{Binding Name}" IsChecked="{Binding IsChecked}" />
                                                </DataTemplate>
                                            </ComboBox.ItemTemplate>
                                        </ComboBox>
                                    </Grid>

                                    <controls:UserInput Label="Serial" Text="{Binding SubmissionInfo.CommonDiscInfo.Serial, Mode=TwoWay}"/>
                                    <controls:UserInput Label="Barcode" Text="{Binding SubmissionInfo.CommonDiscInfo.Barcode, Mode=TwoWay}"/>
                                </StackPanel>
                            </GroupBox>

                            <GroupBox Header="Version and Editions" Margin="5" Padding="5" BorderThickness="1" BorderBrush="LightGray"
                                  HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                <StackPanel Orientation="Vertical">
                                    <controls:UserInput Label="Version" Text="{Binding SubmissionInfo.VersionAndEditions.Version, Mode=TwoWay}"/>
                                    <controls:UserInput Label="Edition" Text="{Binding SubmissionInfo.VersionAndEditions.OtherEditions, Mode=TwoWay}"/>
                                </StackPanel>
                            </GroupBox>
                        </StackPanel>
                    </ScrollViewer>
                </TabItem>

                <TabItem Header="Additional Info" Style="{DynamicResource CustomTabItemStyle}">
                    <ScrollViewer CanContentScroll="False" VerticalScrollBarVisibility="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MaxHeight="500">
                        <StackPanel Orientation="Vertical">
                            <GroupBox Header="Extras" Margin="5" Padding="5" BorderThickness="1" BorderBrush="LightGray"
                                      HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                <StackPanel Orientation="Vertical">
                                    <controls:UserInput x:Name="CommentsTextBox" Label="Comments"
                                                        Text="{Binding SubmissionInfo.CommonDiscInfo.Comments, Mode=TwoWay}" TextHeight="50"
                                                        Enter="True" TextWrapping="Wrap" VerticalContentAlignmentValue="Top" />
                                    <controls:UserInput x:Name="GenreTextBox" Label="Genre"
                                                    Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)Genre], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="ProtectionTextBox" Label="Protection" ToolTip="CAUTION: Only edit if you know what you are doing!"
                                                        Text="{Binding SubmissionInfo.CopyProtection.Protection, Mode=TwoWay}" TextHeight="75" TextWrapping="Wrap"
                                                        VerticalContentAlignmentValue="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="0.75*" />
                                            <ColumnDefinition Width="1.25*" />
                                        </Grid.ColumnDefinitions>

                                        <Label/>
                                        <CheckBox Grid.Column="1" x:Name="PostgapTypeCheckBox" Content="Postgap type (Form 2)" Margin="0,4"
                                                  IsChecked="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)PostgapType], Mode=TwoWay}"/>
                                    </Grid>
                                    <controls:UserInput x:Name="SeriesTextBox" Label="Series"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)Series], Mode=TwoWay}"/>
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="0.75*" />
                                            <ColumnDefinition Width="1.25*" />
                                        </Grid.ColumnDefinitions>

                                        <Label/>
                                        <CheckBox Grid.Column="1" x:Name="VCDCheckBox" Content="V-CD" Margin="0,4"
                                                  IsChecked="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)VCD], Mode=TwoWay}"/>
                                    </Grid>
                                </StackPanel>
                            </GroupBox>

                            <GroupBox Header="Physical Identifiers" Margin="5" Padding="5" BorderThickness="1" BorderBrush="LightGray"
                                      HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                <StackPanel Orientation="Vertical">
                                    <controls:UserInput x:Name="BBFCRegistrationNumberTextBox" Label="BBFC Reg. No."
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)BBFCRegistrationNumber], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="DiscHologramIDTextBox" Label="Disc Hologram ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)DiscHologramID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="DNASDiscIDTextBox" Label="DNAS Disc ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)DNASDiscID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="ISBNTextBox" Label="ISBN"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)ISBN], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="ISSNTextBox" Label="ISSN"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)ISSN], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="PPNTextBox" Label="PPN"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)PPN], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="VFCCodeTextBox" Label="VFC code"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)VFCCode], Mode=TwoWay}"/>
                                </StackPanel>
                            </GroupBox>

                            <GroupBox Header="Publisher Identifiers" Margin="5" Padding="5" BorderThickness="1" BorderBrush="LightGray"
                                              HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                <StackPanel Orientation="Vertical">
                                    <controls:UserInput x:Name="AcclaimIDTextBox" Label="Acclaim ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)AcclaimID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="ActivisionIDTextBox" Label="Activision ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)ActivisionID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="BandaiIDTextBox" Label="Bandai ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)BandaiID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="CDProjektIDTextBox" Label="CD Projekt ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)CDProjektID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="ElectronicArtsIDTextBox" Label="Electronic Arts ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)ElectronicArtsID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="FoxInteractiveIDTextBox" Label="Fox Interactive ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)FoxInteractiveID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="GTInteractiveIDTextBox" Label="GT Interactive ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)GTInteractiveID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="JASRACIDTextBox" Label="JASRAC ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)JASRACID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="KingRecordsIDTextBox" Label="King Records ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)KingRecordsID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="KoeiIDTextBox" Label="Koei ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)KoeiID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="KonamiIDTextBox" Label="Konami ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)KonamiID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="LucasArtsIDTextBox" Label="LucasArts ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)LucasArtsID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="MicrosoftIDTextBox" Label="Microsoft ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)MicrosoftID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="NaganoIDTextBox" Label="Nagano ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)NaganoID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="NamcoIDTextBox" Label="Namco ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)NamcoID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="NipponIchiSoftwareIDTextBox" Label="Nippon Ichi Software ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)NipponIchiSoftwareID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="OriginIDTextBox" Label="Origin ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)OriginID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="PonyCanyonIDTextBox" Label="Pony Canyon ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)PonyCanyonID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="SegaIDTextBox" Label="Sega ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)SegaID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="SelenIDTextBox" Label="Selen ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)SelenID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="SierraIDTextBox" Label="Sierra ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)SierraID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="TaitoIDTextBox" Label="Taito ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)TaitoID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="UbisoftIDTextBox" Label="Ubisoft ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)UbisoftID], Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="ValveIDTextBox" Label="Valve ID"
                                                        Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)ValveID], Mode=TwoWay}"/>
                                </StackPanel>
                            </GroupBox>
                        </StackPanel>
                    </ScrollViewer>
                </TabItem>

                <TabItem Header="Contents" Style="{DynamicResource CustomTabItemStyle}">
                    <ScrollViewer CanContentScroll="False" VerticalScrollBarVisibility="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MaxHeight="500">
                        <StackPanel Orientation="Vertical">
                            <controls:UserInput x:Name="GeneralContent" Label="General"
                                                Text="{Binding SubmissionInfo.CommonDiscInfo.Contents, Mode=TwoWay}" TextHeight="50"
                                                Enter="True" TextWrapping="Wrap" VerticalContentAlignmentValue="Top"/>
                            
                            <!-- Games -->
                            <controls:UserInput x:Name="GamesTextBox" Label="Games" TextHeight="50"
                                                Enter="True" TextWrapping="Wrap" VerticalContentAlignmentValue="Top"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.ContentsSpecialFields[(redump:SiteCode)Games], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="NetYarozeGamesTextBox" Label="Net Yaroze Games" TextHeight="50"
                                                Enter="True" TextWrapping="Wrap" VerticalContentAlignmentValue="Top"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.ContentsSpecialFields[(redump:SiteCode)NetYarozeGames], Mode=TwoWay}"/>
                            
                            <!-- Demos -->
                            <controls:UserInput x:Name="PlayableDemosTextBox" Label="Playable Demos" TextHeight="50"
                                                Enter="True" TextWrapping="Wrap" VerticalContentAlignmentValue="Top"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.ContentsSpecialFields[(redump:SiteCode)PlayableDemos], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="RollingDemosTextBox" Label="Rolling Demos" TextHeight="50"
                                                Enter="True" TextWrapping="Wrap" VerticalContentAlignmentValue="Top"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.ContentsSpecialFields[(redump:SiteCode)RollingDemos], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="TechDemosTextBox" Label="Tech Demos" TextHeight="50"
                                                Enter="True" TextWrapping="Wrap" VerticalContentAlignmentValue="Top"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.ContentsSpecialFields[(redump:SiteCode)TechDemos], Mode=TwoWay}"/>

                            <!-- Video -->
                            <controls:UserInput x:Name="GameFootageTextBox" Label="Game Footage" TextHeight="50"
                                                Enter="True" TextWrapping="Wrap" VerticalContentAlignmentValue="Top"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.ContentsSpecialFields[(redump:SiteCode)GameFootage], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="VideosTextBox" Label="Videos" TextHeight="50"
                                                Enter="True" TextWrapping="Wrap" VerticalContentAlignmentValue="Top"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.ContentsSpecialFields[(redump:SiteCode)Videos], Mode=TwoWay}"/>

                            <!-- Miscellaneous -->
                            <controls:UserInput x:Name="PatchesTextBox" Label="Patches" TextHeight="50"
                                                Enter="True" TextWrapping="Wrap" VerticalContentAlignmentValue="Top"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.ContentsSpecialFields[(redump:SiteCode)Patches], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="SavegamesTextBox" Label="Savegames" TextHeight="50"
                                                Enter="True" TextWrapping="Wrap" VerticalContentAlignmentValue="Top"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.ContentsSpecialFields[(redump:SiteCode)Savegames], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="ExtrasTextBox" Label="Extras" TextHeight="50"
                                                Enter="True" TextWrapping="Wrap" VerticalContentAlignmentValue="Top"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.ContentsSpecialFields[(redump:SiteCode)Extras], Mode=TwoWay}"/>
                        </StackPanel>
                    </ScrollViewer>
                </TabItem>

                <TabItem Header="Ringcodes" Style="{DynamicResource CustomTabItemStyle}">
                    <ScrollViewer CanContentScroll="False" VerticalScrollBarVisibility="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MaxHeight="500">
                        <StackPanel Orientation="Vertical">
                            <GroupBox x:Name="L0Info" Header="Data/L0 Info" Margin="5" Padding="5" BorderThickness="1" BorderBrush="LightGray"
                                      HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                <StackPanel Orientation="Vertical">
                                    <controls:UserInput x:Name="L0MasteringRing" Label="Data/L0 Mastering Ring"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer0MasteringRing, Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="L0MasteringSID" Label="Data/L0 Mastering SID"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer0MasteringSID, Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="L0Toolstamp" Label="Data/L0 Toolstamp/Mastering Code"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer0ToolstampMasteringCode, Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="L0MouldSID" Label="Data/L0 Mould SID"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer0MouldSID, Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="L0AdditionalMould" Label="Data/L0 Additional Mould"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer0AdditionalMould, Mode=TwoWay}"/>
                                </StackPanel>
                            </GroupBox>

                            <GroupBox x:Name="L1Info" Header="Label/L1 Info" Margin="5" Padding="5" BorderThickness="1" BorderBrush="LightGray"
                                      HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                <StackPanel Orientation="Vertical">
                                    <controls:UserInput x:Name="L1MasteringRing" Label="Label/L1 Mastering Ring"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer1MasteringRing, Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="L1MasteringSID" Label="Label/L1 Mastering SID"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer1MasteringSID, Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="L1Toolstamp" Label="Label/L1 Toolstamp/Mastering Code"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer1ToolstampMasteringCode, Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="L1MouldSID" Label="Label/L1 Mould SID"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer1MouldSID, Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="L1AdditionalMould" Label="Label/L1 Additional Mould"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer1AdditionalMould, Mode=TwoWay}"/>
                                </StackPanel>
                            </GroupBox>

                            <GroupBox x:Name="L2Info" Header="L2 Info" Visibility="Collapsed" Margin="5" Padding="5" BorderThickness="1" BorderBrush="LightGray"
                                      HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                <StackPanel Orientation="Vertical">
                                    <controls:UserInput x:Name="L2MasteringRing" Label="L2 Mastering Ring"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer2MasteringRing, Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="L2MasteringSID" Label="L2 Mastering SID"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer2MasteringSID, Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="L2Toolstamp" Label="L2 Toolstamp/Mastering Code"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer2ToolstampMasteringCode, Mode=TwoWay}"/>
                                </StackPanel>
                            </GroupBox>

                            <GroupBox x:Name="L3Info" Header="L3 Info" Visibility="Collapsed" Margin="5" Padding="5" BorderThickness="1" BorderBrush="LightGray"
                                      HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                <StackPanel Orientation="Vertical">
                                    <controls:UserInput x:Name="L3MasteringRing" Label="L3 Mastering Ring"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer3MasteringRing, Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="L3MasteringSID" Label="L3 Mastering SID"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer3MasteringSID, Mode=TwoWay}"/>
                                    <controls:UserInput x:Name="L3Toolstamp" Label="L3 Toolstamp/Mastering Code"
                                            Text="{Binding SubmissionInfo.CommonDiscInfo.Layer3ToolstampMasteringCode, Mode=TwoWay}"/>
                                </StackPanel>
                            </GroupBox>
                        </StackPanel>
                    </ScrollViewer>
                </TabItem>

                <TabItem Header="Read-Only Info" Style="{DynamicResource CustomTabItemStyle}">
                    <ScrollViewer CanContentScroll="False" VerticalScrollBarVisibility="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MaxHeight="500">
                        <StackPanel Orientation="Vertical">
                            <controls:UserInput x:Name="FullyMatchedID" Label="Fully Matched ID" IsReadOnly="True"
                                                Text="{Binding SubmissionInfo.FullyMatchedID, Mode=TwoWay}"/>
                            <controls:UserInput x:Name="PartiallyMatchedIDs" Label="Partially Matched ID(s)" IsReadOnly="True"/>
                            <controls:UserInput x:Name="AntiModchip" Label="Anti-Modchip" IsReadOnly="True"
                                                Text="{Binding SubmissionInfo.CopyProtection.AntiModchip, Mode=TwoWay}"/>
                            <controls:UserInput x:Name="DiscOffset" Label="Disc Offset" IsReadOnly="True"
                                                Text="{Binding SubmissionInfo.TracksAndWriteOffsets.OtherWriteOffsets, Mode=TwoWay}"/>
                            <controls:UserInput x:Name="DMIHash" Label="DMI Hash" IsReadOnly="True"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)DMIHash], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="EDC" Label="EDC" IsReadOnly="True"
                                                Text="{Binding SubmissionInfo.EDC.EDC, Mode=TwoWay}"/>
                            <controls:UserInput x:Name="ErrorsCount" Label="Error(s) Count" IsReadOnly="True"
                                                Text="{Binding SubmissionInfo.CommonDiscInfo.ErrorsCount, Mode=TwoWay}"/>
                            <controls:UserInput x:Name="EXEDateBuildDate" Label="EXE/Build Date" IsReadOnly="True"
                                                Text="{Binding SubmissionInfo.CommonDiscInfo.EXEDateBuildDate, Mode=TwoWay}"/>
                            <controls:UserInput x:Name="Filename" Label="Filename" IsReadOnly="True"
                                                TextHeight="75" TextWrapping="NoWrap"
                                                VerticalContentAlignmentValue="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)Filename], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="Header" Label="Header" IsReadOnly="True"
                                                Text="{Binding SubmissionInfo.Extras.Header, Mode=TwoWay}" TextHeight="75" TextWrapping="NoWrap"
                                                VerticalContentAlignmentValue="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
                            <controls:UserInput x:Name="InternalName" Label="Internal Names" IsReadOnly="True"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)InternalName], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="InternalSerialName" Label="Internal Serial" IsReadOnly="True"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)InternalSerialName], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="Multisession" Label="Multisession" IsReadOnly="True" TextHeight="75" TextWrapping="NoWrap"
                                                VerticalContentAlignmentValue="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)Multisession], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="LibCrypt" Label="LibCrypt" IsReadOnly="True"
                                                Text="{Binding SubmissionInfo.CopyProtection.LibCrypt, Mode=TwoWay}"/>
                            <controls:UserInput x:Name="LibCryptData" Label="LibCrypt Data" IsReadOnly="True"
                                                Text="{Binding SubmissionInfo.CopyProtection.LibCryptData, Mode=TwoWay}" TextHeight="75" TextWrapping="NoWrap"
                                                VerticalContentAlignmentValue="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
                            <controls:UserInput x:Name="PFIHash" Label="PFI Hash" IsReadOnly="True"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)PFIHash], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="PIC" Label="PIC" IsReadOnly="True"
                                                Text="{Binding SubmissionInfo.Extras.PIC, Mode=TwoWay}" TextHeight="75" TextWrapping="NoWrap"
                                                VerticalContentAlignmentValue="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
                            <controls:UserInput x:Name="PVD" Label="PVD" IsReadOnly="True"
                                                Text="{Binding SubmissionInfo.Extras.PVD, Mode=TwoWay}" TextHeight="75" TextWrapping="NoWrap"
                                                VerticalContentAlignmentValue="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
                            <controls:UserInput x:Name="RingNonZeroDataStart" Label="Ring Non-Zero Data Start" IsReadOnly="True"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)RingNonZeroDataStart], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="SecuROMData" Label="SecuROM Data" IsReadOnly="True"
                                                Text="{Binding SubmissionInfo.CopyProtection.SecuROMData, Mode=TwoWay}" TextHeight="75" TextWrapping="NoWrap"
                                                VerticalContentAlignmentValue="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
                            <controls:UserInput x:Name="SSHash" Label="Security Sector Hash" IsReadOnly="True"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)SSHash], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="SecuritySectorRanges" Label="Security Sector Ranges" IsReadOnly="True"
                                                Text="{Binding SubmissionInfo.Extras.SecuritySectorRanges, Mode=TwoWay}" TextHeight="75" TextWrapping="NoWrap"
                                                VerticalContentAlignmentValue="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
                            <controls:UserInput x:Name="SSVersion" Label="Security Sector Version" IsReadOnly="True"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)SSVersion], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="UniversalHash" Label="Universal Hash (SHA-1)" IsReadOnly="True"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)UniversalHash], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="VolumeLabel" Label="Volume Label" IsReadOnly="True"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)VolumeLabel], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="XeMID" Label="XeMID" IsReadOnly="True"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)XeMID], Mode=TwoWay}"/>
                            <controls:UserInput x:Name="XMID" Label="XMID" IsReadOnly="True"
                                                Text="{Binding Path=SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[(redump:SiteCode)XMID], Mode=TwoWay}"/>

                            <!-- TODO: Add track/checksum data once there's a reasonable way to do so -->
                        </StackPanel>
                    </ScrollViewer>
                </TabItem>
            </TabControl>

            <!-- Accept / Cancel -->
            <GroupBox Margin="5,5,5,5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                <UniformGrid Columns="3" Margin="5,5,5,5" Height="28">
                    <Button Name="AcceptButton" Height="25" Width="80" Content="Accept"
                            Style="{DynamicResource CustomButtonStyle}" />
                    <Button Name="CancelButton" Height="25" Width="80" Content="Cancel"
                            Style="{DynamicResource CustomButtonStyle}" />
                    <Button Name="RingCodeGuideButton" Grid.Column="2" Height="25" Width="120" Content="Ring Code Guide"
                            Style="{DynamicResource CustomButtonStyle}" />
                </UniformGrid>
            </GroupBox>
        </StackPanel>
    </Grid>
</windows:WindowBase>
