private void UpdatePicState(DataGridViewCellEventArgs e) { this.m_CurrentExportStudy.Pic[e.ColumnIndex - 4] = !this.m_CurrentExportStudy.Pic[e.ColumnIndex - 4]; this.dgvPrediction.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = this.m_CurrentExportStudy.Pic[e.ColumnIndex - 4]; string groupname = this.m_CurrentExportStudy.GroupStudyName.Split(new char[] { ':' })[0]; List<ExportStudy> list = this.m_PrintexportEditor.ExportStudyDic[groupname]; this.m_GroupPara = this.m_PrintexportEditor.GroupParaDic[groupname]; int truecount = 0; int falsecount = 0; foreach (ExportStudy study in list) { if (study.Pic[e.ColumnIndex - 4]) { truecount++; } else { falsecount++; } } this.BindCheck(e, groupname, truecount, falsecount); }
private void dgvPrediction_CellClick(object sender, DataGridViewCellEventArgs e) { if ((e.RowIndex > -1) && (e.RowIndex < this.dgvPrediction.RowCount)) { if (!((bool) this.dgvPrediction.Rows[e.RowIndex].Cells["IsGroup"].Value)) { this.clbData.Enabled = true; this.m_CurrentExportStudy = this.m_PrintexportEditor.GetExportStudy(this.dgvPrediction.Rows[e.RowIndex].Cells["ID"].Value.ToString()); this.BindStatisticsData(this.m_CurrentExportStudy); this.lstPlogyn.Enabled = false; if (e.ColumnIndex == 6) { this.clbData.Enabled = true; } else { this.clbData.Enabled = false; } } else { this.m_GroupPara = this.m_PrintexportEditor.GroupParaDic[this.dgvPrediction.Rows[e.RowIndex].Cells["Group"].Value.ToString()]; this.BindPlogyn(this.m_GroupPara.Polygonname); this.clbData.Enabled = false; } } }
private void UpdateGroupState(DataGridViewCellEventArgs e) { this.m_GroupPara = this.m_PrintexportEditor.GroupParaDic[this.dgvPrediction.Rows[e.RowIndex].Cells["Group"].Value.ToString()]; this.BindPlogyn(this.m_GroupPara.Polygonname); int index = e.ColumnIndex - 4; if ((this.m_GroupPara.IsChecked[index] == 1) || (this.m_GroupPara.IsChecked[index] == 2)) { this.m_GroupPara.IsChecked[index] = 0; } else { this.m_GroupPara.IsChecked[index] = 1; } this.dgvPrediction.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = this.m_GroupPara.IsChecked[index]; for (int i = e.RowIndex + 1; i < this.dgvPrediction.RowCount; i++) { if (!((bool) this.dgvPrediction.Rows[i].Cells["IsGroup"].Value)) { this.UpdateStudyState(e, index, i); } else { break; } } }
private void BindGroupStudy() { Dictionary<string, List<ExportStudy>> dictionary = new Dictionary<string, List<ExportStudy>>(); Dictionary<string, GroupPara> dictionary2 = new Dictionary<string, GroupPara>(); int num = 0; foreach (IPredictionGroup group in this.m_PredictionGrouplist) { if (group.State == CalculateState.SuccessfulEnd) { this.dgvPrediction.Rows.Add(); this.dgvPrediction.Rows[num].Cells["ID"].Value = group.Name + ":"; this.dgvPrediction.Rows[num].Cells["IsGroup"].Value = true; this.dgvPrediction.Rows[num].Cells["Group"].Value = group.Name; this.dgvPrediction.Rows[num].Cells["StudyName"].Value = string.Empty; this.dgvPrediction.Rows[num].Cells[4].Value = CheckState.Unchecked; this.dgvPrediction.Rows[num].Cells[5].Value = CheckState.Unchecked; this.dgvPrediction.Rows[num].Cells[6].Value = CheckState.Unchecked; num++; List<ExportStudy> list = new List<ExportStudy>(); dictionary.Add(group.Name, list); dictionary2.Add(group.Name, new GroupPara("Full Map")); this.m_GroupPara = dictionary2[group.Name]; foreach (IStudy study in group.StudyList) { this.dgvPrediction.Rows.Add(); string groupStudyName = group.Name + ":" + study.Name; this.dgvPrediction.Rows[num].Cells["ID"].Value = groupStudyName; this.dgvPrediction.Rows[num].Cells["IsGroup"].Value = false; this.dgvPrediction.Rows[num].Cells["Group"].Value = string.Empty; this.dgvPrediction.Rows[num].Cells["StudyName"].Value = study.Name; this.dgvPrediction.Rows[num].Cells[4].Value = CheckState.Unchecked; this.dgvPrediction.Rows[num].Cells[5].Value = CheckState.Unchecked; this.dgvPrediction.Rows[num].Cells[6].Value = CheckState.Unchecked; dictionary[group.Name].Add(new ExportStudy(groupStudyName)); num++; } } } this.m_PrintexportEditor.ExportStudyDic = dictionary; this.m_PrintexportEditor.GroupParaDic = dictionary2; }