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.
167 lines
5.2 KiB
167 lines
5.2 KiB
using System; |
|
using System.ComponentModel; |
|
using System.Drawing; |
|
using System.Resources; |
|
using System.Windows.Forms; |
|
using Kingo.Mobile.Shape2KOTool.XSDClass; |
|
|
|
namespace Kingo.Mobile.Shape2KOTool.SymbolSetting |
|
{ |
|
// Token: 0x02000067 RID: 103 |
|
public class UCSingleSymbolConfig : UserControl, ISymbolConfig, IRender |
|
{ |
|
// Token: 0x060003E7 RID: 999 RVA: 0x00015B40 File Offset: 0x00013D40 |
|
protected override void Dispose(bool disposing) |
|
{ |
|
if (disposing && this.components != null) |
|
{ |
|
this.components.Dispose(); |
|
} |
|
base.Dispose(disposing); |
|
} |
|
|
|
// Token: 0x060003E8 RID: 1000 RVA: 0x00015B78 File Offset: 0x00013D78 |
|
private void InitializeComponent() |
|
{ |
|
this.groupBox3 = new GroupBox(); |
|
this.txtLabelName = new TextBox(); |
|
this.label1 = new Label(); |
|
this.groupBox2 = new GroupBox(); |
|
this.ucSymbolItem = new UCSymbolItem(); |
|
this.groupBox3.SuspendLayout(); |
|
this.groupBox2.SuspendLayout(); |
|
base.SuspendLayout(); |
|
this.groupBox3.Controls.Add(this.txtLabelName); |
|
this.groupBox3.Controls.Add(this.label1); |
|
this.groupBox3.Dock = DockStyle.Bottom; |
|
this.groupBox3.Location = new Point(0, 188); |
|
this.groupBox3.Name = "groupBox3"; |
|
this.groupBox3.Padding = new Padding(5); |
|
this.groupBox3.Size = new Size(355, 46); |
|
this.groupBox3.TabIndex = 4; |
|
this.groupBox3.TabStop = false; |
|
this.groupBox3.Text = "图例"; |
|
this.txtLabelName.Dock = DockStyle.Fill; |
|
this.txtLabelName.Location = new Point(58, 19); |
|
this.txtLabelName.Name = "txtLabelName"; |
|
this.txtLabelName.Size = new Size(292, 21); |
|
this.txtLabelName.TabIndex = 1; |
|
this.txtLabelName.Text = "默认样式"; |
|
this.txtLabelName.TextAlign = HorizontalAlignment.Right; |
|
this.label1.Dock = DockStyle.Left; |
|
this.label1.Location = new Point(5, 19); |
|
this.label1.Name = "label1"; |
|
this.label1.Size = new Size(53, 22); |
|
this.label1.TabIndex = 0; |
|
this.label1.Text = "图例名称"; |
|
this.label1.TextAlign = ContentAlignment.MiddleCenter; |
|
this.groupBox2.Controls.Add(this.ucSymbolItem); |
|
this.groupBox2.Dock = DockStyle.Fill; |
|
this.groupBox2.Location = new Point(0, 0); |
|
this.groupBox2.Name = "groupBox2"; |
|
this.groupBox2.Padding = new Padding(5); |
|
this.groupBox2.Size = new Size(355, 188); |
|
this.groupBox2.TabIndex = 3; |
|
this.groupBox2.TabStop = false; |
|
this.groupBox2.Text = "样式"; |
|
this.ucSymbolItem.BackColor = Color.Blue; |
|
this.ucSymbolItem.BoderWidth = 1.4; |
|
this.ucSymbolItem.BorderColor = Color.Blue; |
|
this.ucSymbolItem.Dock = DockStyle.Fill; |
|
this.ucSymbolItem.FillColor = Color.White; |
|
this.ucSymbolItem.FillImage = null; |
|
this.ucSymbolItem.Location = new Point(5, 19); |
|
this.ucSymbolItem.Name = "ucSymbolItem"; |
|
this.ucSymbolItem.Padding = new Padding(1); |
|
this.ucSymbolItem.Size = new Size(345, 164); |
|
this.ucSymbolItem.TabIndex = 0; |
|
this.ucSymbolItem.MouseClick += this.ucSymbolItem_MouseClick; |
|
base.AutoScaleDimensions = new SizeF(6f, 12f); |
|
base.AutoScaleMode = AutoScaleMode.Font; |
|
base.Controls.Add(this.groupBox2); |
|
base.Controls.Add(this.groupBox3); |
|
base.Name = "UCSingleSymbolConfig"; |
|
base.Size = new Size(355, 234); |
|
base.Load += this.UCSingleSymbolConfig_Load; |
|
this.groupBox3.ResumeLayout(false); |
|
this.groupBox3.PerformLayout(); |
|
this.groupBox2.ResumeLayout(false); |
|
base.ResumeLayout(false); |
|
} |
|
|
|
// Token: 0x060003E9 RID: 1001 RVA: 0x00015F9B File Offset: 0x0001419B |
|
public UCSingleSymbolConfig() |
|
{ |
|
this.InitializeComponent(); |
|
} |
|
|
|
// Token: 0x1700015F RID: 351 |
|
// (get) Token: 0x060003EA RID: 1002 RVA: 0x00015FB4 File Offset: 0x000141B4 |
|
public Bitmap SimpleImage |
|
{ |
|
get |
|
{ |
|
return (Bitmap)new ResourceManager(base.GetType()).GetObject("sg"); |
|
} |
|
} |
|
|
|
// Token: 0x060003EB RID: 1003 RVA: 0x00015FE0 File Offset: 0x000141E0 |
|
private void UCSingleSymbolConfig_Load(object sender, EventArgs e) |
|
{ |
|
} |
|
|
|
// Token: 0x17000160 RID: 352 |
|
// (get) Token: 0x060003EC RID: 1004 RVA: 0x00015FE4 File Offset: 0x000141E4 |
|
// (set) Token: 0x060003ED RID: 1005 RVA: 0x00016024 File Offset: 0x00014224 |
|
public Renderer Render |
|
{ |
|
get |
|
{ |
|
return new SimpleRenderer |
|
{ |
|
Label = this.txtLabelName.Name, |
|
Symbol = this.ucSymbolItem.FSymbol |
|
}; |
|
} |
|
set |
|
{ |
|
if (value is SimpleRenderer) |
|
{ |
|
SimpleRenderer simpleRenderer = value as SimpleRenderer; |
|
this.txtLabelName.Name = simpleRenderer.Label; |
|
this.ucSymbolItem.FSymbol = (simpleRenderer.Symbol as FSymbol); |
|
} |
|
} |
|
} |
|
|
|
// Token: 0x060003EE RID: 1006 RVA: 0x00016074 File Offset: 0x00014274 |
|
private void ucSymbolItem_MouseClick(object sender, MouseEventArgs e) |
|
{ |
|
frmSymbolSelector frmSymbolSelector = new frmSymbolSelector(); |
|
frmSymbolSelector.ShowInTaskbar = false; |
|
frmSymbolSelector.FSymbol = this.ucSymbolItem.FSymbol; |
|
if (frmSymbolSelector.ShowDialog(this) == DialogResult.OK) |
|
{ |
|
this.ucSymbolItem.FSymbol = frmSymbolSelector.FSymbol; |
|
} |
|
} |
|
|
|
// Token: 0x04000288 RID: 648 |
|
private IContainer components = null; |
|
|
|
// Token: 0x04000289 RID: 649 |
|
private GroupBox groupBox3; |
|
|
|
// Token: 0x0400028A RID: 650 |
|
private TextBox txtLabelName; |
|
|
|
// Token: 0x0400028B RID: 651 |
|
private Label label1; |
|
|
|
// Token: 0x0400028C RID: 652 |
|
private GroupBox groupBox2; |
|
|
|
// Token: 0x0400028D RID: 653 |
|
private UCSymbolItem ucSymbolItem; |
|
} |
|
}
|
|
|