private void CheckTimes_ValueChanged(object sender, EventArgs e)
{
var hour = Convert.ToInt32(hourBox.Value, CultureInfo.InvariantCulture);
var min = Convert.ToInt32(minBox.Value, CultureInfo.InvariantCulture);
var sec = Convert.ToInt32(secBox.Value, CultureInfo.InvariantCulture);
double calculatedTotal = (hour * 3600) + (min * 60) + sec;
if (goToRadioButton.Checked)
{
statusLabel.Text = string.Format("Total Time: " + Functions.Time.ConvertSecondsToTime(currentStatus.TotalLength));
if (calculatedTotal > -1 && calculatedTotal < currentStatus.TotalLength)
{
GetNewTime = calculatedTotal;
ValidEntry(true);
}
else ValidEntry(false);
}
else if (addRadioButton.Checked)
{
double newTime = currentStatus.Duration + calculatedTotal;
statusLabel.Text = string.Format("Jumps To: " + Functions.Time.ConvertSecondsToTime(newTime));
if (calculatedTotal > -1 && newTime < currentStatus.TotalLength)
{
GetNewTime = newTime;
ValidEntry(true);
}
else ValidEntry(false);
}
else if (subtractRadioButton.Checked)
{
double newTime = currentStatus.Duration - calculatedTotal;
statusLabel.Text = string.Format("Jumps To: " + Functions.Time.ConvertSecondsToTime(newTime));
if (calculatedTotal > -1 && newTime > -1)
{
GetNewTime = newTime;
ValidEntry(true);
}
else ValidEntry(false);
}
}