コード例 #1
0
		public void OnUserPreferencesChanged(
			VIEWPREFERENCES[] pViewPrefs,
			FRAMEPREFERENCES[] pFramePrefs,
			LANGPREFERENCES[] pLangPrefs,
			FONTCOLORPREFERENCES[] pColorPrefs)
		{
			try
			{
				
				Setup();

				//if (pColorPrefs != null && pColorPrefs.Length > 0 && pColorPrefs[0].pColorTable != null)
				//{
				//	var guidFontCategory = (Guid)Marshal.PtrToStructure(pColorPrefs[0].pguidFontCategory, typeof(Guid));
				//	var guidColorService = (Guid)Marshal.PtrToStructure(pColorPrefs[0].pguidColorService, typeof(Guid));
				//	if (_guidColorService == Guid.Empty)
				//	{
				//		_guidColorService = guidColorService;
				//	}
				//	if (guidFontCategory == DefGuidList.guidTextEditorFontCategory && _guidColorService == guidColorService)
				//	{
				//		Setup();
				//	}
				//}

			}
			catch (Exception ex)
			{
				//Do Nothing
			}
		}
コード例 #2
0
        public void OnUserPreferencesChanged(
            VIEWPREFERENCES[] pViewPrefs,
            FRAMEPREFERENCES[] pFramePrefs,
            LANGPREFERENCES[] pLangPrefs,
            FONTCOLORPREFERENCES[] pColorPrefs)
        {
            if (pColorPrefs != null && pColorPrefs.Length > 0 && pColorPrefs[0].pColorTable != null)
            {
                var guidFontCategory = (Guid) Marshal.PtrToStructure(pColorPrefs[0].pguidFontCategory, typeof(Guid));
                var guidColorService = (Guid) Marshal.PtrToStructure(pColorPrefs[0].pguidColorService, typeof(Guid));

                if (_guidColorService == Guid.Empty)
                    _guidColorService = guidColorService;

                if (guidFontCategory == DefGuidList.guidTextEditorFontCategory && _guidColorService == guidColorService)
                    FontAndColorStorage.UpdateColors();
            }
        }
コード例 #3
0
 public void OnUserPreferencesChanged(VIEWPREFERENCES[] pViewPrefs, FRAMEPREFERENCES[] pFramePrefs, LANGPREFERENCES[] pLangPrefs, FONTCOLORPREFERENCES[] pColorPrefs) {
 }
コード例 #4
0
 public int SetUserPreferences(VIEWPREFERENCES[] pViewPrefs, FRAMEPREFERENCES[] pFramePrefs, LANGPREFERENCES[] pLangPrefs, FONTCOLORPREFERENCES[] pColorPrefs)
 {
     throw new Exception("The method or operation is not implemented.");
 }
コード例 #5
0
 public void OnUserPreferencesChanged(VIEWPREFERENCES[] pViewPrefs, FRAMEPREFERENCES[] pFramePrefs, LANGPREFERENCES[] pLangPrefs, FONTCOLORPREFERENCES[] pColorPrefs)
 {
     var handler = UserPreferencesChanged;
     if (handler != null)
     {
         handler(this, EventArgs.Empty);
     }
 }