Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

C.B.R.

, 22 Oct 2012
Comic and electronic publication reader with library management, extended file conversion, and devices support.
CBR.zip
Release
CBR.Core.dll
CBR.exe
Dependencies
7z.dll
Fluent.dll
itextsharp.dll
Microsoft.Expression.Drawing.dll
Microsoft.Expression.Interactions.dll
SevenZipSharp.dll
System.Windows.Interactivity.dll
cbr0_5.zip
Languages
flag_france.png
flag_great_britain.png
Dependencies
7z.dll
cbrz.ico
epub.ico
pdf.ico
rar.ico
cbr_0_3-source.zip
CBR
CBR.Core
Dependencies
7z.dll
CoreDiagram.cd
itextsharp.dll
SevenZipSharp.dll
Files
Conversion
IMG
PDF
RAR
XPS
Helpers
MVVM
Commands
Events
Messages
Models
Workspace
Properties
Services
Book
CBR
Components
Controls
Converters
Designer
Adorners
Dialogs
Helpers
Dependencies
Fluent.dll
ProgrammDiagram.cd
Properties
Settings.settings
Resources
Images
16x16
pin_no.png
pin_yes.png
sort_alpha.png
sort_category.png
view_details.png
view_thumb.png
32x32
book.png
book_add.png
book_close.png
book_convert.png
book_delete.png
book_edit.png
book_open.png
book_protect.png
book_read.png
book_save.png
book_test.png
book_type_none.png
book_type_rar.png
book_type_xps.png
book_type_zip.png
exit.png
fit_height.png
fit_width.png
forbidden.png
full_screen.png
help.png
info.png
library_close.png
library_new.png
library_open.png
library_view.png
open_folder.png
page_clear_mark.png
page_goto_mark.png
page_mark.png
page_test.png
picture_order.png
picture_time.png
picture_zone.png
push_pin.png
read.png
refresh.png
save.png
save_as.png
tools.png
book.ico
phone_horizontal.png
search.png
XAML
Controls
ViewModels
Book
Explorer
File
Views
Books
File
cbr_0_4-source.zip
BookReader
BookReader.vssscc
BookReader
BookReader.csproj.vspscc
Common
Controls
Dependencies
7z.dll
pdftohtml.exe
SevenZipSharp.dll
WPFToolkit.dll
Dialogs
Properties
app.manifest
Settings.settings
Reader
Catalog
Common
Images
RAR
Resources
book.ico
Images
acroread.png
document.png
ecran.png
exit.png
filter.png
FitHeight.png
FitWidth.png
forbidden.png
GotoPage.png
info.png
open_folder.png
protect.png
refresh.png
Search.png
Style.png
TheRedPushPin.png
tools.png
Themes
Black
Blue
Silver
XAML
BuildProcessTemplates
CBR.Core.csproj.vspscc
7z.dll
CoreDiagram.cd
itextsharp.dll
SevenZipSharp.dll
DragDrop
ePUB
HTML
WMI
XPS
ePUB
Books
CBR.vssscc
CBR.csproj.vspscc
Devices.xlsx
Fluent.dll
ProgrammDiagram.cd
Settings.settings
disk.png
file.png
folder.png
pin_no.png
pin_yes.png
sort_alpha.png
sort_category.png
view_details.png
view_thumb.png
book.png
book_add.png
book_close.png
book_convert.png
book_delete.png
book_edit.png
book_open.png
book_protect.png
book_read.png
book_remove.png
book_save.png
book_test.png
book_type_epub.png
book_type_none.png
book_type_rar.png
book_type_xps.png
book_type_zip.png
device_refresh.png
device_sync.png
device_view.png
exit.png
fit_height.png
fit_width.png
forbidden.png
full_screen.png
help.png
info.png
library_close.png
library_new.png
library_open.png
library_view.png
open_folder.png
page_clear_mark.png
page_first.png
page_goto_mark.png
page_last.png
page_mark.png
page_next.png
page_previous.png
page_test.png
picture_order.png
picture_time.png
picture_zone.png
push_pin.png
read.png
refresh.png
save.png
save_as.png
tools.png
book.ico
phone_horizontal.png
search.png
Books
Devices
SysItems
Devices
cbr_0_5-source.zip
BookReader.vssscc
BookReader.csproj.vspscc
7z.dll
pdftohtml.exe
SevenZipSharp.dll
WPFToolkit.dll
app.manifest
Settings.settings
book.ico
acroread.png
document.png
ecran.png
exit.png
filter.png
FitHeight.png
FitWidth.png
forbidden.png
GotoPage.png
info.png
open_folder.png
protect.png
refresh.png
Search.png
Style.png
TheRedPushPin.png
tools.png
CBR.Core.csproj.vspscc
7z.dll
cbrz.ico
CoreDiagram.cd
epub.ico
itextsharp.dll
pdf.ico
rar.ico
SevenZipSharp.dll
Files
Localization
Core
Providers
Files
Resx
Mediator
Settings.settings
CBR.vssscc
CBR.csproj.vspscc
Devices.xlsx
Fluent.dll
ProgrammDiagram.cd
Languages
flag_france.png
flag_great_britain.png
Settings.settings
disk.png
file.png
folder.png
pin_no.png
pin_yes.png
sort_alpha.png
sort_category.png
view_details.png
view_thumb.png
book.png
book_add.png
book_close.png
book_convert.png
book_delete.png
book_edit.png
book_new.png
book_open.png
book_protect.png
book_read.png
book_remove.png
book_save.png
book_test.png
book_type_epub.png
book_type_none.png
book_type_rar.png
book_type_xps.png
book_type_zip.png
delete.png
device_refresh.png
device_sync.png
device_view.png
exit.png
fit_height.png
fit_width.png
forbidden.png
full_screen.png
help.png
info.png
is_read.png
library_close.png
library_new.png
library_open.png
library_view.png
localize.png
localize_new.png
localize_select.png
lock.png
open_folder.png
page_clear_mark.png
page_first.png
page_goto_mark.png
page_last.png
page_mark.png
page_next.png
page_previous.png
page_test.png
picture_order.png
picture_time.png
picture_zone.png
push_pin.png
read.png
refresh.png
resfresh.png
save.png
save_as.png
search.png
tools.png
book.ico
phone_horizontal.png
search.png
themes
Extended
Menus
Others
Explorer
Others
c__users_sean.office_desktop_holding_ground_cbr.zip
CBR.Core.dll
CBR.Core.pdb
CBR.exe
CBR.pdb
CBR.vshost.exe
7z.dll
cbl.ico
cbrz.ico
epub.ico
pdf.ico
rar.ico
Fluent.dll
itextsharp.dll
Languages
flag_france.png
flag_great_britain.png
Microsoft.Expression.Drawing.dll
Microsoft.Expression.Interactions.dll
SevenZipSharp.dll
System.Windows.Interactivity.dll
<Window x:Class="BookReader.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:cmd="clr-namespace:BookReader;assembly=BookReader"
    xmlns:ucc="clr-namespace:BookReader.Controls"    
    MinHeight="400" MinWidth="1100"
    WindowStyle="None" AllowsTransparency="True" Background="Transparent" 
    ResizeMode="CanResizeWithGrip" WindowState="Normal" 
    Loaded="Window_Loaded" Closing="Window_Closing" SourceInitialized="Window_SourceInitialized">
    <Grid Name="MainGrid">
        <Grid.RowDefinitions>
            <RowDefinition Height="52" />
            <RowDefinition Height="10" />
            <RowDefinition Height="*" />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>
        
        <Border Grid.RowSpan="4" Background="{DynamicResource WindowBackgroundBrush}" CornerRadius="5"
                VerticalAlignment="Stretch" MouseLeftButtonDown="Window_MouseLeftButtonDown" 
                BorderThickness="1" BorderBrush="Black"></Border>
        <Button Panel.ZIndex="100" Style="{DynamicResource closeButton}" Margin="756,7,11,0" Name="closeButton"
                HorizontalAlignment="Right" VerticalAlignment="Top" Height="10"
                Command="ApplicationCommands.Close" ToolTip="Exit"></Button>
        <Button Panel.ZIndex="100" Style="{DynamicResource maximizeButton}" Margin="737,7,28,4" Name="maximizeButton" 
                HorizontalAlignment="Right" VerticalAlignment="Top" Height="10"
                Click="maximizeButton_Click" ToolTip="Maximize"></Button>
        <Button Panel.ZIndex="100" Style="{DynamicResource minimizeButton}" Margin="0,7,44,4" Name="minimizeButton" 
                HorizontalAlignment="Right" VerticalAlignment="Top" Height="10"
                Click="minimizeButton_Click" ToolTip="Minimize"></Button>
        
        <DockPanel Grid.Row="0" Grid.RowSpan="2" Margin="3" LastChildFill="True" MouseLeftButtonDown="Window_MouseLeftButtonDown">
            <Button Name="btnOpen" MinWidth="60" Margin="5,0,15,0" HorizontalAlignment="Stretch" Command="ApplicationCommands.Open"
                    ToolTip="Open a book everywhere on your disks">
                <StackPanel Orientation="Vertical" Margin="0">
                    <Image Width="32" Source="Resources\Images\open_folder.png"></Image>
                    <Label VerticalAlignment="Center" HorizontalAlignment="Center">Open</Label>
                </StackPanel>
            </Button>
            <Button Name="btnFullScreen" MinWidth="60" Margin="5,0,5,0" HorizontalAlignment="Stretch" Click="btnFullScreen_Click" ToolTip="Put Book Reader in full screen mode and hide explorers">
                <StackPanel Orientation="Vertical" Margin="2">
                    <Image Width="32" Source="Resources\Images\ecran.png"></Image>
                    <Label VerticalAlignment="Center" HorizontalAlignment="Center">Full screen</Label>
                </StackPanel>
            </Button>
            <Button Name="btnRefresh" MinWidth="60" Margin="5,0,5,0" HorizontalAlignment="Stretch" Click="btnRefresh_Click" ToolTip="Refresh the catalog by a full scan of the folder">
                <StackPanel Orientation="Vertical" Margin="2">
                    <Image Width="32" Source="Resources\Images\refresh.png"></Image>
                    <Label VerticalAlignment="Center" HorizontalAlignment="Center">Refresh</Label>
                </StackPanel>
            </Button>
            <Button Name="btnOptions" MinWidth="60" Margin="5,0,15,0" Click="btnOptions_Click" ToolTip="Display the options dialog" >
                <StackPanel Orientation="Vertical" Margin="2">
                    <Image Width="32" Source="Resources\Images\tools.png"></Image>
                    <Label VerticalAlignment="Center" HorizontalAlignment="Center">Options</Label>
                </StackPanel>
            </Button>
            
            <Button Name="bntFitWidth" MinWidth="60" Margin="5,0,5,0" Click="btnFitWidth_Click" ToolTip="Fit the display to the page width">
                <StackPanel Orientation="Vertical" Margin="2">
                    <Image Width="32" Source="Resources\Images\FitWidth.png"></Image>
                    <Label VerticalAlignment="Center" HorizontalAlignment="Center">Width</Label>
                </StackPanel>
            </Button>
            <Button Name="bntFitHeight" MinWidth="60" Margin="5,0,15,0" Click="btnFitHeight_Click" ToolTip="Fit the display to the page height">
                <StackPanel Orientation="Vertical" Margin="2">
                    <Image Width="32" Source="Resources\Images\FitHeight.png"></Image>
                    <Label VerticalAlignment="Center" HorizontalAlignment="Center">Height</Label>
                </StackPanel>
            </Button>
            <Button Name="bntConvertPDF" MinWidth="60" Margin="5,0,15,0" ToolTip="Convert a PDF to CBZ/CBR" Click="bntConvertPDF_Click">
                <StackPanel Orientation="Vertical" Margin="2">
                <Image Width="32" Source="Resources\Images\acroread.png"></Image>
                <Label VerticalAlignment="Center" HorizontalAlignment="Center">Convert</Label>    
                </StackPanel>
            </Button>
            <Button Name="bntGoto" MinWidth="60" Margin="5,0,5,0" Click="btnGoto_Click" ToolTip="Goto a page in the book">
                <StackPanel Orientation="Vertical" Margin="2">
                    <Image Width="32" Source="Resources\Images\GotoPage.png"></Image>
                    <Label VerticalAlignment="Center" HorizontalAlignment="Center">Goto</Label>
                </StackPanel>
            </Button>
            <Button Name="bntQuit" MinWidth="60" Margin="5,0,5,0" Command="ApplicationCommands.Close" ToolTip="Close Book Reader">
                <StackPanel Orientation="Vertical" Margin="2">
                    <Image Width="32" Source="Resources\Images\exit.png"></Image>
                    <Label VerticalAlignment="Center" HorizontalAlignment="Center">Exit</Label>
                </StackPanel>
            </Button>
            <ucc:DropDownButton x:Name="bntTheme" MinWidth="60" Margin="15,0,5,0" ToolTip="Change the display style">
                <StackPanel Orientation="Vertical" Margin="2">
                    <Image Width="32" Source="Resources\Images\Style.png"></Image>
                    <Label VerticalAlignment="Center" HorizontalAlignment="Center">Style</Label>
                </StackPanel>
                <ucc:DropDownButton.DropDown>
                    <ContextMenu>
                        <MenuItem Header="Black" Command="cmd:MainWindow.ChangeThemeCmd" CommandParameter="Black"/>
                        <MenuItem Header="Blue" Command="cmd:MainWindow.ChangeThemeCmd" CommandParameter="Blue"/>
                        <MenuItem Header="Silver" Command="cmd:MainWindow.ChangeThemeCmd" CommandParameter="Silver"/>
                    </ContextMenu>
                </ucc:DropDownButton.DropDown>
            </ucc:DropDownButton>
            <Button Name="bntAbout" MinWidth="60" Margin="15,0,5,0" Click="btnAbout_Click" ToolTip="About the author and Acknowlegdments">
                <StackPanel Orientation="Vertical" Margin="2">
                    <Image Width="32" Source="Resources\Images\info.png"></Image>
                    <Label VerticalAlignment="Center" HorizontalAlignment="Center">About</Label>
                </StackPanel>
            </Button>
            <StackPanel>
                <Label>Search filter :</Label>
                <TextBox Margin="5,5,5,5" Name="tbSearch" Height="21"></TextBox>
            </StackPanel>    
        </DockPanel>
        <Grid Grid.Row="2" Margin="5,0,5,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="200"/>
                <ColumnDefinition Width="20"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
        <ListBox Grid.Column="0" BorderThickness="0"
              VirtualizingStackPanel.IsVirtualizing="True"
              IsSynchronizedWithCurrentItem="True"
              Name="CatalogListBox" 
              SelectionMode="Single" 
              ItemsSource="{Binding Books}" 
              ItemTemplate="{DynamicResource PublicTemplate}"
              SelectedIndex="0"
              Style="{DynamicResource CatalogCoverStyle}"
              MouseDoubleClick="CatalogListBox_MouseDoubleClick">
            <ListBox.ContextMenu>
            <ContextMenu>
                    <MenuItem Header="Read" Command="cmd:MainWindow.ReadCmd" />
                    <MenuItem Header="Mark as (un)read" Command="cmd:MainWindow.MarkReadCmd" />
                <Separator></Separator>
                    <MenuItem Header="Goto bookmark" Command="cmd:MainWindow.GotoBookmarkCmd" CommandParameter="LIST"/>
                    <MenuItem Header="Clear bookmark" Command="cmd:MainWindow.ClearBookmarkCmd" CommandParameter="LIST"/>
                <Separator></Separator>
                    <MenuItem Command="cmd:MainWindow.ProtectCmd"/>
                <Separator></Separator>
                    <MenuItem Header="Delete" Command="ApplicationCommands.Delete"/>
            </ContextMenu>
        </ListBox.ContextMenu>
        </ListBox>
        <ucc:GridSplitterExpander Grid.Column="1" Orientation="Vertical" GridIndex="0" 
            x:Name="Splitter" Background="{DynamicResource ControlBackgroundBrush}"/>
        <ucc:PageViewer x:Name="SimplePageView" Grid.Column="2" 
                      PageChanged="SimplePageView_PageChanged"
                      ZoomChanged="SimplePageView_ZoomChanged" >
            <ucc:PageViewer.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Set bookmark" Command="cmd:MainWindow.BookmarkCmd"/>
                    <MenuItem Header="Goto bookmark" Command="cmd:MainWindow.GotoBookmarkCmd" CommandParameter="VIEW"/>
                    <MenuItem Header="Clear bookmark" Command="cmd:MainWindow.ClearBookmarkCmd" CommandParameter="VIEW"/>
                </ContextMenu>
            </ucc:PageViewer.ContextMenu>
        </ucc:PageViewer>
        </Grid>
        <DockPanel Grid.Row="3" Margin="3" Background="{DynamicResource WindowBackgroundBrush}" LastChildFill="True">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.6*" />
                    <ColumnDefinition Width="2*" />
                    <ColumnDefinition Width="2*" />
                    <ColumnDefinition Width="1*" />
                </Grid.ColumnDefinitions>
                <Label Grid.Column="0" Name="BookInfo" VerticalAlignment="Center" HorizontalAlignment="Stretch"
                       IsHitTestVisible="False" Margin="5,0,0,0" ToolTip="Number of books in the catalog"
                       Content=""/>
                <Label Grid.Column="1" Name="PageInfo" VerticalAlignment="Center" HorizontalAlignment="Stretch"
                       IsHitTestVisible="False" Margin="5,0,0,0" ToolTip="Get information about the image cache"
                       Content="" />
                <Label Grid.Column="2" Name="CacheInfo" VerticalAlignment="Center" HorizontalAlignment="Stretch" IsHitTestVisible="False"
                       Margin="5,0,0,0" ToolTip="Display the current page displayed"
                       Content=""/>
                <DockPanel Grid.Column="3" HorizontalAlignment="Stretch" LastChildFill="True">
                    <Label Name="zoomPercent" Margin="5,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"
                           Content="{Binding ElementName=zoomSlider, Path=Value}"></Label>
                    <Label Margin="5,0,5,0" VerticalAlignment="Center" HorizontalAlignment="Left">%</Label>
                    <Slider Name="zoomSlider" Minimum="1" Maximum="400" SmallChange="1" TickPlacement="None"
                        Value="100" VerticalAlignment="Center" ValueChanged="Slider_ValueChanged"
                        HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"
                        LargeChange="10" IsSnapToTickEnabled="True" Focusable="False"></Slider>
                </DockPanel>
            </Grid>    
        </DockPanel>
    </Grid>
</Window>

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 GNU General Public License (GPLv3)

Share

About the Author

Guillaume Waser
Architect A.C.S.
France France
No Biography provided

| Advertise | Privacy | Mobile
Web03 | 2.8.140814.1 | Last Updated 22 Oct 2012
Article Copyright 2011 by Guillaume Waser
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid