Last change
on this file since 2437 was
2437,
checked in by mkommend, 15 years ago
|
implemented changes regarding detection of view types and default views as discussed with SWA (ticket #771)
|
File size:
1.7 KB
|
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<IList> {
|
---|
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 | this.OnChanged();
|
---|
34 | }
|
---|
35 |
|
---|
36 | public override void OnClosing(object sender, CancelEventArgs e) {
|
---|
37 | if (DialogResult.Yes != MessageBox.Show(
|
---|
38 | "Recent changes have not been saved. Close the editor anyway?", "Close editor?",
|
---|
39 | MessageBoxButtons.YesNo, MessageBoxIcon.Question,
|
---|
40 | MessageBoxDefaultButton.Button2)) {
|
---|
41 |
|
---|
42 | e.Cancel = true;
|
---|
43 |
|
---|
44 | }
|
---|
45 | }
|
---|
46 |
|
---|
47 | #region IView<string> Members
|
---|
48 |
|
---|
49 | public void View(string item) {
|
---|
50 | throw new NotImplementedException();
|
---|
51 | }
|
---|
52 |
|
---|
53 | #endregion
|
---|
54 | }
|
---|
55 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.