private void FindActivity()
        {
            ActivityName = "Neznáma";


            CleaningDetection cleaningDetection = new CleaningDetection();
            Boolean           cleaning          = cleaningDetection.DetectCleaning(_context, StartdateTime, StopdateTime, _roomStatistics.Sekvencie.Count, tepListConst, teplotaListConst);

            if (cleaning)
            {
                ActivityName = "Pohyb";
            }

            SleepDetection sleepDetection = new SleepDetection();
            Boolean        sleep          = sleepDetection.DetectSleep(_context, _roomStatistics.RoomName, StartdateTime, StopdateTime, _roomStatistics.Sekvencie.Count, tepListConst);

            if (sleep)
            {
                ActivityName = "Spánok";
            }

            CookDetection cookDetection = new CookDetection();
            Boolean       cook          = cookDetection.DetectCooking(_context, _roomStatistics.RoomName, StartdateTime, StopdateTime, _roomStatistics.Sekvencie.Count, tepListConst, teplotaListConst);

            if (cook)
            {
                ActivityName = "Pohyb";
            }

            OutsideRestDetection outsideRestDetection = new OutsideRestDetection();
            Boolean outside = outsideRestDetection.DetectOutsideRest(_context, _roomStatistics.RoomName, StartdateTime, StopdateTime, _roomStatistics.Sekvencie.Count, tepListConst, teplotaListConst);

            if (outside)
            {
                ActivityName = "Oddych";
            }
            RestDetection restDetection = new RestDetection();
            Boolean       rest          = restDetection.DetectRest(_context, _roomStatistics.RoomName, StartdateTime, StopdateTime, _roomStatistics.Sekvencie.Count, tepListConst);

            if (rest)
            {
                ActivityName = "Oddych";
            }

            if (fallList.Any() && !ActivityName.Equals("Pohyb"))
            {
                ActivityName = "Neznáma";
            }
            System.Diagnostics.Debug.WriteLine("************ ACTIVITY sleep: " + sleep.ToString() + " cook: " + cook);
        }
Пример #2
0
    // Use this for initialization
    //하단메뉴 버튼
    public void Button()
    {
        Debug.Log(this.name);
//		if(Application.loadedLevelName.Equals("SceneMain 1")){
//			mReservedName = this.name;
//			AutoFade.LoadLevel ("SceneLobby", 0f, 1f);
//			return;
//		}

        switch (this.name)
        {
        case "Home":         //홈
            if (mActName.Equals(ActivityName.Home))
            {
                return;
            }

            if (mScroll.transform.FindChild("Main") != null)
            {
                AllOff();
                Off();
                mScroll.transform.FindChild("GameInfo").gameObject.SetActive(false);
                mScroll.transform.FindChild("Main").gameObject.SetActive(true);
            }
            else
            {
                AutoFade.LoadLevel("SceneLobby", 0f, 1f);
            }

            SetHighlight(ActivityName.Home);
            break;

        case "Ball":         //경기경보
            if (mActName.Equals(ActivityName.MatchInfo))
            {
                return;
            }

            AllOff();
            Off();
            if (Application.loadedLevelName.Equals("SceneMain 1"))
            {
                if (mScroll.transform.FindChild("GameInfo").gameObject.activeSelf)
                {
                    mScroll.transform.FindChild("GameInfo").gameObject.SetActive(false);
                    if (Application.loadedLevelName.Equals("SceneMain 1"))
                    {
                        transform.root.FindChild("Scroll").FindChild("ContestIn").localPosition = new Vector3(0, 0, 0);
                    }
                }
                else
                {
                    if (Application.loadedLevelName.Equals("SceneMain 1"))
                    {
                        transform.root.FindChild("Scroll").FindChild("ContestIn").localPosition = new Vector3(-720, 0, 0);
                    }
                    mScroll.transform.FindChild("GameInfo").gameObject.SetActive(true);
                    mScroll.transform.FindChild("GameInfo").GetComponent <ScriptGameInfo>().Init();
                }
            }
            else
            {
//				AllOff();
//				Off();
                mScroll.transform.FindChild("GameInfo").gameObject.SetActive(false);
                mScroll.transform.FindChild("GameInfo").gameObject.SetActive(true);
                mScroll.transform.FindChild("GameInfo").GetComponent <ScriptGameInfo>().Init();
            }

            SetHighlight(ActivityName.MatchInfo);
            break;

        case "Challenge":         //Store
            if (mActName.Equals(ActivityName.Store))
            {
                return;
            }

            AllOff();

            transform.root.FindChild("TF_Items").gameObject.SetActive(true);
//			transform.root.FindChild ("Camera").localPosition = new Vector3(0,Y);
//			transform.root.FindChild("Scroll").FindChild ("RightMenu").GetComponent<BoxCollider2D> ().enabled = false;
//			transform.root.FindChild("Scroll").FindChild ("RightMenu").FindChild("Shadow").GetComponent<BoxCollider2D> ().enabled = false;
//			mScroll.transform.FindChild("Bot").FindChild("Home").GetComponent<UIButton>().enabled = true;
//			mScroll.transform.FindChild("Bot").FindChild("Ball").GetComponent<UIButton>().enabled = true;
//			mScroll.transform.FindChild("Bot").FindChild("Challenge").GetComponent<UIButton>().enabled = true;
//			mScroll.transform.FindChild("Bot").FindChild("---").GetComponent<UIButton>().enabled = true;
//			mScroll.transform.FindChild("Bot").FindChild("Post").GetComponent<UIButton>().enabled = true;
//			GetComponent<UIButton>().enabled = false;
//			if(transform.FindChild("Scroll View").gameObject.activeSelf){
//				transform.FindChild("Scroll View").gameObject.SetActive(false);
//			}else{
//				transform.FindChild("Scroll View").gameObject.SetActive(true);
//			}

            SetHighlight(ActivityName.Store);
            break;

        case "BtnPost":         //Post
            if (mActName.Equals(ActivityName.Post))
            {
                return;
            }

            AllOff();
            GetComponent <PostButton>().on();

            SetHighlight(ActivityName.Post);

            break;

        case "---":         //우측메뉴
            //Debug.Log("4");
            PositionCheck();
//			GetComponent<UIButton>().enabled = true;
            break;
//		case 5:
//		//	Debug.Log("NON");
//			ScrollViewOff();
//
//			break;
        }
    }
