private void btnAdd_Click(object sender, RoutedEventArgs e) { _judgementMatrixGroup = new JudgementMatrixsGroup(HealthEvaluationGlobals.MyAHPIndexHierarchys[0]); JudgementMatrixWnd addJudgementMatrixWnd = new JudgementMatrixWnd(_judgementMatrixGroup); addJudgementMatrixWnd.Show(); addJudgementMatrixWnd.Closed += AddAndRefresh_Closed; }
private void btnView_Click(object sender, RoutedEventArgs e) { var selectedIndex=this.lvJudgeMatrixDetailList.SelectedIndex; if(selectedIndex<0) { MessageBox.Show("未选择!"); return; } _judgementMatrixGroup = _allExpertJudgementMatrix.JudgementMatrixInfosList[selectedIndex]; JudgementMatrixWnd viewWnd = new JudgementMatrixWnd(_judgementMatrixGroup); viewWnd.Show(); viewWnd.Closed += SaveAndRefresh_Closed; }
public JudgementMatrixWnd(JudgementMatrixsGroup jmGroup) { //初始化参数 MatrixGrade = new List<string> { "1/2", "1", "2"}; InitializeComponent(); judgemetnMatrixGroup = jmGroup; judgeMatrixDic = judgemetnMatrixGroup.JudgeMatrixDic; matrixTotalNo = judgeMatrixDic.Count; SingleBasicJudgementMatrixInfo singleJudgemtInfo = judgeMatrixDic.ElementAt(matrixNo).Value; this.DataContext = jmGroup; //界面初始化 RefreshData(singleJudgemtInfo.IndexsSequence, singleJudgemtInfo.JudgementMatrix); dgWeight.CellEditEnding += dgWeight_CellEditEnding; }
public NewJudgementMatrixWnd(AHPIndexHierarchy ahpIndexHierarchy) { MatrixGrade = new List<string> { "1/2", "1", "2"}; InitializeComponent(); _judgementMatrixInfosSet = BinaryIO.ReadMatrixInfosSet();//读取已有的,这个地方需要细化 if (_judgementMatrixInfosSet==null)//没有现成的就新建 { _judgementMatrixInfosSet = new AllExpertJudgementMatrixs(); } judgemetnMatrixInfos = new JudgementMatrixsGroup(ahpIndexHierarchy); //新建空的判断矩阵集 judgeMatrixDic = judgemetnMatrixInfos.JudgeMatrixDic; //judgeMatrixDic = _judgementMatrixInfosSet.JudgementMatrixInfosList[0].JudgeMatrixDic; matrixNo = 0; matrixTotalNo = judgeMatrixDic.Count; SingleBasicJudgementMatrixInfo judgemtInfo = judgeMatrixDic.ElementAt(matrixNo).Value; RefreshData(judgemtInfo.IndexsSequence, judgemtInfo.JudgementMatrix); dgWeight.CellEditEnding += dgWeight_CellEditEnding; }
public static JudgementMatrixsGroup ReadMatriXml() { JudgementMatrixsGroup judgementMatrixInfos = new JudgementMatrixsGroup(); Serialization<JudgementMatrixsGroup> xml2Matrix = new Serialization<JudgementMatrixsGroup>(); judgementMatrixInfos = xml2Matrix.XMLDeserialization(_matrixFilePath); return judgementMatrixInfos; }
public static void OutputMatrixXml(JudgementMatrixsGroup judgementMatrixInfos) { Serialization<JudgementMatrixsGroup> Matrix2Xml = new Serialization<JudgementMatrixsGroup>(); // string _matrixFilePath = Directory.GetCurrentDirectory().ToString() + @"tools\Hierarchy.xml"; Matrix2Xml.XMLSerialization(_matrixFilePath, judgementMatrixInfos); }