예제 #1
0
 private void btnStop_Click(object sender, System.EventArgs e)
 {
     if (fetcher == null)
     {
         return;
     }
     btnStop.Enabled = false;
     fetcher.Stop();
     fetcher          = null;
     btnStart.Enabled = true;
 }
예제 #2
0
        private void btnStart_Click(object sender, System.EventArgs e)
        {
            if (fetcher != null)
            {
                return;
            }

            string token = eBayToken;

            if (token.Length == 0)
            {
                MessageBox.Show("Please enter your eBay token.");
                return;
            }

            btnStart.Enabled = false;

            fetcher = new ItemFetcher(this, txtLogger, NumThreads, NumCalls, token, this.rampUpCheckBox.Checked);
            fetcher.FetchCompleteEvent += new GetItemTester.ItemFetcher.FetchCompleteDelegate(fetcher_FetchCompleteEvent);
            fetcher.Start();

            btnStop.Enabled = true;
        }
예제 #3
0
        private void fetcher_FetchCompleteEvent(object sender, EventArgs e)
        {
            if (btnStop.InvokeRequired)
            {
                SetButtonCallBack d = new SetButtonCallBack(SetButtonEnabled);
                this.Invoke(d, new object[] { btnStop, false });
            }
            else
            {
                btnStop.Enabled = false;
            }

            fetcher = null;

            if (btnStart.InvokeRequired)
            {
                SetButtonCallBack d = new SetButtonCallBack(SetButtonEnabled);
                this.Invoke(d, new object[] { btnStart, true });
            }
            else
            {
                btnStart.Enabled = true;
            }
        }
예제 #4
0
		private void fetcher_FetchCompleteEvent(object sender, EventArgs e) {
            if (btnStop.InvokeRequired)
            {
                SetButtonCallBack d = new SetButtonCallBack(SetButtonEnabled);
                this.Invoke(d, new object[] { btnStop, false });
            }
            else
            {
                btnStop.Enabled = false;

            }

			fetcher = null;

            if (btnStart.InvokeRequired)
            {
                SetButtonCallBack d = new SetButtonCallBack(SetButtonEnabled);
                this.Invoke(d, new object[] { btnStart, true });
            }
            else
            {
                btnStart.Enabled = true;
            }
		}
예제 #5
0
		private void btnStart_Click(object sender, System.EventArgs e) 
		{
			if (fetcher != null)
				return;

			string token = eBayToken;
			if (token.Length == 0) 
			{
				MessageBox.Show("Please enter your eBay token.");
				return;
			}

			btnStart.Enabled = false;

			fetcher = new ItemFetcher(this, txtLogger, NumThreads, NumCalls, token, this.rampUpCheckBox.Checked);
			fetcher.FetchCompleteEvent += new GetItemTester.ItemFetcher.FetchCompleteDelegate(fetcher_FetchCompleteEvent);
			fetcher.Start();

			btnStop.Enabled = true;
		}
예제 #6
0
		private void btnStop_Click(object sender, System.EventArgs e) 
		{
			if (fetcher == null)
				return;
			btnStop.Enabled = false;
			fetcher.Stop();
			fetcher = null;
			btnStart.Enabled = true;
		}