예제 #1
0
        public BrickCollection GetActionTemplatesForCategry(BrickCategory category)
        {
            BrickCollection actions;

            switch (category)
            {
            case BrickCategory.Control:
                actions = Application.Current.Resources["ActionsAddDataControl"] as BrickCollection;
                break;

            case BrickCategory.Looks:
                actions = Application.Current.Resources["ActionsAddDataLook"] as BrickCollection;
                break;

            case BrickCategory.Motion:
                actions = Application.Current.Resources["ActionsAddDataMovement"] as BrickCollection;
                break;

            case BrickCategory.Sounds:
                actions = Application.Current.Resources["ActionsAddDataSound"] as BrickCollection;
                break;

            case BrickCategory.Variables:
                actions = Application.Current.Resources["ActionsAddDataVariables"] as BrickCollection;
                break;

            default:
                throw new ArgumentException("category not known");
            }

            return(actions);
        }
        public BrickCollection GetActionTemplatesForCategry(BrickCategory category)
        {
            BrickCollection actions;

            switch (category)
            {
                case BrickCategory.Control:
                    actions = Application.Current.Resources["ActionsAddDataControl"] as BrickCollection;
                    break;

                case BrickCategory.Looks:
                    actions = Application.Current.Resources["ActionsAddDataLook"] as BrickCollection;
                    break;

                case BrickCategory.Motion:
                    actions = Application.Current.Resources["ActionsAddDataMovement"] as BrickCollection;
                    break;

                case BrickCategory.Sounds:
                    actions = Application.Current.Resources["ActionsAddDataSound"] as BrickCollection;
                    break;

                case BrickCategory.Variables:
                    actions = Application.Current.Resources["ActionsAddDataVariables"] as BrickCollection;
                    break;
                default:
                    throw new ArgumentException("category not known");
            }

            return actions;
        }
 private void ScriptBrickCategoryReceivedMessageAction(GenericMessage<BrickCategory> message)
 {
     _selectedBrickCategory = message.Content;
 }
 private void ScriptBrickCategoryReceivedMessageAction(GenericMessage <BrickCategory> message)
 {
     _selectedBrickCategory = message.Content;
 }