Click here to Skip to main content
15,886,823 members
Articles / Desktop Programming / WPF

ScanX - A Registry Cleaner

Rate me:
Please Sign up or sign in to vote.
4.95/5 (92 votes)
29 Jan 2012CPOL11 min read 171.7K   12.5K   208  
C#/WPF - ScanX: Creating a commercial quality Registry cleaner.
<UserControl x:Class="ScanX.Panels.OptionsPanel"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             Height="Auto" Width="Auto" 
             HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Unloaded="UserControl_Unloaded" Visibility="Collapsed">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Resources/ControlStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="250" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <DockPanel Grid.Column="0">
            <StackPanel DockPanel.Dock="Left" Orientation="Vertical" Background="Transparent" Margin="2">
                <TextBlock Margin="12" Foreground="Black" FontFamily="Arial" FontSize="20" FontWeight="DemiBold">
                    Options
                </TextBlock>
                <Image Margin="10,0" Width="160" Height="160" Source="/Images/options.png" />
                <TextBlock FontSize="13" FontWeight="Normal" 
                           Width="Auto" Margin="10" TextAlignment="Left" 
                           VerticalAlignment="Top" TextWrapping="WrapWithOverflow">
                    Creating a Restore Point, allows you to return the registry to its original state. A restore point will be generated before
                    items are removed from the registry. Select the 'Restore Registry' button,
                    to launch System Restore.<LineBreak/>Aync processing allows the 
                    scan module to use multiple threads, enabling a faster scan<LineBreak/>
                    Basic logging records when a scan starts, stops, and some basic statistics. Logging match details creates 
                    a more thorough record of scan activity.
                </TextBlock>
            </StackPanel>
            <Line DockPanel.Dock="Right" Y1="0" Y2="500" 
                  Stroke="DarkGray" Width="0.5" 
                  VerticalAlignment="Stretch" />
        </DockPanel>
        <Grid Grid.Column="1">
            <StackPanel Orientation="Vertical">
                <Border VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderBrush="AliceBlue" BorderThickness="1">
                    <StackPanel Orientation="Vertical">
                        <TextBlock Margin="8" FontFamily="Arial" FontSize="18" FontWeight="Bold" Text="Restore" />
                        <CheckBox Name="chkRestore" Click="chkBox_Click" Margin="10,4,2,2" IsChecked="True" >Create a System Restore Point (recommended)</CheckBox>
                        <Button Name="btnRestore" Content="Restore Registry" Click="Start_Clicked" Margin="10,10,20,10" Width="160" Height="30" HorizontalAlignment="Right" Foreground="#FCFCFC" />
                    </StackPanel>
                </Border>
                <Border VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderBrush="AliceBlue" BorderThickness="1">
                    <StackPanel Orientation="Vertical">
                        <TextBlock Margin="8" FontFamily="Arial" FontSize="18" FontWeight="Bold" Text="Processing Options" />
                        <CheckBox Name="chkLogging" Click="chkBox_Click" Margin="10,4,2,2" IsChecked="True">Enable Logging</CheckBox>
                        <CheckBox Name="chkLogDetailed" Click="chkBox_Click" Margin="10,4,2,2" IsChecked="True">Log Match Details</CheckBox>
                        <Button Name="btnShowLog" Content="Show Log" Click="Start_Clicked" Margin="10,10,20,10" Width="160" Height="30" HorizontalAlignment="Right" Foreground="#FCFCFC" />
                    </StackPanel>
                </Border>
            </StackPanel>
        </Grid>
    </Grid>

</UserControl>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Network Administrator vtdev.com
Canada Canada
Network and programming specialist. Started in C, and have learned about 14 languages since then. Cisco programmer, and lately writing a lot of C# and WPF code, (learning Java too). If I can dream it up, I can probably put it to code. My software company, (VTDev), is on the verge of releasing a couple of very cool things.. keep you posted.

Comments and Discussions