private void CbTypeSelect_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (IsLoaded)
     {
         TypeChanged?.Invoke(this, e);
     }
 }
Пример #2
0
        private void PopulateDecoratorNodes(GenericMenu menu, BonsaiNode node)
        {
            var decorators = BonsaiEditor.RegisteredBehaviourNodeTypes.Where(t => t.IsSubclassOf(typeof(BTAuxiliary)) && !t.IsAbstract);

            foreach (var subclass in decorators)
            {
                menu.AddItem(new GUIContent("Decorator/" + subclass.Name), false, () =>
                {
                    CreateNodeRequest?.Invoke("Decorator", subclass);
                    TypeChanged?.Invoke(this, node);
                });
            }
        }
        private void PopulateTypeConversions(GenericMenu menu, BonsaiNode node)
        {
            Type coreType       = BonsaiEditor.CoreType(node.Behaviour);
            var  behaviourTypes = BonsaiEditor.RegisteredBehaviourNodeTypes;

            foreach (Type subclass in behaviourTypes.Where(t => t.IsSubclassOf(coreType) && !t.IsAbstract))
            {
                menu.AddItem(new GUIContent("Change Type/" + subclass.Name), false, () =>
                {
                    EditorChangeNodeType.ChangeType(node, subclass);
                    TypeChanged?.Invoke(this, node);
                });
            }
        }
Пример #4
0
        public NetPoint(string nam, string desc, int lenght, Point loc)
        {
            name        = nam;
            description = desc;
            time        = lenght;
            location    = loc;
            connected.CollectionChanged += ChangeInside;
            TypeChanged?.Invoke(this, EventArgs.Empty);
            string dict = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

            for (int i = 0; i < 8; i++)
            {
                Random rnd = new Random();
                id += dict[rnd.Next(dict.Count() - 1)];
            }
        }
Пример #5
0
 private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (!IsLoaded)
     {
         return;
     }
     if (MainType.Equals("CAST"))
     {
         cbSecondType.Visibility = Visibility.Visible;
         Appear(cbSecondType);
     }
     else if (cbSecondType.Visibility == Visibility.Visible)
     {
         cbSecondType.Visibility = Visibility.Hidden;
         Disappear(cbSecondType);
     }
     TypeChanged?.Invoke(this, e);
 }
 private void OnTypeChanged(object sender, IProductType productType)
 {
     TypeChanged?.Invoke(this, productType);
 }
Пример #7
0
 protected void OnTypeChanged(CellTypeChangedEventArgs arg)
 {
     TypeChanged?.Invoke(this, arg);
 }