|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Resources;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using Kingo.Mobile.Shape2KOTool.KoDataBase;
|
|
|
|
|
using Kingo.Mobile.Shape2KOTool.XSDClass;
|
|
|
|
|
|
|
|
|
|
namespace Kingo.Mobile.Shape2KOTool.SymbolSetting
|
|
|
|
|
{
|
|
|
|
|
// Token: 0x02000049 RID: 73
|
|
|
|
|
public class UCUniqueValueSymbolConfig : UserControl, ISymbolConfig, IRender
|
|
|
|
|
{
|
|
|
|
|
// Token: 0x06000259 RID: 601 RVA: 0x0000D1AC File Offset: 0x0000B3AC
|
|
|
|
|
protected override void Dispose(bool disposing)
|
|
|
|
|
{
|
|
|
|
|
if (disposing && this.components != null)
|
|
|
|
|
{
|
|
|
|
|
this.components.Dispose();
|
|
|
|
|
}
|
|
|
|
|
base.Dispose(disposing);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x0600025A RID: 602 RVA: 0x0000D1E4 File Offset: 0x0000B3E4
|
|
|
|
|
private void InitializeComponent()
|
|
|
|
|
{
|
|
|
|
|
this.components = new Container();
|
|
|
|
|
this.panel1 = new Panel();
|
|
|
|
|
this.groupBox3 = new GroupBox();
|
|
|
|
|
this.ucPCEndColor = new UCPanelColor();
|
|
|
|
|
this.label2 = new Label();
|
|
|
|
|
this.ucPCStartColor = new UCPanelColor();
|
|
|
|
|
this.label1 = new Label();
|
|
|
|
|
this.groupBox2 = new GroupBox();
|
|
|
|
|
this.cboxFieldList = new ComboBox();
|
|
|
|
|
this.groupBox1 = new GroupBox();
|
|
|
|
|
this.dataGridView1 = new DataGridView();
|
|
|
|
|
this.colSymbol = new DataGridViewImageColumn();
|
|
|
|
|
this.colValue = new DataGridViewTextBoxColumn();
|
|
|
|
|
this.colLabel = new DataGridViewTextBoxColumn();
|
|
|
|
|
this.colCount = new DataGridViewTextBoxColumn();
|
|
|
|
|
this.fSymbolDataGridViewTextBoxColumn = new DataGridViewTextBoxColumn();
|
|
|
|
|
this.uniqueStyleBindingSource = new BindingSource(this.components);
|
|
|
|
|
this.panel2 = new Panel();
|
|
|
|
|
this.btnButtom = new Button();
|
|
|
|
|
this.btnDown = new Button();
|
|
|
|
|
this.btnUp = new Button();
|
|
|
|
|
this.btnTop = new Button();
|
|
|
|
|
this.btnAddAll = new Button();
|
|
|
|
|
this.btnAdd = new Button();
|
|
|
|
|
this.btnDelete = new Button();
|
|
|
|
|
this.btnDeleteAll = new Button();
|
|
|
|
|
this.panel1.SuspendLayout();
|
|
|
|
|
this.groupBox3.SuspendLayout();
|
|
|
|
|
this.groupBox2.SuspendLayout();
|
|
|
|
|
this.groupBox1.SuspendLayout();
|
|
|
|
|
((ISupportInitialize)this.dataGridView1).BeginInit();
|
|
|
|
|
((ISupportInitialize)this.uniqueStyleBindingSource).BeginInit();
|
|
|
|
|
this.panel2.SuspendLayout();
|
|
|
|
|
base.SuspendLayout();
|
|
|
|
|
this.panel1.Controls.Add(this.groupBox3);
|
|
|
|
|
this.panel1.Controls.Add(this.groupBox2);
|
|
|
|
|
this.panel1.Dock = DockStyle.Top;
|
|
|
|
|
this.panel1.Location = new Point(0, 0);
|
|
|
|
|
this.panel1.Name = "panel1";
|
|
|
|
|
this.panel1.Size = new Size(526, 40);
|
|
|
|
|
this.panel1.TabIndex = 0;
|
|
|
|
|
this.groupBox3.Controls.Add(this.ucPCEndColor);
|
|
|
|
|
this.groupBox3.Controls.Add(this.label2);
|
|
|
|
|
this.groupBox3.Controls.Add(this.ucPCStartColor);
|
|
|
|
|
this.groupBox3.Controls.Add(this.label1);
|
|
|
|
|
this.groupBox3.Dock = DockStyle.Fill;
|
|
|
|
|
this.groupBox3.Location = new Point(200, 0);
|
|
|
|
|
this.groupBox3.Name = "groupBox3";
|
|
|
|
|
this.groupBox3.Size = new Size(326, 40);
|
|
|
|
|
this.groupBox3.TabIndex = 3;
|
|
|
|
|
this.groupBox3.TabStop = false;
|
|
|
|
|
this.groupBox3.Text = "颜色区域";
|
|
|
|
|
this.ucPCEndColor.BackColor = Color.Blue;
|
|
|
|
|
this.ucPCEndColor.BorderStyle = BorderStyle.Fixed3D;
|
|
|
|
|
this.ucPCEndColor.Color = Color.Blue;
|
|
|
|
|
this.ucPCEndColor.Cursor = Cursors.Hand;
|
|
|
|
|
this.ucPCEndColor.Dock = DockStyle.Left;
|
|
|
|
|
this.ucPCEndColor.Location = new Point(184, 17);
|
|
|
|
|
this.ucPCEndColor.Name = "ucPCEndColor";
|
|
|
|
|
this.ucPCEndColor.Size = new Size(47, 20);
|
|
|
|
|
this.ucPCEndColor.TabIndex = 7;
|
|
|
|
|
this.label2.Dock = DockStyle.Left;
|
|
|
|
|
this.label2.Location = new Point(117, 17);
|
|
|
|
|
this.label2.Name = "label2";
|
|
|
|
|
this.label2.Size = new Size(67, 20);
|
|
|
|
|
this.label2.TabIndex = 5;
|
|
|
|
|
this.label2.Text = "结束颜色:";
|
|
|
|
|
this.label2.TextAlign = ContentAlignment.MiddleCenter;
|
|
|
|
|
this.ucPCStartColor.BackColor = Color.White;
|
|
|
|
|
this.ucPCStartColor.BorderStyle = BorderStyle.Fixed3D;
|
|
|
|
|
this.ucPCStartColor.Color = Color.White;
|
|
|
|
|
this.ucPCStartColor.Cursor = Cursors.Hand;
|
|
|
|
|
this.ucPCStartColor.Dock = DockStyle.Left;
|
|
|
|
|
this.ucPCStartColor.Location = new Point(70, 17);
|
|
|
|
|
this.ucPCStartColor.Name = "ucPCStartColor";
|
|
|
|
|
this.ucPCStartColor.Size = new Size(47, 20);
|
|
|
|
|
this.ucPCStartColor.TabIndex = 6;
|
|
|
|
|
this.label1.Dock = DockStyle.Left;
|
|
|
|
|
this.label1.Location = new Point(3, 17);
|
|
|
|
|
this.label1.Name = "label1";
|
|
|
|
|
this.label1.Size = new Size(67, 20);
|
|
|
|
|
this.label1.TabIndex = 3;
|
|
|
|
|
this.label1.Text = "开始颜色:";
|
|
|
|
|
this.label1.TextAlign = ContentAlignment.MiddleCenter;
|
|
|
|
|
this.groupBox2.Controls.Add(this.cboxFieldList);
|
|
|
|
|
this.groupBox2.Dock = DockStyle.Left;
|
|
|
|
|
this.groupBox2.Location = new Point(0, 0);
|
|
|
|
|
this.groupBox2.Name = "groupBox2";
|
|
|
|
|
this.groupBox2.Size = new Size(200, 40);
|
|
|
|
|
this.groupBox2.TabIndex = 2;
|
|
|
|
|
this.groupBox2.TabStop = false;
|
|
|
|
|
this.groupBox2.Text = "字段";
|
|
|
|
|
this.cboxFieldList.DisplayMember = "FieldAlias";
|
|
|
|
|
this.cboxFieldList.Dock = DockStyle.Fill;
|
|
|
|
|
this.cboxFieldList.FormattingEnabled = true;
|
|
|
|
|
this.cboxFieldList.Location = new Point(3, 17);
|
|
|
|
|
this.cboxFieldList.Name = "cboxFieldList";
|
|
|
|
|
this.cboxFieldList.Size = new Size(194, 20);
|
|
|
|
|
this.cboxFieldList.TabIndex = 0;
|
|
|
|
|
this.cboxFieldList.ValueMember = "FieldName";
|
|
|
|
|
this.groupBox1.Controls.Add(this.dataGridView1);
|
|
|
|
|
this.groupBox1.Controls.Add(this.panel2);
|
|
|
|
|
this.groupBox1.Dock = DockStyle.Fill;
|
|
|
|
|
this.groupBox1.Location = new Point(0, 40);
|
|
|
|
|
this.groupBox1.Name = "groupBox1";
|
|
|
|
|
this.groupBox1.Size = new Size(526, 251);
|
|
|
|
|
this.groupBox1.TabIndex = 1;
|
|
|
|
|
this.groupBox1.TabStop = false;
|
|
|
|
|
this.groupBox1.Text = "样式列表";
|
|
|
|
|
this.dataGridView1.AllowUserToAddRows = false;
|
|
|
|
|
this.dataGridView1.AllowUserToDeleteRows = false;
|
|
|
|
|
this.dataGridView1.AllowUserToResizeRows = false;
|
|
|
|
|
this.dataGridView1.AutoGenerateColumns = false;
|
|
|
|
|
this.dataGridView1.BorderStyle = BorderStyle.None;
|
|
|
|
|
this.dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
|
|
|
this.dataGridView1.Columns.AddRange(new DataGridViewColumn[]
|
|
|
|
|
{
|
|
|
|
|
this.colSymbol,
|
|
|
|
|
this.colValue,
|
|
|
|
|
this.colLabel,
|
|
|
|
|
this.colCount,
|
|
|
|
|
this.fSymbolDataGridViewTextBoxColumn
|
|
|
|
|
});
|
|
|
|
|
this.dataGridView1.DataSource = this.uniqueStyleBindingSource;
|
|
|
|
|
this.dataGridView1.Dock = DockStyle.Fill;
|
|
|
|
|
this.dataGridView1.EditMode = DataGridViewEditMode.EditOnEnter;
|
|
|
|
|
this.dataGridView1.Location = new Point(3, 17);
|
|
|
|
|
this.dataGridView1.Name = "dataGridView1";
|
|
|
|
|
this.dataGridView1.RowHeadersVisible = false;
|
|
|
|
|
this.dataGridView1.RowTemplate.Height = 23;
|
|
|
|
|
this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
|
|
|
|
this.dataGridView1.Size = new Size(422, 231);
|
|
|
|
|
this.dataGridView1.TabIndex = 1;
|
|
|
|
|
this.dataGridView1.CellClick += this.dataGridView1_CellClick;
|
|
|
|
|
this.dataGridView1.CellContentDoubleClick += this.dataGridView1_CellContentDoubleClick;
|
|
|
|
|
this.colSymbol.DataPropertyName = "Img";
|
|
|
|
|
this.colSymbol.HeaderText = "样式";
|
|
|
|
|
this.colSymbol.Name = "colSymbol";
|
|
|
|
|
this.colValue.DataPropertyName = "Value";
|
|
|
|
|
this.colValue.HeaderText = "值";
|
|
|
|
|
this.colValue.Name = "colValue";
|
|
|
|
|
this.colValue.ReadOnly = true;
|
|
|
|
|
this.colLabel.DataPropertyName = "Lable";
|
|
|
|
|
this.colLabel.HeaderText = "标注";
|
|
|
|
|
this.colLabel.Name = "colLabel";
|
|
|
|
|
this.colCount.DataPropertyName = "Count";
|
|
|
|
|
this.colCount.HeaderText = "数据量";
|
|
|
|
|
this.colCount.Name = "colCount";
|
|
|
|
|
this.colCount.ReadOnly = true;
|
|
|
|
|
this.fSymbolDataGridViewTextBoxColumn.DataPropertyName = "FSymbol";
|
|
|
|
|
this.fSymbolDataGridViewTextBoxColumn.HeaderText = "FSymbol";
|
|
|
|
|
this.fSymbolDataGridViewTextBoxColumn.Name = "fSymbolDataGridViewTextBoxColumn";
|
|
|
|
|
this.fSymbolDataGridViewTextBoxColumn.Visible = false;
|
|
|
|
|
this.uniqueStyleBindingSource.DataSource = typeof(UniqueStyle);
|
|
|
|
|
this.panel2.Controls.Add(this.btnButtom);
|
|
|
|
|
this.panel2.Controls.Add(this.btnDown);
|
|
|
|
|
this.panel2.Controls.Add(this.btnUp);
|
|
|
|
|
this.panel2.Controls.Add(this.btnTop);
|
|
|
|
|
this.panel2.Controls.Add(this.btnAddAll);
|
|
|
|
|
this.panel2.Controls.Add(this.btnAdd);
|
|
|
|
|
this.panel2.Controls.Add(this.btnDelete);
|
|
|
|
|
this.panel2.Controls.Add(this.btnDeleteAll);
|
|
|
|
|
this.panel2.Dock = DockStyle.Right;
|
|
|
|
|
this.panel2.Location = new Point(425, 17);
|
|
|
|
|
this.panel2.Name = "panel2";
|
|
|
|
|
this.panel2.Padding = new Padding(10, 3, 10, 3);
|
|
|
|
|
this.panel2.Size = new Size(98, 231);
|
|
|
|
|
this.panel2.TabIndex = 0;
|
|
|
|
|
this.btnButtom.Dock = DockStyle.Top;
|
|
|
|
|
this.btnButtom.Location = new Point(10, 72);
|
|
|
|
|
this.btnButtom.Name = "btnButtom";
|
|
|
|
|
this.btnButtom.Size = new Size(78, 23);
|
|
|
|
|
this.btnButtom.TabIndex = 6;
|
|
|
|
|
this.btnButtom.Text = "置底";
|
|
|
|
|
this.btnButtom.UseVisualStyleBackColor = true;
|
|
|
|
|
this.btnButtom.Click += this.btnMove_Click;
|
|
|
|
|
this.btnDown.Dock = DockStyle.Top;
|
|
|
|
|
this.btnDown.Location = new Point(10, 49);
|
|
|
|
|
this.btnDown.Name = "btnDown";
|
|
|
|
|
this.btnDown.Size = new Size(78, 23);
|
|
|
|
|
this.btnDown.TabIndex = 1;
|
|
|
|
|
this.btnDown.Text = "下移";
|
|
|
|
|
this.btnDown.UseVisualStyleBackColor = true;
|
|
|
|
|
this.btnDown.Click += this.btnMove_Click;
|
|
|
|
|
this.btnUp.Dock = DockStyle.Top;
|
|
|
|
|
this.btnUp.Location = new Point(10, 26);
|
|
|
|
|
this.btnUp.Name = "btnUp";
|
|
|
|
|
this.btnUp.Size = new Size(78, 23);
|
|
|
|
|
this.btnUp.TabIndex = 0;
|
|
|
|
|
this.btnUp.Text = "上移";
|
|
|
|
|
this.btnUp.UseVisualStyleBackColor = true;
|
|
|
|
|
this.btnUp.Click += this.btnMove_Click;
|
|
|
|
|
this.btnTop.Dock = DockStyle.Top;
|
|
|
|
|
this.btnTop.Location = new Point(10, 3);
|
|
|
|
|
this.btnTop.Name = "btnTop";
|
|
|
|
|
this.btnTop.Size = new Size(78, 23);
|
|
|
|
|
this.btnTop.TabIndex = 7;
|
|
|
|
|
this.btnTop.Text = "置顶";
|
|
|
|
|
this.btnTop.UseVisualStyleBackColor = true;
|
|
|
|
|
this.btnTop.Click += this.btnMove_Click;
|
|
|
|
|
this.btnAddAll.Dock = DockStyle.Bottom;
|
|
|
|
|
this.btnAddAll.Location = new Point(10, 136);
|
|
|
|
|
this.btnAddAll.Name = "btnAddAll";
|
|
|
|
|
this.btnAddAll.Size = new Size(78, 23);
|
|
|
|
|
this.btnAddAll.TabIndex = 4;
|
|
|
|
|
this.btnAddAll.Text = "增加所有";
|
|
|
|
|
this.btnAddAll.UseVisualStyleBackColor = true;
|
|
|
|
|
this.btnAddAll.Click += this.btnAddAll_Click;
|
|
|
|
|
this.btnAdd.Dock = DockStyle.Bottom;
|
|
|
|
|
this.btnAdd.Location = new Point(10, 159);
|
|
|
|
|
this.btnAdd.Name = "btnAdd";
|
|
|
|
|
this.btnAdd.Size = new Size(78, 23);
|
|
|
|
|
this.btnAdd.TabIndex = 2;
|
|
|
|
|
this.btnAdd.Text = "增加";
|
|
|
|
|
this.btnAdd.UseVisualStyleBackColor = true;
|
|
|
|
|
this.btnAdd.Click += this.btnAdd_Click;
|
|
|
|
|
this.btnDelete.Dock = DockStyle.Bottom;
|
|
|
|
|
this.btnDelete.Location = new Point(10, 182);
|
|
|
|
|
this.btnDelete.Name = "btnDelete";
|
|
|
|
|
this.btnDelete.Size = new Size(78, 23);
|
|
|
|
|
this.btnDelete.TabIndex = 3;
|
|
|
|
|
this.btnDelete.Text = "删除";
|
|
|
|
|
this.btnDelete.UseVisualStyleBackColor = true;
|
|
|
|
|
this.btnDelete.Click += this.btnDelete_Click;
|
|
|
|
|
this.btnDeleteAll.Dock = DockStyle.Bottom;
|
|
|
|
|
this.btnDeleteAll.Location = new Point(10, 205);
|
|
|
|
|
this.btnDeleteAll.Name = "btnDeleteAll";
|
|
|
|
|
this.btnDeleteAll.Size = new Size(78, 23);
|
|
|
|
|
this.btnDeleteAll.TabIndex = 5;
|
|
|
|
|
this.btnDeleteAll.Text = "删除所有";
|
|
|
|
|
this.btnDeleteAll.UseVisualStyleBackColor = true;
|
|
|
|
|
this.btnDeleteAll.Click += this.btnDeleteAll_Click;
|
|
|
|
|
base.AutoScaleDimensions = new SizeF(6f, 12f);
|
|
|
|
|
base.AutoScaleMode = AutoScaleMode.Font;
|
|
|
|
|
base.Controls.Add(this.groupBox1);
|
|
|
|
|
base.Controls.Add(this.panel1);
|
|
|
|
|
base.Name = "UCUniqueValueSymbolConfig";
|
|
|
|
|
base.Size = new Size(526, 291);
|
|
|
|
|
this.panel1.ResumeLayout(false);
|
|
|
|
|
this.groupBox3.ResumeLayout(false);
|
|
|
|
|
this.groupBox2.ResumeLayout(false);
|
|
|
|
|
this.groupBox1.ResumeLayout(false);
|
|
|
|
|
((ISupportInitialize)this.dataGridView1).EndInit();
|
|
|
|
|
((ISupportInitialize)this.uniqueStyleBindingSource).EndInit();
|
|
|
|
|
this.panel2.ResumeLayout(false);
|
|
|
|
|
base.ResumeLayout(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x170000D1 RID: 209
|
|
|
|
|
// (get) Token: 0x0600025B RID: 603 RVA: 0x0000E18C File Offset: 0x0000C38C
|
|
|
|
|
[DisplayName("样式图片")]
|
|
|
|
|
public Bitmap SimpleImage
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return (Bitmap)new ResourceManager(base.GetType()).GetObject("sg");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x170000D2 RID: 210
|
|
|
|
|
// (get) Token: 0x0600025C RID: 604 RVA: 0x0000E1B8 File Offset: 0x0000C3B8
|
|
|
|
|
// (set) Token: 0x0600025D RID: 605 RVA: 0x0000E1CF File Offset: 0x0000C3CF
|
|
|
|
|
public ISpatialDataSource SpatialDataSource { get; set; }
|
|
|
|
|
|
|
|
|
|
// Token: 0x0600025E RID: 606 RVA: 0x0000E1D8 File Offset: 0x0000C3D8
|
|
|
|
|
public void SetFieldList(List<ShapeFieldInfo> fields)
|
|
|
|
|
{
|
|
|
|
|
this.cboxFieldList.DataSource = fields;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x0600025F RID: 607 RVA: 0x0000E1E8 File Offset: 0x0000C3E8
|
|
|
|
|
public UCUniqueValueSymbolConfig()
|
|
|
|
|
{
|
|
|
|
|
this.InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000260 RID: 608 RVA: 0x0000E201 File Offset: 0x0000C401
|
|
|
|
|
private void panel3_MouseClick(object sender, MouseEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x170000D3 RID: 211
|
|
|
|
|
// (get) Token: 0x06000261 RID: 609 RVA: 0x0000E228 File Offset: 0x0000C428
|
|
|
|
|
// (set) Token: 0x06000262 RID: 610 RVA: 0x0000E368 File Offset: 0x0000C568
|
|
|
|
|
public Renderer Render
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
Renderer result;
|
|
|
|
|
if (this.uniqueStyleBindingSource.DataSource == null)
|
|
|
|
|
{
|
|
|
|
|
result = null;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
List<UniqueStyle> list = this.uniqueStyleBindingSource.DataSource as List<UniqueStyle>;
|
|
|
|
|
if (list == null)
|
|
|
|
|
{
|
|
|
|
|
result = null;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
UniqueValueRenderer uniqueValueRenderer = new UniqueValueRenderer();
|
|
|
|
|
uniqueValueRenderer.Field1 = this.cboxFieldList.SelectedValue.ToString();
|
|
|
|
|
UniqueStyle uniqueStyle = list.Find((UniqueStyle p) => p.Value == "<all other values>");
|
|
|
|
|
uniqueValueRenderer.DefaultSymbol = uniqueStyle.FSymbol;
|
|
|
|
|
foreach (UniqueStyle uniqueStyle2 in list)
|
|
|
|
|
{
|
|
|
|
|
if (uniqueStyle2 != uniqueStyle)
|
|
|
|
|
{
|
|
|
|
|
UniqueValueInfo item = new UniqueValueInfo
|
|
|
|
|
{
|
|
|
|
|
Label = uniqueStyle2.Lable,
|
|
|
|
|
Value = uniqueStyle2.Value,
|
|
|
|
|
Symbol = uniqueStyle2.FSymbol
|
|
|
|
|
};
|
|
|
|
|
uniqueValueRenderer.UniqueValueInfos.Add(item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
result = uniqueValueRenderer;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value != null)
|
|
|
|
|
{
|
|
|
|
|
if (value is UniqueValueRenderer)
|
|
|
|
|
{
|
|
|
|
|
UniqueValueRenderer uniqueValueRenderer = value as UniqueValueRenderer;
|
|
|
|
|
this.cboxFieldList.Text = uniqueValueRenderer.Field1;
|
|
|
|
|
List<UniqueStyle> list = new List<UniqueStyle>();
|
|
|
|
|
UniqueStyle item = new UniqueStyle
|
|
|
|
|
{
|
|
|
|
|
Lable = "其他所有值",
|
|
|
|
|
Value = "<all other values>",
|
|
|
|
|
Img = this.GetImageFrom(uniqueValueRenderer.DefaultSymbol as FSymbol),
|
|
|
|
|
FSymbol = (uniqueValueRenderer.DefaultSymbol as FSymbol)
|
|
|
|
|
};
|
|
|
|
|
list.Add(item);
|
|
|
|
|
foreach (UniqueValueInfo uniqueValueInfo in uniqueValueRenderer.UniqueValueInfos)
|
|
|
|
|
{
|
|
|
|
|
UniqueStyle item2 = new UniqueStyle
|
|
|
|
|
{
|
|
|
|
|
Lable = uniqueValueInfo.Label,
|
|
|
|
|
Value = uniqueValueInfo.Value,
|
|
|
|
|
Img = this.GetImageFrom(uniqueValueInfo.Symbol as FSymbol),
|
|
|
|
|
FSymbol = (uniqueValueInfo.Symbol as FSymbol)
|
|
|
|
|
};
|
|
|
|
|
list.Add(item2);
|
|
|
|
|
}
|
|
|
|
|
this.uniqueStyleBindingSource.DataSource = list;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000263 RID: 611 RVA: 0x0000E4C8 File Offset: 0x0000C6C8
|
|
|
|
|
private void btnAddAll_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.SpatialDataSource.Open();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
Dictionary<string, int> dictionary = this.SpatialDataSource.Distinct(this.cboxFieldList.SelectedValue.ToString());
|
|
|
|
|
double num = (double)dictionary.Count;
|
|
|
|
|
List<UniqueStyle> list = new List<UniqueStyle>();
|
|
|
|
|
SFSymbol sfsymbol = new SFSymbol
|
|
|
|
|
{
|
|
|
|
|
Outline = new SLSymbol
|
|
|
|
|
{
|
|
|
|
|
Width = 0.4,
|
|
|
|
|
Color = new int[]
|
|
|
|
|
{
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
255
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
Color = CommonMethod.GetInt4ColorFromColor(this.ucPCStartColor.Color)
|
|
|
|
|
};
|
|
|
|
|
UniqueStyle item = new UniqueStyle
|
|
|
|
|
{
|
|
|
|
|
Lable = "其他所有值",
|
|
|
|
|
Value = "<all other values>",
|
|
|
|
|
Img = this.GetImageFrom(sfsymbol),
|
|
|
|
|
FSymbol = sfsymbol
|
|
|
|
|
};
|
|
|
|
|
list.Add(item);
|
|
|
|
|
float[] array = CommonMethod.rgb2hsb(this.ucPCStartColor.Color);
|
|
|
|
|
float[] array2 = CommonMethod.rgb2hsb(this.ucPCEndColor.Color);
|
|
|
|
|
float num2 = array[0] - array2[0];
|
|
|
|
|
float num3 = array[1] - array2[1];
|
|
|
|
|
float num4 = array[2] - array2[2];
|
|
|
|
|
float num5 = (float)((double)num2 / num);
|
|
|
|
|
float num6 = (float)((double)num3 / num);
|
|
|
|
|
float num7 = (float)((double)num4 / num);
|
|
|
|
|
float num8 = array[0];
|
|
|
|
|
float num9 = array[1];
|
|
|
|
|
float num10 = array[2];
|
|
|
|
|
int num11 = 0;
|
|
|
|
|
foreach (KeyValuePair<string, int> keyValuePair in dictionary)
|
|
|
|
|
{
|
|
|
|
|
Color color = CommonMethod.hsb2rgb(num8 - num5 * (float)(num11 + 1), num9 - num6 * (float)(num11 + 1), num10 - num7 * (float)(num11 + 1));
|
|
|
|
|
SFSymbol sfsymbol2 = new SFSymbol
|
|
|
|
|
{
|
|
|
|
|
Outline = new SLSymbol
|
|
|
|
|
{
|
|
|
|
|
Width = 0.4,
|
|
|
|
|
Color = new int[]
|
|
|
|
|
{
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
255
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
Color = CommonMethod.GetInt4ColorFromColor(color)
|
|
|
|
|
};
|
|
|
|
|
UniqueStyle item2 = new UniqueStyle
|
|
|
|
|
{
|
|
|
|
|
Count = keyValuePair.Value,
|
|
|
|
|
Value = keyValuePair.Key,
|
|
|
|
|
FSymbol = sfsymbol2,
|
|
|
|
|
Img = this.GetImageFrom(sfsymbol2),
|
|
|
|
|
Lable = keyValuePair.Key
|
|
|
|
|
};
|
|
|
|
|
list.Add(item2);
|
|
|
|
|
num11++;
|
|
|
|
|
}
|
|
|
|
|
this.uniqueStyleBindingSource.DataSource = list;
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|
this.SpatialDataSource.Close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000264 RID: 612 RVA: 0x0000E794 File Offset: 0x0000C994
|
|
|
|
|
private void BindingData()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000265 RID: 613 RVA: 0x0000E798 File Offset: 0x0000C998
|
|
|
|
|
private Image GetImageFrom(FSymbol fSymbol)
|
|
|
|
|
{
|
|
|
|
|
int height = 20;
|
|
|
|
|
int width = 50;
|
|
|
|
|
return CommonMethod.GetImageFrom(fSymbol, height, width);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000266 RID: 614 RVA: 0x0000E7B8 File Offset: 0x0000C9B8
|
|
|
|
|
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000267 RID: 615 RVA: 0x0000E7BC File Offset: 0x0000C9BC
|
|
|
|
|
private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (e.ColumnIndex == this.colSymbol.Index && e.RowIndex > -1)
|
|
|
|
|
{
|
|
|
|
|
frmSymbolSelector frmSymbolSelector = new frmSymbolSelector();
|
|
|
|
|
frmSymbolSelector.ShowInTaskbar = false;
|
|
|
|
|
UniqueStyle uniqueStyle = this.dataGridView1.Rows[e.RowIndex].DataBoundItem as UniqueStyle;
|
|
|
|
|
frmSymbolSelector.FSymbol = uniqueStyle.FSymbol;
|
|
|
|
|
if (frmSymbolSelector.ShowDialog(this) == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
uniqueStyle.FSymbol = frmSymbolSelector.FSymbol;
|
|
|
|
|
uniqueStyle.Img = this.GetImageFrom(uniqueStyle.FSymbol);
|
|
|
|
|
this.uniqueStyleBindingSource.ResetBindings(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000268 RID: 616 RVA: 0x0000E870 File Offset: 0x0000CA70
|
|
|
|
|
private void btnMove_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (this.dataGridView1.SelectedRows.Count == 1)
|
|
|
|
|
{
|
|
|
|
|
UniqueStyle uniqueStyle = this.dataGridView1.SelectedRows[0].DataBoundItem as UniqueStyle;
|
|
|
|
|
if (uniqueStyle != null)
|
|
|
|
|
{
|
|
|
|
|
List<UniqueStyle> list = this.uniqueStyleBindingSource.DataSource as List<UniqueStyle>;
|
|
|
|
|
int num = list.IndexOf(uniqueStyle);
|
|
|
|
|
if (sender == this.btnUp)
|
|
|
|
|
{
|
|
|
|
|
if (num == 0)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
list.Reverse(num - 1, 2);
|
|
|
|
|
num--;
|
|
|
|
|
}
|
|
|
|
|
else if (sender == this.btnDown)
|
|
|
|
|
{
|
|
|
|
|
if (num == list.Count - 1)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
list.Reverse(num, 2);
|
|
|
|
|
num++;
|
|
|
|
|
}
|
|
|
|
|
else if (sender == this.btnTop)
|
|
|
|
|
{
|
|
|
|
|
if (num == 0)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
list.Remove(uniqueStyle);
|
|
|
|
|
list.Insert(0, uniqueStyle);
|
|
|
|
|
num = 0;
|
|
|
|
|
}
|
|
|
|
|
else if (sender == this.btnButtom)
|
|
|
|
|
{
|
|
|
|
|
if (num == list.Count - 1)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
list.Remove(uniqueStyle);
|
|
|
|
|
list.Add(uniqueStyle);
|
|
|
|
|
num = list.Count - 1;
|
|
|
|
|
}
|
|
|
|
|
this.uniqueStyleBindingSource.ResetBindings(false);
|
|
|
|
|
this.uniqueStyleBindingSource.Position = num;
|
|
|
|
|
this.uniqueStyleBindingSource.ResetBindings(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000269 RID: 617 RVA: 0x0000E9E8 File Offset: 0x0000CBE8
|
|
|
|
|
private void btnAdd_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
frmAddUniqueType frmAddUniqueType = new frmAddUniqueType();
|
|
|
|
|
if (frmAddUniqueType.ShowDialog(this) == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
SFSymbol sfsymbol = new SFSymbol
|
|
|
|
|
{
|
|
|
|
|
Outline = new SLSymbol
|
|
|
|
|
{
|
|
|
|
|
Width = 0.4,
|
|
|
|
|
Color = new int[]
|
|
|
|
|
{
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
255
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
Color = CommonMethod.GetInt4ColorFromColor(this.ucPCEndColor.Color)
|
|
|
|
|
};
|
|
|
|
|
UniqueStyle item = new UniqueStyle
|
|
|
|
|
{
|
|
|
|
|
FSymbol = sfsymbol,
|
|
|
|
|
Img = this.GetImageFrom(sfsymbol),
|
|
|
|
|
Value = frmAddUniqueType.Value,
|
|
|
|
|
Lable = frmAddUniqueType.Lable
|
|
|
|
|
};
|
|
|
|
|
List<UniqueStyle> list = this.uniqueStyleBindingSource.DataSource as List<UniqueStyle>;
|
|
|
|
|
list.Add(item);
|
|
|
|
|
this.uniqueStyleBindingSource.ResetBindings(false);
|
|
|
|
|
this.uniqueStyleBindingSource.MoveLast();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x0600026A RID: 618 RVA: 0x0000EAE4 File Offset: 0x0000CCE4
|
|
|
|
|
private void btnDelete_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (this.dataGridView1.SelectedRows.Count == 1)
|
|
|
|
|
{
|
|
|
|
|
UniqueStyle uniqueStyle = this.dataGridView1.SelectedRows[0].DataBoundItem as UniqueStyle;
|
|
|
|
|
if (uniqueStyle != null)
|
|
|
|
|
{
|
|
|
|
|
List<UniqueStyle> list = this.uniqueStyleBindingSource.DataSource as List<UniqueStyle>;
|
|
|
|
|
int num = list.IndexOf(uniqueStyle);
|
|
|
|
|
list.Remove(uniqueStyle);
|
|
|
|
|
this.uniqueStyleBindingSource.ResetBindings(false);
|
|
|
|
|
if (num < list.Count)
|
|
|
|
|
{
|
|
|
|
|
this.uniqueStyleBindingSource.Position = num;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x0600026B RID: 619 RVA: 0x0000EB81 File Offset: 0x0000CD81
|
|
|
|
|
private void btnDeleteAll_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.uniqueStyleBindingSource.DataSource = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400018A RID: 394
|
|
|
|
|
private IContainer components = null;
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400018B RID: 395
|
|
|
|
|
private Panel panel1;
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400018C RID: 396
|
|
|
|
|
private GroupBox groupBox3;
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400018D RID: 397
|
|
|
|
|
private GroupBox groupBox2;
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400018E RID: 398
|
|
|
|
|
private ComboBox cboxFieldList;
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400018F RID: 399
|
|
|
|
|
private GroupBox groupBox1;
|
|
|
|
|
|
|
|
|
|
// Token: 0x04000190 RID: 400
|
|
|
|
|
private DataGridView dataGridView1;
|
|
|
|
|
|
|
|
|
|
// Token: 0x04000191 RID: 401
|
|
|
|
|
private Panel panel2;
|
|
|
|
|
|
|
|
|
|
// Token: 0x04000192 RID: 402
|
|
|
|
|
private Button btnDeleteAll;
|
|
|
|
|
|
|
|
|
|
// Token: 0x04000193 RID: 403
|
|
|
|
|
private Button btnAddAll;
|
|
|
|
|
|
|
|
|
|
// Token: 0x04000194 RID: 404
|
|
|
|
|
private Button btnDelete;
|
|
|
|
|
|
|
|
|
|
// Token: 0x04000195 RID: 405
|
|
|
|
|
private Button btnAdd;
|
|
|
|
|
|
|
|
|
|
// Token: 0x04000196 RID: 406
|
|
|
|
|
private Button btnDown;
|
|
|
|
|
|
|
|
|
|
// Token: 0x04000197 RID: 407
|
|
|
|
|
private Button btnUp;
|
|
|
|
|
|
|
|
|
|
// Token: 0x04000198 RID: 408
|
|
|
|
|
private Label label2;
|
|
|
|
|
|
|
|
|
|
// Token: 0x04000199 RID: 409
|
|
|
|
|
private Label label1;
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400019A RID: 410
|
|
|
|
|
private UCPanelColor ucPCEndColor;
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400019B RID: 411
|
|
|
|
|
private UCPanelColor ucPCStartColor;
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400019C RID: 412
|
|
|
|
|
private DataGridViewImageColumn colSymbol;
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400019D RID: 413
|
|
|
|
|
private DataGridViewTextBoxColumn colValue;
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400019E RID: 414
|
|
|
|
|
private DataGridViewTextBoxColumn colLabel;
|
|
|
|
|
|
|
|
|
|
// Token: 0x0400019F RID: 415
|
|
|
|
|
private DataGridViewTextBoxColumn colCount;
|
|
|
|
|
|
|
|
|
|
// Token: 0x040001A0 RID: 416
|
|
|
|
|
private DataGridViewTextBoxColumn fSymbolDataGridViewTextBoxColumn;
|
|
|
|
|
|
|
|
|
|
// Token: 0x040001A1 RID: 417
|
|
|
|
|
private BindingSource uniqueStyleBindingSource;
|
|
|
|
|
|
|
|
|
|
// Token: 0x040001A2 RID: 418
|
|
|
|
|
private Button btnButtom;
|
|
|
|
|
|
|
|
|
|
// Token: 0x040001A3 RID: 419
|
|
|
|
|
private Button btnTop;
|
|
|
|
|
}
|
|
|
|
|
}
|