프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / KCOM / Controls / SearchPanel.xaml @ 448c5399

이력 | 보기 | 이력해설 | 다운로드 (8.88 KB)

1 787a4489 KangIngu
<UserControl x:Class="KCOM.Controls.SearchPanel"
2
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
5
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
6 136851cb djkim
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
7 6af42ff0 taeseongkim
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
8 787a4489 KangIngu
             xmlns:local="clr-namespace:KCOM.Controls"
9 6af42ff0 taeseongkim
             xmlns:common="clr-namespace:KCOM.Common"
10
             xmlns:Behaviors="clr-namespace:KCOM.Behaviors"
11 787a4489 KangIngu
             mc:Ignorable="d" Background="White"
12
             d:DesignHeight="900" d:DesignWidth="300">
13 6af42ff0 taeseongkim
    <UserControl.Resources>
14
        <telerik:InvertedBooleanConverter x:Key="InvertedBooleanConverter"/>
15
        <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
16
        <common:ViewerDataModel x:Key="viewDataModel"/>
17
    </UserControl.Resources>
18 787a4489 KangIngu
    <Grid  Margin="10">
19 136851cb djkim
20 787a4489 KangIngu
        <Grid.RowDefinitions>
21
            <RowDefinition Height="Auto"/>
22
            <RowDefinition Height="*"/>
23
        </Grid.RowDefinitions>
24
        <StackPanel Orientation="Vertical">
25
            <TextBlock Text="Search : " FontSize="15"/>
26
            <Grid Margin="0,10">
27
                <Grid.ColumnDefinitions>
28
                    <ColumnDefinition Width="8*"/>
29
                    <ColumnDefinition Width="2*"/>
30
                </Grid.ColumnDefinitions>
31 c3bb196c taeseongkim
                <TextBox  HorizontalAlignment="Stretch" IsEnabled="{Binding IsIndeterminate, Converter={StaticResource InvertedBooleanConverter}, ElementName=searchIndicator}"
32
                          Style="{StaticResource ClearTextBoxStyle}" Margin="2,0" telerik:StyleManager.Theme="Office2016" AcceptsReturn="False" Background="#FFF3F3F3" BorderThickness="0.5" VerticalContentAlignment="Center" x:Name="tbSearch" IsTabStop="True"/>
33 8bd25583 taeseongkim
                <!--<telerik:RadMaskedTextInput Mask="" 
34
                                            HorizontalAlignment="Stretch" Margin="2,0" AcceptsReturn="False" EmptyContent="Input Search Text" IsClearButtonVisible="True" Background="#FFF3F3F3" BorderThickness="0.5" VerticalContentAlignment="Center" x:Name="tbSearch" IsTabStop="True"/>-->
35 787a4489 KangIngu
                <Button Content="Search" Grid.Column="1" Padding="5" Background="#3d3d3d" Foreground="White" x:Name="btnSearch"/>
36
            </Grid>
37 992a98b4 KangIngu
            <GroupBox Header="Option List">
38
                <StackPanel Margin="1">
39 6af42ff0 taeseongkim
                    <CheckBox Content="Current page only" Margin="3" x:Name="chkCurrentPageOnly" IsChecked="False"/>
40 992a98b4 KangIngu
                </StackPanel>
41
            </GroupBox>
42
            <GroupBox Header="Search Mode">
43
                <StackPanel Margin="1">
44
                    <RadioButton GroupName="Search" Content="None - search as substring" IsChecked="True" Margin="3" Checked="chkSelectionChangeEvent"  Tag="0"/>
45
                    <RadioButton GroupName="Search" Content="Exact - search string as separate word" Margin="3" Checked="chkSelectionChangeEvent" Tag="1"/>
46
                    <RadioButton GroupName="Search" Content="Smart - find the word in various forms"  Margin="3" Checked="chkSelectionChangeEvent" Tag="2"/>
47
                </StackPanel>
48
                <!--<CheckBox Content="Match whole word" Margin="5"/>-->
49
            </GroupBox>
50 787a4489 KangIngu
51 992a98b4 KangIngu
            <!--<TextBlock Text="Search word or phase in the current document,   and list the result" Margin="20,20" TextWrapping="WrapWithOverflow" Foreground="#FF7C7C7C" FontSize="12"/>-->
52
        </StackPanel>
53 6af42ff0 taeseongkim
        <Grid Grid.Row="1">
54
            <Grid.RowDefinitions>
55
                <RowDefinition Height="Auto"/>
56 c3bb196c taeseongkim
                <RowDefinition Height="*"/>
57 6af42ff0 taeseongkim
            </Grid.RowDefinitions>
58 c3bb196c taeseongkim
            <StackPanel Orientation="Horizontal" VerticalAlignment="Top">
59
                <TextBlock FontSize="11" x:Name="txtSearchMsg" Foreground="#FF6A6A6A"/>
60
                <telerik:RadProgressBar x:Name="searchIndicator" HorizontalAlignment="Right" Visibility="{Binding IsIndeterminate, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=searchIndicator}"
