public void Save(IConfigurationObject value) { value.SetProperty("ViewMode", (object)this.ViewMode, (object)ViewMode.Design); value.SetProperty("IsVerticalSplit", (object)(bool)(this.IsVerticalSplit ? true : false), (object)true); value.SetProperty("IsDesignOnTop", (object)(bool)(this.IsDesignOnTop ? true : false), (object)true); value.SetProperty("SplitRatio", (object)this.SplitRatio, (object)0.8); }
public void Save(IConfigurationObject value) { value.SetProperty(string.Concat(this.prefix, "ConvertTabsToSpace"), this.ConvertTabsToSpace, false); value.SetProperty(string.Concat(this.prefix, "TabSize"), this.TabSize, 4); value.SetProperty(string.Concat(this.prefix, "FontFamily"), this.UnescapedFontFamily, EditorSpecificOptionsModel.GetDefaultFont()); value.SetProperty(string.Concat(this.prefix, "FontSize"), this.FontSize, 10); value.SetProperty(string.Concat(this.prefix, "WordWrap"), this.WordWrap, false); }
public void Save(IConfigurationObject value) { if (value != null) { value.SetProperty(ProjectSystemOptionsModel.NameInteractiveElementsByDefaultProperty, this.NameInteractiveElementsByDefault); value.SetProperty(ProjectSystemOptionsModel.ShowSecurityWarningProperty, this.ShowSecurityWarning); value.SetProperty(ProjectSystemOptionsModel.UseVisualStudioEventHandlerSupportProperty, this.UseVisualStudioEventHandlerSupport); value.SetProperty(ProjectSystemOptionsModel.LargeImageWarningThresholdProperty, this.LargeImageWarningThreshold); } }
private IConfigurationObject GetConfigurationForProject(INamedProject project) { IConfigurationObject configurationObject; string relativeReference = this.GetRelativeReference(project); IEnumerator enumerator = this.projectConfigs.GetEnumerator(); try { while (enumerator.MoveNext()) { IConfigurationObject current = (IConfigurationObject)enumerator.Current; if (string.CompareOrdinal(relativeReference, current.GetPropertyOrDefault <string>(SolutionSettingsManager.RelativeReference).ToUpperInvariant()) != 0) { continue; } configurationObject = current; return(configurationObject); } IConfigurationObject configurationObject1 = this.configObject.CreateConfigurationObject(); configurationObject1.SetProperty(SolutionSettingsManager.RelativeReference, relativeReference); this.projectConfigs.Add(configurationObject1); return(configurationObject1); } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } return(configurationObject); }
public static MessageBoxResult ShowSuppressibleWarning(this IServiceProvider source, MessageBoxArgs args, string optionIdentifier, MessageBoxResult suppressedResult, IConfigurationObject configObject) { bool flag = (configObject != null ? (bool)configObject.GetProperty(optionIdentifier, false) : false); if (flag) { return(suppressedResult); } MessageBoxResult messageBoxResult = source.MessageDisplayService().ShowMessage(args, out flag); if (flag && configObject != null) { configObject.SetProperty(optionIdentifier, true); } return(messageBoxResult); }
public void WriteToConfiguration(IConfigurationObject configurationObject) { for (int index = 0; index < this.Items.Count; ++index) { ExpandoListItemModel expandoListItemModel = this.Items[index] as ExpandoListItemModel; if (expandoListItemModel != null) { IConfigurationObject configurationObject1 = (IConfigurationObject)configurationObject.GetProperty(expandoListItemModel.Identifier); if (configurationObject1 == null) { configurationObject1 = configurationObject.CreateConfigurationObject(); configurationObject.SetProperty(expandoListItemModel.Identifier, (object)configurationObject1); } expandoListItemModel.WriteToConfiguration(configurationObject1); } } }
public static T GetOrCreateProperty <T>(this IConfigurationObject configurationObject, string propertyName, Func <T> propertyConstructor) where T : class { T property; if (propertyConstructor == null) { throw new ArgumentNullException("propertyConstructor"); } if (configurationObject.HasProperty(propertyName)) { property = (T)(configurationObject.GetProperty(propertyName) as T); if (property != null) { return(property); } } property = propertyConstructor(); configurationObject.SetProperty(propertyName, property); return(property); }
private IConfigurationObject GetConfigurationObject() { IConfigurationObject solutionSettings = this.Solution.SolutionSettingsManager.SolutionSettings; IConfigurationObjectCollection orCreateConfigurationObjectCollectionProperty = solutionSettings.GetOrCreateConfigurationObjectCollectionProperty(ProjectConverterBase.SuoUpgraderCollection); IConfigurationObject configurationObject = null; foreach (IConfigurationObject configurationObject1 in orCreateConfigurationObjectCollectionProperty) { if (string.CompareOrdinal(this.Identifier, configurationObject1.GetPropertyOrDefault <string>(ProjectConverterBase.SuoUpgraderIdentifier)) != 0) { continue; } configurationObject = configurationObject1; break; } if (configurationObject == null) { configurationObject = solutionSettings.CreateConfigurationObject(); configurationObject.SetProperty(ProjectConverterBase.SuoUpgraderIdentifier, this.Identifier); orCreateConfigurationObjectCollectionProperty.Add(configurationObject); } return(configurationObject); }
public void Save(IConfigurationObject value) { value.SetProperty("UnitType", (object)this.UnitType, (object)UnitType.Points); }
public void Save(IConfigurationObject value) { value.SetProperty("LastSelectedIndex", (object)this.LastSelectedEditor); this.xamlOptions.Save(value); this.codeOptions.Save(value); }
public void LoadMaintainingSelection(IConfigurationObject value) { value.SetProperty("LastSelectedIndex", (object)this.LastSelectedEditor); this.LoadCore(value); }
public void WriteToConfiguration(IConfigurationObject configurationObject) { configurationObject.SetProperty("Size", this.Size, GridLength.Auto); configurationObject.SetProperty("IsExpanded", this.IsExpanded, true); }
public void Save(IConfigurationObject config) { config.SetProperty("ShowAnnotations", (object)(bool)(this.ShowAnnotations ? true : false)); config.SetProperty("AuthorName", (object)this.AuthorName); config.SetProperty("AuthorInitials", (object)this.AuthorInitials); }
/// <summary> /// </summary> public void Save(IConfigurationObject value) { value.SetProperty("ConvertTabsToSpace", this.ConvertTabsToSpace, false); value.SetProperty("TabSize", this.TabSize, 4); }
public static void PromptUserForMissingSdk(IServices services) { IConfigurationObject item = services.GetService <IConfigurationService>()["BlendSDK"]; var variable = new < > f__AnonymousType2 <int, FrameworkName[], string, string, string, string> [3]; FrameworkName[] wpf35 = new FrameworkName[] { BlendSdkHelper.Wpf35, BlendSdkHelper.Silverlight3 }; variable[0] = new { SDKVersion = 3, SupportedPlatforms = wpf35, HyperlinkUri = "http://go.microsoft.com/fwlink/?LinkId=139656", SupressDialogPropertyName = "HideInstallSDKDialog", Message = StringTable.Blend3SdkUnavailable, HyperlinkMessage = StringTable.InstallBlend3SdkLink }; FrameworkName[] wpf4 = new FrameworkName[] { BlendSdkHelper.Wpf4 }; variable[1] = new { SDKVersion = 4, SupportedPlatforms = wpf4, HyperlinkUri = "http://go.microsoft.com/fwlink/?LinkId=183399", SupressDialogPropertyName = "HideInstall.NETFrameworkSDK4Dialog", Message = StringTable.Blend4SdkUnavailable, HyperlinkMessage = StringTable.InstallBlend4SdkLink }; FrameworkName[] silverlight4 = new FrameworkName[] { BlendSdkHelper.Silverlight4 }; variable[2] = new { SDKVersion = 4, SupportedPlatforms = silverlight4, HyperlinkUri = "http://go.microsoft.com/fwlink/?LinkId=183400", SupressDialogPropertyName = "HideInstallSilverlightSDK4Dialog", Message = StringTable.Blend4SdkUnavailable, HyperlinkMessage = StringTable.InstallBlend4SdkLink }; var variable1 = variable; for (int i = 0; i < (int)variable1.Length; i++) { var variable2 = variable1[i]; bool flag = true; FrameworkName[] supportedPlatforms = variable2.SupportedPlatforms; int num = 0; while (num < (int)supportedPlatforms.Length) { if (BlendSdkHelper.IsSdkInstalled(supportedPlatforms[num])) { num++; } else { flag = false; break; } } if (flag) { item.SetProperty(variable2.SupressDialogPropertyName, false); } else if (!BlendSdkHelper.ShouldDialogBeHidden(services, variable2.SupressDialogPropertyName)) { bool flag1 = false; string friendlyFrameworkName = BlendSdkHelper.GetFriendlyFrameworkName(variable2.SupportedPlatforms[0]); CultureInfo currentCulture = CultureInfo.CurrentCulture; string message = variable2.Message; object[] sDKVersion = new object[] { variable2.SDKVersion, friendlyFrameworkName }; string str = string.Format(currentCulture, message, sDKVersion); CultureInfo cultureInfo = CultureInfo.CurrentCulture; string hyperlinkMessage = variable2.HyperlinkMessage; object[] objArray = new object[] { variable2.SDKVersion, friendlyFrameworkName }; string str1 = string.Format(cultureInfo, hyperlinkMessage, objArray); MessageBoxArgs messageBoxArg = new MessageBoxArgs() { Message = str, Button = MessageBoxButton.OK, Image = MessageBoxImage.Exclamation, AutomationId = "BlendSdkDialog", HyperlinkMessage = str1, HyperlinkUri = new Uri(variable2.HyperlinkUri) }; if (services.GetService <IMessageDisplayService>().ShowMessage(messageBoxArg, out flag1) == MessageBoxResult.OK) { item.SetProperty(variable2.SupressDialogPropertyName, flag1); } } } }