Esempio n. 1
0
        private void btnEditColorClass_Click(object sender, EventArgs e)
        {
            GridColorClass cc = symbolsListView1.UserObject as GridColorClass;

            if (cc == null)
            {
                return;
            }

            FormGridColorClass dlg = new FormGridColorClass();

            dlg.ColorClass = cc;
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                cc.MinValue = dlg.MinValue;
                cc.MaxValue = dlg.MaxValue;
                cc.Legend   = dlg.Label;

                symbolsListView1.ValueText =
                    cc.MinValue.ToString() + " - " + cc.MaxValue.ToString();
                symbolsListView1.LegendText =
                    cc.Legend;

                panelGrid.Refresh();
            }
        }
Esempio n. 2
0
        private void btnAddColorClass_Click(object sender, EventArgs e)
        {
            FormGridColorClass dlg = new FormGridColorClass();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                GridColorClass cc = new GridColorClass(
                    dlg.MinValue, dlg.MaxValue, GraphicsEngine.ArgbColor.White);
                cc.Legend = dlg.Label;

                _classes.Add(cc);

                SimpleFillSymbol symbol = new SimpleFillSymbol();
                symbol.OutlineColor = GraphicsEngine.ArgbColor.Transparent;
                symbol.Color        = cc.Color;

                symbolsListView1.addSymbol(
                    symbol,
                    new string[] { dlg.MinValue.ToString() + " - " + dlg.MaxValue.ToString(), dlg.Label },
                    cc
                    );

                panelGrid.Refresh();
            }
        }