private void okButton_Click(object sender, System.EventArgs e) { if (Title == string.Empty) { MessageDisplay.Error("No title entered"); return; } tabSettings.Tabs.AddNewTab(Title); DialogResult = DialogResult.OK; this.Close(); }
private void okButton_Click(object sender, System.EventArgs e) { configurationName = configurationNameTextBox.Text; if (project.Configs.Contains(configurationName)) { // TODO: Need general error message display MessageDisplay.Error("A configuration with that name already exists"); } else { DialogResult = DialogResult.OK; Close(); } }
private void okButton_Click(object sender, System.EventArgs e) { configurationName = configurationNameTextBox.Text; if (configurationName == string.Empty) { MessageDisplay.Error("No configuration name provided"); return; } if (project.Configs.Contains(configurationName)) { MessageDisplay.Error("A configuration with that name already exists"); return; } // ToDo: Move more of this to project ProjectConfig newConfig = new ProjectConfig(configurationName); copyConfigurationName = null; if (configurationComboBox.SelectedIndex > 0) { copyConfigurationName = (string)configurationComboBox.SelectedItem; ProjectConfig copyConfig = project.Configs[copyConfigurationName]; if (copyConfig != null) { foreach (string assembly in copyConfig.Assemblies) { newConfig.Assemblies.Add(assembly); } } } project.Configs.Add(newConfig); DialogResult = DialogResult.OK; Close(); }
protected override void OnLoad(EventArgs e) { try//2013-1-12:NUnit.Gui.ArxNet.Tests.NUnitFormArxNetTests.ShowModalDialog测试加 { if (ServicesArxNet.TestLoader == null) return;//build29938fix if (ServicesArxNet.TestLoader.AssemblyInfo == null) return;////build29938fix this.Text = "Test Assemblies"; this.TextBox.WordWrap = false; //this.TextBox.ContentsResized += new ContentsResizedEventHandler(TextBox_ContentsResized); this.TextBox.Font = new System.Drawing.Font(FontFamily.GenericMonospace, 8.25F); base.OnLoad(e); Process p = Process.GetCurrentProcess(); int currentProcessId = p.Id; string currentDomainName = ""; /*AppendProcessInfo( currentProcessId, Path.GetFileName(Assembly.GetEntryAssembly().Location), RuntimeFramework.CurrentFramework);*/ AppendProcessInfo( currentProcessId, Path.GetFileName(p.MainModule.FileName), RuntimeFramework.CurrentFramework);//2013-1-12:NUnit.Gui.ArxNet.Tests.NUnitFormArxNetTests.ShowModalDialog测试改 foreach (TestAssemblyInfo info in ServicesArxNet.TestLoader.AssemblyInfo) { if (info.ProcessId != currentProcessId) { this.TextBox.AppendText("\r\n"); AppendProcessInfo(info); currentProcessId = info.ProcessId; } if (info.DomainName != currentDomainName) { AppendDomainInfo(info); currentDomainName = info.DomainName; } AppendAssemblyInfo(info); } TextBox.Select(0, 0); TextBox.ScrollToCaret(); } /*2013-1-12:NUnit.Gui.ArxNet.Tests.NUnitFormArxNetTests.ShowModalDialog测试加*/ catch (SystemException exception) { IMessageDisplay messageDisplay = new MessageDisplay("nunit"); messageDisplay.Error("TestAssemblyInfoFormArxNet unable to Load", exception); } /*2013-1-12:NUnit.Gui.ArxNet.Tests.NUnitFormArxNetTests.ShowModalDialog测试加*/ }