public CustomCommandText(string command, string ReturnTextType, CCType _ccType, string _creator)
 {
     myCCType          = _ccType;
     CommandName       = command;
     TextReturnCommand = ReturnTextType;
     Creator           = _creator;
 }
Exemple #2
0
    internal override void Walk()
    {
        CCTypeSet cts = Stack.Peek(0);

        Stack.Peek(1).CheckInt();
        CCTypeSet mv = null;

        foreach (CCType tos in cts)
        {
            tos.xType.CheckExtends(owner);
            CCType tos2 = tos.GetEmbedded(
                owner.GetArrayElementType());
            CCTypeSet vt = new CCTypeSet(tos2);
            if (vt != null)
            {
                if (mv == null)
                {
                    mv = vt;
                }
                else
                {
                    mv = CCTypeSet.Merge(mv, vt);
                }
            }
        }
        if (mv != null)
        {
            next.MergeStack(Stack.Pop(2).Push(mv));
        }
    }
Exemple #3
0
    internal override void Walk()
    {
        CCTypeSet cts = Stack.Peek(0);

        Stack.Peek(1).CheckInt();
        CCTypeSet mv = null;

        foreach (CCType tos in cts)
        {
            tos.xType.CheckExtends(owner);
            CCType    tos2 = tos.GetEmbedded(owner);
            CCStruct  cs   = CCStruct.Lookup(tos2);
            CCTypeSet vt   = cs.Get(owner.fieldInverseMapping[off]);
            if (vt != null)
            {
                if (mv == null)
                {
                    mv = vt;
                }
                else
                {
                    mv = CCTypeSet.Merge(mv, vt);
                }
            }
        }
        if (mv != null)
        {
            next.MergeStack(Stack.Pop(2).Push(mv));
        }
    }
Exemple #4
0
 public SkillEffect(StatusType statusType = StatusType.None, CCType ccType = CCType.None, int amount = 0, float duration = 0)
 {
     this.statusType = statusType;
     this.ccType     = ccType;
     this.amount     = amount;
     this.duration   = duration;
 }
Exemple #5
0
    internal void DoRefLocal(int num)
    {
        XType  xt = cfi.fi.localEmbedTypes[num];
        CCType ct = new CCType(xt, cfi.Entry, num, false);

        PropagateNext(Stack.Push(new CCTypeSet(ct)));
    }
Exemple #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CC"/> class.
 /// </summary>
 /// <param name="ChampName">Name of the champ.</param>
 /// <param name="Slot">The slot.</param>
 /// <param name="Range">The range.</param>
 /// <param name="RangeType">Type of the range.</param>
 /// <param name="Type">The type.</param>
 public CC(string ChampName, SpellSlot Slot, float Range, CCRange RangeType, CCType Type)
 {
     this.ChampName = ChampName;
     this.Slot = Slot;
     this.Range = Range;
     this.RangeType = RangeType;
     this.Type = Type;
 }
Exemple #7
0
        /// assign coordinates of Point to this CCPoint. sets type=NONE
//C++ TO C# CONVERTER NOTE: This 'CopyFrom' method was converted from the original copy assignment operator:
//ORIGINAL LINE: CCPoint& operator =(const Point &p)
        public CCPoint CopyFrom(Point p)
        {
            x    = p.x;
            y    = p.y;
            z    = p.z;
            type = CCType.NONE;
            return(this);
        }
Exemple #8
0
 public StaticColorCycle(int itemid, int hueb, int huee, TimeSpan freq, CCType type) : base(itemid)
 {
     m_HueBegin  = hueb;
     m_HueEnd    = huee;
     m_Frequency = freq;
     m_CycleType = type;
     UpdateColorCycling();
 }
Exemple #9
0
 public CycleData(Item i, int[] range, TimeSpan freq, CCType type)
 {
     m_Item      = i;
     m_Range     = range;
     m_Frequency = freq;
     m_Type      = type;
     m_Forward   = m_Type != CCType.ReverseLoop;
 }
Exemple #10
0
    internal void DoRefLocalIndexed(int off, int len)
    {
        Stack.Peek(0).CheckInt();
        XType  xt = cfi.fi.localEmbedTypes[off];
        CCType ct = new CCType(xt, cfi.Entry, off, false);

        PropagateNext(Stack.Pop().Push(new CCTypeSet(ct)));
    }
Exemple #11
0
		public XmlColorCycling(int hueb, int huee, double frequency, CCType type, double expiration) : base() {
			m_HueBegin = hueb;
			m_HueEnd = huee;
			m_Frequency = TimeSpan.FromSeconds(frequency);
			m_CycleType = type;
			if(expiration>0)
				Expiration = TimeSpan.FromSeconds(expiration);
		}
