Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3776


Ignore:
Timestamp:
05/11/10 19:00:47 (14 years ago)
Author:
mkommend
Message:

implemented check for MS ChartControls (ticket #893)

Location:
trunk/sources
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/StandardTreeLayout.cs

    r2861 r3776  
    157157            Graph.MakeSpanningTree(LayoutRoot as INode);
    158158
    159             Trace.WriteLine((LayoutRoot as INode).ChildCount);
     159            //Trace.WriteLine((LayoutRoot as INode).ChildCount);
    160160
    161161            if (Graph.SpanningTree == null)
     
    281281        private void firstWalk(INode n, int num, int depth)
    282282        {
    283             Trace.WriteLine("depthj: " + depth);
     283            //Trace.WriteLine("depthj: " + depth);
    284284            Params np = Pars[n.Uid.ToString()];
    285285
  • trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLab.Optimizer-3.3.csproj

    r3759 r3776  
    8787    <None Include="HeuristicLabOptimizerPlugin.cs.frame" />
    8888    <Compile Include="FileManager.cs" />
     89    <Compile Include="ChartControlsWarning.cs">
     90      <SubType>Form</SubType>
     91    </Compile>
     92    <Compile Include="ChartControlsWarning.Designer.cs">
     93      <DependentUpon>ChartControlsWarning.cs</DependentUpon>
     94    </Compile>
    8995    <Compile Include="MenuItems\ClipboardMenuItem.cs" />
    9096    <Compile Include="MenuItems\AboutMenuItem.cs" />
  • trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerMainForm.cs

    r3768 r3776  
    3030using HeuristicLab.MainForm;
    3131using HeuristicLab.MainForm.WindowsForms;
     32using System.IO;
    3233
    3334namespace HeuristicLab.Optimizer {
     
    8687        StartPage startPage = new StartPage();
    8788        startPage.Show();
     89      }
     90    }
     91
     92    private static string CHARTCONTROLASSEMBLY = "12System.Windows.Forsms.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
     93    private bool CheckChartControls() {
     94      try {
     95        Assembly chartControlsAssembly = Assembly.Load(CHARTCONTROLASSEMBLY);
     96        if (chartControlsAssembly != null)
     97          return true;
     98      }
     99      catch (FileNotFoundException) {
     100      }
     101      catch (FileLoadException) {
     102      }
     103      catch (BadImageFormatException) {
     104      }
     105      return false;
     106    }
     107
     108    protected override void OnShown(EventArgs e) {
     109      base.OnShown(e);
     110      if (!CheckChartControls()) {
     111        ChartControlsWarning dlg = new ChartControlsWarning();
     112        dlg.ShowDialog(this);
    88113      }
    89114    }
Note: See TracChangeset for help on using the changeset viewer.