• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Win32.UserPreferenceChangedEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Microsoft.Win32.UserPreferenceChangedEventArgs的典型用法代码示例。如果您正苦于以下问题:C# UserPreferenceChangedEventArgs类的具体用法?C# UserPreferenceChangedEventArgs怎么用?C# UserPreferenceChangedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UserPreferenceChangedEventArgs类属于Microsoft.Win32命名空间,在下文中一共展示了UserPreferenceChangedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SystemEvents_UserPreferenceChanged

 private void SystemEvents_UserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
 {
     if (e.Category == UserPreferenceCategory.Window)
     {
         this.Font = SystemFonts.IconTitleFont;
     }
 }
开发者ID:ehershey,项目名称:development,代码行数:7,代码来源:Form1.cs


示例2: SystemEvents_UserPreferenceChanged

 void SystemEvents_UserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
 {
     if (e.Category == UserPreferenceCategory.Color)
     {
         this.OnSystemColorsChanged();
     }
 }
开发者ID:viticm,项目名称:pap2,代码行数:7,代码来源:DiscoverRenderBase.cs


示例3: OnUserPreferenceChanged

 private void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
 {
     if (((sender != null) && (e != null)) && (e.Category == UserPreferenceCategory.Accessibility))
     {
         this.OnPropertyChanged("HighContrast");
     }
 }
开发者ID:netonjm,项目名称:WindowsPhone,代码行数:7,代码来源:SystemParametersProxy.cs


示例4: OnUserPreferenceChanged

 private static void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
 {
     SetScheme();
     if (e.Category == UserPreferenceCategory.Color)
     {
         colorFreshnessKey = new object();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:ProfessionalColors.cs


示例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();
     }
 }
开发者ID:gmilazzoitag,项目名称:OpenLiveWriter,代码行数:8,代码来源:UserPreferencesMonitor.cs


示例6: OnUserPreferenceChanged

 private static void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
 {
     if ((e.Category == UserPreferenceCategory.Color) && (menuBarBrush != null))
     {
         menuBarBrush.Dispose();
         menuBarBrush = null;
     }
 }
开发者ID:ikvm,项目名称:webmatrix,代码行数:8,代码来源:MxTheme.cs


示例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();
            }
        }
开发者ID:uvbs,项目名称:Holodeck,代码行数:11,代码来源:MenuControl.cs


示例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();
     }
 }
开发者ID:JianwenSun,项目名称:cc,代码行数:8,代码来源:DateTimePicker.cs


示例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();
     }
 }
开发者ID:Erls-Corporation,项目名称:YAMA,代码行数:13,代码来源:MainWindow.xaml.cs


示例10: OnUserPreferenceChanged

 private void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
 {
     if (e.Category == UserPreferenceCategory.Desktop)
     {
         OnDisplaySettingsChanged(sender, e);
     }
 }
开发者ID:ryguasu,项目名称:windawesome,代码行数:7,代码来源:Windawesome.cs


示例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);
            }
        }
开发者ID:uvbs,项目名称:Holodeck,代码行数:44,代码来源:DockingManager.cs


示例12: OnUserPreferenceChanged

 private void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
 {
     if (e.Category == UserPreferenceCategory.Color && !_customColors)
     {
         GetColorsFromSystem();
         _customColors = false;
     }
 }
开发者ID:javagg,项目名称:DemoDock,代码行数:8,代码来源:RendererBase.cs


示例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);
 }
开发者ID:poros,项目名称:whereless,代码行数:11,代码来源:SmallWindow.xaml.cs


示例14: OnUserPreferenceChanged

        private void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
        {
            if (e.Category == UserPreferenceCategory.Color)
            {
                SetColor();
            }

            SetFonts();
        }
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:9,代码来源:TreeGridDesignerToolWindow.cs


示例15: OnUserPreferenceChanged

 private void OnUserPreferenceChanged(Object sender, UserPreferenceChangedEventArgs e)
 {
     if (e.Category == UserPreferenceCategory.Color)
     {
         bool infoMode;
         String newMessage = GetErrorMessage(out infoMode);
         OnBackgroundImageChange(newMessage, infoMode);
     }            
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:9,代码来源:FormDesigner.cs


示例16: OnUserPreferenceChanged

        private void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
        {
            if (e.Category == UserPreferenceCategory.Color)
            {
                SystemEvents.UserPreferenceChanged -= OnUserPreferenceChanged;

                // recreate button image, required to support high contrast
                var editStyle = UITypeEditorEditStyle.DropDown;

                if (_uiTypeEditor != null)
                {
                    editStyle = _uiTypeEditor.GetEditStyle();
                }

                var oldImage = _button.Image;

                if (oldImage != null)
                {
                    try
                    {
                        if (editStyle == UITypeEditorEditStyle.DropDown)
                        {
                            _button.Image = CreateArrowBitmap();
                        }
                        else if (editStyle == UITypeEditorEditStyle.Modal)
                        {
                            _button.Image = CreateDotDotDotBitmap();
                        }
                    }
                    finally
                    {
                        oldImage.Dispose();
                    }
                }
            }
        }
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:36,代码来源:DropDownControl.cs


示例17: UserPreferenceChanged

 private void UserPreferenceChanged(object sender, UserPreferenceChangedEventArgs pref)
 {
     if (pref.Category == UserPreferenceCategory.Locale)
     {
         this.UpdateEditText();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:UpDownBase.cs


示例18: OnUserPreferenceChanged

 private void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
 {
     if (e.Category == UserPreferenceCategory.Color ||
         e.Category == UserPreferenceCategory.Locale ||
         e.Category == UserPreferenceCategory.General ||
         e.Category == UserPreferenceCategory.Window ||
         e.Category == UserPreferenceCategory.VisualStyle)
     {
         OnGlobalAutoSize();
         if (e.Category == UserPreferenceCategory.Window)
         {
             this.cachedEditingControl = null;
             if (this.editingControl != null)
             {
                 // The editing control may not adapt well to the new system rendering,
                 // so instead of caching it into the this.cachedEditingControl variable
                 // next time editing mode is exited, simply discard the control.
                 this.dataGridViewState2[DATAGRIDVIEWSTATE2_discardEditingControl] = true;
             }
             PerformLayoutPrivate(false /*useRowShortcut*/, false /*computeVisibleRows*/, false /*invalidInAdjustFillingColumns*/, true /*repositionEditingControl*/);
         }
     }
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:23,代码来源:DataGridViewMethods.cs


示例19: OnSysColorChange

 private void OnSysColorChange(object sender, UserPreferenceChangedEventArgs e) {
     if (e.Category == UserPreferenceCategory.Color || e.Category == UserPreferenceCategory.Accessibility) {
         SetFlag(FlagNeedUpdateUIBasedOnFont, true);
     }
 }
开发者ID:mind0n,项目名称:hive,代码行数:5,代码来源:PropertyGridView.cs


示例20: OnUserPreferenceChanged

 private static void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
 {
     // Update fonts to reflect any change in system settings
     DefineFonts();
 }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:5,代码来源:KryptonColorTable2007.cs



注:本文中的Microsoft.Win32.UserPreferenceChangedEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Win32.Win32Native类代码示例发布时间:2022-05-26
下一篇:
C# Win32.SaveFileDialog类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap