프로젝트

일반

사용자정보

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

markus / KCOM / Controls / PrintControl.xaml @ 90a0bfa9

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

1 787a4489 KangIngu
<UserControl x:Class="KCOM.Control.PrintControl"
2
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5
    xmlns:wrappanel ="clr-namespace:KCOM.WrapPanel"
6
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7
    mc:Ignorable="d"
8
    xmlns:telInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
9
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
10
    xmlns:telerikGrid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
11
    d:DesignHeight="550" d:DesignWidth="650">
12
    
13
    <UserControl.Resources>
14
        <Style TargetType="telerik:GridViewCell" x:Key="GridViewCellCenterStyle">
15
            <Setter Property="HorizontalAlignment" Value="Center"/>
16
        </Style>
17
        <!--좌측 썸네일 스크롤 스타일-->
18
        <Style x:Key="CustomThumbStyle" TargetType="Thumb">
19
            <Setter Property="Template">
20
                <Setter.Value>
21
                    <ControlTemplate TargetType="Thumb">
22
                        <Rectangle Width="10" Height="20" Fill="#FF45BAFF"/>
23
                        <!--<Rectangle Width="10" Height="20" Fill="#FFFF0000"/>-->
24
                    </ControlTemplate>
25
                </Setter.Value>
26
            </Setter>
27
        </Style>
28
        <!--강인구-->
29
30
    </UserControl.Resources>
31
    <Grid x:Name="LayoutRoot" Background="White">
32
        <Grid.ColumnDefinitions>
33
            <ColumnDefinition Width="4*"/>
34
            <ColumnDefinition Width="6*"/>
35
        </Grid.ColumnDefinitions>
36
        <Grid.RowDefinitions>
37
            <RowDefinition Height="Auto"/>
38
            <RowDefinition Height="8*"/>
39
        </Grid.RowDefinitions>
40
41
        <Border Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="#232323" BorderThickness="0,0,0,0.5">
42
            <!--오른쪽 상단-->
43
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
44
                <StackPanel Orientation="Horizontal" Margin="3">
45
                    <TextBlock Text="Slip" VerticalAlignment="Center" Margin="3"/>
46
                    <TextBlock Text="{Binding vpSlip}" Foreground="#007ACC" VerticalAlignment="Center" Margin="3" FontWeight="ExtraBold"/>
47
                </StackPanel>
48
                <StackPanel Orientation="Horizontal" Margin="3">
49
                    <TextBlock Text="VP" VerticalAlignment="Center" Margin="3"/>
50
                    <TextBlock Text="{Binding vpTitle}" Foreground="#007ACC" VerticalAlignment="Center" Margin="3" 
51
                               FontWeight="ExtraBold"/>
52
                </StackPanel>
53
                <StackPanel Orientation="Horizontal" Margin="3">
54
                    <TextBlock Text="Pages" VerticalAlignment="Center" Margin="3"/>
55
                    <TextBlock Text="{Binding PagesCount}" Foreground="#007ACC" VerticalAlignment="Center" Margin="3" FontWeight="ExtraBold"/>
56
                </StackPanel>
57
            </StackPanel>
58
        </Border>
59
60
        <Border Grid.Row="1" Grid.Column="0" BorderBrush="#232323" BorderThickness="0,0,0,0">
61
            <telerik:GroupBox Header="Preview : Composite" Margin="3" telerik:StyleManager.Theme="Office2016">
62
                <Grid>
63
                    <Grid.RowDefinitions>
64
                        <RowDefinition Height="30"/>
65
                        <RowDefinition Height="*"/>
66
                        <RowDefinition Height="30"/>
67
                        <RowDefinition Height="50"/>
68
                    </Grid.RowDefinitions>
69
                    <!--<Border Grid.Row="1" Background="#5F5F5F" MinWidth="200">-->
70
                    <Border Grid.Row="1" Background="#5F5F5F" MinWidth="200">
71
                        <!--잠시 제외 뷰어 부분-->
72
                        <Viewbox x:Name="PrintView" >
73
                            <!--<Canvas x:Name="printCanvas" Background="{Binding Source={x:Static local:DataModel.Instance}, Path=BackgroundImage, Mode=OneWay}">-->
74
                            <!--<Canvas x:Name="printCanvas" Background="{Binding Path=Back_Image}">-->
75
                            <Canvas x:Name="printCanvas">
76
                                
77
                            </Canvas>
78
                        </Viewbox>
79
                    </Border>
80
                    <telerik:RadBusyIndicator  Name="indicator" Grid.Row="1" telerik:StyleManager.Theme="Office2016" IsIndeterminate="True"/>
