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 Application Excel = AddIn.Excel;
|
||||||
private double CurrentProgress { get; set; }
|
private double CurrentProgress { get; set; }
|
||||||
private readonly double TaskWeight;
|
private readonly double TaskWeight;
|
||||||
|
private readonly string Message;
|
||||||
|
|
||||||
public ProgressBar(int weight)
|
public ProgressBar(string message, int weight)
|
||||||
{
|
{
|
||||||
|
Message = message;
|
||||||
TaskWeight = weight;
|
TaskWeight = weight;
|
||||||
CurrentProgress = 0;
|
CurrentProgress = 0;
|
||||||
}
|
}
|
||||||
@ -20,7 +22,7 @@ namespace RehauSku.Interface
|
|||||||
|
|
||||||
if (percent < 100)
|
if (percent < 100)
|
||||||
{
|
{
|
||||||
Excel.StatusBar = $"Выполнено {percent.ToString("#.##")} %";
|
Excel.StatusBar = $"{Message} Выполнено {percent.ToString("#.##")} %";
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -11,7 +11,7 @@ namespace RehauSku.PriceListTools
|
|||||||
|
|
||||||
public void FillTarget()
|
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)
|
foreach (SourcePriceList source in SourceFiles)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@ namespace RehauSku.PriceListTools
|
|||||||
|
|
||||||
public void FillTarget()
|
public void FillTarget()
|
||||||
{
|
{
|
||||||
ProgressBar bar = new ProgressBar(Current.PositionAmount.Count);
|
ProgressBar bar = new ProgressBar("Заполняю строки...", Current.PositionAmount.Count);
|
||||||
|
|
||||||
foreach (var kvp in Current.PositionAmount)
|
foreach (var kvp in Current.PositionAmount)
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,7 @@ namespace RehauSku.PriceListTools
|
|||||||
public void FillTarget()
|
public void FillTarget()
|
||||||
{
|
{
|
||||||
GetSelected();
|
GetSelected();
|
||||||
ProgressBar bar = new ProgressBar(PositionAmount.Count);
|
ProgressBar bar = new ProgressBar("Заполняю строки...", PositionAmount.Count);
|
||||||
|
|
||||||
foreach (var kvp in PositionAmount)
|
foreach (var kvp in PositionAmount)
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ namespace RehauSku.PriceListTools
|
|||||||
|
|
||||||
public void FillTarget()
|
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)
|
foreach (SourcePriceList source in SourceFiles)
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@ namespace RehauSku.PriceListTools
|
|||||||
public static List<SourcePriceList> GetSourceLists(string[] files)
|
public static List<SourcePriceList> GetSourceLists(string[] files)
|
||||||
{
|
{
|
||||||
var ExcelApp = (Application)ExcelDnaUtil.Application;
|
var ExcelApp = (Application)ExcelDnaUtil.Application;
|
||||||
ProgressBar bar = new ProgressBar(files.Length);
|
ProgressBar bar = new ProgressBar("Открываю исходные файлы...", files.Length);
|
||||||
|
|
||||||
List<SourcePriceList> sourceFiles = new List<SourcePriceList>();
|
List<SourcePriceList> sourceFiles = new List<SourcePriceList>();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user