当前位置: 首页>>代码示例>>C#>>正文


C# ISettingsSection.CreateSection方法代码示例

本文整理汇总了C#中ISettingsSection.CreateSection方法的典型用法代码示例。如果您正苦于以下问题:C# ISettingsSection.CreateSection方法的具体用法?C# ISettingsSection.CreateSection怎么用?C# ISettingsSection.CreateSection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISettingsSection的用法示例。


在下文中一共展示了ISettingsSection.CreateSection方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Serialize

		public static void Serialize(ISettingsSection section, StackedContentState state) {
			section.Attribute(ISHORIZONTAL_ATTR, state.IsHorizontal);
			foreach (var length in state.RowsCols) {
				var lengthSect = section.CreateSection(LENGTH_SECTION);
				lengthSect.Attribute(LENGTH_ATTR, length);
			}
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:7,代码来源:StackedContentState.cs

示例2: Save

		public void Save(ISettingsSection section) {
			section.Attribute(NAME_ATTR, Name);
			section.Attribute(INDEX_ATTR, Index);
			section.Attribute(ISHORIZONTAL_ATTR, IsHorizontal);

			if (StackedContentState != null)
				StackedContentStateSerializer.Serialize(section.GetOrCreateSection(STACKEDCONTENTSTATE_SECTION), StackedContentState);

			foreach (var stg in TabGroups)
				stg.Save(section.CreateSection(TABGROUP_SECTION));
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:11,代码来源:SerializedTabs.cs

示例3: ReadSection

		void ReadSection(XElement xml, ISettingsSection section, int recursionCounter) {
			if (recursionCounter >= XmlSettingsConstants.MAX_CHILD_DEPTH)
				return;

			foreach (var xmlAttr in xml.Attributes()) {
				var attrName = xmlAttr.Name.LocalName;
				if (attrName == XmlSettingsConstants.SECTION_ATTRIBUTE_NAME)
					continue;
				section.Attribute(attrName, XmlUtils.UnescapeAttributeValue(xmlAttr.Value));
			}

			foreach (var xmlSect in xml.Elements(XmlSettingsConstants.SECTION_NAME)) {
				var name = XmlUtils.UnescapeAttributeValue((string)xmlSect.Attribute(XmlSettingsConstants.SECTION_ATTRIBUTE_NAME));
				if (name == null)
					continue;
				var childSection = section.CreateSection(name);
				ReadSection(xmlSect, childSection, recursionCounter + 1);
			}
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:19,代码来源:XmlSettingsReader.cs

示例4: Serialize

 public static void Serialize(ISettingsSection section, ToolWindowUIState state)
 {
     section.Attribute(LOCATION_ATTR, state.Location);
     section.Attribute(INDEX_ATTR, state.Index);
     section.Attribute(ISHORIZONTAL_ATTR, state.IsHorizontal);
     foreach (var content in state.Groups)
         ToolWindowGroupState.Serialize(section.CreateSection(GROUP_SECT), content);
     Debug.Assert(state.StackedContentState != null);
     if (state.StackedContentState != null)
         StackedContentStateSerializer.Serialize(section.GetOrCreateSection(STACKEDCONTENTSTATE_SECTION), state.StackedContentState);
 }
开发者ID:n017,项目名称:dnSpy,代码行数:11,代码来源:MainWindowControl.cs

示例5: Write

 public void Write(ISettingsSection section)
 {
     Debug.Assert(HorizontalContentState != null && VerticalContentState != null);
     if (HorizontalContentState != null)
         StackedContentStateSerializer.Serialize(section.GetOrCreateSection(HORIZONTALCONTENT_SECT), HorizontalContentState);
     if (VerticalContentState != null)
         StackedContentStateSerializer.Serialize(section.GetOrCreateSection(VERTICALCONTENT_SECT), VerticalContentState);
     Debug.Assert(LeftState != null && RightState != null && TopState != null && BottomState != null);
     if (LeftState != null)
         ToolWindowUIState.Serialize(section.CreateSection(TOOLWINDOWUI_SECT), LeftState);
     if (RightState != null)
         ToolWindowUIState.Serialize(section.CreateSection(TOOLWINDOWUI_SECT), RightState);
     if (TopState != null)
         ToolWindowUIState.Serialize(section.CreateSection(TOOLWINDOWUI_SECT), TopState);
     if (BottomState != null)
         ToolWindowUIState.Serialize(section.CreateSection(TOOLWINDOWUI_SECT), BottomState);
     foreach (var kv in SavedLocations) {
         var sect = section.CreateSection(LOCATION_SECT);
         sect.Attribute(LOCATION_GUID_ATTR, kv.Key);
         sect.Attribute(LOCATION_ATTR, kv.Value);
     }
 }
开发者ID:n017,项目名称:dnSpy,代码行数:22,代码来源:MainWindowControl.cs

示例6: Save

 public void Save(ISettingsSection section)
 {
     section.Attribute(CURRENT_LIST_ATTR, SelectedFileList.Name);
     foreach (var fileList in fileLists)
         fileList.Save(section.CreateSection(FILE_LIST_SECTION));
 }
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:6,代码来源:FileListManager.cs

示例7: Save

 public void Save(ISettingsSection section)
 {
     section.Attribute(FILELIST_NAME_ATTR, Name);
     foreach (var info in files)
         DnSpyFileInfoSerializer.Save(section.CreateSection(FILE_SECTION), info);
 }
开发者ID:GreenDamTan,项目名称:dnSpy,代码行数:6,代码来源:FileList.cs

示例8: Save

		public void Save(ISettingsSection section) {
			section.Attribute(CURRENT_LIST_ATTR, SelectedDocumentList.Name);
			foreach (var documentList in documentsList)
				documentList.Save(section.CreateSection(DOCUMENT_LIST_SECTION));
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:5,代码来源:DocumentListService.cs


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