Exemple #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CC"/> class.
 /// </summary>
 /// <param name="ChampName">Name of the champ.</param>
 /// <param name="Slot">The slot.</param>
 /// <param name="Range">The range.</param>
 /// <param name="RangeType">Type of the range.</param>
 /// <param name="Type">The type.</param>
 public CC(string ChampName, SpellSlot Slot, float Range, CCRange RangeType, CCType Type)
 {
     this.ChampName = ChampName;
     this.Slot      = Slot;
     this.Range     = Range;
     this.RangeType = RangeType;
     this.Type      = Type;
 }
Exemple #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CC"/> class.
 /// </summary>
 /// <param name="ChampName">Name of the champ.</param>
 /// <param name="Slot">The slot.</param>
 /// <param name="Range">The range.</param>
 /// <param name="RangeType">Type of the range.</param>
 /// <param name="Type">The type.</param>
 /// <param name="d">The d.</param>
 public CC(string ChampName, SpellSlot Slot, float Range, CCRange RangeType, CCType Type, ConditionDelegate d)
 {
     this.ChampName = ChampName;
     this.Slot = Slot;
     this.Range = Range;
     this.RangeType = RangeType;
     this.Type = Type;
     this.NecessaryCondition = d;
 }
Exemple #14
0
        public ActionResult FullForm(FullFormVM model)
        {
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            if (!ModelState.IsValid)
            {
                model.States = LocationsManager.GetStates();
                return(View(model));
            }

            int ncid    = GetNcId();
            int visitId = GetVisitId();

            CustomerDT customer = new CustomerDT();

            customer.SiteId    = model.SiteId;
            customer.NcId      = ncid;
            customer.Email     = model.Email;
            customer.FirstName = model.FirstName;
            customer.LastName  = model.LastName;
            customer.Address   = model.Address;
            customer.City      = model.City;
            customer.StateId   = model.StateId;
            customer.ZipCode   = model.ZipCode;

            CreditCardDT cc = new CreditCardDT();

            cc.CardNumber = model.CardNumber;
            cc.CVV        = model.CVV;
            cc.ExpDate    = CreditCardHelper.GetExpDate(model.ExpMonth, model.ExpYear);
            CCType cardType = CCType.VISA;

            Enum.TryParse(model.CardType.ToString(), out cardType);
            cc.Type = cardType;

            var referrer = ReferrersManagers.GetReferrer(model.Referrer);

            try
            {
                customer = CustomersManager.NewCustomer(((SiteDT)ViewBag.Site), customer, cc, visitId, referrer.Id, false);
            }
            catch (Exception ex)
            {
                SendExceptionEmail(ex.ToString());
                CastleClub.BusinessLogic.Utils.EventViewer.Writte("CastleClub", "CastleClubFrontend", ex.Message + "\n" + ex.ToString(), System.Diagnostics.EventLogEntryType.Error);
            }

            if (customer != null)
            {
                ViewBag.Customer = customer;
            }
            else
            {
                return(View("Error"));
            }

            return(View("Welcome"));
        }
Exemple #15
0
		public override void Deserialize(GenericReader reader) {
			base.Deserialize(reader);
			int version = reader.ReadInt(); // Zippy is ghey
			m_HueBegin = reader.ReadInt();
			m_HueEnd = reader.ReadInt();
			m_Frequency = reader.ReadTimeSpan();
			m_CycleType = (CCType)reader.ReadInt();
			m_OriginalHue = reader.ReadInt();
		}
Exemple #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CC"/> class.
 /// </summary>
 /// <param name="ChampName">Name of the champ.</param>
 /// <param name="Slot">The slot.</param>
 /// <param name="Range">The range.</param>
 /// <param name="RangeType">Type of the range.</param>
 /// <param name="Type">The type.</param>
 /// <param name="d">The d.</param>
 public CC(string ChampName, SpellSlot Slot, float Range, CCRange RangeType, CCType Type, ConditionDelegate d)
 {
     this.ChampName          = ChampName;
     this.Slot               = Slot;
     this.Range              = Range;
     this.RangeType          = RangeType;
     this.Type               = Type;
     this.NecessaryCondition = d;
 }
Exemple #17
0
    internal static CCStruct Lookup(CCType ct)
    {
        CCStruct cs;

        if (!ALL.TryGetValue(ct, out cs))
        {
            cs      = new CCStruct(ct);
            ALL[ct] = cs;
        }
        return(cs);
    }
