예제 #1
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            // Get the BackgroundWorker that raised this event.
            //BackgroundWorker worker = sender as BackgroundWorker;
            CallParameter cp2 = (CallParameter)e.Argument;

            Save(cp2);
        }
예제 #2
0
 public frmPAGWizard()
 {
     backgroundWorker1 = new BackgroundWorker();
     backgroundWorker2 = new BackgroundWorker();
     backgroundWorker2.WorkerSupportsCancellation = true;
     InitializeComponent();
     this.Text = this.Text + " - " + MetriconCommon.WindowTitleInfo;
     InitializeBackgroundWorker();
     cp = new CallParameter();
 }
예제 #3
0
        private void backgroundWorker2_DoWork(object sender, DoWorkEventArgs e)
        {
            // Get the BackgroundWorker that raised this event.
            CallParameter cp3 = (CallParameter)e.Argument;

            //this.imagebox.BeginInvoke((Action)(() =>
            //    {
            //        LoadHomeList_MultiThread(cp2.brandid, cp2.pagid);
            //    }));
            e.Result = LoadHomeList_MultiThread(cp3.brandid, cp3.pagid, cp3.storey);
            backgroundWorker2.CancelAsync();
        }
예제 #4
0
    public void AndroidCall(string result)
    {
        CallParameter cp = (CallParameter)Enum.Parse(typeof(CallParameter), result);

        switch (cp)
        {
        case CallParameter.PaySuccess:
            Debug.Log("支付成功");
            PaySuccess();
            break;

        case CallParameter.HeadDown:
            Debug.Log("头部按下");
            StartCatchBoy();
            break;

        case CallParameter.HasBoy:
            Debug.Log("有娃娃");
            isHas = true;
            break;

        case CallParameter.NoHas:
            Debug.Log("无娃娃");
            isHas = false;
            break;

        case CallParameter.TakeAway:
            Debug.Log("被取走");
            isTakeAway = true;
            break;

        case CallParameter.NoTakeAway:
            Debug.Log("没被取走");
            isTakeAway = false;
            break;

        case CallParameter.Error:
            Debug.Log("android--返回异常");
            break;

        case CallParameter.NoBind:
            Debug.Log("娃娃机未绑定");
            UIManager.Instance.ShowUI(UIMessagePage.NAME, true, "娃娃机未绑定,绑定后才可以玩游戏哦");
            break;
        }
    }
예제 #5
0
        private void dropstorey_SelectionChangeCommitted(object sender, EventArgs e)
        {
            if (dropstorey.SelectedIndex != -1)
            {
                //LoadHomeList();
                CallParameter cp = new CallParameter();
                cp.brandid = dropBrand.SelectedValue.ToString();
                cp.pagid   = pagID.ToString();
                cp.storey  = dropstorey.SelectedValue.ToString();
                this.chkSelectAll.Checked = false;

                imagebox.BackColor = Color.Transparent;
                imagebox.Parent    = dataGridView1;
                imagebox.Visible   = true;

                if (!backgroundWorker2.IsBusy)
                {
                    backgroundWorker2.RunWorkerAsync(cp);
                }
            }
        }
예제 #6
0
 private void Save(CallParameter cpp)
 {
     MetriconCommon.DatabaseManager.ExecuteSQLQuery("AdminAddHDO2", new SqlParameter[15]
     {
         new SqlParameter("@ProductAreaGroupID", cpp.pagid)
         , new SqlParameter("@StandardInclusion", 0)
         , new SqlParameter("@StandardOption", 1)
         , new SqlParameter("@GeneralOption", 0)
         , new SqlParameter("@qtyArrayString", cpp.quantity)
         , new SqlParameter("@EnterDesc", cpp.EnterDesc)
         , new SqlParameter("@ChangeQty", cpp.changeqty)
         , new SqlParameter("@AddExtraDesc", cpp.AddExtraDesc)
         , new SqlParameter("@ChangePrice", cpp.ChangePrice)
         , new SqlParameter("@CreatedBy", cpp.UserCode)
         , new SqlParameter("@HomeIDArrayString", cpp.homeid)
         , new SqlParameter("@applychangetodisplay", "0")
         , new SqlParameter("@brandID", cpp.brandid)
         , new SqlParameter("@internalDesc", "")
         , new SqlParameter("@action", cpp.action)
     });
 }
예제 #7
0
 private static Tree.CallSignature ToCallSignature(CallParameter e)
 {
     return(new Tree.CallSignature(e));
 }
 public static Result Run(CallParameter expression, Scope scope)
 {
     return(Interpreters.Execute(expression.Value, scope));
 }