Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/19/09 17:16:36 (15 years ago)
Author:
gkronber
Message:

worked on #419

  • added function to open and display any model
  • added 'hard-coded' implementation of offspring selection GP (work in progress)
  • added properties for max. size and max. height in StandardGP
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Charting/BubbleChart.cs

    r1151 r1156  
    2828using System.Windows.Forms;
    2929using HeuristicLab.CEDMA.Core;
     30using HeuristicLab.PluginInfrastructure;
     31using HeuristicLab.Core;
     32using HeuristicLab.CEDMA.DB.Interfaces;
    3033
    3134namespace HeuristicLab.CEDMA.Charting {
     
    6770
    6871      foreach (var resultsEntry in results.GetEntries()) {
    69         if(resultsEntry.Get(X_JITTER) ==null)
     72        if (resultsEntry.Get(X_JITTER) == null)
    7073          resultsEntry.Set(X_JITTER, random.NextDouble() * 2.0 - 1.0);
    71         if(resultsEntry.Get(Y_JITTER) == null)
     74        if (resultsEntry.Get(Y_JITTER) == null)
    7275          resultsEntry.Set(Y_JITTER, random.NextDouble() * 2.0 - 1.0);
    7376        records.Add(resultsEntry);
     
    239242          }
    240243        }
    241         if(primitives.Count() > 0) results.FireChanged();
     244        if (primitives.Count() > 0) results.FireChanged();
    242245      } else {
    243246        base.MouseDrag(start, end, button);
     
    255258    }
    256259
    257     //public override void MouseDoubleClick(Point point, MouseButtons button) {
    258     //  if(button == MouseButtons.Left) {
    259     //    Record r = GetRecord(point);
    260     //    if(r != null) r.OpenModel();
    261     //  } else {
    262     //    base.MouseDoubleClick(point, button);
    263     //  }
    264     //}
     260    public override void MouseDoubleClick(Point point, MouseButtons button) {
     261      if (button == MouseButtons.Left) {
     262        ResultsEntry entry = GetResultsEntry(point);
     263        if (entry != null) {
     264          string serializedData = (string)entry.Get(Ontology.PredicateSerializedData.Uri.Replace(Ontology.CedmaNameSpace, ""));
     265          var model = (IItem)PersistenceManager.RestoreFromGZip(Convert.FromBase64String(serializedData));
     266          PluginManager.ControlManager.ShowControl(model.CreateView());
     267        }
     268      } else {
     269        base.MouseDoubleClick(point, button);
     270      }
     271    }
    265272  }
    266273}
Note: See TracChangeset for help on using the changeset viewer.