本文整理汇总了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()));
}
示例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();
}
示例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);
}
示例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);
}
示例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");
}
//.........这里部分代码省略.........
示例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;
}
}
}