コード例 #1
0
        public LayerSettingsGeom(GeomLayer layer)
        {
            InitializeComponent();
            origin = layer;
            LayerSettings.BindTitle(layer, layerName, this);
            LayerSettings.BindColor(layer, button1, "point", splitContainer1.Panel1);
            LayerSettings.BindColor(layer, button2, "arc", splitContainer2.Panel1);
            LayerSettings.BindColor(layer, button3, "polygon", splitContainer3.Panel1);
            LayerSettings.BindSize(layer, numericUpDown1, "point");
            LayerSettings.BindSize(layer, numericUpDown2, "arc");

            // 绑定清除多边形颜色功能
            button4.Click += (object o, EventArgs e) => {
                splitContainer3.Panel1.BackColor = origin.colors["polygon"] = Color.Empty;
                MainForm.port.Render();
            };

            // 禁用图层缺失部分
            if (layer.points == null)
            {
                splitContainer1.Enabled = false;
            }
            if (layer.arcs == null)
            {
                splitContainer2.Enabled = false;
            }
            if (layer.polygons == null)
            {
                splitContainer3.Enabled = false;
            }
        }
コード例 #2
0
 public LayerSettingsGrid(ValueLayer layer)
 {
     InitializeComponent();
     origin = layer;
     LayerSettings.BindTitle(layer, layerName, this);
     LayerSettings.BindColor(layer, button1, "low", splitContainer1.Panel1);
     LayerSettings.BindColor(layer, button2, "high", splitContainer2.Panel1);
     LayerSettings.BindColor(layer, button3, "grid", splitContainer3.Panel1);
     LayerSettings.BindSize(layer, numericUpDown1, "low");
     LayerSettings.BindSize(layer, numericUpDown2, "high");
     LayerSettings.BindSize(layer, numericUpDown3, "grid");
 }