public void SetFromTreeNodes(TreeNode Root) { FlashInputMap = new FlashInputMapItem[Root.Nodes.Count]; for (int i = 0; i < FlashInputMap.Length; i++) { TreeNode ChildNode = Root.Nodes[i]; FlashInputMapItem Entry = (FlashInputMapItem)ChildNode.Tag; FlashInputMap[i] = Entry; } }
public void WriteToFile(XBinWriter writer) { writer.Write(FlashInputMap.Length); writer.Write(FlashInputMap.Length); for (int i = 0; i < FlashInputMap.Length; i++) { FlashInputMapItem Item = FlashInputMap[i]; writer.Write((uint)Item.KeyModifiers); writer.Write((uint)Item.MenuAction); writer.Write((uint)Item.FlashControlType); writer.Write((uint)Item.Control); writer.Write((uint)Item.AxisMode); writer.Write((uint)Item.DeviceIndex); } }
public void ReadFromFile(BinaryReader reader) { uint count1 = reader.ReadUInt32(); uint count2 = reader.ReadUInt32(); FlashInputMap = new FlashInputMapItem[count1]; for (int i = 0; i < FlashInputMap.Length; i++) { FlashInputMapItem Item = new FlashInputMapItem(); Item.ID = i; Item.KeyModifiers = (EKeyModifiers)reader.ReadUInt32(); Item.MenuAction = (EMenuAction)reader.ReadUInt32(); Item.FlashControlType = (EFlashControlType)reader.ReadUInt32(); Item.Control = (EInputControlUnified)reader.ReadUInt32(); Item.AxisMode = (EAxisMode)reader.ReadUInt32(); Item.DeviceIndex = (EFlashDeviceIndex)reader.ReadUInt32(); FlashInputMap[i] = Item; } }