本文整理汇总了C#中Properties.Get方法的典型用法代码示例。如果您正苦于以下问题:C# Properties.Get方法的具体用法?C# Properties.Get怎么用?C# Properties.Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Properties
的用法示例。
在下文中一共展示了Properties.Get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WorldmapSector
public WorldmapSector(string Filename)
{
List WorldMapL = Util.Load(Filename, "supertux-worldmap");
LispIterator iter = new LispIterator(WorldMapL);
while(iter.MoveNext()) {
switch(iter.Key) {
case "properties":
Properties Props = new Properties(iter.List);
Props.Get("name", ref Name);
Props.Get("music", ref Music);
Console.WriteLine("Name: " + Name);
Console.WriteLine("Music: " + Music);
Props.PrintUnusedWarnings();
break;
case "spawnpoint":
WorldmapSpawnPoint SpawnPoint = new WorldmapSpawnPoint();
SpawnPoint.Parse(iter.List);
SpawnPoints.Add(SpawnPoint.Name, SpawnPoint);
break;
default:
GameObject Object = ParseObject(iter.Key, iter.List);
if(Object != null)
AddObject(Object);
break;
}
}
Player = new WorldmapTux(this);
AddObject(Player);
Spawn("default");
}
示例2: Parse
public void Parse(Level Level, List list)
{
this.Level = Level;
Properties props = new Properties(list);
props.Get("name", ref Name);
props.Get("music", ref Music);
props.Get("gravity", ref Gravity);
LispIterator iter = new LispIterator(list);
while(iter.MoveNext()) {
switch(iter.Key) {
case "spawnpoint":
SpawnPoint SpawnPoint = new SpawnPoint();
SpawnPoint.Parse(iter.List);
SpawnPoints.Add(SpawnPoint.Name, SpawnPoint);
break;
default:
GameObject Object = ParseObject(iter.Key, iter.List);
if(Object != null)
AddObject(Object);
break;
}
}
}
示例3: Load
public void Load(string Filename)
{
List levelLisp = Util.Load(Filename, "supertux-level");
Properties props = new Properties(levelLisp);
int version = 1;
props.Get("version", ref version);
if(version == 1)
throw new Exception("Old Level format not supported");
if(version > 2)
Console.WriteLine("Warning: Level Format newer than application");
props.Get("name", ref Name);
props.Get("author", ref Author);
LispIterator iter = new LispIterator(levelLisp);
while(iter.MoveNext()) {
switch(iter.Key) {
case "sector":
Sector sector = new Sector();
sector.Parse(this, iter.List);
break;
default:
Console.WriteLine("Ignoring unknown tag '" + iter.Key + "' in level");
break;
}
}
}
示例4: XmlEditorOptions
static XmlEditorOptions ()
{
properties = PropertyService.Get (OptionsProperty, new Properties());
Properties.PropertyChanged += HandlePropertiesPropertyChanged;
showSchemaAnnotation = properties.Get<bool> (ShowSchemaAnnotationPropertyName, false);
autoCompleteElements = properties.Get<bool> (AutoCompleteElementsPropertyName, false);
autoInsertFragments = properties.Get<bool> (AutoInsertFragmentsPropertyName, false);
}
示例5: Parse
public void Parse(List Data)
{
Properties Props = new Properties(Data);
if(!Props.Get("name", ref Name))
throw new Exception("WorldmapSpawnPoint has no Name");
Props.Get("x", ref Pos.X);
Props.Get("y", ref Pos.Y);
Props.PrintUnusedWarnings();
}
示例6: RecentOpen
public RecentOpen(Properties p)
{
// don't check whether files exist because that might be slow (e.g. if file is on network
// drive that's unavailable)
// if one of these entries is a string, then it's from a previous SharpDevelop version - don't try loading it
if (p.Contains("Files") && !(p.Get("Files") is string)) {
lastfile.AddRange(p.Get("Files", new string[0]));
}
if (p.Contains("Projects") && !(p.Get("Files") is string)) {
lastproject.AddRange(p.Get("Projects", new string[0]));
}
}
示例7: WorldmapLevel
public WorldmapLevel(WorldmapSector Sector, List Data)
: base(Sector)
{
string SpriteName = "worldmap/common/leveldot.sprite";
Properties Props = new Properties(Data);
Props.Get("name", ref LevelFile);
FieldPos LevelPos = new FieldPos();
Props.Get("x", ref LevelPos.X);
Props.Get("y", ref LevelPos.Y);
Props.Get("sprite", ref SpriteName);
Props.PrintUnusedWarnings();
Sprite = SpriteManager.Create(SpriteName);
Sprite.Pos = new Vector(LevelPos.X*32 + 16, LevelPos.Y*32 + 16);
}
示例8: CompilerPanel
public CompilerPanel (Properties customizationObject)
{
this.Build ();
project = customizationObject.Get<CProject> ("Project");
compilers = AddinManager.GetExtensionObjects ("/CBinding/Compilers");
foreach (ICompiler compiler in compilers) {
compilerComboBox.AppendText (compiler.Name);
}
int active = 0;
Gtk.TreeIter iter;
Gtk.ListStore store = (Gtk.ListStore)compilerComboBox.Model;
store.GetIterFirst (out iter);
while (store.IterIsValid (iter)) {
if ((string)store.GetValue (iter, 0) == project.Compiler.Name) {
break;
}
store.IterNext (ref iter);
active++;
}
compilerComboBox.Active = active;
useCcacheCheckBox.Active = ((CProjectConfiguration)project.ActiveConfiguration).UseCcache;
Update ();
}
示例9: Condition
public Condition(string name, Properties properties, AddIn addIn)
{
this.AddIn = addIn;
this.name = name;
this.properties = properties;
action = properties.Get("action", ConditionFailedAction.Exclude);
}
示例10: InitializeService
internal static void InitializeService()
{
bindings = AddInTree.BuildItems<DisplayBindingDescriptor>(displayBindingPath, null, true);
displayBindingServiceProperties = PropertyService.Get("DisplayBindingService", new Properties());
foreach (ExternalProcessDisplayBinding binding in displayBindingServiceProperties.Get("ExternalProcesses", new ExternalProcessDisplayBinding[0])) {
if (binding != null) {
AddExternalProcessDisplayBindingInternal(binding);
}
}
}
示例11: SetUpFixture
public void SetUpFixture()
{
using (XPathQueryControl queryControl = new XPathQueryControl()) {
Properties p = new Properties();
p.Set("XPathResultsListView.MatchColumn.Width", 10);
p.Set("XPathResultsListView.LineColumn.Width", 20);
queryControl.SetMemento(p);
matchColumnWidthAfterLoad = queryControl.XPathResultsListView.Columns[0].Width;
lineColumnWidthAfterLoad = queryControl.XPathResultsListView.Columns[1].Width;
queryControl.XPathResultsListView.Columns[0].Width = 40;
queryControl.XPathResultsListView.Columns[1].Width = 50;
p = queryControl.CreateMemento();
matchColumnWidthAfterSave = p.Get<int>("XPathResultsListView.MatchColumn.Width", 0);
lineColumnWidthAfterSave = p.Get<int>("XPathResultsListView.LineColumn.Width", 0);
}
}
示例12: Tilemap
public Tilemap(Tileset Tileset, Lisp.List Data)
{
this.Tileset = Tileset;
Properties Props = new Properties(Data);
uint Width = 0;
uint Height = 0;
Props.Get("width", ref Width);
Props.Get("height", ref Height);
if(Width == 0 || Height == 0)
throw new Exception("Width or Height of Tilemap invalid");
List<uint> Tiles = new List<uint>();
Props.GetUIntList("tiles", Tiles);
if(Tiles.Count != (int) (Width * Height))
throw new Exception("TileCount != Width*Height");
Props.Get("solid", ref Solid);
Props.PrintUnusedWarnings();
Field = new Field<uint>(Tiles, Width, Height);
}
示例13: 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.Set("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.Get("XPathQuery.History", new string[0]);
}
}
示例14: ReceiveDialogMessage
public override bool ReceiveDialogMessage(DialogMessage message)
{
if (customizer == null) {
customizer = (Properties)base.CustomizationObject;
reportStructure = (ReportStructure)customizer.Get("Generator");
}
if (message == DialogMessage.Next) {
customizer.Set("SqlString", this.txtSqlString.Text.Trim());
reportStructure.SqlString = this.txtSqlString.Text.Trim();
reportStructure.ConnectionString = connectionString;
base.EnableFinish = true;
}
return true;
}
示例15: OutputOptionsPanel
public OutputOptionsPanel (Properties customizationObject)
{
this.Build ();
table1.RowSpacing = 3;
configuration = customizationObject.Get<CProjectConfiguration> ("Config");
outputNameTextEntry.Text = configuration.Output;
outputPathTextEntry.Text = configuration.OutputDirectory;
parametersTextEntry.Text = configuration.CommandLineParameters;
externalConsoleCheckbox.Active = configuration.ExternalConsole;
pauseCheckbox.Active = configuration.PauseConsoleOutput;
}