Пример #1
0
        // Yeah, yeah, so I should probably make this accept params. We'll see if it happens later on.
        private void populateUsers()
        {
            // Also shoutout to automatic definition handling
            // Ah, C#, it's great to be here again.

            // Go through each user
            // (could have also used the count from anything else that holds a user property)
            for (int i = 0; i < Properties.Settings.Default.username.Count; i++)
            {
                int t = 0;

                Panel uA = new Panel();
                uA.Show();
                uA.BackColor = Color.White;
                //uA.BackColor = Color.FromName(Properties.Settings.Default.custColor[i]);
                uA.Left   = 0;
                uA.Width  = this.Width;
                uA.Height = 50;
                uA.Margin = new Padding(0, 2, 0, 0);

                userList.Controls.Add(uA);

                PictureBox pImg = new PictureBox();
                pImg.Image     = Image.FromFile(Properties.Settings.Default.userimgacc_path[i]);
                pImg.Left      = 0;
                pImg.Width     = 50;
                pImg.Height    = 50;
                pImg.Dock      = DockStyle.Left;
                pImg.BackColor = Color.White;
                pImg.SizeMode  = PictureBoxSizeMode.Zoom;

                Label turnip = new Label();
                turnip.Show();
                turnip.BackColor    = Color.Transparent;
                turnip.AutoEllipsis = true;
                turnip.Left         = 64;
                turnip.Width        = this.Width - 64 - 50;
                turnip.Height       = 50;
                turnip.Top          = 0;
                turnip.Font         = new System.Drawing.Font(Properties.Settings.Default.fontsOfScience[Properties.Settings.Default.whoIsThisCrazyDoge], 11);
                turnip.ForeColor    = Color.DimGray;
                //turnip.ForeColor = Color.White;
                turnip.TextAlign = ContentAlignment.MiddleLeft;
                turnip.Text      = Properties.Settings.Default.username[i];

                uA.Controls.Add(pImg);
                uA.Controls.Add(turnip);

                Button dl = new Button();
                dl.Show();
                dl.BackColor = Color.Firebrick;

                dl.Width  = 50;
                dl.Left   = uA.Width - 50;
                dl.Height = 50;
                dl.Dock   = DockStyle.Right;

                dl.Font      = new System.Drawing.Font(Properties.Settings.Default.fontsOfScience[Properties.Settings.Default.whoIsThisCrazyDoge], 11);
                dl.ForeColor = Color.White;
                dl.TextAlign = ContentAlignment.MiddleCenter;
                dl.Text      = "X";

                dl.FlatStyle = FlatStyle.Flat;
                dl.FlatAppearance.BorderSize = 0;

                uA.Controls.Add(dl);

                // Shhhhhhhhhhh hidden controls

                Label toDel = new Label();

                toDel.Show();
                toDel.BackColor    = Color.Transparent;
                toDel.AutoEllipsis = true;
                toDel.Left         = 64;
                toDel.Width        = this.Width - 64 - 50;
                toDel.Height       = 18;
                toDel.Top          = 50;
                toDel.Font         = new System.Drawing.Font(Properties.Settings.Default.fontsOfScience[Properties.Settings.Default.whoIsThisCrazyDoge], 11);
                toDel.ForeColor    = Color.Red;
                toDel.TextAlign    = ContentAlignment.MiddleLeft;
                toDel.Text         = "To delete this account, enter the password:"******"PSR002: User data incorrectly populated for matching with user element.");
                            ts.Show();
                            ts.BringToFront();
                        }
                        else if (pBox.Text == Properties.Settings.Default.woahThereHello[t])
                        {
                            Properties.Settings.Default.custColor.RemoveAt(t);
                            Properties.Settings.Default.lock_path.RemoveAt(t);
                            Properties.Settings.Default.loggedIn.RemoveAt(t);
                            Properties.Settings.Default.nickname.RemoveAt(t);
                            Properties.Settings.Default.space_back_path.RemoveAt(t);
                            Properties.Settings.Default.userimgacc_path.RemoveAt(t);
                            Properties.Settings.Default.username.RemoveAt(t);
                            Properties.Settings.Default.woahThereHello.RemoveAt(t);
                            Properties.Settings.Default.fontsOfScience.RemoveAt(t);
                            Properties.Settings.Default.darkerFontsOfScience.RemoveAt(t);
                            Properties.Settings.Default.Save();

                            try
                            {
                                System.IO.Directory.Delete(@"C:\ProjectSnowshoes\User\" + turnip.Text, true); // Note that we have to use this as a source for username, since we removed it from Settings earlier.
                            }
                            catch (Exception ex)
                            {
                                // This is a terrible way to do error reporting...knowing that errors might occur here if there's a problem with accounts not having actual files
                                // Hey, all that's not going to be a problem in Escape though, since we are getting away from VC# settings...and VC# for the most part as well.
                                TheScreenIsBlue ts = new TheScreenIsBlue("PSR003: User information removed, but files damaged or missing for requested username (" + ex.HResult + ").");
                                ts.Show();
                                ts.BringToFront();
                            }

                            goBackJack();
                        }
                        else
                        {
                            pBox.Text  = "";
                            toDel.Text = "That won't work. Try something else.";
                        }
                    }
                };
            }
        }
