📄 mainframe.java
字号:
package net.csksoft.TigerBox;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import com.cloudgarden.resource.SWTResourceManager;
public class MainFrame {
/**
* @param args
*/
public static void main(String[] args) {
Display mainDisp = new Display();
Shell mainSDI = new Shell(mainDisp);
SDIMgr mainFrame = new SDIMgr(mainSDI);
// mainSDI.pack();
// Image splash_img = SWTResourceManager.getImage("/res/img/bk_img.png");
//Shell splash_win = new Shell(mainDisp,SWT.NONE );
//splash_win.setBackgroundImage(splash_img);
//splash_win.setLocation((mainDisp.getBounds().width - splash_img.getImageData().width)/2,(mainDisp.getBounds().height - splash_img.getImageData().height)/2);
//splash_win.setSize(splash_img.getImageData().width, splash_img.getImageData().height);
//splash_win.open();
/*
try
{
Thread.sleep(1000);
}
catch(Exception e)
{
}
*/
//splash_win.dispose();
mainSDI.open();
boolean bisNoSleep;
bisNoSleep = false;
while(!mainSDI.isDisposed())
{
if (!mainFrame.cmdBuff.isEmpty())
{
if (!mainFrame.ct.isRun()) break;
mainFrame.Output(mainFrame.cmdBuff.getFirst(),false);
mainFrame.cmdBuff.removeFirst();
bisNoSleep = true;
}
else
{
bisNoSleep = false;
}
if (!mainDisp.readAndDispatch())
{
if (!bisNoSleep)
mainDisp.sleep();
}
}
// splash_win.dispose();
mainSDI.dispose();
mainDisp.dispose();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -