no message

This commit is contained in:
2023-10-25 02:20:57 +03:00
parent 37c7bbda44
commit 99b24b3eba
9 changed files with 82 additions and 47 deletions

View File

@@ -0,0 +1,40 @@
package Visual_DVM_2021.Passes.All;
import Common.Current;
import Common.Utils.Utils;
import Repository.Server.ServerCode;
import Repository.Server.ServerExchangeUnit_2021;
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
import TestingSystem.TasksPackage.TasksPackageState;
import Visual_DVM_2021.Passes.TestingSystemPass;
import java.io.File;
public class DownloadSapforTasksPackage extends TestingSystemPass<SapforTasksPackage> {
@Override
public String getIconPath() {
return "/icons/DownloadAll.png";
}
@Override
public String getButtonText() {
return "";
}
File dst = null;
@Override
protected boolean canStart(Object... args) throws Exception {
if (Current.Check(Log, Current.SapforTasksPackage)) {
target = Current.getSapforTasksPackage();
if (target.state.equals(TasksPackageState.Done)) return true;
else Log.Writeln_("Пакет не завершен.");
}
return false;
}
@Override
protected void ServerAction() throws Exception {
Command(new ServerExchangeUnit_2021(ServerCode.DownloadSapforTasksPackage, Current.getAccount().email, target.id));
response.Unpack(dst = Utils.getTempFileName(target.id));
}
@Override
protected boolean validate() {
return dst!=null&&dst.exists();
}
}

View File

@@ -303,11 +303,15 @@ public enum PassCode_2021 {
EditSapforConfigurationCommandOnServer,
DeleteSapforConfigurationCommand,
//->
DownloadSapforTasksPackage,
//->
TestPass;
public String getDescription() {
switch (this) {
case Undefined:
return "?";
case DownloadSapforTasksPackage:
return "Загрузить пакет задач SAPFOR";
case AbortSapforTaskPackage:
return "Прервать пакет задач SAPFOR";
case ShowAllParallelVariants:

View File

@@ -228,38 +228,14 @@
</properties>
<border type="none"/>
<children>
<splitpane id="d5aac" binding="SC62">
<grid id="a8a6" binding="sapforTasksPackagesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="200" height="200"/>
</grid>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<dividerLocation value="200"/>
<dividerSize value="3"/>
</properties>
<properties/>
<border type="none"/>
<children>
<grid id="a5ba7" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="right"/>
</constraints>
<properties>
<minimumSize width="0" height="200"/>
</properties>
<border type="none"/>
<children/>
</grid>
<grid id="eec01" binding="sapforTasksPackagesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<splitpane position="left"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</splitpane>
<children/>
</grid>
</children>
</grid>
</children>

View File

@@ -20,7 +20,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
public JSplitPane SC53;
public JSplitPane SC56;
public JSplitPane SC57;
public JSplitPane SC62;
public JSplitPane SC63;
public JSplitPane SC59;
//-