auto-sync
This commit is contained in:
parent
bbae460b5f
commit
54a6d956e2
|
@ -34,9 +34,10 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see com.rusefi.StartupFrame
|
||||
*/
|
||||
public class Launcher {
|
||||
public static final int CONSOLE_VERSION = 20150405;
|
||||
public static final int CONSOLE_VERSION = 20150406;
|
||||
public static final boolean SHOW_STIMULATOR = false;
|
||||
public static final String TAB_INDEX = "main_tab";
|
||||
private static final String TAB_INDEX = "main_tab";
|
||||
protected static final String PORT_KEY = "port";
|
||||
private final String port;
|
||||
private final JTabbedPane tabbedPane = new JTabbedPane();
|
||||
|
||||
|
@ -70,6 +71,8 @@ public class Launcher {
|
|||
staticFrame = frame.getFrame();
|
||||
FileLog.MAIN.start();
|
||||
|
||||
getConfig().getRoot().setProperty(PORT_KEY, port);
|
||||
|
||||
LinkManager.start(port);
|
||||
|
||||
FileLog.MAIN.logLine("Console " + CONSOLE_VERSION);
|
||||
|
@ -102,7 +105,7 @@ public class Launcher {
|
|||
|
||||
|
||||
if (!LinkManager.isLogViewerMode(port)) {
|
||||
int selectedIndex = getConfig().getRoot().getIntProperty("main_tab", 2);
|
||||
int selectedIndex = getConfig().getRoot().getIntProperty(TAB_INDEX, 2);
|
||||
if (selectedIndex < tabbedPane.getTabCount())
|
||||
tabbedPane.setSelectedIndex(selectedIndex);
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
||||
|
||||
/**
|
||||
* This frame is used on startup to select the port we would be using
|
||||
*
|
||||
|
@ -128,6 +130,8 @@ public class StartupFrame {
|
|||
for (final String port : ports)
|
||||
comboPorts.addItem(port);
|
||||
panel.add(comboPorts);
|
||||
String defaultPort = getConfig().getRoot().getProperty(Launcher.PORT_KEY, "");
|
||||
comboPorts.setSelectedItem(defaultPort);
|
||||
|
||||
final JComboBox<String> comboSpeeds = createSpeedCombo();
|
||||
// panel.add(comboSpeeds);
|
||||
|
|
Loading…
Reference in New Issue