Beispiel #1
0
 public bool restore;            //是否变回原来的颜色
 public TurnColor(activityType type, int index, string OriginColor, string DestinationColor, bool restore, bool hasNext) : base(type, hasNext)
 {
     this.index            = index;
     this.restore          = restore;
     this.DestinationColor = DestinationColor;
     this.OriginColor      = OriginColor;
 }
Beispiel #2
0
        private string generateXmlRequest(activityType activityType, string assignedTo, string note,
                                          bool representedAmountFieldSpecified = false, long representedAmount = 0)
        {
            var header = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" +
                         "\n<chargebackUpdateRequest xmlns=\"http://www.vantivcnp.com/chargebacks\">";
            var footer = "\n</chargebackUpdateRequest>";
            var body   = "";

            body += string.Format("\n<activityType>{0}</activityType>", activityType);
            if (assignedTo != null)
            {
                body += string.Format("\n<assignedTo>{0}</assignedTo>", assignedTo);
            }

            if (note != null)
            {
                body += string.Format("\n<note>{0}</note>", note);
            }

            if (representedAmountFieldSpecified)
            {
                body += string.Format("\n<representedAmount>{0}</representedAmount>", representedAmount);
            }
            return(header + body + footer);
        }
Beispiel #3
0
 public Activity(string user, string device, DateTime timestamp, activityType activity, long usage)
 {
     this.user      = user;
     this.device    = device;
     this.timestamp = timestamp;
     this.activity  = activity;
     this.usage     = usage;
 }
Beispiel #4
0
    /// <summery>
    /// Add transaction of bitcoin
    ///
    /// <typeparam name=""></typeparam> mixed receiverID
    /// <typeparam name=""></typeparam> mixed payerID
    /// <typeparam name=""></typeparam> mixed activityType
    /// <typeparam name=""></typeparam> mixed activityID
    /// <typeparam name=""></typeparam> mixed amount
    /// <returns></returns> int|null|string|void
    /// </summery>
    public static function addTransaction(receiverID, payerID, activityType, activityID, amount)
    {
        global db;

        if (!is_numeric(receiverID) || !is_numeric(payerID) || !is_numeric(activityType) || !is_numeric(activityID) || !is_numeric(amount) || amount < 0
            )
        {
            return; // failed
        }
        param = ["receiverID" => receiverID, "payerID" => payerID, "activityType" => activityType, "activityID" => activityID, "amount" => amount, "createdDate" => date("Y-m-d H:i:s"), "status" => BitcoinTransaction.STATUS_ACTIVE];
Beispiel #5
0
 /// <summery>
 /// Add feedback
 ///
 /// <typeparam name=""></typeparam> mixed writerID
 /// <typeparam name=""></typeparam> mixed score
 /// <typeparam name=""></typeparam> mixed feedback
 /// <typeparam name=""></typeparam> mixed activityID
 /// <typeparam name=""></typeparam> mixed activityType
 /// <returns></returns> int|null|string|void
 /// </summery>
 public function addFeedback(writerID, score, feedback, activityID, activityType = Feedback.ACTIVITY_TYPE_TRADE)
Beispiel #6
0
        public bool hasNext; //下一个操作是否连续进行

        public Log(activityType type, bool hasNext)
        {
            this.type    = type;
            this.hasNext = hasNext;
        }
Beispiel #7
0
 public int x_steps, y_steps;//x移动的格数(x单位width,y方向100)
 /// <summary>
 /// </summary>
 /// <param name="index">移动的索引</param>
 /// <param name="x_steps">X方向上移动的步数</param>
 /// <param name="y_steps">Y方向上移动的步数</param>
 /// <param name="hasNext">是否有下一个操作数(交换操作)</param>
 /// <param name="annotation">学习模式下的注解</param>
 public Movement(activityType type, int index, int x_steps, int y_steps, bool hasNext) : base(type, hasNext)
 {
     this.index   = index;
     this.x_steps = x_steps;
     this.y_steps = y_steps;
 }
 private static string SerializeActivityType(activityType activityType)
 {
     return("\n<activityType>" + activityType + "</activityType>");
 }
Beispiel #9
0
 public Protocol(activityType proc)
 {
     Init(proc, false);
 }
Beispiel #10
0
 public Protocol(activityType proc, bool runInPool)
 {
     Init(proc, runInPool);
 }
Beispiel #11
0
 // Summary:
 // Enclosing barrier that will make the caller wait for this activity.
 //
 private void Init(activityType proc, bool runInPool)
 {
     this.runInPool = runInPool;
     this.proc      = proc;
     RKAP.Push((int)0);
 }