예제 #1
0
        /// <summary>
        /// Creates a view content for a table.
        /// </summary>
        /// <param name="table">The table which should be viewed.</param>
        /// <param name="layout">The layout for the table.</param>
        /// <returns>The view content for the provided table.</returns>
        public Altaxo.Worksheet.GUI.IWorksheetController CreateNewWorksheet(Altaxo.Data.DataTable table, Altaxo.Worksheet.WorksheetLayout layout)
        {
            layout.DataTable = table;
            Altaxo.Gui.SharpDevelop.SDWorksheetViewContent ctrl = new Altaxo.Gui.SharpDevelop.SDWorksheetViewContent(layout);
            Altaxo.Worksheet.GUI.WorksheetView             view = new Altaxo.Worksheet.GUI.WorksheetView();
            ctrl.Controller.View = view;


            if (null != Current.Workbench)
            {
                Current.Workbench.ShowView(ctrl);
            }

            return(ctrl.Controller);
        }
예제 #2
0
    /// <summary>
    /// Creates a view content for a table.
    /// </summary>
    /// <param name="table">The table which should be viewed.</param>
    /// <param name="layout">The layout for the table.</param>
    /// <returns>The view content for the provided table.</returns>
    public Altaxo.Worksheet.GUI.IWorksheetController CreateNewWorksheet(Altaxo.Data.DataTable table, Altaxo.Worksheet.WorksheetLayout layout)
    {
      layout.DataTable = table;
      Altaxo.Gui.SharpDevelop.SDWorksheetViewContent ctrl = new Altaxo.Gui.SharpDevelop.SDWorksheetViewContent(layout);
      Altaxo.Worksheet.GUI.WorksheetView view = new Altaxo.Worksheet.GUI.WorksheetView();
      ctrl.Controller.View = view;


      if (null != Current.Workbench)
        Current.Workbench.ShowView(ctrl);

      return ctrl.Controller;
    }