private void DynamicVisibility(object sender, DynamicVisibilityEventArgs e) { DynamicVisibilityModeDialog dvg = new DynamicVisibilityModeDialog(); dvg.ShowDialog(Owner); e.Item.DynamicVisibilityMode = dvg.DynamicVisibilityMode; }
/// <summary> /// Show the dialog to set label extents. /// </summary> /// <param name="layer">Layer whose dynamic visibility dialog is shown.</param> public void LabelExtents(IDynamicVisibility layer) { using var dvg = new DynamicVisibilityModeDialog(); if (ShowDialog(dvg) == DialogResult.OK) { layer.DynamicVisibilityMode = dvg.DynamicVisibilityMode; layer.UseDynamicVisibility = true; } }
/// <summary> /// Determines whether a layer has dynamic visibility and hence is only shown at certain scales. /// </summary> /// <param name="e"></param> public void DynamicVisibility(IDynamicVisibility e) { using (var dvg = new DynamicVisibilityModeDialog()) { if (ShowDialog(dvg) == DialogResult.OK) { e.DynamicVisibilityMode = dvg.DynamicVisibilityMode; } } }
private void LabelExtentsClicked(object sender, DynamicVisibilityEventArgs e) { DynamicVisibilityModeDialog dvg = new DynamicVisibilityModeDialog(); DialogResult dr = dvg.ShowDialog(Owner); if (dr == DialogResult.OK) { e.Item.DynamicVisibilityMode = dvg.DynamicVisibilityMode; e.Item.UseDynamicVisibility = true; } }
/// <summary> /// Show the dialog to set label extents. /// </summary> /// <param name="e"></param> public void LabelExtents(IDynamicVisibility e) { using (var dvg = new DynamicVisibilityModeDialog()) { if (ShowDialog(dvg) == DialogResult.OK) { e.DynamicVisibilityMode = dvg.DynamicVisibilityMode; e.UseDynamicVisibility = true; } } }
/// <summary> /// Determines whether a layer has dynamic visibility and hence is only shown at certain scales. /// </summary> /// <param name="e">The dynamic visibility object that gets manipulated.</param> /// <param name="mapFrame">The map frame.</param> public void DynamicVisibility(IDynamicVisibility e, IFrame mapFrame) { using var dvg = new DynamicVisibilityModeDialog(); switch (ShowDialog(dvg)) { case DialogResult.OK: e.DynamicVisibilityMode = dvg.DynamicVisibilityMode; e.UseDynamicVisibility = true; e.DynamicVisibilityWidth = mapFrame.ViewExtents.Width; break; case DialogResult.No: e.UseDynamicVisibility = false; break; } }
/// <summary> /// Determines whether a layer has dynamic visibility and hence is only shown at certain scales. /// </summary> /// <param name="e"></param> public void DynamicVisibility(IDynamicVisibility e, IFrame MapFrame) { using (var dvg = new DynamicVisibilityModeDialog()) { var result = ShowDialog(dvg); if (result == DialogResult.OK) { e.DynamicVisibilityMode = dvg.DynamicVisibilityMode; e.UseDynamicVisibility = true; e.DynamicVisibilityWidth = MapFrame.ViewExtents.Width; } if (result == DialogResult.No) { e.UseDynamicVisibility = false; } } }