public void UpdateSubText(string text, string subText, int progress, string windowTextAppend)
{
if (!string.IsNullOrEmpty(text))
{
lblText.Text = text;
}
lblSubText.Text = TruncatePathForDisplay(subText, lblSubText.Width, lblSubText.Font, TextFormatFlags.PathEllipsis);
if (!string.IsNullOrEmpty(windowTextAppend))
{
this.Text = WINDOW_TEXT + " " + windowTextAppend;
}
if (0 <= progress && progress <= 100)
{
if (timer1.Enabled)
{
timer1.Stop();
timer1.Enabled = false;
}
progressBar1.Value = progress;
}
}