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

« back to all changes in this revision

Viewing changes to src/GuiRunner/nunit-gui/SettingsPages/AssemblyReloadSettingsPage.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
 
using NUnit.Util;
12
 
 
13
 
namespace NUnit.Gui.SettingsPages
14
 
{
15
 
        public class AssemblyReloadSettingsPage : NUnit.UiKit.SettingsPage
16
 
        {
17
 
                private System.Windows.Forms.Label label1;
18
 
                private System.Windows.Forms.GroupBox groupBox1;
19
 
                private System.Windows.Forms.CheckBox rerunOnChangeCheckBox;
20
 
                private System.Windows.Forms.CheckBox reloadOnRunCheckBox;
21
 
                private System.Windows.Forms.CheckBox reloadOnChangeCheckBox;
22
 
                private System.Windows.Forms.HelpProvider helpProvider1;
23
 
                private System.ComponentModel.IContainer components = null;
24
 
 
25
 
                public AssemblyReloadSettingsPage(string key) : base(key)
26
 
                {
27
 
                        // This call is required by the Windows Form Designer.
28
 
                        InitializeComponent();
29
 
 
30
 
                        // TODO: Add any initialization after the InitializeComponent call
31
 
                }
32
 
 
33
 
                /// <summary>
34
 
                /// Clean up any resources being used.
35
 
                /// </summary>
36
 
                protected override void Dispose( bool disposing )
37
 
                {
38
 
                        if( disposing )
39
 
                        {
40
 
                                if (components != null) 
41
 
                                {
42
 
                                        components.Dispose();
43
 
                                }
44
 
                        }
45
 
                        base.Dispose( disposing );
46
 
                }
47
 
 
48
 
                #region Designer generated code
49
 
                /// <summary>
50
 
                /// Required method for Designer support - do not modify
51
 
                /// the contents of this method with the code editor.
52
 
                /// </summary>
53
 
                private void InitializeComponent()
54
 
                {
55
 
            this.label1 = new System.Windows.Forms.Label();
56
 
            this.groupBox1 = new System.Windows.Forms.GroupBox();
57
 
            this.rerunOnChangeCheckBox = new System.Windows.Forms.CheckBox();
58
 
            this.reloadOnRunCheckBox = new System.Windows.Forms.CheckBox();
59
 
            this.reloadOnChangeCheckBox = new System.Windows.Forms.CheckBox();
60
 
            this.helpProvider1 = new System.Windows.Forms.HelpProvider();
61
 
            this.SuspendLayout();
62
 
            // 
63
 
            // label1
64
 
            // 
65
 
            this.label1.AutoSize = true;
66
 
            this.label1.Location = new System.Drawing.Point(8, 4);
67
 
            this.label1.Name = "label1";
68
 
            this.label1.Size = new System.Drawing.Size(88, 13);
69
 
            this.label1.TabIndex = 7;
70
 
            this.label1.Text = "Assembly Reload";
71
 
            // 
72
 
            // groupBox1
73
 
            // 
74
 
            this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
75
 
                        | System.Windows.Forms.AnchorStyles.Right)));
76
 
            this.groupBox1.Location = new System.Drawing.Point(181, 4);
77
 
            this.groupBox1.Name = "groupBox1";
78
 
            this.groupBox1.Size = new System.Drawing.Size(259, 8);
79
 
            this.groupBox1.TabIndex = 6;
80
 
            this.groupBox1.TabStop = false;
81
 
            // 
82
 
            // rerunOnChangeCheckBox
83
 
            // 
84
 
            this.rerunOnChangeCheckBox.AutoSize = true;
85
 
            this.rerunOnChangeCheckBox.Enabled = false;
86
 
            this.helpProvider1.SetHelpString(this.rerunOnChangeCheckBox, "If checked, the last tests run will be re-run automatically whenever the assembly" +
87
 
                    " changes.");
88
 
            this.rerunOnChangeCheckBox.Location = new System.Drawing.Point(48, 96);
89
 
            this.rerunOnChangeCheckBox.Name = "rerunOnChangeCheckBox";
90
 
            this.helpProvider1.SetShowHelp(this.rerunOnChangeCheckBox, true);
91
 
            this.rerunOnChangeCheckBox.Size = new System.Drawing.Size(120, 17);
92
 
            this.rerunOnChangeCheckBox.TabIndex = 13;