Пример #2
0
        private void Space_Load(object sender, EventArgs e)
        {
            try {
                // Set size of elements based on screen resolution

                goFixTheResYas();

                // Repair flickering by turning up instead

                this.BackgroundImage       = null;
                this.BackgroundImageLayout = ImageLayout.Stretch;
                DoubleBufferManipulation.SetDoubleBuffered(panel1);
                DoubleBufferManipulation.SetDoubleBuffered(spaceForIcons);

                // Bottom Bar Load

                /*ThisMayFixTransparency prelimBar = new ThisMayFixTransparency(this.Height);
                 * prelimBar.Show();
                 * prelimBar.BringToFront();*/

                /*BottomBar newBotBar = new BottomBar(this.Height);
                 * newBotBar.Show();
                 * newBotBar.BringToFront();*/

                BottomBar_Concept124 newBotBar = new BottomBar_Concept124(this.Height);
                newBotBar.Show();
                newBotBar.BringToFront();

                // Font Family Setting Load

                timeSpaceContinuum.Font = new System.Drawing.Font(Properties.Settings.Default.fontsOfScience[Properties.Settings.Default.whoIsThisCrazyDoge], 11);

                // Space Background Load

                this.BackColor = Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]);

                panel1.BackgroundImage = Image.FromFile(Properties.Settings.Default.space_back_path[Properties.Settings.Default.whoIsThisCrazyDoge]);
                currentBGPath          = Properties.Settings.Default.space_back_path[Properties.Settings.Default.whoIsThisCrazyDoge];

                // Top Left Account Information

                accountImg.Image = Image.FromFile(Properties.Settings.Default.userimgacc_path[Properties.Settings.Default.whoIsThisCrazyDoge]);
                name.Text        = Properties.Settings.Default.nickname[Properties.Settings.Default.whoIsThisCrazyDoge];

                // Custom Color Integration

                name.BackColor   = Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]);
                panel3.BackColor = Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]);
                date.BackColor   = Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]);
                time.BackColor   = Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]);



                // Notification Loader Portion

                for (int index = 0; index <= Properties.Settings.Default.notificationapps.Count - 1; index++)
                {
                    String nameThatFile = Settings.Default.notificationapps[index];
                    Process.Start(nameThatFile);
                }

                System.IO.File.WriteAllText("C:\\ProjectSnowshoes\\notification.txt", Properties.Settings.Default.notificationtext);



                //Application.DoEvents();

                // Load apps

                goGenerateTilesFriendship();


                //Application.DoEvents();

                // Load processes

                // goGenerateProcessesFriendship();



                // Aw yeah even more spaces
                // Time to do work, or in other words, free the spaceForProcesses from the taskbar so that hover functionality can work
                // (even though I still have to make the hover functionality Robert do you know what you are doing)
                // (no)

                /*panel1.Controls.Add(spaceForProcesses);
                 * bottomPanel.Controls.Remove(spaceForProcesses);*/


                //Transition.run(this, "Opacity", 0, 1, new TransitionType_EaseInEaseOut(14));

                BackgroundFunctionManager bfm = new BackgroundFunctionManager();
                bfm.Show();
            }
            catch (Exception ex)
            {
                TheScreenIsBlue tsib = new TheScreenIsBlue(ex.HResult + ": " + ex.Message);
                tsib.Show();
                tsib.BringToFront();

                this.Close();
            }
        }
