PageRenderTime 23ms CodeModel.GetById 16ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/BookReader/BookReader/Dialogs/OptionWindow.xaml

#
XAML | 46 lines | 42 code | 4 blank | 0 comment | 0 complexity | 944a116903392f2023a94c389136e887 MD5 | raw file
 1<ucd:HeaderedDialogWindow x:Class="BookReader.OptionWindow"
 2    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 3    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 4    xmlns:ucd="clr-namespace:BookReader.Dialogs"
 5    Title="Options" Height="314" Width="514"
 6    DialogDescription="Configure book reader options"
 7    DialogImage="/BookReader;component/Resources/Images/tools.png"
 8    Style="{DynamicResource HeaderedDialogWindow}"
 9    Loaded="Window_Loaded">
10        <Grid Margin="7">
11            <Grid.RowDefinitions>
12                <RowDefinition Height="32" />
13                <RowDefinition Height="32" />
14                <RowDefinition Height="32" />
15                <RowDefinition Height="32" />
16                <RowDefinition Height="32" />
17                <RowDefinition Height="*" />
18            </Grid.RowDefinitions>
19            <Grid.ColumnDefinitions>
20                <ColumnDefinition Width="140*" />
21                <ColumnDefinition Width="296*" />
22            </Grid.ColumnDefinitions>
23                <Label Grid.Column="0" HorizontalAlignment="Left">Catalog Path</Label>
24                <TextBox Height="25" Grid.Column="1" Margin="0,0,21,0" VerticalAlignment="Top" HorizontalAlignment="Stretch" Name="textBoxPath" ToolTip="The path to your books. Include sub-directories"/>
25                <Button Grid.Column="1" Height="25" Width="20" HorizontalAlignment="Right" VerticalAlignment="Top" Name="btnBrowse" Click="btnBrowse_Click">...</Button>
26                    
27                <Label Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch">Image Cache</Label>
28                <TextBox Grid.Row="1" Grid.Column="1" Height="25"  VerticalAlignment="Top" HorizontalAlignment="Stretch" Name="textBoxCache" ToolTip="Number of images to keep in cache. This allways include 3 pages after the current one for quick reading." />
29                
30                <Label Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch" >Image Cache Duration</Label>
31                <Slider Grid.Column="1" Grid.Row="2" Name="sliderDurationCache" Height="25"  VerticalAlignment="Top" Value="5" SmallChange="1" LargeChange="1" Maximum="10" TickPlacement="TopLeft" TickFrequency="1" IsSnapToTickEnabled="True" AutoToolTipPlacement="None" ToolTip="From 0 to 10, How long the images stays in memory from his last acces" />
32                <Label Grid.Column="0" Grid.Row="3" HorizontalAlignment="Stretch">Use Auto Fit</Label>
33                <StackPanel Grid.Column="1" Grid.Row="3" Orientation="Horizontal">
34                    <RadioButton GroupName="AutoFit" Grid.Column="1" Grid.Row="3" Margin="0,0,10,0" Name="rbNone">None</RadioButton>
35                    <RadioButton GroupName="AutoFit" Grid.Column="1" Grid.Row="3" Margin="0,0,10,0" Name="rbWidth">Width</RadioButton>
36                    <RadioButton GroupName="AutoFit" Grid.Column="1" Grid.Row="3" Margin="0,0,10,0" Name="rbHeight">Height</RadioButton>
37                </StackPanel>
38                <Label Grid.Column="0" Grid.Row="4" HorizontalAlignment="Stretch">Debuging</Label>
39                <CheckBox Grid.Column="1" Grid.Row="4" Margin="2,2,2,2" Name="chkUseDebug" ToolTip="Display a dialog with 'debug' information">Activate debuging display.</CheckBox>
40
41                <Button Grid.Row="5" Name="BtnReset" Click="Reset_Click" ToolTip="Reset to default settings" Margin="33.142,19,33.142,0">Reset</Button>
42                <Button Grid.Column="1" Grid.Row="5" HorizontalAlignment="Left" Name="BtnCancel" Width="75" Click="Cancel_Click" IsCancel="True" Margin="50,0,0,0" ToolTip="Cancel">Cancel</Button>
43                <Button Grid.Column="1" Grid.Row="5 " HorizontalAlignment="Right" Name="BtnOk" Width="75" Click="Ok_Click" IsDefault="True" Margin="0,0,50,0" ToolTip="Ok">Ok</Button>
44                
45    </Grid>
46</ucd:HeaderedDialogWindow>