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.
|
|
|
|
using KGIS.Framework.Views;
|
|
|
|
|
using Kingo.Plugin.MapView.Views;
|
|
|
|
|
using Kingo.PluginServiceInterface;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Kingo.Plugin.MapView.Services
|
|
|
|
|
{
|
|
|
|
|
public class AttrTableHelper : IAttrTableHelper
|
|
|
|
|
{
|
|
|
|
|
public List<IAttrTableView> AllView { get; set; }
|
|
|
|
|
public IAttrTableView CurrentView { get; set; }
|
|
|
|
|
|
|
|
|
|
public void InitView(string pTitle, object m_hookHelper, List<AttributeViewParameter> pViewParam)
|
|
|
|
|
{
|
|
|
|
|
CurrentView = null;
|
|
|
|
|
if (AllView == null)
|
|
|
|
|
AllView = new List<IAttrTableView>();
|
|
|
|
|
|
|
|
|
|
CurrentView = AllView.FirstOrDefault(f => (f is IDockPanel) && (f as IDockPanel).Title == pTitle);
|
|
|
|
|
if (CurrentView == null)
|
|
|
|
|
{
|
|
|
|
|
CurrentView = new ViewAttrTable(m_hookHelper, pViewParam);
|
|
|
|
|
CurrentView.CloseViewHandler += (s, e) =>
|
|
|
|
|
{
|
|
|
|
|
AllView.Remove(s as IAttrTableView);
|
|
|
|
|
CurrentView = null;
|
|
|
|
|
};
|
|
|
|
|
CurrentView.Title = pTitle;
|
|
|
|
|
AllView.Add(CurrentView);
|
|
|
|
|
}
|
|
|
|
|
CurrentView.ShowPanel();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SelectRowPrevOrNextRow(string pPrevOrNext)
|
|
|
|
|
{
|
|
|
|
|
if (CurrentView == null)
|
|
|
|
|
return;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
switch (pPrevOrNext)
|
|
|
|
|
{
|
|
|
|
|
case "Prev":
|
|
|
|
|
CurrentView.SelectPrevRow();
|
|
|
|
|
break;
|
|
|
|
|
case "Next":
|
|
|
|
|
CurrentView.SelectNextRow();
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
throw ex;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|