Include Popup Patch

This commit is contained in:
Merith 2025-03-19 16:28:15 -07:00
parent 6b99b60603
commit 27203df657
2 changed files with 16 additions and 11 deletions

View file

@ -35,9 +35,6 @@
<Reference Include="System.Speech">
<HintPath>C:\ControlApp\System.Speech.dll</HintPath>
</Reference>
<Reference Include="Emgu.CV">
<HintPath>C:\ControlApp\Emgu.CV.dll</HintPath>
</Reference>
<Reference Include="Emgu.CV.Bitmap">
<HintPath>C:\ControlApp\Emgu.CV.Bitmap.dll</HintPath>
</Reference>

View file

@ -81,18 +81,26 @@ public class PopUp : Form
});
Close();
}
else
{
run_url = url;
}
tmr = new Timer();
tmr.Tick += popup_tick;
Random rand = new Random();
if (ConfigurationManager.AppSettings["PopSet"] != null && "Long" == ConfigurationManager.AppSettings["PopSet"].ToString())
if (ConfigurationManager.AppSettings["PopSet"] != null)
{
int mins = rand.Next(11);
tmr.Interval = (int)TimeSpan.FromMinutes(mins).TotalMilliseconds;
}
else
{
int mins2 = rand.Next(55) + 5;
tmr.Interval = (int)TimeSpan.FromSeconds(mins2).TotalMilliseconds;
string lengthtime = ConfigurationManager.AppSettings["PopSet"].ToString();
if ("Long" == lengthtime)
{
int mins = rand.Next(11);
tmr.Interval = (int)TimeSpan.FromMinutes(mins).TotalMilliseconds;
}
else
{
int mins2 = rand.Next(55) + 5;
tmr.Interval = (int)TimeSpan.FromSeconds(mins2).TotalMilliseconds;
}
}
}