Beispiel #1
0
 // Constructor...
 public CAvailableSource(int ab1, AvailableController fAvail1)  //, CLineupCard lineupCard1) {
 // ----------------------------------------------------------
 {
     abThis     = ab1;
     fAvail     = fAvail1;
     gm         = fAvail.g;
     lineupCard = fAvail1.lineupCard;
 }
Beispiel #2
0
        public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender)
        {
            // -----------------------------------------------------------------------------

            base.PrepareForSegue(segue, sender);
            char crit = 'a';

            switch (operation.type)
            {
            case 'h':
            case 'r':
                crit = 'n'; break;

            case 's':
                if (g.UsingDh && SelectedBatter.px > 0)
                {
                    crit = 'p';
                }
                else if (g.UsingDh && SelectedBatter.px == 0)
                {
                    crit = 'n';
                }
                else
                {
                    crit = 'a';
                }
                break;
            }

            if (segue.Identifier == "AvailableSegue_0")
            {
                switch (operation.type)
                {
                case 'h':
                case 'r':
                case 's':
                    fAvail = segue.DestinationViewController as AvailableController;
                    lineupCard.GetAvailable(crit);
                    fAvail.lineupCard    = lineupCard;
                    fAvail.g             = g;
                    fAvail.abMng         = abMng;
                    this.operation.abMng = abMng;
                    fAvail.operation     = this.operation;
                    break;

                case 'p':
                    // Change position
                    break;
                }
            }
            else if (segue.Identifier == "AvailableSegue_r")
            {
                // Pinch run...
            }
        }