private void Open_Click(object sender, EventArgs e) { if (openFileDialog.ShowDialog() == DialogResult.OK) { try { GraphFile file = new GraphFile(openFileDialog.FileName); if (sender == OpenA) { A = file.Read(); DrawA.Graph = A; InputA.Image = DrawA.Draw(); } else { B = file.Read(); DrawB.Graph = B; InputB.Image = DrawB.Draw(); } } catch (Exception) { MessageBox.Show("Error"); } } }
public AddEdge() { InitializeComponent(); GPH = new GraphFile(); graph = GPH.GetGraph(); from = to = string.Empty; }
public void OnWizardCreate() { if (!Directory.Exists(Application.dataPath + "/Code Graph")) { AssetDatabase.CreateFolder("Assets", "Code Graph"); } var graph = new GraphFile(GraphName, GeneratedMonoBehaviourName, new List <GraphFileNode>(), new List <GraphFileConnection>()); GraphFileSaveManager.SaveGraphFile(graph); }
public MainWindow() { InitializeComponent(); GPH = new GraphFile(); var graph = GPH.GetGraph(); GenerateGraph(graph); RefreshList(); }
private void Save_Click(object sender, EventArgs e) { if (saveFileDialog.ShowDialog() == DialogResult.OK) { try { GraphFile file = new GraphFile(saveFileDialog.FileName); if (sender == SaveA) { file.Write(A); } else { file.Write(B); } } catch (Exception) { MessageBox.Show("Error"); } } }
public AddVertex() { InitializeComponent(); GPH = new GraphFile(); }
public void SetGraph(GraphFile graph) { Debug.Log("Set graph " + graph.GraphName); CurrentGraph = graph; }