Ejemplo n.º 1
0
        private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WinClassic app = wm.StartInfobox95("AShifter's Infobox", "This is the very first Histacom2 Infobox. It's really easy to call, too! \nJust use wm.startInfobox95(string title, string text, InfoboxType type, InfoboxButtons btns)!", InfoboxType.Info, InfoboxButtons.OK);

            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 2
0
        private void desktopicons_Click(object sender, EventArgs e)
        {
            Point        objDrawingPoint = desktopicons.PointToClient(Cursor.Position);
            ListViewItem objListViewItem;

            if (objDrawingPoint != null)
            {
                objListViewItem = desktopicons.GetItemAt(objDrawingPoint.X, objDrawingPoint.Y);
                if (objListViewItem != null)
                {
                    if (objListViewItem.Text == "Internet Explorer")
                    {
                        if (ie != null)
                        {
                            wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return;
                        }
                        ie = wm.StartWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true);
                        AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4);
                        ie.BringToFront();
                        ie.FormClosing += new FormClosingEventHandler(InternetExplorer4_Closing);
                        startmenu.Hide();
                    }
                    else if (objListViewItem.Text == "Web Chat Setup")
                    {
                        WinClassicInstaller inst = new WinClassicInstaller();
                        inst.installname.Text = "Web Chat 1998";
                        WinClassic app = wm.StartWin95(inst, "Web Chat Setup", null, true, true);
                        AddTaskBarItem(app, app.Tag.ToString(), "Web Chat Setup", null);
                        app.BringToFront();
                        startmenu.Hide();
                    }
                }
            }
        }
Ejemplo n.º 3
0
        private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WinClassic app = wm.StartInfobox95("AShifter's Infobox", "This is the very first TimeHACK Infobox. It's really easy to call, too! \n Just use wm.startInfobox95(String title, String text, Image erroricon)!", Properties.Resources.Win95Info);

            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 4
0
        private void iE4TestToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WinClassic app = wm.StartWin95(new TempIE4(), "IE4", null, true, true);

            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 5
0
        // This is the very first story script!
        public static void startObjective()
        {
            System.Windows.Forms.Timer tmr = new System.Windows.Forms.Timer();

            WinClassicTerminal Console = new WinClassicTerminal();
            WinClassic         app     = wm.StartWin95(Console, "MS-DOS Prompt", null, true, true);

            Console.WriteLine("telnet> 104.27.135.159 Connecting...");

            tmr.Interval = 1;
            tmr.Tick    += new EventHandler(CheckIfSoundFinished);

            if (devMode == true)
            {
                Thread contObjective = new Thread(continueObjective);

                app.Close();

                contObjective.Start();
            }
            else
            {
                soundThread.Start();
                tmr.Start();
            }
        }
Ejemplo n.º 6
0
        public void OpenFile(string fileDir)
        {
            try
            {
                switch (ReturnType(new FileInfo(fileDir).Extension))
                {
                case 1:
                    WinClassicNotepad np = new WinClassicNotepad();
                    np.mainText.Text   = FileDialogBoxManager.ReadTextFile(fileDir);
                    np.CurrentFilePath = fileDir;
                    WinClassic app = wm.Init(np, "Notepad", Properties.Resources.Win95IconNotepad, true, true);

                    Program.AddTaskbarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad);
                    break;

                case 2:
                    WinClassicWordPad wp = new WinClassicWordPad();
                    wp.mainText.LoadFile(fileDir);
                    wp.CurrentFilePath = fileDir;
                    WinClassic app2 = wm.Init(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true);

                    Program.AddTaskbarItem(app2, app2.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad);
                    break;

                case 12:
                    OpenApplication(FileDialogBoxManager.ReadTextFile(fileDir), fileDir);
                    break;
                }
            } catch {
            }
        }
