Destiny.Lin
1 year ago
3 changed files with 67 additions and 0 deletions
@ -0,0 +1,54 @@
|
||||
package com.fr.design.mainframe.vcs.ui; |
||||
|
||||
import com.fr.design.dialog.FineJOptionPane; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.mainframe.DesignerContext; |
||||
import com.fr.workspace.server.vcs.v2.move.VcsMoveService; |
||||
|
||||
import javax.swing.JOptionPane; |
||||
|
||||
/** |
||||
* 版本管理迁移检查 |
||||
* |
||||
* @author Destiny.Lin |
||||
* @since 11.0 |
||||
* Created on 2023/7/18 |
||||
*/ |
||||
public class VcsMovingExitOption { |
||||
|
||||
|
||||
/** |
||||
* 关闭前的检查 |
||||
* |
||||
* @return |
||||
*/ |
||||
public static boolean ShowDialogAndConfirmExit() { |
||||
return showDialogAndChoose(Toolkit.i18nText("Fine-Design_Vcs_Close_Tips")); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 切换环境前的检查 |
||||
* |
||||
* @return |
||||
*/ |
||||
public static boolean ShowDialogAndConfirmSwitch() { |
||||
return showDialogAndChoose(Toolkit.i18nText("Fine-Design_Vcs_Switch_Tips")); |
||||
} |
||||
|
||||
private static boolean showDialogAndChoose(String msg) { |
||||
if (VcsMoveService.getInstance().isMoving()) { |
||||
int result = FineJOptionPane.showConfirmDialog( |
||||
DesignerContext.getDesignerFrame(), |
||||
msg, |
||||
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), |
||||
FineJOptionPane.YES_NO_OPTION |
||||
); |
||||
return result == JOptionPane.YES_OPTION; |
||||
} |
||||
return true; |
||||
} |
||||
|
||||
|
||||
|
||||
} |
Loading…
Reference in new issue