рефактиринг интерфейса при отображении полномочий роли пользователя. ввод настройки отменяющей приглашение регистрации при запуске приложения.
This commit is contained in:
@@ -13,19 +13,18 @@ import _VisualDVM.ProjectData.ProjectView;
|
||||
import _VisualDVM.TestingSystem.Common.TestingServer;
|
||||
import _VisualDVM.TestingSystem.DVM.RemoteDVMTestingPlanner;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.PackageModeSupervisor;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.fife.ui.rsyntaxtextarea.AbstractTokenMakerFactory;
|
||||
import org.fife.ui.rsyntaxtextarea.TokenMakerFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Paths;
|
||||
public class Global {
|
||||
//todo свести большинство к содержимому mainModule, сделать различные типы properties, переместить туда глобальный журнал (?)
|
||||
//todo свести большинство к содержимому mainModule
|
||||
public static MainModule mainModule = null;
|
||||
//Режим
|
||||
public static Mode mode = Mode.Undefined;
|
||||
//setAdminRights-------------
|
||||
public static VisualDVMProperties properties= null;
|
||||
public static VisualDVMProperties properties = null;
|
||||
public static NormalProperties normalProperties = null;
|
||||
public static ComponentsServerProperties componentsServerProperties = null;
|
||||
public static TestingServerProperties testingServerProperties = null;
|
||||
@@ -79,8 +78,7 @@ public class Global {
|
||||
Utils_.CheckDirectory(KeysDirectory = new File(Utils_.getHomeDirectory(), Constants.KeyDirectoryName));
|
||||
try {
|
||||
Utils_.forceDeleteWithCheck(new File(DataDirectory, "credentials.sqlite"));
|
||||
}
|
||||
catch (Exception ex){
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -136,7 +134,7 @@ public class Global {
|
||||
mainModule.DeactivateDB();
|
||||
if (componentsServer.db != null)
|
||||
componentsServer.db.Disconnect();
|
||||
if (componentsServer.credentials_db!=null)
|
||||
if (componentsServer.credentials_db != null)
|
||||
componentsServer.credentials_db.Disconnect();
|
||||
if (testingServer.db != null)
|
||||
testingServer.db.Disconnect();
|
||||
@@ -203,8 +201,9 @@ public class Global {
|
||||
// FoldParserManager.get().addFoldParserMapping("text/FortranSPF", new FortranFolder()); блоки кода. todo
|
||||
//light_editor.xml-------->>
|
||||
mainModule.ActivateDB();
|
||||
// https://habr.com/ru/articles/446888/ сертификат?
|
||||
mainModule.getPass(PassCode.CheckAccount).Do();
|
||||
// https://habr.com/ru/articles/446888/ сертификат?
|
||||
if (Global.normalProperties.OfferRegistrationOnStart)
|
||||
mainModule.getPass(PassCode.CheckAccount).Do();
|
||||
//---------------
|
||||
componentsServer.ActivateDB();
|
||||
testingServer.ActivateDB();
|
||||
@@ -251,17 +250,17 @@ public class Global {
|
||||
File propertiesFile = new File(System.getProperty("user.dir"), "properties");
|
||||
if (!propertiesFile.exists()) {
|
||||
mode = Mode.Normal;
|
||||
properties=normalProperties = Utils_.SynschronizeProperties(propertiesFile, NormalProperties.class);
|
||||
properties = normalProperties = Utils_.SynschronizeProperties(propertiesFile, NormalProperties.class);
|
||||
} else {
|
||||
properties = Utils_.jsonFromFile(propertiesFile, VisualDVMProperties.class);
|
||||
mode = properties.Mode;
|
||||
//--->>
|
||||
switch (mode){
|
||||
switch (mode) {
|
||||
case Normal:
|
||||
normalProperties = Utils_.SynschronizeProperties(propertiesFile, NormalProperties.class);
|
||||
break;
|
||||
case Server:
|
||||
componentsServerProperties = Utils_.SynschronizeProperties(propertiesFile, ComponentsServerProperties.class);
|
||||
componentsServerProperties = Utils_.SynschronizeProperties(propertiesFile, ComponentsServerProperties.class);
|
||||
break;
|
||||
case Testing:
|
||||
testingServerProperties = Utils_.SynschronizeProperties(propertiesFile, TestingServerProperties.class);
|
||||
|
||||
Reference in New Issue
Block a user