Location:
Search - MenuItem
Search list
Description: 本文主要是介绍了在用Visual C#进行有关菜单编程中,可能遇到有些问题。在解决这些问题的时候主要用到的是名称空间System.Windows.Forms中定义的二个对象MainMenu、MenuItem和这二个对象中定义的一些方法。当然这些方法还有一些其他的用法,有兴趣的读者可以参考有关书籍和浏览MSDN网站。-this paper is introduced in Visual C# programming on the menu, they may encounter some problems. In addressing these issues when the major use of the name space is defined in the System.Windows.Forms two MainMenu object, and that two MenuItem object definition of the method. Of course there are other methods to use, interested reader can refer to the books and visit the MSDN website.
Platform: |
Size: 32302 |
Author: 开远 |
Hits:
Description: VS风格的MenuItem,修改过的。
可参考做成控件。很漂亮。-VS style MenuItem amended before. Reference can be made controls. Very pretty.
Platform: |
Size: 53667 |
Author: 陈杰 |
Hits:
Description: 我读过了您2005年4月的文章:“Wrappers: Use Our ManWrap Library to Get the Best of .NET in Native C++ Code”,文章中没有提供 DumpEnum 程序。请问从哪里能得到它?
给定某个 .NET 框架类的名字,如 MenuItem 或窗体的名字,有没有办法知道是哪个程序集包含着该类?-I read your April 2005 article : "Wrappers : Use Our ManWrap Library to Get the Best of.NET in Native C Code ", the article did not provide DumpEnum procedures. Ask where it can be? Given certain.NET Framework class name, such as Form MenuItem or name, there is no way to know which procedures set includes such?
Platform: |
Size: 29373 |
Author: 周文彥 |
Hits:
Description: mpl.add(new MenuItem(\"DDA画线\"))
mpl.add(new MenuItem(\"中点画线\"))
mpl.add(new MenuItem(\"Bresenham画线\"))
mpl.addActionListener(this)
mp2=new Menu(\"画圆\")
mp.add(mp2)
mp2.add(new MenuItem(\"公式法画圆\"))
mp2.add(new MenuItem(\"多边形逼近圆\"))
mp2.add(new MenuItem(\"中点画圆\"))
mp2.addActionListener(this)
Platform: |
Size: 6292 |
Author: 李默 |
Hits:
Description: //构造具有指定的标签的菜单
files = new Menu(\"文件(F)\")
compile = new Menu(\"编辑(E)\")
see = new Menu(\"查看(V)\")
format = new Menu(\"格式(O)\")
font = new Menu(\"字体和颜色(F)...\") //在格式菜单下再添加一个字体及颜色的菜单
help = new Menu(\"帮助(H)\")
//构造具有指定的标签的菜单项
news = new MenuItem(\"新建(N)\" + \" \" + \"Ctrl+N\")
open = new MenuItem(\"打开(O)...\" + \" \" + \"Ctrl+O\")
save = new MenuItem(\"保存(S)\" + \" \" + \"Ctrl+S\")
other = new MenuItem(\"另存为(A)...\")
page = new MenuItem(\"页面设置(U)...\")
mim = new MenuItem(\"打印(P)...\" + \" \" + \"Ctrl+P\")
quit = new MenuItem(\"退出(X)\")
Platform: |
Size: 3025 |
Author: 李默 |
Hits:
Description: I made a lot of changed on this object,such as *
// 1.Encapsulates all code in one userobjet,since PB does not *
// support \"Address of Function\" , so we can not set new *
// WndProc, just makes the object more easy to use. *
// 2.Uses structure array instead of Datastore *
// 3.Calc width of menuitem at runtime(MEASUREITEM) *
// 4.Draw disabled status
Platform: |
Size: 73198 |
Author: 双职工 |
Hits:
Description: MenuBar mb //MenuBar 类封装绑定到框架的菜单栏的平台概念。为了将该菜单栏与 Frame 对象关联,
//可以调用该框架的 setMenuBar 方法。
Menu me //Menu 对象是从菜单栏部署的下拉式菜单组件.
MenuItem item //默认的 MenuItem 对象包含一个简单的加标签的菜单项。
MenuShortcut shortcut=new MenuShortcut(KeyEvent.VK_E)
Platform: |
Size: 962 |
Author: fhmlrs |
Hits:
Description: import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class BookManageMain{
public void main(String[] args){
Frame f = new Frame("图书管理系统");//super("图书管理系统");
MenuBar Menub = new MenuBar();
//系统管理子菜单
Menu jMenuSystem = new Menu("系统管理");
MenuItem jMenuItemLogin = new MenuItem("用户登录");
Menu jMenuUserManage = new Menu("用户管理");
MenuItem jMenuFileExit = new MenuItem("退出");
MenuItem jMenuItemuseradd = new MenuItem("添加用户");
MenuItem jMenuItemuserupdate = new MenuItem("修改用户");
MenuItem jMenuItemuserdelete = new MenuItem("删除用户");
jMenuItemLogin.addActionListener(this);
jMenuFileExit.addActionListener(this);
jMenuItemuseradd.addActionListener(this);
jMenuItemuserupdate.addActionListener(this);
jMenuItemuserdelete.addActionListener(this);
Menub.add(jMenuSystem);
//书籍管理子菜单
Menu jMenuBookManage = new Menu("书籍管理");
MenuItem jMenuItemBookAdd = new MenuItem("添加书籍信息");
MenuItem jMenuItemBookUpdate = new MenuItem("修改书籍信息");
MenuItem jMenuItemBookDelete = new MenuItem("删除书籍信息");
jMenuItemBookAdd.addActionListener(this);
jMenuItemBookUpdate.addActionListener(this);
jMenuItemBookDelete.addActionListener(this);
Menub.add(jMenuBookManage);
//借书管理子菜单
Menu jMenuBorrowBook = new Menu("借书管理");
MenuItem jMenuItemBookBorrow = new MenuItem("书籍出借");
MenuItem jMenuItemBookBorrowUpdate = new MenuItem("出借信息修改");
jMenuItemBookBorrow.addActionListener(this);
jMenuItemBookBorrowUpdate.addActionListener(this);
Menub.add(jMenuBorrowBook);
//还书管理子菜单
Menu jMenuReturnBook = new Menu("还书管理");
MenuItem jMenuItemBookReturn = new MenuItem("书籍还入");
MenuItem jMenuItemBookReturnUpdate = new MenuItem("书籍还入信息修改");
jMenuItemBookReturn.addActionListener(this);
jMenuItemBookReturnUpdate.addActionListener(this);
Menub.add(jMenuReturnBook);
//信息一览子菜单
Menu jMenuAllInfo = new Menu("信息一览");
MenuItem jMenuItemAllBook = new MenuItem("书籍列表");
MenuItem jMenuItemAllRead = new MenuItem("借阅者列表");
MenuItem jMenuItemAllInfo = new MenuItem("借阅情况列表");
jMenuItemAllBook.addActionListener(this);
jMenuItemAllRead.addActionListener(this);
jMenuItemAllInfo.addActionListener(this);
Menub.add(jMenuAllInfo);
f.setMenuBar(Menub);
Menub.add(jMenuSystem);
Menub.add(jMenuBookManage);
//jMenuSystem.addSeparator();
Menub.add(jMenuBorrowBook);
Menub.add(jMenuReturnBook);
Menub.add(jMenuAllInfo);
jMenuSystem.add(jMenuItemLogin);
jMenuSystem.addSeparator();//分割线
jMenuSystem.add(jMenuUserManage);
jMenuSystem.addSeparator();
jMenuSystem.add(jMenuFileExit);
jMenuUserManage.add(jMenuItemuseradd);
jMenuUserManage.addSeparator();
jMenuUserManage.add(jMenuItemuserupdate);
jMenuUserManage.addSeparator();
jMenuUserManage.add(jMenuItemuserdelete);
jMenuBookManage.add(jMenuItemBookAdd);
jMenuBookManage.addSeparator();
jMenuBookManage.add(jMenuItemBookUpdate);
jMenuBookManage.addSeparator();
jMenuBookManage.add(jMenuItemBookDelete);
jMenuBorrowBook.add(jMenuBookBorrow);
jMenuBorrowBook.addSeparator();
jMenuBorrowBook.add(jMenuBookBorrowUpdate);
jMenuReturnBook.add(jMenuItemBookReturn);
jMenuReturnBook.addSeparator();
jMenuReturnBook.add(jMenuItemBookReturnUpdate);
jMenuAllInfo.add(jMenuItemAllBook);
jMenuAllInfo.addSeparator();
jMenuAllInfo.add(jMenuItemAllRead);
jMenuAllInfo.addSeparator();
jMenuAllInfo.add(jMenuItemAllInfo);
f.setSize(800,600);
//f.setBounds(400,400,600,800);
f.setVisible(true);
f.show();
}
//设置初始状态
/* jMenuUserManage.setEnabled(false);
jMenuBookManage.setEnabled(false);
jMenuBorrowBook.setEnabled(false);
jMenuReturnBook.setEnabled(false);
jMenuAllInfo.setEnabled(false);
*/
}
/* public void this_windowOpened(WindowEvent e){
setEnable("else");
jMenuItemLogin dlg = new jMenuItemLogin(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize=getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}*/
public void actionPerformed(ActionEvent e){
if(e.getActionCommand()= "用户登录")
{jMenuItemLogin dlg = new jMenuItemLogin(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand()="添加用户")
{jMenuItemuseradd dlg= new jMenuItemuseradd();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="修改用户")
{jMenuItemuserupdate dlg = new jMenuItemuserupdate();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="删除用户")
{
jMenuItemuserdelete dlg = new jMenuItemuserdelete();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();}
else if(e.getActionCommand="添加书籍信息")
{
jMenuItemBookAdd dlg = new jMenuItemBookAdd();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="修改书籍信息")
{
jMenuItemBookUpdate dlg=new jMenuItemBookUpdate();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="删除书籍信息")
{jMenuItemBookDelete dlg= new jMenuItemBookDelete();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="书籍出借")
{
jMenuItemuBookBorrow dlg = new jMenuItemuBookBorrow();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="出借信息修改")
{jMenuItemuBookBorrowUpdate dlg= new jMenuItemuBookBorrowUpdate();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="书籍还入")
{
jMenuItemBookReturn dlg=new jMenuItemBookReturn();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommond="书籍还入信息修改")
{
jMenuItemBookReturnUpdate dlg= new jMenuItemBookReturnUpdate();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommond="书籍列表")
{
jMenuItemAllBook dlg=new jMenuItemAllBook();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommond="借阅者列表")
{
jMenuItemAllRead dlg = new jMenuItemAllRead();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="借阅情况列表")
{
jMenuItemAllInfo dlg = new jMenuItemAllInfo();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="借阅情况列表")
{
AllInfo dlg=new allinfo();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="退出")
{
this.dispose();
System.exit(0);
}
图书管理系统
Platform: |
Size: 560040 |
Author: pangshu1221 |
Hits:
Description: wpf中menuitem样式控制
Platform: |
Size: 337793 |
Author: linulung@126.com |
Hits:
Description: 本文主要是介绍了在用Visual C#进行有关菜单编程中,可能遇到有些问题。在解决这些问题的时候主要用到的是名称空间System.Windows.Forms中定义的二个对象MainMenu、MenuItem和这二个对象中定义的一些方法。当然这些方法还有一些其他的用法,有兴趣的读者可以参考有关书籍和浏览MSDN网站。-this paper is introduced in Visual C# programming on the menu, they may encounter some problems. In addressing these issues when the major use of the name space is defined in the System.Windows.Forms two MainMenu object, and that two MenuItem object definition of the method. Of course there are other methods to use, interested reader can refer to the books and visit the MSDN website.
Platform: |
Size: 31744 |
Author: 开远 |
Hits:
Description: VS风格的MenuItem,修改过的。
可参考做成控件。很漂亮。-VS style MenuItem amended before. Reference can be made controls. Very pretty.
Platform: |
Size: 53248 |
Author: 陈杰 |
Hits:
Description: 我读过了您2005年4月的文章:“Wrappers: Use Our ManWrap Library to Get the Best of .NET in Native C++ Code”,文章中没有提供 DumpEnum 程序。请问从哪里能得到它?
给定某个 .NET 框架类的名字,如 MenuItem 或窗体的名字,有没有办法知道是哪个程序集包含着该类?-I read your April 2005 article : "Wrappers : Use Our ManWrap Library to Get the Best of.NET in Native C Code ", the article did not provide DumpEnum procedures. Ask where it can be? Given certain.NET Framework class name, such as Form MenuItem or name, there is no way to know which procedures set includes such?
Platform: |
Size: 102400 |
Author: 周文彥 |
Hits:
Description: mpl.add(new MenuItem("DDA画线"))
mpl.add(new MenuItem("中点画线"))
mpl.add(new MenuItem("Bresenham画线"))
mpl.addActionListener(this)
mp2=new Menu("画圆")
mp.add(mp2)
mp2.add(new MenuItem("公式法画圆"))
mp2.add(new MenuItem("多边形逼近圆"))
mp2.add(new MenuItem("中点画圆"))
mp2.addActionListener(this) -mpl.add (new MenuItem ( DDA line drawing )) mpl.add (new MenuItem ( in the line stipple )) mpl.add (new MenuItem ( Bresenham line drawing )) mpl.addActionListener (this) mp2 = new Menu ( Circle ) mp.add (mp2) mp2.add (new MenuItem ( drawcircle formula )) mp2.add (new MenuItem ( Polygon approximation circle )) mp2.add (new MenuItem ( midpoint drawcircle )) mp2.addActionListener (this)
Platform: |
Size: 6144 |
Author: 李默 |
Hits:
Description: //构造具有指定的标签的菜单
files = new Menu("文件(F)")
compile = new Menu("编辑(E)")
see = new Menu("查看(V)")
format = new Menu("格式(O)")
font = new Menu("字体和颜色(F)...") //在格式菜单下再添加一个字体及颜色的菜单
help = new Menu("帮助(H)")
//构造具有指定的标签的菜单项
news = new MenuItem("新建(N)" + " " + "Ctrl+N")
open = new MenuItem("打开(O)..." + " " + "Ctrl+O")
save = new MenuItem("保存(S)" + " " + "Ctrl+S")
other = new MenuItem("另存为(A)...")
page = new MenuItem("页面设置(U)...")
mim = new MenuItem("打印(P)..." + " " + "Ctrl+P")
quit = new MenuItem("退出(X)")-//Construct the label with the specified menu files = new Menu ( file (F) ) compile = new Menu ( Edit (E) ) see = new Menu ( View (V) ) format = new Menu ( format (O) ) font = new Menu ( fonts and colors (F )... )// in the format menu and then add a font and color of the menu help = new Menu ( Help (H) )// structure with the specified menu item label news = new MenuItem ( New (N)+ + Ctrl+ N ) open = new MenuItem ( Open (O )...+ + Ctrl+ O ) save = new MenuItem ( Save (S)+ + Ctrl+ S ) other = new MenuItem ( Save as (A )... ) page = new MenuItem ( Page Setup (U )... ) mim = new MenuItem ( Print (P )...+ + Ctrl+ P ) quit = new MenuItem ( Exit (X ) )
Platform: |
Size: 3072 |
Author: 李默 |
Hits:
Description: I made a lot of changed on this object,such as *
// 1.Encapsulates all code in one userobjet,since PB does not *
// support "Address of Function" , so we can not set new *
// WndProc, just makes the object more easy to use. *
// 2.Uses structure array instead of Datastore *
// 3.Calc width of menuitem at runtime(MEASUREITEM) *
// 4.Draw disabled status-I made a lot of changed on this object, such as*// 1.Encapsulates all code in one userobjet, since PB does not*// support Address of Function , so we can not set new*// WndProc, just makes the object more easy to use.*// 2.Uses structure array instead of Datastore*// 3.Calc width of menuitem at runtime (MEASUREITEM)*// 4.Draw disabled status
Platform: |
Size: 72704 |
Author: 双职工 |
Hits:
Description: MenuBar mb //MenuBar 类封装绑定到框架的菜单栏的平台概念。为了将该菜单栏与 Frame 对象关联,
//可以调用该框架的 setMenuBar 方法。
Menu me //Menu 对象是从菜单栏部署的下拉式菜单组件.
MenuItem item //默认的 MenuItem 对象包含一个简单的加标签的菜单项。
MenuShortcut shortcut=new MenuShortcut(KeyEvent.VK_E) -MenuBar mb// MenuBar class encapsulates the framework to bind to the menu bar of the platform concept. For the menu bar with the Frame object,// can call methods of the framework setMenuBar. Menu me// Menu object is deployed from the menu bar pull-down menu component. MenuItem item// default MenuItem object contains a simple labeling of menu items. MenuShortcut shortcut = new MenuShortcut (KeyEvent.VK_E)
Platform: |
Size: 1024 |
Author: fhmlrs |
Hits:
Description: 开发框架。
一.说明:
此框架的意图是解决手机软件开发中常遇到,并且可以通用话的问题。
旨在提高无线应用程序的开发效率
二.EasyMF 能做什么
1.简化UI设计
2.RMS的简化操作
3.简单的日志框架
4.简单的联网框架
5.通用工具的设计
6.一些图形相关的特效
三.EasyMF 的功能列表
1.UI 框架
2.日志框架
3.RMS框架
4.通用工具框架
5.图形相关
6.一堆有用的DEMO
四.EasyMF 的设计原理
1.UI的设计原理
UI是所有应用程序的核心。 这些核心在PC上的变动性比较固定,而由于手机屏幕,
运算能力 等差异,会导致设计一个手机软件大部分时间都花在UI层的设计上,业务
逻辑层往往比较少,这也就是80/20原则吧。
如果有一个可以组装的UI的出现,将大大减少应用程序的开发时间,而EasyMF UI
层就是为了这个而设计的。
2.日志框架设计成尽量的简单,并且有效的记录下用户想需要记录的日志
3.联网框架,简化Http的联网,并十分的符合中国网络环境的东西。
4.工具集合
5.图形图片处理
6.RMS的简易操作
-err
Platform: |
Size: 195584 |
Author: 杨飞 |
Hits:
Description: 计算器菜单以及部分按钮的布局MenuBar menuBar
Menu menu1,menu2,menu3
MenuItem menu1_item1,menu1_item2,menu1_item3
MenuItem menu2_item1,menu2_item2
MenuItem menu3_item1,menu3_item2
mywindow()
{
setTitle("计算器")
menuBar=new MenuBar()
menu1=new Menu("文件")
menu2=new Menu("基本操作")
menu3=new Menu("帮助")
menuBar.add(menu1)
menuBar.add(menu2) -Calculator menu button layout as well as some MenuBar menuBar Menu menu1, menu2, menu3 MenuItem menu1_item1, menu1_item2, menu1_item3 MenuItem menu2_item1, menu2_item2 MenuItem menu3_item1, menu3_item2 mywindow () (setTitle ( Calculator ) menuBar = new MenuBar () menu1 = new Menu ( file ) menu2 = new Menu ( Basic Operation ) menu3 = new Menu ( Help ) menuBar.add (menu1) menuBar.add (menu2)
Platform: |
Size: 1024 |
Author: 姗姗 |
Hits:
Description: 本例介绍如何通过菜单棒(MenuBar)、菜单(Menu)、菜单项(MenuItem)3个主要对象组成窗口中的菜单栏-Describes how in this case through the menu bar (MenuBar), menu (Menu), menu item (MenuItem) 3 main objects of the menu bar window
Platform: |
Size: 4096 |
Author: hytfine |
Hits:
Description: wpf中菜单样式,动态生成menuitem,读取文件中的数据生成-the menuitem style of wpf,make the menuitem from the xml file data
Platform: |
Size: 337920 |
Author: |
Hits: