示例#1
0
文件: RAMInfo.cs 项目: Phoshi/TWiME
        public RAMInfo(Bar parent)
        {
            _background = new SolidBrush(
                Color.FromName(Manager.settings.ReadSettingOrDefault("Black", "General.Bar.UnselectedBackgroundColour")));
            _foreground = new SolidBrush(
                Color.FromName(Manager.settings.ReadSettingOrDefault("LightGray", "General.Bar.SelectedForeground")));

            _font = parent.TitleFont;
            _height = parent.BarHeight;
        }
示例#2
0
        public ProcessorInfo(Bar parent)
        {
            _background = new SolidBrush(
                Color.FromName(Manager.settings.ReadSettingOrDefault("Black", "General.Bar.UnselectedBackgroundColour")));
            _foreground = new SolidBrush(
                Color.FromName(Manager.settings.ReadSettingOrDefault("LightGray", "General.Bar.SelectedForeground")));

            _cpuCounter = new PerformanceCounter();
            _cpuCounter.CategoryName = "Processor";
            _cpuCounter.CounterName = "% Processor Time";
            _cpuCounter.InstanceName = "_Total";

            _font = parent.TitleFont;
            _height = parent.BarHeight;
        }
示例#3
0
文件: Monitor.cs 项目: Phoshi/TWiME
 private void createBar()
 {
     Bar = new Bar(this);
     Bar.Show();
 }