Пример #1
0
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("SliderValue"))
     {
         GetComponent <SliderRainier>().value = (float)evt.NewValue;
     }
 }
Пример #2
0
        /// <summary>
        /// 处理命令系统业务逻辑
        /// </summary>
        /// <param name="evt"></param>
        public override void ProcessLogic(PropertyMessage evt)
        {
            //处理创建物体业务逻辑
            if (evt.PropertyName.Equals("CommandArgs"))
            {
                ICommandArgs _args = (ICommandArgs)evt.NewValue;
                if (!_args.GetCommandName().ToLower().Equals("create"))
                {
                    return;
                }

                //获取创建参数
                CreateCommandArgs args = (CreateCommandArgs)evt.NewValue;
                if (args.prefabsPath == null || args.prefabsPath.Equals(""))
                {
                    return;
                }

                //新建创建命令并执行命令(注意命令执行方法是让命令堆栈执行Execute)
                CommandPartCreate cmd = new CommandPartCreate();
                cmd.Position   = args.Position;
                cmd.PartPrefab = args.prefabsPath;
                _CommandService.GetCommandStack().Execute(cmd);
                return;
            }
        }
Пример #3
0
 /// <summary>
 /// 业务逻辑处理函数
 /// </summary>
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("SpeedZ"))
     {
         speedZ = (float)evt.NewValue;
     }
 }
Пример #4
0
        /// <summary>
        /// 处理命令系统业务逻辑
        /// </summary>
        /// <param name="evt"></param>
        public override void ProcessLogic(PropertyMessage evt)
        {
            //执行Undo操作
            if (evt.PropertyName.Equals("CommandArgs"))
            {
                ICommandArgs _args = (ICommandArgs)evt.NewValue;
                if (!_args.GetCommandName().ToLower().Equals("undo"))
                {
                    return;
                }
                _CommandService.GetCommandStack().Undo();
                return;
            }

            //执行Redo操作
            if (evt.PropertyName.Equals("CommandArgs"))
            {
                ICommandArgs _args = (ICommandArgs)evt.NewValue;
                if (!_args.GetCommandName().ToLower().Equals("redo"))
                {
                    return;
                }
                _CommandService.GetCommandStack().Redo();
                return;
            }
        }
Пример #5
0
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("cameraRotX"))
     {
         UpdataCameraRotation((float)evt.NewValue);
     }
 }
Пример #6
0
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("TextContent"))
     {
         GetComponent <TextRainier>().text = evt.NewValue.ToString();
     }
 }
Пример #7
0
        /// <summary>
        /// 通过泛型处理模型数据变化(仅仅支持基本数据类型)
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="msg"></param>
        public void OnModelValueChangedStuff <T>(PropertyMessage msg)
        {
            //1、查表获取对应的view,如果没有对应条目则返回
            ViewBehaviour <T> _view = null;
            BindingItem       item  = _bindingTable.FindItemByEntityProperty(msg.TargetObject, msg.PropertyName);

            if (item.BindedEntity == null ||
                item.BindedEntityProperty.Equals("") ||
                item.BindedView == null ||
                item.BindedViewProperty.Equals(""))
            {
                return;
            }

            _view = (ViewBehaviour <T>)item.BindedView;

            //2、重置view状态
            if (_view.IsViewStateChanged)
            {
                _view.ResetViewState();
                return;
            }

            //3、更新界面显示
            if (!_view.Value.Equals((T)msg.NewValue))
            {
                _view.RefreshComponent((T)msg.NewValue);
            }
        }
Пример #8
0
        private static bool ValidateInstance()
        {
            PropertyMessage schemaInstance = new PropertyMessage();

            string outputFileName = string.Format("{0}.xml", new StackTrace().GetFrame(1).GetMethod().Name);
            return schemaInstance.ValidateInstance(outputFileName, Microsoft.BizTalk.TestTools.Schema.OutputInstanceType.XML);
        }