61
                                      telerik:StyleManager.Theme="Office2016" IsIndeterminate="False" />
62
            </StackPanel>
63
            <ListView Style="{StaticResource SimpleListViewStyle}"   Grid.Row="1" x:Name="lstSearchWord" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
64
                      BorderThickness="1" Margin="0,2" ItemsSource="{Binding SearchSet}" SelectionChanged="lstSearchWord_SelectionChanged">
65 6af42ff0 taeseongkim
                <i:Interaction.Behaviors>
66
                    <Behaviors:ListViewColumnSizeAutoBehavior/>
67
                </i:Interaction.Behaviors>
68
                <ListView.ItemContainerStyle>
69
                    <Style TargetType="ListViewItem">
70
                        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
71
                    </Style>
72
                </ListView.ItemContainerStyle>
73
                <ListView.View>
74
                    <GridView>
75
                        <GridViewColumn Header="Page" Width="42" HeaderContainerStyle="{StaticResource GridViewColumnHeaderStyle}">
76
                            <GridViewColumn.CellTemplate>
77
                                <DataTemplate>
78
                                    <Border BorderBrush="Black" Margin="0,5,0,1" BorderThickness="0,0,0,1" HorizontalAlignment="Stretch">
79
                                        <TextBlock Foreground="MediumBlue" FontFamily="Calibri" Margin="3,0,0,2" TextAlignment="Left"
80
                                            Text="{Binding PageNo}" />
81
                                    </Border>
82
                                </DataTemplate>
83
                            </GridViewColumn.CellTemplate>
84
                        </GridViewColumn>
85
                        <GridViewColumn Header="Text" Width="Auto" HeaderContainerStyle="{StaticResource GridViewColumnHeaderStyle}">
86
                            <GridViewColumn.CellTemplate>
87
                                <DataTemplate >
88
                                    <Border BorderBrush="Black"  Margin="-12,5,0,1" BorderThickness="0,0,0,1"  >
89
                                        <TextBlock Foreground="MediumBlue" TextAlignment="Left" FontFamily="Calibri" FontWeight="Bold"
90
                                           Margin="14,0,0,2" Text="{Binding  searchResult.Text}" TextTrimming="WordEllipsis" />
91
                                    </Border>
92
                                </DataTemplate>
93
                            </GridViewColumn.CellTemplate>
94
                        </GridViewColumn>
95
                        <GridViewColumn Header="Position" Width="0"  HeaderContainerStyle="{StaticResource GridViewColumnHeaderStyle}">
96
                            <GridViewColumn.CellTemplate>
97
                                <DataTemplate>
98
                                    <Border BorderBrush="Black" Margin="-12,5,-17,1" BorderThickness="0,0,0,1" >
99
                                        <StackPanel Orientation="Horizontal" Margin="15,0,0,1">
100 c3bb196c taeseongkim
                                            <TextBlock Text="{Binding searchResult.Left, StringFormat=N0}" VerticalAlignment="Center"/>
101
                                            <TextBlock Text=","  FontWeight="DemiBold" VerticalAlignment="Center"/>
102
                                            <TextBlock Text="{Binding searchResult.Top, StringFormat=N0}" VerticalAlignment="Center"/>
103 6af42ff0 taeseongkim
                                        </StackPanel>
104
                                    </Border>
105
                                </DataTemplate>
106
                            </GridViewColumn.CellTemplate>
107
                        </GridViewColumn>
108
                    </GridView>
109
                </ListView.View>
110
            </ListView>
111
        </Grid>
112
        <Border Background="Black" Grid.RowSpan="2"  Opacity="0.7" Margin="-10" x:Name="border_Overlap"
113 c3bb196c taeseongkim
                Visibility="{Binding Instance.IsDownloadOriginal, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
114 6af42ff0 taeseongkim
                DataContext="{DynamicResource viewDataModel}">
115 992a98b4 KangIngu
            <StackPanel VerticalAlignment="Center">
116
                <TextBlock x:Name="tlDonwloadState" Text="원활한 검색을 위해 데이터를 준비합니다" Foreground="White" HorizontalAlignment="Center" Margin="0,10" FontWeight="Bold"/>
117
                <Button Content="다운로드" Margin="5" HorizontalAlignment="Center" Padding="10" Background="#FF0080FF" Foreground="White" BorderThickness="0"
118 6af42ff0 taeseongkim
                        x:Name="btnSearchPDFDownload" Visibility="Collapsed"/>
119
                <TextBlock x:Name="txtDownloadProgress"   Foreground="White" FontWeight="Bold"  HorizontalAlignment="Center" 
120
                           Text="{Binding Instance.DownloadFileProgress, StringFormat=Download File \{0\}%, ValidatesOnNotifyDataErrors=False}"
121
                           />
122 992a98b4 KangIngu
            </StackPanel>
123
        </Border>
124 787a4489 KangIngu
    </Grid>
125
</UserControl>
클립보드 이미지 추가 (최대 크기: 500 MB)