Changeset 16317 for branches/2845_EnhancedProgress/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.cs
- Timestamp:
- 11/22/18 12:37:04 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2845_EnhancedProgress/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.cs
r16311 r16317 163 163 } 164 164 165 if (content.ProgressBarMode == ProgressBarMode.Continuous) { 166 progressBar.Style = ProgressBarStyle.Continuous; 167 progressBar.Value = (int)Math.Round(progressBar.Minimum + content.ProgressValue * (progressBar.Maximum - progressBar.Minimum)); 168 } else { 169 progressBar.Style = ProgressBarStyle.Marquee; 170 progressBar.Value = 0; 165 switch (content.ProgressMode) { 166 case ProgressMode.Determinate: 167 progressBar.Style = ProgressBarStyle.Continuous; 168 progressBar.Value = (int)Math.Round(progressBar.Minimum + content.ProgressValue * (progressBar.Maximum - progressBar.Minimum)); 169 break; 170 case ProgressMode.Indeterminate: 171 progressBar.Style = ProgressBarStyle.Marquee; 172 progressBar.Value = 0; 173 break; 174 default: 175 throw new NotImplementedException($"Invalid Progress Mode: {content.ProgressMode}"); 171 176 } 172 177 }
Note: See TracChangeset
for help on using the changeset viewer.