Exemple #18
0
        public static CCType ProcessValidation(string cardNumber)
        {
            cardNumber = cardNumber.Replace(" ", "").Replace("-", "");

            bool   passRegEx  = false;
            bool   passIssuer = false;
            bool   passLuhn   = false;
            bool   IsValid    = false;
            CCType CardType   = CCType.None;

            do
            {
                // Reg Ex check //
                Regex RegExNumber = new Regex(@"(?<firsttwo>(?<firstone>\d)\d)\d{11,14}");
                Match m           = RegExNumber.Match(cardNumber);
                passRegEx = m.Success;
                if (!passRegEx)
                {
                    break;
                }
                string number      = m.Groups[0].Value; // only digits //
                string firstNum    = m.Groups["firstone"].Value;
                int    firstTwoNum = int.Parse(m.Groups["firsttwo"].Value);
                passIssuer = (firstNum == "4") || ((firstTwoNum >= 51) && (firstTwoNum <= 55));
                if (!passIssuer)
                {
                    break;
                }
                if (firstNum == "4")
                {
                    CardType = CCType.VISA;
                }
                if ((firstTwoNum >= 51) && (firstTwoNum <= 55))
                {
                    CardType = CCType.MC;
                }
                // Now make Luhn check //
                passLuhn = LuhnCheck(number);
                if (!passLuhn)
                {
                    break;
                }
                //
                IsValid = true;
            } while (false);

            if (!IsValid)
            {
                return(CardType = CCType.None);
            }

            return(CardType);
        }
Exemple #19
0
        public static string GetString(CCType item)
        {
            switch (item)
            {
            case CCType.VISA: return("Visa");

            case CCType.MASTERCARD: return("Mastercard");

            case CCType.DISCOVER: return("Discover");
            }
            throw new InvalidOperationException();
        }
Exemple #20
0
 /*******
  * Access methods, that have the KeyCheck
  */
 public CardCollection this[CCType type, string key]
 {
     get
     {
         KeyCheck(type, key);
         return(dict[type + ":" + key]);
     }
     set
     {
         KeyCheck(type, key);
         dict[type + ":" + key] = value;
     }
 }
		public static void Add( Item i, int[] range, TimeSpan freq, CCType type ) {
			CycleData cd = GetCycleDataFor(i);
			if( cd == null )
				CycleTable.Add(new CycleData(i,range,freq,type));
			else {
				cd.HueRange = range;
				cd.Frequency = freq;
				cd.CycleType = type;
				cd.LastUpdate = DateTime.Now - freq;
				cd.Forward = cd.CycleType != CCType.ReverseLoop;
			}
			Start();
		}
Exemple #22
0
    internal override void Walk()
    {
        CCTypeSet cts = Stack.Peek(0);
        CCTypeSet sv  = Stack.Peek(1);

        foreach (CCType tos in cts)
        {
            tos.xType.CheckExtends(owner);
            CCType   tos2 = tos.GetEmbedded(owner);
            CCStruct cs   = CCStruct.Lookup(tos2);
            cs.Merge(owner.fieldInverseMapping[off], sv);
        }
        next.MergeStack(Stack.Pop(2));
    }
Exemple #23
0
        /********
         * Checks that the key is valid. If not, a clone of the
         * default value is added to the dictionary
         */
        private void KeyCheck(CCType type, string key)
        {
            string name = type + ":" + key;

            if (!dict.ContainsKey(name))
            {
                CardCollection ncc = new CardCollection(type)
                {
                    owner = this,
                    name  = key
                };
                dict[name] = ncc;
            }
        }
Exemple #24
0
    internal override void Walk()
    {
        CCTypeSet cts = Stack.Peek(0);

        Stack.Peek(1).CheckInt();
        CCTypeSet sv = Stack.Peek(2);

        foreach (CCType tos in cts)
        {
            tos.xType.CheckExtends(owner);
            CCType   tos2 = tos.GetEmbedded(owner);
            CCStruct cs   = CCStruct.Lookup(tos2);
            cs.Merge(0, sv);
        }
        next.MergeStack(Stack.Pop(3));
    }
Exemple #25
0
        public static void Add(Item i, int[] range, TimeSpan freq, CCType type)
        {
            CycleData cd = GetCycleDataFor(i);

            if (cd == null)
            {
                CycleTable.Add(new CycleData(i, range, freq, type));
            }
            else
            {
                cd.HueRange   = range;
                cd.Frequency  = freq;
                cd.CycleType  = type;
                cd.LastUpdate = DateTime.Now - freq;
                cd.Forward    = cd.CycleType != CCType.ReverseLoop;
            }
            Start();
        }
