no message

This commit is contained in:
2025-01-11 14:26:24 +03:00
parent d495a5afb7
commit bd705813e9
10 changed files with 32 additions and 19 deletions

View File

@@ -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];