コード例 #1
0
        private void goGenerateTilesFriendship()
        {

            String pathPlease = @"C:\ProjectSnowshoes\User\" + Properties.Settings.Default.username[Properties.Settings.Default.whoIsThisCrazyDoge] + @"\Documents";
            //String pathPlease = @"C:\Users\Robert\Documents";

            for (int i = 0; i < Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly).Length; i++)
            {
                
                Button doc1 = new Button();
                doc1.Show();
                doc1.BackColor = Color.Transparent;
                doc1.Left = 0;
                doc1.Width = this.Width - 17;
                doc1.Height = openDocsWinExp.Height;
                doc1.Margin = new Padding(0);
                doc1.FlatStyle = FlatStyle.Flat;
                doc1.FlatAppearance.BorderSize = 0;
                doc1.TextAlign = ContentAlignment.MiddleLeft;
                doc1.ImageAlign = ContentAlignment.MiddleLeft;
                
                themDocsTho.Controls.Add(doc1);

                FileInfo fiInf = new FileInfo(Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly)[i]);
                String fiInfStr = fiInf.Name;
                fiInfStr = fiInfStr.Split('.')[0];

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

                IconManager areYouForRealRightNowLikeReallyRealVSWow = new IconManager();
                doc1.Image = areYouForRealRightNowLikeReallyRealVSWow.icoExtReturner(fiInf.FullName, fiInfStr, false);

                DoubleBufferManipulation.SetDoubleBuffered(turnip);
                doc1.Controls.Add(turnip);
                
                doc1.Click += (sender, args) =>
                {
                    System.Diagnostics.Process.Start(fiInf.FullName);
                };

                turnip.Click += (sender, args) =>
                {
                    System.Diagnostics.Process.Start(fiInf.FullName);
                };

            }



        }
コード例 #2
0
ファイル: Space.cs プロジェクト: IndigoBox/ProjectSnowshoes
        private void goGenerateTilesFriendship()
        {
            
            String pathPlease = @"C:\ProjectSnowshoes\User\" + Properties.Settings.Default.username[Properties.Settings.Default.whoIsThisCrazyDoge] + @"\Space";

            for (int i = 0; i < Directory.GetFiles(pathPlease,"*.*",SearchOption.TopDirectoryOnly).Length; i++) {
                
                FileInfo fiInf = new FileInfo(Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly)[i]);
                String fiInfStr = fiInf.Name;
                String fiInfStillWIthExt = fiInfStr;
                fiInfStr = fiInfStr.Split('.')[0];

                // if (fiInfStillWIthExt != "desktop.ini" || 
                if ((fiInf.Attributes & FileAttributes.Hidden) != FileAttributes.Hidden)
                {

                    String panelname = "app" + i;
                    Panel app1 = new Panel();
                    app1.Show();
                    app1.BackColor = Color.Transparent;
                    app1.Width = 150;
                    app1.Height = 150;
                    app1.Margin = new Padding(20);
                    app1.BackgroundImageLayout = ImageLayout.Stretch;


                    iconMatch(Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly)[i]);

                    DoubleBufferManipulation.SetDoubleBuffered(app1);

                    spaceForIcons.Controls.Add(app1);

                    Panel turnip = new Panel();
                    turnip.Show();
                    turnip.BackColor = Color.Transparent;
                    turnip.Width = 150;
                    turnip.Height = 150;
                    turnip.BackgroundImageLayout = ImageLayout.Zoom;

                    IconManager areYouForRealRightNowLikeReallyRealVSWow = new IconManager();
                    app1.BackColor = Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]);
                    //app1.BackgroundImage = Properties.Resources._20pertrans_lighterGray;
                    turnip.BackgroundImage = areYouForRealRightNowLikeReallyRealVSWow.icoExtReturner(fiInf.FullName, fiInfStr, true);

                    DoubleBufferManipulation.SetDoubleBuffered(turnip);
                    app1.Controls.Add(turnip);
                    turnip.Left = 0;
                    turnip.Top = 0;

                    Label whatEvenIsThis = new Label();
                    whatEvenIsThis.BackColor = Color.Transparent;
                    whatEvenIsThis.Show();

                    /*ImageFactory imga = new ImageFactory();

                    Properties.Resources.TheOpacityIsAlmostReal.Save("C:\\ProjectSnowshoes\\loginbacktempAA.png");
                    imga.Load("C:\\ProjectSnowshoes\\loginbacktempAA.png");
                    imga.Tint(Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]));

                    whatEvenIsThis.BackgroundImage = imga.Image;*/

                    whatEvenIsThis.BackgroundImage = Image.FromFile("C:\\ProjectSnowshoes\\loginbacktempAA.png");


                    whatEvenIsThis.Width = 150;
                    whatEvenIsThis.Height = 40;
                    /* whatEvenIsThis.Text = Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly)[i];
                    FileInfo fiInf = new FileInfo(Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly)[i]);
                    String fiInfStr = fiInf.Name; 
                    fiInfStr = fiInfStr.Split('.')[0]; */
                    whatEvenIsThis.AutoSize = false;
                    whatEvenIsThis.TextAlign = ContentAlignment.MiddleCenter;
                    whatEvenIsThis.Text = fiInfStr;
                    whatEvenIsThis.ForeColor = Color.White;
                    whatEvenIsThis.Font = new System.Drawing.Font(Properties.Settings.Default.fontsOfScience[Properties.Settings.Default.whoIsThisCrazyDoge], 10);
                    turnip.Controls.Add(whatEvenIsThis);
                    whatEvenIsThis.BringToFront();
                    DoubleBufferManipulation.SetDoubleBuffered(whatEvenIsThis);
                    whatEvenIsThis.Left = 0;
                    whatEvenIsThis.Top = 110;

                    /* app1.Click += hmThatIsAReallyInterestingActionWow;                    
                    turnip.Click += hmThatIsAReallyInterestingActionWow;
                    whatEvenIsThis.Click += hmThatIsAReallyInterestingActionWow; */

                    // Yes, I had to refer to StackOverflow in order to remember how to do this following portion.
                    // Yes, I'm doing that a lot.
                    // Yes, you and my doge are judging me harshly right now.

                    app1.Click += (sender, args) =>
                    {
                        System.Diagnostics.Process.Start(fiInf.FullName);
                    };

                    turnip.Click += (sender, args) =>
                    {
                        System.Diagnostics.Process.Start(fiInf.FullName);
                    };

                    whatEvenIsThis.Click += (sender, args) =>
                    {
                        System.Diagnostics.Process.Start(fiInf.FullName);
                    };

                }


            }

            // Transition.run(spaceForIcons, "Visible", false, true, new TransitionType_EaseInEaseOut(150));
            spaceForIcons.Visible = true;
   
        }
