Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3557


Ignore:
Timestamp:
04/29/10 15:10:17 (15 years ago)
Author:
mkommend
Message:

changed logic of showing new views (ticket #972)

Location:
trunk/sources
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core.Views/3.3/Clipboard.cs

    r3526 r3557  
    231231      if (listView.SelectedItems.Count == 1) {
    232232        T item = (T)listView.SelectedItems[0].Tag;
    233         IView view = MainFormManager.CreateDefaultView(item);
     233        IView view = MainFormManager.MainForm.ShowContent(item);
    234234        if (view != null) {
    235235          view.ReadOnly = this.ReadOnly;
    236           view.Show();
    237236        }
    238237      }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs

    r3526 r3557  
    229229        T item = itemsListView.SelectedItems[0].Tag as T;
    230230        if (item != null) {
    231           IContentView view = MainFormManager.CreateDefaultView(item);
     231          IContentView view = MainFormManager.MainForm.ShowContent(item);
    232232          if (view != null) {
    233233            view.ReadOnly = ReadOnly;
    234234            view.Locked = Locked;
    235             view.Show();
    236235          }
    237236        }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs

    r3526 r3557  
    189189      if (itemsListView.SelectedItems.Count == 1) {
    190190        T item = (T)itemsListView.SelectedItems[0].Tag;
    191         IContentView view = MainFormManager.CreateDefaultView(item);
     191        IContentView view = MainFormManager.MainForm.ShowContent(item);
    192192        if (view != null) {
    193193          view.ReadOnly = ReadOnly;
    194194          view.Locked = Locked;
    195           view.Show();
    196195        }
    197196      }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs

    r3526 r3557  
    223223      if (itemsListView.SelectedItems.Count == 1) {
    224224        T item = (T)itemsListView.SelectedItems[0].Tag;
    225         IContentView view = MainFormManager.CreateDefaultView(item);
     225        IContentView view = MainFormManager.MainForm.ShowContent(item);
    226226        if (view != null) {
    227227          view.ReadOnly = ReadOnly;
    228228          view.Locked = Locked;
    229           view.Show();
    230229        }
    231230      }
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorTreeView.cs

    r3432 r3557  
    355355        IOperator op = GetOperatorTag(graphTreeView.SelectedNode);
    356356        if (op != null) {
    357           IContentView view = MainFormManager.CreateDefaultView(op);
    358           if (view != null) {
    359             view.ReadOnly = this.ReadOnly;
    360             view.Locked = this.Locked;
     357          Type viewType = MainFormManager.GetDefaultViewType(op.GetType());
     358          if (viewType != null) {
    361359            viewToolStripMenuItem.Enabled = true;
    362             viewToolStripMenuItem.Tag = view;
     360            viewToolStripMenuItem.Tag = op;
    363361          }
    364362          breakpointToolStripMenuItem.Enabled = true;
     
    414412    #region Context Menu Events
    415413    private void viewToolStripMenuItem_Click(object sender, EventArgs e) {
    416       IView view = ((ToolStripMenuItem)sender).Tag as IView;
    417       if (view != null) view.Show();
     414      IOperator op = ((ToolStripMenuItem)sender).Tag as IOperator;
     415      IContentView view = MainFormManager.MainForm.ShowContent(op);
     416      if (view != null) {
     417        view.ReadOnly = this.ReadOnly;
     418        view.Locked = this.Locked;
     419      }
    418420    }
    419421    private void breakpointToolStripMenuItem_Click(object sender, EventArgs e) {
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ContentView.cs

    r3483 r3557  
    3737      get { return content; }
    3838      set {
    39         if ((value != null) && (!MainFormManager.ViewCanViewObject(this, value)))
     39        if ((value != null) && (!MainFormManager.ViewCanViewContent(this, value)))
    4040          throw new ArgumentException(string.Format("View \"{0}\" cannot view object \"{1}\".", this.GetType().Name, value.GetType().Name));
    4141        if (InvokeRequired) {
     
    5757      InitializeComponent();
    5858      this.locked = false;
    59     }
    60     public ContentView(IContent content)
    61       : this() {
    62       this.content = content;
    6359    }
    6460
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockingMainForm.cs

    r3437 r3557  
    4040      InitializeComponent();
    4141    }
    42     public DockingMainForm(Type userInterfaceItemType, bool showViewsInViewHost)
     42    public DockingMainForm(Type userInterfaceItemType, bool showContentInViewHost)
    4343      : this(userInterfaceItemType) {
    44       this.ShowViewsInViewHost = showViewsInViewHost;
     44      this.ShowContentInViewHost = showContentInViewHost;
    4545    }
    4646
     
    6767
    6868    protected override Form CreateForm(IView view) {
    69       DockForm form;
    70       IContentView contentView = view as IContentView;
    71       if (ShowViewsInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) {
    72         ViewHost viewHost = new ViewHost(contentView);
    73         form = new DockForm(viewHost);
    74         this.AddViewFormCombination(viewHost, form);
    75       } else {
    76         form = new DockForm(view);
    77         this.AddViewFormCombination(view, form);
    78       }
    79       return form;
     69      return new DockForm(view);
    8070    }
    8171
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForm.cs

    r3488 r3557  
    3232using System.Collections;
    3333using WeifenLuo.WinFormsUI.Docking;
     34using HeuristicLab.Common;
    3435
    3536namespace HeuristicLab.MainForm.WindowsForms {
     
    4344      this.userInterfaceItems = new List<IUserInterfaceItem>();
    4445      this.initialized = false;
    45       this.showViewsInViewHost = false;
     46      this.showContentInViewHost = false;
    4647    }
    4748
     
    5253
    5354    #region properties
    54     private bool showViewsInViewHost;
    55     public bool ShowViewsInViewHost {
    56       get { return this.showViewsInViewHost; }
    57       set { this.showViewsInViewHost = value; }
     55    private bool showContentInViewHost;
     56    public bool ShowContentInViewHost {
     57      get { return this.showContentInViewHost; }
     58      set { this.showContentInViewHost = value; }
    5859    }
    5960
     
    8889    public IEnumerable<IView> Views {
    8990      get { return views.Keys; }
    90     }
    91     protected void AddViewFormCombination(IView view, Form form) {
    92       this.views.Add(view, form);
    93       view.Changed += new EventHandler(View_Changed);
    9491    }
    9592
     
    216213
    217214    internal Form GetForm(IView view) {
    218       IView internalView = GetView(view);
    219       if (internalView != null && views.ContainsKey(internalView))
    220         return views[internalView];
     215      if (views.ContainsKey(view))
     216        return views[view];
    221217      return null;
    222218    }
     
    224220      return views.Where(x => x.Value == form).Single().Key;
    225221    }
    226     private IView GetView(IView view) {
    227       if (view == null || views.ContainsKey(view))
    228         return view;
    229       IContentView contentView = view as IContentView;
    230       if (contentView != null) {
    231         IView viewHost =
    232           (from ViewHost v in views.Keys.OfType<ViewHost>()
    233            where v.Views.Contains(contentView)
    234            select v).SingleOrDefault();
    235         return viewHost;
    236       }
    237       return contentView;
     222
     223    public IContentView ShowContent(IContent content) {
     224      IContentView view;
     225      if (this.ShowContentInViewHost)
     226        view = new ViewHost();
     227      else
     228        view = MainFormManager.CreateDefaultView(content.GetType());
     229
     230      if (view != null) {
     231        view.Show();
     232        view.Content = content;
     233      }
     234      return view;
    238235    }
    239236
     
    243240        Form form = GetForm(view);
    244241        bool firstTimeShown = form == null;
    245         if (form == null) {
     242        if (firstTimeShown) {
    246243          form = CreateForm(view);
    247244          form.Activated += new EventHandler(FormActivated);
    248245          form.FormClosed += new FormClosedEventHandler(ChildFormClosed);
    249         }
    250         IView internalView = GetView(form);
    251         this.ShowView(internalView, firstTimeShown);
    252         this.OnViewShown(internalView, firstTimeShown);
     246          view.Changed += new EventHandler(View_Changed);
     247          views[view] = form;
     248        }
     249        this.ShowView(view, firstTimeShown);
     250        this.OnViewShown(view, firstTimeShown);
    253251      }
    254252    }
     
    267265      if (InvokeRequired) Invoke((Action<IView>)HideView, view);
    268266      else {
    269         IView internalView = this.GetView(view);
    270         if (internalView != null && this.views.ContainsKey(internalView)) {
    271           this.Hide(internalView);
    272           if (this.activeView == internalView)
    273             this.ActiveView = null;
    274           this.OnViewHidden(internalView);
    275         }
     267        this.Hide(view);
     268        if (this.activeView == view)
     269          this.ActiveView = null;
     270        this.OnViewHidden(view);
    276271      }
    277272    }
     
    296291    internal void CloseView(IView view) {
    297292      if (InvokeRequired) Invoke((Action<IView>)CloseView, view);
    298       else {
    299         IView internalView = GetView(view);
    300         if (internalView != null && this.views.ContainsKey(internalView)) {
    301           this.views[internalView].Close();
    302           this.OnViewClosed(internalView);
    303         }
     293      else if (views.ContainsKey(view)) {
     294        this.views[view].Close();
     295        this.OnViewClosed(view);
    304296      }
    305297    }
     
    307299    internal void CloseView(IView view, CloseReason closeReason) {
    308300      if (InvokeRequired) Invoke((Action<IView>)CloseView, view);
    309       else {
    310         IView internalView = GetView(view);
    311         if (internalView != null && this.views.ContainsKey(internalView)) {
    312           ((View)internalView).CloseReason = closeReason;
    313           this.CloseView(internalView);
    314         }
     301      else if (views.ContainsKey(view)) {
     302        ((View)view).CloseReason = closeReason;
     303        this.CloseView(view);
    315304      }
    316305    }
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MultipleDocumentMainForm.cs

    r3437 r3557  
    3939      InitializeComponent();
    4040    }
    41     public MultipleDocumentMainForm(Type userInterfaceItemType, bool showViewsInViewHost)
     41    public MultipleDocumentMainForm(Type userInterfaceItemType, bool showContentInViewHost)
    4242      : this(userInterfaceItemType) {
    43       this.ShowViewsInViewHost = showViewsInViewHost;
     43      this.ShowContentInViewHost = showContentInViewHost;
    4444    }
    4545
     
    7676
    7777    protected override Form CreateForm(IView view) {
    78       Form form;
    79       IContentView contentView = view as IContentView;
    80       if (ShowViewsInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) {
    81         ViewHost viewHost = new ViewHost(contentView);
    82         form = new DocumentForm(viewHost);
    83         this.AddViewFormCombination(viewHost, form);
    84       } else {
    85         form = new DocumentForm(view);
    86         this.AddViewFormCombination(view, form);
    87       }
    88 
     78      Form form = new DocumentForm(view);
    8979      form.MdiParent = this;
    9080      return form;
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SingleDocumentMainForm.cs

    r3437 r3557  
    4040      InitializeComponent();
    4141    }
    42     public SingleDocumentMainForm(Type userInterfaceItemType, bool showViewsInViewHost)
     42    public SingleDocumentMainForm(Type userInterfaceItemType, bool showContentInViewHost)
    4343      : this(userInterfaceItemType) {
    44       this.ShowViewsInViewHost = showViewsInViewHost;
     44      this.ShowContentInViewHost = showContentInViewHost;
    4545    }
    4646
     
    7070
    7171    protected override Form CreateForm(IView view) {
    72       Form form;
    73       IContentView contentView = view as IContentView;
    74       if (ShowViewsInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) {
    75         ViewHost viewHost = new ViewHost(contentView);
    76         form = new DocumentForm(viewHost);
    77         this.AddViewFormCombination(viewHost, form);
    78       } else {
    79         form = new DocumentForm(view);
    80         this.AddViewFormCombination(view, form);
    81       }
    82 
     72      Form form = new DocumentForm(view);
    8373      form.ShowInTaskbar = true;
    8474      return form;
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/View.cs

    r3437 r3557  
    3535      this.closeReason = CloseReason.None;
    3636      this.readOnly = false;
    37     }
    38 
    39     public View(bool readOnly)
    40       : this() {
    41       this.readOnly = readOnly;
    4237    }
    4338
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs

    r3552 r3557  
    2828
    2929namespace HeuristicLab.MainForm.WindowsForms {
    30   [Content(typeof(object))]
     30  [Content(typeof(IContent))]
    3131  public sealed partial class ViewHost : AsynchronousContentView {
    3232    public ViewHost() {
     
    3939      Content = null;
    4040      OnContentChanged();
    41     }
    42     public ViewHost(IContent content)
    43       : this() {
    44       this.Content = content;
    45     }
    46 
    47     public ViewHost(IContentView contentView)
    48       : this() {
    49       this.viewType = contentView.GetType();
    50       this.Content = contentView.Content;
    51       this.cachedViews.Add(contentView.GetType(), contentView);
    52       this.activeView = contentView;
    53       this.RegisterActiveViewEvents();
    54       this.OnViewTypeChanged();
    55       this.ActiveViewChanged();
    5641    }
    5742
     
    117102    }
    118103
    119 
    120 
    121104    protected override void OnContentChanged() {
    122105      messageLabel.Visible = false;
     
    133116        }
    134117
    135 
    136118        if (!ViewCanShowContent(viewType, Content)) {
    137119          ViewType = MainFormManager.GetDefaultViewType(Content.GetType());
     
    148130      }
    149131    }
    150 
    151132
    152133    private void OnViewTypeChanged() {
     
    176157    }
    177158
    178 
    179 
    180159    private void RegisterActiveViewEvents() {
    181160      activeView.Changed += new EventHandler(activeView_Changed);
     
    256235
    257236    private void viewsLabel_DoubleClick(object sender, EventArgs e) {
    258       IContentView view = MainFormManager.CreateView(viewType, Content);
     237      IContentView view = MainFormManager.MainForm.ShowContent(this.Content);
    259238      view.ReadOnly = this.ReadOnly;
    260239      view.Locked = this.Locked;
    261       view.Show();
    262240    }
    263241    private void viewContextMenuStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e) {
  • trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMainForm.cs

    r3437 r3557  
    2626using System.Drawing;
    2727using System.ComponentModel;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.MainForm {
     
    4142    event EventHandler<ViewEventArgs> ViewHidden;
    4243
     44    IContentView ShowContent(IContent content);
     45
    4346    Type UserInterfaceItemType { get; }
    4447    void CloseAllViews();
  • trunk/sources/HeuristicLab.MainForm/3.3/MainFormManager.cs

    r3437 r3557  
    105105    }
    106106
    107     public static bool ViewCanViewObject(IContentView view, IContent content) {
     107    public static bool ViewCanViewContent(IContentView view, IContent content) {
    108108      return ContentAttribute.CanViewType(view.GetType(), content.GetType());
    109109    }
     
    145145    }
    146146
    147     public static IContentView CreateDefaultView(object content) {
    148       Type t = GetDefaultViewType(content.GetType());
     147    public static IContentView CreateDefaultView(Type contentType) {
     148      CheckForContentType(contentType);
     149      Type t = GetDefaultViewType(contentType);
    149150      if (t == null)
    150151        return null;
    151152
    152       return (IContentView)Activator.CreateInstance(t, content);
     153      return (IContentView)Activator.CreateInstance(t);
    153154    }
    154155    public static IContentView CreateView(Type viewType) {
    155       if (!typeof(IView).IsAssignableFrom(viewType))
    156         throw new ArgumentException("View can not be created becaues given type " + viewType.ToString() + " is not of type IView.");
     156      CheckForContentViewType(viewType);
    157157      if (viewType.IsGenericTypeDefinition)
    158158        throw new ArgumentException("View can not be created becaues given type " + viewType.ToString() + " is a generic type definition.");
    159159
    160160      return (IContentView)Activator.CreateInstance(viewType);
    161     }
    162     public static IContentView CreateView(Type viewType, object content) {
    163       CheckForContentType(content.GetType());
    164       CheckForContentViewType(viewType);
    165 
    166       Type view = viewType;
    167       if (view.IsGenericTypeDefinition)
    168         view = TransformGenericTypeDefinition(view, content.GetType());
    169 
    170       return (IContentView)Activator.CreateInstance(view, content);
    171161    }
    172162
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorGraphView.cs

    r3556 r3557  
    157157          if (shapeInfo != null) {
    158158            IOperator op = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo);
    159             IContentView view = MainFormManager.CreateDefaultView(op);
     159            IContentView view = MainFormManager.MainForm.ShowContent(op);
    160160            if (view != null) {
    161161              view.ReadOnly = this.ReadOnly;
    162162              view.Locked = this.Locked;
    163               view.Show();
    164163            }
    165164            HandledMouseEventArgs eventArgs = e as HandledMouseEventArgs;
     
    197196      if (shapeInfo != null) {
    198197        IOperator op = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo);
    199         IContentView view = MainFormManager.CreateDefaultView(op);
    200         view.ReadOnly = this.ReadOnly;
    201         view.Locked = this.Locked;
    202         view.Show();
     198        IContentView view = MainFormManager.MainForm.ShowContent(op);
     199        if (view != null) {
     200          view.ReadOnly = this.ReadOnly;
     201          view.Locked = this.Locked;
     202        }
    203203      }
    204204    }
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.cs

    r3455 r3557  
    153153
    154154    protected virtual void createUserDefinedAlgorithmButton_Click(object sender, EventArgs e) {
    155       IContentView view = MainFormManager.CreateDefaultView(Content.CreateUserDefinedAlgorithm());
     155      IContentView view = MainFormManager.MainForm.ShowContent(Content.CreateUserDefinedAlgorithm());
    156156      if (view != null) {
    157157        view.ReadOnly = this.ReadOnly;
    158158        view.Locked = this.Locked;
    159         view.Show();
    160159      }
    161160    }
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs

    r3546 r3557  
    289289        IRun run = (IRun)((DataPoint)h.Object).Tag;
    290290        if (e.Clicks >= 2) {
    291           IContentView view = MainFormManager.CreateDefaultView(run);
    292           view.ReadOnly = this.ReadOnly;
    293           view.Locked = this.Locked;
    294           view.Show();
     291          IContentView view = MainFormManager.MainForm.ShowContent(run);
     292          if (view != null) {
     293            view.ReadOnly = this.ReadOnly;
     294            view.Locked = this.Locked;
     295          }
    295296        } else
    296297          this.draggedRun = run;
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTabularView.cs

    r3546 r3557  
    102102      if (e.RowIndex >= 0) {
    103103        IRun run = Content.ElementAt(virtualRowIndizes[e.RowIndex]);
    104         IContentView view = MainFormManager.CreateDefaultView(run);
     104        IContentView view = MainFormManager.MainForm.ShowContent(run);
    105105        if (view != null) {
    106106          view.ReadOnly = this.ReadOnly;
    107107          view.Locked = this.Locked;
    108           view.Show();
    109108        }
    110109      }
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs

    r3526 r3557  
    195195      if (itemsListView.SelectedItems.Count == 1) {
    196196        IRun item = (IRun)itemsListView.SelectedItems[0].Tag;
    197         IContentView view = MainFormManager.CreateDefaultView(item);
     197        IContentView view = MainFormManager.MainForm.ShowContent(item);
    198198        if (view != null) {
    199199          view.ReadOnly = ReadOnly;
    200200          view.Locked = Locked;
    201           view.Show();
    202201        }
    203202      }
     
    242241    protected virtual void menuItem_Click(object sender, EventArgs e) {
    243242      ToolStripMenuItem menuItem = (ToolStripMenuItem)sender;
    244       IContentView view = MainFormManager.CreateView((Type)menuItem.Tag, Content);
     243      IContentView view = MainFormManager.CreateView((Type)menuItem.Tag);
    245244      if (view != null) {
    246245        view.Locked = Locked;
    247246        view.ReadOnly = ReadOnly;
    248247        view.Show();
     248        view.Content = Content;
    249249      }
    250250    }
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunView.cs

    r3506 r3557  
    119119      if (listView.SelectedItems.Count == 1) {
    120120        viewHost.ViewType = null;
    121         viewHost.Content = (IContent) listView.SelectedItems[0].Tag;
     121        viewHost.Content = (IContent)listView.SelectedItems[0].Tag;
    122122      } else {
    123123        viewHost.Content = null;
     
    127127      if (listView.SelectedItems.Count == 1) {
    128128        IItem item = (IItem)listView.SelectedItems[0].Tag;
    129         IContentView view = MainFormManager.CreateDefaultView(item);
     129        IContentView view = MainFormManager.MainForm.ShowContent(item);
    130130        if (view != null) {
    131131          view.ReadOnly = ReadOnly;
    132132          view.Locked = Locked;
    133           view.Show();
    134133        }
    135134      }
     
    147146    private void showAlgorithmButton_Click(object sender, EventArgs e) {
    148147      if (!Locked) {
    149         IContentView view = MainFormManager.CreateDefaultView(Content.Algorithm.Clone());
    150         if (view != null) {
    151           view.Show();
    152         }
     148        MainFormManager.MainForm.ShowContent((IContent)Content.Algorithm.Clone());
    153149      }
    154150    }
  • trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs

    r3500 r3557  
    4242      if (newItemDialog == null) newItemDialog = new NewItemDialog();
    4343      if (newItemDialog.ShowDialog() == DialogResult.OK) {
    44         IView view = MainFormManager.CreateDefaultView(newItemDialog.Item);
     44        IView view = MainFormManager.MainForm.ShowContent(newItemDialog.Item);
    4545        if (view == null) MessageBox.Show("There is no view for the new item. It cannot be displayed.", "No View Available", MessageBoxButtons.OK, MessageBoxIcon.Error);
    46         else view.Show();
    4746      }
    4847    }
     
    6968        if (error != null) throw error;
    7069        Invoke(delegate() {
    71           IView view = MainFormManager.CreateDefaultView(content);
     70          IView view = MainFormManager.MainForm.ShowContent(content);
    7271          if (view == null) MessageBox.Show("There is no view for the loaded item. It cannot be displayed.", "No View Available", MessageBoxButtons.OK, MessageBoxIcon.Error);
    73           else view.Show();
    7472        });
    7573      }
  • trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLabOptimizerPlugin.cs.frame

    r3437 r3557  
    4040    public override void Run() {
    4141      OptimizerMainForm mainForm = new OptimizerMainForm(typeof(IOptimizerUserInterfaceItemProvider));
    42       mainForm.ShowViewsInViewHost = true;
     42      mainForm.ShowContentInViewHost = true;
    4343      Application.Run(mainForm);
    4444    }
  • trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerMainForm.cs

    r3483 r3557  
    5353      waitingCursors = 0;
    5454    }
    55     public OptimizerMainForm(Type userInterfaceItemType, bool showViewsInViewHost)
     55    public OptimizerMainForm(Type userInterfaceItemType, bool showContentInViewHost)
    5656      : this(userInterfaceItemType) {
    57       this.ShowViewsInViewHost = showViewsInViewHost;
     57      this.ShowContentInViewHost = showContentInViewHost;
    5858    }
    5959
  • trunk/sources/HeuristicLab.Optimizer/3.3/StartPage.cs

    r3376 r3557  
    118118    private void samplesListView_DoubleClick(object sender, EventArgs e) {
    119119      if (samplesListView.SelectedItems.Count == 1)
    120         MainFormManager.CreateDefaultView(((IItem)samplesListView.SelectedItems[0].Tag).Clone()).Show();
     120        MainFormManager.MainForm.ShowContent((IContent)((IItem)samplesListView.SelectedItems[0].Tag).Clone());
    121121    }
    122122    private void samplesListView_ItemDrag(object sender, ItemDragEventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.