public Daleks() : super("Daleks") {
     setSize(1020, 820);
     setResizable(false);
     this.addWindowListener(new FrameListener());
     var menuBar = new MenuBar();
     this.setMenuBar(menuBar);
     var menu = new Menu("File");
     menuBar.add(menu);
     
     var menuItem = new MenuItem("New Game");
     menu.add(menuItem);
     menuItem.addActionListener(p => newGame());
     
     menuItem = new MenuItem("-");
     menu.add(menuItem);
     
     menuItem = new MenuItem("Exit");
     menu.add(menuItem);
     menuItem.addActionListener(p => dispose());
     
     this.setLayout(new BorderLayout());
     this.add(status = new Label("To start: File > New Game"), BorderLayout.SOUTH);
     this.keyHandler = new KeyHandler(this);
     this.addKeyListener(keyHandler);
     
     this.timer = new Timer(true);
 }
示例#2
0
		/// <summary>
		/// Adds the specified menu item to this menu.
		/// </summary>
		public MenuItem add(MenuItem @mi)
		{
			return default(MenuItem);
		}
示例#3
0
		/// <summary>
		/// Inserts a menu item into this menu
		/// at the specified position.
		/// </summary>
		public void insert(MenuItem @menuitem, int @index)
		{
		}