18 private Builder _builder;
21 public double ProgressValue
25 return progressBar.Fraction;
30 Application.Invoke(delegate
33 progressBar.Fraction = value;
35 progressBar.Fraction = value / 100;
39 public double ProgressPercentValue
43 return progressBar.Fraction * 100;
47 Application.Invoke(delegate
49 double percent = Math.Max(0, Math.Min(100, value));
50 progressBar.Fraction = percent / 100;
57 get {
return progLabel.Text; }
61 Application.Invoke(delegate
63 progLabel.Text = value;
70 get {
return statusLabel.Text; }
74 Application.Invoke(delegate
76 statusLabel.Text = value;
80#pragma warning disable 649
83 private ProgressBar progressBar;
85 private Label progLabel;
87 private Label statusLabel;
88#pragma warning restore 649
92 #region Constructors / Destructors
95 public static Progress Create(
string title,
string status,
string state)
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);
103 protected Progress(Builder builder, IntPtr handle,
string title,
string status,
string state) : base(handle)
106 builder.Autoconnect(
this);
108 this.statusLabel.Text = status;
109 this.progLabel.Text = state;
110 App.ApplyStyles(
this);