예제 #1
0
        private void buttonSendMessage_Click(object sender, EventArgs e)
        {
            String messageToSend = this.richTextBoxMessageToSend.Text.Trim();

            if (messageToSend == "")
                return;

            if (isSendingMessage)
                return;

            this.buttonSendMessage.Enabled = false;
            isSendingMessage = true;

            asyncWorder= new BackgroundWorker();
            asyncWorder.DoWork += new DoWorkEventHandler(SendMessageAsync);
            asyncWorder.RunWorkerCompleted +=new RunWorkerCompletedEventHandler(SendMessageCompleted);

            frmProgress = new FrmProgress();

            asyncWorder.RunWorkerAsync(new object[] { OrdersDataTable, messageToSend });

            frmProgress.StartPosition = FormStartPosition.CenterScreen;
            frmProgress.ShowDialog(this);

            frmProgress = null;
        }
예제 #2
0
        private void SyncOrderData()
        {
            if (isSyncingData)
            {
                return;
            }

            this.buttonSyncEbayData.Enabled = false;
            isSyncingData = true;

            DateTime startDate = this.dateTimePickerStartTime.Value;
            DateTime endDate   = this.dateTimePickerEndTime.Value;

            startDate = startDate.ToUniversalTime();
            endDate   = endDate.ToUniversalTime();

            asyncWorder                     = new BackgroundWorker();
            asyncWorder.DoWork             += new DoWorkEventHandler(GetDataAsync);
            asyncWorder.RunWorkerCompleted += new RunWorkerCompletedEventHandler(GetDataCompleted);

            frmProgress = new FrmProgress();

            asyncWorder.RunWorkerAsync(new object[] { startDate, endDate });

            frmProgress.StartPosition = FormStartPosition.CenterScreen;
            frmProgress.ShowDialog(this);

            frmProgress = null;
        }
예제 #3
0
        private void buttonSendMessage_Click(object sender, EventArgs e)
        {
            String messageToSend = this.richTextBoxMessageToSend.Text.Trim();

            if (messageToSend == "")
            {
                return;
            }

            if (isSendingMessage)
            {
                return;
            }

            this.buttonSendMessage.Enabled = false;
            isSendingMessage = true;

            asyncWorder                     = new BackgroundWorker();
            asyncWorder.DoWork             += new DoWorkEventHandler(SendMessageAsync);
            asyncWorder.RunWorkerCompleted += new RunWorkerCompletedEventHandler(SendMessageCompleted);

            frmProgress = new FrmProgress();

            asyncWorder.RunWorkerAsync(new object[] { OrdersDataTable, messageToSend });

            frmProgress.StartPosition = FormStartPosition.CenterScreen;
            frmProgress.ShowDialog(this);

            frmProgress = null;
        }   // buttonSendMessage_Click
예제 #4
0
        private void SyncOrderData()
        {
            if (isSyncingData)
                return;

            this.buttonSyncEbayData.Enabled = false;
            isSyncingData = true;

            DateTime startDate = this.dateTimePickerStartTime.Value;
            DateTime endDate = this.dateTimePickerEndTime.Value;
            startDate = startDate.ToUniversalTime();
            endDate = endDate.ToUniversalTime();

            asyncWorder = new BackgroundWorker();
            asyncWorder.DoWork += new DoWorkEventHandler(GetDataAsync);
            asyncWorder.RunWorkerCompleted += new RunWorkerCompletedEventHandler(GetDataCompleted);

            frmProgress = new FrmProgress();

            asyncWorder.RunWorkerAsync(new object[] { startDate, endDate });

            frmProgress.StartPosition = FormStartPosition.CenterScreen;
            frmProgress.ShowDialog(this);

            frmProgress = null;
        }