示例#1
0
        /// <summary>
        /// Determines the currently active worksheet and issues the command to that worksheet by calling
        /// Run with the worksheet as a parameter.
        /// </summary>
        public override void Run()
        {
            Altaxo.Gui.SharpDevelop.SDGraphViewContent ctrl
                = Current.Workbench.ActiveViewContent
                  as Altaxo.Gui.SharpDevelop.SDGraphViewContent;

            if (null != ctrl)
            {
                Run(ctrl.Controller);
            }
        }
示例#2
0
        /// <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);
        }
示例#3
0
    /// <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;
    }