From bf97036724c6b383149bcf87b0f4c2bbb0e19812 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Thu, 6 Apr 2023 08:49:12 +0300 Subject: [PATCH] Rename Source validation extension --- RhSolutions.AddIn/Controllers/RibbonController.cs | 2 +- RhSolutions.AddIn/Services/RhExcelReader.cs | 2 +- RhSolutions.AddIn/Services/RhExcelWriter.cs | 2 +- RhSolutions.AddIn/Services/WorksheetExtensions.cs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RhSolutions.AddIn/Controllers/RibbonController.cs b/RhSolutions.AddIn/Controllers/RibbonController.cs index 880d49f..302c6f6 100644 --- a/RhSolutions.AddIn/Controllers/RibbonController.cs +++ b/RhSolutions.AddIn/Controllers/RibbonController.cs @@ -93,7 +93,7 @@ public class RibbonController : ExcelRibbon else { Worksheet worksheet = RhSolutionsAddIn.Excel.ActiveWorkbook.ActiveSheet; - return worksheet.IsRehauSource(); + return worksheet.IsValidSource(); } } diff --git a/RhSolutions.AddIn/Services/RhExcelReader.cs b/RhSolutions.AddIn/Services/RhExcelReader.cs index 0749482..2395940 100644 --- a/RhSolutions.AddIn/Services/RhExcelReader.cs +++ b/RhSolutions.AddIn/Services/RhExcelReader.cs @@ -83,7 +83,7 @@ public class RhExcelReader : IExcelReader, IDisposable List<(string, Dictionary)> result = new(); foreach (Worksheet worksheet in worksheets) { - if (!worksheet.IsRehauSource()) + if (!worksheet.IsValidSource()) { continue; } diff --git a/RhSolutions.AddIn/Services/RhExcelWriter.cs b/RhSolutions.AddIn/Services/RhExcelWriter.cs index 6fd43fc..1af78a3 100644 --- a/RhSolutions.AddIn/Services/RhExcelWriter.cs +++ b/RhSolutions.AddIn/Services/RhExcelWriter.cs @@ -42,7 +42,7 @@ public class RhExcelWriter : IExcelWriter, IDisposable { _worksheet = OpenNewPrice(); - if (!_worksheet.IsRehauSource()) + if (!_worksheet.IsValidSource()) { _application.ActiveWorkbook.Close(); throw new ArgumentException( diff --git a/RhSolutions.AddIn/Services/WorksheetExtensions.cs b/RhSolutions.AddIn/Services/WorksheetExtensions.cs index 409cd5f..335c54d 100644 --- a/RhSolutions.AddIn/Services/WorksheetExtensions.cs +++ b/RhSolutions.AddIn/Services/WorksheetExtensions.cs @@ -9,14 +9,14 @@ namespace RhSolutions.Services; #endif public static class WorksheetExtensions { - public static bool IsRehauSource(this Worksheet worksheet) + public static bool IsValidSource(this Worksheet worksheet) { Range amountCell; Range skuCell; Range programLineCell; Range nameCell; - var pricelistParameters = RhSolutionsAddIn.Configuration.GetPriceListHeaders(); + var pricelistParameters = RhSolutionsAddIn.Configuration.GetPriceListHeaders(); Range[] cells = new[] {