- Timestamp:
- 08/16/16 12:04:56 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4
- Files:
-
- 1 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj
r14125 r14255 144 144 <Compile Include="SymbolicDiscriminantFunctionClassificationSolutionView.Designer.cs"> 145 145 <DependentUpon>SymbolicDiscriminantFunctionClassificationSolutionView.cs</DependentUpon> 146 </Compile> 147 <Compile Include="SymbolicClassificationModelMathView.cs"> 148 <SubType>UserControl</SubType> 149 </Compile> 150 <Compile Include="SymbolicClassificationModelMathView.designer.cs"> 151 <DependentUpon>SymbolicClassificationModelMathView.cs</DependentUpon> 146 152 </Compile> 147 153 <None Include="HeuristicLab.snk" /> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicClassificationModelMathView.cs
r14250 r14255 20 20 #endregion 21 21 22 using System;23 using System.IO;24 using System.Windows.Forms;25 22 using HeuristicLab.MainForm; 26 using HeuristicLab. MainForm.WindowsForms;23 using HeuristicLab.Problems.DataAnalysis.Symbolic.Views; 27 24 28 namespace HeuristicLab.Problems.DataAnalysis.Symbolic. Views {25 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views { 29 26 [View("Mathematical Representation")] 30 [Content(typeof(ISymbolicDataAnalysisModel))] 31 public partial class MathSymbolicDataAnalysisModelView : AsynchronousContentView { 32 private SymbolicDataAnalysisExpressionLatexFormatter formatter = new SymbolicDataAnalysisExpressionLatexFormatter(); 33 public MathSymbolicDataAnalysisModelView() 34 : base() { 35 InitializeComponent(); 36 webBrowser.ScrollBarsEnabled = true; 37 webBrowser.ScriptErrorsSuppressed = false; 27 [Content(typeof(ISymbolicClassificationModel))] 28 public partial class SymbolicClassificationModelMathView : SymbolicDataAnalysisModelMathView { 38 29 39 // update for the first time after page has loaded 40 webBrowser.DocumentCompleted += (sender, args) => RefreshHtmlPage(); 30 public SymbolicClassificationModelMathView() : base() { } 41 31 42 string hlDir = Path.GetFullPath(AppDomain.CurrentDomain.BaseDirectory); 43 webBrowser.Navigate("file://" + Path.Combine(hlDir, "displayModelFrame.html")); 44 } 45 46 public new ISymbolicDataAnalysisModel Content { 47 get { return (ISymbolicDataAnalysisModel)base.Content; } 32 public new ISymbolicClassificationModel Content { 33 get { return (ISymbolicClassificationModel)base.Content; } 48 34 set { base.Content = value; } 49 35 } 50 36 51 protected override void OnContentChanged() { 52 base.OnContentChanged(); 53 RefreshHtmlPage(); 54 } 55 56 private void RefreshHtmlPage() { 57 // only update if the page has loaded already 58 if (webBrowser.Document == null || webBrowser.Document.Body == null) return; 59 60 if (Content != null) { 61 HtmlElement newElement = webBrowser.Document.GetElementById("model"); 62 newElement.InnerText = formatter.Format(Content.SymbolicExpressionTree); 63 webBrowser.Document.InvokeScript("refreshModel"); 64 } else { 65 HtmlElement newElement = webBrowser.Document.GetElementById("model"); 66 newElement.InnerText = string.Empty; 67 } 37 protected override string GetFormattedTree() { 38 return Formatter.Format(Content.SymbolicExpressionTree, Content.TargetVariable); 68 39 } 69 40 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicClassificationModelMathView.designer.cs
r14250 r14255 20 20 #endregion 21 21 22 namespace HeuristicLab.Problems.DataAnalysis.Symbolic. Views {23 partial class MathSymbolicDataAnalysisModelView {22 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views { 23 partial class SymbolicClassificationModelMathView { 24 24 /// <summary> 25 25 /// Required designer variable.
Note: See TracChangeset
for help on using the changeset viewer.