|
|
|
|
using ESRI.ArcGIS.Carto;
|
|
|
|
|
using ESRI.ArcGIS.Geodatabase;
|
|
|
|
|
using KGIS.Framework.AE;
|
|
|
|
|
using KGIS.Framework.Maps;
|
|
|
|
|
using KGIS.Framework.Platform;
|
|
|
|
|
using KGIS.Framework.Utils;
|
|
|
|
|
using KGIS.Framework.Views;
|
|
|
|
|
using Kingo.PluginServiceInterface;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
|
|
|
|
|
namespace Kingo.Plugin.ProofManager.View
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// UCProofInfo.xaml 的交互逻辑
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class UCProofInfo : UserControl, IElementInfo
|
|
|
|
|
{
|
|
|
|
|
public UCProofInfo()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
Title = "外业信息";
|
|
|
|
|
DockHeight = 140;
|
|
|
|
|
TabItem tab = new TabItem();
|
|
|
|
|
tab.Content = new UCProofInfo_Item();
|
|
|
|
|
tab.Header = "监测编号";
|
|
|
|
|
TabControls.Items.Add(tab);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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 bool IsShow { get; set; }
|
|
|
|
|
public void BindData(object obj)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var o = obj as List<ProofInfo>;
|
|
|
|
|
if (o != null)
|
|
|
|
|
{
|
|
|
|
|
TabControls.Items.Clear();
|
|
|
|
|
foreach (var item in o)
|
|
|
|
|
{
|
|
|
|
|
TabItem tab = new TabItem();
|
|
|
|
|
UCProofInfo_Item info_Item = new UCProofInfo_Item();
|
|
|
|
|
info_Item.BindData(item);
|
|
|
|
|
tab.Content = info_Item;
|
|
|
|
|
tab.Header = item.JCBH;
|
|
|
|
|
tab.Tag = item;
|
|
|
|
|
TabControls.Items.Add(tab);
|
|
|
|
|
}
|
|
|
|
|
TabControls.SelectedIndex = 0;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (TabControls.Items.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
if (TabControls.Items.Count > 1)
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < TabControls.Items.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
if (i == 0) continue;
|
|
|
|
|
TabControls.Items.RemoveAt(i);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var tab = (TabControls.Items[0] as TabItem).Content as UCProofInfo_Item;
|
|
|
|
|
(TabControls.Items[0] as TabItem).Header = "监测编号";
|
|
|
|
|
tab.BGTB.Text = "";
|
|
|
|
|
tab.BGFW.Text = "";
|
|
|
|
|
tab.WBGLX.Text = "";
|
|
|
|
|
tab.BZ.Text = "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
LogAPI.Debug("绑定外业信息时异常,异常信息如下:");
|
|
|
|
|
LogAPI.Debug(ex);
|
|
|
|
|
LogAPI.Debug("绑定外业信息时异常 异常信息结束");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SaveEdit()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
var _TabControl = sender as TabControl;
|
|
|
|
|
if (_TabControl != null)
|
|
|
|
|
{
|
|
|
|
|
var tabItem = _TabControl.SelectedItem as TabItem;
|
|
|
|
|
if (tabItem != null && tabItem.Tag is ProofInfo)
|
|
|
|
|
{
|
|
|
|
|
Platform.Instance.SendMsg(new KGIS.Framework.Utils.Interface.NotifyMsgPackage() { MsgType = "BindProofImg", Content = (tabItem.Tag as ProofInfo).ImgList });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|