public static RemoveObject read(BinaryReader binaryReader) { RemoveObject newObj = new RemoveObject(); newObj.i_item = binaryReader.ReadUInt32(); return(newObj); }
public static void RemoveDevice(string name) { var tempRemoveObject = new RemoveObject(); if (Fans[Fans.FindIndex(i => i.Name == name)].DeviceLocation == "Local") { tempRemoveObject.Payload.Name = name; HBCrestron.SendWebSocketData(JsonConvert.SerializeObject(tempRemoveObject)); //Serialize the Data above } Fans.Remove(Fans[Fans.FindIndex(i => i.Name == name)]); }
static uint WriteImpl(MemoryPool memory, RemoveObject removeObject) { var removeObjectMemory = memory.AllocatePadded(Constants.IntPtrSize * 2, Constants.IntPtrSize); using (var removeObjectWriter = GetWriter(removeObjectMemory)) { removeObjectWriter.Write((UInt32)FrameItemType.RemoveObject); removeObjectWriter.Write((Int32)removeObject.Depth); } return(removeObjectMemory.StartAddress); }
public void RemovePlaceObject(int depth) { if (!_placeObjects.ContainsKey(depth)) { throw new AptEditorException(ErrorType.InvalidPlaceObjectDepth); } var toBeRemovedIndex = CurrentItems.FindIndex(item => item switch { PlaceObject p => p.Depth == depth, RemoveObject r => r.Depth == depth, _ => false });
public bool RemoveInstance(string name) { List <KeyValuePair <Frame, IDisplayListItem> > hitList = new List <KeyValuePair <Frame, IDisplayListItem> >(); List <PlaceObject> openTimelines = new List <PlaceObject>(); /* ISSUE 71: The unit test for this has no RemoveObject dli items in it, so we don't really * know if the crazy timeline searching found here actually works. Make a harsher test. */ foreach (Frame f in FrameList) { foreach (IDisplayListItem dli in f.DisplayList) { switch (dli.Type) { case DisplayListItemType.PlaceObjectX: PlaceObject po = (PlaceObject)dli; if (po.Name == name) { hitList.Add(new KeyValuePair <Frame, IDisplayListItem>(f, po)); openTimelines.Add(po); } break; case DisplayListItemType.RemoveObjectX: RemoveObject ro = (RemoveObject)dli; foreach (PlaceObject openPo in openTimelines) { if ((!ro.HasCharacter || openPo.Character == ro.Character) && ro.Layer == openPo.Layer) { hitList.Add(new KeyValuePair <Frame, IDisplayListItem>(f, ro)); openTimelines.Remove(openPo); break; } } break; default: /* ISSUE 73 */ throw new SWFModellerException(SWFModellerError.UnimplementedFeature, "Crazy, hitherto not seen display list item: " + dli.Type.ToString()); } } } foreach (KeyValuePair <Frame, IDisplayListItem> hit in hitList) { hit.Key.RemoveDisplayListItem(hit.Value); } return(hitList.Count > 0); }
public void AddPlaceObject(int depth, int?character) { if (_placeObjects.ContainsKey(depth)) { throw new AptEditorException(ErrorType.PlaceObjectDepthAlreadyTaken); } var currentIndex = CurrentItems.Count; FrameItem? created; LogicalPlaceObject?logicalPO; if (character is int index) { var po = PlaceObject.Create(depth, index); created = po; logicalPO = new LogicalPlaceObject(EditAndUpdate, po); } else { created = RemoveObject.Create(depth); logicalPO = null; } void Add() { CurrentItems.Add(created); _placeObjects.Add(depth, logicalPO); } void Remove() { CurrentItems.RemoveAt(currentIndex); _placeObjects.Remove(depth); } EditAndUpdate(new EditAction(Add, Remove, "Add PlaceObject")); }
public override void removeObject2(RemoveObject tag) { tags.Add(tag); }
public override void removeObject2(RemoveObject tag) { frame.controlTags.Add(tag); }
public override void removeObject(RemoveObject tag) { removeObject2(tag); }
public bool Any(RemoveObject request) { return(workflow.Remove(request.ID)); }
public override void removeObject2(RemoveObject tag) { encodeTagHeader(tag.code, 2, false); writer.writeUI16(tag.depth); }
public override void removeObject(RemoveObject tag) { encodeTagHeader(tag.code, 4, false); int idref = dict.getId(tag.ref_Renamed); writer.writeUI16(idref); writer.writeUI16(tag.depth); }
public override void removeObject2(RemoveObject tag) { frame.controlTags.Add(tag); }
public virtual void removeObject(RemoveObject tag) { }
public override bool acceptMessageData(BinaryReader messageDataReader, TreeView outputTreeView) { bool handled = true; PacketOpcode opcode = Util.readOpcode(messageDataReader); switch (opcode) { case PacketOpcode.INVENTORY_PUT_OBJ_IN_CONTAINER_EVENT: //0x0022 { PutObjectInContainerEvent message = PutObjectInContainerEvent.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.INVENTORY_WIELD_OBJ_EVENT: // 0x0023 { WieldItem message = WieldItem.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.INVENTORY_REMOVE_OBJ_EVENT: // 0x0024 { RemoveObject message = RemoveObject.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Inventory__PutItemInContainer_ID: { PutItemInContainer message = PutItemInContainer.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Inventory__GetAndWieldItem_ID: { GetAndWieldItem message = GetAndWieldItem.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Inventory__DropItem_ID: { DropItem message = DropItem.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Inventory__UseWithTargetEvent_ID: { UseWithTargetEvent message = UseWithTargetEvent.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Inventory__UseEvent_ID: { UseEvent message = UseEvent.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.CLOSE_GROUND_CONTAINER_EVENT: // 0x0052 { CloseGroundContainer message = CloseGroundContainer.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Inventory__StackableMerge_ID: { StackableMerge message = StackableMerge.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Inventory__StackableSplitToContainer_ID: { StackableSplitToContainer message = StackableSplitToContainer.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Inventory__StackableSplitTo3D_ID: { StackableSplitTo3D message = StackableSplitTo3D.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.INVENTORY_SERVER_SAYS_FAILED_EVENT: // 0x00A0 { InventoryServerSaysFailed message = InventoryServerSaysFailed.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Inventory__GiveObjectRequest_ID: { GiveObjectRequest message = GiveObjectRequest.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Inventory__NoLongerViewingContents_ID: { NoLongerViewingContents message = NoLongerViewingContents.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.VIEW_CONTENTS_EVENT: // 0x0196 { ViewContents message = ViewContents.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Inventory__StackableSplitToWield_ID: { StackableSplitToWield message = StackableSplitToWield.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Inventory__CreateTinkeringTool_ID: { CreateTinkeringTool message = CreateTinkeringTool.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Inventory__Recv_SalvageOperationsResultData_ID: { SalvageOperationsResultData message = SalvageOperationsResultData.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.STACKABLE_SET_STACKSIZE_EVENT: { UpdateStackSize message = UpdateStackSize.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.INVENTORY_PUT_OBJ_IN_3D_EVENT: // 0x019A { InventoryPutObjIn3D message = InventoryPutObjIn3D.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } default: { handled = false; break; } } return(handled); }
public override void removeObject2(RemoveObject tag) { open(tag); out_Renamed.Write(" depth='" + tag.depth + "'"); close(); }
public override void removeObject(RemoveObject tag) { open(tag); out_Renamed.Write(" idref='" + idRef(tag.ref_Renamed) + "'"); close(); }
private void WriteRemoveObjectTag(RemoveObject ro) { WriteBuffer removeBuf = this.OpenTag(ro.HasCharacter ? Tag.RemoveObject : Tag.RemoveObject2); if (ro.HasCharacter) { int cid = this.characterMarshal.GetIDFor(ro.Character); removeBuf.WriteUI16((uint)cid); } removeBuf.WriteUI16((uint)ro.LayerIndex); this.CloseTag(); }
public override void removeObject(RemoveObject tag) { removeObject2(tag); }
private RemoveObject ReadRemoveObject2() { int depth = this.sdtr.ReadUI16(); #if DEBUG this.Log("depth=" + depth+", frameCursor="+this.frameCursor); #endif RemoveObject ro = new RemoveObject(this.currentTimeline.GetLayer(depth)); return ro; }