Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/04/09 17:16:39 (14 years ago)
Author:
mkommend
Message:

implemented ContentAttribute and adapted MainFormManager (ticket #771)

Location:
trunk/sources/HeuristicLab.MainForm.Test/3.2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm.Test/3.2/EditorView.cs

    r2464 r2466  
    1111
    1212namespace HeuristicLab.MainForm.Test {
    13   [DefaultViewAttribute]
    14   public partial class EditorView : ViewBase, IView<ArrayList> {
    15     public EditorView() {
     13  [Content(typeof(ArrayList),IsDefaultView=true)]
     14  public partial class EditorView : ViewBase {
     15    public EditorView()
     16      : base() {
    1617      InitializeComponent();
     18    }
     19
     20    public EditorView(ArrayList list)
     21      : this() {
    1722    }
    1823
     
    2227      IEnumerable<Type> views1 = MainFormManager.GetViewTypes(typeof(IList));
    2328      views1.ToString();
    24       //IEnumerable<Type> views2 = MainFormManager.GetViewTypes(typeof(object));
    25       //views2.ToString();
    26       Type def2 = MainFormManager.GetDefaultViewType(typeof(IList));
    27       def2.ToString();
    28       Type def1 = MainFormManager.GetDefaultViewType(typeof(ArrayList));
    29       def1.ToString();
    30       //Type def3 = MainFormManager.GetDefaultViewType(typeof(object));
    31       //def3.ToString();
     29      IEnumerable<Type> views2 = MainFormManager.GetViewTypes(typeof(IEnumerable));
     30      views2.ToString();
    3231
    33       MainFormManager.MainForm.HideView(this);
     32      ArrayList list = new ArrayList();
     33      IView defaultView = MainFormManager.CreateDefaultView(list);
     34      MainFormManager.MainForm.ShowView(defaultView);
    3435      this.OnChanged();
    3536    }
     
    4546      }
    4647    }
    47 
    48     #region IView<ArrayList> Members
    49 
    50     public void View(ArrayList item) {
    51       throw new NotImplementedException();
    52     }
    53 
    54     public ArrayList Item {
    55       get { throw new NotImplementedException(); }
    56     }
    57 
    58     #endregion
    5948  }
    6049}
  • trunk/sources/HeuristicLab.MainForm.Test/3.2/FormView.cs

    r2464 r2466  
    1111
    1212namespace HeuristicLab.MainForm.Test {
    13   [DefaultViewAttribute]
    14   public partial class FormView1 : ViewBase,IView<ICollection> {
    15     private int[] array;
     13  [Content(typeof(IList),true)]
     14  public partial class FormView1 : FormView2 {
    1615    public FormView1() {
    1716      InitializeComponent();
    1817    }
    19 
    20     #region IView<ICollection> Members
    21 
    22     public void View(ICollection item) {
    23       throw new NotImplementedException();
    24     }
    25 
    26     public ICollection Item {
    27       get { throw new NotImplementedException(); }
    28     }
    29 
    30     #endregion
    3118  }
    3219}
  • trunk/sources/HeuristicLab.MainForm.Test/3.2/FormView2.cs

    r2464 r2466  
    1010
    1111namespace HeuristicLab.MainForm.Test {
    12   public partial class FormView2 : ViewBase, IView<IEnumerable> {
    13     private int[] array;
     12  [Content(typeof(IEnumerable))]
     13  public partial class FormView2 : ViewBase {
    1414    public FormView2() {
    1515      InitializeComponent();
    1616    }
    17 
    18     #region IView<IEnumerable> Members
    19 
    20     public void View(IEnumerable item) {
    21       throw new NotImplementedException();
    22     }
    23 
    24     public IEnumerable Item {
    25       get { throw new NotImplementedException(); }
    26     }
    27 
    28     #endregion
    2917  }
    3018}
Note: See TracChangeset for help on using the changeset viewer.