• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Region类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: ParseValue

 public override bool ParseValue(IRocketPlayer caller, Region region, string[] command, out string valueShown, Group @group = Group.ALL)
 {
     string value = Serialize(((UnturnedPlayer)caller).Position);
     valueShown = value;
     SetValue(value, group);
     return true;
 }
开发者ID:Trojaner25,项目名称:Rocket-Regions,代码行数:7,代码来源:TeleportFlag.cs


示例17: BuildReferenceDto

 private object BuildReferenceDto(Region item)
 {
     return new{
         StringId = _stringConverter.ToString(item),
         Description = item.ToString(),
     };
 }
开发者ID:smartinz,项目名称:randomhacking,代码行数:7,代码来源:RegionJsonConverter.cs


示例18: GetOpinion

    public double GetOpinion(Region region)
    {
        if (!opinions.ContainsKey(region.InternalName))
            throw new ArgumentException("No opinion data available for region " + region.InternalName + " (" + region.DisplayedName + ")");

        return opinions[region.InternalName];
    }
开发者ID:Sense-of-Right-Alliance,项目名称:GGJ2016,代码行数:7,代码来源:SpellDescriptor.cs


示例19: OnDetermineStateForRegionComplete

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


示例20: OnRegionEntered

		protected async void OnRegionEntered(object sender, Region e)
		{
			_logger.Info ("UpdateEngine: Region entered, fetching departures....");
			var departures = await _updateTrafikkData.GetDeparturesForStop (e.StopId);

			NotifyOfRelevantDepartures (e, departures);
		}
开发者ID:hakonfjukstad,项目名称:Avgangsalarm,代码行数:7,代码来源:UpdateEngine.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# RegionEndpoint类代码示例发布时间:2022-05-24
下一篇:
C# RegexOptions类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap