本文整理汇总了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);
}
示例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();
}
}
示例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();
}
}
示例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);
}
示例5: SaveXPathQueryHistory
void SaveXPathQueryHistory(Properties properties)
{
properties.Set(XPathComboBoxTextProperty, XPathComboBox.Text);
properties.SetList(XPathComboBoxItemsProperty, GetXPathHistory());
}
示例6: SaveNamespaces
void SaveNamespaces(Properties properties)
{
properties.SetList(NamespacesProperty, GetNamespaceStringArray());
}