private void InitializeComponent() { _view = (Viewing.View)_app.Views[ViewTypes.Search]; Afni.Applications.VLoop.SearchCtl ctl = new Afni.Applications.VLoop.SearchCtl(_app); _icon = VLoopIcons.Search; _tb_item = new ToolBarButton(); _tb_item.Tag = this; _tb_item.Enabled = true; _tb_item.ImageIndex = (int)ActionIcons.Find; _tb_item.Style = ToolBarButtonStyle.PushButton; _tb_item.Text = "Se&arch"; _tb_item.ToolTipText = "Search for customers"; _tb_item.Visible = true; _menu_cmd = _app.MenuManager.AddMenuItem(this, VLoopMenus.Tools, _tb_item, "Se&arch", Shortcut.CtrlF, _icon); }
private void InitializeComponent() { _view = new Viewing.View(_app); _view.ViewName = "Customer Search"; _view.ViewType = ViewTypes.Search; Afni.Applications.VLoop.SearchCtl ctl = new Afni.Applications.VLoop.SearchCtl(); _view.ViewedForm = (IForm)ctl; _menu_cmd = new MenuItem(); //_menu_cmd.ImageList = _app.ParentForm.ActionImageList; //_menu_cmd.ImageIndex = (int)ActionIcons.Find; _menu_cmd.Text = "&Find"; _menu_cmd.Click += new System.EventHandler(this.MenuClick); _menu_cmd.Shortcut = Shortcut.CtrlF; _tb_item = new ToolBarButton(); _tb_item.Tag = this; _tb_item.Enabled = true; _tb_item.ImageIndex = (int)ActionIcons.Find; _tb_item.Style = ToolBarButtonStyle.PushButton; _tb_item.Text = "&Find"; _tb_item.ToolTipText = "Search for customers"; _tb_item.Visible = true; _app.MenuManager.AddMenuItem(_menu_cmd, VLoopMenus.Tools, _tb_item); }