Exemplo n.º 1
0
        public PunchType BizAction(PunchTypeDto inputData)
        {
            if (string.IsNullOrWhiteSpace(inputData.Name))
            {
                AddError("Punch Type Name is Required.");
                return(null);
            }

            if (inputData.WorkPackagepr == null)
            {
                AddError("Please insert value for workpackages percentage");
                return(null);
            }

            var desStatus = PunchType.CreatePunchType(inputData.Name, inputData.ProjectId, inputData.WorkPackagepr);

            CombineErrors(desStatus);

            if (!HasErrors)
            {
                _dbAccess.Add(desStatus.Result);
            }

            return(HasErrors ? null : desStatus.Result);
        }
Exemplo n.º 2
0
        public override void Reset()
        {
            base.Reset();

            punchType = PunchType.Position;
            value     = null;
        }
Exemplo n.º 3
0
 public static Punch Create(PunchType type)
 {
     return(new Punch
     {
         Type = type,
         DateAdded = DateTime.Now
     });
 }
Exemplo n.º 4
0
    public Sprite    cardImage;   //Image to be displayed on card

    public Card(string _title, int _cost, int _damage, int _charges, PunchType _type, Sprite _sprite)
    {
        cardTitle   = _title;
        staminaCost = _cost;
        damage      = _damage;
        charges     = _charges;
        cardType    = _type;
        cardImage   = _sprite;
    }
Exemplo n.º 5
0
        private char ConvertToPunchTypeChar(PunchType punchType)
        {
            switch (punchType)
            {
            case PunchType.PunchIn:
                return('E');

            case PunchType.PunchOut:
                return('S');

            default:
                return('0');
            }
        }
 public void updatePunch(PunchType punchType, bool isActive)
 {
 }
Exemplo n.º 7
0
 //true: right / false: left
 public void ActivatePunch(PunchType hand)
 {
     if (hand == PunchType.Right && rightPunchObj != null)
     {
         rightPunchObj.SetActive(true);
         PunchFXCtrl[] ctrls = rightPunchObj.GetComponentsInChildren<PunchFXCtrl>();
         foreach (var ctrl in ctrls)
             ctrl.PlayFX();
     }
     else if (hand == PunchType.Left && leftPunchObj != null)
     {
         leftPunchObj.SetActive(true);
         PunchFXCtrl[] ctrls = leftPunchObj.GetComponentsInChildren<PunchFXCtrl>();
         foreach (var ctrl in ctrls)
             ctrl.PlayFX();
     }
 }
Exemplo n.º 8
0
 //true: right / false: left
 public void DeactivatePunch(PunchType hand)
 {
     if (hand == PunchType.Right && rightPunchObj != null)
         rightPunchObj.SetActive(false);
     else if (hand == PunchType.Left && leftPunchObj != null)
         leftPunchObj.SetActive(false);
 }
Exemplo n.º 9
0
 public void updatePunch(PunchType punch, bool active)
 {
 }
Exemplo n.º 10
0
 public void UpdateProperties(Punch punch)
 {
     DateTime  = punch.DateTime;
     PunchType = punch.PunchType;
 }
Exemplo n.º 11
0
 public Punch(PunchViewModel viewModel)
 {
     EmployeeId = viewModel.EmployeeId;
     DateTime   = viewModel.DateTime;
     PunchType  = viewModel.PunchTypeEnum;
 }
 public void Delete(PunchType punchType)
 {
     _context.PunchTypes.Remove(punchType);
 }
Exemplo n.º 13
0
 public PunchLanded(PunchType type, int value)
 {
     Type  = type;
     Value = value;
 }
Exemplo n.º 14
0
    public static Deck Load(TextAsset file)
    {
        Deck returnDeck = new Deck("", 10);

        string       loadedString;
        StringReader sr = new StringReader(file.text);

        loadedString = sr.ReadLine();
        char[] delim = { ',' };

        returnDeck.Title = loadedString;

        while ((loadedString = sr.ReadLine()) != null)
        {
            string[] split = loadedString.Split(delim);

            string    title = "";
            int       cost = 0, damage = 0, charges = 0;
            PunchType type   = 0;
            Sprite    sprite = null;

            for (int i = 0; i < split.GetLength(0); i++)
            {
                switch (i)
                {
                case 0:
                    title = split[i];
                    break;

                case 1:
                    cost = System.Convert.ToInt32(split[i]);
                    break;

                case 2:
                    damage = System.Convert.ToInt32(split[i]);
                    break;

                case 3:
                    charges = System.Convert.ToInt32(split[i]);
                    break;

                case 4:
                    type = (PunchType)System.Convert.ToInt32(split[i]);
                    break;

                case 5:
                    sprite = loadImage(split[i]);
                    break;

                default:
                    Debug.Log("THIS SHOULDNT HAPPEN!!!! BAD!!");
                    break;
                }
            }

            Card readCard = new Card(title, cost, damage, charges, type, sprite);

            returnDeck.Push(readCard);
        }

        return(returnDeck);
    }
Exemplo n.º 15
0
 public WorkPackagePunchType(PunchType punchType, WorkPackage workPackage)
 {
     this.PunchType   = PunchType;
     this.WorkPackage = workPackage;
 }
 public void Add(PunchType punchType)
 {
     _context.PunchTypes.Add(punchType);
 }