93
 
            this.rerunOnChangeCheckBox.Text = "Re-run last tests run";
94
 
            // 
95
 
            // reloadOnRunCheckBox
96
 
            // 
97
 
            this.reloadOnRunCheckBox.AutoSize = true;
98
 
            this.helpProvider1.SetHelpString(this.reloadOnRunCheckBox, "If checked, the assembly is reloaded before each run");
99
 
            this.reloadOnRunCheckBox.Location = new System.Drawing.Point(24, 32);
100
 
            this.reloadOnRunCheckBox.Name = "reloadOnRunCheckBox";
101
 
            this.helpProvider1.SetShowHelp(this.reloadOnRunCheckBox, true);
102
 
            this.reloadOnRunCheckBox.Size = new System.Drawing.Size(158, 17);
103
 
            this.reloadOnRunCheckBox.TabIndex = 11;
104
 
            this.reloadOnRunCheckBox.Text = "Reload before each test run";
105
 
            // 
106
 
            // reloadOnChangeCheckBox
107
 
            // 
108
 
            this.reloadOnChangeCheckBox.AutoSize = true;
109
 
            this.helpProvider1.SetHelpString(this.reloadOnChangeCheckBox, "If checked, the assembly is reloaded whenever it changes. Changes to this setting" +
110
 
                    " do not take effect until the next time an assembly is loaded.");
111
 
            this.reloadOnChangeCheckBox.Location = new System.Drawing.Point(24, 64);
112
 
            this.reloadOnChangeCheckBox.Name = "reloadOnChangeCheckBox";
113
 
            this.helpProvider1.SetShowHelp(this.reloadOnChangeCheckBox, true);
114
 
            this.reloadOnChangeCheckBox.Size = new System.Drawing.Size(199, 17);
115
 
            this.reloadOnChangeCheckBox.TabIndex = 12;
116
 
            this.reloadOnChangeCheckBox.Text = "Reload when test assembly changes";
117
 
            this.reloadOnChangeCheckBox.CheckedChanged += new System.EventHandler(this.reloadOnChangeCheckBox_CheckedChanged);
118
 
            // 
119
 
            // AssemblyReloadSettingsPage
120
 
            // 
121
 
            this.Controls.Add(this.rerunOnChangeCheckBox);
122
 
            this.Controls.Add(this.reloadOnRunCheckBox);
123
 
            this.Controls.Add(this.reloadOnChangeCheckBox);
124
 
            this.Controls.Add(this.label1);
125
 
            this.Controls.Add(this.groupBox1);
126
 
            this.Name = "AssemblyReloadSettingsPage";
127
 
            this.ResumeLayout(false);
128
 
            this.PerformLayout();
129
 
 
130
 
                }
131
 
                #endregion
132
 
 
133
 
                public override void LoadSettings()
134
 
                {
135
 
                        reloadOnChangeCheckBox.Checked = settings.GetSetting( "Options.TestLoader.ReloadOnChange", true );
136
 
                        rerunOnChangeCheckBox.Checked = settings.GetSetting( "Options.TestLoader.RerunOnChange", false );
137
 
                        reloadOnRunCheckBox.Checked = settings.GetSetting( "Options.TestLoader.ReloadOnRun", false );
138
 
                }
139
 
 
140
 
                public override void ApplySettings()
141
 
                {
142
 
                        settings.SaveSetting( "Options.TestLoader.ReloadOnChange", reloadOnChangeCheckBox.Checked );
143
 
                        settings.SaveSetting( "Options.TestLoader.RerunOnChange", rerunOnChangeCheckBox.Checked );
144
 
                        settings.SaveSetting( "Options.TestLoader.ReloadOnRun", reloadOnRunCheckBox.Checked );
145
 
                }
146
 
 
147
 
 
148
 
 
149
 
                private void reloadOnChangeCheckBox_CheckedChanged(object sender, System.EventArgs e)
150
 
                {
151
 
                        rerunOnChangeCheckBox.Enabled = reloadOnChangeCheckBox.Checked;
152
 
                }
153
 
 
154
 
                protected override void OnHelpRequested(HelpEventArgs hevent)
155
 
                {
156
 
                        System.Diagnostics.Process.Start( "http://nunit.com/?p=optionsDialog&r=2.4.5" );
157
 
                }
