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


C# Properties.SetList方法代码示例

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


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

示例1: SavePreferences

		public override void SavePreferences(Properties preferences)
		{
			SD.MainThread.VerifyAccess();
			
			// breakpoints and files
			preferences.SetList("bookmarks", SD.BookmarkManager.GetProjectBookmarks(Project));
			List<string> files = new List<string>();
			foreach (var fileName in FileService.GetOpenFiles()) {
				if (fileName != null && Project.IsFileInProject(fileName)) {
					files.Add(fileName);
				}
			}
			preferences.SetList("openFiles", files);
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:14,代码来源:DefaultProjectBehavior.cs

示例2: SetUpFixture

        public void SetUpFixture()
        {
            using (XPathQueryControl queryControl = new XPathQueryControl()) {
                Properties p = new Properties();
                expectedNamespaces = new List<XmlNamespace>();
                expectedNamespaces.Add(new XmlNamespace("f", "http://foo.com"));
                expectedNamespaces.Add(new XmlNamespace("s", "http://sharpdevelop.com"));

                List<string> namespaces = new List<string>();
                foreach (XmlNamespace xmlNamespace in expectedNamespaces) {
                    namespaces.Add(xmlNamespace.ToString());
                }
                p.SetList("Namespaces", namespaces);
                queryControl.SetMemento(p);
                actualNamespaces = queryControl.GetNamespaces();
            }
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:17,代码来源:NamespacePropertiesLoaded.cs

示例3: SetUpFixture

		public void SetUpFixture()
		{
			using (XPathQueryControl queryControl = new XPathQueryControl()) {
				Properties p = new Properties();
				p.Set("XPathQuery.LastQuery", "//w:Wix");
				expectedXPathsAfterLoad = new string[] {"//w:Fragment", "//w:Dialog"};
				p.SetList("XPathQuery.History", expectedXPathsAfterLoad);
				queryControl.SetMemento(p);

				comboBoxTextAfterLoad = queryControl.XPathComboBox.Text;
				comboBoxItemsAfterLoad = GetComboBoxItems(queryControl.XPathComboBox);

				queryControl.XPathComboBox.Text = "*";
				queryControl.XPathComboBox.Items.Clear();
				queryControl.XPathComboBox.Items.Add("xs:schema");
				expectedXPathsAfterSave = GetComboBoxItems(queryControl.XPathComboBox);

				p = queryControl.CreateMemento();
				
				xpathQueryAfterSave = p.Get("XPathQuery.LastQuery", String.Empty);
				xpathsAfterSave = p.GetList<string>("XPathQuery.History").ToArray();
			}
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:23,代码来源:XPathQueryHistoryTestFixture.cs

示例4: Save

		void Save(string fileName)
		{
			Properties p = new Properties();
			p.SetList("CustomizedHighlightingRules", customizationList);
			XElement root = p.Save();
			root.SetAttributeValue("version", Properties.FileVersion.ToString());
			new XDocument(root).Save(fileName);
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:8,代码来源:HighlightingOptions.xaml.cs

示例5: SaveXPathQueryHistory

 void SaveXPathQueryHistory(Properties properties)
 {
     properties.Set(XPathComboBoxTextProperty, XPathComboBox.Text);
     properties.SetList(XPathComboBoxItemsProperty, GetXPathHistory());
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:5,代码来源:XPathQueryControl.cs

示例6: SaveNamespaces

 void SaveNamespaces(Properties properties)
 {
     properties.SetList(NamespacesProperty, GetNamespaceStringArray());
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:4,代码来源:XPathQueryControl.cs


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