81
                    <Border Grid.Row="3">
82
                        <Grid>
83
                            <Grid.ColumnDefinitions>
84
                                <ColumnDefinition Width="6*"/>
85
                                <ColumnDefinition Width="4*"/>
86
                            </Grid.ColumnDefinitions>
87
                            <telerik:RadSlider x:Name="sliderPages" Value="{Binding Path=CurrentValue}" Maximum="{Binding Path=PagesCount}" 
88
                                   telerik:StyleManager.Theme="Office2016" Margin="5" HandlesVisibility="Visible"
89
                                   IsMoveToPointEnabled="True" IsSnapToTickEnabled="True" TickFrequency="1" SmallChange="1" Minimum="1" 
90
                                   ValueChanged="sliderPages_ValueChanged" ThumbStyle="{StaticResource CustomThumbStyle}"
91
                                   VerticalAlignment="Center"
92
                                   MiddleThumbClickMode="None" Cursor="Hand" DragCompleted="sliderPages_DragCompleted" 
93
                                   DragStarted="sliderPages_DragStarted" HorizontalAlignment="Stretch" />
94
                            <TextBlock Grid.Column="1" Text="{Binding Value,StringFormat='Page No:{0}', ElementName=sliderPages}" VerticalAlignment="Center"
95
                                       Margin="4"/>
96
                        </Grid>
97
                    </Border>
98
99
                    <Border Grid.Row="2">
100
                        <!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">-->
101
                        <Grid>
102
                            <Grid.ColumnDefinitions>
103
                                <ColumnDefinition Width="6*"/>
104
                                <ColumnDefinition Width="4*"/>
105
                            </Grid.ColumnDefinitions>
106
107
                            <ProgressBar Name="ProgressState" telerik:StyleManager.Theme="Office2016" Margin="3"/>
108
                        </Grid>
109
                    </Border>
110
                    <TextBlock Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="100,164,0,0" 
111
                               Foreground="Red" VerticalAlignment="Top" x:Name="testMsg"/>
112
                </Grid>
113
            </telerik:GroupBox>
114
        </Border>
115
116
        <Border Grid.Row="1" Grid.Column="1" BorderBrush="#232323" BorderThickness="0,0,0,0">
117
            <Grid>
118
                <Grid.RowDefinitions>
119
                    <RowDefinition Height="100"/>
120
                    <RowDefinition Height="60"/>
121
                    <RowDefinition Height="80"/>
122
                    <RowDefinition Height="80"/>
123
                    <RowDefinition Height="7*"/>
124
                </Grid.RowDefinitions>
125
126
                <telerik:GroupBox Header="Print Option" Margin="3" telerik:StyleManager.Theme="Office2016">
127
                    <Grid>
128
                        <Grid.RowDefinitions>
129
                            <RowDefinition Height="Auto" />
130
                            <RowDefinition Height="Auto"  MinHeight="50" />
131
                        </Grid.RowDefinitions>
132
                        <!--<StackPanel HorizontalAlignment="Stretch" Orientation="Horizontal">
133
                            <telerik:RadRadioButton Content="Current page" telerik:StyleManager.Theme="Office2016" Margin="2"/>
134
                            <telerik:RadRadioButton Content="Range of print" telerik:StyleManager.Theme="Office2016" Margin="2"/>
135
                            <telerik:RadRadioButton Content="User defined" telerik:StyleManager.Theme="Office2016" Margin="2"/>
136
                            <telerik:RadRadioButton Content="All pages" telerik:StyleManager.Theme="Office2016" Margin="2"/>
137
                        </StackPanel>-->
138
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
139
                            <CheckBox x:Name="chkOnlyMarkup" IsChecked="True" HorizontalAlignment="Right"
140
                                          VerticalAlignment="Center"  FontSize="10" FontWeight="Bold" telerik:StyleManager.Theme="Office2016" 
141
                                          Margin="0,5,4,0" Foreground="Black" Grid.Row="0"                                          
142
                                          Checked="chkOnlyMarkup_Checked" Unchecked="chkOnlyMarkup_Checked">
143
                                <CheckBox.Content>
144
                                    <TextBlock Text="Commented Page only" Margin="0,-2,0,0" FontSize="12"/>
145
                                </CheckBox.Content>
146
                            </CheckBox>
147
                            <!--<CheckBox IsChecked="True" HorizontalAlignment="Right"
148
                                          VerticalAlignment="Center"  FontSize="10" FontWeight="Bold" telerik:StyleManager.Theme="Office2016" 
149
                                          Margin="0,5,4,0" Foreground="Black" Grid.Row="0">
150
                                <CheckBox.Content>
