private void btnEditLayerStyle_Click(object sender, EventArgs e) { using (var diag = new RedlineStyleDialog(_style)) { if (diag.ShowDialog() == DialogResult.OK) { _style = diag.GetUpdatedStyle(); } } }
private void btnEditStyle_Click(object sender, EventArgs e) { if (lstLayersOnMap.SelectedItems.Count == 1) { var item = lstLayersOnMap.SelectedItems[0]; var layer = item.Tag as RedlineLayer; if (layer != null) { var style = _manager.GetLayerStyle(layer); using (var diag = new RedlineStyleDialog(style)) { if (diag.ShowDialog() == DialogResult.OK) { _manager.UpdateLayerStyle(layer, diag.GetUpdatedStyle()); _component.Viewer.RefreshMap(); } } } } }