📄 styleform.cs
字号:
///GeoCon, free tool to create gml & svg from gis files.
///Copyright(C) 2005 Amri Rosyada
///Distributed under GNU-LGPL, see a copy of the license in root directory
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using GeoCon.Classification;
namespace GeoCon
{
/// <summary>
/// Form for drawing style setting.
/// </summary>
public class StyleForm : System.Windows.Forms.Form
{
/// <summary>
/// Currency manager associated with a DataGridGraphicColumn
/// </summary>
public CurrencyManager CurrencyMgr;
private GeoCon.Classification.Bin bin;
private ColorDialog colordialog=new ColorDialog();
#region private components
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button StyleButtonCancel;
private System.Windows.Forms.Button StyleButtonApply;
private System.Windows.Forms.TabControl StyleTab;
private System.Windows.Forms.TabPage StyleTabPen;
private System.Windows.Forms.Button StylePenColor;
private System.Windows.Forms.TextBox StyleCustomDash;
private System.Windows.Forms.ComboBox StylePenStyle;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TabPage StyleTabBrush;
private System.Windows.Forms.Button StyleBrushColor;
private System.Windows.Forms.NumericUpDown StyleBrushOpacity;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TabPage StyleTabPoint;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox StylePointSize;
private System.Windows.Forms.TextBox StylePenWidth;
#endregion
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public StyleForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.Load += new System.EventHandler(this.StyleForm_Load);
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.StyleButtonApply = new System.Windows.Forms.Button();
this.StyleButtonCancel = new System.Windows.Forms.Button();
this.StyleTab = new System.Windows.Forms.TabControl();
this.StyleTabPen = new System.Windows.Forms.TabPage();
this.StylePenWidth = new System.Windows.Forms.TextBox();
this.StylePenColor = new System.Windows.Forms.Button();
this.StyleCustomDash = new System.Windows.Forms.TextBox();
this.StylePenStyle = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.StyleTabBrush = new System.Windows.Forms.TabPage();
this.StyleBrushColor = new System.Windows.Forms.Button();
this.StyleBrushOpacity = new System.Windows.Forms.NumericUpDown();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.StyleTabPoint = new System.Windows.Forms.TabPage();
this.StylePointSize = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.StyleTab.SuspendLayout();
this.StyleTabPen.SuspendLayout();
this.StyleTabBrush.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.StyleBrushOpacity)).BeginInit();
this.StyleTabPoint.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.StyleButtonApply);
this.panel1.Controls.Add(this.StyleButtonCancel);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(2, 166);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(150, 24);
this.panel1.TabIndex = 3;
//
// StyleButtonApply
//
this.StyleButtonApply.Dock = System.Windows.Forms.DockStyle.Fill;
this.StyleButtonApply.Location = new System.Drawing.Point(48, 0);
this.StyleButtonApply.Name = "StyleButtonApply";
this.StyleButtonApply.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.StyleButtonApply.Size = new System.Drawing.Size(102, 24);
this.StyleButtonApply.TabIndex = 4;
this.StyleButtonApply.Text = "Apply";
this.StyleButtonApply.Click += new System.EventHandler(this.StyleButtonApply_Click);
//
// StyleButtonCancel
//
this.StyleButtonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.StyleButtonCancel.Dock = System.Windows.Forms.DockStyle.Left;
this.StyleButtonCancel.Location = new System.Drawing.Point(0, 0);
this.StyleButtonCancel.Name = "StyleButtonCancel";
this.StyleButtonCancel.Size = new System.Drawing.Size(48, 24);
this.StyleButtonCancel.TabIndex = 3;
this.StyleButtonCancel.Text = "Cancel";
this.StyleButtonCancel.Click += new System.EventHandler(this.StyleButtonCancel_Click);
//
// StyleTab
//
this.StyleTab.Appearance = System.Windows.Forms.TabAppearance.Buttons;
this.StyleTab.Controls.Add(this.StyleTabPen);
this.StyleTab.Controls.Add(this.StyleTabBrush);
this.StyleTab.Controls.Add(this.StyleTabPoint);
this.StyleTab.Dock = System.Windows.Forms.DockStyle.Fill;
this.StyleTab.Location = new System.Drawing.Point(2, 2);
this.StyleTab.Name = "StyleTab";
this.StyleTab.SelectedIndex = 0;
this.StyleTab.Size = new System.Drawing.Size(150, 164);
this.StyleTab.TabIndex = 4;
//
// StyleTabPen
//
this.StyleTabPen.Controls.Add(this.StylePenWidth);
this.StyleTabPen.Controls.Add(this.StylePenColor);
this.StyleTabPen.Controls.Add(this.StyleCustomDash);
this.StyleTabPen.Controls.Add(this.StylePenStyle);
this.StyleTabPen.Controls.Add(this.label5);
this.StyleTabPen.Controls.Add(this.label2);
this.StyleTabPen.Controls.Add(this.label1);
this.StyleTabPen.Location = new System.Drawing.Point(4, 25);
this.StyleTabPen.Name = "StyleTabPen";
this.StyleTabPen.Size = new System.Drawing.Size(142, 135);
this.StyleTabPen.TabIndex = 0;
this.StyleTabPen.Text = "Pen";
//
// StylePenWidth
//
this.StylePenWidth.Location = new System.Drawing.Point(56, 32);
this.StylePenWidth.Name = "StylePenWidth";
this.StylePenWidth.Size = new System.Drawing.Size(80, 20);
this.StylePenWidth.TabIndex = 8;
this.StylePenWidth.Text = "";
this.StylePenWidth.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
//
// StylePenColor
//
this.StylePenColor.BackColor = System.Drawing.SystemColors.Control;
this.StylePenColor.Location = new System.Drawing.Point(56, 8);
this.StylePenColor.Name = "StylePenColor";
this.StylePenColor.Size = new System.Drawing.Size(80, 16);
this.StylePenColor.TabIndex = 7;
this.StylePenColor.Click += new System.EventHandler(this.StylePenColor_Click);
//
// StyleCustomDash
//
this.StyleCustomDash.Location = new System.Drawing.Point(8, 96);
this.StyleCustomDash.Name = "StyleCustomDash";
this.StyleCustomDash.Size = new System.Drawing.Size(128, 20);
this.StyleCustomDash.TabIndex = 5;
this.StyleCustomDash.Text = "";
//
// StylePenStyle
//
this.StylePenStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.StylePenStyle.Items.AddRange(new object[] {
"_______",
"_ _ _ _ _",
"_ . _ . _ .",
"_ . . _ . .",
". . . . . . .",
"Custom",
"None"});
this.StylePenStyle.Location = new System.Drawing.Point(56, 64);
this.StylePenStyle.Name = "StylePenStyle";
this.StylePenStyle.Size = new System.Drawing.Size(80, 21);
this.StylePenStyle.TabIndex = 4;
//
// label5
//
this.label5.Location = new System.Drawing.Point(8, 64);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(48, 16);
this.label5.TabIndex = 3;
this.label5.Text = "Style";
//
// label2
//
this.label2.Location = new System.Drawing.Point(8, 32);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(40, 16);
this.label2.TabIndex = 1;
this.label2.Text = "Width";
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(40, 16);
this.label1.TabIndex = 0;
this.label1.Text = "Color";
//
// StyleTabBrush
//
this.StyleTabBrush.Controls.Add(this.StyleBrushColor);
this.StyleTabBrush.Controls.Add(this.StyleBrushOpacity);
this.StyleTabBrush.Controls.Add(this.label4);
this.StyleTabBrush.Controls.Add(this.label3);
this.StyleTabBrush.Location = new System.Drawing.Point(4, 25);
this.StyleTabBrush.Name = "StyleTabBrush";
this.StyleTabBrush.Size = new System.Drawing.Size(142, 135);
this.StyleTabBrush.TabIndex = 1;
this.StyleTabBrush.Text = "Brush";
this.StyleTabBrush.Visible = false;
//
// StyleBrushColor
//
this.StyleBrushColor.Location = new System.Drawing.Point(56, 16);
this.StyleBrushColor.Name = "StyleBrushColor";
this.StyleBrushColor.Size = new System.Drawing.Size(80, 24);
this.StyleBrushColor.TabIndex = 8;
this.StyleBrushColor.Click += new System.EventHandler(this.StyleBrushColor_Click);
//
// StyleBrushOpacity
//
this.StyleBrushOpacity.Location = new System.Drawing.Point(80, 56);
this.StyleBrushOpacity.Name = "StyleBrushOpacity";
this.StyleBrushOpacity.Size = new System.Drawing.Size(56, 20);
this.StyleBrushOpacity.TabIndex = 5;
this.StyleBrushOpacity.Validated += new System.EventHandler(this.StyleBrushOpacity_Validated);
this.StyleBrushOpacity.ValueChanged += new System.EventHandler(this.StyleBrushOpacity_ValueChanged);
//
// label4
//
this.label4.Location = new System.Drawing.Point(8, 56);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(64, 16);
this.label4.TabIndex = 2;
this.label4.Text = "Opacity %";
//
// label3
//
this.label3.Location = new System.Drawing.Point(8, 16);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(40, 16);
this.label3.TabIndex = 1;
this.label3.Text = "Color";
//
// StyleTabPoint
//
this.StyleTabPoint.Controls.Add(this.StylePointSize);
this.StyleTabPoint.Controls.Add(this.label6);
this.StyleTabPoint.Location = new System.Drawing.Point(4, 25);
this.StyleTabPoint.Name = "StyleTabPoint";
this.StyleTabPoint.Size = new System.Drawing.Size(142, 135);
this.StyleTabPoint.TabIndex = 2;
this.StyleTabPoint.Text = "Point";
//
// StylePointSize
//
this.StylePointSize.Location = new System.Drawing.Point(56, 16);
this.StylePointSize.Name = "StylePointSize";
this.StylePointSize.Size = new System.Drawing.Size(80, 20);
this.StylePointSize.TabIndex = 1;
this.StylePointSize.Text = "";
this.StylePointSize.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
//
// label6
//
this.label6.Location = new System.Drawing.Point(8, 16);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -