From 06799119fb83cb6b75721c5cf60f4051e50976a7 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Wed, 2 Feb 2022 09:46:47 +0300 Subject: Add Interface namespace --- src/PriceListTools/CombineTool.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/PriceListTools/CombineTool.cs') diff --git a/src/PriceListTools/CombineTool.cs b/src/PriceListTools/CombineTool.cs index da29e4d..e637fef 100644 --- a/src/PriceListTools/CombineTool.cs +++ b/src/PriceListTools/CombineTool.cs @@ -25,7 +25,7 @@ namespace RehauSku.PriceListTools FilterByAmount(); - Forms.Dialog.SaveWorkbookAs(); + Interface.Dialog.SaveWorkbookAs(); } } } -- cgit v1.2.3 From 120eee0231d02e90d9d195ebc38327a58d4564a8 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Wed, 2 Feb 2022 10:23:50 +0300 Subject: Add Excel statusbar progress message --- src/PriceListTools/CombineTool.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/PriceListTools/CombineTool.cs') diff --git a/src/PriceListTools/CombineTool.cs b/src/PriceListTools/CombineTool.cs index e637fef..cb47379 100644 --- a/src/PriceListTools/CombineTool.cs +++ b/src/PriceListTools/CombineTool.cs @@ -1,5 +1,7 @@ using Microsoft.Office.Interop.Excel; using System.Collections.Generic; +using RehauSku.Interface; +using System.Linq; namespace RehauSku.PriceListTools { @@ -9,6 +11,8 @@ namespace RehauSku.PriceListTools public void FillTarget() { + ProgressBar bar = new ProgressBar(SourceFiles.Sum(file => file.PositionAmount.Count)); + foreach (Source source in SourceFiles) { TargetFile.Sheet.Columns[TargetFile.amountCell.Column] @@ -19,8 +23,11 @@ namespace RehauSku.PriceListTools newColumnHeader.Value2 = $"{source.Name}"; newColumnHeader.WrapText = true; - foreach(var kvp in source.PositionAmount) + foreach (var kvp in source.PositionAmount) + { FillColumnsWithDictionary(kvp, TargetFile.amountCell.Column - 1, TargetFile.amountCell.Column); + bar.DoProgress(); + } } FilterByAmount(); -- cgit v1.2.3 From cb5fee18918b5a29ccff23a0fb74bb13151f2e42 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Wed, 2 Feb 2022 18:02:17 +0300 Subject: Rename Abstract tool --- src/PriceListTools/CombineTool.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/PriceListTools/CombineTool.cs') diff --git a/src/PriceListTools/CombineTool.cs b/src/PriceListTools/CombineTool.cs index cb47379..3222dae 100644 --- a/src/PriceListTools/CombineTool.cs +++ b/src/PriceListTools/CombineTool.cs @@ -5,7 +5,7 @@ using System.Linq; namespace RehauSku.PriceListTools { - internal class CombineTool : PriceListTool + internal class CombineTool : AbstractTool { public List SourceFiles; -- cgit v1.2.3 From 1dfbfaa461479a14cd75c6fc5f6a5082e61c6371 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Wed, 2 Feb 2022 18:05:49 +0300 Subject: Rename Abstract PriceList inheritors --- src/PriceListTools/CombineTool.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/PriceListTools/CombineTool.cs') diff --git a/src/PriceListTools/CombineTool.cs b/src/PriceListTools/CombineTool.cs index 3222dae..80c7a67 100644 --- a/src/PriceListTools/CombineTool.cs +++ b/src/PriceListTools/CombineTool.cs @@ -7,13 +7,13 @@ namespace RehauSku.PriceListTools { internal class CombineTool : AbstractTool { - public List SourceFiles; + public List SourceFiles; public void FillTarget() { ProgressBar bar = new ProgressBar(SourceFiles.Sum(file => file.PositionAmount.Count)); - foreach (Source source in SourceFiles) + foreach (SourcePriceList source in SourceFiles) { TargetFile.Sheet.Columns[TargetFile.amountCell.Column] .EntireColumn -- cgit v1.2.3 From 99d1fb6740e93d7d81f0171885ac8f788b56dcfc Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Thu, 3 Feb 2022 21:44:24 +0300 Subject: Rename method --- src/PriceListTools/CombineTool.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/PriceListTools/CombineTool.cs') diff --git a/src/PriceListTools/CombineTool.cs b/src/PriceListTools/CombineTool.cs index 80c7a67..28bcd7c 100644 --- a/src/PriceListTools/CombineTool.cs +++ b/src/PriceListTools/CombineTool.cs @@ -25,7 +25,7 @@ namespace RehauSku.PriceListTools foreach (var kvp in source.PositionAmount) { - FillColumnsWithDictionary(kvp, TargetFile.amountCell.Column - 1, TargetFile.amountCell.Column); + FillPositionAmountToColumns(kvp, TargetFile.amountCell.Column - 1, TargetFile.amountCell.Column); bar.DoProgress(); } } -- cgit v1.2.3 From ef04747df50da1fbb5124fc9c02f1869d93864f5 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Thu, 3 Feb 2022 21:56:14 +0300 Subject: Additional message to statusbar --- src/PriceListTools/CombineTool.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/PriceListTools/CombineTool.cs') diff --git a/src/PriceListTools/CombineTool.cs b/src/PriceListTools/CombineTool.cs index 28bcd7c..6b3dcb2 100644 --- a/src/PriceListTools/CombineTool.cs +++ b/src/PriceListTools/CombineTool.cs @@ -11,7 +11,7 @@ namespace RehauSku.PriceListTools public void FillTarget() { - ProgressBar bar = new ProgressBar(SourceFiles.Sum(file => file.PositionAmount.Count)); + ProgressBar bar = new ProgressBar("Заполняю строки...", SourceFiles.Sum(file => file.PositionAmount.Count)); foreach (SourcePriceList source in SourceFiles) { -- cgit v1.2.3 From 6e889419e2658a3a80fa00582314f1428f6052e5 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Fri, 4 Feb 2022 09:17:12 +0300 Subject: Add Result Statusbar message --- src/PriceListTools/CombineTool.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/PriceListTools/CombineTool.cs') diff --git a/src/PriceListTools/CombineTool.cs b/src/PriceListTools/CombineTool.cs index 6b3dcb2..af9378c 100644 --- a/src/PriceListTools/CombineTool.cs +++ b/src/PriceListTools/CombineTool.cs @@ -11,7 +11,8 @@ namespace RehauSku.PriceListTools public void FillTarget() { - ProgressBar bar = new ProgressBar("Заполняю строки...", SourceFiles.Sum(file => file.PositionAmount.Count)); + ProgressBar = new ProgressBar("Заполняю строки...", SourceFiles.Sum(file => file.PositionAmount.Count)); + ResultBar = new ResultBar(); foreach (SourcePriceList source in SourceFiles) { @@ -26,13 +27,15 @@ namespace RehauSku.PriceListTools foreach (var kvp in source.PositionAmount) { FillPositionAmountToColumns(kvp, TargetFile.amountCell.Column - 1, TargetFile.amountCell.Column); - bar.DoProgress(); + ProgressBar.Update(); } } FilterByAmount(); + ResultBar.Update(); Interface.Dialog.SaveWorkbookAs(); + ExcelApp.StatusBar = false; } } } -- cgit v1.2.3