Пример #3
0
        private void Space_Load(object sender, EventArgs e)
        {
            
            try { 
            
            // Set size of elements based on screen resolution 

            goFixTheResYas();
            
            // Repair flickering by turning up instead

            this.BackgroundImage = null;
            this.BackgroundImageLayout = ImageLayout.Stretch;
            DoubleBufferManipulation.SetDoubleBuffered(panel1);
            DoubleBufferManipulation.SetDoubleBuffered(spaceForIcons);
            
            // Bottom Bar Load

            /*ThisMayFixTransparency prelimBar = new ThisMayFixTransparency(this.Height);
            prelimBar.Show();
            prelimBar.BringToFront();*/
            
            /*BottomBar newBotBar = new BottomBar(this.Height);
            newBotBar.Show();
            newBotBar.BringToFront();*/

            BottomBar_Concept124 newBotBar = new BottomBar_Concept124(this.Height);
            newBotBar.Show();
            newBotBar.BringToFront();

            // Font Family Setting Load

            timeSpaceContinuum.Font = new System.Drawing.Font(Properties.Settings.Default.fontsOfScience[Properties.Settings.Default.whoIsThisCrazyDoge], 11);

            // Space Background Load

            this.BackColor = Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]);

            panel1.BackgroundImage = Image.FromFile(Properties.Settings.Default.space_back_path[Properties.Settings.Default.whoIsThisCrazyDoge]);
            currentBGPath = Properties.Settings.Default.space_back_path[Properties.Settings.Default.whoIsThisCrazyDoge];
            
            // Top Left Account Information 

            accountImg.Image = Image.FromFile(Properties.Settings.Default.userimgacc_path[Properties.Settings.Default.whoIsThisCrazyDoge]);
            name.Text = Properties.Settings.Default.nickname[Properties.Settings.Default.whoIsThisCrazyDoge];

            // Custom Color Integration

            name.BackColor = Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]);
            panel3.BackColor = Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]);
            date.BackColor = Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]);
            time.BackColor = Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]);





            // Notification Loader Portion

            for (int index = 0; index <= Properties.Settings.Default.notificationapps.Count - 1; index++)
            {
                String nameThatFile = Settings.Default.notificationapps[index];
                Process.Start(nameThatFile);
            }

            System.IO.File.WriteAllText("C:\\ProjectSnowshoes\\notification.txt", Properties.Settings.Default.notificationtext);



            //Application.DoEvents();

            // Load apps 

            goGenerateTilesFriendship();


            //Application.DoEvents();

            // Load processes

            // goGenerateProcessesFriendship();

            



            // Aw yeah even more spaces
            // Time to do work, or in other words, free the spaceForProcesses from the taskbar so that hover functionality can work
            // (even though I still have to make the hover functionality Robert do you know what you are doing)
            // (no)

            /*panel1.Controls.Add(spaceForProcesses);
            bottomPanel.Controls.Remove(spaceForProcesses);*/


            //Transition.run(this, "Opacity", 0, 1, new TransitionType_EaseInEaseOut(14));

            BackgroundFunctionManager bfm = new BackgroundFunctionManager();
            bfm.Show();
            }
            catch (Exception ex)
            {
                TheScreenIsBlue tsib = new TheScreenIsBlue(ex.HResult + ": " + ex.Message);
                tsib.Show();
                tsib.BringToFront();
                
                this.Close();


            }

        }
