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