年度变更建库软件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.
 
 

83 lines
2.5 KiB

using ESRI.ArcGIS.Geodatabase;
using KGIS.Framework.Views;
using Kingo.PluginServiceInterface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using UIShell.OSGi;
namespace Kingo.Plugin.NYYP.View
{
/// <summary>
/// UCWYInfo.xaml 的交互逻辑
/// </summary>
public partial class UCWYInfo : UserControl, IElementInfo
{
private IProofManager ProofMgr = null;
public UCWYInfo()
{
InitializeComponent();
Title = "外业信息组件";
}
public bool IsShow { get; set; }
public int ShowIndex { get; set; }
public bool ResetSize { get; set; }
public bool AllowEdit { get; set; }
public Guid ID { get; set; }
public DockStyle DockAreas { get; set; }
public System.Drawing.Size FloatSize { get; set; }
public int DockWidth { get; set; }
public int DockHeight { get; set; }
public DockStyle DefaultArea { get; set; }
public bool ShowCloseButton { get; set; }
public bool ShowAutoHideButton { get; set; }
public string Title { get; set; }
public void BindData(object obj)
{
if (ProofMgr == null)
ProofMgr = BundleRuntime.Instance.GetFirstOrDefaultService<IProofManager>();
if (obj is IFeature)
{
int fieldIndex = (obj as IFeature).Fields.FindField("TBYBH");
if (fieldIndex == -1)
return;
List<ProofInfo> result = ProofMgr.GetProofInfoList<ProofInfo>((obj as IFeature).Value[fieldIndex].ToString());
if (result != null && result.Count > 0)
{
this.DataContext = result[0];
}
}
else if (obj is List<ProofInfo>)
{
var tempData = obj as List<ProofInfo>;
if (tempData != null && tempData.Count > 0)
{
this.DataContext = tempData[0];
}
}
else
{
this.DataContext = null;
}
}
public void SaveEdit()
{
return;
}
}
}