Browse Source

Merge pull request #402 in DESIGN/design from ~PLOUGH/10-design:release/10.0 to release/10.0

* commit 'c51d7d034c27e0a5ca5153b39c745cee7d62172a':
  REPORT-10490 【客户升级10.0】远程连接断开后,提示框显示空白=>整理代码
  REPORT-10490 【客户升级10.0】远程连接断开后,提示框显示空白
final/10.0
plough 6 years ago
parent
commit
d810b6a3ad
  1. 19
      designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java

19
designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java

@ -6,7 +6,6 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.TemplatePane;
import com.fr.design.mainframe.loghandler.DesignerLogHandler;
import com.fr.event.EventDispatcher;
import com.fr.log.FineLoggerFactory;
import com.fr.serialization.SerializerHelper;
import com.fr.stable.ArrayUtils;
@ -21,7 +20,9 @@ import io.socket.client.IO;
import io.socket.client.Socket;
import io.socket.emitter.Emitter;
import javax.swing.*;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import java.io.IOException;
import java.net.URI;
import java.net.URL;
@ -80,9 +81,17 @@ public class DesignerSocketIO {
@Override
public void call(Object... objects) {
if (status != Status.Disconnecting) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remote_Disconnected"),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
TemplatePane.getInstance().editItems();
try {
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remote_Disconnected"),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
TemplatePane.getInstance().editItems();
}
});
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
status = Status.Disconnected;
}

Loading…
Cancel
Save