промежуточный. Перенос отладки текущего проекта к его вкладкам.
This commit is contained in:
@@ -6,12 +6,15 @@ import Common.UI.UI;
|
||||
import Common.UI.Windows.Form;
|
||||
import Common.UI.Windows.FormType;
|
||||
import Common.Utils.Utils;
|
||||
import TestingSystem.Group.Group;
|
||||
import TestingSystem.Test.Test;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
import Visual_DVM_2021.UI.Interface.*;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.Vector;
|
||||
public class MainForm extends Form implements MainWindow {
|
||||
private final WelcomeForm welcomeForm = new WelcomeForm(); //заглушка когда проекта нет.
|
||||
int global_index = 0;
|
||||
@@ -56,6 +59,8 @@ public class MainForm extends Form implements MainWindow {
|
||||
SaveCredentialsPanel();
|
||||
SaveTestsPanel();
|
||||
SaveTestingPanel();
|
||||
if (UI.debugWindow!=null)
|
||||
((FormWithSplitters) UI.debugWindow).SaveSplitters();
|
||||
Global.FinishApplication();
|
||||
}
|
||||
public MainForm() {
|
||||
@@ -169,6 +174,29 @@ public class MainForm extends Form implements MainWindow {
|
||||
globalTabs.setTitleAt(2, res);
|
||||
*/
|
||||
}
|
||||
@Override
|
||||
public void ShowCheckedTestsCount() {
|
||||
int res = 0;
|
||||
for (Group group : Global.testingServer.db.groups.getCheckedItems()) {
|
||||
Vector<Test> selected_tests = new Vector<>();
|
||||
Vector<Test> group_tests = new Vector<>();
|
||||
for (Test test : Global.testingServer.db.tests.Data.values()) {
|
||||
if (test.group_id.equals(group.id)) {
|
||||
if (test.isSelected())
|
||||
selected_tests.add(test);
|
||||
else
|
||||
group_tests.add(test);
|
||||
}
|
||||
}
|
||||
//-
|
||||
if (selected_tests.isEmpty())
|
||||
res += group_tests.size();
|
||||
else
|
||||
res += selected_tests.size();
|
||||
}
|
||||
//--
|
||||
globalTabs.setTitleAt(3, "Тесты: " + res);
|
||||
}
|
||||
private void SaveTestingPanel() {
|
||||
if (testingForm != null) {
|
||||
testingForm.SaveSplitters();
|
||||
|
||||
Reference in New Issue
Block a user