158
 
 
159
 
        }
160
 
}
161
 
 
 
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
using NUnit.Util;
 
12
 
 
13
namespace NUnit.Gui.SettingsPages
 
14
{
 
15
        public class AssemblyReloadSettingsPage : NUnit.UiKit.SettingsPage
 
16
        {
 
17
                private System.Windows.Forms.Label label1;
 
18
                private System.Windows.Forms.GroupBox groupBox1;
 
19
                private System.Windows.Forms.CheckBox rerunOnChangeCheckBox;
 
20
                private System.Windows.Forms.CheckBox reloadOnRunCheckBox;
 
21
                private System.Windows.Forms.CheckBox reloadOnChangeCheckBox;
 
22
                private System.Windows.Forms.HelpProvider helpProvider1;
 
23
                private System.ComponentModel.IContainer components = null;
 
24
 
 
25
                public AssemblyReloadSettingsPage(string key) : base(key)
 
26
                {
 
27
                        // This call is required by the Windows Form Designer.
 
28
                        InitializeComponent();
 
29
 
 
30
                        // TODO: Add any initialization after the InitializeComponent call
 
31
                }
 
32
 
 
33
                /// <summary>
 
34
                /// Clean up any resources being used.
 
35
                /// </summary>
 
36
                protected override void Dispose( bool disposing )
 
37
                {
 
38
                        if( disposing )
 
39
                        {
 
40
                                if (components != null) 
 
41
                                {
 
42
                                        components.Dispose();
 
43
                                }
 
44
                        }
 
45
                        base.Dispose( disposing );
 
46
                }
 
47
 
 
48
                #region Designer generated code
 
49
                /// <summary>
 
50
                /// Required method for Designer support - do not modify
 
51
                /// the contents of this method with the code editor.
 
52
                /// </summary>
 
53
                private void InitializeComponent()
 
54
                {
 
55
            this.label1 = new System.Windows.Forms.Label();
 
56
            this.groupBox1 = new System.Windows.Forms.GroupBox();
 
57
            this.rerunOnChangeCheckBox = new System.Windows.Forms.CheckBox();
 
58
            this.reloadOnRunCheckBox = new System.Windows.Forms.CheckBox();
 
59
            this.reloadOnChangeCheckBox = new System.Windows.Forms.CheckBox();
 
60
            this.helpProvider1 = new System.Windows.Forms.HelpProvider();
 
61
            this.SuspendLayout();
 
62
            // 
 
63
            // label1
 
64
            // 
 
65
            this.label1.AutoSize = true;
 
66
            this.label1.Location = new System.Drawing.Point(8, 4);
 
67
            this.label1.Name = "label1";
 
68
            this.label1.Size = new System.Drawing.Size(88, 13);
 
69
            this.label1.TabIndex = 7;
 
70
            this.label1.Text = "Assembly Reload";
 
71
            // 
 
72
            // groupBox1
 
73
            // 
 
74
            this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
 
75
                        | System.Windows.Forms.AnchorStyles.Right)));
 
76
            this.groupBox1.Location = new System.Drawing.Point(181, 4);
 
77
            this.groupBox1.Name = "groupBox1";
 
78
            this.groupBox1.Size = new System.Drawing.Size(259, 8);
 
79
            this.groupBox1.TabIndex = 6;
 
80
            this.groupBox1.TabStop = false;
 
81
            // 
 
82
            // rerunOnChangeCheckBox
 
83
            // 
 
84
            this.rerunOnChangeCheckBox.AutoSize = true;
 
85
            this.rerunOnChangeCheckBox.Enabled = false;
 
86
            this.helpProvider1.SetHelpString(this.rerunOnChangeCheckBox, "If checked, the last tests run will be re-run automatically whenever the assembly" +
 
87
                    " changes.");
 
88
            this.rerunOnChangeCheckBox.Location = new System.Drawing.Point(48, 96);
 
89
            this.rerunOnChangeCheckBox.Name = "rerunOnChangeCheckBox";
 
90
            this.helpProvider1.SetShowHelp(this.rerunOnChangeCheckBox, true);
 
91
            this.rerunOnChangeCheckBox.Size = new System.Drawing.Size(120, 17);
 
92
            this.rerunOnChangeCheckBox.TabIndex = 13;
 
