internal void StopModule()
{
try
{
if ((string)cmbStopAfter.SelectedItem == "When seeders <")
{
if (Seeders > -1 && Seeders < int.Parse(txtStopValue.Text)) StopButton_Click(null, null);
}
if ((string)cmbStopAfter.SelectedItem == "When leechers <")
{
if (Leechers > -1 && Leechers < int.Parse(txtStopValue.Text)) StopButton_Click(null, null);
}
if ((string)cmbStopAfter.SelectedItem == "When uploaded >")
{
if (currentTorrent.uploaded > long.Parse(txtStopValue.Text) * 1024 * 1024) StopButton_Click(null, null);
}
if ((string)cmbStopAfter.SelectedItem == "When downloaded >")
{
if (currentTorrent.downloaded > int.Parse(txtStopValue.Text) * 1024 * 1024) StopButton_Click(null, null);
}
if ((string)cmbStopAfter.SelectedItem == "When leechers/seeders <")
{
if ((Leechers / (double)Seeders) < double.Parse(txtStopValue.Text)) StopButton_Click(null, null);
}
}
catch (Exception ex)
{
AddLogLine("Error in stopping module!!!: " + ex.Message);
return;
}
}