<UserControl x:Class="Little_System_Cleaner.Disk_Cleaner.Controls.Start"
             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:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
             mc:Ignorable="d" 
             MinWidth="579" MinHeight="384"
             DataContext="{Binding RelativeSource={RelativeSource Self}}" d:DesignWidth="300" 
             Loaded="UserControl_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition/>
            <RowDefinition Height="47"/>
        </Grid.RowDefinitions>
        <Border CornerRadius="5" Margin="0,0,0,0" Grid.Row="0">
            <Border.Effect>
                <DropShadowEffect Color="#FF474747" />
            </Border.Effect>
            <Border.Background>
                <RadialGradientBrush>
                    <GradientStop Color="White" Offset="0"/>
                    <GradientStop Color="Gray" Offset="1"/>
                </RadialGradientBrush>
            </Border.Background>
            <Grid>
                <Label FontSize="14" Content="Disk Cleaner" Margin="8,0" Foreground="White" Height="28" HorizontalAlignment="Left" />
                <Label FontSize="14" Foreground="White" HorizontalAlignment="Right" Width="78">Step 1 of 3</Label>
            </Grid>
        </Border>
        <TabControl Margin="0,10,0,0" Grid.Row="1">
            <TabItem Header="Drives">
                <ListView x:Name="listViewDrives" Margin="5,5,5,5" IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding DrivesCollection}">
                    <ListView.View>
                        <GridView AllowsColumnReorder="False">
                            <GridViewColumn Header="Drive" Width="60">
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <WrapPanel>
                                            <CheckBox IsChecked="{Binding Checked}" Margin="0,0,5,0" />
                                            <TextBlock Text="{Binding Drive}" />
                                        </WrapPanel>
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>
                            <GridViewColumn Header="Drive Format" DisplayMemberBinding="{Binding DriveFormat}" Width="100" />
                            <GridViewColumn Header="Capacity" DisplayMemberBinding="{Binding DriveCapacity}" Width="100" />
                            <GridViewColumn Header="Free Space" DisplayMemberBinding="{Binding DriveFreeSpace}" Width="100" />
                        </GridView>
                    </ListView.View>

                </ListView>
            </TabItem>
            <TabItem Header="Removal">
                <StackPanel>
                    <GroupBox Header="Select the mode of removing files from the disk">
                        <StackPanel>
                            <RadioButton x:Name="radioButtonRemove" Content="Remove the junk files from the hard drive (recommended)" Margin="5,5,5,5" IsChecked="{Binding JunkFilesDelete}" />
                            <RadioButton x:Name="radioButtonRecycle" Content="Send junk files to the recycle bin" Margin="5,5,5,5" IsChecked="{Binding JunkFilesRecycle}" />
                            <RadioButton x:Name="radioButtonMove" Content="Move files to the specified folder:" Margin="5,5,5,5" IsChecked="{Binding JunkFilesMove}" />
                            <Grid Margin="5,5,5,5">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="35"/>
                                </Grid.ColumnDefinitions>
                                <TextBox x:Name="textBoxMoveFolder" Grid.Column="0" Margin="0,0,5,0" IsReadOnly="True" Text="{Binding MoveFolder}" />
                                <Button x:Name="buttonSelectMoveFolder" Grid.Column="1" Content="..." Click="buttonSelectMoveFolder_Click" />
                            </Grid>
                        </StackPanel>
                    </GroupBox>
                </StackPanel>
            </TabItem>
            <TabItem Header="Searching">
                <StackPanel>
                    <GroupBox Header="Search Options">
                        <StackPanel>
                            <CheckBox x:Name="checkBoxWriteProtected" Content="Ignore write protected and files in use (recommended)" Margin="5,5,5,5" IsChecked="{Binding IgnoreWriteProtectedFiles}" />
                            <CheckBox x:Name="checkBoxZeroLength" Content="Assume zero length files are junk (slower)" Margin="5,5,5,5" IsChecked="{Binding ZeroLengthFilesAreJunk}" />
                        </StackPanel>
                    </GroupBox>
                    <GroupBox Header="Search Filters">
                        <StackPanel>
                            <TextBox x:Name="textBoxSearchFilters" Margin="5,5,5,5" Text="{Binding SearchFilter}" />
                            <StackPanel Orientation="Horizontal" Margin="5,5,5,5">
                                <Label Content="Mode:"  VerticalAlignment="Center" />
                                <RadioButton x:Name="radioButtonFilterSafe" Content="Safe" VerticalAlignment="Center" Margin="5,0,5,0" IsChecked="{Binding SearchFilterSafe}" />
                                <RadioButton x:Name="radioButtonFilterMed" Content="Medium" VerticalAlignment="Center" Margin="5,0,5,0" IsChecked="{Binding SearchFilterMedium}" />
                                <RadioButton x:Name="radioButtonFilterAgg" Content="Aggressive" VerticalAlignment="Center" Margin="5,0,5,0" IsChecked="{Binding SearchFilterAggressive}" />
                            </StackPanel>
                        </StackPanel>
                    </GroupBox>
                    <GroupBox Header="Power Users">
                        <CheckBox x:Name="checkBoxAutoClean" Content="Automatically remove files after scanning (not recommended)" Margin="5,5,5,5" IsChecked="{Binding AutoRemoveFiles}" />
                    </GroupBox>
                </StackPanel>
            </TabItem>
            <TabItem Header="Advanced">
                <StackPanel>
                    <GroupBox Header="Attributes">
                        <StackPanel Orientation="Horizontal" Margin="5,5,0,5">
                            <CheckBox x:Name="checkBoxHidden" Content="Hidden" Margin="0,0,5,0" IsChecked="{Binding AttributesHidden}" />
                            <CheckBox x:Name="checkBoxReadOnly" Content="Read Only" Margin="0,0,5,0" IsChecked="{Binding AttributesReadonly}" />
                            <CheckBox x:Name="checkBoxArchive" Content="Archive" Margin="0,0,5,0" IsChecked="{Binding AttributesArchive}" />
                            <CheckBox x:Name="checkBoxSystem" Content="System" Margin="0,0,5,0" IsChecked="{Binding AttributesSystem}" />
                        </StackPanel>
                    </GroupBox>
                    <GroupBox Header="Find Files">
                        <StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="5,5,0,5">
                                <RadioButton x:Name="radioButtonFindCreated" Content="Created" Margin="0,0,5,0" IsChecked="{Binding FindFilesCreated}" />
                                <RadioButton x:Name="radioButtonFindModified" Content="Modified" Margin="0,0,5,0" IsChecked="{Binding FindFilesModified}" />
                                <RadioButton x:Name="radioButtonFindAccessed" Content="Accessed" Margin="0,0,5,0" IsChecked="{Binding FindFilesAccessed}" />
                            </StackPanel>
                            <DockPanel>
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" DockPanel.Dock="Left" Margin="5,5,0,5">
                                    <CheckBox x:Name="checkBoxFindAfter" Content="After:" Margin="0,0,5,0" VerticalAlignment="Center" IsChecked="{Binding FindFilesAfter}" />
                                    <xctk:DateTimeUpDown x:Name="dateTimePickerAfter" Format="ShortDate" Margin="0,0,5,0" Value="{Binding FindFilesAfterDateTime}" />
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" DockPanel.Dock="Right" Margin="5,5,0,5">
                                    <CheckBox x:Name="checkBoxFindBefore" Content="Before:" Margin="0,0,5,0" VerticalAlignment="Center" IsChecked="{Binding FindFilesBefore}" />
                                    <xctk:DateTimeUpDown x:Name="dateTimePickerBefore" Format="ShortDate" Margin="0,0,5,0" Value="{Binding FindFilesBeforeDateTime}" />
                                </StackPanel>
                            </DockPanel>

                        </StackPanel>
                    </GroupBox>
                    <GroupBox Header="Size">
                        <DockPanel LastChildFill="True">
                            <StackPanel Orientation="Horizontal" DockPanel.Dock="Left" Margin="5,5,0,5">
                                <CheckBox x:Name="checkBoxSize" Content="Size:" VerticalAlignment="Center" Margin="0,0,1,0" IsChecked="{Binding FindFilesBySize}" />
                                <Label Content="At least:" Margin="0,0,5,0" />
                                <xctk:IntegerUpDown x:Name="numericUpDownSizeAtLeast" Margin="0,0,2,0" DefaultValue="0" Width="39" Value="{Binding FindFilesBySizeAtLeast}" />
                                <Label Content="KB" Margin="0,0,5,0" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="5,5,0,5">
                                <Label Content="At most:" Margin="0,0,5,0" />
                                <xctk:IntegerUpDown x:Name="numericUpDownSizeAtMost" Margin="0,0,2,0" DefaultValue="0" Width="39" Value="{Binding FindFilesBySizeAtMost}" />
                                <Label Content="KB" Margin="0,0,5,0" />
                            </StackPanel>
                        </DockPanel>
                    </GroupBox>
                </StackPanel>
            </TabItem>
            <TabItem Header="Included Folders">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="36" />
                    </Grid.RowDefinitions>
                    <ListView x:Name="listViewIncFolders" ItemsSource="{Binding IncFoldersCollection}" Grid.Row="0" Margin="5,5,5,0" SelectionMode="Single">
                        <ListView.View>
                            <GridView AllowsColumnReorder="False">
                                <GridViewColumn Header="List of folders to include" DisplayMemberBinding="{Binding Folder}" Width="240" />
                            </GridView>
                        </ListView.View>
                    </ListView>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"  Margin="5,5,5,5" Grid.Row="1">
                        <Button x:Name="buttonAddIncFolder" Margin="0,0,5,0" Height="26" Padding="8,0,8,0" Click="buttonAddIncFolder_Click">
                            <StackPanel Orientation="Horizontal">
                                <Image Width="16" Height="16" Margin="0,0,5,0" Source="/Little_System_Cleaner;component/Resources/startup manager/add.png" />
                                <TextBlock VerticalAlignment="Center">Add...</TextBlock>
                            </StackPanel>
                        </Button>
                        <Button x:Name="buttonRemIncFolder" Height="26" Padding="8,0,8,0" Click="buttonRemIncFolder_Click">
                            <StackPanel Orientation="Horizontal">
                                <Image Width="16" Height="16" Margin="0,0,5,0" Source="/Little_System_Cleaner;component/Resources/startup manager/delete.png" />
                                <TextBlock VerticalAlignment="Center">Remove</TextBlock>
                            </StackPanel>
                        </Button>
                    </StackPanel>
                </Grid>
            </TabItem>
            <TabItem Header="Excluded Folders">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="36" />
                    </Grid.RowDefinitions>
                    <ListView x:Name="listViewExcludeFolders" ItemsSource="{Binding ExcFoldersCollection}" Grid.Row="0" Margin="5,5,5,0" SelectionMode="Single">
                        <ListView.View>
                            <GridView AllowsColumnReorder="False">
                                <GridViewColumn Header="List of folders to exclude" DisplayMemberBinding="{Binding Folder}" Width="240" />
                            </GridView>
                        </ListView.View>
                    </ListView>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"  Margin="5,5,5,5" Grid.Row="1">
                        <Button x:Name="buttonAddExcludeFolder" Margin="0,0,5,0" Padding="8,0,8,0" Height="26" Click="buttonAddExcludeFolder_Click">
                            <StackPanel Orientation="Horizontal">
                                <Image Width="16" Height="16" Margin="0,0,5,0" Source="/Little_System_Cleaner;component/Resources/startup manager/add.png" />
                                <TextBlock VerticalAlignment="Center">Add...</TextBlock>
                            </StackPanel>
                        </Button>
                        <Button x:Name="buttonRemExcludeFolder" Padding="8,0,8,0" Height="26" Click="buttonRemExcludeFolder_Click">
                            <StackPanel Orientation="Horizontal">
                                <Image Width="16" Height="16" Margin="0,0,5,0" Source="/Little_System_Cleaner;component/Resources/startup manager/delete.png" />
                                <TextBlock VerticalAlignment="Center">Remove</TextBlock>
                            </StackPanel>
                        </Button>
                    </StackPanel>
                </Grid>
            </TabItem>
            <TabItem Header="Excluded Files">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*" />
                        <RowDefinition Height="36" />
                    </Grid.RowDefinitions>
                    <ListView x:Name="listViewFiles" ItemsSource="{Binding ExcFilesCollection}" Grid.Row="0" Margin="5,5,5,0" IsSynchronizedWithCurrentItem="True" SelectionMode="Single">
                        <ListView.View>
                            <GridView AllowsColumnReorder="False">
                                <GridViewColumn Header="List of files to exclude" DisplayMemberBinding="{Binding File}" Width="240" />
                            </GridView>
                        </ListView.View>
                    </ListView>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1"  Margin="5,5,5,5">
                        <Button x:Name="buttonAddExcludeFile" Margin="0,0,5,0" Height="26" Padding="8,0,8,0" Click="buttonFilesAdd_Click">
                            <StackPanel Orientation="Horizontal">
                                <Image Width="16" Height="16" Margin="0,0,5,0" Source="/Little_System_Cleaner;component/Resources/startup manager/add.png" />
                                <TextBlock VerticalAlignment="Center">Add...</TextBlock>
                            </StackPanel>
                        </Button>
                        <Button x:Name="buttonRemExcludeFile" Height="26" Padding="8,0,8,0" Click="buttonRemExcludeFile_Click">
                            <StackPanel Orientation="Horizontal">
                                <Image Width="16" Height="16" Margin="0,0,5,0" Source="/Little_System_Cleaner;component/Resources/startup manager/delete.png" />
                                <TextBlock VerticalAlignment="Center">Remove</TextBlock>
                            </StackPanel>
                        </Button>
                    </StackPanel>
                </Grid>
            </TabItem>
        </TabControl>
        <Button x:Name="buttonScan" Margin="0,5,0,5" Padding="8,0,8,0" Grid.Row="2" Click="buttonScan_Click" HorizontalAlignment="Center">
            <StackPanel Width="Auto" Height="Auto" Orientation="Horizontal">
                <Image Width="32" Height="32" Source="/Little_System_Cleaner;component/Resources/Analyze.png" />
                <TextBlock Margin="5,0,0,0" VerticalAlignment="Center" FontSize="16" Text="Scan Now" TextWrapping="Wrap"/>
            </StackPanel>
        </Button>
    </Grid>
</UserControl>
