Additional message to statusbar
This commit is contained in:
parent
99d1fb6740
commit
ef04747df5
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ namespace RehauSku.PriceListTools
|
||||
public static List<SourcePriceList> GetSourceLists(string[] files)
|
||||
{
|
||||
var ExcelApp = (Application)ExcelDnaUtil.Application;
|
||||
ProgressBar bar = new ProgressBar(files.Length);
|
||||
ProgressBar bar = new ProgressBar("Открываю исходные файлы...", files.Length);
|
||||
|
||||
List<SourcePriceList> sourceFiles = new List<SourcePriceList>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user