Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/15/19 14:52:20 (5 years ago)
Author:
abeham
Message:

#2457: adapted to trunk

Location:
branches/2457_ExpertSystem/HeuristicLab.OptimizationExpertSystem/3.3
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/2457_ExpertSystem/HeuristicLab.OptimizationExpertSystem/3.3/HeuristicLab.OptimizationExpertSystem-3.3.csproj

    r15694 r16958  
    1010    <RootNamespace>HeuristicLab.OptimizationExpertSystem</RootNamespace>
    1111    <AssemblyName>HeuristicLab.OptimizationExpertSystem-3.3</AssemblyName>
    12     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     12    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
    1313    <FileAlignment>512</FileAlignment>
     14    <TargetFrameworkProfile />
    1415  </PropertyGroup>
    1516  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
  • branches/2457_ExpertSystem/HeuristicLab.OptimizationExpertSystem/3.3/Menu/0_Config/30_DownloadFromOkbMenuItem.cs

    r13767 r16958  
    2020#endregion
    2121
     22using System;
     23using System.Collections.Generic;
     24using System.Drawing;
    2225using HeuristicLab.Common;
    2326using HeuristicLab.Common.Resources;
    2427using HeuristicLab.MainForm;
    25 using System;
    26 using System.Collections.Generic;
    27 using System.Drawing;
    2828
    2929namespace HeuristicLab.OptimizationExpertSystem.Menu {
     
    7272    private void DownloadProgressOnStateChanged(object sender, EventArgs eventArgs) {
    7373      var progress = (IProgress)sender;
    74       if (progress.ProgressState == ProgressState.Finished || progress.ProgressState == ProgressState.Canceled) {
     74      if (progress.ProgressState == ProgressState.Finished || progress.ProgressState == ProgressState.CancelRequested) {
    7575        SetToolStripItemEnabled(true);
    7676        progress.ProgressStateChanged -= DownloadProgressOnStateChanged;
  • branches/2457_ExpertSystem/HeuristicLab.OptimizationExpertSystem/3.3/OptimizationKnowledgeCenter.cs

    r13748 r16958  
    2020#endregion
    2121
     22using System;
     23using System.Windows.Forms;
    2224using HeuristicLab.Common;
    2325using HeuristicLab.MainForm;
    2426using HeuristicLab.MainForm.WindowsForms;
    2527using HeuristicLab.OptimizationExpertSystem.Common;
    26 using System;
    27 using System.Windows.Forms;
    2828
    2929namespace HeuristicLab.OptimizationExpertSystem {
     
    4545      e.Value.ProgressStateChanged += OnProgressStateChanged;
    4646      e.Value.ProgressValueChanged += OnProgressValueChanged;
    47       e.Value.StatusChanged += OnProgressStatusChanged;
     47      e.Value.MessageChanged += OnProgressStatusChanged;
    4848      progressBar.Value = progressBar.Minimum;
    4949      progressLabel.Text = string.Empty;
     
    5555      if (InvokeRequired) { Invoke((Action<object, EventArgs>)OnProgressStateChanged, sender, e); return; }
    5656      var progress = (IProgress)sender;
    57       if (progress.ProgressState == ProgressState.Canceled
     57      if (progress.ProgressState == ProgressState.CancelRequested
    5858          || progress.ProgressState == ProgressState.Finished) {
    5959        progress.ProgressStateChanged -= OnProgressStateChanged;
    6060        progress.ProgressValueChanged -= OnProgressValueChanged;
    61         progress.StatusChanged -= OnProgressStatusChanged;
     61        progress.MessageChanged -= OnProgressStatusChanged;
    6262        progressBar.Visible = false;
    6363        progressLabel.Visible = false;
     
    7474      if (InvokeRequired) { Invoke((Action<object, EventArgs>)OnProgressStatusChanged, sender, e); return; }
    7575      var progress = (IProgress)sender;
    76       progressLabel.Text = progress.Status.Replace(Environment.NewLine, "   ");
     76      progressLabel.Text = progress.Message.Replace(Environment.NewLine, "   ");
    7777    }
    7878
  • branches/2457_ExpertSystem/HeuristicLab.OptimizationExpertSystem/3.3/Toolbar/DownloadFromOKBToolbarItem.cs

    r13767 r16958  
    2020#endregion
    2121
     22using System;
     23using System.Drawing;
    2224using HeuristicLab.Common;
    2325using HeuristicLab.MainForm;
    24 using System;
    25 using System.Drawing;
    2626
    2727namespace HeuristicLab.OptimizationExpertSystem.Toolbar {
     
    6666    private void DownloadProgressOnStateChanged(object sender, EventArgs eventArgs) {
    6767      var progress = (IProgress)sender;
    68       if (progress.ProgressState == ProgressState.Finished || progress.ProgressState == ProgressState.Canceled) {
     68      if (progress.ProgressState == ProgressState.Finished || progress.ProgressState == ProgressState.CancelRequested) {
    6969        SetToolStripItemEnabled(true);
    7070        progress.ProgressStateChanged -= DownloadProgressOnStateChanged;
  • branches/2457_ExpertSystem/HeuristicLab.OptimizationExpertSystem/3.3/Views/KnowledgeCenterAllinOneView.cs

    r13774 r16958  
    2020#endregion
    2121
     22using System;
     23using System.Collections.Generic;
     24using System.ComponentModel;
     25using System.Linq;
     26using System.Text.RegularExpressions;
     27using System.Windows.Forms;
     28using System.Windows.Forms.DataVisualization.Charting;
    2229using HeuristicLab.Analysis;
    2330using HeuristicLab.Analysis.QualityAnalysis;
     
    3441using HeuristicLab.Optimization.Views;
    3542using HeuristicLab.OptimizationExpertSystem.Common;
    36 using System;
    37 using System.Collections.Generic;
    38 using System.ComponentModel;
    39 using System.Linq;
    40 using System.Text.RegularExpressions;
    41 using System.Windows.Forms;
    42 using System.Windows.Forms.DataVisualization.Charting;
    4343
    4444namespace HeuristicLab.OptimizationExpertSystem {
     
    224224      progress.ProgressStateChanged += OkbDownloadProgressOnStateChanged;
    225225      Content.UpdateKnowledgeBaseAsync(progress);
    226       MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(progressPanel, progress);
     226      Progress.ShowOnControl(progressPanel, progress);
    227227      progressPanel.Visible = true;
    228228      SetEnabledStateOfControls();
  • branches/2457_ExpertSystem/HeuristicLab.OptimizationExpertSystem/3.3/Views/KnowledgeCenterViewBase.cs

    r13787 r16958  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.MainForm;
     
    2526using HeuristicLab.Optimization;
    2627using HeuristicLab.OptimizationExpertSystem.Common;
    27 using System;
    2828
    2929namespace HeuristicLab.OptimizationExpertSystem {
     
    146146    private void ContentOnDownloadStarted(object sender, EventArgs<IProgress> e) {
    147147      if (InvokeRequired) { Invoke((Action<object, EventArgs<IProgress>>)ContentOnDownloadStarted, sender, e); return; }
    148       MainForm.AddOperationProgressToView(this, e.Value);
     148      //MainForm.AddOperationProgressToView(this, e.Value);
    149149      e.Value.ProgressStateChanged += ProgressOnStateChanged;
    150150      OnDownloadStarted(e.Value);
  • branches/2457_ExpertSystem/HeuristicLab.OptimizationExpertSystem/3.3/Views/PerformanceModelingView.cs

    r13878 r16958  
    2020#endregion
    2121
     22using System;
     23using System.Collections.Generic;
     24using System.Linq;
     25using System.Threading.Tasks;
    2226using HeuristicLab.Analysis;
    2327using HeuristicLab.Common.Resources;
     
    2832using HeuristicLab.OptimizationExpertSystem.Common;
    2933using HeuristicLab.PluginInfrastructure;
    30 using System;
    31 using System.Collections.Generic;
    32 using System.Linq;
    33 using System.Threading.Tasks;
    3434
    3535namespace HeuristicLab.OptimizationExpertSystem {
     
    153153    private void xValidateButton_Click(object sender, EventArgs e) {
    154154      var recommender = (IAlgorithmInstanceRecommender)recommenderComboBox.SelectedItem;
    155       var progress = MainForm.AddOperationProgressToView(this, "Performing Leave-one-out Crossvalidation");
     155      var progress = Progress.ShowOnControl(this, "Performing Leave-one-out Crossvalidation");
    156156      var topN = (int)topNComboBox.SelectedItem;
    157157      Task.Factory.StartNew(() => { DoCrossvalidate(recommender, topN, progress); }, TaskCreationOptions.LongRunning);
     
    188188          var observed = Content.GetAlgorithmPerformanceLog10(pi);
    189189          if (observed.Count == 0) continue;
    190           progress.Status = pi.Name + "...";
     190          progress.Message = pi.Name + "...";
    191191          var model = recommender.TrainModel(trainingSet.Where(x => x != pi).ToArray(), Content, features);
    192192          var predictedTopN = model.GetRanking(pi).Take(topN).ToDictionary(x => x.Key, x => Math.Log10(x.Value));
Note: See TracChangeset for help on using the changeset viewer.