示例#1
0
 public ColourSchemeSelector(int index, MiscControl parent)
 {
     InitializeComponent();
     this.parent = parent;
     this.index = index;
     BackColor = Colours.COLOURS[index][0];
     ColTxt.ForeColor = Colours.COLOURS[index][3];
     ColBtn.BackColor = Colours.COLOURS[index][1];
     ColBtn.FlatAppearance.MouseOverBackColor = Colours.COLOURS[index][2];
     ColBtn.FlatAppearance.MouseDownBackColor = Colours.COLOURS[index][0];
     ColBtn.FlatAppearance.BorderColor = Colours.COLOURS[index][0];
     ColBtn.ForeColor = Colours.COLOURS[index][4];
 }
示例#2
0
文件: Form1.cs 项目: Kriogen777/Otil
        public Form1()
        {
            InitializeComponent();
            // Icon stuff
            using (Bitmap emptyImage = new Bitmap(1, 1))
            {
                SendMessage(this.Handle, WM_SETICON, ICON_SMALL, emptyImage.GetHicon());
            }
            iconDrawTimer.Elapsed += iconDrawTimer_Elapsed;
            iconDrawTimer.Start();

            ContentPanel.Controls.Add(SysCon);
            ContentPanel.Controls.Add(CPUSimpleCon);
            ContentPanel.Controls.Add(GPUCon);
            ContentPanel.Controls.Add(RAMCon);
            ContentPanel.Controls.Add(HDDsCon);
            ContentPanel.Controls.Add(NetCon);
            ContentPanel.Controls.Add(ProcessesCon);
            ContentPanel.Controls.Add(ServicesCon);
            ContentPanel.Controls.Add(StartupCon);
            MiscCon = new MiscControl(this);
            ContentPanel.Controls.Add(MiscCon);

            SummaryPanel.Controls.Add(SysSum);
            SummaryPanel.Controls.Add(CPUSum);
            SummaryPanel.Controls.Add(GPUSum);
            SummaryPanel.Controls.Add(RAMSum);
            SummaryPanel.Controls.Add(NETSum);
            AddControlsToSummary();

            StartPosition = FormStartPosition.CenterScreen;
            try
            {
                PageIndex = (int)AIOSystemUtility3.Properties.Settings.Default["SELECTED_PAGE"];
            }
            catch (System.Configuration.ConfigurationErrorsException ex)
            {
                Console.WriteLine(ex);
                PageIndex = 0;
            }

            SwitchControls(PageIndex);

            Console.WriteLine("=============== NOW LET THE STORY BEGIN ===============");
        }