// метод виконується по завершенню backgroundWorker_DoWork private void backgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { MinimumSize = new Size(256, 256); dateTime = weather.LastUpdate ?? DateTime.Now; labelCity.Text = weather.Сity; labelDate.Text = dateTime.ToShortDateString(); labelTime.Text = dateTime.ToShortTimeString(); pictureBoxIcon.Image = weather.Icon; labelTemperature.Text = weather.GetTemperature(); labelComment.Text = weather.Comment; labelRange.Text = weather.GetMinMaxTemperature(); SetForecastControls(labelFirstDay, pictureBoxFirst, labelFirstTemperature, 1); SetForecastControls(labelSecondDay, pictureBoxSecond, labelSecondTemperature, 2); SetForecastControls(labelThirdDay, pictureBoxThird, labelThirdTemperature, 3); mainPanel.Visible = true; mainPanel.BringToFront(); toolTip.SetToolTip(buttonUpdate, DateTime.Now.ToShortTimeString()); toolStripMenuItemSettings.Enabled = true; Refresh(); MinimumSize = Size; }