Browse Source

Merge pull request #277 in DESIGN/design from ~KERRY/design_10.0:release/10.0 to release/10.0

* commit '3f70704c0968215cfc1c6ce577b02c1d5d9ec5af':
  REPORT-10049【10.0二轮回归】设计器右上角登录后,重启仍然显示未登录,打开一下设计器插件管理才出来
final/10.0
kerry 7 years ago
parent
commit
ca8a953084
  1. 30
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java
  2. 2
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

30
designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java

@ -4,18 +4,14 @@
package com.fr.design.mainframe.bbs; package com.fr.design.mainframe.bbs;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.config.BaseDBEnv;
import com.fr.config.MarketConfig; import com.fr.config.MarketConfig;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.general.DateUtils; import com.fr.general.DateUtils;
import com.fr.general.GeneralContext; import com.fr.log.FineLoggerFactory;
import com.fr.stable.EnvChangedListener;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Dimension; import java.awt.Dimension;
@ -73,7 +69,6 @@ public class UserInfoPane extends BasicPane {
this.userInfoLabel = new UserInfoLabel(this); this.userInfoLabel = new UserInfoLabel(this);
this.markUnSignIn(); this.markUnSignIn();
addEnvChangedListener();
autoPushLoginDialog(); autoPushLoginDialog();
this.add(userInfoLabel, BorderLayout.CENTER); this.add(userInfoLabel, BorderLayout.CENTER);
@ -115,20 +110,13 @@ public class UserInfoPane extends BasicPane {
return StringUtils.EMPTY; return StringUtils.EMPTY;
} }
private void addEnvChangedListener() { public void updateBBSUserInfo(){
GeneralContext.addEnvChangedListener(new EnvChangedListener() { String username = MarketConfig.getInstance().getBbsUsername();
@Override if (StringUtils.isEmpty(username)) {
public void envChanged() { markUnSignIn();
if (BaseDBEnv.isDBEnvAvailable()) { } else {
String username = MarketConfig.getInstance().getBbsUsername(); markSignIn(username);
if (StringUtils.isEmpty(username)) { }
markUnSignIn();
} else {
markSignIn(username);
}
}
}
});
} }
@ -154,7 +142,7 @@ public class UserInfoPane extends BasicPane {
return dayNew - dayOld; return dayNew - dayOld;
} }
} catch (ParseException e) { } catch (ParseException e) {
FRContext.getLogger().error(e.getMessage()); FineLoggerFactory.getLogger().error(e.getMessage());
} }
return 1; return 1;
} }

2
designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

@ -43,6 +43,7 @@ import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.WidgetToolBarPane; import com.fr.design.mainframe.WidgetToolBarPane;
import com.fr.design.mainframe.actions.NewFormAction; import com.fr.design.mainframe.actions.NewFormAction;
import com.fr.design.mainframe.bbs.BBSGuestPane; import com.fr.design.mainframe.bbs.BBSGuestPane;
import com.fr.design.mainframe.bbs.UserInfoPane;
import com.fr.design.mainframe.form.FormECCompositeProvider; import com.fr.design.mainframe.form.FormECCompositeProvider;
import com.fr.design.mainframe.form.FormECDesignerProvider; import com.fr.design.mainframe.form.FormECDesignerProvider;
import com.fr.design.mainframe.form.FormElementCaseDesigner; import com.fr.design.mainframe.form.FormElementCaseDesigner;
@ -123,6 +124,7 @@ public class DesignerActivator extends Activator implements Prepare {
preLoadPane(); preLoadPane();
loadLogAppender(); loadLogAppender();
DesignerSocketIO.update(); DesignerSocketIO.update();
UserInfoPane.getInstance().updateBBSUserInfo();
} }
private void loadLogAppender() { private void loadLogAppender() {

Loading…
Cancel
Save