Ejemplo n.º 7
0
        //  When New Game is clicked in TitleScreen.cs
        private void Desktop_Load(object sender, EventArgs e)
        {
            if (currentTheme.defaultWallpaper != null)
            {
                desktopicons.BackgroundImage = new Bitmap(currentTheme.defaultWallpaper, Width, Height);
            }
            //Start Menu Color - Commented until it works reliably
            //startmenuitems.Renderer = new MyRenderer();
            //ProgramsToolStripMenuItem.DropDown.Renderer = new MyRenderer();

            // Make Font Mandatory
            fontLoad();

            // Play Windows 95 Start Sound
            Stream audio = currentTheme.startSound;

            startsound = new SoundPlayer(audio);
            startsound.Play();

            // Hide the Startmenu
            startmenu.Hide();

            // Check for and set VM Mode
            if (this.FormBorderStyle != FormBorderStyle.None)
            {
                this.Text = "TimeHACK - VM Mode";
            }

            // Start the ClockTimer
            clockTimer.Start();

            // Set the StartMenu seperator
            startmenuitems.Items.Insert(6, new ToolStripSeparator());

            //nonimportantapps.Capacity = 100;
            this.SendToBack();

            // Update the taskbar
            UpdateTaskbar();

            // Bring to this the front
            this.BringToFront();

            //Check if it is the first time
            if (CurrentSave.FTime95 == false)
            {
                CurrentSave.FTime95 = true;
                SaveSystem.SaveGame();
                WinClassicWelcome welcome = new WinClassicWelcome();
                WinClassic        app     = wm.StartWin95(welcome, "Welcome", null, false, false);
                AddTaskBarItem(app, app.Tag.ToString(), "Welcome", null);

                nonimportantapps.Add(app);
                nonimportantapps[nonimportantapps.Count - 1].BringToFront();
                nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);

                app.BringToFront();
            }
        }
Ejemplo n.º 8
0
        private void FTPClientToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WinClassic app = wm.StartWin95(new WinClassicFTPClient(), "FTP Client", null, true, true);

            AddTaskBarItem(app, app.Tag.ToString(), "FTP Client", null);
            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 9
0
        private void MSDOSPromptToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            WinClassicTerminal msdos = new WinClassicTerminal();
            WinClassic         app   = wm.StartWin95(msdos, "MS-DOS Prompt", Properties.Resources.MS_DOS, true, true, false);

            AddTaskBarItem(app, app.Tag.ToString(), "MS-DOS Prompt", Properties.Resources.MS_DOS);
            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 10
0
        private void windowManagerTestToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TestApp    test = new TestApp();
            WinClassic app  = wm.StartWin95(test, "TestApp", null, true, true);

            AddTaskBarItem(app, app.Tag.ToString(), "TestApp", null);
            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 11
0
        private void PropertiesToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            WinClassicThemePanel theme = new WinClassicThemePanel();
            WinClassic           app   = wm.StartWin95(theme, "Themes", null, false, true, false, resize: false);

            AddTaskBarItem(app, app.Tag.ToString(), "Themes", null);
            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 12
