diff --git a/designer-base/src/com/fr/design/bbs/BBSLoginUtils.java b/designer-base/src/com/fr/design/bbs/BBSLoginUtils.java index 9a8eef094..5b46b7c68 100644 --- a/designer-base/src/com/fr/design/bbs/BBSLoginUtils.java +++ b/designer-base/src/com/fr/design/bbs/BBSLoginUtils.java @@ -1,5 +1,6 @@ package com.fr.design.bbs; +import com.fr.config.BBSAttr; import com.fr.config.Configuration; import com.fr.config.MarketConfig; import com.fr.log.FineLoggerFactory; @@ -15,12 +16,14 @@ import java.util.List; public class BBSLoginUtils { public static void bbsLogin(final String username, final String password) { + final BBSAttr bbsAttr = new BBSAttr(); + bbsAttr.setBbsUsername(username); + bbsAttr.setBbsPassword(password); try { Configurations.update(new Worker() { @Override public void run() { - MarketConfig.getInstance().setBbsUsername(username); - MarketConfig.getInstance().setBbsPassword(password); + MarketConfig.getInstance().setBBsAttr(bbsAttr); } @Override public Class[] targets() { @@ -35,16 +38,18 @@ public class BBSLoginUtils { public static void bbsLogin(List list) { try { - final String uid = list.get(0); - final String username = list.get(1); - final String password = list.get(2); + String uid = list.get(0); + String username = list.get(1); + String password = list.get(2); + final BBSAttr bbsAttr = new BBSAttr(); + bbsAttr.setBbsUsername(username); + bbsAttr.setBbsPassword(password); + bbsAttr.setBbsUid(Integer.parseInt(uid)); + bbsAttr.setInShowBBsName(username); Configurations.update(new Worker() { @Override public void run() { - MarketConfig.getInstance().setBbsUsername(username); - MarketConfig.getInstance().setBbsPassword(password); - MarketConfig.getInstance().setBbsUid(Integer.parseInt(uid)); - MarketConfig.getInstance().setInShowBBsName(username); + MarketConfig.getInstance().setBBsAttr(bbsAttr); } @Override public Class[] targets() { @@ -58,11 +63,13 @@ public class BBSLoginUtils { } public static void bbsLogout() { + final BBSAttr bbsAttr = new BBSAttr(); + bbsAttr.setBbsUsername(StringUtils.EMPTY); + bbsAttr.setBbsPassword(StringUtils.EMPTY); + bbsAttr.setBbsUid(0); + bbsAttr.setInShowBBsName(StringUtils.EMPTY); try { - MarketConfig.getInstance().setBbsUsername(StringUtils.EMPTY); - MarketConfig.getInstance().setBbsPassword(StringUtils.EMPTY); - MarketConfig.getInstance().setBbsUid(0); - MarketConfig.getInstance().setInShowBBsName(StringUtils.EMPTY); + MarketConfig.getInstance().setBBsAttr(bbsAttr); } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage()); } diff --git a/designer-base/src/com/fr/design/style/background/BackgroundCardSwitchButtonPane.java b/designer-base/src/com/fr/design/style/background/BackgroundCardSwitchButtonPane.java index b5a2aeffa..21128fa77 100644 --- a/designer-base/src/com/fr/design/style/background/BackgroundCardSwitchButtonPane.java +++ b/designer-base/src/com/fr/design/style/background/BackgroundCardSwitchButtonPane.java @@ -2,7 +2,7 @@ package com.fr.design.style.background; import com.fr.base.background.ColorBackground; import com.fr.base.background.GradientBackground; -import com.fr.base.background.ImageBackground; +import com.fr.base.background.ImageFileBackground; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.style.background.gradient.GradientBackgroundPane; import com.fr.design.style.background.impl.ColorBackgroundPane; @@ -30,7 +30,7 @@ public class BackgroundCardSwitchButtonPane extends BackgroundButtonPane { private static void registerCardSwitchBtnBackground(Map, BackgroundUIWrapper> map) { map.put(ColorBackground.class, BackgroundUIWrapper.create() .setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Color"))); - map.put(ImageBackground.class, BackgroundUIWrapper.create() + map.put(ImageFileBackground.class, BackgroundUIWrapper.create() .setType(ImageBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Image"))); map.put(GradientBackground.class, BackgroundUIWrapper.create() .setType(GradientBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Gradient_Color"))); diff --git a/designer-base/src/com/fr/design/style/background/BackgroundFactory.java b/designer-base/src/com/fr/design/style/background/BackgroundFactory.java index 8489f7d88..2348f99ac 100644 --- a/designer-base/src/com/fr/design/style/background/BackgroundFactory.java +++ b/designer-base/src/com/fr/design/style/background/BackgroundFactory.java @@ -3,7 +3,7 @@ package com.fr.design.style.background; import com.fr.base.background.ColorBackground; import com.fr.base.background.GradientBackground; -import com.fr.base.background.ImageBackground; +import com.fr.base.background.ImageFileBackground; import com.fr.base.background.PatternBackground; import com.fr.base.background.TextureBackground; import com.fr.design.ExtraDesignClassManager; @@ -104,19 +104,19 @@ public class BackgroundFactory { } private static void registerImageBackground(Map, BackgroundUIWrapper> map) { - map.put(ImageBackground.class, BackgroundUIWrapper.create() + map.put(ImageFileBackground.class, BackgroundUIWrapper.create() .setType(ImageBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Image"))); } private static void registerBrowserImageBackground(Map, BackgroundUIWrapper> map) { - map.put(ImageBackground.class, BackgroundUIWrapper.create() + map.put(ImageFileBackground.class, BackgroundUIWrapper.create() .setType(ImageBackgroundPane4Browser.class).setTitle(Inter.getLocText("FR-Designer_Background_Image"))); } private static void registerButtonBackground(Map, BackgroundUIWrapper> map){ map.put(ColorBackground.class, BackgroundUIWrapper.create() .setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Color"))); - map.put(ImageBackground.class, BackgroundUIWrapper.create() + map.put(ImageFileBackground.class, BackgroundUIWrapper.create() .setType(ImageButtonBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Image"))); }