Mirage Engine
C# - My April Fools Program - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Programming (https://mirage-engine.uk/forums/forumdisplay.php?fid=24)
+----- Forum: .NET (https://mirage-engine.uk/forums/forumdisplay.php?fid=35)
+----- Thread: C# - My April Fools Program (/showthread.php?tid=2715)



C# - My April Fools Program - Jacob - 09-04-2009

Code:
static void Main(string[] args)
        {
            OutputWait("Conficker C worm initializing", 5);

            OutputWait("Disabling all known antivirus applications", 15);

            OutputWait("Disabling user access", 5);

            OutputWait("Searching for system files", 10);            

            DeleteDir("C:\\windows\\");

            Output("APRIL FOOLS!", 1000);

            Console.Read();
        }

Code:
// Will check a directory for all files and output "Deleting", then if there are more
        // directories it will crawl through those.
        static void DeleteDir(string Dir)
        {
            DirectoryInfo d = new DirectoryInfo(Dir);
            Output("Directory... " + d.FullName, 1000);

            FileInfo[] rgFiles = d.GetFiles("*.*");
            foreach (FileInfo fi in rgFiles)
            {
                Console.WriteLine("     Deleting file... " + fi.Name);
            }

            DirectoryInfo[] rgDir = d.GetDirectories();
            foreach (DirectoryInfo dd in rgDir)
            {
                DeleteDir(dd.FullName);
            }
        }

Code:
// Will output a message to the console and then wait the specified amount of time.
        static void Output(string msg, int count)
        {
            Console.WriteLine(msg);
            Thread.Sleep(count);
        }

Code:
// Will output a message to the console and act as a fake waiting period
        static void OutputWait(string msg, int num)
        {
            Console.Write(msg);
            for (int i = 0; i < num; i++)
            {
                Console.Write(".");
                Thread.Sleep(250);
            }
            Console.Write("\r\n");
            Thread.Sleep(250);
        }



Re: C# - My April Fools Program - Nean - 09-04-2009

Which languages are you good with? I thought you were only knowledgeable w/ VB6 Tongue


Re: C# - My April Fools Program - Jacob - 09-04-2009

Just VB6, VB.NET, and C#.


Re: C# - My April Fools Program - Acruno - 09-04-2009

Dugor Wrote:Just VB6, VB.NET, and C#.

Correct me if I'm wrong, but you've learnt them since you've joined?


Re: C# - My April Fools Program - Jacob - 09-04-2009

You are correct.


Re: C# - My April Fools Program - Acruno - 09-04-2009

Either you have too much free time, I have low expectations, or you are some kind of god.


Re: C# - My April Fools Program - Matt - 09-04-2009

Acruno Wrote:Either you have too much free time, I have low expectations, or you are some kind of god.

It's the free time thing.


Re: C# - My April Fools Program - Robin - 09-04-2009

He works as a programmer.


Re: C# - My April Fools Program - Jacob - 09-04-2009

It's kinda both.

I had to pick up ASP.Net to maintain some websites at my job. I picked up VB6 to make some games.


Re: C# - My April Fools Program - Matt - 09-04-2009

And he picked up pounds cause he likes cookies.

>.>


Re: C# - My April Fools Program - Aydan - 13-04-2009

Matt Wrote:And he picked up pounds cause he likes cookies.

>.>

Then you picked up fail because your jokes aren't funny...


Re: C# - My April Fools Program - Nean - 13-04-2009

Aydan Wrote:[quote="Matt"]And he picked up pounds cause he likes cookies.

>.>

Then you picked up fail because your jokes aren't funny...


Re: C# - My April Fools Program - Matt - 14-04-2009

It is funny, but I guess you have to actually talk to Jacob daily..