void ReleaseDesignerOutlets() { if (LinearProgress != null) { LinearProgress.Dispose(); LinearProgress = null; } if (CircularProgress != null) { CircularProgress.Dispose(); CircularProgress = null; } }
public void StartLoading() { if (_loading != null) { StopLoading(); _loading.Dispose(); } _loading = new CircularProgress(); _loading.Size = new Size(64, 64); _loading.Location = new Point((this.Width / 2) - (_loading.Width / 2), (this.Height / 2) - (_loading.Height / 2)); _loading.Visible = true; _loading.ProgressColor = Color.White; _loading.BackColor = Color.Transparent; _loading.IsRunning = true; this.Controls.Add(_loading); _loading.BringToFront(); this.Enabled = false; }