private void DeselectMessageTypes(MessageTypeCollection messageTypes)
 {
     foreach (MessageTypeTreeModel messageType in messageTypes)
     {
         messageType.IsSelected = false;
         DeselectMessageTypes(messageType.MessageSubtypes);
     }
 }
Пример #2
0
        public void SetAndDisplayDataFile(string filePath, MessageTypeCollection messageTypes)
        {
            DataFileInfo dataFileInfo = new DataFileInfo(filePath);

            SetDataFile(dataFileInfo);
            MyDataFile.ParseDataFromFileIntoBytes(filePath);
            DisplayDataFile(messageTypes);
        }
 private void RemoveMessageType(MessageTypeTreeModel toFind, MessageTypeCollection typeCollection)
 {
     if (typeCollection.Contains(toFind))
     {
         typeCollection.Remove(toFind);
     }
     else
     {
         foreach (MessageTypeTreeModel messageSubtype in typeCollection)
         {
             RemoveMessageType(toFind, messageSubtype.MessageSubtypes);
         }
     }
 }
        public MessageTypeTreeViewModel()
        {
            AddTypeCommand = new MyICommand <string>(OnAddType);
            DeleteCommand  = new MyICommand <MessageTypeTreeModel>(OnDelete);

            MessageTypes = new MessageTypeCollection
            {
                new MessageTypeTreeModel()
            };

            Vm_MessageFields = new MessageFieldViewModel()
            {
                AddWord      = new MyICommand <string>(OnAddWord),
                SubtractWord = new MyICommand <string>(OnSubtractWord)
            };
        }
Пример #5
0
 public void DisplayDataFile(MessageTypeCollection messageTypes)
 {
     BinaryMessages = messageTypes.ParseDataFromBytesIntoMessages(MyDataFile.bytes);
 }