private Bar CreateBarByGroup(WinformToolbarGroup group, StandaloneBarDockControl standaloneBarDockControl) { Bar bar = new Bar(); bar.BarName = group.Name; bar.DockCol = 0; bar.DockRow = 0; bar.DockStyle = DevExpress.XtraBars.BarDockStyle.Standalone; bar.StandaloneBarDockControl = standaloneBarDockControl; bar.Text = group.Text; group.UIObject = bar; return(bar); }
//public void RefeshToolbar() //{ // throw new NotImplementedException(); //} //public void RefeshToolbar(string groupName) //{ // IList<WinformToolbar> toolbars= winformToolbarManager.GetToolbarsByGroups(groupName); // if (toolbars != null && toolbars.Count > 0) { // } //} public void SetToolbarGroupStatus(WinformToolbarGroup toolbarGroup, MenuStatus menuStatus) { if (menuStatus == MenuStatus.Available) { ((Bar)(toolbarGroup.UIObject)).Visible = true; } else if (menuStatus == MenuStatus.Hidden) { ((Bar)(toolbarGroup.UIObject)).Visible = false; } else if (menuStatus == MenuStatus.Disable) { if (toolbarGroup.ToolBars != null && toolbarGroup.ToolBars.Count > 0) { foreach (var tool in toolbarGroup.ToolBars) { ((BarButtonItem)tool.UIObject).Enabled = false; } } } }
private Bar CreateBarByGroup(WinformToolbarGroup group, StandaloneBarDockControl standaloneBarDockControl) { Bar bar = new Bar(); bar.BarName = group.Name; bar.DockCol = 0; bar.DockRow = 0; bar.DockStyle = DevExpress.XtraBars.BarDockStyle.Standalone; bar.StandaloneBarDockControl = standaloneBarDockControl; bar.Text = group.Text; group.UIObject = bar; if (group.IsDefaultShow) { bar.Visible = true; } else { bar.Visible = false; } return(bar); }