コード例 #1
0
        public MainMenuCommandRegionDecorator(string regionName, BarCommandRegion barCommandRegion)
        {
            if (string.IsNullOrEmpty(regionName))
            {
                throw new ArgumentNullException("RegionName can not be null or empty.");
            }
            if (barCommandRegion == null)
            {
                throw new ArgumentNullException("BarCommandRegion can not be null.");
            }

            _regionName         = regionName;
            _barCommandRegion   = barCommandRegion;
            _identKeyCash       = new List <IdentKey>();
            _parentItemNameCash = new List <string>();
        }
コード例 #2
0
        public SubMenuCommandRegionDecorator(string regionName, BarCommandRegion barCommandRegion, BarSubItem subMenu)
        {
            if (string.IsNullOrEmpty(regionName))
            {
                throw new ArgumentNullException("RegionName can not be null or empty.");
            }
            if (barCommandRegion == null)
            {
                throw new ArgumentNullException("BarCommandRegion can not be null.");
            }
            if (subMenu == null)
            {
                throw new ArgumentNullException("CommandRegion can not be null.");
            }

            _regionName       = regionName;
            _barCommandRegion = barCommandRegion;
            _subMenu          = subMenu;
            _identKeyCash     = new List <IdentKey>();
        }