zsh_root
2024-01-02 7b595546af704983dbafcd0d385c8768ddacefc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
package Frame;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.io.IOException;
import javax.swing.ImageIcon;
import javax.swing.JPanel;
import ColorAndFont.UIColor;
import JNADell.DellJAN;
import PbuliClass.JButtonModel;
import PbuliClass.JlableModel;
import PbuliClass.ShowMessage;
import PbuliClass.Systems;
import PbuliClass.jinternalFrame;
import zhuce.GetCpu;
import zhuce.ZhuCeMan;
public class Versions extends jinternalFrame {
 
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    JPanel mb=null;
    JlableModel jl_jiqima=new JlableModel("»úÆ÷Âë: "+GetCpu.get_mac());
    JlableModel jl_time=new JlableModel("½ØÖÁʹÓÃÈÕÆÚ: "+ZhuCeMan.getMimi());
    JlableModel verysion= new JlableModel("°æ±¾ºÅ:V4.88"+"-SF:"+DellJAN.getSuanfaversion());
    JlableModel copyright_statement= new JlableModel("HXZK@202107312324");
    JButtonModel zhuce=null;
    JButtonModel jbt_gengxin=null;//¼ì²é¸üÐÂ
 
    public Versions() {
        String title="°æ±¾ºÍ°æÈ¨ÉêÃ÷";
        if(Systems.sys().getLanguage().equals("English")) {
            title="Software version and copyright declaration";
        }
        this.setTitle(title);
        Container rq=getContentPane();//»ñÈ¡ÈÝÆ÷
        rq.setLayout(new BorderLayout());
        rq.setBackground(Color.white);
        rq.add(getMb(),BorderLayout.CENTER);
        this.setFrameIcon(new ImageIcon("image/icon/versionicon.png"));//ÉèÖô°Ìåͼ±ê
    }
 
    public JPanel getMb() {
        if(mb==null) {
            mb=new JPanel();
            mb.setLayout(null);
            mb.setBackground(UIColor.getNorth_color());
            verysion.setBounds(250, 90, 300, 25);            
            jl_jiqima.setBounds(250, 140, 500, 25);
            jl_time.setBounds(250, 190, 250, 25);            
            getZhuce().setBounds(500, 190, 80, 25);
            copyright_statement.setBounds(250, 240, 500, 25);
            getJbt_gengxin().setBounds(250,290,80,25);
 
            mb.add(jbt_gengxin);
            mb.add(verysion);
            mb.add(copyright_statement);
            mb.add(jl_jiqima);
            mb.add(jl_time);
            if(!ZhuCeMan.isYongjiu()) {
                mb.add(zhuce);
            }
        }
        return mb;
    }
 
    public JButtonModel getZhuce() {
        if(zhuce==null) {
            zhuce=new JButtonModel("×¢ ²á");
            zhuce.setBackground(UIColor.getNorth_color());
            zhuce.setForeground(Color.black);
            zhuce.setBorderPainted(false);    
            zhuce.addActionListener(-> new ZhuCeMan());
        }
        return zhuce;
    }
 
    public JButtonModel getJbt_gengxin() {
        if(jbt_gengxin==null) {
            jbt_gengxin=new JButtonModel("¼ì²é¸üÐÂ");
            jbt_gengxin.addActionListener(-> openwangye("http://39.106.210.13:8848/hxzkoa/updateexe.do"));
        }
        return jbt_gengxin;
    }
 
    public static void openwangye(String url) {
        java.net.URI uri = java.net.URI.create(url);
        // »ñÈ¡µ±Ç°ÏµÍ³×ÀÃæÀ©Õ¹
        ShowMessage.zidingyi("ÕýÔÚ´ò¿ªµØÖ·£º"+url);
        java.awt.Desktop dp = java.awt.Desktop.getDesktop();
        // ÅжÏϵͳ×ÀÃæÊÇ·ñÖ§³ÖÒªÖ´ÐеŦÄÜ
        if (dp.isSupported(java.awt.Desktop.Action.BROWSE)) {
            try {
                dp.browse(uri);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
 
 
}