Exemplo n.º 1
0
        protected override void OnProcessOutputSchema(MutableObject newSchema)
        {
            var elementList = EntryField.GetFirstValue(newSchema) as IEnumerable <MutableObject>;

            if (elementList == null)
            {
                Debug.LogError("This isn't a valid schema!  The entries field is empty!");
            }

            var singleSchema = elementList.First();
            var multiSchema  = new MutableObject();

            multiSchema.Add("Entries", elementList);

            NormalState.TransmitSchema(singleSchema);
            SelectedState.TransmitSchema(singleSchema);
            NoneSelectedState.TransmitSchema(singleSchema);

            NormalStateMulti.TransmitSchema(multiSchema);
            SelectedStateMulti.TransmitSchema(multiSchema);
            NoneSelectedStateMulti.TransmitSchema(multiSchema);
        }
Exemplo n.º 2
0
        protected override void OnProcessOutputSchema(MutableObject newSchema)
        {
            var entry = EntryField.GetEntries(newSchema);

            var foundEntries = entry.ToList();

            if (!foundEntries.Any())
            {
                Debug.Log("No valid entries in " + EntryField.AbsoluteKey);
                Router.TransmitAllSchema(new MutableObject());
                return;
            }

            MutableObject outMutable = null;

            foreach (var foundEntry in EntryField.GetEntries(newSchema))
            {
                outMutable = foundEntry.Last();
                break;
            }

            NormalState.TransmitSchema(outMutable);
            SelectedState.TransmitSchema(outMutable);
            NoneSelectedState.TransmitSchema(outMutable);

            var multiSchema = new MutableObject()
            {
                { "Entries", new List <MutableObject> {
                      outMutable
                  } }
            };

            NormalStateMulti.TransmitSchema(multiSchema);
            SelectedStateMulti.TransmitSchema(multiSchema);
            NoneSelectedStateMulti.TransmitSchema(multiSchema);
        }