0
        private void WebChatToolStripMenuItem_Click(object sender, EventArgs e)
        {
            webchat = wm.StartWin95(new WebChat1998(), "Web Chat 1998", null, true, true);

            AddTaskBarItem(webchat, webchat.Tag.ToString(), "Web Chat 1998", null);

            webchat.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 13
0
        private void TimeDistorterToolStripMenuItem_Click(object sender, EventArgs e)
        {
            distort = new WinClassicTimeDistorter("1998", "1999", 150, Hack2.StartObjective);
            WinClassic app = wm.StartWin95(distort, "Time Distorter", null, false, true);

            AddTaskBarItem(app, app.Tag.ToString(), "Time Distorter", null);
            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 14
0
        private void installerTestToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WinClassicInstaller openinstaller = new WinClassicInstaller();
            WinClassic          app           = wm.StartWin95(openinstaller, "Installer", null, false, true);

            AddTaskBarItem(app, app.Tag.ToString(), "Installer", null);

            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 15
0
        private void WebChatToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WebChat1998 wc  = new WebChat1998();
            WinClassic  app = wm.StartWin95(wc, "Web Chat 1998", null, true, true);

            AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1998", null);

            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 16
0
        public static async void ContinueObjective()
        {
            try
            {
                WinClassicTerminal Console = new WinClassicTerminal(true);
                WinClassic         app     = wm.Init(Console, "MS-DOS Prompt", null, true, true);
                TitleScreen.frm95.AddTaskBarItem(app, app.Tag.ToString(), "MS-DOS Prompt", null);

                Console.WriteLine("telnet> 104.27.135.159 Connecting...");
                await Task.Delay(2500);

                Console.WriteLine("telnet> 104.27.135.159 Connected.");
                await Task.Delay(2500);

                Console.WriteLine("telnet> 104.27.135.159 set hostname to 'TheHiddenHacker'.");
                await Task.Delay(2500);

                Console.WriteLine("TheHiddenHacker> I see you have access to 12padams.com.");
                await Task.Delay(4500);

                Console.WriteLine("TheHiddenHacker> Though it doesn't seem obvious, only a very limited amount of people can access the site.");
                await Task.Delay(6000);

                Console.WriteLine("TheHiddenHacker> 12padams has a secret, and I need you to help me find it.");
                await Task.Delay(3500);

                Console.WriteLine("TheHiddenHacker> I was snooping around his website, when he blacklisted my IP address.");
                await Task.Delay(4000);

                Console.WriteLine("TheHiddenHacker> While I was searching, I noticed a file that I didn't have permission to download. I need you to get it for me.");
                await Task.Delay(6500);

                Console.WriteLine("TheHiddenHacker> First, I'll need you to download an FTP client, available under the software section of 12padams' website.");
                await Task.Delay(5000);

                Console.WriteLine("TheHiddenHacker> Once that's downloaded, You'll need to type in a Hostname, Username, and Password.");
                await Task.Delay(4500);

                Console.WriteLine("TheHiddenHacker> The hostname is 172.68.119.42, and the username is most likely 12padams. I'm not too sure what the password is, however.");
                await Task.Delay(3500);

                Console.WriteLine("TheHiddenHacker> You'll need to figure out where you can get the password. Try looking for any odd text on the website.");
                await Task.Delay(3500);

                Console.WriteLine("TheHiddenHacker> I don't have much time to talk - I'd quickly copy down those details into Notepad before this Terminal gets closed.");

                await Task.Delay(36000);

                app.Close();
                ended = true;
            } catch (Exception e)
            {
                return;
            }
        }
Ejemplo n.º 17
0
        private void FTPClientToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WinClassic app = wm.Init(new WinClassicFTPClient(), "FTP Client", null, true, true);

            AddTaskBarItem(app, app.Tag.ToString(), "FTP Client", null);
            app.BringToFront();
            startmenu.Hide();
            startbutton.Image = Properties.Resources.WinClassicStart;
            startbutton.Refresh();
            startbutton.Visible = true;
        }
Ejemplo n.º 18
0
        private void AddressBookToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WinClassic app = wm.StartWin95(new WinClassicAddressBook(), "Address Book", Properties.Resources.WinClassicAddressBook, true, true);

            Program.AddTaskbarItem(app, app.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook);

            Program.nonimportantapps.Add(app);
            Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront();
            Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing);

            app.BringToFront();
        }
Ejemplo n.º 19
0
        private void WebChatToolStripMenuItem_Click(object sender, EventArgs e)
        {
            webchat = wm.Init(new WebChat1998(), "Web Chat 1998", null, true, true);

            AddTaskBarItem(webchat, webchat.Tag.ToString(), "Web Chat 1998", null);

            webchat.BringToFront();
            startmenu.Hide();
            startbutton.Image = Properties.Resources.WinClassicStart;
            startbutton.Refresh();
            startbutton.Visible = true;
        }
Ejemplo n.º 20
0
        private void MSDOSPromptToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            WinClassicTerminal msdos = new WinClassicTerminal(false);
            WinClassic         app   = wm.Init(msdos, "MS-DOS Prompt", Properties.Resources.MSDOSPromptToolStripMenuItem1_Image, true, true, false);

            AddTaskBarItem(app, app.Tag.ToString(), "MS-DOS Prompt", Properties.Resources.MSDOSPromptToolStripMenuItem1_Image);
            app.BringToFront();
            startmenu.Hide();
            startbutton.Image = Properties.Resources.WinClassicStart;
            startbutton.Refresh();
            startbutton.Visible = true;
        }
Ejemplo n.º 21
0
 private void InternetExplorerToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (ie != null)
     {
         wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return;
     }
     ie = wm.StartWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true);
     AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4);
     ie.BringToFront();
     ie.FormClosing += new FormClosingEventHandler(InternetExplorer4_Closing);
     startmenu.Hide();
 }
Ejemplo n.º 22
0
        private void downloaderTestToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WinClassicDownloader opendownload = new WinClassicDownloader();
            WinClassic           app          = wm.StartWin95(opendownload, "Downloader", null, false, true);

            opendownload.appName.Text = "Downloading: Survive The Day";

            AddTaskBarItem(app, app.Tag.ToString(), "Downloader", null);

            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 23