Пример #9
0
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("processNext"))
     {
         ProcessMgr.Instance.NextStepFunc();
     }
 }
Пример #10
0
        public override void ProcessLogic(PropertyMessage evt)
        {
            switch (evt.PropertyName)
            {
            case "point":
                transform.localPosition = (Vector3)evt.NewValue;
                break;

            case "currentState":
                int state = (int)evt.NewValue;
                switch (state)
                {
                //待机
                case 0:
                    NomalState();
                    break;

                //通话
                case 1:
                    DoingState();
                    break;

                //不在服务器
                case 2:
                    NotService();
                    break;
                }
                break;
            }
        }
Пример #11
0
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("Inputfile"))
     {
         inputField.text = (string)evt.NewValue;
     }
 }
Пример #12
0
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("tiShiStr"))
     {
         this.BuZhouTiShi((string)evt.NewValue);
     }
 }
Пример #13
0
        public override void ProcessLogic(PropertyMessage evt)
        {
            LandingUIEntity entity = (LandingUIEntity)GameObject.FindObjectOfType <LandingUiViewModel>().DataEntity;

            //Esc按钮
            if (evt.PropertyName.Equals("escBtn"))
            {
                if ((int)evt.NewValue > 0)
                {
                    Debug.Log("点击了退出按钮");
                }
            }
            //Landing按钮
            if (evt.PropertyName.Equals("landingBtn"))
            {
                if ((int)evt.NewValue > 0)
                {
                    if (!string.IsNullOrEmpty(entity.inputFieldText))
                    {
                        //答案校验
                        if (int.Parse(entity.inputFieldText).Equals(GetAnswer(entity)))
                        {
                            //开始场景切换
                            SenceLoadingDataEntity sceneEntity = (SenceLoadingDataEntity)GameObject.FindObjectOfType <SenceLoadingDataModel>().DataEntity;
                            sceneEntity.TargetSenceName = "031Main";
                            sceneEntity.IsShowLoadingUI = true;
                        }
                    }
                }
            }
        }
Пример #14
0
        public override void ProcessLogic(PropertyMessage evt)
        {
            switch (evt.PropertyName)
            {
            case "isOnSetting":
                if ((bool)evt.NewValue)
                {
                    setPanel.gameObject.transform.localScale  = Vector3.one;
                    helpPanel.gameObject.transform.localScale = Vector3.zero;
                    gamePanel.gameObject.transform.localScale = Vector3.zero;
                }
                break;

            case "isOnHelp":
                if ((bool)evt.NewValue)
                {
                    setPanel.gameObject.transform.localScale  = Vector3.zero;
                    helpPanel.gameObject.transform.localScale = Vector3.one;
                    gamePanel.gameObject.transform.localScale = Vector3.zero;
                }
                break;

            case "isOnGame":
                if ((bool)evt.NewValue)
                {
                    setPanel.gameObject.transform.localScale  = Vector3.zero;
                    helpPanel.gameObject.transform.localScale = Vector3.zero;
                    gamePanel.gameObject.transform.localScale = Vector3.one;
                }
                break;
            }
        }
Пример #15
0
        public override void ProcessLogic(PropertyMessage evt)
        {
            Debug.Log(evt.PropertyName);
            switch (evt.PropertyName)
            {
            case "readButton":
                if (evt.NewValue.ToString().Equals("0"))
                {
                    return;
                }
                //场景跳转
                ProjectTrigger.Instance.OnClickLoadSence_A();
                break;

            case "delButton":
                if (evt.NewValue.ToString().Equals("0"))
                {
                    return;
                }
                //删除当前的信息
                DelGameObject();
                break;

            case "itemName":
                Debug.Log(evt.NewValue);
                transform.Find("Label").GetComponent <Text>().text = evt.NewValue.ToString();
                break;
            }
        }
Пример #16
0
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("tweenArgs"))
     {
         DoSelfTween(evt);
     }
 }
Пример #17
0
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("inputContent"))
     {
         Debug.Log(evt.NewValue);
     }
 }
