BioGTK  6.5.0
A .NET library & program for annotating, editing various microscopy imaging formats using Bioformats supported images. Including whole slide, pyramidal, and series.
Loading...
Searching...
No Matches
BioGTK.Progress Class Reference
Inheritance diagram for BioGTK.Progress:

Static Public Member Functions

static Progress Create (string title, string status, string state)
 

Protected Member Functions

 Progress (Builder builder, IntPtr handle, string title, string status, string state)
 

Properties

double ProgressValue [get, set]
 
double ProgressPercentValue [get, set]
 
string Text [get, set]
 
string Status [get, set]
 

Detailed Description

Definition at line 15 of file Progress.cs.

Constructor & Destructor Documentation

◆ Progress()

BioGTK.Progress.Progress ( Builder builder,
IntPtr handle,
string title,
string status,
string state )
protected

Definition at line 103 of file Progress.cs.

103 : base(handle)
104 {
105 _builder = builder;
106 builder.Autoconnect(this);
107 this.Title = title;
108 this.statusLabel.Text = status;
109 this.progLabel.Text = state;
110 App.ApplyStyles(this);
111 }

Member Function Documentation

◆ Create()

static Progress BioGTK.Progress.Create ( string title,
string status,
string state )
static

Definition at line 95 of file Progress.cs.

96 {
97 Builder builder = new Builder(new FileStream(System.IO.Path.GetDirectoryName(Environment.ProcessPath) + "/" + "Glade/Progress.glade", FileMode.Open));
98 return new Progress(builder, builder.GetObject("progress").Handle, title, status, state);
99 }

Property Documentation

◆ ProgressPercentValue

double BioGTK.Progress.ProgressPercentValue
getset

Definition at line 39 of file Progress.cs.

40 {
41 get
42 {
43 return progressBar.Fraction * 100;
44 }
45 set
46 {
47 Application.Invoke(delegate
48 {
49 double percent = Math.Max(0, Math.Min(100, value));
50 progressBar.Fraction = percent / 100;
51 });
52 }
53 }

◆ ProgressValue

double BioGTK.Progress.ProgressValue
getset

Definition at line 21 of file Progress.cs.

22 {
23 get
24 {
25 return progressBar.Fraction;
26 }
27 set
28 {
29 // update progress bar on main UI thread
30 Application.Invoke(delegate
31 {
32 if(value <= 1)
33 progressBar.Fraction = value;
34 else
35 progressBar.Fraction = value / 100;
36 });
37 }
38 }

◆ Status

string BioGTK.Progress.Status
getset

Definition at line 68 of file Progress.cs.

69 {
70 get { return statusLabel.Text; }
71 set
72 {
73 // update progress bar on main UI thread
74 Application.Invoke(delegate
75 {
76 statusLabel.Text = value;
77 });
78 }
79 }

◆ Text

string BioGTK.Progress.Text
getset

Definition at line 55 of file Progress.cs.

56 {
57 get { return progLabel.Text; }
58 set
59 {
60 // update progress bar on main UI thread
61 Application.Invoke(delegate
62 {
63 progLabel.Text = value;
64 });
65 }
66 }

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