Skip to content

Commit 6e09bb2

Browse files
committed
1.2.0 去除生成代码,加入加载提示
1 parent 754f47d commit 6e09bb2

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

jar/apkReSign_1.2.0.jar

64.5 KB
Binary file not shown.

src/com/apkfuns/apkresign/Global.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Created by pengwei on 16/4/15.
55
*/
66
public class Global {
7-
public static final String VERSION = "1.1.0";
7+
public static final String VERSION = "1.2.0";
88

99
public static final String ABOUT_UEL = "https://github.com/pengwei1024/apkReSign";
1010
}

src/de/troido/resigner/ui/MainWindow.java

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
*/
1414
package de.troido.resigner.ui;
1515

16-
import java.awt.Color;
17-
import java.awt.Graphics;
18-
import java.awt.Graphics2D;
16+
import java.awt.*;
1917
import java.awt.datatransfer.DataFlavor;
2018
import java.awt.datatransfer.UnsupportedFlavorException;
2119
import java.awt.dnd.DnDConstants;
@@ -35,11 +33,11 @@
3533
import com.apkfuns.apkresign.BrowserUtil;
3634
import com.apkfuns.apkresign.Global;
3735
import de.troido.resigner.controll.ReSignerLogic;
38-
import de.troido.resigner.utils.PropertiesUtil;
3936

4037
public class MainWindow extends JPanel implements DropTargetListener, ActionListener {
4138
private BufferedImage img;
4239
public static PathSettingWindow pathSetting;
40+
public JLabel progressLabel;
4341

4442
@Override
4543
protected void paintComponent(Graphics g) {
@@ -59,6 +57,10 @@ public MainWindow() throws Exception {
5957
DropTarget dt = new DropTarget(f, this);
6058
this.setDropTarget(dt);
6159
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
60+
progressLabel = new JLabel("正在重签名中,请稍等...");
61+
progressLabel.setFont(new Font("Dialog", 1, 16));
62+
setProgressLabel(false);
63+
add(progressLabel);
6264
f.getContentPane().add(this);
6365
f.setSize(318, 335);
6466
f.setResizable(false);
@@ -79,6 +81,15 @@ public MainWindow() throws Exception {
7981
checkEnvironment();
8082
}
8183

84+
/**
85+
* 设置进度提示是否显示
86+
*
87+
* @param show
88+
*/
89+
public void setProgressLabel(boolean show) {
90+
progressLabel.setVisible(show);
91+
}
92+
8293
private boolean checkEnvironment() {
8394
try {
8495
ReSignerLogic.checkEnvironment();
@@ -131,6 +142,7 @@ public void drop(DropTargetDropEvent dtde) {
131142
if (!checkEnvironment()) {
132143
return;
133144
}
145+
setProgressLabel(true);
134146
String inFileName = "";
135147
try {
136148
java.util.List files = (java.util.List) dtde.getTransferable()
@@ -148,7 +160,6 @@ public void drop(DropTargetDropEvent dtde) {
148160
fc.setSelectedFile(outFile);
149161
// In response to a button click:
150162
int returnVal = fc.showSaveDialog(this);
151-
152163
if (returnVal != JFileChooser.APPROVE_OPTION)
153164
return;
154165
outFile = fc.getSelectedFile();
@@ -157,13 +168,15 @@ public void drop(DropTargetDropEvent dtde) {
157168
outFileName = outFileName + ".apk";
158169
String result[] = ReSignerLogic.resign(inFileName, outFileName);
159170
if (result != null) {
160-
/*JOptionPane.showMessageDialog(this,
171+
JOptionPane.showMessageDialog(this,
161172
"apk successfully re-signed\n\nPackage name: "
162-
+ result[0] + "\nMain activity: " + result[1]);*/
163-
new ShowCodeWindow(result[0], result[1]);
173+
+ result[0] + "\nMain activity: " + result[1]);
174+
// new ShowCodeWindow(result[0], result[1]);
164175
}
165176
} catch (Exception e) {
166177
JOptionPane.showMessageDialog(this, "ERROR: " + e.getMessage());
178+
} finally {
179+
setProgressLabel(false);
167180
}
168181

169182
}

0 commit comments

Comments
 (0)