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"> <Reference Include="System.Speech">
<HintPath>C:\ControlApp\System.Speech.dll</HintPath> <HintPath>C:\ControlApp\System.Speech.dll</HintPath>
</Reference> </Reference>
<Reference Include="Emgu.CV">
<HintPath>C:\ControlApp\Emgu.CV.dll</HintPath>
</Reference>
<Reference Include="Emgu.CV.Bitmap"> <Reference Include="Emgu.CV.Bitmap">
<HintPath>C:\ControlApp\Emgu.CV.Bitmap.dll</HintPath> <HintPath>C:\ControlApp\Emgu.CV.Bitmap.dll</HintPath>
</Reference> </Reference>

View file

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