From 84185d3a458183fc9bb88c9397b4745c801347a6 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 13 Apr 2012 14:42:53 +0000 Subject: [PATCH] =?UTF-8?q?added=20SQL=20Server=20name=20(and=20if=20it?= =?UTF-8?q?=E2=80=99s=20local)=20and=20the=20current=20database=20name=20f?= =?UTF-8?q?ine-tuned=20our=20PROMS=20version=20string=20fixed=20NULL=20ref?= =?UTF-8?q?erence=20with=20changing=20a=20section=20number/title=20on=20a?= =?UTF-8?q?=20property=20page=20that=20uses=20StepRTB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AboutVEPROMS.Designer.cs | 45 ++++++++++++++++--- PROMS/VEPROMS User Interface/AboutVEPROMS.cs | 10 +++++ .../Properties/AssemblyInfo.cs | 8 ++-- .../Volian.Controls.Library/StepTabRibbon.cs | 2 +- 4 files changed, 53 insertions(+), 12 deletions(-) diff --git a/PROMS/VEPROMS User Interface/AboutVEPROMS.Designer.cs b/PROMS/VEPROMS User Interface/AboutVEPROMS.Designer.cs index c7a8cac4..443ed2a8 100644 --- a/PROMS/VEPROMS User Interface/AboutVEPROMS.Designer.cs +++ b/PROMS/VEPROMS User Interface/AboutVEPROMS.Designer.cs @@ -43,6 +43,8 @@ namespace VEPROMS this.panel7 = new System.Windows.Forms.Panel(); this.btnEULA = new DevComponents.DotNetBar.ButtonX(); this.btnOK = new DevComponents.DotNetBar.ButtonX(); + this.labelDatabase = new System.Windows.Forms.Label(); + this.labelServer = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); @@ -157,11 +159,13 @@ namespace VEPROMS // panel3 // this.panel3.Controls.Add(this.labelVersionDateTime); + this.panel3.Controls.Add(this.labelServer); + this.panel3.Controls.Add(this.labelDatabase); this.panel3.Controls.Add(this.labelVersion); this.panel3.Dock = System.Windows.Forms.DockStyle.Top; this.panel3.Location = new System.Drawing.Point(12, 196); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(437, 48); + this.panel3.Size = new System.Drawing.Size(437, 90); this.panel3.TabIndex = 28; // // labelVersionDateTime @@ -181,7 +185,7 @@ namespace VEPROMS // this.panel4.Controls.Add(this.labelCopyright); this.panel4.Dock = System.Windows.Forms.DockStyle.Top; - this.panel4.Location = new System.Drawing.Point(12, 244); + this.panel4.Location = new System.Drawing.Point(12, 286); this.panel4.Name = "panel4"; this.panel4.Size = new System.Drawing.Size(437, 33); this.panel4.TabIndex = 29; @@ -190,7 +194,7 @@ namespace VEPROMS // this.panel5.Controls.Add(this.labelCompanyName); this.panel5.Dock = System.Windows.Forms.DockStyle.Top; - this.panel5.Location = new System.Drawing.Point(12, 277); + this.panel5.Location = new System.Drawing.Point(12, 319); this.panel5.Name = "panel5"; this.panel5.Size = new System.Drawing.Size(437, 33); this.panel5.TabIndex = 30; @@ -199,7 +203,7 @@ namespace VEPROMS // this.panel6.Controls.Add(this.textBoxDescription); this.panel6.Dock = System.Windows.Forms.DockStyle.Top; - this.panel6.Location = new System.Drawing.Point(12, 310); + this.panel6.Location = new System.Drawing.Point(12, 352); this.panel6.Name = "panel6"; this.panel6.Size = new System.Drawing.Size(437, 154); this.panel6.TabIndex = 31; @@ -209,7 +213,7 @@ namespace VEPROMS this.panel7.Controls.Add(this.btnEULA); this.panel7.Controls.Add(this.btnOK); this.panel7.Dock = System.Windows.Forms.DockStyle.Top; - this.panel7.Location = new System.Drawing.Point(12, 464); + this.panel7.Location = new System.Drawing.Point(12, 506); this.panel7.Name = "panel7"; this.panel7.Size = new System.Drawing.Size(437, 47); this.panel7.TabIndex = 32; @@ -244,12 +248,38 @@ namespace VEPROMS this.btnOK.TabIndex = 26; this.btnOK.Text = "&OK"; // + // labelDatabase + // + this.labelDatabase.Dock = System.Windows.Forms.DockStyle.Bottom; + this.labelDatabase.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelDatabase.Location = new System.Drawing.Point(0, 69); + this.labelDatabase.Margin = new System.Windows.Forms.Padding(8, 0, 4, 0); + this.labelDatabase.MaximumSize = new System.Drawing.Size(0, 21); + this.labelDatabase.Name = "labelDatabase"; + this.labelDatabase.Size = new System.Drawing.Size(437, 21); + this.labelDatabase.TabIndex = 2; + this.labelDatabase.Text = "Database Name"; + this.labelDatabase.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelServer + // + this.labelServer.Dock = System.Windows.Forms.DockStyle.Bottom; + this.labelServer.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelServer.Location = new System.Drawing.Point(0, 48); + this.labelServer.Margin = new System.Windows.Forms.Padding(8, 0, 4, 0); + this.labelServer.MaximumSize = new System.Drawing.Size(0, 21); + this.labelServer.Name = "labelServer"; + this.labelServer.Size = new System.Drawing.Size(437, 21); + this.labelServer.TabIndex = 3; + this.labelServer.Text = "SQL Server Name"; + this.labelServer.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // AboutVEPROMS // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.ClientSize = new System.Drawing.Size(461, 519); + this.ClientSize = new System.Drawing.Size(461, 560); this.Controls.Add(this.panel7); this.Controls.Add(this.panel6); this.Controls.Add(this.panel5); @@ -257,7 +287,6 @@ namespace VEPROMS this.Controls.Add(this.panel3); this.Controls.Add(this.panel2); this.Controls.Add(this.panel1); - this.DoubleBuffered = true; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Margin = new System.Windows.Forms.Padding(4); this.MaximizeBox = false; @@ -299,5 +328,7 @@ namespace VEPROMS private DevComponents.DotNetBar.ButtonX btnOK; private DevComponents.DotNetBar.ButtonX btnEULA; private System.Windows.Forms.Label labelVersionDateTime; + private System.Windows.Forms.Label labelServer; + private System.Windows.Forms.Label labelDatabase; } } diff --git a/PROMS/VEPROMS User Interface/AboutVEPROMS.cs b/PROMS/VEPROMS User Interface/AboutVEPROMS.cs index 1bb32670..a384794e 100644 --- a/PROMS/VEPROMS User Interface/AboutVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/AboutVEPROMS.cs @@ -5,6 +5,8 @@ using System.Drawing; using System.Windows.Forms; using System.Reflection; using Volian.Controls.Library; +using VEPROMS.CSLA.Library; +using System.Text.RegularExpressions; namespace VEPROMS { @@ -18,7 +20,13 @@ namespace VEPROMS // Change assembly information settings for your application through either: // - Project->Properties->Application->Assembly Information // - AssemblyInfo.cs + //"Data Source=.\\SQLEXPRESS;Initial Catalog=VEPROMS_RGE_SAMG_Convert;Integrated Security=True" DateTime buildDateTime = new System.IO.FileInfo(Assembly.GetExecutingAssembly().Location).LastWriteTime; + string connectionString = Database.VEPROMS_Connection; + Match mServer = Regex.Match(connectionString,".*Data Source=([^;]*).*"); + string server = (mServer.Success)?mServer.Groups[1].Value:"unknown"; + if (server.StartsWith(@".\")) server = @"Local \ " + server.Substring(2); + string databaseName = Database.SelectedDatabase; this.Text = String.Format("About {0}", AssemblyTitle); this.labelProductName.Text = AssemblyProduct; this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion); @@ -28,6 +36,8 @@ namespace VEPROMS // this.textBoxDescription.Text = AssemblyDescription; this.labelCompanyName.Links[0].LinkData = "Volian Enterprises Inc."; this.labelCompanyName.Links.Add(0,23,"www.volian.com"); + this.labelServer.Text = string.Format("SQL Server: {0}", server); + this.labelDatabase.Text = string.Format("Database: {0}", databaseName); } #region Assembly Attribute Accessors diff --git a/PROMS/VEPROMS User Interface/Properties/AssemblyInfo.cs b/PROMS/VEPROMS User Interface/Properties/AssemblyInfo.cs index 4ac957ba..6c945c97 100644 --- a/PROMS/VEPROMS User Interface/Properties/AssemblyInfo.cs +++ b/PROMS/VEPROMS User Interface/Properties/AssemblyInfo.cs @@ -27,8 +27,8 @@ using System.Runtime.InteropServices; // // Major Version // Minor Version -// Build Number -// Revision +// Build YYMM (two digit year, two digit month) +// Revision DHH (day - no leading zero, two digit hour - military time // -[assembly: AssemblyVersion("11.0.0.6")] -[assembly: AssemblyFileVersion("11.0.0.6")] +[assembly: AssemblyVersion("11.6.1204.1310")] +[assembly: AssemblyFileVersion("11.6.1204.1310")] diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 57e63a10..be9663d4 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -179,7 +179,7 @@ namespace Volian.Controls.Library { // if we are in view mode or the edit window is empty, then don't allow inserting steps/substeps, // page breaks, copy step, nor creating a pdf - bool allow = (MyEditItem.MyStepPanel.VwMode != E_ViewMode.View && _MyStepRTB.TextLength > 0); + bool allow = (_MyStepRTB.TextLength > 0); // turn ribbon items on/off base on whether there is text in the edit window rbnSiblings.Enabled = rbnBreaks.Enabled = rbnStepParts.Enabled = allow;