source: branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs.frame @ 17207

Last change on this file since 17207 was 17207, checked in by gkronber, 4 months ago

#2971: merged r17180:17184 from trunk to branch

File size: 3.3 KB
RevLine 
[5693]1#region License Information
2/* HeuristicLab
[17207]3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
[5693]4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using System.Collections.Generic;
24using System.Text;
25using HeuristicLab.PluginInfrastructure;
[16341]26using System.Runtime.InteropServices;
27using System.IO;
[5693]28
29namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
[17207]30  [Plugin("HeuristicLab.Problems.DataAnalysis.Symbolic.Views","Provides views for symbolic data analysis problem classes.", "3.4.12.$WCREV$")]
[5693]31  [PluginFile("HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.dll", PluginFileType.Assembly)]
[7446]32  [PluginFile("displayModelFrame.html", PluginFileType.Data)]
[12817]33  [PluginDependency("HeuristicLab.ALGLIB", "3.7.0")]
[5830]34  [PluginDependency("HeuristicLab.Collections", "3.3")]
35  [PluginDependency("HeuristicLab.Common", "3.3")]
[10545]36  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
[5830]37  [PluginDependency("HeuristicLab.Core", "3.3")]
38  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
39  [PluginDependency("HeuristicLab.Data", "3.3")]
40  [PluginDependency("HeuristicLab.Data.Views", "3.3")]
[12089]41  [PluginDependency("HeuristicLab.EPPlus", "4.0.3")]
[5830]42  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")]
43  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views", "3.4")]
44  [PluginDependency("HeuristicLab.MainForm", "3.3")]
45  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
[16309]46  [PluginDependency("HeuristicLab.MathJax", "1.2")]
[5830]47  [PluginDependency("HeuristicLab.Optimization","3.3")]
48  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
49  [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")]
[5693]50  public class HeuristicLabProblemsDataAnalysisSymbolicViewsPlugin : PluginBase {
[16341]51    // HeuristicLab is marked with zone identifier 'Internet' after download.
52    // This propagates to all extracted files and can be checked in the file properties.
53    // IE prevents execution of MathJax JavaScript inside of untrusted html
54    // Therefore we need to programmatically unblock the displayModelFrame.html file before extracting.
55    // see http://engram404.net/programmatically-unblocking-downloaded-files/
56
57    // for removing the Zone.Identifier alternative NTFS stream (effectively unblocking the file)
58    [DllImport("kernel32.dll", SetLastError = true)]
59    private static extern bool DeleteFile(string lpFileName);
60
61    public override void OnLoad() {
62      base.OnLoad();
63
64      // unblock mathjax.zip ()
65      DeleteFile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "displayModelFrame.html:Zone.Identifier"));
66    }
[5693]67  }
68}
Note: See TracBrowser for help on using the repository browser.