AwbUpdater.Updater.UpdateUI C# (CSharp) Method

UpdateUI() private method

Multiple use function to update the GUI items
private UpdateUI ( string currentStatus, bool newLine ) : void
currentStatus string What the updater is currently doing
newLine bool If true, adds new line to log instead of reusing last existing one
return void
        private void UpdateUI(string currentStatus, bool newLine)
        {
            if (newLine)
            {
                lstLog.Items.Add(currentStatus);
            }
            else
            {
                lstLog.Items[lstLog.Items.Count - 1] = currentStatus;
            }
            lstLog.SelectedIndex = lstLog.Items.Count - 1;
            Application.DoEvents();
        }