Free cookie consent management tool by TermsFeed Policy Generator

source: misc/tools/Templates/HeuristicLabViewTemplate/DefaultView.cs @ 16342

Last change on this file since 16342 was 5704, checked in by abeham, 14 years ago

#567

  • Added item template
  • Adapted problem template
  • Enabled tab key to continue editing the next column in the grid
File size: 2.3 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-$year$ Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using System.Windows.Forms;
24using HeuristicLab.Core.Views;
25using HeuristicLab.MainForm;
26using HeuristicLab.MainForm.WindowsForms;
27
28namespace $rootnamespace$ {
29  [View("$viewName$")]
30  [Content(typeof($contentType$), IsDefaultView = $defaultView$)]
31  public partial class $safeitemname$ : ItemView {
32    public new $contentType$ Content {
33      get { return ($contentType$)base.Content; }
34      set { base.Content = value; }
35    }
36
37    public $safeitemname$() {
38      InitializeComponent();
39    }
40
41    #region Register Content Events
42    protected override void DeregisterContentEvents() {
43      // TODO: Deregister your event handlers on the Content here
44      base.DeregisterContentEvents();
45    }
46    protected override void RegisterContentEvents() {
47      base.RegisterContentEvents();
48      // TODO: Register your event handlers on the Content here
49    }
50    #endregion
51
52    protected override void OnContentChanged() {
53      base.OnContentChanged();
54      if (Content == null) {
55        // TODO: Put code here when content is null
56      } else {
57        // TODO: Put code here when content has been changed and is not null
58      }
59    }
60
61    protected override void SetEnabledStateOfControls() {
62      base.SetEnabledStateOfControls();
63      // TODO: Put code here to enable or disable controls based on whether the Content is/not null or the view is ReadOnly
64    }
65   
66    #region Event Handlers
67    // TODO: Put event handlers here
68    #endregion
69  }
70}
Note: See TracBrowser for help on using the repository browser.