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


C# Properties.Get方法代码示例

本文整理汇总了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");
    }
开发者ID:BackupTheBerlios,项目名称:supertux-svn,代码行数:32,代码来源:WorldMapSector.cs

示例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;
            }
        }
    }
开发者ID:BackupTheBerlios,项目名称:supertux-svn,代码行数:25,代码来源:LevelSector.cs

示例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;
            }
        }
    }
开发者ID:BackupTheBerlios,项目名称:supertux-svn,代码行数:28,代码来源:Level.cs

示例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);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:9,代码来源:XmlEditorOptions.cs

示例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();
    }
开发者ID:BackupTheBerlios,项目名称:supertux-svn,代码行数:10,代码来源:WorldmapSpawnPoint.cs

示例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]));
			}
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:14,代码来源:RecentOpen.cs

示例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);
    }
开发者ID:BackupTheBerlios,项目名称:supertux-svn,代码行数:15,代码来源:WorldmapLevel.cs

示例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 ();
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:30,代码来源:CompilerPanel.cs

示例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);
		}
开发者ID:Rew,项目名称:SharpDevelop,代码行数:7,代码来源:Condition.cs

示例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);
				}
			}
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:10,代码来源:DisplayBindingService.cs

示例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);
			}
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:19,代码来源:XPathResultsListViewColumnWidthsTestFixture.cs

示例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);
    }
开发者ID:BackupTheBerlios,项目名称:supertux-svn,代码行数:21,代码来源:Tilemap.cs

示例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]);
			}
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:23,代码来源:XPathQueryHistoryTestFixture.cs

示例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;
		}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:15,代码来源:PullModelPanel.cs

示例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;
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:15,代码来源:OutputOptionsPanel.cs


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