Helper class for managing graph layouts.
This class is meant for use in Excel applications that allow the user to select a graph layout via a RibbonDropDown that has one item per available layout. It provides methods for populating the RibbonDropDown and for creating a layout of the selected type.

Call AddRibbonDropDownItems during application initialization. When the user selects one of the RibbonDropDownItems added by this method, the LayoutManager.LayoutChanged event fires. In the event handler, call LayoutManager.CreateLayout to create a layout of the selected type.

Inheritance: Smrf.NodeXL.ApplicationUtil.LayoutManager
コード例 #1
0
ファイル: Ribbon.cs プロジェクト: 2014-sed-team3/term-project
    //*************************************************************************
    //  Constructor: Ribbon()
    //
    /// <summary>
    /// Initializes a new instance of the <see cref="Ribbon" /> class.
    /// </summary>
    //*************************************************************************

    public Ribbon()
    :
    base( Globals.Factory.GetRibbonFactory() )
    {
        InitializeComponent();

        btnGetExchangeGraphDataProvider.Tag =
            ProjectInformation.ExchangeGraphDataProviderUrl;

        btnGetMediaWikiGraphDataProvider.Tag =
            ProjectInformation.MediaWikiGraphDataProviderUrl;

        btnGetOnaSurveysGraphDataProvider.Tag =
            ProjectInformation.OnaSurveysGraphDataProviderUrl;

        btnGetSocialNetworkGraphDataProvider.Tag =
            ProjectInformation.SocialNetworkGraphDataProviderUrl;

        btnGetVosonGraphDataProvider.Tag =
            ProjectInformation.VosonGraphDataProviderUrl;

        btnDonate.Tag = ProjectInformation.DonateUrl;

        // Populate the rddLayout RibbonDropDown.

        m_oLayoutManagerForRibbonDropDown =
            new LayoutManagerForRibbonDropDown();

        m_oLayoutManagerForRibbonDropDown.AddRibbonDropDownItems(
            this.rddLayout);

        m_oLayoutManagerForRibbonDropDown.LayoutChanged += new
            EventHandler(this.m_oLayoutManagerForRibbonDropDown_LayoutChanged);

        AssertValid();
    }