diff --git a/src/Interface/ProgressBar.cs b/src/Interface/ProgressBar.cs index 474bed7..9a0490b 100644 --- a/src/Interface/ProgressBar.cs +++ b/src/Interface/ProgressBar.cs @@ -7,9 +7,11 @@ namespace RehauSku.Interface private Application Excel = AddIn.Excel; private double CurrentProgress { get; set; } private readonly double TaskWeight; + private readonly string Message; - public ProgressBar(int weight) + public ProgressBar(string message, int weight) { + Message = message; TaskWeight = weight; CurrentProgress = 0; } @@ -20,7 +22,7 @@ namespace RehauSku.Interface if (percent < 100) { - Excel.StatusBar = $"Выполнено {percent.ToString("#.##")} %"; + Excel.StatusBar = $"{Message} Выполнено {percent.ToString("#.##")} %"; } else 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) { diff --git a/src/PriceListTools/ConvertTool.cs b/src/PriceListTools/ConvertTool.cs index f84f445..3b634eb 100644 --- a/src/PriceListTools/ConvertTool.cs +++ b/src/PriceListTools/ConvertTool.cs @@ -27,7 +27,7 @@ namespace RehauSku.PriceListTools public void FillTarget() { - ProgressBar bar = new ProgressBar(Current.PositionAmount.Count); + ProgressBar bar = new ProgressBar("Заполняю строки...", Current.PositionAmount.Count); foreach (var kvp in Current.PositionAmount) { diff --git a/src/PriceListTools/ExportTool.cs b/src/PriceListTools/ExportTool.cs index f2454f5..024cb3c 100644 --- a/src/PriceListTools/ExportTool.cs +++ b/src/PriceListTools/ExportTool.cs @@ -24,7 +24,7 @@ namespace RehauSku.PriceListTools public void FillTarget() { GetSelected(); - ProgressBar bar = new ProgressBar(PositionAmount.Count); + ProgressBar bar = new ProgressBar("Заполняю строки...", PositionAmount.Count); foreach (var kvp in PositionAmount) { diff --git a/src/PriceListTools/MergeTool.cs b/src/PriceListTools/MergeTool.cs index 8a99294..8f3f6fc 100644 --- a/src/PriceListTools/MergeTool.cs +++ b/src/PriceListTools/MergeTool.cs @@ -10,7 +10,7 @@ namespace RehauSku.PriceListTools public void FillTarget() { - ProgressBar bar = new ProgressBar(SourceFiles.Sum(x => x.PositionAmount.Count)); + ProgressBar bar = new ProgressBar("Заполняю строки...", SourceFiles.Sum(x => x.PositionAmount.Count)); foreach (SourcePriceList source in SourceFiles) { diff --git a/src/PriceListTools/SourcePriceList.cs b/src/PriceListTools/SourcePriceList.cs index a5ee73a..ebd4d6a 100644 --- a/src/PriceListTools/SourcePriceList.cs +++ b/src/PriceListTools/SourcePriceList.cs @@ -40,7 +40,7 @@ namespace RehauSku.PriceListTools public static List GetSourceLists(string[] files) { var ExcelApp = (Application)ExcelDnaUtil.Application; - ProgressBar bar = new ProgressBar(files.Length); + ProgressBar bar = new ProgressBar("Открываю исходные файлы...", files.Length); List sourceFiles = new List();