Changeset 2506


Ignore:
Timestamp:
03/14/12 04:14:17 (2 years ago)
Author:
lowjoel
Message:

Query for the list of tools before deciding whether we should disable the Tools menu. Implements #363: There should be a Tools menu for plugins to include themselves.

Location:
branches/eraser6/pluginsRewrite
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/pluginsRewrite/Eraser.Plugins/Eraser.Plugins.csproj

    r2502 r2506  
    5252    <Compile Include="AssemblyInfo.cs" /> 
    5353    <Compile Include="Exception.cs" /> 
     54    <Compile Include="ExtensionPoints\IClientTool.cs" /> 
    5455    <Compile Include="ExtensionPoints\IEntropySource.cs" /> 
    5556    <Compile Include="ExtensionPoints\IErasureMethod.cs" /> 
     
    6970    <Compile Include="ProgressManager.cs" /> 
    7071    <Compile Include="Properties\AssemblyInfo.cs" /> 
     72    <Compile Include="Registrars\ClientToolRegistrar.cs" /> 
    7173    <Compile Include="Registrars\EntropySourceRegistrar.cs" /> 
    7274    <Compile Include="Registrars\ErasureMethodRegistrar.cs" /> 
  • branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/IClientTool.cs

    r2505 r2506  
    3232    /// items within the Eraser Tools menu. 
    3333    /// </summary> 
    34     class IClientTool : IRegisterable 
     34    public interface IClientTool : IRegisterable 
    3535    { 
    3636        /// <summary> 
  • branches/eraser6/pluginsRewrite/Eraser/MainForm.cs

    r2485 r2506  
    2828using System.Text; 
    2929using System.Windows.Forms; 
    30 using Eraser.Util; 
    31 using Eraser.Manager; 
    32 using Eraser.Properties; 
     30 
    3331using System.IO; 
    3432using System.Diagnostics; 
    3533using System.Reflection; 
    3634using System.Runtime.Serialization; 
     35 
     36using Eraser.Util; 
     37using Eraser.Manager; 
     38using Eraser.Plugins; 
     39using Eraser.Plugins.Registrars; 
     40using Eraser.Plugins.ExtensionPoints; 
     41using Eraser.Properties; 
    3742 
    3843namespace Eraser 
     
    5661            Theming.ApplyTheme(this); 
    5762            Theming.ApplyTheme(notificationMenu); 
     63 
     64            //We need to see if there are any tools to display 
     65            foreach (IClientTool tool in Host.Instance.ClientTools) 
     66                tool.RegisterTool(tbToolsMenu); 
     67            if (tbToolsMenu.Items.Count == 0) 
     68            { 
     69                //There are none, hide the menu 
     70                tbTools.Visible = false; 
     71                tbToolsDropDown.Visible = false; 
     72            } 
    5873 
    5974            //For every task we need to register the Task Started and Task Finished 
Note: See TracChangeset for help on using the changeset viewer.