개정판 9cd2865b
Compare 화면에서 Sync 토글 추가
KCOM/Common/ViewerDataModel.cs | ||
---|---|---|
55 | 55 |
|
56 | 56 |
private double contentOffsetX = 0; |
57 | 57 |
|
58 |
private double Sync_contentScale = 1; |
|
59 |
|
|
60 |
private double Sync_contentOffsetY = 0; |
|
61 |
|
|
62 |
private double Sync_contentOffsetX = 0; |
|
63 |
|
|
58 | 64 |
private double contentViewportHeight = 0; |
59 | 65 |
|
60 | 66 |
private double contentViewportWidth = 0; |
... | ... | |
693 | 699 |
} |
694 | 700 |
} |
695 | 701 |
|
702 |
public double Sync_ContentScale |
|
703 |
{ |
|
704 |
get |
|
705 |
{ |
|
706 |
return Sync_contentScale; |
|
707 |
} |
|
708 |
set |
|
709 |
{ |
|
710 |
Sync_contentScale = value; |
|
711 |
OnPropertyChanged("Sync_ContentScale"); |
|
712 |
} |
|
713 |
} |
|
714 |
|
|
696 | 715 |
public ObservableCollection<IKCOM.MarkupInfoItem> _markupInfoList |
697 | 716 |
{ |
698 | 717 |
get |
... | ... | |
749 | 768 |
} |
750 | 769 |
} |
751 | 770 |
|
771 |
public double Sync_ContentOffsetX |
|
772 |
{ |
|
773 |
get |
|
774 |
{ |
|
775 |
return Sync_contentOffsetX; |
|
776 |
} |
|
777 |
set |
|
778 |
{ |
|
779 |
Sync_contentOffsetX = value; |
|
780 |
OnPropertyChanged("Sync_ContentOffsetX"); |
|
781 |
} |
|
782 |
} |
|
783 |
|
|
784 |
public double Sync_ContentOffsetY |
|
785 |
{ |
|
786 |
get |
|
787 |
{ |
|
788 |
return Sync_contentOffsetY; |
|
789 |
} |
|
790 |
set |
|
791 |
{ |
|
792 |
Sync_contentOffsetY = value; |
|
793 |
OnPropertyChanged("Sync_ContentOffsetY"); |
|
794 |
} |
|
795 |
} |
|
796 |
|
|
752 | 797 |
public MessageCollection k_talkMessageSet |
753 | 798 |
{ |
754 | 799 |
get |
KCOM/Views/MainMenu.xaml | ||
---|---|---|
239 | 239 |
<telerik:RadPane CanFloat="False" CanUserClose="False" Title="Document 1" PaneHeaderVisibility="Collapsed" x:Name="testPanel2" IsHidden="True" Margin="0,-20,0,0"> |
240 | 240 |
<Grid Background="{DynamicResource KCOMColor_DocumnetBackgroundBrush}"> |
241 | 241 |
<ZoomAndPan:ZoomAndPanControl x:Name="zoomAndPanControl2" |
242 |
ContentScale="{Binding ContentScale, Mode=TwoWay, Source={x:Static common:ViewerDataModel.Instance}}" |
|
243 |
ContentOffsetX="{Binding ContentOffsetX, Mode=TwoWay, Source={x:Static common:ViewerDataModel.Instance}}" |
|
244 |
ContentOffsetY="{Binding ContentOffsetY, Mode=TwoWay, Source={x:Static common:ViewerDataModel.Instance}}" |
|
242 |
ContentScale="{Binding Sync_ContentScale, Mode=TwoWay, Source={x:Static common:ViewerDataModel.Instance}}"
|
|
243 |
ContentOffsetX="{Binding Sync_ContentOffsetX, Mode=TwoWay, Source={x:Static common:ViewerDataModel.Instance}}"
|
|
244 |
ContentOffsetY="{Binding Sync_ContentOffsetY, Mode=TwoWay, Source={x:Static common:ViewerDataModel.Instance}}"
|
|
245 | 245 |
ConstrainedContentViewportWidth="{Binding ContentViewportWidth, Mode=TwoWay, Source={x:Static common:ViewerDataModel.Instance}}" |
246 | 246 |
ConstrainedContentViewportHeight="{Binding ContentViewportHeight, Mode=TwoWay, Source={x:Static common:ViewerDataModel.Instance}}" |
247 | 247 |
Background="LightGray"> |
... | ... | |
311 | 311 |
<!--<telerik:RadToggleButton x:Name="CompareMode" IsChecked="False" Content="Compare" Margin="5" Checked="SyncCompare_Click" Unchecked="SyncCompare_Click" BorderThickness="0" telerik:StyleManager.Theme="Office2013" |
312 | 312 |
Style="{DynamicResource RadToggleSwtichButtonStyle}" Width="Auto" Padding="10,0"/>--> |
313 | 313 |
<!--<telerik:RadRibbonToggleButton x:Name="UserList" Content="User List" Foreground="white" Margin="5" Click="SyncUserListExpender_Click" BorderThickness="0" telerik:StyleManager.Theme="Office2013" VerticalAlignment="Center"/>--> |
314 |
|
|
315 |
<toggle:HorizontalToggleSwitch x:Name="Sync" CheckedContent="Sync" UncheckedContent="Sync" Width="75" IsChecked="False" ThumbSize="25" |
|
316 |
FontSize="10" FontWeight="Normal" BorderBrush="Transparent" Opacity="0.6" |
|
317 |
Margin="5" Checked="Sync_Click" Unchecked="Sync_Click" BorderThickness="0" telerik:StyleManager.Theme="Office2013"/> |
|
318 |
|
|
314 | 319 |
<toggle:HorizontalToggleSwitch x:Name="UserList" CheckedContent="User List" UncheckedContent="User List" Width="75" IsChecked="False" ThumbSize="25" |
315 | 320 |
FontSize="10" FontWeight="Normal" BorderBrush="Transparent" Opacity="0.6" |
316 | 321 |
Margin="5" Checked="SyncUserListExpender_Click" Unchecked="SyncUserListExpender_Click" BorderThickness="0" telerik:StyleManager.Theme="Office2013"/> |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
741 | 741 |
zoomAndPanControl.ZoomAboutPoint(zoomAndPanControl.ContentScale / 2, contentZoomCenter); |
742 | 742 |
} |
743 | 743 |
|
744 |
if (zoomAndPanControl2 != null) |
|
744 |
if (zoomAndPanControl2 != null && Sync.IsChecked)
|
|
745 | 745 |
{ |
746 |
if (zoomAndPanControl2.ContentScale > 0.39) |
|
747 |
{ |
|
748 |
zoomAndPanControl2.ZoomAboutPoint(zoomAndPanControl2.ContentScale - 0.2, contentZoomCenter); |
|
749 |
} |
|
750 |
else |
|
751 |
{ |
|
752 |
zoomAndPanControl2.ZoomAboutPoint(zoomAndPanControl2.ContentScale / 2, contentZoomCenter); |
|
753 |
} |
|
746 |
zoomAndPanControl2.ZoomAboutPoint(zoomAndPanControl.ContentScale, contentZoomCenter); |
|
754 | 747 |
} |
755 | 748 |
} |
756 | 749 |
|
... | ... | |
765 | 758 |
zoomAndPanControl.ZoomAboutPoint(zoomAndPanControl.ContentScale * 2, contentZoomCenter); |
766 | 759 |
} |
767 | 760 |
|
768 |
if (zoomAndPanControl2 != null) |
|
761 |
if (zoomAndPanControl2 != null && Sync.IsChecked)
|
|
769 | 762 |
{ |
770 |
if (zoomAndPanControl2.ContentScale > 0.19) |
|
771 |
{ |
|
772 |
zoomAndPanControl2.ZoomAboutPoint(zoomAndPanControl2.ContentScale + 0.2, contentZoomCenter); |
|
773 |
} |
|
774 |
else |
|
775 |
{ |
|
776 |
zoomAndPanControl2.ZoomAboutPoint(zoomAndPanControl2.ContentScale * 2, contentZoomCenter); |
|
777 |
} |
|
763 |
zoomAndPanControl2.ZoomAboutPoint(zoomAndPanControl.ContentScale, contentZoomCenter); |
|
778 | 764 |
} |
779 | 765 |
} |
780 | 766 |
|
... | ... | |
1082 | 1068 |
Vector dragOffset = currentCanvasZoomPanningMouseMovePoint - canvasZoommovingMouseDownPoint; |
1083 | 1069 |
zoomAndPanControl.ContentOffsetX -= dragOffset.X; |
1084 | 1070 |
zoomAndPanControl.ContentOffsetY -= dragOffset.Y; |
1071 |
|
|
1072 |
if(Sync.IsChecked) |
|
1073 |
{ |
|
1074 |
ViewerDataModel.Instance.Sync_ContentOffsetX = zoomAndPanControl.ContentOffsetX; |
|
1075 |
ViewerDataModel.Instance.Sync_ContentOffsetY = zoomAndPanControl.ContentOffsetY; |
|
1076 |
} |
|
1085 | 1077 |
} |
1086 | 1078 |
|
1087 | 1079 |
|
... | ... | |
4435 | 4427 |
} |
4436 | 4428 |
} |
4437 | 4429 |
|
4430 |
private void Sync_Click(object sender, RoutedEventArgs e) |
|
4431 |
{ |
|
4432 |
if(Sync.IsChecked) |
|
4433 |
{ |
|
4434 |
ViewerDataModel.Instance.Sync_ContentOffsetX = zoomAndPanControl.ContentOffsetX; |
|
4435 |
ViewerDataModel.Instance.Sync_ContentOffsetY = zoomAndPanControl.ContentOffsetY; |
|
4436 |
ViewerDataModel.Instance.Sync_ContentScale = zoomAndPanControl.ContentScale; |
|
4437 |
} |
|
4438 |
} |
|
4439 |
|
|
4438 | 4440 |
private void SyncUserListExpender_Click(object sender, RoutedEventArgs e) |
4439 | 4441 |
{ |
4440 | 4442 |
if (UserList.IsChecked) |
... | ... | |
4726 | 4728 |
zoomAndPanControl.ContentOffsetY = Sync_Offset_Point.Y; |
4727 | 4729 |
} |
4728 | 4730 |
|
4731 |
ViewerDataModel.Instance.Sync_ContentOffsetX = Sync_Offset_Point.X; |
|
4732 |
ViewerDataModel.Instance.Sync_ContentOffsetY = Sync_Offset_Point.Y; |
|
4733 |
ViewerDataModel.Instance.Sync_ContentScale = zoomAndPanControl.ContentScale; |
|
4734 |
|
|
4729 | 4735 |
tlSyncRev.Text = String.Format("Rev. {0}", CurrentRev.RevNo); |
4730 | 4736 |
tlSyncPageNum.Text = String.Format("Current Page : {0}", pageNavigator.CurrentPage.PageNumber); |
4731 | 4737 |
gridViewHistory_Busy.IsBusy = false; |
내보내기 Unified diff