protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { YAMLMappingNode node = base.ExportYAMLRoot(container); node.AddSerializedVersion(GetSerializedVersion(container.ExportVersion)); node.Add(TypeName, (int)Type); node.Add(ModeName, (int)Mode); node.Add(RefreshModeName, (int)RefreshMode); node.Add(TimeSlicingModeName, (int)TimeSlicingMode); node.Add(ResolutionName, Resolution); node.Add(UpdateFrequencyName, UpdateFrequency); node.Add(BoxSizeName, BoxSize.ExportYAML(container)); node.Add(BoxOffsetName, BoxOffset.ExportYAML(container)); node.Add(NearClipName, NearClip); node.Add(FarClipName, FarClip); node.Add(ShadowDistanceName, ShadowDistance); node.Add(ClearFlagsName, (uint)ClearFlags); node.Add(BackGroundColorName, BackGroundColor.ExportYAML(container)); node.Add(CullingMaskName, CullingMask.ExportYAML(container)); node.Add(IntensityMultiplierName, IntensityMultiplier); node.Add(BlendDistanceName, BlendDistance); node.Add(HDRName, HDR); node.Add(BoxProjectionName, BoxProjection); node.Add(RenderDynamicObjectsName, RenderDynamicObjects); node.Add(UseOcclusionCullingName, UseOcclusionCulling); node.Add(ImportanceName, Importance); node.Add(CustomBakedTextureName, CustomBakedTexture.ExportYAML(container)); if (IsReadBakedTexture(container.ExportVersion, container.ExportFlags)) { node.Add(BakedTextureName, BakedTextureTexture.ExportYAML(container)); } return(node); }
public void TestofBoxSizePrintPass() { Size s = new BoxSize(1, 1, 1); string text = s.GetAsText(); Assert.AreEqual("1x1x1 mm", text); }
//保存内容 private void btnEdit_SaveClickHandleClick(object sender, EventArgs e) { // 这里是插入方法 if (EditOrInsert == 0) { //判断为空 if (string.IsNullOrEmpty(dgvBaseList.Rows[index].Cells[1].Value.ToString()) || string.IsNullOrEmpty(dgvBaseList.Rows[index].Cells[2].Value.ToString())) { lblError.Text = "箱型名称或分类没有添入内容"; return; //存在相同直接返回 } //这是插入记录 行号为Index for (int i = 0; i < dgvBaseList.Rows.Count - 1; i++) { if (dgvBaseList.Rows[i].Cells[1].Value.ToString().Trim() == dgvBaseList.Rows[index].Cells[1].Value.ToString()) { dgvBaseList.Rows[i].Cells[1].Style.BackColor = Color.Red; lblError.Text = "存在相同项"; return; //存在相同直接返回 } } //这里插入记录 BoxSize bs = new BoxSize(); bs.Name = dgvBaseList.Rows[index].Cells[1].Value.ToString(); bs.Category = dgvBaseList.Rows[index].Cells[2].Value.ToString(); new BaseManager <BoxSize>().InsertBoxSize(bs); } //这里是修改记录方法 if (EditOrInsert == 1) { //进行相同比较 for (int i = 0; i < dgvBaseList.Rows.Count - 1; i++) { for (int j = i + 1; j < dgvBaseList.Rows.Count; j++) { if (dgvBaseList.Rows[i].Cells[1].Value.ToString() == dgvBaseList.Rows[j].Cells[1].Value.ToString()) { //存在相同 红色显示 dgvBaseList.Rows[i].Cells[1].Style.BackColor = Color.Red; dgvBaseList.Rows[j].Cells[1].Style.BackColor = Color.Red; lblError.Text = "存在相同的内容"; return; } } } foreach (DataGridViewRow item in dgvBaseList.Rows) //循环更新 { BoxSize bs = new BoxSize(); bs.ID = item.Cells[0].Value.ToString(); bs.Name = item.Cells[1].Value.ToString(); bs.Category = item.Cells[2].Value.ToString(); new BaseManager <BoxSize>().UpdateBoxSize(bs); } } btnEdit.isTrue = true; lblError.Text = ""; Init(); }
/// <summary> /// Create a copy of <see cref="PnFArg"/>. /// </summary> /// <returns>Copy.</returns> public override PnFArg Clone() { return(new PnFArg { BoxSize = BoxSize.Clone(), ReversalAmount = ReversalAmount, }); }
public void TestofBoxSizeObjectConstructorPass() { BoxSize bs = new BoxSize(1, 1, 1); Size s = new BoxSize(bs); string text = s.GetAsText(); Assert.AreEqual("1x1x1 mm", text); }
public void TestofBoxSizeIntArrayConstructorPass() { Size s = new BoxSize(new int[3] { 1, 1, 1 }); string text = s.GetAsText(); Assert.AreEqual("1x1x1 mm", text); }
public Client(string fname, string lname, string mname, BoxSize boxsize, float distance) : base(fname, lname, mname) { Boxsize = boxsize; Distance = distance; Stamp = DateTime.Now; }
public BoxWall() { boxes = new List <Box>(); for (int i = 0; i < TotalBox; i++) { int id = i; BoxSize size = (BoxSize)(i % TotalBox); boxes.Add(new Box(i, size)); } }
public Worker(string fname, string lname, string mname, BoxSize size, float speed, bool isbusy = false) : base(fname, lname, mname) { Boxsize = size; Speed = speed; IsBusy = isbusy; }
public Client(int id, string fname, string lname, string mname, float distance, BoxSize boxsize) : base(fname, lname, mname) { Id = id; Distance = distance; Boxsize = boxsize; Stamp = DateTime.Now; }
public Box Deposit(BoxSize boxSize) { foreach (Box box in boxes) { if (box.Size == boxSize && string.IsNullOrEmpty(box.Secrete)) { box.Secrete = Guid.NewGuid().ToString(); return(box); } } return(null); }
public Client(string fname, string lname, string mname, BoxSize boxsize, float distance, DateTime stamp) { FName = fname; LName = lname; MName = mname; Boxsize = boxsize; Distance = distance; Stamp = stamp; }
/// <summary> /// Get the hash code of the object <see cref="PnFArg"/>. /// </summary> /// <returns>A hash code.</returns> public override int GetHashCode() { return(BoxSize.GetHashCode() ^ ReversalAmount.GetHashCode()); }
// Validate Coeffs, task BOXOPT-29 to be implemented in the future. private bool ValidateCoeff(string assetPair, Box box, BoxSize assetConfig) { return(true); }
public void TestofBoxSizeInvalidValues() { Size s = new BoxSize(-1, 0, -1); }
public override void Read(AssetReader reader) { base.Read(reader); Type = (ReflectionProbeType)reader.ReadInt32(); Mode = (ReflectionProbeMode)reader.ReadInt32(); if (IsReadRefreshMode(reader.Version)) { RefreshMode = (ReflectionProbeRefreshMode)reader.ReadInt32(); TimeSlicingMode = (ReflectionProbeTimeSlicingMode)reader.ReadInt32(); } Resolution = reader.ReadInt32(); UpdateFrequency = reader.ReadInt32(); if (IsReadImportance(reader.Version)) { if (IsReadImportanceFirst(reader.Version)) { Importance = reader.ReadInt16(); } } BoxSize.Read(reader); BoxOffset.Read(reader); NearClip = reader.ReadSingle(); FarClip = reader.ReadSingle(); ShadowDistance = reader.ReadSingle(); ClearFlags = (ReflectionProbeClearFlags)reader.ReadUInt32(); BackGroundColor.Read(reader); CullingMask.Read(reader); IntensityMultiplier = reader.ReadSingle(); if (IsReadBlendDistance(reader.Version)) { BlendDistance = reader.ReadSingle(); } if (IsReadBakedRenderPassCount(reader.Version)) { BakedRenderPassCount = reader.ReadUInt32(); UseMipMap = reader.ReadBoolean(); } HDR = reader.ReadBoolean(); if (IsReadBoxProjection(reader.Version)) { BoxProjection = reader.ReadBoolean(); RenderDynamicObjects = reader.ReadBoolean(); UseOcclusionCulling = reader.ReadBoolean(); } if (IsReadImportance(reader.Version)) { if (!IsReadImportanceFirst(reader.Version)) { Importance = reader.ReadInt16(); } } reader.AlignStream(AlignType.Align4); if (IsReadCustomBakedTexture(reader.Version)) { CustomBakedTexture.Read(reader); } if (IsReadBakedTexture(reader.Version, reader.Flags)) { BakedTextureTexture.Read(reader); } }
public Box(int id, BoxSize boxSize) { Id = id; Size = boxSize; }