/// <summary> /// Returns a BatchExportSettingsViewModel object that wraps /// the last used BatchExportSettings stored in the /// workbookContent's hidden storage area, or the one stored /// in the assembly's Properties, or Null if no stored object exists. /// </summary> /// <param name="workbookContext"></param> /// <returns>BatchExportSettingsViewModel object with last /// used settings model, or Null if no such object exists.</returns> public static BatchExportSettingsViewModel FromLastUsed(Workbook workbookContext) { BatchExportSettings settings = BatchExportSettings.FromLastUsed(workbookContext); if (settings != null) { Logger.Info("FromLastUsed(workbookContext): Got settings for workbook context, creating view model"); return(new BatchExportSettingsViewModel(settings)); } else { Logger.Info("FromLastUsed(workbookContext): Did not get settings for workbook context"); return(BatchExportSettingsViewModel.FromLastUsed()); } }
/// <summary> /// Returns a BatchExportSettingsViewModel object that wraps /// the last used BatchExportSettings stored in the assembly's /// Properties, or Null if no stored object exists. /// </summary> /// <returns>BatchExportSettingsViewModel object with last /// used settings model, or Null if no such object exists.</returns> public static BatchExportSettingsViewModel FromLastUsed() { BatchExportSettings settings = BatchExportSettings.FromLastUsed(); if (settings != null) { Logger.Info("FromLastUsed(): Got last used settings, creating view model"); return(new BatchExportSettingsViewModel(settings)); } else { Logger.Info("FromLastUsed(): Did not get last used settings, returning null"); return(null); } }