aboutsummaryrefslogtreecommitdiff
path: root/Project Ports/Desktop.cs
blob: 68456d0036a1d908608e7909684490fcc0a5ae40 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/************************************************************************
 *  
 *  Project Ports
 *  Copyright (C) 2018 UniverseDG
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
 * 
 **************************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Threading;
using System.Threading.Tasks;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using PortEngine;


namespace Project_Ports
{
    public partial class Desktop : Form
    {
        public Desktop()
        {
            InitializeComponent();
        }

        WindowManager wm = new WindowManager();

        private void dclock_Tick(object sender, EventArgs e)
        {
            GeneralAPI.setNameOnAppLauncher(playerName);
                this.ltime.Text = DateTime.Now.ToString("hh:mm tt");
            
        }

        private void Desktop_Load(object sender, EventArgs e)
        {
            #if DEBUG
            testWindowToolStripMenuItem.Visible = true;
            btnhijack2.Visible = true;
            btnCrash.Visible = true;
            #endif
            dclock.Start();
            desktopWatermark.Text = "Project: Ports " + Properties.Settings.Default.version + Environment.NewLine + "Working Progress";
            appMenu.Hide();

        }

        private void appButton_Click(object sender, EventArgs e)
        {
            appMenu.Show();
        }

        private void shutdownButton_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {

        }

        private void terminalToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            wm.createWindow(new Terminal(), "Terminal");
            appMenu.Hide();
        }

        private void testWindowToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            wm.createWindow(new TestWindow(), "TestWindow");
            appMenu.Hide();
        }

        private void chatterToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            wm.createWindow(new ChatApp(), "Chatter");
            appMenu.Hide();
        }

        private void settingsToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            wm.createWindow(new Settings(), "System Settings");
            appMenu.Hide();
        }

        private void quantumNetBrowserToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            wm.createWindow(new QuantumNet(), "QuantumNet Browser");
            appMenu.Hide();
        }

        private void Desktop_MouseClick(object sender, MouseEventArgs e)
        {
            appMenu.Hide();
        }

        private void btnhijack2_Click(object sender, EventArgs e)
        {
            appMenu.Hide();
            Thread.Sleep(5000);
            appButton.Enabled = false;
            Thread.Sleep(2000);
            dclock.Stop();
            ltime.Text = "66:66 AM";
            appButton.Text = "HIJACKED";
            Thread.Sleep(5000);
            Crash crash = new Crash();
            crash.Show();

        }

        private void btnCrash_Click(object sender, EventArgs e)
        {
            Crash crash = new Crash();
            crash.Show();
            this.Close();
        }
    }
}