using KGIS.Framework.Utils;
using KGIS.Framework.Utils.ExtensionMethod;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Xml.Linq;
namespace Kingo.Plugin.General.View
{
///
/// SelectDeviceWin.xaml 的交互逻辑
///
public partial class FrmAbout : BaseWindow
{
public FrmAbout()
{
InitializeComponent();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
try
{
string cfgFilePath = System.IO.Path.Combine(SysAppPath.GetConfigPath(), "HelperConfigs.xml");
XDocument pXDoc = XDocument.Load(cfgFilePath);
XElement element = pXDoc.Element("Helper");
var sdm = KGIS.Framework.Utils.SysConfigsOprator.GetAppsetingValueByKey("ArearName");
IEnumerable elements = pXDoc.Element("Helper").Elements().Where(x => x.Attribute("ArearName").Value.ToTrim().Contains(sdm));
if (elements != null)
{
var item = elements.FirstOrDefault();
this.txtName.Text = item.Attribute("softWareName").Value;//软件名称
this.txtVerdion.Text = item.Attribute("Version").Value;//版本号
this.txtYWZX.Text = item.Attribute("BusinessPhone").Value;//业务咨询
this.txtZJ.Text = item.Attribute("Telephone").Value;//总机
this.txtYX.Text = item.Attribute("Email").Value;//邮箱
this.txtDZ.Text = item.Attribute("Address").Value;//地址
}
}
catch (Exception ex)
{
LogAPI.Debug("获取帮助信息失败:" + ex.Message);
}
}
}
}