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

68 lines
2.2 KiB

6 months ago
using KGIS.Framework.Maps;
using KGIS.Framework.Platform;
using KGIS.Framework.Views;
using System;
using System.Windows.Controls;
namespace Kingo.Plugin.DLTB_IDG.View
{
/// <summary>
/// 单图斑变更视图容器 的交互逻辑
/// </summary>
public partial class SingleFeatureChangView : UserControl, IDockPanel2
{
public SingleFeatureChangView(object M_hookHelper)
{
InitializeComponent();
DevExpress.Xpf.Core.ThemeManager.SetTheme(this, DevExpress.Xpf.Core.Theme.Office2013LightGray);
DockAreas = DockStyle.DockRight | DockStyle.DockBottom | DockStyle.DockLeft;
FloatSize = new System.Drawing.Size(1030, 660);
DockWidth = 660;
DockHeight = 380;
DefaultArea = DockStyle.DockBottom;
ShowCloseButton = true;
ShowAutoHideButton = false;
Title = "单图斑变更";
IsShowInMap = true;
ucSingleBGTB.InitView(M_hookHelper);
}
public bool IsShowInMap { 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 event EventHandler CloseViewHandler;
public void ClosePanel()
{
Platform.Instance.CloseView(this);
}
public void ClosePanelInvoke()
{
CloseViewHandler?.Invoke(null, null);
}
public void ShowPanel()
{
Platform.Instance.OpenView(this, false);
if (MapsManager.Instance.MapService != null)
{
MapsManager.Instance.MapService.ProjectClosed += Platform_CloseProjectEvent;
}
}
void Platform_CloseProjectEvent(object sender, object e)
{
MapsManager.Instance.MapService.ProjectClosed -= Platform_CloseProjectEvent;
this.ClosePanel();
}
}
}