Example #1
0
        private void InitializeBaseCommandsMenu()
        {
            var bar = new BarItem
            {
                Name      = "BarItemCommands",
                Caption   = StringResources.Commands,
                GlyphSize = GlyphSizeType.Small
            };

            Menu.Bars.Add(bar);

            _selectMenuItem = new CommandMenuItem
            {
                Caption        = StringResources.Select,
                Command        = SelectCommand,
                ImageSmall     = ImageResources.DCLAddNew16.GetBitmapImage(),
                ImageLarge     = ImageResources.DCLAddNew32.GetBitmapImage(),
                GlyphSize      = GlyphSizeType.Small,
                GlyphAlignment = GlyphAlignmentType.Top,
                DisplayMode    = DisplayModeType.Default,
                IsVisible      = true,
                Priority       = 1
            };
            bar.MenuItems.Add(_selectMenuItem);

            bar.MenuItems.Add(new CommandMenuItem
            {
                Caption    = StringResources.Delete,
                Command    = DeleteCommand,
                ImageSmall = ImageResources.DCLDelete16.GetBitmapImage(),
                ImageLarge = ImageResources.DCLDelete32.GetBitmapImage(),
                //HotKey = new KeyGesture(Key.F9),
                GlyphSize      = GlyphSizeType.Small,
                GlyphAlignment = GlyphAlignmentType.Top,
                DisplayMode    = DisplayModeType.Default,
                IsVisible      = true,
                Priority       = 2
            });

            _cpvMenuItem = new CommandMenuItem
            {
                Caption        = "Настройка параметров",
                Command        = CpvCommand,
                ImageSmall     = ImageResources.DCLGridEditBegin16.GetBitmapImage(),
                ImageLarge     = ImageResources.DCLGridEditBegin32.GetBitmapImage(),
                GlyphSize      = GlyphSizeType.Small,
                GlyphAlignment = GlyphAlignmentType.Top,
                DisplayMode    = DisplayModeType.Default,
                IsVisible      = true,
                Priority       = 3
            };
            bar.MenuItems.Add(_cpvMenuItem);
        }
Example #2
0
        private void InitializeBaseCommandsMenu()
        {
            var bar = new BarItem
            {
                Name      = "BarItemCommands",
                Caption   = StringResources.Commands,
                GlyphSize = GlyphSizeType.Small
            };

            Menu.Bars.Add(bar);

            bar.MenuItems.Add(new CommandMenuItem
            {
                Caption        = StringResources.New,
                Command        = NewCommand,
                ImageSmall     = ImageResources.DCLAddNew16.GetBitmapImage(),
                ImageLarge     = ImageResources.DCLAddNew32.GetBitmapImage(),
                GlyphSize      = GlyphSizeType.Small,
                GlyphAlignment = GlyphAlignmentType.Top,
                DisplayMode    = DisplayModeType.Default,
                Priority       = 1
            });

            bar.MenuItems.Add(new CommandMenuItem
            {
                Caption        = StringResources.Edit,
                Command        = EditCommand,
                ImageSmall     = ImageResources.DCLEdit16.GetBitmapImage(),
                ImageLarge     = ImageResources.DCLEdit32.GetBitmapImage(),
                GlyphSize      = GlyphSizeType.Small,
                GlyphAlignment = GlyphAlignmentType.Top,
                DisplayMode    = DisplayModeType.Default,
                Priority       = 2
            });

            bar.MenuItems.Add(new CommandMenuItem
            {
                Caption        = StringResources.Delete,
                Command        = DeleteCommand,
                ImageSmall     = ImageResources.DCLDelete16.GetBitmapImage(),
                ImageLarge     = ImageResources.DCLDelete32.GetBitmapImage(),
                GlyphSize      = GlyphSizeType.Small,
                GlyphAlignment = GlyphAlignmentType.Top,
                DisplayMode    = DisplayModeType.Default,
                Priority       = 3
            });
        }
Example #3
0
        private void InitializeBaseCommandsMenu()
        {
            var bar = new BarItem
            {
                Name      = "BarItemCommands",
                Caption   = StringResources.Commands,
                GlyphSize = GlyphSizeType.Small
            };

            Menu.Bars.Add(bar);

            _newMenuItem = new CommandMenuItem
            {
                Caption        = StringResources.New,
                Command        = NewCommand,
                ImageSmall     = ImageResources.DCLAddNew16.GetBitmapImage(),
                ImageLarge     = ImageResources.DCLAddNew32.GetBitmapImage(),
                GlyphSize      = GlyphSizeType.Small,
                GlyphAlignment = GlyphAlignmentType.Top,
                DisplayMode    = DisplayModeType.Default,
                IsVisible      = true,
                Priority       = 1
            };
            bar.MenuItems.Add(_newMenuItem);

            _editMenuItem = new CommandMenuItem
            {
                Caption = StringResources.Edit,
                Command = EditCommand,
                //HotKey = new KeyGesture(Key.F6),
                ImageSmall     = ImageResources.DCLEdit16.GetBitmapImage(),
                ImageLarge     = ImageResources.DCLEdit32.GetBitmapImage(),
                GlyphSize      = GlyphSizeType.Small,
                GlyphAlignment = GlyphAlignmentType.Top,
                DisplayMode    = DisplayModeType.Default,
                IsVisible      = true,
                Priority       = 2
            };
            bar.MenuItems.Add(_editMenuItem);

            bar.MenuItems.Add(new CommandMenuItem
            {
                Caption    = StringResources.Delete,
                Command    = DeleteCommand,
                ImageSmall = ImageResources.DCLDelete16.GetBitmapImage(),
                ImageLarge = ImageResources.DCLDelete32.GetBitmapImage(),
                //HotKey = new KeyGesture(Key.F9),
                GlyphSize      = GlyphSizeType.Small,
                GlyphAlignment = GlyphAlignmentType.Top,
                DisplayMode    = DisplayModeType.Default,
                IsVisible      = true,
                Priority       = 3
            });

            _gridEditMenuItem = new CommandMenuItem
            {
                Caption    = StringResources.MenuCaptionEditTable,
                Command    = GridEditCommand,
                ImageSmall = ImageResources.DCLGridEditBegin16.GetBitmapImage(),
                ImageLarge = ImageResources.DCLGridEditBegin32.GetBitmapImage(),
                //HotKey = new KeyGesture(Key.F9),
                GlyphSize      = GlyphSizeType.Small,
                GlyphAlignment = GlyphAlignmentType.Top,
                DisplayMode    = DisplayModeType.Default,
                //Is Visible = ShouldUpdateSeparately
                Priority = 4
            };
            bar.MenuItems.Add(_gridEditMenuItem);
        }