no message
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Passes.Pass;
|
||||
import Common.Visual.Windows.Dialog.SliderNumberForm;
|
||||
import Common.Visual.Windows.Dialog.VDirectoryChooser;
|
||||
import Common.Visual.Windows.Dialog.VFileChooser;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalProperties;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
public class UpdateProperty extends Pass<Object> {
|
||||
//todo в дальнейшем, все настройки перевести в properties, и перенести сюда функционал UpdateSetting (?)
|
||||
@@ -20,6 +23,8 @@ public class UpdateProperty extends Pass<Object> {
|
||||
oldValue = field.get(Global.properties);
|
||||
newValue = null;
|
||||
SliderNumberForm sliderNumberForm = new SliderNumberForm();
|
||||
VDirectoryChooser directoryChooser = new VDirectoryChooser("");
|
||||
VFileChooser fileChooser = new VFileChooser("", "exe");
|
||||
//-
|
||||
if (args.length==1){
|
||||
switch (name){
|
||||
@@ -27,6 +32,14 @@ public class UpdateProperty extends Pass<Object> {
|
||||
if (sliderNumberForm.ShowDialog(description, oldValue, 1, 12))
|
||||
newValue=sliderNumberForm.Result;
|
||||
break;
|
||||
case "Workspace":
|
||||
directoryChooser.setTitle(description);
|
||||
directoryChooser.SetCurrentDirectory(
|
||||
Global.properties.Workspace.isEmpty() ? Global.ProjectsDirectory : new File(Global.properties.Workspace));
|
||||
File dir = directoryChooser.ShowDialog();
|
||||
if (dir != null)
|
||||
newValue = dir.getAbsolutePath();
|
||||
break;
|
||||
}
|
||||
}else
|
||||
newValue = args[1];
|
||||
|
||||
@@ -31,14 +31,6 @@ public class UpdateSetting extends Pass<DBSetting> {
|
||||
break;
|
||||
case StringField:
|
||||
switch (target.Name) {
|
||||
case Workspace:
|
||||
directoryChooser.setTitle(target.Name.getDescription());
|
||||
directoryChooser.SetCurrentDirectory(
|
||||
target.Value.isEmpty() ? Global.ProjectsDirectory : new File(target.Value));
|
||||
File dir = directoryChooser.ShowDialog();
|
||||
if (dir != null)
|
||||
NewValue = dir.getAbsolutePath();
|
||||
break;
|
||||
case LocalMakePathWindows:
|
||||
fileChooser.setTitle(target.Name.getDescription());
|
||||
File file = fileChooser.ShowDialog();
|
||||
|
||||
Reference in New Issue
Block a user