Пример #4
0
        // Yeah, yeah, so I should probably make this accept params. We'll see if it happens later on. 
        private void populateUsers()
        {
            // Also shoutout to automatic definition handling 
            // Ah, C#, it's great to be here again.

            // Go through each user
            // (could have also used the count from anything else that holds a user property)
            for (int i = 0; i < Properties.Settings.Default.username.Count; i++)
            {

                int t = 0;
                
                Panel uA = new Panel();
                uA.Show();
                uA.BackColor = Color.White;
                //uA.BackColor = Color.FromName(Properties.Settings.Default.custColor[i]);
                uA.Left = 0;
                uA.Width = this.Width;
                uA.Height = 50;
                uA.Margin = new Padding(0, 2, 0, 0);
                
                userList.Controls.Add(uA);

                PictureBox pImg = new PictureBox();
                pImg.Image = Image.FromFile(Properties.Settings.Default.userimgacc_path[i]);
                pImg.Left = 0;
                pImg.Width = 50;
                pImg.Height = 50;
                pImg.Dock = DockStyle.Left;
                pImg.BackColor = Color.White;
                pImg.SizeMode = PictureBoxSizeMode.Zoom;
                
                Label turnip = new Label();
                turnip.Show();
                turnip.BackColor = Color.Transparent;
                turnip.AutoEllipsis = true;
                turnip.Left = 64;
                turnip.Width = this.Width - 64 - 50;
                turnip.Height = 50;
                turnip.Top = 0;
                turnip.Font = new System.Drawing.Font(Properties.Settings.Default.fontsOfScience[Properties.Settings.Default.whoIsThisCrazyDoge], 11);
                turnip.ForeColor = Color.DimGray;
                //turnip.ForeColor = Color.White;
                turnip.TextAlign = ContentAlignment.MiddleLeft;
                turnip.Text = Properties.Settings.Default.username[i];

                uA.Controls.Add(pImg);
                uA.Controls.Add(turnip);

                Button dl = new Button();
                dl.Show();
                dl.BackColor = Color.Firebrick;
                
                dl.Width = 50;
                dl.Left = uA.Width - 50;
                dl.Height = 50;
                dl.Dock = DockStyle.Right;

                dl.Font = new System.Drawing.Font(Properties.Settings.Default.fontsOfScience[Properties.Settings.Default.whoIsThisCrazyDoge], 11);
                dl.ForeColor = Color.White;
                dl.TextAlign = ContentAlignment.MiddleCenter;
                dl.Text = "X";

                dl.FlatStyle = FlatStyle.Flat;
                dl.FlatAppearance.BorderSize = 0;
                
                uA.Controls.Add(dl);

                // Shhhhhhhhhhh hidden controls

                Label toDel = new Label();

                toDel.Show();
                toDel.BackColor = Color.Transparent;
                toDel.AutoEllipsis = true;
                toDel.Left = 64;
                toDel.Width = this.Width - 64 - 50;
                toDel.Height = 18;
                toDel.Top = 50;
                toDel.Font = new System.Drawing.Font(Properties.Settings.Default.fontsOfScience[Properties.Settings.Default.whoIsThisCrazyDoge], 11);
                toDel.ForeColor = Color.Red;
                toDel.TextAlign = ContentAlignment.MiddleLeft;
                toDel.Text = "To delete this account, enter the password:"******"PSR002: User data incorrectly populated for matching with user element.");
                            ts.Show();
                            ts.BringToFront();
                        }
                        else if (pBox.Text == Properties.Settings.Default.woahThereHello[t])
                        {
                            
                            Properties.Settings.Default.custColor.RemoveAt(t);
                            Properties.Settings.Default.lock_path.RemoveAt(t);
                            Properties.Settings.Default.loggedIn.RemoveAt(t);
                            Properties.Settings.Default.nickname.RemoveAt(t);
                            Properties.Settings.Default.space_back_path.RemoveAt(t);
                            Properties.Settings.Default.userimgacc_path.RemoveAt(t);
                            Properties.Settings.Default.username.RemoveAt(t);
                            Properties.Settings.Default.woahThereHello.RemoveAt(t);
                            Properties.Settings.Default.fontsOfScience.RemoveAt(t);
                            Properties.Settings.Default.darkerFontsOfScience.RemoveAt(t);
                            Properties.Settings.Default.Save();

                            try
                            {
                                System.IO.Directory.Delete(@"C:\ProjectSnowshoes\User\" + turnip.Text, true); // Note that we have to use this as a source for username, since we removed it from Settings earlier.
                            }
                            catch (Exception ex)
                            {
                                // This is a terrible way to do error reporting...knowing that errors might occur here if there's a problem with accounts not having actual files
                                // Hey, all that's not going to be a problem in Escape though, since we are getting away from VC# settings...and VC# for the most part as well.
                                TheScreenIsBlue ts = new TheScreenIsBlue("PSR003: User information removed, but files damaged or missing for requested username (" + ex.HResult + ").");
                                ts.Show();
                                ts.BringToFront();
                            }

                            goBackJack();
                        }
                        else
                        {
                            pBox.Text = "";
                            toDel.Text = "That won't work. Try something else.";
                        }
                    }
                };

            }
        }