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(e -> new ZhuCeMan());
|
}
|
return zhuce;
|
}
|
|
public JButtonModel getJbt_gengxin() {
|
if(jbt_gengxin==null) {
|
jbt_gengxin=new JButtonModel("¼ì²é¸üÐÂ");
|
jbt_gengxin.addActionListener(e -> 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();
|
}
|
}
|
}
|
|
|
}
|