0
        private void TimeDistorterToolStripMenuItem_Click(object sender, EventArgs e)
        {
            distort = new WinClassicTimeDistorter("1998", "1999", 150, Hack2.StartObjective);
            WinClassic app = wm.Init(distort, "Time Distorter", null, false, true);

            AddTaskBarItem(app, app.Tag.ToString(), "Time Distorter", null);
            app.BringToFront();
            startmenu.Hide();
            startbutton.Image = Properties.Resources.WinClassicStart;
            startbutton.Refresh();
            startbutton.Visible = true;
        }
Ejemplo n.º 24
0
        private void PropertiesToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            WinClassicThemePanel theme = new WinClassicThemePanel();
            WinClassic           app   = wm.Init(theme, "Themes", null, false, true, false, resize: false);

            AddTaskBarItem(app, app.Tag.ToString(), "Themes", null);
            app.BringToFront();
            startmenu.Hide();
            startbutton.Image = Properties.Resources.WinClassicStart;
            startbutton.Refresh();
            startbutton.Visible = true;
        }
Ejemplo n.º 25
0
        private void TimeDistorterToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (distort != null)
            {
                return;
            }
            distort = new WinClassicTimeDistorter2();
            WinClassic app = wm.Init(distort, "Time Distorter", null, false, false, false);

            AddTaskBarItem(app, app.Tag.ToString(), "Time Distorter", null);
            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 26
0
        private void MinsweeperToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WinClassic app = wm.Init(new WinClassicMinesweeper(), "Minesweeper", Properties.Resources.WinClassicMinesweeper, false, false, false, false);

            AddTaskBarItem(app, app.Tag.ToString(), "Minesweeper", Properties.Resources.WinClassicMinesweeper);

            nonimportantapps.Add(app);
            nonimportantapps[nonimportantapps.Count - 1].BringToFront();
            nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);

            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 27
0
        private void FilesOrFoldersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WinClassic app = wm.Init(new StartRunner95(), "Welcome to Start Runner 95!", null, false, false, false, false);

            AddTaskBarItem(app, app.Tag.ToString(), "Welcome to Start Runner 95!", null);

            nonimportantapps.Add(app);
            nonimportantapps[nonimportantapps.Count - 1].BringToFront();
            nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);

            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 28
0
        private void GuessTheNumberToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WinClassic app = wm.StartWin95(new GuessTheNumber(), "Guess The Number", Properties.Resources.WinClassicGTNIcon, false, false, false, false);

            AddTaskBarItem(app, app.Tag.ToString(), "Guess The Number", Properties.Resources.WinClassicGTNIcon);

            nonimportantapps.Add(app);
            nonimportantapps[nonimportantapps.Count - 1].BringToFront();
            nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);

            app.BringToFront();
            startmenu.Hide();
        }
Ejemplo n.º 29
0
        public static string OpenFileExplorerAsDialogAndReturnGivenPath()
        {
            WinClassicWindowsExplorer we = new WinClassicWindowsExplorer();

            WinClassic app = wm.StartWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true);

            try
            {
                return(WindowsExplorerReturnPath);
            } catch {
                return("");
            }
        }
Ejemplo n.º 30
0
        void OpenProperties()
        {
            FRMWinClassicAddressBookNewContact abnc = new FRMWinClassicAddressBookNewContact();

            // Finds the selected contact
            if (treeView1.SelectedNode != null)
            {
                foreach (AddressBookContactList ContactList in AddressBookObjects)
                {
                    if (ContactList.NodePath == FindNodePath(treeView1.SelectedNode))
                    {
                        foreach (AddressBookContact Contact in ContactList.Contacts)
                        {
                            if (contactsView.FocusedItem == null)
                            { // Most likely they are trying to view a whole folder!
                                wm.StartInfobox95("Properties of a folder", "You cannot view the properties of a contact folder.", InfoboxType.Warning, InfoboxButtons.OK);
                            }
                            else
                            {
                                if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text)
                                {
                                    abnc.toSet = Contact;
                                }
                            }
                        }
                    }
                }
                WinClassic app = wm.Init(abnc, "Address Book - Contact Properties", Properties.Resources.Win95IconWordpad, true, true, true);

                if (treeView1.SelectedNode != null)
                {
                    if (Program.AddressBookSelectedContact != null)
                    {
                        foreach (AddressBookContactList ContactList in AddressBookObjects)
                        {
                            if (ContactList.NodePath == FindNodePath(treeView1.SelectedNode))
                            {
                                foreach (AddressBookContact Contact in ContactList.Contacts)
                                {
                                    if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text)
                                    {
                                        ContactList.Contacts.Remove(Contact);
                                        ContactList.Contacts.Add(Program.AddressBookSelectedContact);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }