Пример #1
0
        void CompleteInitialization()
        {
            B_IconPath = new FlatButton
            {
                Anchor       = AnchorStyles.None,
                AutoSizeMode = AutoSizeMode.GrowAndShrink,
                BackColor    = Color.FromArgb(36, 49, 64),
                BorderStyle  = BorderStyle.Auto,
                Cursor       = Cursors.Hand,
                Font         = new Font("Century Gothic", 12.75F, FontStyle.Bold),
                ForeColor    = Color.FromArgb(65, 71, 87),
                HueShade     = null,
                Image        = Properties.Resources.Icon_Search,
                Location     = new Point(727, 15),
                Name         = "B_IconPath",
                Size         = new Size(130, 35),
                SizeMode     = PictureBoxSizeMode.Zoom,
                TabIndex     = 101,
                Text         = "Browse"
            };
            B_IconPath.Click += new EventHandler(B_IconPath_Click);

            B_FolderPath = new FlatButton
            {
                Anchor       = AnchorStyles.None,
                AutoSizeMode = AutoSizeMode.GrowAndShrink,
                BackColor    = Color.FromArgb(36, 49, 64),
                BorderStyle  = BorderStyle.Auto,
                Cursor       = Cursors.Hand,
                Font         = new Font("Century Gothic", 12.75F, FontStyle.Bold),
                ForeColor    = Color.FromArgb(65, 71, 87),
                HueShade     = null,
                Image        = Properties.Resources.Icon_Search,
                Location     = new Point(727, 15),
                Name         = "B_FolderPath",
                Size         = new Size(130, 35),
                SizeMode     = PictureBoxSizeMode.Zoom,
                TabIndex     = 102,
                Text         = "Browse"
            };
            B_FolderPath.Click += new EventHandler(B_FolderPath_Click);

            B_Auto = new FlatButton
            {
                Anchor       = AnchorStyles.None,
                AutoSizeMode = AutoSizeMode.GrowAndShrink,
                BackColor    = Color.FromArgb(36, 49, 64),
                BorderStyle  = BorderStyle.Auto,
                Cursor       = Cursors.Hand,
                Font         = new Font("Century Gothic", 12.75F, FontStyle.Bold),
                ForeColor    = Color.FromArgb(65, 71, 87),
                HueShade     = null,
                Image        = Properties.Resources.Icon_Auto,
                Location     = new Point(727, 15),
                Name         = "B_FolderPath",
                Size         = new Size(175, 40),
                SizeMode     = PictureBoxSizeMode.Zoom,
                TabIndex     = 102,
                Text         = "Auto-Change"
            };
            B_Auto.Click += new EventHandler(B_Auto_Click);

            B_Change = new FlatButton
            {
                Anchor       = AnchorStyles.None,
                AutoSizeMode = AutoSizeMode.GrowAndShrink,
                BackColor    = Color.FromArgb(36, 49, 64),
                BorderStyle  = BorderStyle.Auto,
                Cursor       = Cursors.Hand,
                Font         = new Font("Century Gothic", 12.75F, FontStyle.Bold),
                ForeColor    = Color.FromArgb(65, 71, 87),
                HueShade     = null,
                Image        = Properties.Resources.Icon_Paint,
                Location     = new Point(727, 15),
                Name         = "B_FolderPath",
                Size         = new Size(175, 40),
                SizeMode     = PictureBoxSizeMode.Zoom,
                TabIndex     = 102,
                Text         = "Change Icons"
            };
            B_Change.Click += new EventHandler(B_Change_Click);

            B_Reset = new FlatButton
            {
                Anchor       = AnchorStyles.None,
                AutoSizeMode = AutoSizeMode.GrowAndShrink,
                BackColor    = Color.FromArgb(36, 49, 64),
                BorderStyle  = BorderStyle.Auto,
                Cursor       = Cursors.Hand,
                Font         = new Font("Century Gothic", 12.75F, FontStyle.Bold),
                ForeColor    = Color.FromArgb(65, 71, 87),
                HueShade     = null,
                Image        = Properties.Resources.Icon_Reset,
                Location     = new Point(727, 15),
                Name         = "B_FolderPath",
                Size         = new Size(175, 40),
                SizeMode     = PictureBoxSizeMode.Zoom,
                TabIndex     = 102,
                Text         = "Reset Icons"
            };
            B_Reset.Click += new EventHandler(B_Reset_Click);


            CB_Shortcuts = new MyCheckBox
            {
                Anchor        = AnchorStyles.Left,
                AutoSize      = true,
                AutoSizeMode  = AutoSizeMode.GrowAndShrink,
                Checked       = true,
                CheckedText   = "Include Shortcuts",
                Location      = new Point(3, 7),
                Name          = "CB_Shortcuts",
                Size          = new Size(122, 37),
                TabIndex      = 0,
                UncheckedText = "Exclude Shortcuts"
            };
            CB_Shortcuts.CheckChanged += new EventHandler(CB_Shortcuts_CheckChanged);

            CB_Folders = new MyCheckBox
            {
                Anchor        = AnchorStyles.Left,
                AutoSize      = true,
                AutoSizeMode  = AutoSizeMode.GrowAndShrink,
                Checked       = true,
                CheckedText   = "Include Folders",
                Location      = new Point(352, 7),
                Name          = "CB_Folders",
                Size          = new Size(122, 37),
                TabIndex      = 1,
                UncheckedText = "Exclude Folders"
            };
            CB_Folders.CheckChanged += new EventHandler(CB_Folders_CheckChanged);

            CB_IncSubs = new MyCheckBox
            {
                Anchor        = AnchorStyles.Left,
                AutoSize      = true,
                AutoSizeMode  = AutoSizeMode.GrowAndShrink,
                Checked       = true,
                CheckedText   = "Change Sub-Folders",
                Location      = new Point(3, 58),
                Name          = "CB_IncSubs",
                Size          = new Size(122, 37),
                TabIndex      = 2,
                UncheckedText = "Only Change Top Folder"
            };

            CB_DriveDependant = new MyCheckBox
            {
                Anchor        = AnchorStyles.Left,
                AutoSize      = true,
                AutoSizeMode  = AutoSizeMode.GrowAndShrink,
                Checked       = true,
                CheckedText   = "Local Drive Mode",
                Location      = new Point(352, 58),
                Name          = "CB_DriveDependant",
                Size          = new Size(122, 37),
                TabIndex      = 3,
                UncheckedText = "External Drive Mode"
            };

            CB_TurboMode = new MyCheckBox
            {
                Anchor        = AnchorStyles.Left,
                AutoSize      = true,
                AutoSizeMode  = AutoSizeMode.GrowAndShrink,
                Checked       = true,
                CheckedText   = "Turbo Mode",
                Location      = new Point(3, 110),
                Name          = "CB_TurboMode",
                Size          = new Size(122, 37),
                TabIndex      = 4,
                UncheckedText = "Normal Mode"
            };

            PB_Icon = new PictureBox
            {
                Cursor   = Cursors.Hand,
                Image    = Properties.Resources.Icon,
                Location = new Point(2, 2),
                Name     = "PB_Icon",
                Size     = new Size(28, 28),
                SizeMode = PictureBoxSizeMode.Zoom,
                TabIndex = 3,
                TabStop  = false
            };
            PB_Icon.Click += new EventHandler(PB_Icon_Click);

            B_Close = new PictureBox
            {
                Cursor   = Cursors.Hand,
                Image    = Properties.Resources.Circle,
                Location = new Point(57, 3),
                Name     = "B_Close",
                Size     = new Size(22, 22),
                SizeMode = PictureBoxSizeMode.Zoom,
                TabIndex = 5,
                TabStop  = false
            };
            B_Close.Click += new EventHandler(B_Close_Click);

            B_Max = new PictureBox
            {
                Cursor   = Cursors.Hand,
                Image    = Properties.Resources.Circle,
                Location = new Point(30, 3),
                Name     = "B_Max",
                Size     = new Size(22, 22),
                SizeMode = PictureBoxSizeMode.Zoom,
                TabIndex = 4,
                TabStop  = false
            };
            B_Max.Click += new EventHandler(B_Max_Click);

            B_Min = new PictureBox
            {
                Cursor   = Cursors.Hand,
                Image    = Properties.Resources.Circle,
                Location = new Point(3, 3),
                Name     = "B_Min",
                Size     = new Size(22, 22),
                SizeMode = PictureBoxSizeMode.Zoom,
                TabIndex = 3,
                TabStop  = false
            };
            B_Min.Click += new EventHandler(B_Min_Click);

            P_WindowControls.Controls.Add(B_Close);
            P_WindowControls.Controls.Add(B_Max);
            P_WindowControls.Controls.Add(B_Min);
            TLP_5.Controls.Add(B_Reset, 0, 0);
            TLP_5.Controls.Add(B_Auto, 1, 0);
            TLP_5.Controls.Add(B_Change, 2, 0);
            P_Title.Controls.Add(PB_Icon);
            TLP_1.Controls.Add(B_IconPath, 2, 0);
            TLP_2.Controls.Add(B_FolderPath, 2, 0);
            TLP_CheckBoxes.Controls.Add(CB_TurboMode, 0, 2);
            TLP_CheckBoxes.Controls.Add(CB_DriveDependant, 1, 1);
            TLP_CheckBoxes.Controls.Add(CB_IncSubs, 0, 1);
            TLP_CheckBoxes.Controls.Add(CB_Folders, 1, 0);
            TLP_CheckBoxes.Controls.Add(CB_Shortcuts, 0, 0);
            PB_Icon.BringToFront();
        }