about.java

来自「此文件为OPC Client IsVJTrend源代码,在VJ++开发环境下调试」· Java 代码 · 共 191 行

JAVA
191
字号
/////////////////////////////////////////////////////////////////////////////
//
//  OPC Trend VJ Client: About.java
//                       (Source File)
//
/////////////////////////////////////////////////////////////////////////////
//
//          Author: Raphael Imhof
//    Initial Date: 11/04/98
//       $Workfile: About.Java $
//       $Revision: 1 $
//           $Date: 7/27/99 5:09p $
//   Target System: Microsoft Windows NT 4.0
//     Environment: Visual J++ 6.0 / OPC DataAccess 2.0
//         Remarks:
//
/////////////////////////////////////////////////////////////////////////////
//
//     Description: implementation of the about box class.
//
//
/////////////////////////////////////////////////////////////////////////////
//
//  History of Changes     (Please remove very old comments and blank lines!)
//            $Log: /IDK/OPCServer/clients/VJ++/ISVjTrend/About.Java $
// 
// 1     7/27/99 5:09p Imhof
// 
// 1     7/27/99 4:39p Imhof
// 
// 1     7/27/99 4:33p Imhof
// 
// 4     1/20/99 3:17p Imhof
// Updated header
//
//
//  $Nokeywords:$ (To avoid useless search while checking in.)
/////////////////////////////////////////////////////////////////////////////
//  Copyright (C) 1999, Siemens Building Technologies, Inc. Landis Division
//
//  SIEMENS BUILDING TECHNOLOGIES, INC. IS PROVIDING THE FOLLOWING EXAMPLES
//  OF CODE AS SAMPLE ONLY.
//  SIEMENS BUILDING TECHNOLOGIES, INC. MAKES NO REPRESENTATIONS OR WARRANTIES
//  OF ANY KIND WITH RESPECT TO THE VALIDTY OF THE CODES OR DESIRED RESULTS
//  AND DISCLAIMS ALL SUCH REPRESENTATIONS AND WARRANTIES, INCLUDING FOR EXAMPLE,
//  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//  SIEMENS BUILIDNG TECHNOLOGIES, INC. DOES NOT REPRESENT OR WARRANT THAT
//  THE FOLLOWING CODE SAMPLES ARE ACCURATE, VALID, COMPLETE OR CURRENT.
//
/////////////////////////////////////////////////////////////////////////////


import com.ms.wfc.app.*;
import com.ms.wfc.core.*;
import com.ms.wfc.ui.*;

/**
 * @author: Application Wizard
 * @version: 1.0
 * This class can take a variable number of parameters on the command
 * line. Program execution begins with the main() method. The class
 * constructor is not invoked unless an object of type '%FILENAME%'
 * created in the main() method.
*/
public class About extends Form
{
	private void okButton_click(Object sender, Event e)
	{
		this.setDialogResult(DialogResult.OK);
	}

	public About()
	{
		super();

		//Required for Visual J++ Form Designer support
		initForm();		
		
		// Set Avail System Memory Information
		//com.ms.win32.MEMORYSTATUS lpMemStat = new com.ms.win32.MEMORYSTATUS();
		//GlobalMemoryStatus(lpMemStat);
		//availableMemoryLabel.setText(Integer.toString(lpMemStat.dwTotalPhys/1024) + " KB");

	}

	/**
	 * %FILENAME% overrides dispose so it can clean up the
	 * component list.
	 */
	public void dispose()
	{
		super.dispose();
		components.dispose();
	}

	private void titleLabel_click(Object source, Event e)
	{
		
	}

	/**
	 * NOTE: The following code is required by the Visual J++ form
	 * designer.  It can be modified using the form editor.  Do not
	 * modify it using the code editor.
	 */

	Container components = new Container();
	Button okButton = new Button();
	Label titleLabel = new Label();
	Label versionLabel = new Label();
	Label nameLabel = new Label();
	PictureBox pictureBox1 = new PictureBox();

	private void initForm()
	{
		// NOTE:  This form is storing resource information in an
		// external file.  Do not modify the string parameter to any
		// resources.getObject() function call. For example, do not
		// modify "foo1_location" in the following line of code
		// even if the name of the Foo object changes: 
		//   foo1.setLocation((Point)resources.getObject("foo1_location"));

		IResourceManager resources = new ResourceManager(this, "About");
		okButton.setLocation(new Point(256, 152));
		okButton.setSize(new Point(84, 23));
		okButton.setTabIndex(0);
		okButton.setText("OK");
		okButton.addOnClick(new EventHandler(this.okButton_click));

		this.setText("About JPad");
		this.setAcceptButton(okButton);
		this.setAutoScaleBaseSize(new Point(7, 16));
		this.setBorderStyle(FormBorderStyle.FIXED_TOOLWINDOW);
		this.setCancelButton(okButton);
		this.setClientSize(new Point(351, 185));
		this.setMaximizeBox(false);
		this.setMinimizeBox(false);
		this.setStartPosition(FormStartPosition.CENTER_SCREEN);

		titleLabel.setLocation(new Point(56, 8));
		titleLabel.setSize(new Point(280, 40));
		titleLabel.setTabIndex(1);
		titleLabel.setTabStop(false);
		titleLabel.setText("Visual J++ Trend");
		titleLabel.addOnClick(new EventHandler(this.titleLabel_click));

		versionLabel.setLocation(new Point(56, 64));
		versionLabel.setSize(new Point(280, 20));
		versionLabel.setTabIndex(2);
		versionLabel.setTabStop(false);
		versionLabel.setText("Version 1.0");

		nameLabel.setLocation(new Point(56, 88));
		nameLabel.setSize(new Point(280, 50));
		nameLabel.setTabIndex(3);
		nameLabel.setTabStop(false);
		nameLabel.setText("Copyright (Siemens Building Technologies, Inc., Landis Division ) 1998");

		pictureBox1.setLocation(new Point(16, 8));
		pictureBox1.setSize(new Point(32, 32));
		pictureBox1.setTabIndex(4);
		pictureBox1.setTabStop(false);
		pictureBox1.setText("pictureBox1");
		pictureBox1.setImage((Icon)resources.getObject("pictureBox1_image"));
		pictureBox1.setSizeMode(PictureBoxSizeMode.AUTO_SIZE);

		this.setNewControls(new Control[] {
							pictureBox1, 
							nameLabel, 
							versionLabel, 
							titleLabel, 
							okButton});
	}

	/**
	 * The main entry point for the application. 
	 *
	 * @param args Array of parameters passed to the application
	 * via the command line.
	 */
	public static void main(String args[])
	{
		Application.run(new About());
	}

	/**
	 * @dll.import("KERNEL32",auto) 
	 */
	public static native void GlobalMemoryStatus(com.ms.win32.MEMORYSTATUS lpBuffer);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?