рефакторинг
This commit is contained in:
@@ -1,16 +1,25 @@
|
||||
package _VisualDVM;
|
||||
import Common.CommonConstants;
|
||||
import _VisualDVM.ComponentsServer.UserAccount.UserAccount;
|
||||
import _VisualDVM.GlobalData.Account.AccountRole;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.io.File;
|
||||
public class NormalProperties extends VisualDVMProperties{
|
||||
//---
|
||||
public class NormalProperties extends VisualDVMProperties {
|
||||
//--->
|
||||
@Expose
|
||||
public String Workspace ="";
|
||||
public String Email = "";
|
||||
@Expose
|
||||
public String ProjectsSearchDirectory="";
|
||||
public String Name = "";
|
||||
@Expose
|
||||
public AccountRole Role = AccountRole.Undefined;
|
||||
//--->
|
||||
@Expose
|
||||
public String Workspace = "";
|
||||
@Expose
|
||||
public String ProjectsSearchDirectory = "";
|
||||
@Expose
|
||||
public String VisualiserPath = "";
|
||||
@Expose
|
||||
@@ -43,16 +52,16 @@ public class NormalProperties extends VisualDVMProperties{
|
||||
public boolean collapseProjectTrees = false;
|
||||
//--
|
||||
@Expose
|
||||
public int EditorFontSize=14;
|
||||
public int EditorFontSize = 14;
|
||||
@Expose
|
||||
public int ComponentsWindowWidth = 650;
|
||||
@Expose
|
||||
public int ComponentsWindowHeight = 250;
|
||||
//--
|
||||
@Expose
|
||||
public int Kernels= Utils.getHalfKernels();
|
||||
public int Kernels = Utils.getHalfKernels();
|
||||
@Expose
|
||||
public String LocalMakePathWindows= "C:\\MinGW\\msys\\1.0\\bin\\make.exe";
|
||||
public String LocalMakePathWindows = "C:\\MinGW\\msys\\1.0\\bin\\make.exe";
|
||||
//--
|
||||
@Expose
|
||||
public int CheckTestingIntervalSeconds = 10; //интервал автопроверки тестирования
|
||||
@@ -82,27 +91,29 @@ public class NormalProperties extends VisualDVMProperties{
|
||||
public boolean ComparsionDiffMergeOn = false;
|
||||
//компактность--
|
||||
@Expose
|
||||
public boolean ShowFullArraysDeclarations =false;
|
||||
public boolean ShowFullArraysDeclarations = false;
|
||||
@Expose
|
||||
public boolean ShowFullTabsNames=true;
|
||||
public boolean ShowFullTabsNames = true;
|
||||
@Expose
|
||||
public boolean SmallScreen = false;
|
||||
@Expose
|
||||
public int BugReportsAgeLimit = 2;
|
||||
@Expose
|
||||
public int FastAccessPassesCount=10;
|
||||
public int FastAccessPassesCount = 10;
|
||||
@Expose
|
||||
public int LastOpenedProjectsCount=10;
|
||||
public int LastOpenedProjectsCount = 10;
|
||||
//--
|
||||
public NormalProperties(){
|
||||
public NormalProperties() {
|
||||
Mode = _VisualDVM.Mode.Normal;
|
||||
}
|
||||
public NormalProperties(File file_in){
|
||||
public NormalProperties(File file_in) {
|
||||
super(_VisualDVM.Mode.Normal, file_in);
|
||||
}
|
||||
@Override
|
||||
public String getFieldDescription(String fieldName) {
|
||||
switch (fieldName) {
|
||||
case "Email":
|
||||
return "Адрес электронной почты";
|
||||
case "Kernels":
|
||||
return "Число ядер при компиляции";
|
||||
case "LocalMakePathWindows":
|
||||
@@ -159,4 +170,10 @@ public class NormalProperties extends VisualDVMProperties{
|
||||
public boolean controlAction(String fieldName, JMenuItem control) {
|
||||
return (Global.mainModule.getPass(PassCode.UpdateProperty).Do(fieldName));
|
||||
}
|
||||
public void SynchronizeAccount(UserAccount account){
|
||||
Name = account.name;
|
||||
Email = account.email;
|
||||
Role = account.role;
|
||||
Update();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user