コード例 #1
0
        /// <summary>
        /// Creates a new Ribbon control
        /// </summary>
        public Ribbon()
        {
            SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.Selectable, false);
            DoubleBuffered = true;
            Dock = DockStyle.Top;

            Tabs = new RibbonTabCollection(this);
            _contexts = new RibbonContextCollection(this);

            TabsMargin = new Padding(12, 24 + 2, 20, 0);
            TabTextMargin = new Padding(4, 2, 4, 2);
            TabsPadding = new Padding(8, 5, 8, 3);
            TabContentMargin = new Padding(1, 0, 1, 2);
            PanelPadding = new Padding(3);
            PanelMargin = new Padding(3, 2, 3, 15);
            PanelSpacing = 3;
            ItemPadding = new Padding(1, 0, 1, 0);
            ItemMargin = new Padding(4, 2, 4, 2);
            TabSpacing = 6;
            DropDownMargin = new Padding(2);
            _renderer = new RibbonProfessionalRenderer();
            _orbVisible = true;
            OrbDropDown = new RibbonOrbDropDown(this);
            QuickAcessToolbar = new RibbonQuickAccessToolbar(this);
            QuickAccessVisible = true;
        }
コード例 #2
0
        // Constructor.
        public MruLoader(string application_name, RibbonOrbDropDown menu, int num_files)
        {
            ApplicationName = application_name;
            MyMenu          = menu;
            NumFiles        = num_files;
            FileInfos       = new List <FileInfo>();
            MenuItems       = new RibbonOrbRecentItem[NumFiles + 1];

            for (int i = 0; i < NumFiles; i++)
            {
                MenuItems[i]         = new RibbonOrbRecentItem();
                MenuItems[i].Visible = false;
                MyMenu.RecentItems.Add(MenuItems[i]);
            }

            // Reload items from the registry.
            LoadFiles();

            // Display the items.
            ShowFiles();
        }
コード例 #3
0
 public RibbonOrbDropDownEventArgs(Ribbon ribbon, RibbonOrbDropDown dropDown, Graphics g, Rectangle clip)
     : base(ribbon, g, clip)
 {
     _dropDown = dropDown;
 }
コード例 #4
0
ファイル: Ribbon.cs プロジェクト: sduxiaowu/NineLineScore
        /// <summary>
        /// Creates a new Ribbon control
        /// </summary>
        public Ribbon()
        {
            
            SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.Selectable, false);
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            //DoubleBuffered = true;
            Dock = DockStyle.Top;

            _tabs = new RibbonTabCollection(this);
            _contexts = new RibbonContextCollection(this);

            _tabsMargin = new Padding(12, 24 + 2, 20, 0);
            _tabTextMargin = new Padding(4, 2, 4, 2);
            _tabsPadding = new Padding(8, 5, 8, 3);
            _tabContentMargin = new Padding(1, 0, 1, 2);
            _panelPadding = new Padding(3);
            _panelMargin = new Padding(3, 2, 3, 15);
            _panelSpacing = 3;
            _itemPadding = new Padding(1, 0, 1, 0);
            _itemMargin = new Padding(4, 2, 4, 2);
            _tabSpacing = 6;
            _dropDownMargin = new Padding(2);
            _renderer = new RibbonProfessionalRenderer();
            _orbVisible = true;
            _orbDropDown = new RibbonOrbDropDown(this);
            _quickAcessToolbar = new RibbonQuickAccessToolbar(this);
            _quickAcessVisible = true;
            _MinimizeButton = new RibbonCaptionButton(RibbonCaptionButton.CaptionButton.Minimize);
            _MaximizeRestoreButton = new RibbonCaptionButton(RibbonCaptionButton.CaptionButton.Maximize);
            _CloseButton = new RibbonCaptionButton(RibbonCaptionButton.CaptionButton.Close);

            _MinimizeButton.SetOwner(this);
            _MaximizeRestoreButton.SetOwner(this);
            _CloseButton.SetOwner(this);

            Font = SystemFonts.CaptionFont;

            BorderMode = RibbonWindowMode.NonClientAreaGlass;
            Disposed += new EventHandler(Ribbon_Disposed);

        }