本文整理汇总了C#中Microsoft.Win32.UserPreferenceChangedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# UserPreferenceChangedEventArgs类的具体用法?C# UserPreferenceChangedEventArgs怎么用?C# UserPreferenceChangedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UserPreferenceChangedEventArgs类属于Microsoft.Win32命名空间,在下文中一共展示了UserPreferenceChangedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SystemEvents_UserPreferenceChanged
private void SystemEvents_UserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
{
if (e.Category == UserPreferenceCategory.Window)
{
this.Font = SystemFonts.IconTitleFont;
}
}
示例2: SystemEvents_UserPreferenceChanged
void SystemEvents_UserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
{
if (e.Category == UserPreferenceCategory.Color)
{
this.OnSystemColorsChanged();
}
}
示例3: OnUserPreferenceChanged
private void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
{
if (((sender != null) && (e != null)) && (e.Category == UserPreferenceCategory.Accessibility))
{
this.OnPropertyChanged("HighContrast");
}
}
示例4: OnUserPreferenceChanged
private static void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
{
SetScheme();
if (e.Category == UserPreferenceCategory.Color)
{
colorFreshnessKey = new object();
}
}
示例5: SystemEvents_UserPreferenceChanged
void SystemEvents_UserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
{
// High contrast setting change is part of the Accessibility category.
if (e.Category == UserPreferenceCategory.Accessibility)
{
OnAccessibilityUserPreferencesChanged();
}
}
示例6: OnUserPreferenceChanged
private static void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
{
if ((e.Category == UserPreferenceCategory.Color) && (menuBarBrush != null))
{
menuBarBrush.Dispose();
menuBarBrush = null;
}
}
示例7: OnPreferenceChanged
protected void OnPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
{
// Are we using the default menu or a user defined value?
if (_defaultFont)
{
DefineFont(SystemInformation.MenuFont);
Recalculate();
Invalidate();
}
}
示例8: UserPreferenceChanged
private void UserPreferenceChanged(object sender, UserPreferenceChangedEventArgs pref) {
if (pref.Category == UserPreferenceCategory.Locale) {
// We need to recreate the monthcalendar handle when the locale changes, because
// the day names etc. are only updated on a handle recreate (comctl32 limitation).
//
RecreateHandle();
}
}
示例9: SystemEvents_UserPreferenceChanged
/// <summary>
/// Invoked when the user changes system preferences.
/// </summary>
/// <param name="sender">The sender of the event</param>
/// <param name="e">The event data</param>
private void SystemEvents_UserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
{
if (e.Category == UserPreferenceCategory.Locale)
{
CultureInfo.CurrentCulture.ClearCachedData();
RefreshStrings();
}
}
示例10: OnUserPreferenceChanged
private void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
{
if (e.Category == UserPreferenceCategory.Desktop)
{
OnDisplaySettingsChanged(sender, e);
}
}
示例11: OnPreferenceChanged
protected void OnPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
{
if (_defaultBackColor)
{
_backColor = SystemColors.Control;
PropogateNameValue(PropogateName.BackColor, (object)SystemColors.Control);
}
if (_defaultActiveColor)
{
_activeColor = SystemColors.ActiveCaption;
PropogateNameValue(PropogateName.ActiveColor, (object)SystemColors.ActiveCaption);
}
if (_defaultActiveTextColor)
{
_activeTextColor = SystemColors.ActiveCaptionText;
PropogateNameValue(PropogateName.ActiveTextColor, (object)SystemColors.ActiveCaptionText);
}
if (_defaultInactiveTextColor)
{
_inactiveTextColor = SystemColors.ControlText;
PropogateNameValue(PropogateName.InactiveTextColor, (object)SystemColors.ControlText);
}
if (_defaultResizeBarColor)
{
_resizeBarColor = SystemColors.Control;
PropogateNameValue(PropogateName.ResizeBarColor, (object)SystemColors.Control);
}
if (_defaultCaptionFont)
{
_captionFont = SystemInformation.MenuFont;
PropogateNameValue(PropogateName.CaptionFont, (object)SystemInformation.MenuFont);
}
if (_defaultTabControlFont)
{
_tabControlFont = SystemInformation.MenuFont;
PropogateNameValue(PropogateName.TabControlFont, (object)SystemInformation.MenuFont);
}
}
示例12: OnUserPreferenceChanged
private void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
{
if (e.Category == UserPreferenceCategory.Color && !_customColors)
{
GetColorsFromSystem();
_customColors = false;
}
}
示例13: DesktopPreferenceChangedHandler
/// <summary>
/// Handler for UserPreferenceChangedEventArgs that updates the window display when the user modifies his or her desktop.
/// Note: This does not detect taskbar changes when the taskbar is set to auto-hide.
/// </summary>
/// <param name="sender">The source of the event. When this event is raised by the SystemEvents class, this object is always null.</param>
/// <param name="e">A UserPreferenceChangedEventArgs that contains the event data.</param>
private void DesktopPreferenceChangedHandler(object sender, UserPreferenceChangedEventArgs e)
{
if (e.Category == UserPreferenceCategory.Desktop)
this.UpdateWindowDisplayIfOpen(false);
}
示例14: OnUserPreferenceChanged
private void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
{
if (e.Category == UserPreferenceCategory.Color)
{
SetColor();
}
SetFonts();
}
示例15: OnUserPreferenceChanged
private void OnUserPreferenceChanged(Object sender, UserPreferenceChangedEventArgs e)
{
if (e.Category == UserPreferenceCategory.Color)
{
bool infoMode;
String newMessage = GetErrorMessage(out infoMode);
OnBackgroundImageChange(newMessage, infoMode);
}
}