Changeset 2696 for trunk/sources/HeuristicLab.MainForm.Test/3.2
- Timestamp:
- 01/28/10 16:15:21 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.MainForm.Test/3.2
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.Test/3.2/Actions/NewEditorAction.cs
r2636 r2696 11 11 EditorView view = new EditorView(); 12 12 view.Caption = "Editor View " + mainform.Views.Count(); 13 mainform.ShowView(view);13 view.Show(); 14 14 } 15 15 } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/Actions/NewFormAction.cs
r2458 r2696 10 10 FormView1 x = new FormView1(); 11 11 x.Caption = "FormView"; 12 mainform.ShowView(x);12 x.Show(); 13 13 } 14 14 } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/ButtonItems/NewEditorToolStripButtonItem.cs
r2458 r2696 6 6 7 7 namespace HeuristicLab.MainForm.Test { 8 public class NewEditorToolStripButtonItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem Base, ITestUserInterfaceItemProvider {8 public class NewEditorToolStripButtonItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem, ITestUserInterfaceItemProvider { 9 9 public override int Position { 10 10 get { return 12; } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/ButtonItems/NewFormToolStripButtonItem.cs
r2458 r2696 6 6 7 7 namespace HeuristicLab.MainForm.Test { 8 public class NewFormToolStripButtonItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem Base, ITestUserInterfaceItemProvider {8 public class NewFormToolStripButtonItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem, ITestUserInterfaceItemProvider { 9 9 public override int Position { 10 10 get { return 11; } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/ButtonItems/NewToolStripButtonItem.cs
r2458 r2696 6 6 7 7 namespace HeuristicLab.MainForm.Test { 8 public class NewToolStripButtonItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem Base, ITestUserInterfaceItemProvider {8 public class NewToolStripButtonItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem, ITestUserInterfaceItemProvider { 9 9 public override int Position { 10 10 get { return 10; } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/ButtonItems/OpenToolStripButtonItem.cs
r2636 r2696 6 6 7 7 namespace HeuristicLab.MainForm.Test { 8 public class OpenToolStripButtonItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, ITestUserInterfaceItemProvider { 8 public class OpenToolStripButtonItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem, ITestUserInterfaceItemProvider { 9 10 public OpenToolStripButtonItem() 11 : base() { 12 System.Console.Out.Write("test"); 13 } 9 14 public override int Position { 10 15 get { return 20; } … … 23 28 } 24 29 25 p ublic override voidActiveViewChanged(object sender, EventArgs e) {30 protected override void OnActiveViewChanged(object sender, EventArgs e) { 26 31 this.ToolStripItem.Enabled = !this.ToolStripItem.Enabled; 27 MainFormManager.MainForm.Title =28 MainFormManager.MainForm.ActiveView == null ? "null" : MainFormManager.MainForm.ActiveView.Caption;32 //MainFormManager.MainForm.Title = 33 // MainFormManager.MainForm.ActiveView == null ? "null" : MainFormManager.MainForm.ActiveView.Caption; 29 34 } 30 35 } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/ButtonItems/SaveToolStripButtonItem.cs
r2458 r2696 6 6 7 7 namespace HeuristicLab.MainForm.Test { 8 public class SaveToolStripButtonItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem Base, ITestUserInterfaceItemProvider {8 public class SaveToolStripButtonItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem, ITestUserInterfaceItemProvider { 9 9 public override int Position { 10 10 get { return 30; } … … 23 23 } 24 24 25 p ublic override voidActiveViewChanged(object sender, EventArgs e) {25 protected override void OnActiveViewChanged(object sender, EventArgs e) { 26 26 IMainForm mainform = MainFormManager.MainForm; 27 27 if (mainform.ActiveView == null) … … 31 31 } 32 32 33 p ublic override voidViewChanged(object sender, EventArgs e) {33 protected override void OnViewChanged(object sender, EventArgs e) { 34 34 this.ToolStripItem.Enabled = !this.ToolStripItem.Enabled; 35 35 } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/ButtonItems/SeparatorToolStripButtonItem.cs
r2514 r2696 6 6 7 7 namespace HeuristicLab.MainForm.Test { 8 public class SeparatorToolStripButtonItem : ToolBarSeparatorItem Base, ITestUserInterfaceItemProvider {8 public class SeparatorToolStripButtonItem : ToolBarSeparatorItem, ITestUserInterfaceItemProvider { 9 9 public override int Position { 10 10 get { return 15; } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/EditorView.Designer.cs
r2254 r2696 56 56 this.ForeColor = System.Drawing.SystemColors.ControlText; 57 57 this.Name = "EditorView"; 58 this.VisibleChanged += new System.EventHandler(this.EditorView_VisibleChanged); 58 59 this.ResumeLayout(false); 59 60 this.PerformLayout(); -
trunk/sources/HeuristicLab.MainForm.Test/3.2/EditorView.cs
r2466 r2696 6 6 using System.Linq; 7 7 using System.Text; 8 using System.Windows.Forms;9 8 using HeuristicLab.MainForm.WindowsForms; 10 9 using System.Collections; 10 using System.Windows.Forms; 11 11 12 12 namespace HeuristicLab.MainForm.Test { 13 [Content(typeof(ArrayList), IsDefaultView=true)]14 public partial class EditorView : ViewBase{13 [Content(typeof(ArrayList), IsDefaultView = true)] 14 public partial class EditorView : HeuristicLab.MainForm.WindowsForms.View { 15 15 public EditorView() 16 16 : base() { … … 25 25 IEnumerable<Type> views = MainFormManager.GetViewTypes(typeof(ArrayList)); 26 26 views.ToString(); 27 IEnumerable<Type> views1 = MainFormManager.GetViewTypes(typeof( IList));27 IEnumerable<Type> views1 = MainFormManager.GetViewTypes(typeof(List<string>)); 28 28 views1.ToString(); 29 IEnumerable<Type> views2 = MainFormManager.GetViewTypes(typeof( IEnumerable));29 IEnumerable<Type> views2 = MainFormManager.GetViewTypes(typeof(List<>)); 30 30 views2.ToString(); 31 IEnumerable<Type> views3 = MainFormManager.GetViewTypes(typeof(ICollection<>)); 32 views3.ToString(); 31 33 32 ArrayList list = new ArrayList(); 33 IView defaultView = MainFormManager.CreateDefaultView(list); 34 MainFormManager.MainForm.ShowView(defaultView); 34 List<MenuItem> ilist = new List<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(); 35 42 this.OnChanged(); 36 43 } 37 44 38 p ublic override void OnClosing(object sender, CancelEventArgs e) {45 protected override void OnClosing(FormClosingEventArgs e) { 39 46 if (DialogResult.Yes != MessageBox.Show( 40 47 "Recent changes have not been saved. Close the editor anyway?", "Close editor?", … … 46 53 } 47 54 } 55 56 private void EditorView_VisibleChanged(object sender, EventArgs e) { 57 MainFormManager.MainForm.Title = "visible: " + this.Visible; 58 } 48 59 } 49 60 } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/FormView.cs
r2466 r2696 11 11 12 12 namespace HeuristicLab.MainForm.Test { 13 [Content(typeof( IList),true)]14 public partial class FormView1 : FormView2 {13 [Content(typeof(List<string>), true)] 14 public partial class FormView1 : FormView2<MenuItem> { 15 15 public FormView1() { 16 16 InitializeComponent(); 17 17 } 18 19 public FormView1(List<string> list) 20 : this() { 21 } 18 22 } 19 23 } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/FormView2.Designer.cs
r2458 r2696 1 1 namespace HeuristicLab.MainForm.Test { 2 partial class FormView2 {2 partial class FormView2<T> { 3 3 /// <summary> 4 4 /// Required designer variable. -
trunk/sources/HeuristicLab.MainForm.Test/3.2/FormView2.cs
r2466 r2696 1 1 using System; 2 using System.Collections ;2 using System.Collections.Generic; 3 3 using System.ComponentModel; 4 4 using System.Drawing; … … 6 6 using System.Linq; 7 7 using System.Text; 8 using System.Windows.Forms;9 8 using HeuristicLab.MainForm.WindowsForms; 10 9 11 10 namespace HeuristicLab.MainForm.Test { 12 [Content(typeof(I Enumerable))]13 public partial class FormView2 : ViewBase{11 [Content(typeof(ICollection<>),true)] 12 public partial class FormView2<T> : View where T: IMenuItem { 14 13 public FormView2() { 14 InitializeComponent(); 15 } 16 public FormView2(ICollection<T> x) { 15 17 InitializeComponent(); 16 18 } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/MenuItems/ExitToolStripMenuItem.cs
r2458 r2696 9 9 10 10 namespace HeuristicLab.MainForm.Test { 11 public class CloseToolStripMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem Base, ITestUserInterfaceItemProvider {11 public class CloseToolStripMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, ITestUserInterfaceItemProvider { 12 12 public override string Name { 13 13 get { return "Exit"; } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/MenuItems/NewEditorToolStripMenuItem.cs
r2458 r2696 9 9 10 10 namespace HeuristicLab.MainForm.Test { 11 public class NewEditorToolStripMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem Base, ITestUserInterfaceItemProvider {11 public class NewEditorToolStripMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, ITestUserInterfaceItemProvider { 12 12 public override string Name { 13 13 get { return "Editor"; } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/MenuItems/NewFormToolStripMenuItem.cs
r2458 r2696 9 9 10 10 namespace HeuristicLab.MainForm.Test { 11 public class NewFormToolStripMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem Base, ITestUserInterfaceItemProvider {11 public class NewFormToolStripMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, ITestUserInterfaceItemProvider { 12 12 public override string Name { 13 13 get { return "Form"; } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/MenuItems/OpenToolStripMenuItem.cs
r2458 r2696 8 8 9 9 namespace HeuristicLab.MainForm.Test { 10 public class OpenToolStripMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem Base, ITestUserInterfaceItemProvider {10 public class OpenToolStripMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, ITestUserInterfaceItemProvider { 11 11 public override string Name { 12 12 get { return "Open"; } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/MenuItems/SaveToolStripMenuItem.cs
r2458 r2696 9 9 10 10 namespace HeuristicLab.MainForm.Test { 11 public class SaveToolStripMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem Base, ITestUserInterfaceItemProvider {11 public class SaveToolStripMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, ITestUserInterfaceItemProvider { 12 12 public override string Name { 13 13 get { return "Save"; } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/MenuItems/SeparatorMenuItem.cs
r2514 r2696 9 9 10 10 namespace HeuristicLab.MainForm.Test { 11 public class SeparatorMenuItem : MenuSeparatorItem Base, ITestUserInterfaceItemProvider {11 public class SeparatorMenuItem : MenuSeparatorItem, ITestUserInterfaceItemProvider { 12 12 public override IEnumerable<string> Structure { 13 13 get { return new string[] { "File" }; }
Note: See TracChangeset
for help on using the changeset viewer.