public Settings() { InitializeComponent(); AnchorLables = new DSkinLabel[] { dSkinLabel_General, dSkinLabel_Play, dSkinLabel_Volumn, dSkinLabel_Video, dSkinLabel_Subtitle, dSkinLabel_Association, dSkinLabel_BackGround, dSkinLabel_ScreenShot, dSkinLabel_Donate, dSkinLabel_Update, dSkinLabel_Other }; TrackBars = new DSkinTrackBar[] { dSkinTrackBar_BackColorOpacity, dSkinTrackBar_BackImageOpacity, dSkinTrackBar_MainFrmOpacity, dSkinTrackBar_Brightness, dSkinTrackBar_Contrast, dSkinTrackBar_Hue, dSkinTrackBar_HumanVolumn, dSkinTrackBar_Saturation, dSkinTrackBar_SoundBalance }; DSkinCheckBox[] dcb = new DSkinCheckBox[] { dSkinCheckBox_CreateShortcutToDesktop, dSkinCheckBox_EnableDWM, dSkinCheckBox_EnhanceImageQuality, dSkinCheckBox_ImageFuzzy, dSkinCheckBox_LockToTaskbar, dSkinCheckBox_PauseWhileMinimize, dSkinCheckBox_ShowScreenShotWindow, dSkinCheckBox_UnifyDiffVolumn, dSkinCheckBox_IncludeSubDir, dSkinCheckBox_ControlFrmTransparent, dSkinCheckBox_AutoMatchNetSubtitle, dSkinCheckBox_AutoMatchLocalSubtitle, dSkinCheckBox_AutoHideTitleAndControlPanel, dSkinCheckBox_ShowAdOnceMore }; for (int i = 1; i <= 114; i++) { string str_ControlName = "dSkinCheckBox" + i.ToString(); DSkinCheckBox cb = (DSkinCheckBox)this.dSkinPanel_LinkFile.Controls.Find(str_ControlName, false)[0]; CheckBoxs.Add(cb); } CheckBoxs.AddRange(dcb); duiScrollBar_LinkFile.ValueChanged += new System.EventHandler(this.duiScrollBar_LinkFile_ValueChanged); }
public void SetFocusColor() { DSkinTextureBrush dbrush = new DSkinTextureBrush(); dbrush.Brush = new SolidBrush(mainfrm.FocusColor); foreach (Control ctl in this.Controls) { if (ctl is DSkinTrackBar) { DSkinTrackBar tb = (DSkinTrackBar)ctl; tb.PointButtonNormalColor = tb.PointButtonHoverColor = tb.PointButtonBorderColor = mainfrm.FocusColor; tb.MainLineBrushUp = dbrush; } else if (ctl is DSkinButton) { DSkinButton bt = (DSkinButton)ctl; bt.PressColor = bt.PressColor = bt.PressColor = bt.PressColor = bt.PressColor = mainfrm.FocusColor; bt.HoverColor = bt.HoverColor = bt.HoverColor = bt.HoverColor = bt.HoverColor = mainfrm.FocusColor; } } }