From af38c88c952f315598e87a00be6350a6665ba660 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 31 Oct 2016 19:57:40 +0800 Subject: [PATCH] rt --- .../mainframe/FormWidgetDetailPane.java | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index e967bdb2e..709b8aacf 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -252,12 +252,17 @@ public class FormWidgetDetailPane extends FormDockView{ deleteButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - ShareLoader.getLoader().removeModulesFromMap(); - refreshShareMoudule(); - reuWidgetPanel.remove(deleteButton); - elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); - refreshDownPanel(false); - JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Removed_Successful")); + if(ShareLoader.getLoader().removeModulesFromMap()) { + ShareLoader.getLoader().removeModulesFromMap(); + refreshShareMoudule(); + reuWidgetPanel.remove(deleteButton); + elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Removed_Successful")); + refreshDownPanel(false); + } else { + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Removed_Failed")); + } + } }); refreshDownPanel(true); @@ -265,11 +270,17 @@ public class FormWidgetDetailPane extends FormDockView{ } private void installFromDiskZipFile(File chosenFile) { - ShareLoader.getLoader().installModuleFromDiskZipFile(chosenFile); - refreshShareMoudule(); - elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); - refreshDownPanel(false); - JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_OK")); + try { + ShareLoader.getLoader().installModuleFromDiskZipFile(chosenFile); + refreshShareMoudule(); + elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); + refreshDownPanel(false); + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_OK")); + } catch (IOException e) { + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Error")); + e.printStackTrace(); + } + } private void refreshShareMoudule() {