|
@@ -6,6 +6,7 @@ using PDF_Master.Model;
|
|
|
using PDF_Master.ViewModels;
|
|
|
using PDF_Master.ViewModels.PropertyPanel.ViewModular;
|
|
|
using PDF_Master.ViewModels.Tools;
|
|
|
+using PDF_Master.Views.BOTA;
|
|
|
using PDF_Master.Views.Dialog;
|
|
|
using PDF_Master.Views.PropertyPanel.ViewModular;
|
|
|
using PDF_Master.Views.Tools;
|
|
@@ -36,6 +37,7 @@ namespace PDF_Master.Views
|
|
|
/// 是否是展开工具栏
|
|
|
/// </summary>
|
|
|
private bool expandToolRow = true;
|
|
|
+
|
|
|
public ViewContent()
|
|
|
{
|
|
|
InitializeComponent();
|
|
@@ -75,6 +77,7 @@ namespace PDF_Master.Views
|
|
|
|
|
|
private void ChangeReadModePropertyOpenUI(ReadModePropertyOpenArgs obj)
|
|
|
{
|
|
|
+ viewModel.ReadModeIsShowProperty = true;
|
|
|
Grid.SetColumnSpan(GridViewer, 3);
|
|
|
Grid.SetColumn(GridViewer, 0);
|
|
|
Grid.SetColumn(Scroller, 4);
|
|
@@ -92,6 +95,15 @@ namespace PDF_Master.Views
|
|
|
Grid.SetRow(DocumentView, 0);
|
|
|
Grid.SetColumnSpan(GridViewer, 4);
|
|
|
Grid.SetColumn(GridViewer, 0);
|
|
|
+
|
|
|
+ #region to do
|
|
|
+
|
|
|
+ //Grid.SetRowSpan(RectangleBota, 4);
|
|
|
+ //Grid.SetRow(RectangleBota, 0);
|
|
|
+
|
|
|
+ //RectangleBota.Visibility = Visibility.Visible;
|
|
|
+
|
|
|
+ #endregion to do
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -103,6 +115,83 @@ namespace PDF_Master.Views
|
|
|
Grid.SetColumn(GridViewer, 2);
|
|
|
Grid.SetColumnSpan(GridViewer, 1);
|
|
|
|
|
|
+ #region to do
|
|
|
+
|
|
|
+ //Grid.SetRowSpan(RectangleBota, 1);
|
|
|
+ //Grid.SetRow(RectangleBota, 2);
|
|
|
+
|
|
|
+ //RectangleBota.Visibility = Visibility.Visible;
|
|
|
+
|
|
|
+ //Panel.SetZIndex(BOTAContent, 0);
|
|
|
+ //Panel.SetZIndex(BOTASplitter, 0);
|
|
|
+
|
|
|
+ #endregion to do
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void RectangleBota_MouseEnter(object sender, MouseEventArgs e)
|
|
|
+ {
|
|
|
+ if (viewModel.mainViewModel.IsBookMode)
|
|
|
+ {
|
|
|
+ RectangleBota.Visibility = Visibility.Collapsed;
|
|
|
+
|
|
|
+ BOTAContent.Visibility = Visibility.Visible;
|
|
|
+ Panel.SetZIndex(BOTAContent, 2);
|
|
|
+ Panel.SetZIndex(BOTASplitter, 2);
|
|
|
+
|
|
|
+ ReadModeContent.Visibility = Visibility.Visible;
|
|
|
+ RectangleReadMode.Visibility = Visibility.Collapsed;
|
|
|
+ //因为ispropertyOpen 属性改成了单向控制 因此这里的语句不再适用
|
|
|
+ //this.TbtnProperty.IsChecked = false;
|
|
|
+ Grid.SetRowSpan(DocumentView, 4);
|
|
|
+ Grid.SetRow(DocumentView, 0);
|
|
|
+ Grid.SetColumnSpan(GridViewer, 1);
|
|
|
+ Grid.SetColumn(GridViewer, 2);
|
|
|
+
|
|
|
+ Grid.SetColumnSpan(BOTAContent, 1);
|
|
|
+ Grid.SetColumn(BOTAContent, 0);
|
|
|
+
|
|
|
+ Grid.SetColumnSpan(BOTASplitter, 1);
|
|
|
+ Grid.SetColumn(BOTASplitter, 1);
|
|
|
+
|
|
|
+ Grid.SetRowSpan(RectangleBota, 4);
|
|
|
+ Grid.SetRow(RectangleBota, 0);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void GridViewer_MouseEnter(object sender, MouseEventArgs e)
|
|
|
+ {
|
|
|
+ if (viewModel.mainViewModel.IsBookMode)
|
|
|
+ {
|
|
|
+ ReadModeContent.Visibility = Visibility.Visible;
|
|
|
+ RectangleReadMode.Visibility = Visibility.Collapsed;
|
|
|
+ //因为ispropertyOpen 属性改成了单向控制 因此这里的语句不再适用
|
|
|
+ //this.TbtnProperty.IsChecked = false;
|
|
|
+ Grid.SetRowSpan(DocumentView, 4);
|
|
|
+ Grid.SetRow(DocumentView, 0);
|
|
|
+
|
|
|
+ Grid.SetRowSpan(RectangleBota, 4);
|
|
|
+ Grid.SetRow(RectangleBota, 0);
|
|
|
+
|
|
|
+ Panel.SetZIndex(BOTAContent, 0);
|
|
|
+ Panel.SetZIndex(BOTASplitter, 0);
|
|
|
+
|
|
|
+ RectangleBota.Visibility = Visibility.Visible;
|
|
|
+
|
|
|
+ if (viewModel.ReadModeIsShowProperty)
|
|
|
+ {
|
|
|
+ Grid.SetColumnSpan(GridViewer, 3);
|
|
|
+ Grid.SetColumn(GridViewer, 0);
|
|
|
+ Grid.SetColumn(Scroller, 4);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Grid.SetColumnSpan(GridViewer, 4);
|
|
|
+ Grid.SetColumn(GridViewer, 0);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -372,7 +461,7 @@ namespace PDF_Master.Views
|
|
|
|
|
|
private void UserControl_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
|
|
|
{
|
|
|
- if((bool)e.NewValue)
|
|
|
+ if ((bool)e.NewValue)
|
|
|
{
|
|
|
//显示后自动聚焦,解决切换页签或者刚打开后直接按快捷键没响应的问题
|
|
|
System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
|
|
@@ -395,14 +484,14 @@ namespace PDF_Master.Views
|
|
|
private void UserControl_MouseDown(object sender, MouseButtonEventArgs e)
|
|
|
{
|
|
|
//鼠标侧键无法在Xaml里绑定 因此写在后台代码里
|
|
|
- if(e.ChangedButton == MouseButton.XButton2)
|
|
|
+ if (e.ChangedButton == MouseButton.XButton2)
|
|
|
{
|
|
|
- if(GlobalCommands.PreViewCommand.CanExecute(null))
|
|
|
+ if (GlobalCommands.PreViewCommand.CanExecute(null))
|
|
|
{
|
|
|
GlobalCommands.PreViewCommand.Execute(null);
|
|
|
}
|
|
|
}
|
|
|
- else if(e.ChangedButton == MouseButton.XButton1)
|
|
|
+ else if (e.ChangedButton == MouseButton.XButton1)
|
|
|
{
|
|
|
if (GlobalCommands.NextViewCommand.CanExecute(null))
|
|
|
{
|