Exemple #26
0
    CCStruct(CCType owner)
    {
        owner.xType.Close();
        this.owner = owner;
        XType[] fti  = owner.xType.GetFieldInitTypes();
        int     size = fti.Length;

        fields   = new CCTypeSet[size];
        regNodes = new SortedSet <CCNode> [size];
        for (int i = 0; i < fti.Length; i++)
        {
            if (fti[i] == null)
            {
                continue;
            }
            fields[i] = new CCTypeSet(new CCType(fti[i]));
        }
    }
Exemple #27
0
    internal override void Walk()
    {
        /*
         * For all possible types of the TOS:
         *
         *  1. Verify that the accessor is usable on that type.
         *
         *  2. Obtain the right CCStruct, and get the types
         *     that may be thus obtained. The "right CCStruct"
         *     is the one for the CCType that matches the
         *     element type, and the allocation node and variant
         *     of the type found on the stack.
         *
         *  3. Merge all resulting types.
         */
        CCTypeSet cts = Stack.Peek(0);
        CCTypeSet mv  = null;

        foreach (CCType tos in cts)
        {
            tos.xType.CheckExtends(owner);
            CCType    tos2 = tos.GetEmbedded(owner);
            CCStruct  cs   = CCStruct.Lookup(tos2);
            CCTypeSet vt   = cs.Get(owner.fieldInverseMapping[off]);
            if (vt != null)
            {
                if (mv == null)
                {
                    mv = vt;
                }
                else
                {
                    mv = CCTypeSet.Merge(mv, vt);
                }
            }
        }
        if (mv != null)
        {
            next.MergeStack(Stack.Pop().Push(mv));
        }
    }
Exemple #28
0
        protected void ProcessValidation()
        {
            IsValid = false;


            do
            {
                // Reg Ex check //
                Regex RegExNumber = new Regex(@"(?<firsttwo>(?<firstone>\d)\d)\d{11,14}");
                Match m           = RegExNumber.Match(_CardNumber);
                bool  passRegEx   = m.Success;
                if (!passRegEx)
                {
                    break;
                }
                string number      = m.Groups[0].Value; // only digits //
                string firstNum    = m.Groups["firstone"].Value;
                int    firstTwoNum = int.Parse(m.Groups["firsttwo"].Value);
                bool   passIssuer  = (firstNum == "4") || ((firstTwoNum >= 51) && (firstTwoNum <= 55));
                if (!passIssuer)
                {
                    break;
                }
                if (firstNum == "4")
                {
                    CardType = CCType.VISA;
                }
                if ((firstTwoNum >= 51) && (firstTwoNum <= 55))
                {
                    CardType = CCType.MC;
                }
                // Now make Luhn check //
                bool passLuhn = LuhnCheck(number);
                if (!passLuhn)
                {
                    break;
                }
                //
                IsValid = true;
            } while (false);
        }
Exemple #29
0
    internal void DoConst(XValue v)
    {
        /*
         * A constant value will point to a statically allocated
         * instance, hence constant. However, for basic types,
         * the instances are virtual, and we do not want to tag
         * them with the "constant" flag to avoid duplicating
         * the types in the analysis.
         */
        XType  xt = v.VType;
        CCType ct;

        if (xt.IsBasic)
        {
            ct = new CCType(xt);
        }
        else
        {
            ct = new CCType(xt, null, 0, true);
        }
        CCValues.AddValue(v);
        PropagateNext(Stack.Push(new CCTypeSet(ct)));
    }
        /// push cutter against a single vertex p
//C++ TO C# CONVERTER WARNING: 'const' methods are not available in C#:
//ORIGINAL LINE: bool singleVertexPush(const Fiber& f, Interval& i, const Point& p, CCType cctyp) const
        protected bool singleVertexPush(Fiber f, Interval i, Point p, CCType cctyp)
        {
            bool result = false;

            if ((p.z >= f.p1.z) && (p.z <= (f.p1.z + this.getLength())))
            {                                             // p.z is within cutter
                Point  pq = p.xyClosestPoint(f.p1, f.p2); // closest point on fiber
                double q  = (p - pq).xyNorm();            // distance in XY-plane from fiber to p
                double h  = p.z - f.p1.z;
                Debug.Assert(h >= 0.0);
                double cwidth = this.width(h);
                if (q <= cwidth)
                {                                                                                               // we are going to hit the vertex p
                    double  ofs    = Math.Sqrt(ocl.GlobalMembers.square(cwidth) - ocl.GlobalMembers.square(q)); // distance along fiber
                    Point   start  = pq - ofs * f.dir;
                    Point   stop   = pq + ofs * f.dir;
                    CCPoint cc_tmp = new CCPoint(p, cctyp);
                    i.updateUpper(f.tval(stop), cc_tmp);
                    i.updateLower(f.tval(start), cc_tmp);
                    result = true;
                }
            }
            return(result);
        }
		public static void Add( Item i, int min, int max, TimeSpan freq, CCType type ) {
			Add(i,new int[] { min, max }, freq, type);
		}
			public CycleData(Item i, int[] range, TimeSpan freq, CCType type) {
				m_Item = i;
				m_Range = range;
				m_Frequency = freq;
				m_Type = type;
				m_Forward = m_Type != CCType.ReverseLoop;
			}
