개정판 6c687be8
thumbnail 속도 문제로 되돌림
Change-Id: If873bc60f8159428b34e3df6cedb48f9675e0485
KCOM/Common/ThumbnailItem.cs | ||
---|---|---|
12 | 12 |
{ |
13 | 13 |
public ThumbnailItem() |
14 | 14 |
{ |
15 |
DisplayColorItems = new List<SetColorMarkupItem>(); |
|
16 | 15 |
} |
17 | 16 |
|
18 | 17 |
public Uri ImageUri { get; set; } |
... | ... | |
21 | 20 |
|
22 | 21 |
public List<SetColorMarkupItem> DisplayColorItems |
23 | 22 |
{ |
24 |
get { return _DisplayColorItems; } |
|
25 |
set { _DisplayColorItems = value; |
|
26 |
NotifyPropertyChanged("DisplayColorItems"); |
|
23 |
get { |
|
24 |
|
|
25 |
if(_DisplayColorItems == null) |
|
26 |
{ |
|
27 |
_DisplayColorItems = new List<SetColorMarkupItem>(); |
|
28 |
} |
|
29 |
|
|
30 |
return _DisplayColorItems; |
|
31 |
} |
|
32 |
|
|
33 |
set { |
|
34 |
|
|
35 |
if (_DisplayColorItems != value) |
|
36 |
{ |
|
37 |
_DisplayColorItems = value; |
|
38 |
|
|
39 |
NotifyPropertyChanged("DisplayColorItems"); |
|
40 |
} |
|
41 |
} |
|
42 |
} |
|
43 |
|
|
44 |
private int _Angle; |
|
45 |
|
|
46 |
public int Angle |
|
47 |
{ |
|
48 |
get |
|
49 |
{ |
|
50 |
return _Angle; |
|
51 |
} |
|
52 |
|
|
53 |
set |
|
54 |
{ |
|
55 |
if (_Angle != value) |
|
56 |
{ |
|
57 |
_Angle = value; |
|
58 |
|
|
59 |
NotifyPropertyChanged("Angle"); |
|
60 |
} |
|
27 | 61 |
} |
28 | 62 |
} |
29 | 63 |
|
30 |
|
|
31 | 64 |
public int PageNumber { get; set; } |
32 |
public int Angle { get; set; } |
|
33 |
|
|
65 |
|
|
34 | 66 |
//강인구 추가 |
35 | 67 |
public double Width { get; set; } |
36 | 68 |
public double Height { get; set; } |
KCOM/Controls/Sample.xaml | ||
---|---|---|
2 | 2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | 3 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | 4 |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 |
xmlns:controls="clr-namespace:KCOM.Controls" |
|
5 | 6 |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:common="clr-namespace:KCOM.Common" |
6 | 7 |
xmlns:local="clr-namespace:KCOM.Controls" xmlns:System="clr-namespace:System;assembly=mscorlib" |
7 | 8 |
mc:Ignorable="d" Background="#f5f5f5" xmlns:converter="clr-namespace:KCOM.Common.Converter" |
... | ... | |
27 | 28 |
<Setter Property="Template"> |
28 | 29 |
<Setter.Value> |
29 | 30 |
<ControlTemplate TargetType="{x:Type telerik:RadListBoxItem}"> |
30 |
<Border x:Name="myBorder" |
|
31 |
Padding="0" Margin="0 3 20 0"
|
|
31 |
<Border x:Name="myBorder" VerticalAlignment="Center"
|
|
32 |
Padding="0" Margin="1"
|
|
32 | 33 |
SnapsToDevicePixels="False"> |
33 | 34 |
<Border.Style> |
34 | 35 |
<Style TargetType="Border"> |
... | ... | |
36 | 37 |
<Setter Property="BorderBrush" Value="Transparent"/> |
37 | 38 |
</Style> |
38 | 39 |
</Border.Style> |
39 |
<ContentPresenter /> |
|
40 |
<ContentPresenter Margin="5"/>
|
|
40 | 41 |
</Border> |
41 | 42 |
<ControlTemplate.Triggers> |
42 | 43 |
<Trigger Property="IsSelected" Value="true"> |
... | ... | |
457 | 458 |
Margin="2" Foreground="White" Content="Show All Pages" x:Name="btnPanorama" Click="btnPanorama_Click" Background="#FF0054B9" HorizontalAlignment="Right"/> |
458 | 459 |
<Border BorderThickness="1" Margin="1" Grid.Row="1" BorderBrush="#FFC9C9C9" Background="White"> |
459 | 460 |
<StackPanel> |
460 |
<RadioButton Content="All Pages" IsChecked="True" telerik:StyleManager.Theme="Office2013" FontSize="10" Margin="5,3" x:Name="rdoAllPages"/> |
|
461 |
<RadioButton Content="Favorited Pages" FontSize="10" Margin="5,3" x:Name="rdoFavoritePages" Checked="rdoFavoritePages_Checked"/>
|
|
461 |
<RadioButton Content="All Pages" IsChecked="True" telerik:StyleManager.Theme="Office2013" FontSize="10" Margin="5,3" Click="ShowPageChange" x:Name="rdoAllPages"/>
|
|
462 |
<RadioButton Content="Favorited Pages" FontSize="10" Margin="5,3" x:Name="rdoFavoritePages" Click="ShowPageChange" />
|
|
462 | 463 |
<Grid Margin="4.5,0"> |
463 | 464 |
<telerik:RadExpander Name="expCommentPages" |
464 | 465 |
Padding="2" |
... | ... | |
479 | 480 |
</Grid> |
480 | 481 |
</StackPanel> |
481 | 482 |
</Border> |
482 |
<telerik:RadListBox x:Name="ImgListbox" Margin="1" |
|
483 |
<!--<telerik:RadListBox x:Name="ImgListbox" Margin="1"
|
|
483 | 484 |
ItemTemplate="{StaticResource ThumbnailDataTemplate}" |
484 | 485 |
Grid.Row="2" |
485 | 486 |
SelectedItem="{Binding}" |
... | ... | |
499 | 500 |
<VirtualizingStackPanel/> |
500 | 501 |
</ItemsPanelTemplate> |
501 | 502 |
</telerik:RadListBox.ItemsPanel> |
502 |
<!--<telerik:RadListBox.ItemTemplate> |
|
503 |
<DataTemplate> |
|
504 |
<StackPanel> |
|
505 |
<Border BorderThickness="1" BorderBrush="{DynamicResource KCOMColor_ReadOnlyBorderBrush}" x:Name="selectBorder"> |
|
506 |
<Image Stretch="UniformToFill" > |
|
507 |
<Image.Source> |
|
508 |
<BitmapImage UriSource="{Binding ImageUri}" DecodePixelWidth="400" /> |
|
509 |
</Image.Source> |
|
510 |
</Image> |
|
511 |
</Border> |
|
512 |
<TextBlock Text="{Binding PageNumber}" HorizontalAlignment="Center" Margin="0,1,0,0"/> |
|
513 |
</StackPanel> |
|
514 |
</DataTemplate> |
|
515 |
</telerik:RadListBox.ItemTemplate>--> |
|
503 |
</telerik:RadListBox>--> |
|
504 |
<telerik:RadListBox x:Name="ImgListbox" Margin="1" |
|
505 |
Grid.Row="2" |
|
506 |
Background="{DynamicResource KCOMColor_AlternativeBrush}" |
|
507 |
ItemContainerStyle="{StaticResource ItemContainerStyle}" |
|
508 |
BorderBrush="#FFC2C2C2" BorderThickness="0" |
|
509 |
SelectedIndex="0" |
|
510 |
ScrollViewer.HorizontalScrollBarVisibility="Disabled" |
|
511 |
ScrollViewer.VerticalScrollBarVisibility="Auto" |
|
512 |
ScrollViewer.CanContentScroll="True" |
|
513 |
telerik:StyleManager.Theme="Office2016" > |
|
514 |
<telerik:RadListBox.ItemsPanel> |
|
515 |
<ItemsPanelTemplate> |
|
516 |
<VirtualizingStackPanel/> |
|
517 |
</ItemsPanelTemplate> |
|
518 |
</telerik:RadListBox.ItemsPanel> |
|
519 |
<telerik:RadListBox.ItemTemplate> |
|
520 |
<DataTemplate> |
|
521 |
<Grid x:Name="LayoutRoot"> |
|
522 |
<Grid></Grid> |
|
523 |
<Grid VerticalAlignment="Center" > |
|
524 |
<Grid.RowDefinitions> |
|
525 |
<RowDefinition Height="Auto"/> |
|
526 |
<RowDefinition Height="Auto"/> |
|
527 |
</Grid.RowDefinitions> |
|
528 |
<Grid x:Name="imgRoot"> |
|
529 |
<Border x:Name="imgBorder" BorderBrush="{DynamicResource KCOMColor_ReadOnlyBorderBrush}" |
|
530 |
RenderTransformOrigin="0.5,0.5" BorderThickness="1,1,1.5,1.5"> |
|
531 |
<Border.RenderTransform> |
|
532 |
<RotateTransform Angle="{Binding Angle, Mode=TwoWay}"/> |
|
533 |
</Border.RenderTransform> |
|
534 |
<Image Stretch="Uniform" Source="{Binding ImageUri,IsAsync=True}"/> |
|
535 |
</Border> |
|
536 |
</Grid> |
|
537 |
<TextBlock Grid.Row="1" Text="{Binding PageNumber, FallbackValue=PageNo}" FontStyle="Italic" FontSize="14" VerticalAlignment="Bottom" HorizontalAlignment="Center"/> |
|
538 |
</Grid> |
|
539 |
<Border Width="30" Height="20" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="10,5"> |
|
540 |
<controls:MarkupColorList ColorList="{Binding DisplayColorItems,Mode=TwoWay}" Opacity="90"/> |
|
541 |
</Border> |
|
542 |
</Grid> |
|
543 |
</DataTemplate> |
|
544 |
</telerik:RadListBox.ItemTemplate> |
|
545 |
<!--<telerik:RadListBox.ItemsPanel> |
|
546 |
<ItemsPanelTemplate> |
|
547 |
<VirtualizingStackPanel/> |
|
548 |
</ItemsPanelTemplate> |
|
549 |
</telerik:RadListBox.ItemsPanel>--> |
|
516 | 550 |
</telerik:RadListBox> |
517 | 551 |
</Grid> |
518 | 552 |
</telerik:RadTabItem> |
KCOM/Controls/Sample.xaml.cs | ||
---|---|---|
9 | 9 |
using System.ComponentModel; |
10 | 10 |
using System.Diagnostics; |
11 | 11 |
using System.Linq; |
12 |
using System.Threading; |
|
12 | 13 |
using System.Threading.Tasks; |
13 | 14 |
using System.Windows; |
14 | 15 |
using System.Windows.Controls; |
... | ... | |
27 | 28 |
public List<FAVORITE_DOC> _FavoriteSet { get; set; } |
28 | 29 |
public event PropertyChangedEventHandler PropertyChanged; |
29 | 30 |
|
30 |
PageManager.PageStorage samplePageStorage; |
|
31 |
//PageManager.PageStorage samplePageStorage;
|
|
31 | 32 |
|
32 | 33 |
public Sample() |
33 | 34 |
{ |
... | ... | |
45 | 46 |
|
46 | 47 |
private void Sample_Unloaded(object sender, RoutedEventArgs e) |
47 | 48 |
{ |
48 |
if (samplePageStorage != null) |
|
49 |
{ |
|
50 |
samplePageStorage.Clear(); |
|
51 |
} |
|
49 |
|
|
52 | 50 |
} |
53 | 51 |
|
54 | 52 |
private void Sample_Loaded(object sender, RoutedEventArgs e) |
... | ... | |
115 | 113 |
|
116 | 114 |
public async Task SetPageNaviAsync(List<DOCPAGE> PageList, string DefaultUri) |
117 | 115 |
{ |
116 |
//rdoAllPages.Checked += new RoutedEventHandler(rdoCommented_Checked); |
|
117 |
//rdoFavoritePages.Checked += new RoutedEventHandler(rdoFavoritePages_Checked); |
|
118 |
expCommentPages.PreviewCollapsed += new Telerik.Windows.RadRoutedEventHandler(expCommentPages_PreviewCollapsed); |
|
119 |
expCommentPages.PreviewExpanded += new Telerik.Windows.RadRoutedEventHandler(expCommentPages_PreviewExpanded); |
|
120 |
|
|
118 | 121 |
this._PageList = PageList; |
119 | 122 |
this._DefaultUri = DefaultUri; |
120 | 123 |
|
121 | 124 |
string tempStoragePath = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "MARKUS", System.IO.Path.GetRandomFileName()); |
122 | 125 |
|
123 |
samplePageStorage = new PageManager.PageStorage(_DefaultUri, tempStoragePath,"jpg", _PageList.Count(), _PageList.Count()); |
|
126 |
//samplePageStorage = new PageManager.PageStorage(_DefaultUri, tempStoragePath,"jpg", _PageList.Count(), _PageList.Count());
|
|
124 | 127 |
|
125 |
await ThumbnailSetAsync(); |
|
128 |
if (cts != null) |
|
129 |
{ |
|
130 |
cts.CancelAfter(100); |
|
131 |
} |
|
132 |
|
|
133 |
cts = new CancellationTokenSource(); |
|
134 |
|
|
135 |
await this.Dispatcher.InvokeAsync(()=> ThumbnailSetAsync(cts.Token)); |
|
126 | 136 |
|
127 | 137 |
this.PageCount = PageList.Count(); |
128 | 138 |
|
129 | 139 |
//ThumbNmailSet(); |
130 |
rdoAllPages.Checked += new RoutedEventHandler(rdoCommented_Checked); |
|
131 |
rdoFavoritePages.Checked += new RoutedEventHandler(rdoFavoritePages_Checked); |
|
132 |
expCommentPages.PreviewCollapsed += new Telerik.Windows.RadRoutedEventHandler(expCommentPages_PreviewCollapsed); |
|
133 |
expCommentPages.PreviewExpanded += new Telerik.Windows.RadRoutedEventHandler(expCommentPages_PreviewExpanded); |
|
140 |
|
|
134 | 141 |
} |
135 | 142 |
|
136 | 143 |
void rdoCommented_Checked(object sender, RoutedEventArgs e) |
... | ... | |
149 | 156 |
_FavoriteSet = _FavoriteSet == null ? new List<FAVORITE_DOC>() : _FavoriteSet; |
150 | 157 |
if (_FavoriteSet.Count > 0) |
151 | 158 |
{ |
152 |
SetCommentPages_Favorite(); //수정
|
|
159 |
SetCommentPages(); //수정 |
|
153 | 160 |
} |
154 | 161 |
else |
155 | 162 |
{ |
... | ... | |
158 | 165 |
} |
159 | 166 |
} |
160 | 167 |
|
161 |
private async void SetCommentPages_Favorite()
|
|
168 |
private async void ShowPageChange(object sender, RoutedEventArgs e)
|
|
162 | 169 |
{ |
163 |
await ThumbnailSetAsync(); |
|
164 |
SetCommentPages(); |
|
170 |
if (rdoAllPages.IsChecked == true) expCommentPages.IsExpanded = false; |
|
171 |
|
|
172 |
if (cts != null) |
|
173 |
{ |
|
174 |
cts.CancelAfter(100); |
|
175 |
} |
|
176 |
|
|
177 |
cts = new CancellationTokenSource(); |
|
178 |
|
|
179 |
await this.Dispatcher.InvokeAsync(() => ThumbnailSetAsync(cts.Token)); |
|
165 | 180 |
} |
166 | 181 |
|
167 | 182 |
void expCommentPages_PreviewCollapsed(object sender, Telerik.Windows.RadRoutedEventArgs e) |
... | ... | |
463 | 478 |
|
464 | 479 |
public async void SetCommentPages() |
465 | 480 |
{ |
466 |
await ThumbnailSetAsync(); |
|
467 |
SetCommentList(UsersCommentPagesList.ToList()); |
|
481 |
if (cts != null) |
|
482 |
{ |
|
483 |
cts.CancelAfter(100); |
|
484 |
} |
|
485 |
|
|
486 |
cts = new CancellationTokenSource(); |
|
487 |
|
|
488 |
await this.Dispatcher.InvokeAsync(() => ThumbnailSetAsync(cts.Token)); |
|
489 |
//SetCommentList(UsersCommentPagesList.ToList()); |
|
468 | 490 |
} |
469 | 491 |
|
470 | 492 |
public void SetCommentList(List<UsersCommentPagesMember> UsersCommentPagesList) |
... | ... | |
472 | 494 |
Logger.sendCheckLog("SetCommentList", 1); |
473 | 495 |
Logger.sendCheckLog("SetCommentList_기존 Comment 색상 제거", 1); |
474 | 496 |
#region 기존 색상 제거 작업 |
497 |
|
|
475 | 498 |
foreach (var item in this._thumbnailItems) |
476 | 499 |
{ |
477 |
item.DisplayColorItems.Clear(); |
|
500 |
if (item.DisplayColorItems != null) |
|
501 |
{ |
|
502 |
item.DisplayColorItems.Clear(); |
|
503 |
} |
|
478 | 504 |
} |
479 | 505 |
#endregion |
480 | 506 |
|
... | ... | |
560 | 586 |
|
561 | 587 |
} |
562 | 588 |
|
563 |
private async Task ThumbnailSetAsync() |
|
589 |
CancellationTokenSource cts = null; |
|
590 |
|
|
591 |
private void ThumbnailSetAsync(CancellationToken ct) |
|
564 | 592 |
{ |
565 | 593 |
Logger.sendCheckLog("ThumbnailSet", 1); |
566 |
|
|
567 |
this._thumbnailItems = new ObservableCollection<ThumbnailItem>(); |
|
568 |
List<int> _selectComment = new List<int>(); |
|
569 |
if (this.lstSelectComment.ItemsSource != null) |
|
570 |
{ |
|
571 |
var _pages = from commentPage in this.lstSelectComment.ItemsSource.Cast<UsersCommentPagesMember>() |
|
572 |
where commentPage.IsSelected == true |
|
573 |
select commentPage.PageNumber; |
|
574 | 594 |
|
575 |
foreach (var item in _pages) |
|
576 |
{ |
|
577 |
item.ForEach(pp => _selectComment.Add(pp)); |
|
578 |
} |
|
595 |
_thumbnailItems = new ObservableCollection<ThumbnailItem>(); |
|
596 |
ImgListbox.ItemsSource = null; |
|
597 |
|
|
598 |
IEnumerable<int> selectComment = null; |
|
599 |
IEnumerable<DOCPAGE> pageList = null; |
|
579 | 600 |
|
580 |
_selectComment.Distinct(); |
|
601 |
if (this.lstSelectComment.ItemsSource != null) |
|
602 |
{ |
|
603 |
selectComment = (from commentPage in this.UsersCommentPagesList |
|
604 |
where commentPage.IsSelected == true |
|
605 |
select commentPage.PageNumber).SelectMany(x => x).Distinct(); |
|
581 | 606 |
} |
582 | 607 |
|
583 | 608 |
var uri = _DefaultUri.Replace("{0}/{1}_{2}", "8/0_0"); |
584 |
this._PageList = this._PageList.OrderBy(data => data.PAGE_NUMBER).ToList(); |
|
585 |
//this._PageList.ForEach(page => |
|
586 | 609 |
|
587 |
var items = ViewerDataModel.Instance.Document_Info.OrderBy(data => data.PAGE_NUMBER).ToList(); |
|
610 |
if (rdoAllPages.IsChecked == true) |
|
611 |
{ |
|
612 |
pageList = ViewerDataModel.Instance.Document_Info; |
|
613 |
} |
|
614 |
else if (expCommentPages.IsExpanded == true) |
|
615 |
{ |
|
616 |
if (selectComment != null) |
|
617 |
{ |
|
618 |
pageList = ViewerDataModel.Instance.Document_Info |
|
619 |
.Where(p => selectComment.Where(s => s == p.PAGE_NUMBER).Count() > 0); |
|
620 |
} |
|
621 |
} |
|
622 |
else if (rdoFavoritePages.IsChecked == true) |
|
623 |
{ |
|
624 |
if (_FavoriteSet != null) |
|
625 |
{ |
|
626 |
pageList = ViewerDataModel.Instance.Document_Info |
|
627 |
.Where(p => _FavoriteSet.Where(data => data.PAGE_NO == p.PAGE_NUMBER).FirstOrDefault() != null); |
|
628 |
} |
|
629 |
} |
|
588 | 630 |
|
589 |
foreach (var page in items)
|
|
631 |
if (pageList?.Count() > 0)
|
|
590 | 632 |
{ |
591 |
System.Diagnostics.Debug.WriteLine("thumbnail download process " + page.PAGE_NUMBER); |
|
633 |
var items = from page in pageList |
|
634 |
let pageLink = uri.Replace("{PageNo}", page.PAGE_NUMBER.ToString()) |
|
635 |
orderby page.PAGE_NUMBER |
|
636 |
select new ThumbnailItem |
|
637 |
{ |
|
638 |
ImageUri = new Uri(pageLink), |
|
639 |
PageUri = new Uri(pageLink.Replace("jpg", "png")), |
|
640 |
PageNumber = page.PAGE_NUMBER, |
|
641 |
Angle = page.PAGE_ANGLE |
|
642 |
}; |
|
592 | 643 |
|
593 |
//} |
|
594 |
//ViewerDataModel.Instance.Document_Info.OrderBy(data => data.PAGE_NUMBER).ToList().ForEach(page => |
|
595 |
//{ |
|
596 |
var _pageNo = page.PAGE_NUMBER; |
|
597 |
bool _addFlag = false; |
|
598 | 644 |
|
599 |
if (rdoFavoritePages.IsChecked == false)
|
|
645 |
if (items.Count() > 0)
|
|
600 | 646 |
{ |
601 |
if (_selectComment.Count() > 0)
|
|
647 |
try
|
|
602 | 648 |
{ |
603 |
if ((rdoAllPages.IsChecked == true) |
|
604 |
|| (expCommentPages.IsExpanded == true && _selectComment.Where(s => s == _pageNo).Count() > 0)) |
|
605 |
{ |
|
606 |
_addFlag = true; |
|
607 |
} |
|
608 |
} |
|
609 |
else |
|
610 |
{ |
|
611 |
//if (App.ViewInfo.IsCustomPage) |
|
612 |
//{ |
|
613 |
// //_addFlag = false; |
|
614 |
|
|
615 |
// //App.ViewInfo.IsCustomPage = false; |
|
616 |
// //this.rdoAllPages.Visibility = System.Windows.Visibility.Collapsed; |
|
617 |
// //this.lstSelectComment.Visibility = System.Windows.Visibility.Collapsed; |
|
618 |
// this.rdoAllPages.IsChecked = false; |
|
619 |
// this.rdoFavoritePages.IsChecked = true; |
|
620 |
// //SetCommentPages(); |
|
621 |
//} |
|
622 |
//else |
|
649 |
//await this.Dispatcher.InvokeAsync(() => |
|
623 | 650 |
//{ |
624 |
_addFlag = true; |
|
625 |
//} |
|
651 |
foreach (var item in items.ToList()) |
|
652 |
{ |
|
653 |
if (!ct.IsCancellationRequested) |
|
654 |
{ |
|
655 |
_thumbnailItems.Add(item); |
|
656 |
System.Diagnostics.Debug.WriteLine("Page Set : " + item.PageNumber); |
|
657 |
} |
|
658 |
} |
|
659 |
//}, System.Windows.Threading.DispatcherPriority.Background, ct); |
|
626 | 660 |
} |
627 |
} |
|
628 |
|
|
629 |
var pageUri = await samplePageStorage.GetPageUriAsync(_pageNo); |
|
630 |
|
|
631 |
if (_addFlag) |
|
632 |
{ |
|
633 |
|
|
634 |
this._thumbnailItems.Add(new ThumbnailItem |
|
661 |
catch (OperationCanceledException ex) |
|
635 | 662 |
{ |
636 |
ImageUri = pageUri, |
|
637 |
PageUri = new Uri(uri.Replace("{PageNo}", _pageNo.ToString()).Replace("jpg","png")), |
|
638 |
PageNumber = _pageNo, |
|
639 |
Angle = page.PAGE_ANGLE, |
|
640 |
}); |
|
641 |
} |
|
642 |
else |
|
643 |
{ |
|
644 |
if ((rdoFavoritePages.IsChecked == true) && _FavoriteSet.Where(data => data.PAGE_NO == _pageNo).FirstOrDefault() != null) |
|
645 |
{ |
|
646 |
this._thumbnailItems.Add(new ThumbnailItem |
|
647 |
{ |
|
648 |
ImageUri = pageUri, |
|
649 |
PageNumber = _pageNo, |
|
650 |
Angle = page.PAGE_ANGLE, |
|
651 |
}); |
|
652 |
} |
|
653 |
} |
|
654 |
|
|
655 |
if (ImgListbox.ItemsSource == null) |
|
656 |
{ |
|
657 |
ImgListbox.ItemsSource = this._thumbnailItems; |
|
658 | 663 |
|
659 |
//this.CurrentPage = this._thumbnailItems.FirstOrDefault(); |
|
664 |
} |
|
665 |
|
|
666 |
SetCommentList(UsersCommentPagesList.ToList()); |
|
660 | 667 |
|
661 |
//this._thumbnailItems.ToList().ForEach(data => |
|
662 |
//{ |
|
663 |
// data.Width = ImgListbox.ActualWidth; |
|
664 |
// data.Height = ImgListbox.ActualHeight; |
|
665 |
//}); |
|
668 |
ImgListbox.ItemsSource = _thumbnailItems; |
|
666 | 669 |
|
667 |
if (ImgListbox.Items.Count > 0)
|
|
670 |
if (_thumbnailItems.Count() > 0)
|
|
668 | 671 |
{ |
669 |
int StartPageIdx = 1;
|
|
672 |
ImgListbox.SelectedItem = _thumbnailItems[0];
|
|
670 | 673 |
|
671 |
if (StartPageIdx <= 0 || StartPageIdx > ImgListbox.Items.Count || StartPageIdx == 1)
|
|
674 |
if (ThumbInitialized != null)
|
|
672 | 675 |
{ |
673 |
ImgListbox.SelectedItem = ImgListbox.Items[0];
|
|
676 |
ThumbInitialized(this, new EventArgs());
|
|
674 | 677 |
} |
675 |
else |
|
676 |
{ |
|
677 |
ImgListbox.SelectedItem = ImgListbox.Items[StartPageIdx]; |
|
678 |
} |
|
679 |
} |
|
680 |
|
|
681 |
if (ThumbInitialized != null) |
|
682 |
{ |
|
683 |
ThumbInitialized(this, new EventArgs()); |
|
684 | 678 |
} |
679 |
//ImgListbox.UpdateLayout(); |
|
685 | 680 |
} |
686 |
else |
|
687 |
{ |
|
688 |
ImgListbox.UpdateLayout(); |
|
689 |
ImgListbox.ItemsSource = this._thumbnailItems; |
|
690 |
} |
|
691 |
|
|
692 | 681 |
} |
693 |
|
|
694 |
//if (ImgListbox.ItemsSource == null) |
|
695 |
//{ |
|
696 |
// ImgListbox.ItemsSource = this._thumbnailItems; |
|
697 |
|
|
698 |
// //this.CurrentPage = this._thumbnailItems.FirstOrDefault(); |
|
699 |
|
|
700 |
// //this._thumbnailItems.ToList().ForEach(data => |
|
701 |
// //{ |
|
702 |
// // data.Width = ImgListbox.ActualWidth; |
|
703 |
// // data.Height = ImgListbox.ActualHeight; |
|
704 |
// //}); |
|
705 |
|
|
706 |
// if (ImgListbox.Items.Count > 0) |
|
707 |
// { |
|
708 |
// int StartPageIdx = 1; |
|
709 |
|
|
710 |
// if (StartPageIdx <= 0 || StartPageIdx > ImgListbox.Items.Count || StartPageIdx == 1) |
|
711 |
// { |
|
712 |
// ImgListbox.SelectedItem = ImgListbox.Items[0]; |
|
713 |
// } |
|
714 |
// else |
|
715 |
// { |
|
716 |
// ImgListbox.SelectedItem = ImgListbox.Items[StartPageIdx]; |
|
717 |
// } |
|
718 |
// } |
|
719 |
//} |
|
720 |
//else |
|
721 |
//{ |
|
722 |
// ImgListbox.UpdateLayout(); |
|
723 |
// ImgListbox.ItemsSource = this._thumbnailItems; |
|
724 |
//} |
|
725 |
|
|
726 |
//if(ThumbInitialized != null) |
|
727 |
//{ |
|
728 |
// ThumbInitialized(this, new EventArgs()); |
|
729 |
//} |
|
730 | 682 |
} |
731 | 683 |
|
732 | 684 |
private async void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) |
... | ... | |
1377 | 1329 |
btnSearch_Click(sender, new RoutedEventArgs()); |
1378 | 1330 |
} |
1379 | 1331 |
} |
1332 |
|
|
1380 | 1333 |
} |
1381 | 1334 |
} |
KCOM/Events/Implementation/TopMenuEvent.cs | ||
---|---|---|
1625 | 1625 |
|
1626 | 1626 |
|
1627 | 1627 |
//이미지 각도 변경 시 실시간 Thumbnail 각도 변경(강인구 추가) |
1628 |
instanceMain.dzMainMenu.pageNavigator._thumbnailItems.Where(info => info.PageNumber == instanceMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber).ToList().ForEach(data => |
|
1628 |
var thumbnaillist = instanceMain.dzMainMenu.pageNavigator._thumbnailItems.Where(info => info.PageNumber == instanceMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber); |
|
1629 |
|
|
1630 |
foreach (var data in thumbnaillist) |
|
1629 | 1631 |
{ |
1630 | 1632 |
data.Angle = int.Parse(instanceMain.dzMainMenu.rotate.Angle.ToString()); |
1631 | 1633 |
|
1632 |
instanceMain.dzMainMenu.pageNavigator.ImgListbox.ItemsSource = instanceMain.dzMainMenu.pageNavigator._thumbnailItems; |
|
1634 |
//instanceMain.dzMainMenu.pageNavigator.ImgListbox.ItemsSource = instanceMain.dzMainMenu.pageNavigator._thumbnailItems;
|
|
1633 | 1635 |
var instance = instanceMain.dzMainMenu.CurrentDoc.docInfo.DOCPAGE.Where(p => p.PAGE_NUMBER == instanceMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber).FirstOrDefault(); |
1634 | 1636 |
instance.PAGE_ANGLE = int.Parse(instanceMain.dzMainMenu.rotate.Angle.ToString()); |
1635 | 1637 |
|
... | ... | |
1645 | 1647 |
{ |
1646 | 1648 |
ViewerDataModel.Instance.RotationDocs.Add(instance); |
1647 | 1649 |
} |
1648 |
});
|
|
1650 |
} |
|
1649 | 1651 |
} |
1650 | 1652 |
#endregion |
1651 | 1653 |
|
KCOM/KCOM.csproj.user | ||
---|---|---|
13 | 13 |
<VerifyUploadedFiles>false</VerifyUploadedFiles> |
14 | 14 |
</PropertyGroup> |
15 | 15 |
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> |
16 |
<StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjMwMDAwMDI1IiwiYlBhcnRuZXIiOmZhbHNlLCJDcmVhdGVGaW5hbFBERlBlcm1pc3Npb24iOnRydWUsIk5ld0NvbW1lbnRQZXJtaXNzaW9uIjp0cnVlLCJQcm9qZWN0Tk8iOiIwMDAwMDAiLCJVc2VySUQiOiJkb2Z0ZWNoIiwiTW9kZSI6MH0=</StartArguments>
|
|
16 |
<StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjMwMDAwMTUxIiwiYlBhcnRuZXIiOmZhbHNlLCJDcmVhdGVGaW5hbFBERlBlcm1pc3Npb24iOnRydWUsIk5ld0NvbW1lbnRQZXJtaXNzaW9uIjp0cnVlLCJQcm9qZWN0Tk8iOiIwMDAwMDAiLCJVc2VySUQiOiJkb2Z0ZWNoIiwiTW9kZSI6MH0=/</StartArguments>
|
|
17 | 17 |
</PropertyGroup> |
18 | 18 |
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> |
19 | 19 |
<StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjQwMDAwMTQ5IiwiYlBhcnRuZXIiOmZhbHNlLCJDcmVhdGVGaW5hbFBERlBlcm1pc3Npb24iOnRydWUsIk5ld0NvbW1lbnRQZXJtaXNzaW9uIjp0cnVlLCJQcm9qZWN0Tk8iOiIwMDAwMDAiLCJVc2VySUQiOiJhZG1pbiIsIk1vZGUiOjB9</StartArguments> |
KCOM/PageManager/PageStorage.cs | ||
---|---|---|
220 | 220 |
} |
221 | 221 |
else |
222 | 222 |
{ |
223 |
|
|
224 | 223 |
System.Diagnostics.Debug.WriteLine("DownloadPageAsync down"); |
225 | 224 |
|
226 | 225 |
string downloadFilePath = System.IO.Path.Combine(_localStorage, PageNo.ToString() + "." + _fileExt); |
내보내기 Unified diff