internal SyncfusionMenu(object menuManager, MenuIndex menuIndex) { _menuIndex = menuIndex; _menuManager = menuManager as MainFrameBarManager; if (menuIndex == null) { throw new ArgumentNullException("menuIndex"); } if (_menuManager == null) { throw new ApplicationException("Invalid type of menu manager"); } CreateMenuBar(); }
internal ToolbarCollectionBase(object menuManager, IMenuIndex menuIndex) { _menuIndex = menuIndex; _manager = menuManager as MainFrameBarManager; if (menuIndex == null) { throw new ArgumentNullException("menuIndex"); } if (_manager == null) { throw new NullReferenceException("ToolbarCollectionBase: instance of menu manager is not provided."); } #if STYLE2010 _manager.Style = VisualStyle.Office2010; #else _manager.Style = VisualStyle.OfficeXP; #endif }
internal Toolbar(MainFrameBarManager manager, Bar bar, IMenuIndex menuIndex) { _manager = manager; _bar = bar; _menuIndex = menuIndex; _commandBar = _manager.GetBarControl(_bar); if (manager == null) { throw new ArgumentNullException("manager"); } if (menuIndex == null) { throw new ArgumentNullException("menuIndex"); } if (bar == null || _commandBar == null) { throw new NullReferenceException("Internal toolbar reference is null."); } }
public static void RestoreLayout(this MainFrameBarManager manager, string key, bool startup) { try { var sr = GetSerializer(SyncfusionSerializationType.ToolBar, key, startup); string path = sr.GetPath(); if (startup && !File.Exists(path)) { MessageService.Current.Warn("File with initial state of toolbars wasn't found: " + path); return; } manager.LoadBarState(sr); } catch (Exception ex) { Logger.Current.Warn("Failed to restore layout of toolbars.", ex); } }