コード例 #3
0
        private void goGenerateTilesFriendship()
        {    
            String pathPlease = @"C:\ProjectSnowshoes\User\" + Properties.Settings.Default.username[Properties.Settings.Default.whoIsThisCrazyDoge] + @"\Apps";
            //String pathPlease = @"C:\Users\Robert\Apps";
            //String pathPlease = @"C:\ProgramData\Microsoft\Windows\Start Menu\Programs";

            for (int i = 0; i < Directory.GetFiles(pathPlease, "*.lnk", SearchOption.AllDirectories).Length; i++)
            {
                

                Panel app1Panel = new Panel();
                app1Panel.Width = 120;
                app1Panel.Height = 120;
                app1Panel.Padding = new Padding(30,40,30,30);

                PictureBox app1 = new PictureBox();
                app1.SizeMode = PictureBoxSizeMode.Zoom;
                app1.Show();
                app1.BackColor = Color.Transparent;
                app1.Left = 42;
                app1.Top = 20;
                app1.Width = 36;
                app1.Height = 36;
                app1.Margin = new Padding(0);
                
                app1Panel.Controls.Add(app1);

                FileInfo fiInf = new FileInfo(Directory.GetFiles(pathPlease, "*.lnk", SearchOption.AllDirectories)[i]);
                String fiInfStr = fiInf.Name;
                fiInfStr = fiInfStr.Split('.')[0];

                Label turnip = new Label();
                turnip.Show();
                turnip.BackColor = Color.Transparent;
                turnip.AutoEllipsis = true;
                turnip.Left = 10;
                turnip.Width = 100;
                turnip.Height = 50;
                turnip.Top = 70;
                turnip.Font = new System.Drawing.Font(Properties.Settings.Default.fontsOfScience[Properties.Settings.Default.whoIsThisCrazyDoge], 9);
                turnip.ForeColor = Color.DimGray;
                turnip.TextAlign = ContentAlignment.TopCenter;
                turnip.Text = fiInfStr;

                IconManager areYouForRealRightNowLikeReallyRealVSWow = new IconManager();
                app1.Image = areYouForRealRightNowLikeReallyRealVSWow.icoExtReturner(fiInf.FullName, fiInfStr, false);
                

                DoubleBufferManipulation.SetDoubleBuffered(turnip);
                app1Panel.Controls.Add(turnip);
                
                app1.Click += (sender, args) =>
                {
                    System.Diagnostics.Process.Start(fiInf.FullName);
                };

                turnip.Click += (sender, args) =>
                {
                    System.Diagnostics.Process.Start(fiInf.FullName);
                };

                app1Panel.Click += (sender, args) =>
                {
                    System.Diagnostics.Process.Start(fiInf.FullName);
                };

                themAppsTho.Controls.Add(app1Panel);

            }

            

        }
