public SystemWatcherControl() { Options opt = TaskbarMonitor.Options.ReadFromDisk(); GraphTheme theme = GraphTheme.ReadFromDisk(); Initialize(opt, theme); }
private GraphTheme GetTheme(Options opt) { GraphTheme theme = GraphTheme.DefaultDarkTheme(); if (opt.ThemeType == Options.ThemeList.LIGHT) { theme = GraphTheme.DefaultLightTheme(); } else if (opt.ThemeType == Options.ThemeList.CUSTOM) { theme = GraphTheme.ReadFromDisk(); } else if (opt.ThemeType == Options.ThemeList.AUTOMATIC) { Color taskBarColour = BLL.Win32Api.GetColourAt(BLL.Win32Api.GetTaskbarPosition().Location); if (taskBarColour.R + taskBarColour.G + taskBarColour.B > 382) { theme = GraphTheme.DefaultLightTheme(); } else { theme = GraphTheme.DefaultDarkTheme(); } } return(theme); }
public Deskband() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Options opt = TaskbarMonitor.Options.ReadFromDisk(); GraphTheme theme = GraphTheme.ReadFromDisk(); var ctl = new SystemWatcherControl(opt, theme); Options.MinHorizontalSize = new Size((ctl.Options.HistorySize + 10) * ctl.CountersCount, 30); ctl.OnChangeSize += Ctl_OnChangeSize; _control = ctl; }