Changeset 685 for trunk/CrypCore


Ignore:
Timestamp:
Oct 8, 2009, 6:46:34 PM (12 years ago)
Author:
Thomas Schmid
Message:
  • added error message for non plugin files in plugin directory
  • new editor binaries
Location:
trunk/CrypCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypCore/CrypCore.csproj

    r271 r685  
    5858    <Compile Include="PluginManager.cs" />
    5959    <Compile Include="Properties\AssemblyInfo.cs" />
     60    <Compile Include="Resources\Exceptions.Designer.cs">
     61      <AutoGen>True</AutoGen>
     62      <DesignTime>True</DesignTime>
     63      <DependentUpon>Exceptions.resx</DependentUpon>
     64    </Compile>
    6065    <Compile Include="SearchProvider.cs" />
    6166  </ItemGroup>
    6267  <ItemGroup>
    6368    <None Include="key.snk" />
     69  </ItemGroup>
     70  <ItemGroup>
     71    <EmbeddedResource Include="Resources\Exceptions.resx">
     72      <Generator>ResXFileCodeGenerator</Generator>
     73      <LastGenOutput>Exceptions.Designer.cs</LastGenOutput>
     74    </EmbeddedResource>
    6475  </ItemGroup>
    6576  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  • trunk/CrypCore/PluginManager.cs

    r380 r685  
    371371                    }
    372372                }
     373                catch (BadImageFormatException)
     374                {
     375                  SendExceptionMessage(string.Format(Resources.Exceptions.non_plugin_file, fileInfo.Name));
     376                }
    373377                catch (Exception ex)
    374378                {
    375                     if (OnExceptionOccured != null)
    376                         OnExceptionOccured(this, new PluginManagerEventArgs(ex));
     379                    SendExceptionMessage(ex);
    377380                }
    378381            }
     
    543546            OnDebugMessageOccured(this, new PluginManagerEventArgs(message));
    544547        }
     548
     549        private void SendExceptionMessage(Exception ex)
     550        {
     551          if (OnExceptionOccured != null)
     552            OnExceptionOccured(this, new PluginManagerEventArgs(ex));
     553        }
     554
     555        private void SendExceptionMessage(string message)
     556        {
     557          if (OnExceptionOccured != null)
     558            OnExceptionOccured(this, new PluginManagerEventArgs(message));
     559        }
    545560    }
    546561}
Note: See TracChangeset for help on using the changeset viewer.