private void writeCodeToFileButton_Click(object sender, EventArgs e) { // get the STTs from the selections list // looop over the selection as necessary ... foreach (object sel in this.listBox2.SelectedItems) { FSM_STT mySTT = FSM_STT.findByRefClassName(sel.ToString()); FSM_CodeBuilder.writeCodeToFile(this.textBox1.Text, mySTT); } }
private void listOfSTTsListBox_SelectedIndexChanged(object sender, EventArgs e) { try { FSM_STT mySTT = FSM_STT.findByRefClassName(this.listOfSTTsListBox.SelectedItem.ToString()); this.initialiseEventComboBox(mySTT); // populate dropdown list of events in UI // using the selected STT // we should also populate FSM list as well ?? these would be what we send the events to this.initialiseInstancesListBox(mySTT.getRefClassName()); } catch (Exception ex) { Debug.WriteLine(ex.Message); } }
private void createOMInstancesButton_Click(object sender, EventArgs e) { //create 3 CDPLayers and 4 ACTORS try { FSM_STT mySTTCD = FSM_STT.findByRefClassName("CDPLAYER"); new CDPLAYER("cdplayer1", mySTTCD, FSMType.synch); new CDPLAYER("cdplayer2", mySTTCD, FSMType.synch); CDPLAYER c3 = new CDPLAYER("cdplayer3", mySTTCD, FSMType.synch); FSM_Event newEv = new FSM_Event(this, CDPLAYER.Events.startPlaying, c3.getFSM()); CDPLAYER.postEvent(newEv); FSM_STT mySTTACTOR = FSM_STT.findByRefClassName("ACTOR"); ACTOR a1 = new ACTOR("actor1", mySTTACTOR, FSMType.asynch); ACTOR a2 = new ACTOR("actor2", mySTTACTOR, FSMType.asynch); ACTOR a3 = new ACTOR("actor3", mySTTACTOR, FSMType.asynch); ACTOR a4 = new ACTOR("actor4", mySTTACTOR, FSMType.asynch); } catch (Exception ex) { Debug.WriteLine(ex.Message); } }