Free cookie consent management tool by TermsFeed Policy Generator

Opened 14 years ago

Closed 14 years ago

#1372 closed feature request (done)

Provide ability to reuse views if the content is already displayed

Reported by: mkommend Owned by: mkommend
Priority: medium Milestone: HeuristicLab 3.3.3
Component: MainForm.WindowsForms Version: 3.3.3
Keywords: Cc:

Description

The mainform should provide a method overload of ShowContent which specifies if an existing view displaying the same content should be reused.

Change History (9)

comment:1 Changed 14 years ago by mkommend

  • Status changed from new to accepted

comment:2 Changed 14 years ago by mkommend

  • Owner changed from mkommend to abeham
  • Status changed from accepted to reviewing

Implemented ShowContent method in MainForm which reuses existing views and adapted the ClipBoard with r5270.

comment:3 Changed 14 years ago by mkommend

Corrected check in setter of ViewType in the ViewHost with r5278.

comment:4 Changed 14 years ago by abeham

  • Owner changed from abeham to swagner
  • Summary changed from Reuse views if the content is already displayed to Provide ability to reuse views if the content is already displayed

I reviewed r5270.

I made some attempts in thinking about a ShowContent<T, U> where T : class,IContent where U : class,IContentView. However that's not so easy in the case no existing view can be found. Since U can be an interface, one would be required to check for a view for the content's type which typeof(U) is also assignable from.

Anyway since the view is returned to the caller, the check can be made there if that was the required view.

I'm forwarding this to swagner for reviewing the change r5278 and the change to the Clipboard.

comment:5 follow-up: Changed 14 years ago by swagner

  • Owner changed from swagner to mkommend

I think line 113 of ViewHost in r5278 should be

if (value != null && value == typeof(ViewHost))

and not

if (value != null && value.GetType() == typeof(ViewHost))

Apart from that I agree with the changes of r5270 and r5278. Thanks.

comment:6 in reply to: ↑ 5 Changed 14 years ago by mkommend

Replying to swagner:

I think line 113 of ViewHost in r5278 should be

if (value != null && value == typeof(ViewHost))

and not

if (value != null && value.GetType() == typeof(ViewHost))

Apart from that I agree with the changes of r5270 and r5278. Thanks.

The check was corrected as suggested in r5318.

comment:7 Changed 14 years ago by mkommend

  • Owner changed from mkommend to swagner

comment:8 Changed 14 years ago by swagner

  • Owner changed from swagner to mkommend
  • Status changed from reviewing to readytorelease

comment:9 Changed 14 years ago by mkommend

  • Resolution set to done
  • Status changed from readytorelease to closed
  • Version changed from 3.3.2 to 3.3.3
Note: See TracTickets for help on using tickets.