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


C# Region类代码示例

本文整理汇总了C#中Region的典型用法代码示例。如果您正苦于以下问题:C# Region类的具体用法?C# Region怎么用?C# Region使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: RegionTag

 public RegionTag(Region parent, string reference, int index, Region ownregion)
 {
     _Parent = parent;
     _Index = index;
     _Reference = reference;
     _OwnRegion = ownregion;
 }
开发者ID:frkdom,项目名称:Region-Editor-2015,代码行数:7,代码来源:RegionTag.cs

示例2: AddRegion

 public void AddRegion(Region region)
 {
     if (!regions.Contains(region))
     {
         regions.Add(region);
     }
 }
开发者ID:maqianzj,项目名称:WWMapEditor,代码行数:7,代码来源:Map.cs

示例3: Column

        /// <summary>
        /// Initializes a new Column for the given parent <see cref="Region"/> at source 
        /// row/column position srcPos and column grid position pos.
        /// </summary>
        /// <param name="region">The parent Region this Column belongs to.</param>
        /// <param name="centralPositionInInput">A Point(x,y) of this Column's 'center' position in 
        ///   terms of the proximal-synapse input space.</param>
        /// <param name="positionInRegion">A Point(x,y) of this Column's position within the Region's 
        ///   column grid.</param>
        public Column(Region region, Point centralPositionInInput, Point positionInRegion)
        {
            // Set fields
            this.Region = region;
            this.CentralPositionInInput = centralPositionInInput;
            this.PositionInRegion = positionInRegion;
            this.Overlap = 0;
            this.Boost = 1.0f;
            this.ActiveDutyCycle = 1;
            this.OverlapDutyCycle = 1.0f;
            this._random = new Random((positionInRegion.Y * this.Region.Size.Width) + positionInRegion.X);

            // Initialize state vectors with fixed lenght = T
            for (int t = 0; t <= Global.T; t++)
            {
                this.ActiveState.Add(false);
                this.InhibitedState.Add(false);
            }

            // Fill Column with contextual cells
            this.Cells = new BindingList<Cell>();
            for (int i = 0; i < region.CellsPerColumn; i++)
            {
                this.Cells.Add(new Cell(this, i));
            }

            // The list of potential proximal synapses and their permanence values.
            this.ProximalSegment = new ProximalSegment ( this );
        }
开发者ID:intruder01,项目名称:20150105,代码行数:38,代码来源:Column.cs

示例4: frmLogin

        public frmLogin()
        {
            InitializeComponent();

            foreach (Button btn in this.Controls.OfType<Button>())
            {//this will controll all button inside form
                btn.FlatStyle = FlatStyle.Standard;
                btn.ForeColor = Color.Black;
                btn.BackColor = Color.White;
                
            }
            foreach (TextBox txtbox in this.Controls.OfType<TextBox>())
            {//this will controll all textbox inside form
                txtbox.BorderStyle = BorderStyle.None;
                
            }

            //background
            this.BackgroundImage = Properties.Resources.bg;
            this.BackgroundImageLayout = ImageLayout.Stretch;
            System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath();
            gp.AddEllipse(0, 0, pictureBox1.Width - 3, pictureBox1.Height - 3);
            Region rg = new Region(gp);
            pictureBox1.Region = rg;
        }
开发者ID:SofEng22016,项目名称:gom_mandaluyongchapter,代码行数:25,代码来源:FormLogin.cs

示例5: ItemAutoSubscription

 /// <summary>
 ///   Initializes a new instance of the <see cref = "ItemAutoSubscription" /> class.
 /// </summary>
 /// <param name = "item">
 ///   The subscribed item.
 /// </param>
 /// <param name = "itemPosition">
 ///   The item position.
 /// </param>
 /// <param name = "itemRegion">
 ///   The item Region.
 /// </param>
 /// <param name = "subscription">
 ///   The subscription.
 /// </param>
 public ItemAutoSubscription(Item item, Vector itemPosition, Region itemRegion, IDisposable subscription)
 {
     this.ItemPosition = itemPosition;
     this.item = item;
     this.subscription = subscription;
     this.WorldRegion = itemRegion;
 }
开发者ID:ommziSolution,项目名称:PhotonServer,代码行数:22,代码来源:ItemAutoSubscription.cs

示例6: Contains

		public bool Contains( Region reg )
		{
			if ( reg == null || ( m_ForceMap != null && reg.Map != m_ForceMap ) )
				return false;

			return reg.IsPartOf( m_RegionName );
		}
开发者ID:nathanvy,项目名称:runuo,代码行数:7,代码来源:QuestArea.cs

示例7: OnExitRegionComplete

		private void OnExitRegionComplete(Region region)
		{
			if (ExitRegionComplete != null)
			{
				ExitRegionComplete(this, new MonitorEventArgs{ Region = region });
			}
		}
开发者ID:Denn1992,项目名称:Android-AltBeacon-Library,代码行数:7,代码来源:MonitorNotifier.cs

示例8: Acc_Delete_Simple

        public void Acc_Delete_Simple()
        {
            //insert a test product
            Region r = new Region();
            r.RegionDescription = "Test";
            r.Save("test");

            int records = DB.Select()
                .From(Region.Schema)
                .Where("regiondescription").IsEqualTo("Test")
                .GetRecordCount();

            Assert.IsTrue(records == 1);

            DB.Delete()
                .From(Region.Schema)
                .Where("regiondescription").IsEqualTo("Test")
                .Execute();

            records = DB.Select()
                .From(Region.Schema)
                .Where("regiondescription").IsEqualTo("Test")
                .GetRecordCount();

            Assert.IsTrue(records == 0);
        }
