Beispiel #1
0
 public static void AdvanceCall(object sender, AdvanceCallArgs args)
 {
     foreach (var ctl in controllers.Values)
     {
         ctl.AdvanceCall(sender, args);
     }
 }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (UpCall == null || UpCall.SGLL == null)
                return;

            int times = 1;
            if (!int.TryParse(this.textBoxTimes.Text, out times) || times <= 0)
            {
                MessageBox.Show("输入格式不正确:次数", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            int interval = 1;
            if (!int.TryParse(this.textBoxInterval.Text, out interval) || interval <= 0)
            {
                MessageBox.Show("输入格式不正确:间隔", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            args = new AdvanceCallArgs
            {
                Url = this.textBoxUrl.Text,
                Times = times,
                SenderUserName = UpCall.SGLL.Data.LoginUser.Username,
                Parameters = this.textBoxParameters.Text,
                IntervalSec = interval,
            };
            Reset();
            StartMojoCall();
            if (this.checkBoxAllUsers.Checked)
            {
                MultipleUserCtl.AdvanceCall(this, args);
            }
        }
Beispiel #3
0
        private void CallMojoOnce(AdvanceCallArgs args)
        {
            string url = args.Url;
            string paras = args.Parameters;

            this.textBoxResult.AppendText(DateTime.Now.ToString() + " 开始执行第" + CurTimes + "次执行......");
            textBoxResult.AppendText(Environment.NewLine);
            var result = UpCall.SGLL.Client.Post(url, paras, UpCall.LoginInfo);
            if (result.Item1)
            {
                this.textBoxResult.AppendText(result.Item2);
            }
            this.textBoxResult.AppendText(Environment.NewLine);
            this.textBoxResult.AppendText(Environment.NewLine);
            this.textBoxResult.AppendText(Environment.NewLine);
        }
Beispiel #4
0
        void SGLL_OnAdvanceCall(object sender, AdvanceCallArgs e)
        {
            if (e == null || e.SenderUserName == UpCall.SGLL.Data.LoginUser.Username)
                return;

            try
            {
                Invoke(new AdvanceCall_d(Local_AdvanceCall), new object[] { sender, e });
            }
            catch (Exception)
            { }
        }
Beispiel #5
0
 void Local_AdvanceCall(object sender, AdvanceCallArgs e)
 {
     args = e;
     Reset();
     StartMojoCall();
 }