Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7152


Ignore:
Timestamp:
12/07/11 21:00:11 (13 years ago)
Author:
ascheibe
Message:

#1672

  • added missing invokes
  • removed collecting types of object graph for retrieval of plugins as this isn't needed for MetaOpt. I think the problem was that MetaOpt always stored types of all available algorithms and problems which caused the problem (#1527) with Hive.
Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ScheduleView.cs

    r7146 r7152  
    192192          DeleteAppointment();
    193193        else {
    194           DialogResult res = MessageBox.Show("Delete all events in this series?", "Delete recurrences", MessageBoxButtons.YesNo);
     194          DialogResult res = MessageBox.Show("Delete all events in this series?", "Delete recurrences", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
    195195          if (res != DialogResult.Yes)
    196196            DeleteAppointment();
     
    282282          //change recurring appointment
    283283          //check, if only selected appointment has to change or whole recurrence
    284           DialogResult res = MessageBox.Show("Change all events in this series?", "Change recurrences", MessageBoxButtons.YesNo);
     284          DialogResult res = MessageBox.Show("Change all events in this series?", "Change recurrences", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
    285285          if (res != DialogResult.Yes) {
    286286            if (CreateAppointment())
  • trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobListView.cs

    r7078 r7152  
    6161
    6262    protected override void Content_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<RefreshableJob> e) {
    63       base.Content_ItemsAdded(sender, e);
    64       foreach (ColumnHeader c in this.itemsListView.Columns) {
    65         c.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
    66       }
    67       foreach (var item in e.Items) {
    68         item.ItemImageChanged += new EventHandler(item_ItemImageChanged);
     63      if (InvokeRequired) {
     64        Invoke(new CollectionItemsChangedEventHandler<RefreshableJob>(Content_ItemsAdded), sender, e);
     65      } else {
     66        base.Content_ItemsAdded(sender, e);
     67        foreach (ColumnHeader c in this.itemsListView.Columns) {
     68          c.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     69        }
     70        foreach (var item in e.Items) {
     71          item.ItemImageChanged += new EventHandler(item_ItemImageChanged);
     72        }
    6973      }
    7074    }
    7175
    7276    void item_ItemImageChanged(object sender, EventArgs e) {
    73         if (this.itemsListView.InvokeRequired) {
    74             Invoke(new EventHandler(item_ItemImageChanged), sender, e);
    75         } else {
    76           RefreshableJob job = sender as RefreshableJob;
    77           if (job != null) {
    78             foreach (ListViewItem item in this.itemsListView.Items) {
    79                 if (item.Tag != null)
    80                 {
    81                     RefreshableJob cur = item.Tag as RefreshableJob;
    82                     if (cur != null && cur == job)
    83                     {
    84                         this.UpdateListViewItemImage(item);
    85                     }
    86                 }
     77      if (this.itemsListView.InvokeRequired) {
     78        Invoke(new EventHandler(item_ItemImageChanged), sender, e);
     79      } else {
     80        RefreshableJob job = sender as RefreshableJob;
     81        if (job != null) {
     82          foreach (ListViewItem item in this.itemsListView.Items) {
     83            if (item.Tag != null) {
     84              RefreshableJob cur = item.Tag as RefreshableJob;
     85              if (cur != null && cur == job) {
     86                this.UpdateListViewItemImage(item);
     87              }
    8788            }
    88          }
     89          }
     90        }
    8991      }
    9092    }
    9193
    9294    protected override void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<RefreshableJob> e) {
    93       base.Content_ItemsRemoved(sender, e);
    94       foreach (var item in e.Items) {
    95         item.ItemImageChanged -= new EventHandler(item_ItemImageChanged);
    96       }
    97       if (Content != null && Content.Count == 0) {
    98         foreach (ColumnHeader c in this.itemsListView.Columns) {
    99           c.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     95      if (InvokeRequired) {
     96        Invoke(new CollectionItemsChangedEventHandler<RefreshableJob>(Content_ItemsRemoved), sender, e);
     97      } else {
     98        base.Content_ItemsRemoved(sender, e);
     99        foreach (var item in e.Items) {
     100          item.ItemImageChanged -= new EventHandler(item_ItemImageChanged);
     101        }
     102        if (Content != null && Content.Count == 0) {
     103          foreach (ColumnHeader c in this.itemsListView.Columns) {
     104            c.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     105          }
    100106        }
    101107      }
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveJobs/EngineHiveTask.cs

    r7142 r7152  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Linq;
    2524using HeuristicLab.Common;
    2625using HeuristicLab.Core;
     
    6160      jobData.Data = PersistenceUtil.Serialize(ItemTask, out usedTypes);
    6261
    63       // add type objects from object graph to work around ticket #1527
    64       var typeObjects = ItemTask.GetObjectGraphObjects().OfType<Type>();
    65       usedTypes = new List<Type>(usedTypes).Union(typeObjects);
    66 
    6762      PluginUtil.CollectDeclaringPlugins(plugins, usedTypes);
    68 
    6963      return jobData;
    7064    }
Note: See TracChangeset for help on using the changeset viewer.