Exemple #33
0
		public XmlColorCycling(int hueb, int huee, double frequency, CCType type) : this(hueb, huee, frequency, type, 0) {}
		public StaticColorCycle(int itemid, int hueb, int huee, TimeSpan freq, CCType type) : base(itemid) {
			m_HueBegin = hueb;
			m_HueEnd = huee;
			m_Frequency = freq;
			m_CycleType = type;
			UpdateColorCycling();
		}
Exemple #35
0
 internal CCNodeNativeXType(XType xt, CCNode next)
 {
     this.next  = next;
     typeOfType = CCType.TypeOfType(xt);
 }
Exemple #36
0
    internal void DoCall(string name)
    {
        /*
         * Make sure the next node exists. We also set its locals
         * to the current locals (the called function cannot
         * change our locals). Note that the stack is not set;
         * this will be done only when (if) one of the called
         * functions returns.
         */
        if (next == null)
        {
            next = GetNode(addr + 1);
        }
        next.MergeLocals(Locals);

        /*
         * Find all functions registered with the specified name.
         * If none is found, then we want a specific error message
         * (this is probably a typographic error in the function
         * name).
         */
        List <FunctionRegistration> r1 = Function.LookupAll(name);

        if (r1.Count == 0)
        {
            throw new Exception(string.Format("no such function: {0}", name));
        }

        /*
         * Find all functions that may match the types on the
         * stack.
         */
        List <FunctionRegistration> r2 =
            new List <FunctionRegistration>();
        int maxNum = 0;

        foreach (FunctionRegistration fr in r1)
        {
            if (Stack.MayMatch(fr.types))
            {
                r2.Add(fr);
                maxNum = Math.Max(maxNum, fr.types.Length);
            }
        }

        /*
         * For all combinations of types that may occur on the
         * stack, try to resolve the call; if any fails, then
         * report it as an error.
         * While doing so, we accumulate, for each reachable
         * function, the types that may appear on entry of
         * that function.
         */
        CCType[] combo = new CCType[maxNum];
        CCTypeSet.ComboEnumerator ce = new CCTypeSet.ComboEnumerator(
            Stack.GetTopElements(maxNum));
        XType[] xts = new XType[maxNum];
        SortedDictionary <Function, CCStack> targets =
            new SortedDictionary <Function, CCStack>();
        CCStack root  = Stack.Pop(maxNum);
        GStack  gtail = GStack.Make(root);

        calls = new List <DCall>();
        for (;;)
        {
            if (!ce.Next(combo))
            {
                break;
            }
            for (int i = 0; i < maxNum; i++)
            {
                xts[i] = combo[i].xType;
            }
            Function f      = Function.Resolve(name, r2, xts);
            CCStack  nstack = root.Push(combo);
            CCStack  ostack;
            if (targets.TryGetValue(f, out ostack))
            {
                targets[f] = CCStack.Merge(ostack, nstack);
            }
            else
            {
                targets[f] = nstack;
            }
            calls.Add(new DCall(GStack.Make(xts, gtail), f));
        }

        /*
         * We now have a complete list of reachable functions,
         * each with a corresponding entry stack; we know that
         * the call will always resolve to a single function. If
         * we are updating, we reuse the previous functions from
         * the dispatch variable if available. Note that an update
         * can only add new functions, not remove existing ones.
         */
        if (dispatch == null)
        {
            dispatch = new SortedDictionary <Function, CCNode>();
        }
        foreach (Function f in targets.Keys)
        {
            CCStack stack = targets[f];
            CCNode  onode;
            if (dispatch.TryGetValue(f, out onode))
            {
                onode.MergeStack(stack);
            }
            else
            {
                dispatch[f] = f.Enter(stack, cfi.Entry, next);
            }
        }
    }
			public CycleData(Item i, int min, int max, TimeSpan freq, CCType type) : this(i,GetMinMax(min,max),freq,type) {}