Пример #18
0
        public override void ProcessLogic(PropertyMessage evt)
        {
            Debug.Log(evt.PropertyName);
            switch (evt.PropertyName)
            {
            case "watchTableList#Add":
                Debug.Log(evt.NewValue);
                break;

            case "watchTableList#Remove":
                Debug.Log(evt.NewValue);
                break;

            case "watchTableListStruct#RemoveAt":
                Debug.Log(evt.NewValue);
                break;

            case "watchTableList#Clear":
                Debug.Log(evt.NewValue);
                break;

            case "watchTableList#Insert":
                Debug.Log(evt.NewValue);
                break;

            case "watchTableList#[]":
                Debug.Log(evt.NewValue);
                break;
            }
        }
Пример #19
0
        public override void ProcessLogic(PropertyMessage evt)
        {
            switch (evt.PropertyName)
            {
            //添加一个进入信号范围的手机
            case "currentExistList#Add":
                AddEnterPhone();
                break;

            //移除一个进入信号范围的手机
            case "currentExistList#Remove":
                RemoveEnterPhone();
                break;

            //添加一个使用的记录
            case "currenUseDic#Add":
                AddUsePhone(evt);
                break;

            //移除一个使用的记录
            case "currenUseDic#Remove":
                RemoveUsePhone();
                break;

            default:
                break;
            }
        }
Пример #20
0
        public override void ProcessLogic(PropertyMessage evt)
        {
            switch (evt.PropertyName)
            {
            case "dropdown":
                SettingLinkShow(((int )evt.NewValue));
                break;

            case "linkList":
                linkList.text = evt.NewValue.ToString();
                break;

            case "btnSure":
                if (evt.OldValue != evt.NewValue)
                {
                    UIActveFalse();
                }
                break;

            case "isShow":
                bool isShow = (bool)evt.NewValue;
                if (isShow)
                {
                    UIActveTrue();
                }
                else
                {
                    UIActveFalse();
                }
                break;
            }
        }
Пример #21
0
        /// <summary>
        /// 处理业务逻辑切换
        /// </summary>
        /// <param name="evt"></param>
        public override void ProcessLogic(PropertyMessage evt)
        {
            if (evt.PropertyName.Equals("SwitchToTargetWorkflow"))
            {
                Debug.Log(evt.NewValue);
                WorkflowLogic newLogic = GetWorkflowByName((string)evt.NewValue);
                if (newLogic != null)
                {
                    this.Previous = this.Current;
                    this.Current  = newLogic;

                    if (this.Previous != null)
                    {
                        Previous.OnExit();
                    }
                    if (Current != null)
                    {
                        Current.OnEnter();
                    }
                }
                else
                {
                    throw new WorkflowException("The target work flow cloud't found.");
                }
            }
        }
Пример #22
0
        public override void ProcessLogic(PropertyMessage evt)
        {
            switch (evt.PropertyName)
            {
            case "newButton":
                if ((int)evt.NewValue == 0)
                {
                    return;
                }
                transform.GetChild(0).gameObject.SetActive(false);
                transform.GetChild(1).gameObject.SetActive(true);
                //场景跳转
                ProjectTrigger.Instance.OnClickLoadSence_A();
                break;

            case "saveButton":
                if ((int)evt.NewValue == 0)
                {
                    return;
                }
                AddItem();
                break;

            case "isOpenMenu":
                if ((int)evt.NewValue == 0)
                {
                    return;
                }
                transform.GetChild(0).gameObject.SetActive(true);
                transform.GetChild(1).gameObject.SetActive(false);
                break;
            }
        }
Пример #23
0
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("intensity"))
     {
         float intensity = (float)evt.NewValue;
         GetComponent <RainierSettingModel>().DirectionalLight.intensity = intensity;
     }
 }
