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 |
|
---|
11 | namespace HeuristicLab.MainForm.Test {
|
---|
12 | [DefaultView]
|
---|
13 | public partial class EditorView : ViewBase<object>,IView<string> {
|
---|
14 | public EditorView() {
|
---|
15 | InitializeComponent();
|
---|
16 | }
|
---|
17 |
|
---|
18 | private void ChangeStateButton_Click(object sender, EventArgs e) {
|
---|
19 | IEnumerable<Type> views = MainFormManager.GetViewTypes(typeof(string));
|
---|
20 | views.ToString();
|
---|
21 | IEnumerable<Type> views1 = MainFormManager.GetViewTypes(typeof(object));
|
---|
22 | views1.ToString();
|
---|
23 | Type def1 = MainFormManager.GetDefaultViewType(typeof(string));
|
---|
24 | def1.ToString();
|
---|
25 | Type def2 = MainFormManager.GetDefaultViewType(typeof(object));
|
---|
26 | def2.ToString();
|
---|
27 |
|
---|
28 | IView<string> v = MainFormManager.CreateDefaultView<string>("x");
|
---|
29 | v.Caption = "lala";
|
---|
30 |
|
---|
31 | this.OnChanged();
|
---|
32 | }
|
---|
33 |
|
---|
34 | public override void OnClosing(object sender, CancelEventArgs e) {
|
---|
35 | if (DialogResult.Yes != MessageBox.Show(
|
---|
36 | "Recent changes have not been saved. Close the editor anyway?", "Close editor?",
|
---|
37 | MessageBoxButtons.YesNo, MessageBoxIcon.Question,
|
---|
38 | MessageBoxDefaultButton.Button2)) {
|
---|
39 |
|
---|
40 | e.Cancel = true;
|
---|
41 |
|
---|
42 | }
|
---|
43 | }
|
---|
44 |
|
---|
45 | #region IView<string> Members
|
---|
46 |
|
---|
47 | public void View(string item) {
|
---|
48 | throw new NotImplementedException();
|
---|
49 | }
|
---|
50 |
|
---|
51 | #endregion
|
---|
52 | }
|
---|
53 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.