public AddTabPageDialog(TextDisplayTabSettings tabSettings)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
			this.tabSettings = tabSettings;
		}
Пример #2
0
        public AddTabPageDialog(TextDisplayTabSettings tabSettings)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            this.tabSettings = tabSettings;
        }
Пример #3
0
        protected override void OnLoad(EventArgs e)
        {
            if (!this.DesignMode)
            {
                this.settings = Services.UserSettings;
                TextDisplayTabSettings tabSettings = new TextDisplayTabSettings();
                tabSettings.LoadSettings(settings);

                UpdateTabPages();

                Subscribe(Services.TestLoader.Events);
                Services.UserSettings.Changed += new SettingsEventHandler(UserSettings_Changed);

                ITestEvents events = Services.TestLoader.Events;
                errorDisplay.Subscribe(events);
                notRunTree.Subscribe(events);
            }

            base.OnLoad(e);
        }
Пример #4
0
            public void UpdatePages()
            {
                TextDisplayTabSettings tabSettings = new TextDisplayTabSettings();

                tabSettings.LoadSettings();
                List <TextDisplayTabPage> oldPages = tabPages;

                tabPages = new List <TextDisplayTabPage>();
                Font displayFont = GetFixedFont();

                foreach (TextDisplayTabSettings.TabInfo tabInfo in tabSettings.Tabs)
                {
                    if (tabInfo.Enabled)
                    {
                        TextDisplayTabPage thePage = null;
                        foreach (TextDisplayTabPage page in oldPages)
                        {
                            if (page.Name == tabInfo.Name)
                            {
                                thePage = page;
                                break;
                            }
                        }

                        if (thePage == null)
                        {
                            thePage = new TextDisplayTabPage(tabInfo);
                            thePage.Display.Subscribe(Services.TestLoader.Events);
                        }

                        thePage.DisplayFont = displayFont;

                        tabPages.Add(thePage);
                        tabControl.TabPages.Add(thePage);
                    }
                }
            }
Пример #5
0
            public void UpdatePages()
            {
                TextDisplayTabSettings tabSettings = new TextDisplayTabSettings();

                tabSettings.LoadSettings();
                ArrayList oldPages = tabPages;

                tabPages = new ArrayList();
                Font displayFont = GetFixedFont();

                foreach (TextDisplayTabSettings.TabInfo tabInfo in tabSettings.Tabs)
                {
                    if (tabInfo.Enabled)
                    {
                        TextDisplayTabPage thePage = null;
                        foreach (TextDisplayTabPage page in oldPages)
                        {
                            if (page.Name == tabInfo.Name)
                            {
                                thePage = page;
                                break;
                            }
                        }

                        if (thePage == null)
                        {
                            thePage = new TextDisplayTabPage(tabInfo);
                        }

                        thePage.DisplayFont = displayFont;

                        tabPages.Add(thePage);
                        tabControl.TabPages.Add(thePage);
                    }
                }
            }
		private void InitDisplay(TextDisplayTabSettings.TabInfo tabInfo)
		{
			textBox1.Text = tabInfo.Title;

			TextDisplayContent content = tabInfo.Content;
			showStandardOutput.Checked = (content & TextDisplayContent.Out) != 0;
			showErrorOutput.Checked = (content & TextDisplayContent.Error) != 0;
			showTraceOutput.Checked = (content & TextDisplayContent.Trace) != 0;
			showLogOutput.Checked = (content & TextDisplayContent.Log) != 0;
			testCaseLabels.Checked = (content & TextDisplayContent.Labels) != 0;
			suppressLabelsIfNoOutput.Checked = (content & TextDisplayContent.LabelOnlyOnOutput) != 0;

			enabledCheckBox.Checked = tabInfo.Enabled;
		}
Пример #7
0
			public void UpdatePages()
			{
				TextDisplayTabSettings tabSettings = new TextDisplayTabSettings();
				tabSettings.LoadSettings();
				ArrayList oldPages = tabPages;
				tabPages = new ArrayList();
				Font displayFont = GetFixedFont();

				foreach( TextDisplayTabSettings.TabInfo tabInfo in tabSettings.Tabs )
				{
					if ( tabInfo.Enabled )
					{
						TextDisplayTabPage thePage = null;
						foreach( TextDisplayTabPage page in oldPages )
							if ( page.Name == tabInfo.Name )
							{
								thePage = page;
								break;
							}

						if ( thePage == null )
							thePage = new TextDisplayTabPage( tabInfo );

						thePage.DisplayFont = displayFont;

						tabPages.Add( thePage );
						tabControl.TabPages.Add( thePage );
					}
				}
			}
