Skip to content

Commit

Permalink
Write pendant URL to UGS console.
Browse files Browse the repository at this point in the history
  • Loading branch information
winder committed Feb 17, 2016
1 parent e0d7db6 commit ea6c13a
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/com/willwinder/universalgcodesender/MainWindow.java
Expand Up @@ -66,6 +66,7 @@ This file is part of Universal Gcode Sender (UGS).
import javax.swing.text.DefaultCaret;
import javax.vecmath.Point3d;
import com.willwinder.universalgcodesender.listeners.UGSEventListener;
import com.willwinder.universalgcodesender.pendantui.PendantURLBean;

/**
*
Expand Down Expand Up @@ -265,7 +266,7 @@ public void run() {
SettingsFactory.saveSettings(mw.settings);

if(mw.pendantUI!=null){
mw.pendantUI.stop();
mw.pendantUI.stop();
}
}
});
Expand Down Expand Up @@ -1514,11 +1515,11 @@ public void pauseButtonActionPerformed() {
}

private void pauseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pauseButtonActionPerformed
pauseButtonActionPerformed();
pauseButtonActionPerformed();
}//GEN-LAST:event_pauseButtonActionPerformed

private void sendButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendButtonActionPerformed
// Timer for updating duration labels.
// Timer for updating duration labels.
ActionListener actionListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
Expand Down Expand Up @@ -1609,17 +1610,20 @@ private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI
}//GEN-LAST:event_saveButtonActionPerformed

private void startPendantServerButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_startPendantServerButtonActionPerformed
this.pendantUI = new PendantUI(backend);
this.pendantUI.start();
this.startPendantServerButton.setEnabled(false);
this.stopPendantServerButton.setEnabled(true);
this.pendantUI = new PendantUI(backend);
Collection<PendantURLBean> results = this.pendantUI.start();
for (PendantURLBean result : results) {
this.messageForConsole("Pendant URL: " + result.getUrlString(), false);
}
this.startPendantServerButton.setEnabled(false);
this.stopPendantServerButton.setEnabled(true);
this.backend.addControllerListener(pendantUI);
}//GEN-LAST:event_startPendantServerButtonActionPerformed

private void stopPendantServerButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_stopPendantServerButtonActionPerformed
this.pendantUI.stop();
this.startPendantServerButton.setEnabled(true);
this.stopPendantServerButton.setEnabled(false);
this.pendantUI.stop();
this.startPendantServerButton.setEnabled(true);
this.stopPendantServerButton.setEnabled(false);
}//GEN-LAST:event_stopPendantServerButtonActionPerformed

private void resetZCoordinateButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resetZCoordinateButtonActionPerformed
Expand Down

0 comments on commit ea6c13a

Please sign in to comment.