151
                                    <TextBlock Text="User Color" Margin="0,-2,0,0" FontSize="12"/>
152
                                </CheckBox.Content>
153
                            </CheckBox>-->
154
                        </StackPanel>
155
156
                        <StackPanel Orientation="Horizontal" Grid.Row="1" >
157
                            <telerik:RadRadioButton Tag="Current" Content="Current" telerik:StyleManager.Theme="Office2016" Margin="5"
158
                                                            Name="btCurrentPages" Grid.Row="1" Checked="PageSelect_Checked" IsChecked="True"/>
159
                            <telerik:RadRadioButton Tag="RangePrint" Grid.Column="1" Content="Range of Print" telerik:StyleManager.Theme="Office2016"  
160
                                                            Margin="5" Name="btRagePages" Grid.Row="1"  Checked="PageSelect_Checked"/>
161
                            <telerik:RadRadioButton Tag="UserDefined" Grid.Column="2" Content="User defined" telerik:StyleManager.Theme="Office2016"  
162
                                                            Margin="5" Grid.Row="1" Checked="PageSelect_Checked"/>
163
                            <telerik:RadRadioButton Tag="AllPrint" Grid.Column="3" Content="All Pages" telerik:StyleManager.Theme="Office2016"  
164
                                                            Margin="5"   Grid.Row="1" Checked="PageSelect_Checked"/>
165
                        </StackPanel>
166
167
                    </Grid>
168
                </telerik:GroupBox>
169
                <!--프린트 범위-->
170
                <telerik:GroupBox x:Name="Selected_Print" telerik:StyleManager.Theme="Office2016" Grid.Row="1" Header="Selected Print" Margin="3">
171
                    <Grid>
172
                        <telerik:RadComboBox x:Name="cbPrint" Width="300" telerik:StyleManager.Theme="Office2016" HorizontalAlignment="Left"></telerik:RadComboBox>
173
                    </Grid>
174
                </telerik:GroupBox>
175
176
                <telerik:GroupBox telerik:StyleManager.Theme="Office2016" Grid.Row="2" Header="Print Range" Margin="3">
177
                    <Grid x:Name="rangeView">
178
                        <!--Current Grid Start-->
179
                        <Grid Name="GridCurrentPage" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,0"
180
                              Visibility="Visible">
181
                            <StackPanel>
182
                                <TextBlock Text="Print out the page currently displayed on the screen !"/>
183
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
184
                                    <TextBlock Text="Current Page : "/>
185
                                    <TextBlock Text="{Binding Value,StringFormat=' {0}', ElementName=sliderPages}" Foreground="#FF45BAFF" 
186
                                                   FontWeight="Bold"/>
187
                                </StackPanel>
188
                            </StackPanel>
189
                        </Grid>
190
                        <!--Current Grid End-->
191
                        <!--Range of Print Start-->
192
                        <Grid Name="GridRangePages" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed"  Margin="0,0,0,0">
193
                            <Grid.ColumnDefinitions>
194
                                <ColumnDefinition Width="Auto"/>
195
                                <ColumnDefinition/>
196
                                <ColumnDefinition/>
197
                                <ColumnDefinition/>
198
                            </Grid.ColumnDefinitions>
199
                            <TextBlock Text="Select Page Number : " VerticalAlignment="Center"/>
200
                            <telInput:RadNumericUpDown Grid.Column="1" Name="stPageNo" NumberDecimalDigits="0" ValueChanged="PageNo_ValueChanged"
201
                                                               telerik:StyleManager.Theme="Office2016" Minimum="1"/>
202
                            <TextBlock Text="~"   Grid.Column="2" VerticalAlignment="Center"/>
203
                            <telInput:RadNumericUpDown Grid.Column="3" Name="edPageNo" NumberDecimalDigits="0" ValueChanged="PageNo_ValueChanged"
204
                                                               telerik:StyleManager.Theme="Office2016" Minimum="1" />
205
                        </Grid>
206
                        <!--Range of Print End-->
207
                        <!--User defined Start-->
208
                        <Grid Name="GridDefinePages" VerticalAlignment="Center" HorizontalAlignment="Stretch" Visibility="Collapsed"  Margin="0,0,0,0">
209
                            <Border>
210
                                <Grid>
211
                                    <Grid.ColumnDefinitions>
212
                                        <ColumnDefinition  Width="Auto"/>
213
                                        <ColumnDefinition  Width="3*"/>
214
                                        <ColumnDefinition  Width="2*"/>
215
                                    </Grid.ColumnDefinitions>
216
                                    <Grid.RowDefinitions>
217
                                        <RowDefinition Height="Auto"/>