コード例 #4
0
ファイル: Space.cs プロジェクト: IndigoBox/ProjectSnowshoes
        private void goGenerateTilesFriendship()
        {
            String pathPlease = @"C:\ProjectSnowshoes\User\" + Properties.Settings.Default.username[Properties.Settings.Default.whoIsThisCrazyDoge] + @"\Space";

            for (int i = 0; i < Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly).Length; i++)
            {
                FileInfo fiInf             = new FileInfo(Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly)[i]);
                String   fiInfStr          = fiInf.Name;
                String   fiInfStillWIthExt = fiInfStr;
                fiInfStr = fiInfStr.Split('.')[0];

                // if (fiInfStillWIthExt != "desktop.ini" ||
                if ((fiInf.Attributes & FileAttributes.Hidden) != FileAttributes.Hidden)
                {
                    String panelname = "app" + i;
                    Panel  app1      = new Panel();
                    app1.Show();
                    app1.BackColor             = Color.Transparent;
                    app1.Width                 = 150;
                    app1.Height                = 150;
                    app1.Margin                = new Padding(20);
                    app1.BackgroundImageLayout = ImageLayout.Stretch;


                    iconMatch(Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly)[i]);

                    DoubleBufferManipulation.SetDoubleBuffered(app1);

                    spaceForIcons.Controls.Add(app1);

                    Panel turnip = new Panel();
                    turnip.Show();
                    turnip.BackColor             = Color.Transparent;
                    turnip.Width                 = 150;
                    turnip.Height                = 150;
                    turnip.BackgroundImageLayout = ImageLayout.Zoom;

                    IconManager areYouForRealRightNowLikeReallyRealVSWow = new IconManager();
                    app1.BackColor = Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]);
                    //app1.BackgroundImage = Properties.Resources._20pertrans_lighterGray;
                    turnip.BackgroundImage = areYouForRealRightNowLikeReallyRealVSWow.icoExtReturner(fiInf.FullName, fiInfStr, true);

                    DoubleBufferManipulation.SetDoubleBuffered(turnip);
                    app1.Controls.Add(turnip);
                    turnip.Left = 0;
                    turnip.Top  = 0;

                    Label whatEvenIsThis = new Label();
                    whatEvenIsThis.BackColor = Color.Transparent;
                    whatEvenIsThis.Show();

                    /*ImageFactory imga = new ImageFactory();
                     *
                     * Properties.Resources.TheOpacityIsAlmostReal.Save("C:\\ProjectSnowshoes\\loginbacktempAA.png");
                     * imga.Load("C:\\ProjectSnowshoes\\loginbacktempAA.png");
                     * imga.Tint(Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]));
                     *
                     * whatEvenIsThis.BackgroundImage = imga.Image;*/

                    whatEvenIsThis.BackgroundImage = Image.FromFile("C:\\ProjectSnowshoes\\loginbacktempAA.png");


                    whatEvenIsThis.Width  = 150;
                    whatEvenIsThis.Height = 40;

                    /* whatEvenIsThis.Text = Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly)[i];
                     * FileInfo fiInf = new FileInfo(Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly)[i]);
                     * String fiInfStr = fiInf.Name;
                     * fiInfStr = fiInfStr.Split('.')[0]; */
                    whatEvenIsThis.AutoSize  = false;
                    whatEvenIsThis.TextAlign = ContentAlignment.MiddleCenter;
                    whatEvenIsThis.Text      = fiInfStr;
                    whatEvenIsThis.ForeColor = Color.White;
                    whatEvenIsThis.Font      = new System.Drawing.Font(Properties.Settings.Default.fontsOfScience[Properties.Settings.Default.whoIsThisCrazyDoge], 10);
                    turnip.Controls.Add(whatEvenIsThis);
                    whatEvenIsThis.BringToFront();
                    DoubleBufferManipulation.SetDoubleBuffered(whatEvenIsThis);
                    whatEvenIsThis.Left = 0;
                    whatEvenIsThis.Top  = 110;

                    /* app1.Click += hmThatIsAReallyInterestingActionWow;
                     * turnip.Click += hmThatIsAReallyInterestingActionWow;
                     * whatEvenIsThis.Click += hmThatIsAReallyInterestingActionWow; */

                    // Yes, I had to refer to StackOverflow in order to remember how to do this following portion.
                    // Yes, I'm doing that a lot.
                    // Yes, you and my doge are judging me harshly right now.

                    app1.Click += (sender, args) =>
                    {
                        System.Diagnostics.Process.Start(fiInf.FullName);
                    };

                    turnip.Click += (sender, args) =>
                    {
                        System.Diagnostics.Process.Start(fiInf.FullName);
                    };

                    whatEvenIsThis.Click += (sender, args) =>
                    {
                        System.Diagnostics.Process.Start(fiInf.FullName);
                    };
                }
            }

            // Transition.run(spaceForIcons, "Visible", false, true, new TransitionType_EaseInEaseOut(150));
            spaceForIcons.Visible = true;
        }
