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


C# Entities.ToString方法代码示例

本文整理汇总了C#中Entities.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Entities.ToString方法的具体用法?C# Entities.ToString怎么用?C# Entities.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Entities的用法示例。


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

示例1: To_String

 public void To_String()
 {
     var list = new Entities<Entity>();
     var nestedEntity = new NestedEntity();
     var testEntity = new TestEntity(nestedEntity);
     nestedEntity.Yo = "7";
     testEntity.Zo = "8";
     list.Add(testEntity);
     var builder = new StringBuilder();
     builder.AppendLine("ZO, YO, ");
     builder.AppendLine("8, 7, ");
     Assert.That(list.ToString(), Is.EqualTo(builder.ToString()));
 }
开发者ID:mdzn,项目名称:White,代码行数:13,代码来源:EntitiesTest.cs

示例2: DoDuLieu

 /// <summary>
 /// hungvv =================do du lieu vao txt===========================
 /// </summary>
 /// <param name="dat"></param>
 private void DoDuLieu(Entities.DonDatHang dat)
 {
     Common.Utilities com = new Common.Utilities();
     txtSodonhang.Text = dat.MaDonDatHang;
     txtManhacungcap.Text = dat.MaNhaCungCap;
     GiaTriCanLuu.Ma = dat.MaNhaCungCap;
     txtTrangthaidonhang.Text = dat.TrangThaiDonDatHang;
     cbxDieukienthanhtoan.SelectedValue = dat.DieuKienThanhToan;
     cbxMaKho.Text = dat.MaKho;
     makNgaydonhang.Text = com.XuLy(2,this.dathang.NgayDonHang.ToString());
     makNgaynhapdukien.Text = com.XuLy(2,this.dathang.NgayNhapDuKien.ToString());
     txtNohienthoi.Text = dat.NoHienThoi.ToString();
     txtPhuongthucvanchuyen.Text = dat.ToString();
     cbxDieukienthanhtoan.SelectedItem = dat.DieuKienThanhToan.ToString();
     cbxHinhthucthanhtoan.SelectedItem = dat.HinhThucThanhToan.ToString();
     cbxNhanvien.SelectedValue = dat.MaNhanVien.ToString();
     check_loaidathang.Checked = dat.LoaiDonDatHang;
     cbxTiente_Tygia.SelectedValue = dat.MaTienTe.ToString();
     txtDiengiai.Text = dat.GhiChu;
     txtPhikhac.Text = dat.PhiKhac.ToString();
     txtPhivanchuyen.Text = dat.Phivanchuyen.ToString();
     HienThi_ChiTiet_DonDatHang();
 }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:27,代码来源:frmXuLy_DonDatHang.cs

示例3: GetByTeamAsync

        /// <summary>
        /// 
        /// </summary>
        /// <param name="team"></param>
        /// <param name="season"></param>
        /// <returns></returns>
        public async Task<PlayerSeasons> GetByTeamAsync(Entities.TeamTypes team, int season)
        {
            string url = string.Format("/{0}/{1}/{2}", PlayerSeasonStatsByTeamKey, season, team.ToString());

            return await this.GetRequestAsync<PlayerSeasons>(url);
        }
开发者ID:loveadt21,项目名称:fantasydata-client-net,代码行数:12,代码来源:PlayerSeasonStatService.cs

示例4: GetByTeam

        /// <summary>
        /// 
        /// </summary>
        /// <param name="team"></param>
        /// <param name="season"></param>
        /// <returns></returns>
        public PlayerSeasons GetByTeam(Entities.TeamTypes team, int season)
        {
            string url = string.Format("/{0}/{1}/{2}", PlayerSeasonStatsByTeamKey, season, team.ToString());

            return GetRequest<PlayerSeasons>(url);
        }
开发者ID:loveadt21,项目名称:fantasydata-client-net,代码行数:12,代码来源:PlayerSeasonStatService.cs

