public CppCompiler(Settings sett, Graph graph) { // // Required for Windows Form Designer support // InitializeComponent(); m_settings = sett; m_graph = graph; }
public CppSqlGenerationVisitor(Settings sett, Graph rooms) { m_settings = sett; m_graph = rooms; //System.Diagnostics.Process proc = new System.Diagnostics.Process(); //proc.StartInfo.FileName = "sqlite.exe"; m_conn = new SQLiteConnection("Data Source=adventure.hac;Version=3;New=True;Compress=True"); m_conn.Open(); m_cmd = m_conn.CreateCommand(); m_propid = -1; m_statpropid = -1; m_respid = 0; }
public MainForm() : base() { // // Required for Windows Form Designer support // InitializeComponent(); m_graph = genRoomGraph(); m_settings = new Settings((RoomGraph)m_graph); addNodeGeneration("Room", 0, new GenNode(genRoom)); addNodeGeneration("Choice", 1, new GenNode(genMultipleChoice)); addNodeGeneration("Cancel", 2, new GenNode(genNothing)); GraphGenFunc = new GenGraph(genStateGraph); }
private void menu_load_Click(object sender, System.EventArgs e) { System.Windows.Forms.OpenFileDialog ofd = new System.Windows.Forms.OpenFileDialog(); ofd.Title = "Load Adventure"; ofd.Filter = "Adventure Builder Files (*.adv)|*.adv"; ofd.ShowDialog(this); try{ Stream strm = ofd.OpenFile(); AdventurePersistance pers = new AdventurePersistance(strm); m_graph = (RoomGraph)pers.load(); m_settings = (Settings)pers.load(); m_settings.Graph = (RoomGraph)m_graph; strm.Close(); Invalidate(); } catch (System.Exception ex) { Console.WriteLine(ex); } }