try fixing progress box bugs
This commit is contained in:
parent
f6943cfa0f
commit
6a69022568
|
@ -16,6 +16,7 @@ namespace BizHawk.DiscSystem
|
|||
public class ProgressReport
|
||||
{
|
||||
public string Message;
|
||||
public bool InfoPresent;
|
||||
public double ProgressEstimate;
|
||||
public double ProgressCurrent;
|
||||
public int TaskCount;
|
||||
|
|
|
@ -535,6 +535,9 @@ namespace BizHawk.DiscSystem
|
|||
progress.TaskCount = 2;
|
||||
|
||||
progress.Message = "Generating Cue";
|
||||
progress.ProgressEstimate = 1;
|
||||
progress.ProgressCurrent = 0;
|
||||
progress.InfoPresent = true;
|
||||
string cuePath = Path.Combine(directory, baseName + ".cue");
|
||||
File.WriteAllText(cuePath, cue);
|
||||
|
||||
|
|
|
@ -9,10 +9,6 @@ using System.IO;
|
|||
//it can handle binpercue
|
||||
//it seems not to be able to handle binpertrack, or maybe i am doing something wrong (still havent ruled it out)
|
||||
|
||||
//isobuster -
|
||||
//does not like onebinpertrack images with index 00
|
||||
|
||||
|
||||
namespace BizHawk
|
||||
{
|
||||
class DiscoHawk
|
||||
|
|
|
@ -29,8 +29,14 @@ namespace BizHawk
|
|||
{
|
||||
double curr = pr.ProgressCurrent;
|
||||
double max = pr.ProgressEstimate;
|
||||
double value = curr / max * 100;
|
||||
progressBar1.Value = (int)value;
|
||||
if (pr.InfoPresent)
|
||||
{
|
||||
double value = curr/max*100;
|
||||
int nValue = (int) value;
|
||||
if (nValue < 0 || nValue > 100)
|
||||
nValue = 0;
|
||||
progressBar1.Value = nValue;
|
||||
}
|
||||
lblMessage.Text = pr.Message;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue