Ejemplo n.º 1
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.º 2
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.º 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 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.º 5
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.º 6
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.º 7
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.º 8
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.º 9
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.º 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 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.º 13
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.º 14
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.º 15
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.º 16
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.º 17
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.º 18
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.º 19
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.º 20
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.º 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 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.º 23
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.º 24
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.º 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
        void StartSurviveTheDay()
        {
            Win2K.Win2KApps.SurviveTheDay std = new Win2K.Win2KApps.SurviveTheDay();
            WinClassic app = wm.StartWin95(std, "Survive The Day", null, false, false);

            AddTaskBarItem(app, app.Tag.ToString(), "Survive The Day", null);

            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 WordPadToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WinClassicWordPad wp  = new WinClassicWordPad();
            WinClassic        app = wm.StartWin95(wp, "Wordpad", Properties.Resources.Win95IconWordpad, true, true);

            AddTaskBarItem(app, app.Tag.ToString(), "Wordpad", Properties.Resources.Win95IconWordpad);

            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 temp_for_std(object sender, EventArgs e)
        {
            Win2K.Win2KApps.SurviveTheDay std = new Win2K.Win2KApps.SurviveTheDay();
            WinClassic app = wm.Init(std, "Survive The Day", null, false, false);

            AddTaskBarItem(app, app.Tag.ToString(), "Survive The Day", null);

            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 WinClassic startWin95(UserControl content, String title, PictureBox icon, Boolean MaxButton, Boolean MinButton)
        {
            // Setup Window
            WinClassic app = new WinClassic();

            app.Text       = title;
            app.Title.Text = title;
            app.Width      = content.Width + 8;
            app.Height     = content.Height + 26;
            // Initialize Font
            pfc.AddFontFile(AppDomain.CurrentDomain.BaseDirectory + "\\LeviWindows.ttf");
            Font fnt = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));

            app.fnt        = fnt;
            app.Title.Font = new Font(pfc.Families[0], 16F, FontStyle.Bold, GraphicsUnit.Point, ((0)));
            // Setup UC
            content.Parent = app.programContent;
            content.BringToFront();
            content.Dock = DockStyle.Fill;

            // Check if icon is null
            if (icon == null)
            {
                icon       = app.programIcon;
                icon.Image = Engine.Properties.Resources.nullIcon;
            }
            app.programIcon.Image = icon.Image;

            // Check if Max button is enabled and set proper X for Min button
            if (MaxButton == false)
            {
                app.maximizebutton.Visible  = false;
                app.minimizebutton.Location = new Point(app.closebutton.Location.X - 14, app.minimizebutton.Location.Y);
            }

            // Check if Min button is enabled
            if (MinButton == false)
            {
                app.minimizebutton.Visible  = false;
                app.minimizebutton.Location = new Point(app.minimizebutton.Location.X, app.minimizebutton.Location.Y);
            }

            // Show the app
            app.Show();
            app.BringToFront();
            app.TopMost = true;

            return(app);
        }
Ejemplo n.º 30
0
        private void WindowsExplorerToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            FileDialogBoxManager.IsInOpenDialog = false;
            FileDialogBoxManager.IsInSaveDialog = false;
            WinClassic app = wm.StartWin95(new WinClassicWindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true);

            AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer);

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

            app.BringToFront();
            startmenu.Hide();
        }