개정판 2089959a
issue #0005 마크업Search 기능 수정
Change-Id: If5fac484e99a53574be03b4422ca1373d558f379
CommonLib/Properties/DataSources/KCOM.ServiceDeepView.FinalPDFResult.datasource | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<!-- |
|
3 |
This file is automatically generated by Visual Studio .Net. It is |
|
4 |
used to store generic object data source configuration information. |
|
5 |
Renaming the file extension or editing the content of this file may |
|
6 |
cause the file to be unrecognizable by the program. |
|
7 |
--> |
|
8 |
<GenericObjectDataSource DisplayName="FinalPDFResult" Identifier="KCOM.ServiceDeepView.FinalPDFResult, Connected Services.ServiceDeepView.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" ProviderType="Microsoft.VisualStudio.DataDesign.DataSourceProviders.ObjectDataSource.ObjectDataSourceProvider" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> |
|
9 |
<TypeInfo>KCOM.ServiceDeepView.FinalPDFResult, KCOM, Version=2.0.0.100, Culture=neutral, PublicKeyToken=null</TypeInfo> |
|
10 |
</GenericObjectDataSource> |
KCOM/App.xaml.cs | ||
---|---|---|
62 | 62 |
public static ILog FileLogger = null; |
63 | 63 | |
64 | 64 |
/// <summary> |
65 |
/// VisualStudio Design Time여부 |
|
66 |
/// </summary> |
|
67 |
public static bool IsDesignMode |
|
68 |
{ |
|
69 |
get |
|
70 |
{ |
|
71 |
try |
|
72 |
{ |
|
73 |
return DesignerProperties.GetIsInDesignMode(new DependencyObject()); |
|
74 |
} |
|
75 |
catch (Exception) |
|
76 |
{ |
|
77 |
return false; |
|
78 |
} |
|
79 |
} |
|
80 |
private set { } |
|
81 |
} |
|
82 | ||
83 |
/// <summary> |
|
65 | 84 |
/// Application Data Folder |
66 | 85 |
/// </summary> |
67 | 86 |
public static string AppDataFolder |
KCOM/Controls/AdornerFinal.xaml | ||
---|---|---|
40 | 40 |
<Setter.Value> |
41 | 41 |
<ControlTemplate TargetType="Thumb"> |
42 | 42 |
<!--<TextBox Text="" x:Name="testText" Loaded="testText_Loaded" Width="{Binding Width, ElementName=Self}" Height="{Binding Height, ElementName=Self}"/>--> |
43 |
<Rectangle Fill="#ff8ef814" Width="{Binding Width, ElementName=Self}" Height="{Binding Height, ElementName=Self}"
|
|
43 |
<Rectangle Fill="#ff8ef814" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"
|
|
44 | 44 |
Opacity="0.6" MouseLeftButtonDown="RectThumb_MouseLeftButtonDown"/> |
45 | 45 |
</ControlTemplate> |
46 | 46 |
</Setter.Value> |
... | ... | |
83 | 83 |
<Ellipse Stroke="#ff2e3436" StrokeThickness="2" MouseLeftButtonDown="ControlPointMouseLeftButtonDown" |
84 | 84 |
HorizontalAlignment="Center" Width="20" Height="20" Margin="0,0,0,0" Canvas.ZIndex="1"> |
85 | 85 |
<Ellipse.Fill> |
86 |
<SolidColorBrush Color="#fff814df" Opacity="{Binding Opacity}"/>
|
|
86 |
<SolidColorBrush Color="#fff814df" Opacity="0.6"/>
|
|
87 | 87 |
</Ellipse.Fill> |
88 | 88 |
<i:Interaction.Behaviors> |
89 | 89 |
<behavior:ExpandingMouseOver ScaleFactor="2"/> |
... | ... | |
152 | 152 |
</Style> |
153 | 153 |
</Canvas.Resources> |
154 | 154 |
<Canvas x:Name="ContainerContent" Background="Transparent" Canvas.ZIndex="82"> |
155 |
<!--<Thumb Style="{StaticResource ThumbArcControlStyle}"/>--> |
|
155 | 156 |
<Thumb x:Name="DragThumb" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="1" Opacity="1" |
156 | 157 |
DragStarted="drag_DragStarted" DragCompleted="drag_DragCompleted" Loaded="DragThumb_Loaded" MouseDoubleClick="DragThumb_MouseDoubleClick" |
157 | 158 |
DragDelta="DragThumb_DragDelta" Canvas.ZIndex="81" Style="{StaticResource ThumbMoveStyle}" RenderTransformOrigin="0,0"> |
KCOM/Controls/FavoritePanel.xaml.cs | ||
---|---|---|
28 | 28 |
new bool IsLoaded = false; |
29 | 29 |
public FavoritePanel() |
30 | 30 |
{ |
31 |
if(App.IsDesignMode) |
|
32 |
{ |
|
33 |
return; |
|
34 |
} |
|
35 | ||
31 | 36 |
//InitializeComponent(); |
32 | 37 |
App.splashString(ISplashMessage.FAVORITEPANEL); |
33 | 38 |
this.Loaded += FavoritePanel_Loaded; |
KCOM/Controls/Sample.xaml | ||
---|---|---|
5 | 5 |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:common="clr-namespace:KCOM.Common" |
6 | 6 |
xmlns:local="clr-namespace:KCOM.Controls" xmlns:System="clr-namespace:System;assembly=mscorlib" |
7 | 7 |
mc:Ignorable="d" Background="#f5f5f5" xmlns:converter="clr-namespace:KCOM.Common.Converter" |
8 |
d:DesignHeight="600" d:DesignWidth="250">
|
|
8 |
d:DesignHeight="600" d:DesignWidth="200">
|
|
9 | 9 |
<UserControl.Resources> |
10 |
<Style x:Key="PathButtonStyle" TargetType="Path"> |
|
11 |
<Setter Property="Width" Value="12"/> |
|
12 |
<Setter Property="Height" Value="12"/> |
|
13 |
<Setter Property="Fill" Value="White" /> |
|
14 |
<Setter Property="Stretch" Value="Fill" /> |
|
15 |
<Setter Property="HorizontalAlignment" Value="Right"/> |
|
16 |
<Setter Property="VerticalAlignment" Value="Center" /> |
|
17 |
</Style> |
|
10 | 18 |
<converter:CommentTypeImgConverter x:Key="converterTypeImageConverter"/> |
11 | 19 |
<converter:MarkupDataToConverter x:Key="markupDataConverter"/> |
12 | 20 |
<converter:MarginCorrectionConverter x:Key="marginConverter"/> |
... | ... | |
433 | 441 |
</CheckBox> |
434 | 442 |
</DataTemplate> |
435 | 443 |
</UserControl.Resources> |
436 |
<Grid x:Name="grid"> |
|
444 |
<Grid x:Name="grid" VerticalAlignment="Stretch">
|
|
437 | 445 |
<!--<TextBlock Text="Sort By:" Foreground="{DynamicResource KCOMColor_MarkerBrush}"/>--> |
438 |
<telerik:RadTabControl BorderThickness="0" telerik:StyleManager.Theme="Office2016" HeaderBackground="#f5f5f5" FontSize="10" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"
|
|
446 |
<telerik:RadTabControl Margin="0,6,0,0" BorderThickness="0" telerik:StyleManager.Theme="VisualStudio2013" HeaderBackground="#f5f5f5" FontSize="10" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"
|
|
439 | 447 |
ScrollViewer.HorizontalScrollBarVisibility ="Disabled" SelectedIndex="0" > |
440 | 448 | |
441 |
<telerik:RadTabItem Header="Thumbnail" HeaderForeground="{DynamicResource KCOMColor_MarkerBrush}" FontSize="10">
|
|
449 |
<telerik:RadTabItem Header="Thumbnail" HeaderForeground="{DynamicResource KCOMColor_MarkerBrush}" FontSize="12">
|
|
442 | 450 |
<Grid> |
443 | 451 |
<Grid.RowDefinitions> |
444 | 452 |
<RowDefinition Height="Auto"/> |
453 |
<RowDefinition Height="Auto"/> |
|
445 | 454 |
<RowDefinition Height="*"/> |
446 | 455 |
</Grid.RowDefinitions> |
447 |
<Border BorderThickness="0,0,0,1" BorderBrush="#e6e6e6" Background="#f5f5f5"> |
|
456 |
<telerik:RadPathButton ContentPlacement="Left" telerik:StyleManager.Theme="Office2016" CornerRadius="3" |
|
457 |
PathGeometry="{telerik:RadGlyph Glyph={StaticResource GlyphGrid}, Foreground=White}" Height="24" Width="120" PathStyle="{StaticResource PathButtonStyle}" |
|
458 |
Margin="2" Foreground="White" Content="Show All Pages" x:Name="btnPanorama" Click="btnPanorama_Click" Background="#FF0054B9" HorizontalAlignment="Right"/> |
|
459 |
<Border BorderThickness="1" Margin="1" Grid.Row="1" BorderBrush="#FFC9C9C9" Background="White"> |
|
448 | 460 |
<StackPanel> |
449 | 461 |
<RadioButton Content="All Pages" IsChecked="True" telerik:StyleManager.Theme="Office2013" FontSize="10" Margin="5,3" x:Name="rdoAllPages"/> |
450 | 462 |
<RadioButton Content="Favorited Pages" FontSize="10" Margin="5,3" x:Name="rdoFavoritePages" Checked="rdoFavoritePages_Checked"/> |
... | ... | |
468 | 480 |
</Grid> |
469 | 481 |
</StackPanel> |
470 | 482 |
</Border> |
471 | ||
472 |
<telerik:RadListBox x:Name="ImgListbox" |
|
483 |
<telerik:RadListBox x:Name="ImgListbox" Margin="1" |
|
473 | 484 |
ItemTemplate="{StaticResource ThumbnailDataTemplate}" |
474 |
Grid.Row="1"
|
|
485 |
Grid.Row="2"
|
|
475 | 486 |
Background="{DynamicResource KCOMColor_AlternativeBrush}" |
476 | 487 |
ItemContainerStyle="{StaticResource ItemContainerStyle}" |
477 | 488 |
BorderBrush="#FFC2C2C2" BorderThickness="0" |
... | ... | |
504 | 515 |
</telerik:RadListBox.ItemTemplate>--> |
505 | 516 |
</telerik:RadListBox> |
506 | 517 |
</Grid> |
507 | ||
508 | 518 |
</telerik:RadTabItem> |
509 | ||
510 |
<telerik:RadTabItem Header="Markup List" HeaderForeground="{DynamicResource KCOMColor_MarkerBrush}" FontSize="10" > |
|
519 |
<telerik:RadTabItem Header="Markup List" HeaderForeground="{DynamicResource KCOMColor_MarkerBrush}" FontSize="12" > |
|
511 | 520 |
<Grid HorizontalAlignment="Stretch"> |
512 | 521 |
<Grid.ColumnDefinitions> |
513 | 522 |
<ColumnDefinition Width="*"/> |
... | ... | |
541 | 550 |
ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="Show All" SelectionChanged="commentPage_SelectionChanged"/> |
542 | 551 |
</Grid> |
543 | 552 |
</Border> |
544 |
<Border Grid.Row="1" Background="#f5f5f5" >
|
|
553 |
<Border Grid.Row="1" Background="#FFE6E6E6">
|
|
545 | 554 |
<StackPanel> |
546 | 555 |
<Border> |
547 |
<Grid> |
|
556 |
<Grid Height="28" Margin="0,4">
|
|
548 | 557 |
<Grid.ColumnDefinitions> |
549 |
<ColumnDefinition Width="7*"/>
|
|
550 |
<ColumnDefinition Width="3*"/>
|
|
558 |
<ColumnDefinition Width="*"/> |
|
559 |
<ColumnDefinition Width="Auto"/>
|
|
551 | 560 |
</Grid.ColumnDefinitions> |
552 |
<TextBox Background="#FFF3F3F3" BorderThickness="0.5" VerticalContentAlignment="Center" x:Name="tbSearch"/> |
|
553 | ||
554 |
<Border Background="#FF1258B6" CornerRadius="5" Grid.Column="1" Padding="5" Margin="10"> |
|
555 |
<Button Background="Transparent" Foreground="White" Content="Search" BorderThickness="0" x:Name="btnSearch" Click="btnSearch_Click"/> |
|
556 |
</Border> |
|
557 | ||
561 |
<TextBox HorizontalAlignment="Stretch" Style="{StaticResource ClearTextBoxStyle}" Margin="2" x:Name="txtSearch" |
|
562 |
telerik:StyleManager.Theme="Office2016" AcceptsReturn="False" Background="#FFF3F3F3" |
|
563 |
BorderThickness="1" VerticalContentAlignment="Center" IsTabStop="True" KeyDown="TxtSearch_KeyDown"/> |
|
564 |
<telerik:RadPathButton Grid.Column="1" ContentPlacement="Left" VerticalContentAlignment="Center" telerik:StyleManager.Theme="Office2016" |
|
565 |
PathGeometry="{telerik:RadGlyph Glyph={StaticResource GlyphZoom}, Foreground=White}" |
|
566 |
Width="80" PathStyle="{StaticResource PathButtonStyle}" CornerRadius="3" |
|
567 |
Margin="2" Foreground="White" Content="SEARCH" x:Name="btnSearch" Click="btnSearch_Click" Background="#FF0054B9"/> |
|
558 | 568 |
</Grid> |
559 | 569 |
</Border> |
560 | 570 |
</StackPanel> |
... | ... | |
572 | 582 |
<Image Source="/KCOM;component/Resources/Images/MenuImage_New/arrow.png" Margin="5"/> |
573 | 583 | |
574 | 584 |
<StackPanel Orientation="Vertical" Grid.Column="1" Margin="10" VerticalAlignment="Center"> |
575 |
<TextBlock Text="조장원 대리" FontWeight="DemiBold" Foreground="#3d3d3d"/>
|
|
576 |
<TextBlock Text="3 Page"/>
|
|
585 |
<TextBlock Text="" FontWeight="DemiBold" Foreground="#3d3d3d"/> |
|
586 |
<TextBlock Text=""/> |
|
577 | 587 |
</StackPanel> |
578 | 588 | |
579 | 589 | |
... | ... | |
586 | 596 |
</Border> |
587 | 597 | |
588 | 598 |
<Border VerticalAlignment="Stretch" Margin="0" Grid.Row="2" BorderThickness="0,0,0,0.5" BorderBrush="#828282" x:Name="gogo"> |
589 |
<telerik:RadListBox telerik:StyleManager.Theme="Office2016" Padding="0" HorizontalAlignment="Stretch" x:Name="MarkupList" ScrollViewer.VerticalScrollBarVisibility="Auto" |
|
590 |
Background="Transparent" ItemsSource="{Binding MarkupInfoSmallList}" Loaded="MarkupList_Loaded">
|
|
599 |
<telerik:RadListBox telerik:StyleManager.Theme="Office2016" Padding="0" Margin="2" HorizontalAlignment="Stretch" x:Name="MarkupList" ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
600 |
Background="White" ItemsSource="{Binding MarkupInfoSmallList}" Loaded="MarkupList_Loaded">
|
|
591 | 601 |
<telerik:RadListBox.ItemContainerStyle> |
592 | 602 |
<Style TargetType="telerik:RadListBoxItem"> |
593 | 603 |
<Setter Property="Padding" Value="0,0,0,0"/> |
... | ... | |
596 | 606 |
<telerik:RadListBox.ItemTemplate> |
597 | 607 |
<DataTemplate> |
598 | 608 |
<StackPanel> |
599 |
<Border> |
|
609 |
<Border BorderBrush="#EBFBFCFD" BorderThickness="1" Margin="1" Padding="1,3">
|
|
600 | 610 |
<Grid> |
601 | 611 |
<Grid.ColumnDefinitions> |
612 |
<ColumnDefinition Width="5"/> |
|
602 | 613 |
<ColumnDefinition Width="36"/> |
603 | 614 |
<ColumnDefinition Width="*"/> |
604 | 615 |
<ColumnDefinition Width="Auto"/> |
605 | 616 |
</Grid.ColumnDefinitions> |
606 | ||
607 |
<Image Source="{Binding Data_Type, Converter={StaticResource converterTypeImageConverter}}" Margin="5" Width="28" Height="28"/> |
|
608 |
<StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="1" Margin="10" VerticalAlignment="Center"> |
|
617 |
<Border Width="5" Background="#CE3D5DA0"> |
|
618 |
<Border.Style> |
|
619 |
<Style TargetType="Border"> |
|
620 |
<Setter Property="Visibility" Value="Collapsed"/> |
|
621 |
<Style.Triggers> |
|
622 |
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=telerik:RadListBoxItem, AncestorLevel=1}}" Value="True"> |
|
623 |
<Setter Property="Visibility" Value="Visible"/> |
|
624 |
</DataTrigger> |
|
625 |
</Style.Triggers> |
|
626 |
</Style> |
|
627 |
</Border.Style> |
|
628 |
</Border> |
|
629 |
<Image Grid.Column="1" Source="{Binding Data_Type, Converter={StaticResource converterTypeImageConverter}}" Margin="5,0" Width="28" Height="28"/> |
|
630 |
<StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="2" Margin="5,0" VerticalAlignment="Center"> |
|
609 | 631 |
<TextBlock Text="{Binding UserName}" FontWeight="DemiBold" Foreground="#3d3d3d"/> |
610 | 632 |
<StackPanel Orientation="Horizontal"> |
611 | 633 |
<TextBlock Text="{Binding PageNumber}"/> |
612 | 634 |
<TextBlock Text=" Page"/> |
613 | 635 |
</StackPanel> |
614 | 636 |
</StackPanel> |
615 | ||
616 |
<Border Background="#FF1258B6" CornerRadius="5" Grid.Column="2" Padding="5" Margin="10"> |
|
617 |
<telerik:RadButton Background="Transparent" Foreground="White" Content="Move" BorderThickness="0" Click="RadButton_Click" CommandParameter="{Binding}"/> |
|
618 |
</Border> |
|
637 |
<telerik:RadPathButton Grid.Column="3" ContentPlacement="Left" VerticalContentAlignment="Center" telerik:StyleManager.Theme="Office2016" |
|
638 |
PathGeometry="{telerik:RadGlyph Glyph={StaticResource GlyphFrontElement}, Foreground=White}" |
|
639 |
Width="60" Height="28" PathStyle="{StaticResource PathButtonStyle}" CornerRadius="3" |
|
640 |
Margin="2" Foreground="White" Content="Move" x:Name="btnSearch" Click="btGotoMarkup_Click" Background="#FF0054B9" CommandParameter="{Binding}"> |
|
641 |
</telerik:RadPathButton> |
|
642 |
<!--<telerik:RadButton Background="Transparent" Foreground="White" Content="Move" BorderThickness="0" Click="btGotoMarkup_Click" CommandParameter="{Binding}"/>--> |
|
619 | 643 |
</Grid> |
620 | 644 |
</Border> |
621 | 645 |
</StackPanel> |
... | ... | |
659 | 683 |
</Border>--> |
660 | 684 |
</Grid> |
661 | 685 |
</telerik:RadTabItem> |
662 |
<telerik:RadTabItem HeaderForeground="{DynamicResource KCOMColor_MarkerBrush}" FontSize="9"> |
|
686 |
<!--<telerik:RadTabItem HeaderForeground="{DynamicResource KCOMColor_MarkerBrush}" FontSize="9">
|
|
663 | 687 |
<telerik:RadTabItem.Header> |
664 |
<telerik:RadRibbonButton Content="Panorama" telerik:StyleManager.Theme="Office2016" FontSize="10" Margin="0,0,0,1" Background="#FF0054B9" Foreground="White" |
|
665 |
BorderThickness="0" CornerRadius="3" Padding="5" x:Name="btnPanorama" Click="btnPanorama_Click"/> |
|
688 |
--><!--<telerik:RadRibbonButton Content="Panorama" telerik:StyleManager.Theme="Office2016" FontSize="10" Margin="0,0,0,1" Background="#FF0054B9" Foreground="White" |
|
689 |
BorderThickness="0" CornerRadius="3" Padding="5" x:Name="btnPanorama" Click="btnPanorama_Click"/>--><!-- |
|
690 |
<telerik:RadPathButton Grid.Column="1" ContentPlacement="Left" VerticalContentAlignment="Center" telerik:StyleManager.Theme="Office2016" |
|
691 |
PathGeometry="{telerik:RadGlyph Glyph={StaticResource GlyphZoom}, Foreground=White}" |
|
692 |
FontFamily="{StaticResource TelerikWebUI}" Width="80" PathStyle="{StaticResource PathButtonStyle}" |
|
693 |
Margin="2" Foreground="White" Content="Panorama" x:Name="btnPanorama" Click="btnPanorama_Click" Background="#FF0054B9"/> |
|
666 | 694 |
</telerik:RadTabItem.Header> |
667 |
</telerik:RadTabItem> |
|
695 |
</telerik:RadTabItem>-->
|
|
668 | 696 |
</telerik:RadTabControl> |
697 | ||
669 | 698 |
</Grid> |
670 | 699 |
</UserControl> |
KCOM/Controls/Sample.xaml.cs | ||
---|---|---|
26 | 26 |
public List<FAVORITE_DOC> _FavoriteSet { get; set; } |
27 | 27 |
public event PropertyChangedEventHandler PropertyChanged; |
28 | 28 |
public Sample() |
29 |
{ |
|
29 |
{ |
|
30 |
if(App.IsDesignMode) |
|
31 |
{ |
|
32 |
return; |
|
33 |
} |
|
34 | ||
30 | 35 |
App.splashString(ISplashMessage.SAMPLE); |
31 | 36 |
this.Loaded += Sample_Loaded; |
32 | 37 |
} |
... | ... | |
661 | 666 |
private void commentUser_SelectionChanged(object sender, SelectionChangedEventArgs e) |
662 | 667 |
{ |
663 | 668 |
MarkupList.ItemsSource = null; |
664 |
tbSearch.Text = string.Empty;
|
|
669 |
txtSearch.Text = string.Empty;
|
|
665 | 670 | |
666 | 671 |
List<MarkupInfoItemSmall> TempMarkupInfoSmallList = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
667 | 672 | |
... | ... | |
708 | 713 |
/// </summary> |
709 | 714 |
/// <param name="sender"></param> |
710 | 715 |
/// <param name="e"></param> |
711 |
private void RadButton_Click(object sender, RoutedEventArgs e) |
|
716 |
private void RadButton_Click_OLD(object sender, RoutedEventArgs e)
|
|
712 | 717 |
{ |
713 | 718 |
var clickButtonItem = sender as RadButton; |
714 | 719 |
if (clickButtonItem != null && clickButtonItem.CommandParameter != null) |
... | ... | |
835 | 840 |
} |
836 | 841 |
} |
837 | 842 | |
843 | ||
844 |
private void btGotoMarkup_Click(object sender, RoutedEventArgs e) |
|
845 |
{ |
|
846 |
var clickButtonItem = sender as RadButton; |
|
847 |
if (clickButtonItem != null && clickButtonItem.CommandParameter != null) |
|
848 |
{ |
|
849 |
try |
|
850 |
{ |
|
851 |
|
|
852 | ||
853 |
MarkupInfoItemSmall gaza = clickButtonItem.CommandParameter as MarkupInfoItemSmall; |
|
854 |
MarkupList.SelectedItem = gaza; |
|
855 | ||
856 |
GotoMarkup(new[] { gaza.Id }); |
|
857 |
} |
|
858 |
catch (Exception ex) |
|
859 |
{ |
|
860 |
this.ParentOfType<KCOM.Views.MainMenu>().DialogMessage_Alert(ex.Message, "Error"); |
|
861 |
} |
|
862 |
} |
|
863 |
} |
|
864 | ||
865 |
/// <summary> |
|
866 |
/// 선택된 마크업의 ID리스트를 받아 해당 페이지로 이동 후 GotoSelectedMarkup 호출 |
|
867 |
/// </summary> |
|
868 |
/// <param name="CommentIdList"></param> |
|
869 |
private void GotoMarkup(IEnumerable<string> CommentIdList) |
|
870 |
{ |
|
871 |
var instance = Common.ViewerDataModel.Instance; |
|
872 | ||
873 |
SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
|
874 | ||
875 |
var commentList = instance._markupInfoList.Where(x => x.MarkupList != null).SelectMany(x => x.MarkupList).Where(f => f.ID == CommentIdList.First()); |
|
876 | ||
877 |
if (commentList.Count() > 0) |
|
878 |
{ |
|
879 |
//하단 그리드의 markup list에서 commentid가 포함된 markupinfo를 선택되게 한다. |
|
880 |
#region markup list grid select items |
|
881 | ||
882 |
var infoItem = instance._markupInfoList.Where(x => x.MarkupList != null).Where(f => f.MarkupList.Count(y => y == commentList.First()) > 0); |
|
883 | ||
884 |
if (infoItem.Count() > 0) |
|
885 |
{ |
|
886 | ||
887 |
var gridMarkup = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.gridViewMarkup; |
|
888 |
gridMarkup.SelectedItems.Clear(); |
|
889 |
gridMarkup.SelectedItems.Add(infoItem.First()); |
|
890 |
} |
|
891 | ||
892 |
#endregion |
|
893 | ||
894 |
var pageNavigator = instance.SystemMain.dzMainMenu.pageNavigator; |
|
895 | ||
896 |
if (pageNavigator.CurrentPage.PageNumber == commentList.First().PageNumber) |
|
897 |
{ |
|
898 |
GotoSelectedMarkup(CommentIdList); |
|
899 |
} |
|
900 |
else |
|
901 |
{ |
|
902 |
EventHandler<Sample.PageChangeEventArgs> handler = null; |
|
903 | ||
904 |
handler = (snd, evt) => |
|
905 |
{ |
|
906 |
GotoSelectedMarkup(CommentIdList); |
|
907 |
pageNavigator.PageChanged -= handler; |
|
908 |
}; |
|
909 | ||
910 |
pageNavigator.PageChanged += handler; |
|
911 | ||
912 |
pageNavigator.GotoPage(commentList.First().PageNumber); |
|
913 |
} |
|
914 |
} |
|
915 |
} |
|
916 | ||
917 |
/// <summary> |
|
918 |
/// 페이지 이동 후 마크업을 선택하고 Zoom을 한다. |
|
919 |
/// 마크업이 페이지보다 크면 Zoom을 하지 않음. |
|
920 |
/// </summary> |
|
921 |
/// <param name="CommentIdList"></param> |
|
922 |
private void GotoSelectedMarkup(IEnumerable<string> CommentIdList) |
|
923 |
{ |
|
924 |
var instance = Common.ViewerDataModel.Instance; |
|
925 | ||
926 |
var selectOrderComments = instance.MarkupControls.Where(x => CommentIdList.Count(y => y == x.CommentID) > 0).ToList(); |
|
927 |
var commentUserInfo = instance.MarkupControls_USER.Where(x => CommentIdList.Count(y => y == x.CommentID) > 0).ToList(); |
|
928 | ||
929 |
if (commentUserInfo.Count() > 0 || selectOrderComments.Count() > 0) |
|
930 |
{ |
|
931 |
commentUserInfo.ForEach(x => x.IsSelected = true); |
|
932 |
commentUserInfo.AddRange(selectOrderComments); |
|
933 | ||
934 |
if (commentUserInfo?.Count() > 0) |
|
935 |
{ |
|
936 |
var main = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu; |
|
937 | ||
938 |
try |
|
939 |
{ |
|
940 |
Rect rect = commentUserInfo.First().ItemRect; |
|
941 | ||
942 |
foreach (var UserInfo in commentUserInfo) |
|
943 |
{ |
|
944 |
rect = Rect.Union(rect, UserInfo.ItemRect); |
|
945 | ||
946 |
} |
|
947 | ||
948 |
SelectionSet.Instance.SelectItemByRect(rect, main); |
|
949 | ||
950 |
var center = new Vector(Common.ViewerDataModel.Instance.ImageViewWidth / 2, Common.ViewerDataModel.Instance.ImageViewHeight / 2); |
|
951 |
var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle, center); |
|
952 |
rect.Transform(matrix); |
|
953 | ||
954 |
double scaleX = Common.ViewerDataModel.Instance.ImageViewWidth / rect.Width; |
|
955 |
double scaleY = Common.ViewerDataModel.Instance.ImageViewHeight / rect.Height; |
|
956 |
double newScale = main.zoomAndPanControl.ContentScale * Math.Min(scaleX, scaleY); |
|
957 |
double positionX = 0; |
|
958 |
double positionY = 0; |
|
959 | ||
960 |
if (Common.ViewerDataModel.Instance.Angle == 90) |
|
961 |
{ |
|
962 |
positionX = Common.ViewerDataModel.Instance.ImageViewHeight - rect.X; |
|
963 |
positionY = Common.ViewerDataModel.Instance.ImageViewWidth - rect.Y; |
|
964 |
} |
|
965 | ||
966 |
main.zoomAndPanControl.ContentScale = newScale; |
|
967 |
main.zoomAndPanControl.ContentOffsetX = positionX; |
|
968 |
main.zoomAndPanControl.ContentOffsetY = positionY; |
|
969 | ||
970 |
|
|
971 |
var pageSize = new Size(main.pageNavigator.CurrentPage.Width, main.pageNavigator.CurrentPage.Height); |
|
972 | ||
973 |
if ((rect.Size.Width + rect.Size.Height) > (pageSize.Width + pageSize.Height)) |
|
974 |
{ |
|
975 |
main.zoomAndPanControl.ZoomTo(rect); |
|
976 |
} |
|
977 |
else |
|
978 |
{ |
|
979 |
rect.Inflate(rect.Width * 3, rect.Height * 3); |
|
980 |
main.zoomAndPanControl.ZoomTo(rect); |
|
981 |
} |
|
982 |
} |
|
983 |
catch (Exception ex) |
|
984 |
{ |
|
985 |
main.DialogMessage_Alert(ex.Message, "Error"); |
|
986 |
} |
|
987 |
} |
|
988 |
} |
|
989 |
} |
|
990 | ||
838 | 991 |
private void MarkupList_Loaded(object sender, RoutedEventArgs e) |
839 | 992 |
{ |
840 | 993 |
if (MarkupInfoSmallList.Count == 0) |
... | ... | |
951 | 1104 |
private void commentType_SelectionChanged(object sender, SelectionChangedEventArgs e) |
952 | 1105 |
{ |
953 | 1106 |
MarkupList.ItemsSource = null; |
954 |
tbSearch.Text = string.Empty;
|
|
1107 |
txtSearch.Text = string.Empty;
|
|
955 | 1108 |
List<MarkupInfoItemSmall> TempMarkupInfoSmallList = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
956 | 1109 |
if (commentType.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue)).ToList(); } |
957 | 1110 | |
... | ... | |
965 | 1118 |
private void commentPage_SelectionChanged(object sender, SelectionChangedEventArgs e) |
966 | 1119 |
{ |
967 | 1120 |
MarkupList.ItemsSource = null; |
968 |
tbSearch.Text = string.Empty;
|
|
1121 |
txtSearch.Text = string.Empty;
|
|
969 | 1122 | |
970 | 1123 |
List<MarkupInfoItemSmall> TempMarkupInfoSmallList = MarkupInfoSmallList.OrderBy(d => d.PageNumber).ToList(); |
971 | 1124 |
if (commentType.SelectedValue != null) { TempMarkupInfoSmallList = TempMarkupInfoSmallList.Where(d => d.Data_Type == Convert.ToInt32(commentType.SelectedValue)).ToList(); } |
... | ... | |
984 | 1137 | |
985 | 1138 |
private void btnSearch_Click(object sender, RoutedEventArgs e) |
986 | 1139 |
{ |
987 |
string search_str = tbSearch.Text; |
|
1140 |
string search_str = txtSearch.Text; |
|
1141 | ||
1142 |
if(string.IsNullOrWhiteSpace(search_str)) |
|
1143 |
{ |
|
1144 |
return; |
|
1145 |
} |
|
1146 | ||
988 | 1147 |
var sel_type = commentType.SelectedItem; |
989 | 1148 |
var sel_user = commentUser.SelectedItem; |
990 | 1149 |
var sel_page = commentPage.SelectedItem; |
... | ... | |
1013 | 1172 |
case MarkupToPDF.Controls.Common.ControlType.TextCloud: |
1014 | 1173 |
{ |
1015 | 1174 |
MarkupToPDF.Serialize.S_Control.S_TextControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_TextControl>(data); |
1016 |
if (instance.Text.Contains(search_str)) |
|
1175 | ||
1176 |
if (!string.IsNullOrWhiteSpace(instance.Text)) |
|
1017 | 1177 |
{ |
1018 |
small_list.Add(item); |
|
1178 |
if (instance.Text.ToLower().Contains(search_str.ToLower())) |
|
1179 |
{ |
|
1180 |
small_list.Add(item); |
|
1181 |
} |
|
1019 | 1182 |
} |
1020 | 1183 |
} |
1021 | 1184 |
break; |
... | ... | |
1027 | 1190 |
case MarkupToPDF.Controls.Common.ControlType.ArrowTransTextControl: |
1028 | 1191 |
{ |
1029 | 1192 |
MarkupToPDF.Serialize.S_Control.S_ArrowTextControl instance = MarkupToPDF.Serialize.Core.JsonSerializerHelper.JsonDeserialize<MarkupToPDF.Serialize.S_Control.S_ArrowTextControl>(data); |
1030 |
if (instance.ArrowText.Contains(search_str)) |
|
1193 | ||
1194 |
if (!string.IsNullOrWhiteSpace(instance.ArrowText)) |
|
1031 | 1195 |
{ |
1032 |
small_list.Add(item); |
|
1196 |
if (instance.ArrowText.Contains(search_str)) |
|
1197 |
{ |
|
1198 |
small_list.Add(item); |
|
1199 |
} |
|
1033 | 1200 |
} |
1034 | 1201 |
} |
1035 | 1202 |
break; |
... | ... | |
1038 | 1205 | |
1039 | 1206 |
MarkupList.ItemsSource = null; |
1040 | 1207 |
MarkupList.ItemsSource = small_list.OrderBy(d => d.PageNumber).ToList(); |
1041 |
tbSearch.Text = string.Empty; |
|
1208 |
} |
|
1209 | ||
1210 |
private void TxtSearch_KeyDown(object sender, KeyEventArgs e) |
|
1211 |
{ |
|
1212 |
if(e.Key == Key.Enter || e.Key == Key.Return) |
|
1213 |
{ |
|
1214 |
btnSearch_Click(sender, new RoutedEventArgs()); |
|
1215 |
} |
|
1042 | 1216 |
} |
1043 | 1217 |
} |
1044 | 1218 |
} |
KCOM/Extensions/MatrixHelper.cs | ||
---|---|---|
1 |
// Copyright (c) Wiesław Šoltés. All rights reserved. |
|
2 |
// Licensed under the MIT license. See LICENSE file in the project root for full license information. |
|
3 |
using System.Windows; |
|
4 |
using System.Windows.Media; |
|
5 |
using static System.Math; |
|
6 | ||
7 |
namespace KCOM |
|
8 |
{ |
|
9 |
/// <summary> |
|
10 |
/// WPF Matrix helper methods. |
|
11 |
/// </summary> |
|
12 |
public static class MatrixHelper |
|
13 |
{ |
|
14 |
/// <summary> |
|
15 |
/// Creates a translation matrix using the specified offsets. |
|
16 |
/// </summary> |
|
17 |
/// <param name="offsetX">X-coordinate offset.</param> |
|
18 |
/// <param name="offsetY">Y-coordinate offset.</param> |
|
19 |
/// <returns>The created translation matrix.</returns> |
|
20 |
public static Matrix Translate(double offsetX, double offsetY) |
|
21 |
{ |
|
22 |
return new Matrix(1.0, 0.0, 0.0, 1.0, offsetX, offsetY); |
|
23 |
} |
|
24 | ||
25 |
/// <summary> |
|
26 |
/// Prepends a translation around the center of provided matrix. |
|
27 |
/// </summary> |
|
28 |
/// <param name="matrix">The matrix to prepend translation.</param> |
|
29 |
/// <param name="offsetX">X-coordinate offset.</param> |
|
30 |
/// <param name="offsetY">Y-coordinate offset.</param> |
|
31 |
/// <returns>The created translation matrix.</returns> |
|
32 |
public static Matrix TranslatePrepend(Matrix matrix, double offsetX, double offsetY) |
|
33 |
{ |
|
34 |
return Translate(offsetX, offsetY) * matrix; |
|
35 |
} |
|
36 | ||
37 |
/// <summary> |
|
38 |
/// Creates a matrix that scales along the x-axis and y-axis. |
|
39 |
/// </summary> |
|
40 |
/// <param name="scaleX">Scaling factor that is applied along the x-axis.</param> |
|
41 |
/// <param name="scaleY">Scaling factor that is applied along the y-axis.</param> |
|
42 |
/// <returns>The created scaling matrix.</returns> |
|
43 |
public static Matrix Scale(double scaleX, double scaleY) |
|
44 |
{ |
|
45 |
return new Matrix(scaleX, 0, 0, scaleY, 0.0, 0.0); |
|
46 |
} |
|
47 | ||
48 |
/// <summary> |
|
49 |
/// Creates a matrix that is scaling from a specified center. |
|
50 |
/// </summary> |
|
51 |
/// <param name="scaleX">Scaling factor that is applied along the x-axis.</param> |
|
52 |
/// <param name="scaleY">Scaling factor that is applied along the y-axis.</param> |
|
53 |
/// <param name="centerX">The center X-coordinate of the scaling.</param> |
|
54 |
/// <param name="centerY">The center Y-coordinate of the scaling.</param> |
|
55 |
/// <returns>The created scaling matrix.</returns> |
|
56 |
public static Matrix ScaleAt(double scaleX, double scaleY, double centerX, double centerY) |
|
57 |
{ |
|
58 |
return new Matrix(scaleX, 0, 0, scaleY, centerX - (scaleX * centerX), centerY - (scaleY * centerY)); |
|
59 |
} |
|
60 | ||
61 |
/// <summary> |
|
62 |
/// Prepends a scale around the center of provided matrix. |
|
63 |
/// </summary> |
|
64 |
/// <param name="matrix">The matrix to prepend scale.</param> |
|
65 |
/// <param name="scaleX">Scaling factor that is applied along the x-axis.</param> |
|
66 |
/// <param name="scaleY">Scaling factor that is applied along the y-axis.</param> |
|
67 |
/// <param name="centerX">The center X-coordinate of the scaling.</param> |
|
68 |
/// <param name="centerY">The center Y-coordinate of the scaling.</param> |
|
69 |
/// <returns>The created scaling matrix.</returns> |
|
70 |
public static Matrix ScaleAtPrepend(Matrix matrix, double scaleX, double scaleY, double centerX, double centerY) |
|
71 |
{ |
|
72 |
return ScaleAt(scaleX, scaleY, centerX, centerY) * matrix; |
|
73 |
} |
|
74 | ||
75 |
/// <summary> |
|
76 |
/// Creates a skew matrix. |
|
77 |
/// </summary> |
|
78 |
/// <param name="angleX">Angle of skew along the X-axis in radians.</param> |
|
79 |
/// <param name="angleY">Angle of skew along the Y-axis in radians.</param> |
|
80 |
/// <returns>When the method completes, contains the created skew matrix.</returns> |
|
81 |
public static Matrix Skew(float angleX, float angleY) |
|
82 |
{ |
|
83 |
return new Matrix(1.0, Tan(angleX), Tan(angleY), 1.0, 0.0, 0.0); |
|
84 |
} |
|
85 | ||
86 |
/// <summary> |
|
87 |
/// Creates a matrix that rotates. |
|
88 |
/// </summary> |
|
89 |
/// <param name="radians">Angle of rotation in radians. Angles are measured clockwise when looking along the rotation axis.</param> |
|
90 |
/// <returns>The created rotation matrix.</returns> |
|
91 |
public static Matrix Rotation(double radians) |
|
92 |
{ |
|
93 |
double cos = Cos(radians); |
|
94 |
double sin = Sin(radians); |
|
95 |
return new Matrix(cos, sin, -sin, cos, 0, 0); |
|
96 |
} |
|
97 | ||
98 |
/// <summary> |
|
99 |
/// Creates a matrix that rotates about a specified center. |
|
100 |
/// </summary> |
|
101 |
/// <param name="angle">Angle of rotation in radians.</param> |
|
102 |
/// <param name="centerX">The center X-coordinate of the rotation.</param> |
|
103 |
/// <param name="centerY">The center Y-coordinate of the rotation.</param> |
|
104 |
/// <returns>The created rotation matrix.</returns> |
|
105 |
public static Matrix Rotation(double angle, double centerX, double centerY) |
|
106 |
{ |
|
107 |
return Translate(-centerX, -centerY) * Rotation(angle) * Translate(centerX, centerY); |
|
108 |
} |
|
109 | ||
110 |
/// <summary> |
|
111 |
/// Creates a matrix that rotates about a specified center. |
|
112 |
/// </summary> |
|
113 |
/// <param name="angle">Angle of rotation in radians.</param> |
|
114 |
/// <param name="center">The center of the rotation.</param> |
|
115 |
/// <returns>The created rotation matrix.</returns> |
|
116 |
public static Matrix Rotation(double angle, Vector center) |
|
117 |
{ |
|
118 |
return Translate(-center.X, -center.Y) * Rotation(angle) * Translate(center.X, center.Y); |
|
119 |
} |
|
120 | ||
121 |
/// <summary> |
|
122 |
/// Transforms a point by this matrix. |
|
123 |
/// </summary> |
|
124 |
/// <param name="matrix">The matrix to use as a transformation matrix.</param> |
|
125 |
/// <param name="point">>The original point to apply the transformation.</param> |
|
126 |
/// <returns>The result of the transformation for the input point.</returns> |
|
127 |
public static Point TransformPoint(Matrix matrix, Point point) |
|
128 |
{ |
|
129 |
return new Point( |
|
130 |
(point.X * matrix.M11) + (point.Y * matrix.M21) + matrix.OffsetX, |
|
131 |
(point.X * matrix.M12) + (point.Y * matrix.M22) + matrix.OffsetY); |
|
132 |
} |
|
133 |
} |
|
134 |
} |
KCOM/KCOM.csproj | ||
---|---|---|
331 | 331 |
<Compile Include="Events\UndoCommand.cs" /> |
332 | 332 |
<Compile Include="Events\SaveCommand.cs" /> |
333 | 333 |
<Compile Include="Events\RedoCommand.cs" /> |
334 |
<Compile Include="Extensions\MatrixHelper.cs" /> |
|
334 | 335 |
<Compile Include="Extensions\WindowHelper.cs" /> |
335 | 336 |
<Compile Include="IAbstractDatabase.cs" /> |
336 | 337 |
<Compile Include="Logger.cs" /> |
KCOM/Resources/ClearTextBoxStyle.xaml | ||
---|---|---|
86 | 86 |
<Setter Property="FocusVisualStyle" |
87 | 87 |
Value="{x:Null}" /> |
88 | 88 |
<Setter Property="MinWidth" |
89 |
Value="120" />
|
|
89 |
Value="0" /> |
|
90 | 90 |
<Setter Property="MinHeight" |
91 | 91 |
Value="20" /> |
92 | 92 |
<Setter Property="AllowDrop" |
... | ... | |
133 | 133 |
<Grid> |
134 | 134 |
<Grid.ColumnDefinitions> |
135 | 135 |
<ColumnDefinition/> |
136 |
<ColumnDefinition Width="Auto"/>
|
|
136 |
<ColumnDefinition Width="17"/>
|
|
137 | 137 |
</Grid.ColumnDefinitions> |
138 | 138 |
<ScrollViewer Margin="0" BorderThickness="0" x:Name="PART_ContentHost" /> |
139 | 139 |
<!--<telerik:RadPathButton BorderThickness="0" Background="Transparent" Grid.Column="1" x:Name="ClearButton" |
KCOM/Services/BaseServices.cs | ||
---|---|---|
454 | 454 |
/// <param name="e"></param> |
455 | 455 |
private void gridViewMarkup_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e) |
456 | 456 |
{ |
457 |
SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
|
458 | ||
457 | 459 |
var dataSet = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().Where(data => data.UserID == _ViewInfo.UserID); |
458 | 460 |
var dataSet_User = gridViewMarkup.Items.Cast<MarkupInfoItem>().Where(data => data.UserID == _ViewInfo.UserID); |
459 | 461 |
var resultA = (from item_Select in dataSet |
내보내기 Unified diff