Free cookie consent management tool by TermsFeed Policy Generator

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

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

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

File size: 2.0 KB
RevLine 
[2250]1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Drawing;
5using System.Data;
6using System.Linq;
7using System.Text;
[2458]8using HeuristicLab.MainForm.WindowsForms;
9using System.Collections;
[2696]10using System.Windows.Forms;
[2250]11
12namespace HeuristicLab.MainForm.Test {
[2696]13  [Content(typeof(ArrayList), IsDefaultView = true)]
14  public partial class EditorView : HeuristicLab.MainForm.WindowsForms.View {
[2466]15    public EditorView()
16      : base() {
[2250]17      InitializeComponent();
18    }
19
[2466]20    public EditorView(ArrayList list)
21      : this() {
22    }
23
[2458]24    private void ChangeStateButton_Click(object sender, EventArgs e) {
25      IEnumerable<Type> views = MainFormManager.GetViewTypes(typeof(ArrayList));
26      views.ToString();
[2696]27      IEnumerable<Type> views1 = MainFormManager.GetViewTypes(typeof(List<string>));
[2458]28      views1.ToString();
[2696]29      IEnumerable<Type> views2 = MainFormManager.GetViewTypes(typeof(List<>));
[2466]30      views2.ToString();
[2696]31      IEnumerable<Type> views3 = MainFormManager.GetViewTypes(typeof(ICollection<>));
32      views3.ToString();
[2254]33
[2706]34      List<HeuristicLab.MainForm.WindowsForms.MenuItem> ilist = new List<HeuristicLab.MainForm.WindowsForms.MenuItem>();
[2696]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();
[2458]42      this.OnChanged();
[2254]43    }
[2266]44
[2696]45    protected override void OnClosing(FormClosingEventArgs e) {
[2266]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    }
[2696]55
56    private void EditorView_VisibleChanged(object sender, EventArgs e) {
57      MainFormManager.MainForm.Title = "visible: " + this.Visible;
58    }
[2250]59  }
60}
Note: See TracBrowser for help on using the repository browser.