Пример #1
0
 //初始化判断矩阵表格
 private void InitGrid(JudgeMatrixPair judgeMatrixPair)
 {
     //生成一个空的表格
     int n = judgeMatrixPair.NormalGen.X;
     for (int i = 0; i < n; i++)
     {
         dataGrid.Columns.Add("column" + i.ToString(), i.ToString());
     }
     dataGrid.Rows.Add(n);
     //将以后的数据填充到表格中
     for (int i = 0; i < n; i++)
     {
         for (int j = 0; j < n; j++)
         {
             dataGrid.Rows[i].Cells[j].Value = judgeMatrixPair.NormalGen[i, j];
         }
     }
 }
Пример #2
0
 protected virtual void OnJudgeMatrixSave(JudgeMatrixPair judgematrixpair)
 {
     JudgeMatrixSaveHandler handler = JudgeMatrixSave;
     if (handler != null) handler(judgematrixpair);
 }
Пример #3
0
 //响应常规判断矩阵构造完成时间
 private void OnJudgeMatrixGenFinish(JudgeMatrixPair judgeMatrixPair)
 {
     var thePair = _judgeMatrixPairs.Single(x => x.AffectedFactor == judgeMatrixPair.AffectedFactor);
     thePair.ApprovedGen = judgeMatrixPair.ApprovedGen;
     thePair.NormalGen = judgeMatrixPair.NormalGen;
     UpdateJudgeMatrix();
 }
Пример #4
0
 public NormalGenFrom(JudgeMatrixPair judgeMatrixPair)
     : this()
 {
     _judgeMatrixPair = judgeMatrixPair;
     InitGrid(judgeMatrixPair);
 }
Пример #5
0
 public ApprovedGenForm(JudgeMatrixPair judgeMatrixPair)
     : this()
 {
     _judgeMatrixPair = judgeMatrixPair;
     Init();
 }