Update 11 files
- /OwnershipTaker/GUI/Form1.cs - /OwnershipTaker/GUI/Form1.Designer.cs - /OwnershipTaker/GUI/Form1.resx - /OwnershipTaker/GUI/OwnershipTake GUI.csproj - /OwnershipTaker/GUI/OwnershipTake GUI.csproj.user - /OwnershipTaker/GUI/OwnershipTake GUI.sln - /OwnershipTaker/GUI/Program.cs - /Simpsons_generator/Program.cs - /Simpsons_generator/Simpson.ico - /Simpsons_generator/Simpsons_generator.csproj - /Simpsons_generator/Simpsons_generator.sln
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
namespace Simpsons_generator;
|
||||
|
||||
class Program
|
||||
{
|
||||
public static void openit(string x) {
|
||||
System.Diagnostics.Process.Start("cmd", "/C start" + " " + x);
|
||||
}
|
||||
static void Main(string[] args)
|
||||
{
|
||||
int maximum_number_seasons = 35;
|
||||
string root_url = "https://www1.kisscartoon.online/episode/the-simpsons-season-";
|
||||
|
||||
//random for the season
|
||||
Random rnd = new Random();
|
||||
int random_season = rnd.Next(1, maximum_number_seasons);
|
||||
|
||||
Console.WriteLine("random season:"+random_season);
|
||||
|
||||
|
||||
//dictionary for the maximum number of episodes
|
||||
Dictionary<int, int> Season_nbr_Episodes = new Dictionary<int, int>();
|
||||
Season_nbr_Episodes.Add(1,13);
|
||||
Season_nbr_Episodes.Add(2,22);
|
||||
Season_nbr_Episodes.Add(3,24);
|
||||
Season_nbr_Episodes.Add(4,22);
|
||||
Season_nbr_Episodes.Add(5,22);
|
||||
Season_nbr_Episodes.Add(6,25);
|
||||
Season_nbr_Episodes.Add(7,25);
|
||||
Season_nbr_Episodes.Add(8,25);
|
||||
Season_nbr_Episodes.Add(9,25);
|
||||
Season_nbr_Episodes.Add(10,23);
|
||||
Season_nbr_Episodes.Add(11,22);
|
||||
Season_nbr_Episodes.Add(12,21);
|
||||
Season_nbr_Episodes.Add(13,22);
|
||||
Season_nbr_Episodes.Add(14,22);
|
||||
Season_nbr_Episodes.Add(15,22);
|
||||
Season_nbr_Episodes.Add(16,21);
|
||||
Season_nbr_Episodes.Add(17,22);
|
||||
Season_nbr_Episodes.Add(18,22);
|
||||
Season_nbr_Episodes.Add(19,20);
|
||||
Season_nbr_Episodes.Add(20,21);
|
||||
Season_nbr_Episodes.Add(21,23);
|
||||
Season_nbr_Episodes.Add(22,22);
|
||||
Season_nbr_Episodes.Add(23,22);
|
||||
Season_nbr_Episodes.Add(24,22);
|
||||
Season_nbr_Episodes.Add(25,22);
|
||||
Season_nbr_Episodes.Add(26,22);
|
||||
Season_nbr_Episodes.Add(27,22);
|
||||
Season_nbr_Episodes.Add(28,22);
|
||||
Season_nbr_Episodes.Add(29,21);
|
||||
Season_nbr_Episodes.Add(30,23);
|
||||
Season_nbr_Episodes.Add(31,22);
|
||||
Season_nbr_Episodes.Add(32,22);
|
||||
Season_nbr_Episodes.Add(33,22);
|
||||
Season_nbr_Episodes.Add(34,22);
|
||||
Season_nbr_Episodes.Add(35,18);
|
||||
|
||||
int random_episode = rnd.Next(1,Season_nbr_Episodes[random_season]);
|
||||
|
||||
Console.WriteLine("random episode:"+random_episode);
|
||||
|
||||
//url generated
|
||||
string url_generated = root_url + random_season + "-episode-"+random_episode;
|
||||
|
||||
Console.WriteLine(url_generated);
|
||||
openit(url_generated);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 208 KiB |
@@ -0,0 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<ApplicationIcon>Simpson.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Simpson.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.5.002.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Simpsons_generator", "Simpsons_generator.csproj", "{26E2A7D1-ECF1-4AB0-BF7F-124EDF8E56CA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{26E2A7D1-ECF1-4AB0-BF7F-124EDF8E56CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{26E2A7D1-ECF1-4AB0-BF7F-124EDF8E56CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{26E2A7D1-ECF1-4AB0-BF7F-124EDF8E56CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{26E2A7D1-ECF1-4AB0-BF7F-124EDF8E56CA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FF20E730-11A3-4F83-9E96-FB573A61DBAA}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Reference in New Issue
Block a user