BioImager  4.9.0
A .NET microscopy imaging application based on Bio library. Supports various microscopes by using imported libraries & GUI automation. Supports XInput game controllers to move stage, take images, run ImageJ macros on images or Bio C# scripts.
Loading...
Searching...
No Matches
BioImager.Progress Class Reference
Inheritance diagram for BioImager.Progress:

Public Member Functions

 Progress (string file, string status)
 
void UpdateProgress (int p)
 
void UpdateProgressF (float p)
 

Protected Member Functions

override void Dispose (bool disposing)
 Clean up any resources being used.
 

Properties

string Status [get, set]
 
float ProgressValue [get, set]
 

Detailed Description

Definition at line 3 of file Progress.Designer.cs.

Constructor & Destructor Documentation

◆ Progress()

BioImager.Progress.Progress ( string file,
string status )

Definition at line 17 of file Progress.cs.

18 {
19 InitializeComponent();
20 watch.Start();
21 statusLabel.Text = status;
22 fileLabel.Text = file;
23 timer.Start();
24 }

Member Function Documentation

◆ Dispose()

override void BioImager.Progress.Dispose ( bool disposing)
protected

Clean up any resources being used.

Parameters
disposingtrue if managed resources should be disposed; otherwise, false.

Definition at line 14 of file Progress.Designer.cs.

15 {
16 if (disposing && (components != null))
17 {
18 components.Dispose();
19 }
20 base.Dispose(disposing);
21 }

◆ UpdateProgress()

void BioImager.Progress.UpdateProgress ( int p)

Definition at line 65 of file Progress.cs.

66 {
67 progressBar.Value = p;
68 }

◆ UpdateProgressF()

void BioImager.Progress.UpdateProgressF ( float p)

Definition at line 69 of file Progress.cs.

70 {
71 if (p * 100 > progressBar.Maximum)
72 return;
73 progressBar.Value = (int)(p * 100);
74 }

Property Documentation

◆ ProgressValue

float BioImager.Progress.ProgressValue
getset

Definition at line 43 of file Progress.cs.

44 {
45 get { return progressBar.Value; }
46 set
47 {
48 if (progressBar.InvokeRequired)
49 {
50 if (progressBar.Maximum < value)
51 {
52 progressBar.Invoke(() => progressBar.Value = (int)(value / 100));
53 }
54 else
55 progressBar.Invoke(() => progressBar.Value = (int)value);
56 return;
57 }
58 if (progressBar.Maximum < value)
59 progressBar.Value = (int)(value * 100);
60 else
61 progressBar.Value = (int)(value);
62 }
63 }

◆ Status

string BioImager.Progress.Status
getset

Definition at line 26 of file Progress.cs.

27 {
28 get { return statusLabel.Text; }
29 set
30 {
31 // Use Invoke to update the label on the UI thread
32 if (statusLabel.InvokeRequired)
33 {
34 statusLabel.Invoke(() => statusLabel.Text = value);
35 }
36 else
37 {
38 statusLabel.Text = value;
39 }
40 }
41 }

The documentation for this class was generated from the following files: