/// <summary> /// Creates a new view content for a graph document. /// </summary> /// <param name="graph">The graph document.</param> /// <returns>The view content for the provided graph document.</returns> public Altaxo.Graph.GUI.IGraphController CreateNewGraph(Altaxo.Graph.Gdi.GraphDocument graph) { if (graph == null) { graph = this.CurrentOpenProject.CreateNewGraphDocument(); } Altaxo.Gui.SharpDevelop.SDGraphViewContent ctrl = new Altaxo.Gui.SharpDevelop.SDGraphViewContent(graph); Altaxo.Graph.GUI.GraphView view = new Altaxo.Graph.GUI.GraphView(); ctrl.Controller.View = view; if (null != Current.Workbench) { Current.Workbench.ShowView(ctrl); } return(ctrl.Controller); }
/// <summary> /// Creates a new view content for a graph document. /// </summary> /// <param name="graph">The graph document.</param> /// <returns>The view content for the provided graph document.</returns> public Altaxo.Graph.GUI.IGraphController CreateNewGraph(Altaxo.Graph.Gdi.GraphDocument graph) { if (graph == null) graph = this.CurrentOpenProject.CreateNewGraphDocument(); Altaxo.Gui.SharpDevelop.SDGraphViewContent ctrl = new Altaxo.Gui.SharpDevelop.SDGraphViewContent(graph); Altaxo.Graph.GUI.GraphView view = new Altaxo.Graph.GUI.GraphView(); ctrl.Controller.View = view; if (null != Current.Workbench) Current.Workbench.ShowView(ctrl); return ctrl.Controller; }