Esempio n. 1
0
 /// <include file='doc\PropertySheet.uex' path='docs/doc[@for="LanguagePreferences.InitMachinePreferences"]/*' />
 public virtual void InitMachinePreferences(RegistryKey key, string name)
 {
     using (RegistryKey keyLanguage = key.OpenSubKey("languages\\language services\\" + name, false)) {
         if (keyLanguage != null)
         {
             this.EnableCodeSense          = GetBooleanValue(keyLanguage, "CodeSense", true);
             this.EnableMatchBraces        = GetBooleanValue(keyLanguage, "MatchBraces", true);
             this.EnableQuickInfo          = GetBooleanValue(keyLanguage, "QuickInfo", true);
             this.EnableShowMatchingBrace  = GetBooleanValue(keyLanguage, "ShowMatchingBrace", true);
             this.EnableMatchBracesAtCaret = GetBooleanValue(keyLanguage, "MatchBracesAtCaret", true);
             this.MaxErrorMessages         = GetIntegerValue(keyLanguage, "MaxErrorMessages", 10);
             this.CodeSenseDelay           = GetIntegerValue(keyLanguage, "CodeSenseDelay", 1000);
             this.EnableAsyncCompletion    = GetBooleanValue(keyLanguage, "EnableAsyncCompletion", true);
             this.EnableFormatSelection    = GetBooleanValue(keyLanguage, "EnableFormatSelection", false);
             this.EnableCommenting         = GetBooleanValue(keyLanguage, "EnableCommenting", true);
             this.AutoOutlining            = GetBooleanValue(keyLanguage, "AutoOutlining", true);
             this.MaxRegionTime            = GetIntegerValue(keyLanguage, "MaxRegionTime", 2000); // 2 seconds
             this.braceFlags = (_HighlightMatchingBraceFlags)GetIntegerValue(keyLanguage, "HighlightMatchingBraceFlags", (int)_HighlightMatchingBraceFlags.HMB_USERECTANGLEBRACES);
         }
     }
 }
Esempio n. 2
0
 public virtual void InitMachinePreferences(RegistryKey key, string name) {
     using (RegistryKey keyLanguage = key.OpenSubKey("languages\\language services\\" + name, false)) {
         if (keyLanguage != null) {
             this.EnableCodeSense = GetBooleanValue(keyLanguage, "CodeSense", true);
             this.EnableMatchBraces = GetBooleanValue(keyLanguage, "MatchBraces", true);
             this.EnableQuickInfo = GetBooleanValue(keyLanguage, "QuickInfo", true);
             this.EnableShowMatchingBrace = GetBooleanValue(keyLanguage, "ShowMatchingBrace", true);
             this.EnableMatchBracesAtCaret = GetBooleanValue(keyLanguage, "MatchBracesAtCaret", true);
             this.MaxErrorMessages = GetIntegerValue(keyLanguage, "MaxErrorMessages", 10);
             this.CodeSenseDelay = GetIntegerValue(keyLanguage, "CodeSenseDelay", 1000);
             this.EnableAsyncCompletion = GetBooleanValue(keyLanguage, "EnableAsyncCompletion", true);
             this.EnableFormatSelection = GetBooleanValue(keyLanguage, "EnableFormatSelection", false);
             this.EnableCommenting = GetBooleanValue(keyLanguage, "EnableCommenting", true);
             this.AutoOutlining = GetBooleanValue(keyLanguage, "AutoOutlining", true);
             this.MaxRegionTime = GetIntegerValue(keyLanguage, "MaxRegionTime", 2000); // 2 seconds
             this.braceFlags = (_HighlightMatchingBraceFlags)GetIntegerValue(keyLanguage, "HighlightMatchingBraceFlags", (int)_HighlightMatchingBraceFlags.HMB_USERECTANGLEBRACES);
         }
     }
 }