Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.MainForm.Test/3.2/EditorView.cs @ 2806

Last change on this file since 2806 was 2706, checked in by mkommend, 15 years ago

fixed compilation errors in HL3.2 solution (ticket #857)

File size: 2.0 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Drawing;
5using System.Data;
6using System.Linq;
7using System.Text;
8using HeuristicLab.MainForm.WindowsForms;
9using System.Collections;
10using System.Windows.Forms;
11
12namespace HeuristicLab.MainForm.Test {
13  [Content(typeof(ArrayList), IsDefaultView = true)]
14  public partial class EditorView : HeuristicLab.MainForm.WindowsForms.View {
15    public EditorView()
16      : base() {
17      InitializeComponent();
18    }
19
20    public EditorView(ArrayList list)
21      : this() {
22    }
23
24    private void ChangeStateButton_Click(object sender, EventArgs e) {
25      IEnumerable<Type> views = MainFormManager.GetViewTypes(typeof(ArrayList));
26      views.ToString();
27      IEnumerable<Type> views1 = MainFormManager.GetViewTypes(typeof(List<string>));
28      views1.ToString();
29      IEnumerable<Type> views2 = MainFormManager.GetViewTypes(typeof(List<>));
30      views2.ToString();
31      IEnumerable<Type> views3 = MainFormManager.GetViewTypes(typeof(ICollection<>));
32      views3.ToString();
33
34      List<HeuristicLab.MainForm.WindowsForms.MenuItem> ilist = new List<HeuristicLab.MainForm.WindowsForms.MenuItem>();
35      IView defaultView = MainFormManager.CreateDefaultView(ilist);
36      defaultView.Show();
37
38      List<object> list = new List<object>();
39      IView dView = MainFormManager.CreateDefaultView(list);
40      if (dView != null)
41        dView.Show();
42      this.OnChanged();
43    }
44
45    protected override void OnClosing(FormClosingEventArgs e) {
46      if (DialogResult.Yes != MessageBox.Show(
47             "Recent changes have not been saved. Close the editor anyway?", "Close editor?",
48              MessageBoxButtons.YesNo, MessageBoxIcon.Question,
49              MessageBoxDefaultButton.Button2)) {
50
51        e.Cancel = true;
52
53      }
54    }
55
56    private void EditorView_VisibleChanged(object sender, EventArgs e) {
57      MainFormManager.MainForm.Title = "visible: " + this.Visible;
58    }
59  }
60}
Note: See TracBrowser for help on using the repository browser.