void IScriptable.InvokeAction(string name, string value) { if (string.IsNullOrEmpty(name)) { return; } try { LayerActions action = (LayerActions)Enum.Parse(typeof(LayerActions), name, true); switch (action) { case LayerActions.Hide: break; case LayerActions.Show: break; default: break; } } catch { } }
public override void Run() { ILegendItem selectedItem = (GIS.FrameWork.Application.App.Legend as GIS.Common.Dialogs.Legend).SelectedLegendMenuItem; if (selectedItem != null) { LayerActions la = new LayerActions(); IFrame mapFrame = selectedItem.ParentMapFrame(); if (la != null && selectedItem != null) { la.DynamicVisibility(selectedItem as IDynamicVisibility, mapFrame); } } }
private void SetDynamicVisibility(object sender, EventArgs e) { LayerActions?.DynamicVisibility(this, MapFrame); }