Exemple #1
0
        /// <summary>
        /// Saves options and redraws map without closing the form
        /// </summary>
        private void OnApplyClick(object sender, EventArgs e)
        {
            RefreshCategories();

            _legend.Redraw(LegendRedraw.LegendAndMap);

            btnApply.Enabled = false;
            _initState       = _style.Serialize();
        }
Exemple #2
0
        /// <summary>
        /// Updates map and saves the changes without closing the window
        /// </summary>
        private void btnApply_Click(object sender, EventArgs e)
        {
            ApplyPattern();

            RefreshCategories();

            if (_legend != null)
            {
                _legend.Redraw(LegendRedraw.LegendAndMap);
            }

            _initState       = _style.Serialize();
            btnApply.Enabled = false;
        }
Exemple #3
0
        /// <summary>
        /// Creates a new instance of PolygonForm class
        /// </summary>
        public PolygonForm(IAppContext context, ILegendLayer layer, IGeometryStyle style, bool applyDisabled) : base(context)
        {
            if (layer == null)
            {
                throw new ArgumentNullException("layer");
            }
            if (style == null)
            {
                throw new ArgumentNullException("style");
            }

            InitializeComponent();

            _style    = style;
            _metadata = SymbologyPlugin.GetMetadata(layer.Handle);
            _legend   = context.Legend;
            _layer    = layer;

            _initState = style.Serialize();

            _noEvents = true;

            Initialize();

            btnApply.Visible          = !applyDisabled;
            tabControl1.SelectedIndex = _tabPage;
        }
Exemple #4
0
        /// <summary>
        /// Creates a new instance of PointsForm class
        /// </summary>
        public PointsForm(IAppContext context, ILegendLayer layer, IGeometryStyle options, bool applyDisabled) : base(context)
        {
            if (layer == null)
            {
                throw new ArgumentNullException("layer");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            InitializeComponent();

            _legend = context.Legend;
            _layer  = layer;
            _style  = options;

            // setting values to the controls
            _initState = _style.Serialize();
            _noEvents  = true;

            btnApply.Visible = !applyDisabled;

            pointIconControl1.Initialize(_style.Marker);

            dynamicVisibilityControl1.Initialize(_style, _context.Map.CurrentZoom, _context.Map.CurrentScale);
            dynamicVisibilityControl1.ValueChanged += (s, e) => {
                btnApply.Enabled = true;
                dynamicVisibilityControl1.ApplyChanges();
            };

            InitControls();

            Options2Gui();
            _noEvents = false;

            InitFonts();

            DrawPreview();

            AttachListeners();

            UpdateDefaultColor();

            tabControl1.SelectedIndex = _tabIndex;
        }
Exemple #5
0
        /// <summary>
        /// Creates a new instance of PointsForm class
        /// </summary>
        public PointsForm(IMuteLegend legend, ILegendLayer layer, IGeometryStyle options, bool applyDisabled)
        {
            if (layer == null)
            {
                throw new ArgumentNullException("layer");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }
            if (legend == null)
            {
                throw new ArgumentNullException("legend");
            }

            InitializeComponent();

            _legend = legend;
            _layer  = layer;
            _style  = options;

            // setting values to the controls
            _initState = _style.Serialize();
            _noEvents  = true;

            btnApply.Visible = !applyDisabled;

            pointIconControl1.Initialize(_style.Marker);

            InitControls();

            Options2Gui();
            _noEvents = false;

            InitFonts();

            DrawPreview();

            AttachListeners();

            UpdateDefaultColor();

            tabControl1.SelectedIndex = _tabIndex;
        }
Exemple #6
0
        /// <summary>
        /// Creates a new instance of PolygonsForm class
        /// </summary>
        public LinesForm(IAppContext _context, ILegendLayer layer, IGeometryStyle style, bool applyDisabled) : base(_context)
        {
            if (layer == null)
            {
                throw new ArgumentNullException("layer");
            }
            if (style == null)
            {
                throw new ArgumentNullException("style");
            }

            InitializeComponent();

            _style     = style;
            _legend    = _context.Legend;
            _layer     = layer;
            _initState = style.Serialize();

            btnApply.Visible = !applyDisabled;

            Initialize();
        }