/// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dataGridViewInnerCommunity_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     //At least one row is selected
     if (dataGridViewInnerCommunity.SelectedRows.Count >= 1)
     {
         //for each worker row selected
         for (int i = 0; i < dataGridViewInnerCommunity.SelectedRows.Count; i++)
         {
             //open a new form showing the community's detail
             int currentSelectedRowIndex = dataGridViewInnerCommunity.SelectedRows[i].Index;
         
             ExperimentModel relatedExperimentItem = currentExperimentSetting.GetExperimentModel(comboBoxShowCurrentModels.SelectedIndex);
             FormWorkerOrCommunityDetail form1 = new FormWorkerOrCommunityDetail(currentSelectedRowIndex, relatedExperimentItem);
             openedForms.Add(form1);
             form1.Show();
         }
     } 
 }
        /// <summary>
        /// Display Popup of the corresponding popup
        /// </summary>
        /// <param name="currentComboBox"></param>
        /// <param name="currentDataGridView"></param>
        /// <param name="currentType"></param>
        private void DisplayPopUp(ComboBox currentComboBox, DataGridView currentDataGridView, string currentType)
        {
            //At least one row is selected
            if (currentDataGridView.SelectedRows.Count >= 1)
            {
                ExperimentModel relatedExperimentItem = currentExperimentSetting.GetExperimentModel(currentComboBox.SelectedIndex);
          
                //for each worker row selected
                for (int i = 0; i < currentDataGridView.SelectedRows.Count; i++)
                {
                    //open a new form showing the worker's detail

                    int currentSelectedRowIndex = currentDataGridView.SelectedRows[i].Index;
                    KryptonForm currentForm = null;
                    String currentId = currentDataGridView.Rows[currentSelectedRowIndex].Cells[0].Value.ToString();
                       
                    if (currentType == "worker")
                    {
                        Worker tempWorker = new Worker();
                        tempWorker.WorkerId = currentId;
                        currentForm = new FormWorkerOrCommunityDetail(tempWorker, relatedExperimentItem);
                    } 
                    //Open task form
                    else if (currentType == "task")
                    {
                        currentForm = new FormTaskDetails(currentId, relatedExperimentItem);
                    }
                    //Open the Community Form
                    else 
                    {
                        currentForm = new FormWorkerOrCommunityDetail(currentSelectedRowIndex, relatedExperimentItem);
                    }
  
                    //Add this openedForm into the openForms List
                    openedForms.Add(currentForm);
                    currentForm.Show();

                } //End For selected dataGridViewForInnerWorker
            }// if there is more than one selected rows 
        
        
        } //End DisplayPopUp