Exemple #1
0
 private void but_uploadData_Click(object sender, EventArgs e)
 {
     if (!Utility.isNetworkAvailable())
     {
         Dialog_MyMessageBox.Show(Validations.VALIDATION_NO_NETWORK, 1, UiColors.MESSAGE_ERROR);
     }
     else
     {
         dialogDB.Opacity = 0.4F;
         var result = Dialog_MyMessageBox.Show(Constant.DB_CONFIRM_OPERATION, 2);
         if (result == DialogResult.Yes)
         {
             if (!backgroundWorker1.IsBusy)
             {
                 myProgressDialog = new DIalog_ProgressBar();
                 myProgressDialog.Show();
                 backgroundWorker1.RunWorkerAsync();
             }
         }
         else
         {
             dialogDB.Opacity = Common.dialogOpacity;
         }
     }
 }
 private void startBackgroundThread(bool dialogRequired)
 {
     if (!backgroundWorker1.IsBusy)
     {
         if (dialogRequired)
         {
             myProgressDialog = new DIalog_ProgressBar();
             this.Opacity     = 0.8;
             myProgressDialog.Show();
         }
         backgroundWorker1.RunWorkerAsync();
     }
 }
Exemple #3
0
        private void startBackgoundThread()
        {
            if (!backgroundWorker1.IsBusy)
            {
                myProgressDialog = new DIalog_ProgressBar();
                this.Opacity     = 0.8;
                myProgressDialog.Show();

                backgroundWorker1.RunWorkerAsync();
            }
            else
            {
                Dialog_MyMessageBox.Show(Constant.REQUEST_UNDER_PROCESS, 1, UiColors.MESSAGE_ERROR);
            }
        }
Exemple #4
0
        private void startBackgroundThread(bool dialogRequired, bool addNewUser, Entity_Staff userObj)
        {
            if (!backgroundWorker1.IsBusy)
            {
                if (dialogRequired)
                {
                    myProgressDialog = new DIalog_ProgressBar();
                    this.Opacity     = 0.8;
                    myProgressDialog.Show();
                }

                var objectMap = new Dictionary <string, Object>();
                objectMap.Add("staffObj", userObj);
                objectMap.Add("operation", addNewUser);

                backgroundWorker1.RunWorkerAsync(objectMap);
            }
        }
 private void showProgressBar()
 {
     myProgressDialog = new DIalog_ProgressBar();
     myProgressDialog.Show();
 }