public static void ShowLayerDialog(this GraphDocument doc, IList <int> layerNumber) { if (doc.RootLayer.IsValidIndex(layerNumber, out var layer)) { if (layer is XYZPlotLayer) { XYPlotLayerController.ShowDialog((XYZPlotLayer)layer); } else { HostLayerController.ShowDialog(layer); } } }
public override void Run(GraphController ctrl) { ctrl.EnsureValidityOfCurrentLayerNumber(); var t1 = ctrl.ActiveLayer as XYPlotLayer; if (null != t1) { XYPlotLayerController.ShowDialog(t1); return; } var t2 = ctrl.ActiveLayer; if (null != t2) { HostLayerController.ShowDialog(t2); return; } }