开发者ID:RyanDansie,项目名称:SubSonic-2.0,代码行数:26,代码来源:DeleteTests.cs

示例9: DidExitRegion

 public void DidExitRegion(Region region)
 {
     if (ExitBeaconRegion != null)
     {
         ExitBeaconRegion(RegionBeaconConverter.ConvertRegionToBeacon(region));
     }
 }
开发者ID:ChallengeEarth,项目名称:beacon-prototype,代码行数:7,代码来源:BeaconManager.cs

示例10: TestLoadRegion

 public void TestLoadRegion()
 {
     Region region = new Region(Vector3.Zero, null, Path.Combine("TestWorld", "region", "r.0.0.mca"));
     var chunk = region.GetChunk(Vector3.Zero);
     for (int y = 0; y < Chunk.Height - 1; y++ )
         Assert.AreEqual(new GoldBlock(), chunk.GetBlock(new Vector3(0, y, 0)));
 }
开发者ID:Imperceptus,项目名称:Craft.Net,代码行数:7,代码来源:WorldTest.cs

示例11: Process

        private Int32 width; //delete

        #endregion Fields

        #region Methods

        public List<Region> Process(Region input, Int32 h = 1)
        {
            try
            {
                this.level = Convert.ToByte(input.Level + h);

                this.input = input;

                this.width = input.GrayscaleMask.Width;
                this.height = input.GrayscaleMask.Height;
                this.board = new int[width, height];

                Dictionary<int, List<Pixel>> patterns = Find();

                var regions = new List<Region>();
                foreach (KeyValuePair<int, List<Pixel>> pattern in patterns)
                {
                    //var region = CreateRegion(pattern.Value);

                    //if (region == null)
                    //{
                    //    continue;
                    //}

                    //regions.Add(region);
                    regions.Add(CreateRegion(pattern.Value));
                }

                return regions;
            }
            catch (OverflowException)
            {
                return new List<Region>();
            }
        }
开发者ID:shmeleva,项目名称:Human-Detection-Course-Project,代码行数:41,代码来源:ConnectedComponents.cs

示例12: CreateRequestAsync

 public virtual async Task<string> CreateRequestAsync(string relativeUrl, Region region,
     List<string> addedArguments = null)
 {
     RootDomain = "global.api.pvp.net";
     var request = PrepareRequest(relativeUrl, addedArguments);
     return await GetResponseAsync(request);
 }
开发者ID:Zyano,项目名称:RiotSharp,代码行数:7,代码来源:Requester.cs

示例13: QuestCompleteObjectiveRegion

		public QuestCompleteObjectiveRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent )
		{
			XmlElement questEl = xml["quest"];

			ReadType( questEl, "type", ref m_Quest );
			ReadType( questEl, "complete", ref m_Objective );
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:7,代码来源:QuestCompleteObjectiveRegion.cs

示例14: InitializeBeaconManager

		private BeaconManager InitializeBeaconManager()
		{
			// Enable the BeaconManager 
			BeaconManager bm = BeaconManager.GetInstanceForApplication(Xamarin.Forms.Forms.Context);

			#region Set up Beacon Simulator if testing without a BLE device
//			var beaconSimulator = new BeaconSimulator();
//			beaconSimulator.CreateBasicSimulatedBeacons();
//
//			BeaconManager.BeaconSimulator = beaconSimulator;
			#endregion

			var iBeaconParser = new BeaconParser();
			//	Estimote > 2013
			iBeaconParser.SetBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24");
			bm.BeaconParsers.Add(iBeaconParser);

			_monitorNotifier.EnterRegionComplete += EnteredRegion;
			_monitorNotifier.ExitRegionComplete += ExitedRegion;
			_monitorNotifier.DetermineStateForRegionComplete += DeterminedStateForRegionComplete;
			_rangeNotifier.DidRangeBeaconsInRegionComplete += RangingBeaconsInRegion;

			_tagRegion = new AltBeaconOrg.BoundBeacon.Region("myUniqueBeaconId", Identifier.Parse("E4C8A4FC-F68B-470D-959F-29382AF72CE7"), null, null);
			_tagRegion = new AltBeaconOrg.BoundBeacon.Region("myUniqueBeaconId", Identifier.Parse("B9407F30-F5F8-466E-AFF9-25556B57FE6D"), null, null);
			_emptyRegion = new AltBeaconOrg.BoundBeacon.Region("myEmptyBeaconId", null, null, null);

			bm.SetBackgroundMode(false);
			bm.Bind((IBeaconConsumer)Xamarin.Forms.Forms.Context);

			return bm;
		}
开发者ID:Denn1992,项目名称:Android-AltBeacon-Library,代码行数:31,代码来源:AltBeaconService.cs

示例15: Create

        public ActionResult Create(Region Region)
        {
            Context.Regions.Add(Region);
            Context.SaveChanges(); 

            return this.RedirectToAction("Index"); 
        }
开发者ID:ericgm,项目名称:ct_web_2015,代码行数:7,代码来源:RegionsController.cs


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