Пример #8
0
		protected override void OnLoad(EventArgs e)
		{
			if ( !this.DesignMode )
			{
				this.settings = Services.UserSettings;
				TextDisplayTabSettings tabSettings = new TextDisplayTabSettings();
				tabSettings.LoadSettings( settings );

				UpdateTabPages();

				Subscribe( Services.TestLoader.Events );
				Services.UserSettings.Changed += new SettingsEventHandler(UserSettings_Changed);

				ITestEvents events = Services.TestLoader.Events;
				errorDisplay.Subscribe( events );
				notRunTree.Subscribe( events );

				displayController.Subscribe( events );
			}

			base.OnLoad (e);
		}
Пример #9
0
		public TextDisplayTabPage( TextDisplayTabSettings.TabInfo tabInfo ) : this()
		{
			this.Name = tabInfo.Name;
			this.Text = tabInfo.Title;
			this.Display.Content = tabInfo.Content;
		}
		private void InitDisplay(TextDisplayTabSettings.TabInfo tabInfo)
		{
			textBox1.Text = tabInfo.Title;

			TextDisplayContent content = tabInfo.Content;
            showStandardOutput.Checked = content.Out;
            showErrorOutput.Checked = content.Error;
            showTraceOutput.Checked = content.Trace;
            logLevelComboBox.SelectedIndex = (int)content.LogLevel;
            labelsComboBox.SelectedIndex = (int)content.Labels;

			enabledCheckBox.Checked = tabInfo.Enabled;
		}
Пример #11
0
			public void UpdatePages()
			{
				TextDisplayTabSettings tabSettings = new TextDisplayTabSettings();
				tabSettings.LoadSettings();
                List <TextDisplayTabPage> oldPages = tabPages;
				tabPages = new List<TextDisplayTabPage>();
				Font displayFont = GetFixedFont();

				foreach( TextDisplayTabSettings.TabInfo tabInfo in tabSettings.Tabs )
				{
					if ( tabInfo.Enabled )
					{
						TextDisplayTabPage thePage = null;
						foreach( TextDisplayTabPage page in oldPages )
							if ( page.Name == tabInfo.Name )
							{
								thePage = page;
								break;
							}

						if ( thePage == null )
						{
							thePage = new TextDisplayTabPage( tabInfo );
							thePage.Display.Subscribe(Services.TestLoader.Events);
						}

						thePage.DisplayFont = displayFont;

						tabPages.Add( thePage );
						tabControl.TabPages.Add( thePage );
					}
				}
			}
Пример #12
0
        protected override void OnLoad(EventArgs e)
        {
            if (!this.DesignMode)
            {
                try//2013-1-10:NUnit.Gui.ArxNet.Tests.NUnitFormArxNetTests.ShowModalDialog���Լ�
                {
                    if (ServicesArxNet.TestLoader == null) return;//2013-1-10:NUnit.Gui.ArxNet.Tests.NUnitFormArxNetTests.ShowModalDialog���Լ�

                    this.settings = ServicesArxNet.UserSettings;
                    TextDisplayTabSettings tabSettings = new TextDisplayTabSettings();
                    tabSettings.LoadSettings(settings);

                    UpdateTabPages();

                    Subscribe(ServicesArxNet.TestLoader.Events);
                    ServicesArxNet.UserSettings.Changed += new SettingsEventHandler(UserSettings_Changed);

                    ITestEvents events = ServicesArxNet.TestLoader.Events;
                    errorDisplay.Subscribe(events);
                    notRunTree.Subscribe(events);

                    displayController.Subscribe(events);

                    base.OnLoad(e);
                }
                /*2013-1-10:NUnit.Gui.ArxNet.Tests.NUnitFormArxNetTests.ShowModalDialog���Լ�*/
                catch (SystemException exception)
                {
                    NUnitFormArxNet form = this.ParentForm as NUnitFormArxNet;
                    form.MessageDisplay.Error("ResultTabsArxNet unable to Load", exception);
                }
                /*2013-1-10:NUnit.Gui.ArxNet.Tests.NUnitFormArxNetTests.ShowModalDialog���Լ�*/
            }
        }