Exemple #1
0
        static void Prank()
        {
            switch (Pranks.GetRandomNumber(10))
            {
            case 0:
                Console.WriteLine($"Executing: {nameof(Pranks.LockWorkStation)}");
                Pranks.LockWorkStation();
                Console.WriteLine($"Executing: {nameof(Pranks.PressCapsLock)}");
                Pranks.PressCapsLock();
                break;

            case 1:
                Console.WriteLine($"Executing: {nameof(Pranks.RandomErrorMessage)}");
                Pranks.RandomErrorMessage();
                break;

            case 2:
                Console.WriteLine($"Executing: {nameof(Pranks.SlowlyRaiseVolumeToMax)}");
                Pranks.SlowlyRaiseVolumeToMax();
                break;

            case 3:
                Console.WriteLine($"Executing: {nameof(Pranks.PressCapsLock)}");
                Pranks.PressCapsLock();
                break;

            case 4:
                Console.WriteLine($"Executing: {nameof(Pranks.PlayRandomWavFile)}");
                Pranks.PlayRandomWavFile();
                break;

            case 5:
                Console.WriteLine($"Executing: {nameof(Pranks.OpenRandomWebPage)}");
                Pranks.OpenRandomWebPage();
                break;

            case 6:
                Console.WriteLine($"Executing: {nameof(Pranks.PlayRandomWindowsSound)}");
                Pranks.PlayRandomWindowsSound();
                break;

            case 7:
                Console.WriteLine($"Executing: {nameof(Pranks.KillSpotify)}");
                Pranks.KillSpotify();
                break;

            case 8:
                Console.WriteLine($"Executing: {nameof(Pranks.RandomGoogle)}");
                Pranks.RandomGoogle();
                break;

            case 9:
                Console.WriteLine($"Executing: {nameof(Pranks.ShakeMouseCursor)}");
                Pranks.ShakeMouseCursor();
                break;
            }
        }
Exemple #2
0
        public static int GetSleepyTime()
        {
            int sleep = Pranks.GetRandomNumber(min: MIN_SLEEP_TIME_MINUTES, max: MAX_SLEEP_TIME_MINUTES);

            return(sleep * 60 * 1000);
        }