示例5: CreateEntity

        public VisualEntity CreateEntity(Vector3 entityPosition, VisualEntity entityParent, Entities entityType)
        {
            VisualEntity e = null;

            #region Create Entity
            switch (entityType)
            {
                case Entities.HeightFieldEntity:
                    {
                        e = new HeightFieldEntity("ground", "03RamieSc.dds", new
                            MaterialProperties("ground", 0.8f, 0.5f, 0.8f));

                    } break;
                case Entities.SkyDomeEntity:
                    {
                        e = new SkyDomeEntity("skydome.dds", "sky_diff.dds");
                        SimulationEngine.GlobalInstancePort.Insert(e);
                    } break;
                case Entities.LightSourceEntity:
                    {
                        var lightEntity = new LightSourceEntity();
                        e = lightEntity;
                        lightEntity.State.Name = "LightSourceEntity";
                        lightEntity.Type = LightSourceEntityType.Directional;
                        lightEntity.Color = new Vector4(.8f, .8f, .8f, 1);
                        lightEntity.State.Pose.Position = new Vector3(0, 1, 0);
                        lightEntity.Direction = new Vector3(0, -1, 0);
                        e.Flags = e.Flags | VisualEntityProperties.DisableRendering;

                    } break;
                case Entities.MotorBaseWithDrive:
                    {
                        e = new MotorBaseWithDrive(entityPosition);
                        e.State.Name = "MotorBaseWithDrive";
                        MakeNameUnique(e);

                        //Inserting Actual Rover instead of Simple Simulatd Robot.
                        //Needs to be tested

                        /*ColladaToMSRS e = new ColladaToMSRS(@"C:\.....\collada\rover.dae");
                        foreach (VisualEntity entity in e.Entities)
                        {
                            SimulationEngine.GlobalInstancePort.Insert(entity);
                        }*/

                    } break;
                case Entities.SimulatedBrightnessSensorEntity:
                    {
                        if (entityParent == null)
                        {
                            ShowEntityRequiresParentError(entityType.ToString() + " requires parent");
                        }
                        else
                        {
                            e = new SimulatedBrightnessSensorEntity(32, 32, 2.0f * (float)Math.PI / 180.0f);
                            e.State.Name = "SimulatedBrightnessSensorEntity";
                            MakeNameUnique(e);
                            entityParent.InsertEntity(e);
                        }

                    } break;
                case Entities.SimulatedColorSensorEntity:
                    {
                        if (entityParent == null)
                        {
                            ShowEntityRequiresParentError(entityType.ToString() + " requires parent");
                        }
                        else
                        {
                            e = new SimulatedColorSensorEntity(32, 32, 2.0f * (float)Math.PI / 180.0f);
                            e.State.Name = "SimulatedColorSensorEntity";
                            MakeNameUnique(e);
                            entityParent.InsertEntity(e);
                        }

                    } break;
                case Entities.SimulatedCompassEntity:
                    {
                        if (entityParent == null)
                        {
                            ShowEntityRequiresParentError(entityType.ToString() + " requires parent");
                        }

                        else
                        {
                            e = new SimulatedCompassEntity();
                            e.State.Name = "SimulatedCompassEntity";
                            MakeNameUnique(e);
                            entityParent.InsertEntity(e);
                        }

                    } break;

                case Entities.SimulatedGPSEntity:
                    {
                        if (entityParent == null)
                        {
                            ShowEntityRequiresParentError(entityType.ToString() + " requires parent");
                        }

//.........这里部分代码省略.........
开发者ID:x-yang,项目名称:rover-sim,代码行数:101,代码来源:EntityUIForm.cs

示例6: handleChoices

	IEnumerator handleChoices(GameObject[] ents, int unitCount, int i){
		bool done = false;

		for (int p = 0; p < unitCount; p++) {
			done = false;

			// It goes through the null slots too.
			// The try prevents a crash for null slots.
			if (ents [p] != null) {
				try {
					entity = ents [p].GetComponent<Entities> (); 
					if (entity.Choice == i) {
						hit = entity.accuracyCheck ();
						if (entity.Target != null){
							switch (entity.Choice) {
							case Entities.CHOICE_ATTACK:
								entity.Attack (hit);
								//Debug.Log("" + entity.ToString() + " Choice: ATTACK");
								break;
							case Entities.CHOICE_DEFEND:
								entity.Defend ();
								//Debug.Log("" + entity.ToString() + " Choice: DEFEND");
								break;
							case Entities.CHOICE_ITEM:
								entity.Item ();
								//Debug.Log("" + entity.ToString() + " Choice: ITEM");
								break;
							case Entities.CHOICE_SKILL:
								entity.Skill (hit);
								//Debug.Log("" + entity.ToString() + " Choice: SKILL");
								break;
							default:
								Debug.Log("" + entity.ToString() + " Choice: ERROR");
								break;
							}
							if (entity.Damage > 0 && hit) {
								floatingNumbers (entity.Damage.ToString (), entity.Target.transform.position);
								Debug.Log ("Hit! " + entity.Damage);
							}
							if (!hit) {
								floatingNumbers ("Miss!", entity.Target.transform.position);
							}
							//Debug.Log ("" + entity.ToString () + " || " + entity.Choice);
							done = true;
						}
					}
				} catch (Exception ex) {
					Debug.Log (ex);
				}
				if (done == true) {
					yield return new WaitForSeconds (1.5f);
				}

				done = false;
			}
		}
	}
开发者ID:KingCrazy,项目名称:Relentless,代码行数:57,代码来源:GameManager.cs


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