public GraphViewModel(Graph graph1, Graph graph2, ObservableCollection<int> condition, Graph isomorphic) { m_Graph1 = graph1; m_Graph2 = graph2; m_Isomorphic = isomorphic; m_Condition = condition; m_Graph1.GenerateDotFile(); m_Graph2.GenerateDotFile(); m_Graph1.GeneratePngFile(); m_Graph2.GeneratePngFile(); //m_Isomorphic.m_Name = @"C:\graphviz-2.32\release\bin\m_isomorphic"; }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); MainWindow view = new MainWindow(); Graph m_Gr1 = new Graph(); Graph m_Gr2 = new Graph(); Graph m_Isom = new Graph(); m_Gr1.m_Matrix = new bool[,] {{false, false, false,false , true, true, true, false}, {false, false, false,false ,true, true,false,true}, {false, false, false,false ,true, false, true, true}, {false, false, false,false ,false, true, true, true}, {true, true, true, false, false, false, false,false}, {true, true, false, true, false, false, false,false}, { true, false, true, true, false, false, false,false}, {false,true, true, true,false, false, false,false }}; m_Gr2.m_Matrix = new bool[,] {{false, true, false, true, true, false, false, false}, {true, false, true, false, false, true, false, false}, {false, true, false, true, false, false, true, false}, {true, false, true, false, false, false, false, true}, {true, false, false, false, false, true, false, true}, {false, true, false, false, true, false, true, false}, {false, false, true, false, false, true, false, true}, {false, false, false, true, true, false, true, false}}; m_Isom.m_Matrix = new bool[,] {{false, false, false, false, false, false, false, false}, {false, false, false, false, false, false, false, false}, {false, false, false, false, false, false, false, false}, {false, false, false, false, false, false, false, false}, {false, false, false, false, false, false, false, false}, {false, false, false, false, false, false, false, false}, {false, false, false, false, false, false, false, false}, {false, false, false, false, false, false, false, false}}; m_Gr1.m_Name = @"C:\graphviz-2.32\release\bin\m_graph1"; m_Gr2.m_Name = @"C:\graphviz-2.32\release\bin\m_graph2"; m_Isom.m_Name = @"C:\graphviz-2.32\release\bin\m_isomorphic"; GraphViewModel viewModel = new GraphViewModel (m_Gr1, m_Gr2, new ObservableCollection<int> {0,5,7,2,4,1,3,6},m_Isom); view.DataContext = viewModel; view.Show(); }