Ejemplo n.º 1
0
        /// <summary>
        /// Ask the user (before a prediction is made) for the name of the calibration model table and the destination table.
        /// </summary>
        /// <param name="modelTableName">On return, contains the name of the table containing the calibration model.</param>
        /// <param name="destinationTableName">On return, contains the name of the destination table, or null if a new table should be used as destination.</param>
        /// <returns>True if OK, false if the users pressed Cancel.</returns>
        public static bool QuestCalibrationModelAndDestinationTable(out string modelTableName, out string destinationTableName)
        {
            Altaxo.Worksheet.GUI.PLSPredictValueController ctrl     = new Altaxo.Worksheet.GUI.PLSPredictValueController();
            Altaxo.Worksheet.GUI.PLSPredictValueControl    viewctrl = new PLSPredictValueControl();
            ctrl.View = viewctrl;

            DialogShellController dlgctrl = new DialogShellController(
                new DialogShellView(viewctrl), ctrl);

            if (dlgctrl.ShowDialog(Current.MainWindow))
            {
                modelTableName       = ctrl.SelectedCalibrationTableName;
                destinationTableName = ctrl.SelectedDestinationTableName;
                return(true);
            }
            else
            {
                modelTableName       = null;
                destinationTableName = null;
                return(false);
            }
        }
Ejemplo n.º 2
0
    /// <summary>
    /// Ask the user (before a prediction is made) for the name of the calibration model table and the destination table.
    /// </summary>
    /// <param name="modelTableName">On return, contains the name of the table containing the calibration model.</param>
    /// <param name="destinationTableName">On return, contains the name of the destination table, or null if a new table should be used as destination.</param>
    /// <returns>True if OK, false if the users pressed Cancel.</returns>
    public static bool QuestCalibrationModelAndDestinationTable(out string modelTableName, out string destinationTableName)
    {
      Altaxo.Worksheet.GUI.PLSPredictValueController ctrl = new Altaxo.Worksheet.GUI.PLSPredictValueController();
      Altaxo.Worksheet.GUI.PLSPredictValueControl viewctrl = new PLSPredictValueControl();
      ctrl.View = viewctrl;

      DialogShellController dlgctrl = new DialogShellController(
        new DialogShellView(viewctrl),ctrl);

      if(dlgctrl.ShowDialog(Current.MainWindow))
      {
        modelTableName = ctrl.SelectedCalibrationTableName;
        destinationTableName = ctrl.SelectedDestinationTableName;
        return true;
      }
      else
      {
        modelTableName = null;
        destinationTableName = null;
        return false;
      }
    }