218
                                        <RowDefinition Height="Auto"/>
219
                                    </Grid.RowDefinitions>
220
                                    <TextBlock Text="Input Page Number" VerticalAlignment="Center"
221
                                                       Margin="10,0" />
222
                                    <TextBox Name="txtDefinedPages" Grid.Column="1" Margin="2"
223
                                                     TextChanged="txtDefinedPages_TextChanged"
224
                                                     Text="{Binding Path=DefinedPagesStrings,Mode=TwoWay,ValidatesOnExceptions=True,
225
                                                     NotifyOnValidationError=True}"/>
226
                                    <telerik:RadButton x:Name="btnClearDefinedPages" Content="Clear" Grid.Column="2" Margin="2"  
227
                                                               telerik:StyleManager.Theme="Office2016" Click="btnClearDefinedPages_Click"/>
228
                                    <TextBlock Grid.Row="1" Grid.ColumnSpan="3" 
229
                                                       HorizontalAlignment="Center" Margin="5,5">
230
                                        <TextBlock.Inlines>
231
                                            <Run>Enter page numbers and / or page ranges</Run>
232
                                            <LineBreak/>
233
                                            <Run>separated by commas</Run>
234
                                            <Underline>
235
                                                <Run Foreground="Red" FontSize="11">[For example, 1,3,5-12]</Run>
236
                                            </Underline>
237
                                        </TextBlock.Inlines>
238
                                    </TextBlock>
239
                                </Grid>
240
                            </Border>
241
                        </Grid>
242
                        <!--User defined  Start-->
243
                        <!--All Pages Start-->
244
                        <Grid Name="GridAllPages" VerticalAlignment="Center" HorizontalAlignment="Center" 
245
                                      Grid.Row="2" Visibility="Collapsed"  Margin="0,0,0,0">
246
                            <StackPanel>
247
                                <TextBlock Text="Indicates all of the pages in the current document are to be printed." TextWrapping="Wrap"
248
                                           TextAlignment="Center"/>
249
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="3">
250
                                    <TextBlock Text="Document Pages : " Foreground="#FF006AC1"/>
251
                                    <TextBlock Text="{Binding Path=PagesCount}" Foreground="#FF45BAFF" 
252
                                                   FontWeight="Bold"/>
253
                                </StackPanel>
254
                            </StackPanel>
255
                        </Grid>
256
                        <!--All Pages End-->
257
                    </Grid>
258
                </telerik:GroupBox>
259
                <!--프린트 범위-->
260
261
                <telerik:GroupBox telerik:StyleManager.Theme="Office2016" Grid.Row="3" Margin="3" Header="Commented Pages(Click To Select Page)">
262
                    <ListBox telerik:StyleManager.Theme="Office2016" x:Name="CommentPageList" Foreground="Black"  
263
                                     ScrollViewer.HorizontalScrollBarVisibility="Auto"
264
                                     SelectionChanged="CommentPageList_SelectionChanged">
265
                        <ListBox.ItemsPanel>
266
                            <ItemsPanelTemplate>
267
                                <wrappanel:WrapPanel Orientation="Horizontal" VerticalAlignment="Center"/>
268
                            </ItemsPanelTemplate>
269
                        </ListBox.ItemsPanel>
270
                        <ListBox.ItemTemplate>
271
                            <DataTemplate>
272
                                <Border Background="#FF45BA44" BorderThickness="0.5" BorderBrush="#232323" Width="20" Height="20">
273
                                    <TextBlock Text="{Binding PageNumber}" Foreground="White" VerticalAlignment="Center" Margin="2" 
274
                                                     HorizontalAlignment="Center"/>
275
                                </Border>
276
                            </DataTemplate>
277
                        </ListBox.ItemTemplate>
278
                    </ListBox>
279
                </telerik:GroupBox>
280
281
                <Border Grid.Row="4" Margin="3">
282
                    <Grid>
283
                        <Grid.RowDefinitions>
284
                            <RowDefinition Height="8.5*"/>
285
                            <RowDefinition Height="1.5*"/>
286
                        </Grid.RowDefinitions>
287
                        <telerik:GroupBox telerik:StyleManager.Theme="Office2016" Grid.Row="0" Margin="0"
288
                                          Header="Commented User list">
289
                            <telerik:RadGridView Grid.Row="0" telerik:StyleManager.Theme="Office2016" IsFilteringAllowed="False" ScrollViewer.VerticalScrollBarVisibility="Auto"
290
                                                     AutoGenerateColumns="False" ShowGroupPanel="False" ShowGroupFooters="False"
291
                                                                                                     CanUserDeleteRows="True" CanUserInsertRows="False"  EditTriggers="TextInput" 
