SR tracking system v1 #2
@ -115,6 +115,13 @@ namespace OWTrack
|
|||||||
{
|
{
|
||||||
Wins.Text = tr.GetWins().ToString();
|
Wins.Text = tr.GetWins().ToString();
|
||||||
Losses.Text = tr.GetLosses().ToString();
|
Losses.Text = tr.GetLosses().ToString();
|
||||||
|
if (tr.newSR == 0)
|
||||||
|
{
|
||||||
|
if (tr.srDiff() < 1) { srLabel.Text = tr.startSR.ToString() + " - 0"; }
|
||||||
|
else srLabel.Text = tr.startSR.ToString() + " - " + tr.srDiff();
|
||||||
|
}
|
||||||
|
else srLabel.Text = tr.startSR.ToString() + " - " + tr.srDiff();
|
||||||
|
srTextBox.Text = null;
|
||||||
File.WriteAllText(Directory.GetCurrentDirectory() + "/data.json", JsonConvert.SerializeObject(tr));
|
File.WriteAllText(Directory.GetCurrentDirectory() + "/data.json", JsonConvert.SerializeObject(tr));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,13 +157,7 @@ namespace OWTrack
|
|||||||
}
|
}
|
||||||
else tr.newSR = sr;
|
else tr.newSR = sr;
|
||||||
}
|
}
|
||||||
if (tr.newSR == 0)
|
update();
|
||||||
{
|
|
||||||
if (tr.srDiff() < 1) { srLabel.Text = tr.startSR.ToString() + " - 0"; }
|
|
||||||
else srLabel.Text = tr.startSR.ToString() + " - " + tr.srDiff();
|
|
||||||
}
|
|
||||||
else srLabel.Text = tr.startSR.ToString() + " - " + tr.srDiff();
|
|
||||||
srTextBox.Text = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ namespace OWTrack
|
|||||||
public int wins, losses, startSR, newSR = 0;
|
public int wins, losses, startSR, newSR = 0;
|
||||||
|
|
||||||
public void Track() { }
|
public void Track() { }
|
||||||
public void reset() { wins = 0; losses = 0; }
|
public void reset() { wins = 0; losses = 0; startSR = 0; newSR = 0; }
|
||||||
public void addWin() { wins++; }
|
public void addWin() { wins++; }
|
||||||
public void addLoss() { losses++; }
|
public void addLoss() { losses++; }
|
||||||
public void reduceWin() { wins--; }
|
public void reduceWin() { wins--; }
|
||||||
|
Loading…
Reference in New Issue
Block a user