Пример #24
0
        private static bool ValidateInstance()
        {
            PropertyMessage schemaInstance = new PropertyMessage();

            string outputFileName = string.Format("{0}.xml", new StackTrace().GetFrame(1).GetMethod().Name);

            return(schemaInstance.ValidateInstance(outputFileName, Microsoft.BizTalk.TestTools.Schema.OutputInstanceType.XML));
        }
Пример #25
0
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("scrollbarValue"))
     {
         var _entity = ((MvvmScrollBarEntity)GetComponent <MvvmScrollBarModel>().DataEntity);
         _entity.context = (1 - (float)evt.NewValue).ToString();
     }
 }
Пример #26
0
 /// <summary>
 /// 收到消息,处理旋转事件
 /// </summary>
 /// <param name="evt"></param>
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("ToggleIsOn"))
     {
         bool value = (bool)evt.NewValue;
         GetComponent <ToggleRanier>().isOn = value;
     }
 }
Пример #27
0
 public override void ProcessLogic(PropertyMessage evt)
 {
     base.ProcessLogic(evt);
     if (evt.PropertyName.Equals("number"))
     {
         transform.localPosition += Vector3.one * (int)evt.NewValue;
     }
 }
Пример #28
0
 /// <summary>
 /// 收到消息
 /// </summary>
 /// <param name="evt"></param>
 public override void ProcessLogic(PropertyMessage evt)
 {
     //UI开关处理
     if (evt.PropertyName.Equals("isShow"))
     {
         transform.GetChild(0).gameObject.SetActive((bool)evt.NewValue);
     }
 }
Пример #29
0
 /// <summary>
 /// 收到消息
 /// </summary>
 /// <param name="evt"></param>
 public override void ProcessLogic(PropertyMessage evt)
 {
     //执行刷新文本
     if (evt.PropertyName.Equals("context"))
     {
         GetComponent <Text>().text = evt.NewValue.ToString();
     }
 }
Пример #30
0
        public override void ProcessLogic(PropertyMessage evt)
        {
            switch (evt.PropertyName)
            {
            case "ringUp":
                if (evt.OldValue == evt.NewValue)
                {
                    return;
                }
                Debug.Log("ringUp" + ":" + evt.NewValue);
                _communicationEntity.isCanRingUp   = false;
                _communicationEntity.isCellStandby = true;
                break;

            case "cellStandby":
                if (evt.OldValue == evt.NewValue)
                {
                    return;
                }
                _communicationEntity.isCellStandby = false;
                Debug.Log("cellStandby" + ":" + evt.NewValue);
                ClosePhone();
                break;

            case "isCanRingUp":
                Debug.Log("cellStandby" + ":" + evt.NewValue);
                bool active = (bool)evt.NewValue;
                GameObject.Find("RingUp").GetComponent <Button>().interactable = active;
                break;

            case "isCellStandby":
                Debug.Log("cellStandby" + ":" + evt.NewValue);
                active = (bool)evt.NewValue;
                GameObject.Find("CellStandby").GetComponent <Button>().interactable = active;
                break;

            case "phoneNumber":
                Debug.Log("cellStandby" + ":" + evt.NewValue);
                if (!string.IsNullOrEmpty(evt.NewValue.ToString()))
                {
                    //当前是否在服务区
                    IphoneEntity entity = (IphoneEntity)GameObject.Find("ball1").GetComponent <IphoneModel>().DataEntity;
                    if (entity.areaID != -1)
                    {
                        _communicationEntity.isCanRingUp = true;
                    }
                    else
                    {
                        _communicationEntity.isCanRingUp = false;
                    }
                }
                else
                {
                    _communicationEntity.isCanRingUp = false;
                }
                break;
            }
        }
Пример #31
0
 public override void ProcessLogic(PropertyMessage evt)
 {
     if (evt.PropertyName.Equals("textSize"))
     {
         float newSize = (float)evt.NewValue;
         Text  text    = gameObject.transform.Find("HelloText").GetComponent <Text>();
         text.transform.localScale = new Vector3(newSize, newSize);
     }
 }