Moved BootState

This commit is contained in:
Konloch 2021-07-23 19:17:20 -07:00
parent 8df164389c
commit e371a76c98

AI 샘플 코드 생성 중입니다

Loading...
4 changed files with 38 additions and 9 deletions

View File

@ -16,6 +16,7 @@ import me.konloch.kontainer.io.DiskReader;
import the.bytecode.club.bytecodeviewer.api.BCV;
import the.bytecode.club.bytecodeviewer.api.ExceptionUI;
import the.bytecode.club.bytecodeviewer.bootloader.Boot;
import the.bytecode.club.bytecodeviewer.bootloader.BootState;
import the.bytecode.club.bytecodeviewer.bootloader.InstallFatJar;
import the.bytecode.club.bytecodeviewer.bootloader.UpdateCheck;
import the.bytecode.club.bytecodeviewer.gui.MainViewerGUI;
@ -193,7 +194,7 @@ public class BytecodeViewer
//load settings and set swing components state
SettingsSerializer.loadSettings();
Configuration.bootState = Configuration.BootState.SETTINGS_LOADED;
Configuration.bootState = BootState.SETTINGS_LOADED;
//set translation language
if (!Settings.hasSetLanguageAsSystemLanguage)
@ -219,7 +220,7 @@ public class BytecodeViewer
if (CLI == CommandLineInput.GUI)
{
BytecodeViewer.boot(false);
Configuration.bootState = Configuration.BootState.GUI_SHOWING;
Configuration.bootState = BootState.GUI_SHOWING;
}
else //CLI arguments say keep it CLI
{

View File

@ -1,5 +1,6 @@
package the.bytecode.club.bytecodeviewer;
import the.bytecode.club.bytecodeviewer.bootloader.BootState;
import the.bytecode.club.bytecodeviewer.gui.theme.LAFTheme;
import the.bytecode.club.bytecodeviewer.gui.theme.RSTATheme;
import the.bytecode.club.bytecodeviewer.translation.Language;
@ -12,6 +13,7 @@ import java.io.File;
* @author Konloch
* @since 6/21/2021
*/
public class Configuration
{
public static String python2 = "";
@ -108,10 +110,4 @@ public class Configuration
return new File(".");
}
public enum BootState
{
START_UP,
SETTINGS_LOADED,
GUI_SHOWING,
}
}

View File

@ -0,0 +1,31 @@
package the.bytecode.club.bytecodeviewer.bootloader;
/***************************************************************************
* Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite *
* Copyright (C) 2014 Kalen 'Konloch' Kinloch - http://bytecodeviewer.com *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
/**
* @author Konloch
* @since 7/23/2021
*/
public enum BootState
{
START_UP,
SETTINGS_LOADED,
GUI_SHOWING,
}

View File

@ -2,6 +2,7 @@ package the.bytecode.club.bytecodeviewer.gui.resourceviewer;
import the.bytecode.club.bytecodeviewer.Configuration;
import the.bytecode.club.bytecodeviewer.SettingsSerializer;
import the.bytecode.club.bytecodeviewer.bootloader.BootState;
import the.bytecode.club.bytecodeviewer.decompilers.Decompiler;
import the.bytecode.club.bytecodeviewer.gui.components.DecompilerViewComponent;
import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents;
@ -110,7 +111,7 @@ public class DecompilerSelectionPane
AbstractButton button = it.nextElement();
button.addActionListener((event)->
{
if(Configuration.bootState != Configuration.BootState.GUI_SHOWING)
if(Configuration.bootState != BootState.GUI_SHOWING)
return;
SettingsSerializer.saveSettingsAsync();