Ejemplo n.º 1
0
        public override void Initialize(IComponent component)
        {
            base.Initialize(component);

            // スマートタグ追加
            ActionLists.Add(new UC1DesignerActionList(component));
        }
Ejemplo n.º 2
0
        public override void Initialize(IComponent component)
        {
            base.Initialize(component);

            m_selectionService = GetService(typeof(ISelectionService)) as ISelectionService;

            if (m_selectionService != null)
            {
                m_selectionService.SelectionChanged += SelectionService_SelectionChanged;
            }

            ActionLists.Add(new PopupDesignerActionList(this, this.Component));
            UpdateVisibility();
        }
Ejemplo n.º 3
0
        public override void ParseData(JObject data, int requestType = 0)
        {
            if (data["result"] != null)
            {
                JToken result = (JToken)data["result"];
                switch (requestType)
                {
                case (int)TrainingReqType.GET_DETECTION_INFO:
                    // Store actions lists
                    // Training Action
                    JArray jActionsArr = (JArray)result["actions"];
                    foreach (var item in jActionsArr)
                    {
                        ActionLists.Add((string)item);
                    }
                    // Training Control
                    JArray jControlArr = (JArray)result["controls"];
                    foreach (var item in jControlArr)
                    {
                        ControlLists.Add((string)item);
                    }
                    // Training Events
                    JArray jEventArr = (JArray)result["events"];
                    foreach (var item in jEventArr)
                    {
                        EventLists.Add((string)item);
                    }
                    break;

                case (int)TrainingReqType.CREATE_NEW_PROFILE:
                    Console.WriteLine("Create Profile Successfully");
                    break;

                case (int)TrainingReqType.LOAD_PROFILE:
                    IsLoaded = true;
                    Console.WriteLine("Load Profile Successfully");
                    break;

                case (int)TrainingReqType.SAVE_PROFILE:
                    Console.WriteLine("Save Profile Successfully");
                    break;

                case (int)TrainingReqType.UPLOAD_PROFILE:
                    Console.WriteLine("Upload Profile Successfully");
                    break;

                case (int)TrainingReqType.QUERY_PROFILE_LIST:
                    Console.WriteLine("Querry Profile Successfully");
                    JArray        jProfileArr  = (JArray)result;
                    List <string> profileLists = new List <string>();
                    foreach (var item in jProfileArr)
                    {
                        profileLists.Add((string)item);
                    }
                    if (profileLists.Count > 0)
                    {
                        ProfileLists = profileLists.ToList();
                    }
                    else
                    {
                        ProfileLists.Clear();
                    }
                    break;

                case (int)TrainingReqType.MCC_START:
                case (int)TrainingReqType.MCC_ACCEPT:
                case (int)TrainingReqType.MCC_REJECT:
                case (int)TrainingReqType.MCC_RESET:
                    Console.WriteLine("Mental Command Training: " + (string)result);
                    break;

                case (int)TrainingReqType.FE_START:
                case (int)TrainingReqType.FE_ACCEPT:
                case (int)TrainingReqType.FE_REJECT:
                case (int)TrainingReqType.FE_RESET:
                    Console.WriteLine("Facial Expression Training: " + (string)result);
                    break;

                default:
                    break;
                }
            }
        }
Ejemplo n.º 4
0
 public override void Initialize(IComponent component)
 {
     base.Initialize(component);
     ActionLists.Add(new ControllerActionList(component));
 }