Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.ComponentModel;
|
---|
4 | using System.Drawing;
|
---|
5 | using System.Data;
|
---|
6 | using System.Linq;
|
---|
7 | using System.Text;
|
---|
8 | using System.Windows.Forms;
|
---|
9 | using HeuristicLab.MainForm.WindowsForms;
|
---|
10 | using System.Collections;
|
---|
11 |
|
---|
12 | namespace HeuristicLab.MainForm.Test {
|
---|
13 | [DefaultView]
|
---|
14 | public partial class EditorView : ViewBase<ArrayList> {
|
---|
15 | public EditorView() {
|
---|
16 | InitializeComponent();
|
---|
17 | }
|
---|
18 |
|
---|
19 | private void ChangeStateButton_Click(object sender, EventArgs e) {
|
---|
20 | IEnumerable<Type> views = MainFormManager.GetViewTypes(typeof(ArrayList));
|
---|
21 | views.ToString();
|
---|
22 | IEnumerable<Type> views1 = MainFormManager.GetViewTypes(typeof(IList));
|
---|
23 | 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();
|
---|
32 |
|
---|
33 | MainFormManager.MainForm.HideView(this);
|
---|
34 | this.OnChanged();
|
---|
35 | }
|
---|
36 |
|
---|
37 | public override void OnClosing(object sender, CancelEventArgs e) {
|
---|
38 | if (DialogResult.Yes != MessageBox.Show(
|
---|
39 | "Recent changes have not been saved. Close the editor anyway?", "Close editor?",
|
---|
40 | MessageBoxButtons.YesNo, MessageBoxIcon.Question,
|
---|
41 | MessageBoxDefaultButton.Button2)) {
|
---|
42 |
|
---|
43 | e.Cancel = true;
|
---|
44 |
|
---|
45 | }
|
---|
46 | }
|
---|
47 | }
|
---|
48 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.