年度变更建库软件5.0版本
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
2.3 KiB

6 months ago
using KGIS.Framework.Utils;
using KGIS.Framework.Utils.Helper;
using System;
using System.IO;
using System.Windows;
using System.Windows.Xps.Packaging;
namespace Kingo.Plugin.General.View
{
/// <summary>
/// FrmHelper.xaml 的交互逻辑
/// </summary>
public partial class FrmHelper : BaseWindow
{
public FrmHelper()
{
InitializeComponent();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
try
{
string wyzsDocumentPath = string.Empty;
//switch (KGIS.Framework.Platform.Platform.Instance.SystemType)
//{
// case SystemTypeEnum.YCLJK:
// wyzsDocumentPath = System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, "工作空间DTBJK", "初始化工程模板", "帮助", "县级单图斑建库系统操作手册.xps");
// break;
// case SystemTypeEnum.DTBJK:
// wyzsDocumentPath = System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, "工作空间DTBJK", "初始化工程模板", "帮助", "县级单图斑建库系统操作手册.xps");
// break;
// case SystemTypeEnum.WYZS:
// wyzsDocumentPath = System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, "工作空间DTBJK", "初始化工程模板", "帮助", "县级单图斑建库系统操作手册.xps");
// break;
//}
wyzsDocumentPath = System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, "工作空间DTBJK", "初始化工程模板", "帮助", "县级单图斑建库系统操作手册.xps");
if (!File.Exists(wyzsDocumentPath))
{
MessageHelper.Show("没有找到使用手册:" + wyzsDocumentPath);
return;
}
bgzsdocViewer.Document = new XpsDocument(wyzsDocumentPath, FileAccess.Read).GetFixedDocumentSequence();
bgzsdocViewer.FitToWidth();
}
catch (Exception ex)
{
LogAPI.Debug("文档读取失败:" + ex.Message);
MessageHelper.ShowTips("初始化帮助文档失败!");
}
}
}
}