Пример #3
0
        /// <summary>
        /// Returns true if ProcessInfo instances are equal
        /// </summary>
        /// <param name="other">Instance of ProcessInfo to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ProcessInfo other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     StateName == other.StateName ||
                     StateName != null &&
                     StateName.Equals(other.StateName)
                 ) &&
                 (
                     ActivityName == other.ActivityName ||
                     ActivityName != null &&
                     ActivityName.Equals(other.ActivityName)
                 ) &&
                 (
                     SchemeId == other.SchemeId ||
                     SchemeId != null &&
                     SchemeId.Equals(other.SchemeId)
                 ) &&
                 (
                     SchemeCode == other.SchemeCode ||
                     SchemeCode != null &&
                     SchemeCode.Equals(other.SchemeCode)
                 ) &&
                 (
                     PreviousState == other.PreviousState ||
                     PreviousState != null &&
                     PreviousState.Equals(other.PreviousState)
                 ) &&
                 (
                     PreviousStateForDirect == other.PreviousStateForDirect ||
                     PreviousStateForDirect != null &&
                     PreviousStateForDirect.Equals(other.PreviousStateForDirect)
                 ) &&
                 (
                     PreviousStateForReverse == other.PreviousStateForReverse ||
                     PreviousStateForReverse != null &&
                     PreviousStateForReverse.Equals(other.PreviousStateForReverse)
                 ) &&
                 (
                     PreviousActivity == other.PreviousActivity ||
                     PreviousActivity != null &&
                     PreviousActivity.Equals(other.PreviousActivity)
                 ) &&
                 (
                     PreviousActivityForDirect == other.PreviousActivityForDirect ||
                     PreviousActivityForDirect != null &&
                     PreviousActivityForDirect.Equals(other.PreviousActivityForDirect)
                 ) &&
                 (
                     PreviousActivityForReverse == other.PreviousActivityForReverse ||
                     PreviousActivityForReverse != null &&
                     PreviousActivityForReverse.Equals(other.PreviousActivityForReverse)
                 ) &&
                 (
                     ParentProcessId == other.ParentProcessId ||
                     ParentProcessId != null &&
                     ParentProcessId.Equals(other.ParentProcessId)
                 ) &&
                 (
                     RootProcessId == other.RootProcessId ||
                     RootProcessId != null &&
                     RootProcessId.Equals(other.RootProcessId)
                 ) &&
                 (
                     InstanceStatus == other.InstanceStatus ||
                     InstanceStatus != null &&
                     InstanceStatus.Equals(other.InstanceStatus)
                 ) &&
                 (
                     Transitions == other.Transitions ||
                     Transitions != null &&
                     Transitions.SequenceEqual(other.Transitions)
                 ) &&
                 (
                     History == other.History ||
                     History != null &&
                     History.SequenceEqual(other.History)
                 ) &&
                 (
                     ProcessParameters == other.ProcessParameters ||
                     ProcessParameters != null &&
                     ProcessParameters.Equals(other.ProcessParameters)
                 ));
        }
Пример #4
0
 public bool Matched(string activityName)
 {
     return(ActivityName.Equals(activityName));
 }