292
                                                     RowIndicatorVisibility="Collapsed" x:Name="gridViewMarkup" Margin="2" 
293
                                                     SelectionChanged="gridViewMarkup_SelectionChanged" BorderBrush="#232323" BorderThickness="0.5"
294
                                                     SelectionMode="Multiple" Background="White" SelectionUnit="FullRow" IsBusy="False">
295
                                <telerik:RadGridView.Columns>
296
                                    <telerik:GridViewSelectColumn />
297
                                    <telerik:GridViewDataColumn Header="Color"  IsReadOnly="True">
298
                                        <telerik:GridViewDataColumn.CellTemplate>
299
                                            <DataTemplate>
300
                                                <Grid Background="AliceBlue">
301
                                                    <!--<Rectangle Fill="{Binding DisplayColor, Converter={StaticResource StringToColorConverter}}" />-->
302
                                                    <Rectangle Fill="{Binding DisplayColor}" />
303
                                                    <TextBlock Text="Color" Foreground="#00000000"/>
304
                                                </Grid>
305
                                            </DataTemplate>
306
                                        </telerik:GridViewDataColumn.CellTemplate>
307
                                    </telerik:GridViewDataColumn>
308
309
                                    <telerik:GridViewDataColumn Width="1*" DataMemberBinding="{Binding Depatment}" Header="Department" IsReadOnly="True"/>
310
                                    <telerik:GridViewDataColumn Width="1*" DataMemberBinding="{Binding UserName}" Header="User Name" IsReadOnly="True"/>
311
                                    <telerik:GridViewDataColumn Width="0.5*" DataMemberBinding="{Binding PageCount}" Header="Pages" IsReadOnly="True"/>
312
                                    <telerik:GridViewDataColumn Width="1*" DataMemberBinding="{Binding Description}" Header="Descriptions" IsReadOnly="True"/>
313
314
                                </telerik:RadGridView.Columns>
315
                            </telerik:RadGridView>
316
                        </telerik:GroupBox>
317
                        <Border Grid.Row="1">
318
                            <Grid>
319
                                <Grid.ColumnDefinitions>
320
                                    <ColumnDefinition/>
321
                                    <ColumnDefinition/>
322
                                    <ColumnDefinition/>
323
                                    <ColumnDefinition/>
324
                                    <!--강인구 추가(Export)-->
325
                                    <ColumnDefinition/>
326
327
                                </Grid.ColumnDefinitions>
328
                                <Border  Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Margin="0">
329
                                    <Grid>
330
                                        <Grid.ColumnDefinitions>
331
                                            <ColumnDefinition Width="7*"/>
332
                                            <ColumnDefinition Width="3*"/>
333
                                        </Grid.ColumnDefinitions>
334
                                    </Grid>
335
                                </Border>
336
                                <telerik:RadButton x:Name="btnWholePrint" Content="Print" Grid.Row="4" Grid.Column="2" Margin="0"
337
                                           telerik:StyleManager.Theme="Office2016" Background="#FF45BAFF" Foreground="White"
338
                                           Click="PrintMethod"/>
339
                                <!--강인구 추가(Export)-->
340
                                <telerik:RadButton x:Name="btnWholeExport" Content="Export" Grid.Row="4" Grid.Column="2" Margin="0"
341
                                           telerik:StyleManager.Theme="Office2016" Background="#FF45BAFF" Foreground="White"
342
                                           Click="ExportMethod" Visibility="Collapsed"/>
343
344
                                <Border Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Margin="0">
345
                                    <Grid>
346
                                        <Grid.RowDefinitions>
347
                                            <RowDefinition/>
348
                                            <RowDefinition/>
349
                                        </Grid.RowDefinitions>
350
                                        <Grid.ColumnDefinitions>
351
                                            <ColumnDefinition Width="7*"/>
352
                                            <ColumnDefinition Width="3*"/>
353
                                        </Grid.ColumnDefinitions>
354
                                    </Grid>
355
                                </Border>
356
                            </Grid>
357
                        </Border>
358
                    </Grid>
359
                </Border>
360
            </Grid>
361
        </Border>
362
        <telerik:RadBusyIndicator x:Name="printIndy"
363
                                          Grid.Row="1"
364
                                          Grid.ColumnSpan="2"
365
                                          VerticalAlignment="Stretch"
366
                                          BorderThickness="0"
367
                                          BusyContent="Printing. . ."
368
                                          IsBusy="False"
369
                                          telerik:StyleManager.Theme="Office2016" />
370
    </Grid>
371
</UserControl>
클립보드 이미지 추가 (최대 크기: 500 MB)