You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.4 KiB
44 lines
1.4 KiB
package com.fr.start; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
import com.fr.event.Event; |
|
import com.fr.event.Listener; |
|
import com.fr.event.Null; |
|
import com.fr.exit.DesignerExiter; |
|
import com.fr.process.engine.core.CarryMessageEvent; |
|
import com.fr.process.engine.core.FineProcessContext; |
|
import com.fr.process.engine.core.FineProcessEngineEvent; |
|
|
|
/** |
|
* @author hades |
|
* @version 10.0 |
|
* Created by hades on 2020/2/21 |
|
*/ |
|
public class DesignerSubListener { |
|
|
|
public static DesignerSubListener INSTANCE = new DesignerSubListener(); |
|
|
|
public static DesignerSubListener getInstance() { |
|
return INSTANCE; |
|
} |
|
|
|
private DesignerSubListener() { |
|
|
|
} |
|
|
|
public void start() { |
|
if (FineProcessContext.getParentPipe() != null) { |
|
FineProcessContext.getParentPipe().listen(FineProcessEngineEvent.READY, new Listener<Null>() { |
|
@Override |
|
public void on(Event event, Null param) { |
|
if (DesignerContext.getDesignerFrame() == null || !DesignerContext.getDesignerFrame().isShowing()) { |
|
|
|
DesignerExiter.getInstance().exitUnexpectedly(() -> { |
|
FineProcessContext.getParentPipe().fire(new CarryMessageEvent(DesignerProcessType.INSTANCE.obtain())); |
|
}); |
|
} |
|
} |
|
}); |
|
} |
|
} |
|
}
|
|
|