1
// ****************************************************************
2
// Copyright 2008, Charlie Poole
3
// This is free software licensed under the NUnit license. You may
4
// obtain a copy of the license at http://nunit.org
5
// ****************************************************************
7
using System.Collections;
8
using System.ComponentModel;
10
using System.Windows.Forms;
14
public class TabbedSettingsDialog : NUnit.UiKit.SettingsDialogBase
16
protected System.Windows.Forms.TabControl tabControl1;
17
private System.ComponentModel.IContainer components = null;
19
public static void Display( Form owner, params SettingsPage[] pages )
21
using( TabbedSettingsDialog dialog = new TabbedSettingsDialog() )
23
owner.Site.Container.Add( dialog );
24
dialog.Font = owner.Font;
25
dialog.SettingsPages.AddRange( pages );
30
public TabbedSettingsDialog()
32
// This call is required by the Windows Form Designer.
33
InitializeComponent();
35
// TODO: Add any initialization after the InitializeComponent call
39
/// Clean up any resources being used.
41
protected override void Dispose( bool disposing )
45
if (components != null)
50
base.Dispose( disposing );
53
#region Designer generated code
55
/// Required method for Designer support - do not modify
56
/// the contents of this method with the code editor.
58
private void InitializeComponent()
60
this.tabControl1 = new System.Windows.Forms.TabControl();
65
this.cancelButton.Location = new System.Drawing.Point(394, 392);
66
this.cancelButton.Name = "cancelButton";
70
this.okButton.Location = new System.Drawing.Point(306, 392);
71
this.okButton.Name = "okButton";
75
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
76
| System.Windows.Forms.AnchorStyles.Left)
77
| System.Windows.Forms.AnchorStyles.Right)));
78
this.tabControl1.ItemSize = new System.Drawing.Size(46, 18);
79
this.tabControl1.Location = new System.Drawing.Point(10, 8);
80
this.tabControl1.Name = "tabControl1";
81
this.tabControl1.SelectedIndex = 0;
82
this.tabControl1.Size = new System.Drawing.Size(456, 376);
83
this.tabControl1.TabIndex = 2;
85
// TabbedSettingsDialog
87
this.ClientSize = new System.Drawing.Size(474, 426);
88
this.Controls.Add(this.tabControl1);
89
this.Name = "TabbedSettingsDialog";
90
this.Load += new System.EventHandler(this.TabbedSettingsDialog_Load);
91
this.Controls.SetChildIndex(this.okButton, 0);
92
this.Controls.SetChildIndex(this.cancelButton, 0);
93
this.Controls.SetChildIndex(this.tabControl1, 0);
94
this.ResumeLayout(false);
99
private void TabbedSettingsDialog_Load(object sender, System.EventArgs e)
101
foreach( SettingsPage page in SettingsPages )
103
TabPage tabPage = new TabPage(page.Title);
104
tabPage.Controls.Add( page );
105
page.Location = new Point(0, 16);
106
this.tabControl1.TabPages.Add( tabPage );
1
// ****************************************************************
2
// Copyright 2008, Charlie Poole
3
// This is free software licensed under the NUnit license. You may
4
// obtain a copy of the license at http://nunit.org
5
// ****************************************************************
7
using System.Collections;
8
using System.ComponentModel;
10
using System.Windows.Forms;
14
public class TabbedSettingsDialog : NUnit.UiKit.SettingsDialogBase
16
protected System.Windows.Forms.TabControl tabControl1;
17
private System.ComponentModel.IContainer components = null;
19
public static void Display( Form owner, params SettingsPage[] pages )
21
using( TabbedSettingsDialog dialog = new TabbedSettingsDialog() )
23
owner.Site.Container.Add( dialog );
24
dialog.Font = owner.Font;
25
dialog.SettingsPages.AddRange( pages );
30
public TabbedSettingsDialog()
32
// This call is required by the Windows Form Designer.
33
InitializeComponent();
35
// TODO: Add any initialization after the InitializeComponent call
39
/// Clean up any resources being used.
41
protected override void Dispose( bool disposing )
45
if (components != null)
50
base.Dispose( disposing );
53
#region Designer generated code
55
/// Required method for Designer support - do not modify
56
/// the contents of this method with the code editor.
58
private void InitializeComponent()
60
this.tabControl1 = new System.Windows.Forms.TabControl();
65
this.cancelButton.Location = new System.Drawing.Point(394, 392);
66
this.cancelButton.Name = "cancelButton";
70
this.okButton.Location = new System.Drawing.Point(306, 392);
71
this.okButton.Name = "okButton";
75
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
76
| System.Windows.Forms.AnchorStyles.Left)
77
| System.Windows.Forms.AnchorStyles.Right)));
78
this.tabControl1.ItemSize = new System.Drawing.Size(46, 18);
79
this.tabControl1.Location = new System.Drawing.Point(10, 8);
80
this.tabControl1.Name = "tabControl1";
81
this.tabControl1.SelectedIndex = 0;
82
this.tabControl1.Size = new System.Drawing.Size(456, 376);
83
this.tabControl1.TabIndex = 2;
85
// TabbedSettingsDialog
87
this.ClientSize = new System.Drawing.Size(474, 426);
88
this.Controls.Add(this.tabControl1);
89
this.Name = "TabbedSettingsDialog";
90
this.Load += new System.EventHandler(this.TabbedSettingsDialog_Load);
91
this.Controls.SetChildIndex(this.okButton, 0);
92
this.Controls.SetChildIndex(this.cancelButton, 0);
93
this.Controls.SetChildIndex(this.tabControl1, 0);
94
this.ResumeLayout(false);
99
private void TabbedSettingsDialog_Load(object sender, System.EventArgs e)
101
foreach( SettingsPage page in SettingsPages )
103
TabPage tabPage = new TabPage(page.Title);
104
tabPage.Controls.Add( page );
105
page.Location = new Point(0, 16);
106
this.tabControl1.TabPages.Add( tabPage );