private void DrawGraph() { G = new Graph("Graph"); foreach (Entity.State state in items) { Node node = G.AddNode(state.ToString()); if (state == AraSystem.GetInstance().InitState) { node.Attr.Fillcolor = Microsoft.Glee.Drawing.Color.Aquamarine; } if (state.Color.HasValue) { node.Attr.Color = state.Color.Value; } } foreach (Entity.State st in items) { foreach (Entity.Arc arc in st.Arcs) { Edge edge = G.AddEdge(st.ToString(), arc.ToString(), arc.State.ToString()); if (arc.Color.HasValue) { edge.Attr.Color = arc.Color.Value; } } } graphViewer.Graph = G; }
public AlwaysForm() { InitializeComponent(); sysetm = AraSystem.GetInstance(); if ( sysetm.Always == null) { sysetm.Always = new List <Formula>(); } resultFormula = new Formula(); formulaFluentsCmb.DataSource = sysetm.Fluents.ToArray(); tabelDGV.DataSource = sysetm.Always.ToList(); tabelDGV.Columns["Label"].HeaderText = "Exprestion"; tabelDGV.Columns["IsValid"].Visible = false;; }
private void testQueryBtn_Click(object sender, EventArgs e) { if (AraSystem.GetInstance().InitState == null) { MessageBox.Show("Select the initai State First"); return; } if (!resultFormula.IsValid) { MessageBox.Show("Invalid Formula"); return; } query.QueryPossibility = possiblyRB.Checked ? Utility.QueryPossibility.Possibly : Utility.QueryPossibility.Necessary; query.ResultFormula = resultFormula; resultTB.Text = query.Execute().ToString(); DrawGraph(); }
public MainForm() { InitializeComponent(); system = AraSystem.GetInstance(); }