~ubuntu-branches/debian/sid/nunit/sid

« back to all changes in this revision

Viewing changes to src/GuiComponents/UiKit/TabbedSettingsDialog.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2014-09-16 13:43:36 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140916134336-kjxz48tty6lx2ja5
Tags: 2.6.3+dfsg-1
* [c7bd1b5] Imported Upstream version 2.6.3+dfsg
* [bcb4bf8] Move nunit-console-runner to GAC-installed libnunit2.6, 
  don't treat it as a private lib. This lib is signed, and treated 
  as a GAC lib by consumers such as MonoDevelop.
* [7f08e99] Bump version to 2.6.3 as required
* [84535eb] Refreshed patches
* [8479f61] Split package up into per-assembly packages. This makes 
  ABI tracking easier in the future, as we can meaningfully have GAC 
  policy for cases where ABI isn't truly bumped, and no policy for 
  cases where it is. For example, if nunit.framework bumps ABI but 
  nunit.core does not, previously we would need to rebuild everything 
  using NUnit, but under the new split packaging, that rebuild would 
  not be needed for apps only using nunit.core.
* [17a7dc7] Add missing nunit.mocks.dll to nunit.pc

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
// ****************************************************************
6
 
using System;
7
 
using System.Collections;
8
 
using System.ComponentModel;
9
 
using System.Drawing;
10
 
using System.Windows.Forms;
11
 
 
12
 
namespace NUnit.UiKit
13
 
{
14
 
        public class TabbedSettingsDialog : NUnit.UiKit.SettingsDialogBase
15
 
        {
16
 
                protected System.Windows.Forms.TabControl tabControl1;
17
 
                private System.ComponentModel.IContainer components = null;
18
 
 
19
 
                public static void Display( Form owner, params SettingsPage[] pages )
20
 
                {
21
 
                        using( TabbedSettingsDialog dialog = new TabbedSettingsDialog() )
22
 
                        {
23
 
                                owner.Site.Container.Add( dialog );
24
 
                                dialog.Font = owner.Font;
25
 
                                dialog.SettingsPages.AddRange( pages ); 
26
 
                                dialog.ShowDialog();
27
 
                        }
28
 
                }
29
 
 
30
 
                public TabbedSettingsDialog()
31
 
                {
32
 
                        // This call is required by the Windows Form Designer.
33
 
                        InitializeComponent();
34
 
 
35
 
                        // TODO: Add any initialization after the InitializeComponent call
36
 
                }
37
 
 
38
 
                /// <summary>
39
 
                /// Clean up any resources being used.
40
 
                /// </summary>
41
 
                protected override void Dispose( bool disposing )
42
 
                {
43
 
                        if( disposing )
44
 
                        {
45
 
                                if (components != null) 
46
 
                                {
47
 
                                        components.Dispose();
48
 
                                }
49
 
                        }
50
 
                        base.Dispose( disposing );
51
 
                }
52
 
 
53
 
                #region Designer generated code
54
 
                /// <summary>
55
 
                /// Required method for Designer support - do not modify
56
 
                /// the contents of this method with the code editor.
57
 
                /// </summary>
58
 
                private void InitializeComponent()
59
 
                {
60
 
                        this.tabControl1 = new System.Windows.Forms.TabControl();
61
 
                        this.SuspendLayout();
62
 
                        // 
63
 
                        // cancelButton
64
 
                        // 
65
 
                        this.cancelButton.Location = new System.Drawing.Point(394, 392);
66
 
                        this.cancelButton.Name = "cancelButton";
67
 
                        // 
68
 
                        // okButton
69
 
                        // 
70
 
                        this.okButton.Location = new System.Drawing.Point(306, 392);
71
 
                        this.okButton.Name = "okButton";
72
 
                        // 
73
 
                        // tabControl1
74
 
                        // 
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;
84
 
                        // 
85
 
                        // TabbedSettingsDialog
86
 
                        // 
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);
95
 
 
96
 
                }
97
 
                #endregion
98
 
 
99
 
                private void TabbedSettingsDialog_Load(object sender, System.EventArgs e)
100
 
                {
101
 
                        foreach( SettingsPage page in SettingsPages )
102
 
                        {
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 );
107
 
                        }
108
 
                }
109
 
        }
110
 
}
111
 
 
 
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
// ****************************************************************
 
6
using System;
 
7
using System.Collections;
 
8
using System.ComponentModel;
 
9
using System.Drawing;
 
10
using System.Windows.Forms;
 
11
 
 
12
namespace NUnit.UiKit
 
13
{
 
14
        public class TabbedSettingsDialog : NUnit.UiKit.SettingsDialogBase
 
15
        {
 
16
                protected System.Windows.Forms.TabControl tabControl1;
 
17
                private System.ComponentModel.IContainer components = null;
 
18
 
 
19
                public static void Display( Form owner, params SettingsPage[] pages )
 
20
                {
 
21
                        using( TabbedSettingsDialog dialog = new TabbedSettingsDialog() )
 
22
                        {
 
23
                                owner.Site.Container.Add( dialog );
 
24
                                dialog.Font = owner.Font;
 
25
                                dialog.SettingsPages.AddRange( pages ); 
 
26
                                dialog.ShowDialog();
 
27
                        }
 
28
                }
 
29
 
 
30
                public TabbedSettingsDialog()
 
31
                {
 
32
                        // This call is required by the Windows Form Designer.
 
33
                        InitializeComponent();
 
34
 
 
35
                        // TODO: Add any initialization after the InitializeComponent call
 
36
                }
 
37
 
 
38
                /// <summary>
 
39
                /// Clean up any resources being used.
 
40
                /// </summary>
 
41
                protected override void Dispose( bool disposing )
 
42
                {
 
43
                        if( disposing )
 
44
                        {
 
45
                                if (components != null) 
 
46
                                {
 
47
                                        components.Dispose();
 
48
                                }
 
49
                        }
 
50
                        base.Dispose( disposing );
 
51
                }
 
52
 
 
53
                #region Designer generated code
 
54
                /// <summary>
 
55
                /// Required method for Designer support - do not modify
 
56
                /// the contents of this method with the code editor.
 
57
                /// </summary>
 
58
                private void InitializeComponent()
 
59
                {
 
60
                        this.tabControl1 = new System.Windows.Forms.TabControl();
 
61
                        this.SuspendLayout();
 
62
                        // 
 
63
                        // cancelButton
 
64
                        // 
 
65
                        this.cancelButton.Location = new System.Drawing.Point(394, 392);
 
66
                        this.cancelButton.Name = "cancelButton";
 
67
                        // 
 
68
                        // okButton
 
69
                        // 
 
70
                        this.okButton.Location = new System.Drawing.Point(306, 392);
 
71
                        this.okButton.Name = "okButton";
 
72
                        // 
 
73
                        // tabControl1
 
74
                        // 
 
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;
 
84
                        // 
 
85
                        // TabbedSettingsDialog
 
86
                        // 
 
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);
 
95
 
 
96
                }
 
97
                #endregion
 
98
 
 
99
                private void TabbedSettingsDialog_Load(object sender, System.EventArgs e)
 
100
                {
 
101
                        foreach( SettingsPage page in SettingsPages )
 
102
                        {
 
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 );
 
107
                        }
 
108
                }
 
109
        }
 
110
}
 
111