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

138 lines
3.8 KiB

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Kingo.Mobile.Shape2KOTool.KoDataBase;
using Kingo.Mobile.Shape2KOTool.XSDClass;
namespace Kingo.Mobile.Shape2KOTool.SymbolSetting
{
// Token: 0x02000041 RID: 65
public partial class frmSymbolConfig : Form
{
// Token: 0x170000C8 RID: 200
// (get) Token: 0x06000211 RID: 529 RVA: 0x0000A0E8 File Offset: 0x000082E8
// (set) Token: 0x06000210 RID: 528 RVA: 0x0000A0DC File Offset: 0x000082DC
public List<ShapeFieldInfo> Fields { get; set; }
// Token: 0x170000C9 RID: 201
// (get) Token: 0x06000212 RID: 530 RVA: 0x0000A100 File Offset: 0x00008300
// (set) Token: 0x06000213 RID: 531 RVA: 0x0000A117 File Offset: 0x00008317
public ISpatialDataSource SpatialDataSource { get; set; }
// Token: 0x06000214 RID: 532 RVA: 0x0000A120 File Offset: 0x00008320
public frmSymbolConfig()
{
this.InitializeComponent();
}
// Token: 0x06000215 RID: 533 RVA: 0x0000A139 File Offset: 0x00008339
private void frmSymbolConfig_Load(object sender, EventArgs e)
{
}
// Token: 0x06000216 RID: 534 RVA: 0x0000A13C File Offset: 0x0000833C
private void treeView1_BeforeSelect(object sender, TreeViewCancelEventArgs e)
{
if (e.Node != null && e.Node.Level == 0)
{
e.Cancel = true;
if (e.Node.Nodes.Count > 0)
{
this.treeView1.SelectedNode = e.Node.Nodes[0];
}
}
}
// Token: 0x06000217 RID: 535 RVA: 0x0000A1AD File Offset: 0x000083AD
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
{
this.SelectNode(e.Node);
}
// Token: 0x06000218 RID: 536 RVA: 0x0000A1C0 File Offset: 0x000083C0
private void SelectNode(TreeNode node)
{
if (node.Level == 1)
{
if (node.Tag == null)
{
Type type = Type.GetType("Kingo.Mobile.Shape2KOTool.SymbolSetting." + node.Name, false);
if (type == null)
{
return;
}
UserControl userControl = Activator.CreateInstance(type) as UserControl;
if (userControl == null)
{
return;
}
userControl.Dock = DockStyle.Fill;
node.Tag = userControl;
if (userControl is UCUniqueValueSymbolConfig)
{
UCUniqueValueSymbolConfig ucuniqueValueSymbolConfig = userControl as UCUniqueValueSymbolConfig;
ucuniqueValueSymbolConfig.SetFieldList(this.Fields);
ucuniqueValueSymbolConfig.SpatialDataSource = this.SpatialDataSource;
}
}
this.panelContent.Controls.Clear();
if (node.Tag is ISymbolConfig)
{
this.pictureBox.Image = (node.Tag as ISymbolConfig).SimpleImage;
}
this.panelContent.Controls.Add(node.Tag as Control);
}
}
// Token: 0x170000CA RID: 202
// (get) Token: 0x06000219 RID: 537 RVA: 0x0000A2DC File Offset: 0x000084DC
// (set) Token: 0x0600021A RID: 538 RVA: 0x0000A31C File Offset: 0x0000851C
public Renderer Renderer
{
get
{
IRender render = this.treeView1.SelectedNode.Tag as IRender;
Renderer result;
if (render == null)
{
result = null;
}
else
{
result = render.Render;
}
return result;
}
set
{
if (value != null)
{
if (value is SimpleRenderer)
{
this.treeView1.SelectedNode = this.treeView1.Nodes[0].Nodes[0];
}
else if (value is UniqueValueRenderer)
{
this.treeView1.SelectedNode = this.treeView1.Nodes[1].Nodes[0];
}
this.SelectNode(this.treeView1.SelectedNode);
IRender render = this.treeView1.SelectedNode.Tag as IRender;
render.Render = value;
}
else
{
this.treeView1.SelectedNode = this.treeView1.Nodes[0].Nodes[0];
}
}
}
// Token: 0x0600021B RID: 539 RVA: 0x0000A409 File Offset: 0x00008609
private void btnOk_Click(object sender, EventArgs e)
{
base.DialogResult = DialogResult.OK;
base.Close();
}
}
}