コード例 #5
0
        private void goGenerateTilesFriendship()
        {
            String pathPlease = @"C:\ProjectSnowshoes\User\" + Properties.Settings.Default.username[Properties.Settings.Default.whoIsThisCrazyDoge] + @"\Apps";

            //String pathPlease = @"C:\Users\Robert\Apps";
            //String pathPlease = @"C:\ProgramData\Microsoft\Windows\Start Menu\Programs";

            for (int i = 0; i < Directory.GetFiles(pathPlease, "*.lnk", SearchOption.AllDirectories).Length; i++)
            {
                Panel app1Panel = new Panel();
                app1Panel.Width   = 120;
                app1Panel.Height  = 120;
                app1Panel.Padding = new Padding(30, 40, 30, 30);

                PictureBox app1 = new PictureBox();
                app1.SizeMode = PictureBoxSizeMode.Zoom;
                app1.Show();
                app1.BackColor = Color.Transparent;
                app1.Left      = 42;
                app1.Top       = 20;
                app1.Width     = 36;
                app1.Height    = 36;
                app1.Margin    = new Padding(0);

                app1Panel.Controls.Add(app1);

                FileInfo fiInf    = new FileInfo(Directory.GetFiles(pathPlease, "*.lnk", SearchOption.AllDirectories)[i]);
                String   fiInfStr = fiInf.Name;
                fiInfStr = fiInfStr.Split('.')[0];

                Label turnip = new Label();
                turnip.Show();
                turnip.BackColor    = Color.Transparent;
                turnip.AutoEllipsis = true;
                turnip.Left         = 10;
                turnip.Width        = 100;
                turnip.Height       = 50;
                turnip.Top          = 70;
                turnip.Font         = new System.Drawing.Font(Properties.Settings.Default.fontsOfScience[Properties.Settings.Default.whoIsThisCrazyDoge], 9);
                turnip.ForeColor    = Color.DimGray;
                turnip.TextAlign    = ContentAlignment.TopCenter;
                turnip.Text         = fiInfStr;

                IconManager areYouForRealRightNowLikeReallyRealVSWow = new IconManager();
                app1.Image = areYouForRealRightNowLikeReallyRealVSWow.icoExtReturner(fiInf.FullName, fiInfStr, false);


                DoubleBufferManipulation.SetDoubleBuffered(turnip);
                app1Panel.Controls.Add(turnip);

                app1.Click += (sender, args) =>
                {
                    System.Diagnostics.Process.Start(fiInf.FullName);
                };

                turnip.Click += (sender, args) =>
                {
                    System.Diagnostics.Process.Start(fiInf.FullName);
                };

                app1Panel.Click += (sender, args) =>
                {
                    System.Diagnostics.Process.Start(fiInf.FullName);
                };

                themAppsTho.Controls.Add(app1Panel);
            }
        }