93
            this.rerunOnChangeCheckBox.Text = "Re-run last tests run";
 
94
            // 
 
95
            // reloadOnRunCheckBox
 
96
            // 
 
97
            this.reloadOnRunCheckBox.AutoSize = true;
 
98
            this.helpProvider1.SetHelpString(this.reloadOnRunCheckBox, "If checked, the assembly is reloaded before each run");
 
99
            this.reloadOnRunCheckBox.Location = new System.Drawing.Point(24, 32);
 
100
            this.reloadOnRunCheckBox.Name = "reloadOnRunCheckBox";
 
101
            this.helpProvider1.SetShowHelp(this.reloadOnRunCheckBox, true);
 
102
            this.reloadOnRunCheckBox.Size = new System.Drawing.Size(158, 17);
 
103
            this.reloadOnRunCheckBox.TabIndex = 11;
 
104
            this.reloadOnRunCheckBox.Text = "Reload before each test run";
 
105
            // 
 
106
            // reloadOnChangeCheckBox
 
107
            // 
 
108
            this.reloadOnChangeCheckBox.AutoSize = true;
 
109
            this.helpProvider1.SetHelpString(this.reloadOnChangeCheckBox, "If checked, the assembly is reloaded whenever it changes. Changes to this setting" +
 
110
                    " do not take effect until the next time an assembly is loaded.");
 
111
            this.reloadOnChangeCheckBox.Location = new System.Drawing.Point(24, 64);
 
112
            this.reloadOnChangeCheckBox.Name = "reloadOnChangeCheckBox";
 
113
            this.helpProvider1.SetShowHelp(this.reloadOnChangeCheckBox, true);
 
114
            this.reloadOnChangeCheckBox.Size = new System.Drawing.Size(199, 17);
 
115
            this.reloadOnChangeCheckBox.TabIndex = 12;
 
116
            this.reloadOnChangeCheckBox.Text = "Reload when test assembly changes";
 
117
            this.reloadOnChangeCheckBox.CheckedChanged += new System.EventHandler(this.reloadOnChangeCheckBox_CheckedChanged);
 
118
            // 
 
119
            // AssemblyReloadSettingsPage
 
120
            // 
 
121
            this.Controls.Add(this.rerunOnChangeCheckBox);
 
122
            this.Controls.Add(this.reloadOnRunCheckBox);
 
123
            this.Controls.Add(this.reloadOnChangeCheckBox);
 
124
            this.Controls.Add(this.label1);
 
125
            this.Controls.Add(this.groupBox1);
 
126
            this.Name = "AssemblyReloadSettingsPage";
 
127
            this.ResumeLayout(false);
 
128
            this.PerformLayout();
 
129
 
 
130
                }
 
131
                #endregion
 
132
 
 
133
                public override void LoadSettings()
 
134
                {
 
135
                        reloadOnChangeCheckBox.Checked = settings.GetSetting( "Options.TestLoader.ReloadOnChange", true );
 
136
                        rerunOnChangeCheckBox.Checked = settings.GetSetting( "Options.TestLoader.RerunOnChange", false );
 
137
                        reloadOnRunCheckBox.Checked = settings.GetSetting( "Options.TestLoader.ReloadOnRun", false );
 
138
                }
 
139
 
 
140
                public override void ApplySettings()
 
141
                {
 
142
                        settings.SaveSetting( "Options.TestLoader.ReloadOnChange", reloadOnChangeCheckBox.Checked );
 
143
                        settings.SaveSetting( "Options.TestLoader.RerunOnChange", rerunOnChangeCheckBox.Checked );
 
144
                        settings.SaveSetting( "Options.TestLoader.ReloadOnRun", reloadOnRunCheckBox.Checked );
 
145
                }
 
146
 
 
147
 
 
148
 
 
149
                private void reloadOnChangeCheckBox_CheckedChanged(object sender, System.EventArgs e)
 
150
                {
 
151
                        rerunOnChangeCheckBox.Enabled = reloadOnChangeCheckBox.Checked;
 
152
                }
 
153
 
 
154
                protected override void OnHelpRequested(HelpEventArgs hevent)
 
155
                {
 
156
                        System.Diagnostics.Process.Start( "http://nunit.com/?p=optionsDialog&r=2.4.5" );
 
157
                }
 
158
 
 
159
        }
 
160
}
 
161