сворачивание машин v++
This commit is contained in:
@@ -94,6 +94,8 @@ public class GlobalProperties extends Properties {
|
||||
public int CheckTestingIntervalSeconds = 10; //интервал автопроверки тестирования
|
||||
@Expose
|
||||
public boolean EmailOnTestingProgress = false; //включено ли оповещение по email о результатах тестирования.
|
||||
@Expose
|
||||
public boolean collapseCredentials=false;
|
||||
//-
|
||||
@Override
|
||||
public File getFile() {
|
||||
|
||||
66
src/Common/UI/Menus_2023/CredentialsBar/CredentialsBar.java
Normal file
66
src/Common/UI/Menus_2023/CredentialsBar/CredentialsBar.java
Normal file
@@ -0,0 +1,66 @@
|
||||
package Common.UI.Menus_2023.CredentialsBar;
|
||||
import Common.Current;
|
||||
import Common.UI.Menus_2023.MenuBarButton;
|
||||
import Common.UI.Menus_2023.VisualiserMenuBar;
|
||||
import Common.UI.Themes.VisualiserFonts;
|
||||
import Common.UI.UI;
|
||||
|
||||
import javax.swing.*;
|
||||
public class CredentialsBar extends VisualiserMenuBar {
|
||||
public MenuBarButton MachineButton;
|
||||
public MenuBarButton UserButton;
|
||||
public MenuBarButton ExpandButton;
|
||||
public CredentialsBar(){
|
||||
add(MachineButton = new MenuBarButton() {
|
||||
{
|
||||
setIcon("/icons/Machine.png");
|
||||
setFont(VisualiserFonts.TreeBold);
|
||||
setToolTipText("Текущая машина");
|
||||
/*
|
||||
addActionListener(e -> {
|
||||
UI.getMainWindow().FocusCredentials();
|
||||
});
|
||||
*/
|
||||
}
|
||||
});
|
||||
//--
|
||||
add(UserButton = new MenuBarButton() {
|
||||
{
|
||||
setIcon("/icons/User.png");
|
||||
setFont(VisualiserFonts.TreeBold);
|
||||
setToolTipText("Текущий пользователь");
|
||||
/*
|
||||
addActionListener(e -> {
|
||||
UI.getMainWindow().FocusCredentials();
|
||||
});
|
||||
*/
|
||||
}
|
||||
});
|
||||
add(new JSeparator());
|
||||
//--
|
||||
add(ExpandButton = new MenuBarButton() {
|
||||
{
|
||||
setIcon("/icons/ExpandDown.png");
|
||||
setFont(VisualiserFonts.TreeBold);
|
||||
setToolTipText("Развернуть");
|
||||
|
||||
addActionListener(e -> {
|
||||
UI.getMainWindow().getTestingWindow().SwitchCredentials(true);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void ShowMachine(){
|
||||
MachineButton.setText(Current.getMachine().getURL());
|
||||
}
|
||||
public void ShowUser(){
|
||||
UserButton.setText(Current.getUser().login);
|
||||
}
|
||||
public void ShowNoMachine(){
|
||||
MachineButton.setText("?");
|
||||
}
|
||||
public void ShowNoUser(){
|
||||
UserButton.setText("?");
|
||||
}
|
||||
}
|
||||
@@ -52,17 +52,18 @@ public class MainMenuBar extends VisualiserMenuBar {
|
||||
//-
|
||||
setPreferredSize(new Dimension(0, 30));
|
||||
//---
|
||||
/*
|
||||
/*
|
||||
add(new MenuBarButton() {
|
||||
{
|
||||
setIcon("/icons/Apply.png");
|
||||
setToolTipText("Test");
|
||||
addActionListener(e -> {
|
||||
Pass_2021.passes.get(PassCode_2021.TestPass).Do();
|
||||
// Pass_2021.passes.get(PassCode_2021.TestPass).Do();
|
||||
UI.getMainWindow().getTestingWindow().SwitchCredentials(false);
|
||||
});
|
||||
}
|
||||
});
|
||||
*/
|
||||
*/
|
||||
//---
|
||||
ShowProject(false);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package Common.UI;
|
||||
import Common.Current;
|
||||
import Common.Database.DataSet;
|
||||
import Common.Global;
|
||||
import Common.UI.Menus_2023.CredentialsBar.CredentialsBar;
|
||||
import Repository.BugReport.BugReportsMenuBar;
|
||||
import GlobalData.Compiler.CompilersMenuBar;
|
||||
import TestingSystem.DVM.Configuration.ConfigurationsMenuBar;
|
||||
@@ -106,6 +107,7 @@ public class UI {
|
||||
public static MenuElement[] last_menu_path;
|
||||
public static MainMenuBar mainMenuBar = null;
|
||||
public static TestingBar testingBar = null;
|
||||
public static CredentialsBar credentialsBar = null;
|
||||
public static VersionsMenuBar versionsMenuBar = null;
|
||||
public static FastAccessMenuBar fastAccessMenuBar = null;
|
||||
//------------
|
||||
@@ -209,6 +211,7 @@ public class UI {
|
||||
public static void CreateMenus() {
|
||||
mainMenuBar = new MainMenuBar();
|
||||
testingBar = new TestingBar();
|
||||
credentialsBar = new CredentialsBar();
|
||||
versionsMenuBar = new VersionsMenuBar();
|
||||
fastAccessMenuBar = new FastAccessMenuBar();
|
||||
//---------------------------------------------------->>
|
||||
|
||||
Reference in New Issue
Block a user