Changeset 189 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui
- Timestamp:
- 01/20/2020 06:16:07 PM (6 years ago)
- Location:
- trunk/src/scriptbuilder/gui
- Files:
-
- 2 edited
-
IncidentPaletteFrame.java (modified) (1 diff)
-
ScriptBuilderFrame.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java
r137 r189 455 455 private void btnCreateIncidentActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnCreateIncidentActionPerformed 456 456 {//GEN-HEADEREND:event_btnCreateIncidentActionPerformed 457 int newLogNum = 100; 458 boolean found = false; 459 while (!found) 460 { 461 newLogNum++; 462 if (!scriptContainsLogNum(script, newLogNum)) 463 { 464 found = true; 465 for (ScriptIncident incident : incidentList) 466 { 467 if (incident.number == newLogNum) 468 { 469 found = false; 470 } 471 } 472 } 473 } 474 475 ScriptIncident newInc = new ScriptIncident(newLogNum, "New Incident", LocalDate.now().toString(), script); 476 if (script.addIncident(newInc)) 477 { 478 new IncidentEditorFrame(newInc, parent).setVisible(true); 479 this.dispose(); 480 } 457 parent.openIncidentCreateWindow(); 458 this.dispose(); 459 // int newLogNum = 100; 460 // boolean found = false; 461 // while (!found) 462 // { 463 // newLogNum++; 464 // if (!scriptContainsLogNum(script, newLogNum)) 465 // { 466 // found = true; 467 // for (ScriptIncident incident : incidentList) 468 // { 469 // if (incident.number == newLogNum) 470 // { 471 // found = false; 472 // } 473 // } 474 // } 475 // } 476 // parent. 477 // 478 // ScriptIncident newInc = new ScriptIncident(newLogNum, "New Incident", LocalDate.now().toString(), script); 479 // if (script.addIncident(newInc)) 480 // { 481 // new IncidentEditorFrame(newInc, parent).setVisible(true); 482 // this.dispose(); 483 // } 481 484 482 485 }//GEN-LAST:event_btnCreateIncidentActionPerformed -
trunk/src/scriptbuilder/gui/ScriptBuilderFrame.java
r183 r189 1780 1780 */ 1781 1781 private void newIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newIncidentActionPerformed 1782 openIncidentCreateWindow(); 1783 }//GEN-LAST:event_newIncidentActionPerformed 1784 1785 public void openIncidentCreateWindow() 1786 { 1782 1787 editingIncident = false; 1783 1784 1788 addIncidentName.setText(""); 1785 1789 int newLogNum = 100; … … 1812 1816 1813 1817 incidentFrame.setVisible(true); 1814 }//GEN-LAST:event_newIncidentActionPerformed 1815 1818 } 1816 1819 private void fileMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileMenuActionPerformed 1817 1820 }//GEN-LAST:event_fileMenuActionPerformed
Note: See TracChangeset
for help on using the changeset viewer.
