no message
This commit is contained in:
@@ -6,7 +6,7 @@ import Common.Visual.Windows.Dialog.SpinnerNumberForm;
|
||||
import Common.Visual.Windows.Dialog.VDirectoryChooser;
|
||||
import Common.Visual.Windows.Dialog.VFileChooser;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalProperties;
|
||||
import _VisualDVM.NormalProperties;
|
||||
import _VisualDVM.Utils;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -20,9 +20,9 @@ public class UpdateProperty extends Pass<Object> {
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
name = (String) args[0];
|
||||
String description = Global.properties.getFieldDescription(name);
|
||||
field = GlobalProperties.class.getField(name);
|
||||
oldValue = field.get(Global.properties);
|
||||
String description = Global.normalProperties.getFieldDescription(name);
|
||||
field = NormalProperties.class.getField(name);
|
||||
oldValue = field.get(Global.normalProperties);
|
||||
newValue = null;
|
||||
SliderNumberForm sliderNumberForm = new SliderNumberForm();
|
||||
VDirectoryChooser directoryChooser = new VDirectoryChooser("");
|
||||
@@ -69,7 +69,8 @@ public class UpdateProperty extends Pass<Object> {
|
||||
case "Workspace":
|
||||
directoryChooser.setTitle(description);
|
||||
directoryChooser.SetCurrentDirectory(
|
||||
Global.properties.Workspace.isEmpty() ? Global.ProjectsDirectory : new File(Global.properties.Workspace));
|
||||
Global.normalProperties.Workspace.isEmpty() ? Global.ProjectsDirectory :
|
||||
new File(Global.normalProperties.Workspace));
|
||||
File dir = directoryChooser.ShowDialog();
|
||||
if (dir != null)
|
||||
newValue = dir.getAbsolutePath();
|
||||
@@ -82,8 +83,8 @@ public class UpdateProperty extends Pass<Object> {
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
field.set(Global.properties, newValue);
|
||||
Global.properties.Update();
|
||||
field.set(Global.normalProperties, newValue);
|
||||
Global.normalProperties.Update();
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
@@ -128,8 +129,8 @@ public class UpdateProperty extends Pass<Object> {
|
||||
case "SmallScreen":
|
||||
if (Global.mainModule.HasProject())
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().SwitchScreen(
|
||||
Global.properties.SmallScreen);
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().SwitchScreen( Global.properties.SmallScreen);
|
||||
Global.normalProperties.SmallScreen);
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().SwitchScreen( Global.normalProperties.SmallScreen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user