Browse Source

Merge pull request #62 in DESIGN/design from ~JU/design:feature/10.0 to feature/10.0

* commit '125534b2cb82c30aab3459e3eb5fb59932edf2ae':
  无JIRA任务 改下env事件的写法
master
superman 7 years ago
parent
commit
26c90a4d42
  1. 4
      designer-base/src/com/fr/design/mainframe/DesignerFrame.java
  2. 6
      designer-base/src/com/fr/design/mainframe/loghandler/socketio/DesignerSocketIO.java
  3. 4
      designer-base/src/com/fr/env/SignIn.java

4
designer-base/src/com/fr/design/mainframe/DesignerFrame.java

@ -82,8 +82,8 @@ import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import static com.fr.core.env.EnvEvents.AFTER_SIGN_OUT; import static com.fr.core.env.EnvEvent.AFTER_SIGN_OUT;
import static com.fr.core.env.EnvEvents.BEFORE_SIGN_OUT; import static com.fr.core.env.EnvEvent.BEFORE_SIGN_OUT;
public class DesignerFrame extends JFrame implements JTemplateActionListener, TargetModifiedListener { public class DesignerFrame extends JFrame implements JTemplateActionListener, TargetModifiedListener {
public static final String DESIGNER_FRAME_NAME = "designer_frame"; public static final String DESIGNER_FRAME_NAME = "designer_frame";

6
designer-base/src/com/fr/design/mainframe/loghandler/socketio/DesignerSocketIO.java

@ -4,7 +4,7 @@ import com.fr.base.env.EnvContext;
import com.fr.base.env.resource.LocalEnvConfig; import com.fr.base.env.resource.LocalEnvConfig;
import com.fr.core.env.EnvConfig; import com.fr.core.env.EnvConfig;
import com.fr.core.env.EnvConstants; import com.fr.core.env.EnvConstants;
import com.fr.core.env.EnvEvents; import com.fr.core.env.EnvEvent;
import com.fr.decision.webservice.utils.DecisionServiceConstants; import com.fr.decision.webservice.utils.DecisionServiceConstants;
import com.fr.design.mainframe.loghandler.DesignerLogHandler; import com.fr.design.mainframe.loghandler.DesignerLogHandler;
import com.fr.event.Event; import com.fr.event.Event;
@ -43,7 +43,7 @@ public class DesignerSocketIO {
}; };
static { static {
EventDispatcher.listen(EnvEvents.AFTER_SIGN_OUT, new Listener<Null>() { EventDispatcher.listen(EnvEvent.AFTER_SIGN_OUT, new Listener<Null>() {
@Override @Override
public void on(Event event, Null param) { public void on(Event event, Null param) {
if (socketIO.isPresent()) { if (socketIO.isPresent()) {
@ -52,7 +52,7 @@ public class DesignerSocketIO {
} }
} }
}); });
EventDispatcher.listen(EnvEvents.AFTER_SIGN_IN, new Listener<Null>() { EventDispatcher.listen(EnvEvent.AFTER_SIGN_IN, new Listener<Null>() {
@Override @Override
public void on(Event event, Null param) { public void on(Event event, Null param) {
updateSocket(); updateSocket();

4
designer-base/src/com/fr/env/SignIn.java vendored

@ -6,7 +6,7 @@ import com.fr.base.env.EnvContext;
import com.fr.base.env.resource.EnvConfigUtils; import com.fr.base.env.resource.EnvConfigUtils;
import com.fr.base.env.resource.RemoteEnvConfig; import com.fr.base.env.resource.RemoteEnvConfig;
import com.fr.core.env.EnvConfig; import com.fr.core.env.EnvConfig;
import com.fr.core.env.EnvEvents; import com.fr.core.env.EnvEvent;
import com.fr.dav.LocalEnv; import com.fr.dav.LocalEnv;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.event.Event; import com.fr.event.Event;
@ -23,7 +23,7 @@ import javax.swing.UIManager;
public class SignIn { public class SignIn {
static { static {
EventDispatcher.listen(EnvEvents.CONNECTION_ERROR, new Listener<Null>() { EventDispatcher.listen(EnvEvent.CONNECTION_ERROR, new Listener<Null>() {
@Override @Override
public void on(Event event, Null param) { public void on(Event event, Null param) {
if (JOptionPane.showConfirmDialog(null, Inter.getLocText("FR-Remote_Connect2Server_Again"), UIManager.getString("OptionPane.titleText"), JOptionPane.YES_NO_OPTION) if (JOptionPane.showConfirmDialog(null, Inter.getLocText("FR-Remote_Connect2Server_Again"), UIManager.getString("OptionPane.titleText"), JOptionPane.YES_NO_OPTION)

Loading…
Cancel
Save