From 274791e6623ace0059d89c27bf91353197997efd Mon Sep 17 00:00:00 2001 From: Harrie Oriowo Date: Thu, 30 May 2024 12:26:35 -0700 Subject: [PATCH] Removing custom exception and moving logic into filterfactory --- src/Common/Helpers/EventGridException.cs | 54 ------- .../Clients/EventGridControlPlaneClient.cs | 28 +--- .../Management/EventGridFilterFactory.cs | 140 +++++++++++------- .../Forms/CreateEventGridSubscriptionForm.cs | 17 +-- .../Forms/EventGridConnectForm.Designer.cs | 29 ++-- 5 files changed, 109 insertions(+), 159 deletions(-) delete mode 100644 src/Common/Helpers/EventGridException.cs diff --git a/src/Common/Helpers/EventGridException.cs b/src/Common/Helpers/EventGridException.cs deleted file mode 100644 index 676a143a..00000000 --- a/src/Common/Helpers/EventGridException.cs +++ /dev/null @@ -1,54 +0,0 @@ -#region Copyright -//======================================================================================= -// Microsoft Azure Customer Advisory Team -// -// This sample is supplemental to the technical guidance published on my personal -// blog at http://blogs.msdn.com/b/paolos/. -// -// Author: Paolo Salvatori -//======================================================================================= -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// LICENSED UNDER THE APACHE LICENSE, VERSION 2.0 (THE "LICENSE"); YOU MAY NOT USE THESE -// FILES EXCEPT IN COMPLIANCE WITH THE LICENSE. YOU MAY OBTAIN A COPY OF THE LICENSE AT -// http://www.apache.org/licenses/LICENSE-2.0 -// UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, SOFTWARE DISTRIBUTED UNDER THE -// LICENSE IS DISTRIBUTED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, EITHER EXPRESS OR IMPLIED. SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING -// PERMISSIONS AND LIMITATIONS UNDER THE LICENSE. -//======================================================================================= -#endregion - -#region Using Directives - -using System; - -#endregion - - -namespace ServiceBusExplorer.Helpers -{ - public class EventGridException : Exception - { - #region Public constructors - /// - /// Initializes a new instance of the class. - /// - /// Message - /// Inner exception - public EventGridException( - string message, - Exception innerException = null) - : base(message, innerException) - { - FullMessage = message; - } - - /// - /// Gets the full message of the exception. - /// - public string FullMessage { get; } - #endregion - - } -} diff --git a/src/EventGridExplorerLibrary/Management/Clients/EventGridControlPlaneClient.cs b/src/EventGridExplorerLibrary/Management/Clients/EventGridControlPlaneClient.cs index f5b3ed4e..e6804d6e 100644 --- a/src/EventGridExplorerLibrary/Management/Clients/EventGridControlPlaneClient.cs +++ b/src/EventGridExplorerLibrary/Management/Clients/EventGridControlPlaneClient.cs @@ -185,29 +185,11 @@ private FiltersConfiguration GetFiltersConfiguration(List i in filters) { - var operatorType = i["Operator"].ToString(); - var value = i["Value"].ToString(); - var key = i["Key"].ToString(); - - if (operatorType.Equals("Boolean equals")) { eventGridFilterFactory.AddFilterForBoolEquals(key, value); }; - if (operatorType.Equals("String is in")) { eventGridFilterFactory.AddFilterForStringIn(key, value); }; - if (operatorType.Equals("String is not in")) { eventGridFilterFactory.AddFilterForStringNotIn(key, value); }; - if (operatorType.Equals("String contains")) { eventGridFilterFactory.AddFilterForStringContains(key, value); }; - if (operatorType.Equals("String does not contain")) { eventGridFilterFactory.AddFilterForStringNotContains(key, value); }; - if (operatorType.Equals("String begins with")) { eventGridFilterFactory.AddFilterForStringBeginsWith(key, value); }; - if (operatorType.Equals("String does not begin with")) { eventGridFilterFactory.AddFilterForStringNotBeginsWith(key, value); }; - if (operatorType.Equals("String ends with")) { eventGridFilterFactory.AddFilterForStringEndsWith(key, value); }; - if (operatorType.Equals("String does not end with")) { eventGridFilterFactory.AddFilterForStringNotEndsWith(key, value); }; - if (operatorType.Equals("Number is less than")) { eventGridFilterFactory.AddFilterForNumberLessThan(key, value); }; - if (operatorType.Equals("Number is greater than")) { eventGridFilterFactory.AddFilterForNumberGreaterThan(key, value); }; - if (operatorType.Equals("Number is less than or equal to")) { eventGridFilterFactory.AddFilterForNumberLessThanOrEquals(key, value); }; - if (operatorType.Equals("Number is greater than or equal to")) { eventGridFilterFactory.AddFilterForNumberGreaterThanOrEquals(key, value); }; - if (operatorType.Equals("Number is in")) { eventGridFilterFactory.AddFilterForNumberIn(key, value); }; - if (operatorType.Equals("Number is not in")) { eventGridFilterFactory.AddFilterForNumberNotIn(key, value); }; - if (operatorType.Equals("Number is in range")) { eventGridFilterFactory.AddFilterForNumberInRange(key, value); }; - if (operatorType.Equals("Number is not in range")) { eventGridFilterFactory.AddFilterForNumberNotInRange(key, value); }; - if (operatorType.Equals("Is null or undefined")) { eventGridFilterFactory.AddFilterForIsNullOrUndefined( key); }; - if (operatorType.Equals("Is not null")) { eventGridFilterFactory.AddFilterForIsNotNull(key); }; + eventGridFilterFactory.Key = i["Key"].ToString(); + eventGridFilterFactory.Value = i["Value"].ToString(); + eventGridFilterFactory.OperatorType = i["Operator"].ToString(); + + eventGridFilterFactory.FilterSelection(); } if (eventTypes.Count > 0) diff --git a/src/EventGridExplorerLibrary/Management/EventGridFilterFactory.cs b/src/EventGridExplorerLibrary/Management/EventGridFilterFactory.cs index cff6f30f..a4d356a5 100644 --- a/src/EventGridExplorerLibrary/Management/EventGridFilterFactory.cs +++ b/src/EventGridExplorerLibrary/Management/EventGridFilterFactory.cs @@ -14,7 +14,7 @@ namespace EventGridExplorerLibrary public class EventGridFilterFactory { private FiltersConfiguration filtersConfiguration; - + /// /// Initializes a new instance of the class. /// @@ -23,22 +23,45 @@ public EventGridFilterFactory(FiltersConfiguration filtersConfiguration) this.filtersConfiguration = filtersConfiguration; } + public void FilterSelection() + { + if (OperatorType.Equals("Boolean equals")) { AddFilterForBoolEquals(); }; + if (OperatorType.Equals("String is in")) { AddFilterForStringIn(); }; + if (OperatorType.Equals("String is not in")) { AddFilterForStringNotIn(); }; + if (OperatorType.Equals("String contains")) { AddFilterForStringContains(); }; + if (OperatorType.Equals("String does not contain")) { AddFilterForStringNotContains(); }; + if (OperatorType.Equals("String begins with")) { AddFilterForStringBeginsWith(); }; + if (OperatorType.Equals("String does not begin with")) { AddFilterForStringNotBeginsWith(); }; + if (OperatorType.Equals("String ends with")) { AddFilterForStringEndsWith(); }; + if (OperatorType.Equals("String does not end with")) { AddFilterForStringNotEndsWith(); }; + if (OperatorType.Equals("Number is less than")) { AddFilterForNumberLessThan(); }; + if (OperatorType.Equals("Number is greater than")) { AddFilterForNumberGreaterThan(); }; + if (OperatorType.Equals("Number is less than or equal to")) { AddFilterForNumberLessThanOrEquals(); }; + if (OperatorType.Equals("Number is greater than or equal to")) { AddFilterForNumberGreaterThanOrEquals(); }; + if (OperatorType.Equals("Number is in")) { AddFilterForNumberIn(); }; + if (OperatorType.Equals("Number is not in")) { AddFilterForNumberNotIn(); }; + if (OperatorType.Equals("Number is in range")) { AddFilterForNumberInRange(); }; + if (OperatorType.Equals("Number is not in range")) { AddFilterForNumberNotInRange(); }; + if (OperatorType.Equals("Is null or undefined")) { AddFilterForIsNullOrUndefined(); }; + if (OperatorType.Equals("Is not null")) { AddFilterForIsNotNull(); }; + } + /// - public void AddFilterForBoolEquals(string key, string value) + public void AddFilterForBoolEquals() { var filter = new BoolEqualsFilter { - Key = key, - Value = bool.Parse(value) + Key = Key, + Value = bool.Parse(Value) }; this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForStringIn(string key, string value) + public void AddFilterForStringIn() { - var filter = new StringInFilter { Key = key }; - string[] filterValuesList = value.Split(','); + var filter = new StringInFilter { Key = Key }; + string[] filterValuesList = Value.Split(','); foreach (string filterValue in filterValuesList) { filter.Values.Add(filterValue); @@ -47,10 +70,10 @@ public void AddFilterForStringIn(string key, string value) this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForStringNotIn(string key, string value) + public void AddFilterForStringNotIn() { - var filter = new StringNotInFilter { Key = key }; - string[] filterValuesList = value.Split(','); + var filter = new StringNotInFilter { Key = Key }; + string[] filterValuesList = Value.Split(','); foreach (string filterValue in filterValuesList) { filter.Values.Add(filterValue); @@ -59,10 +82,10 @@ public void AddFilterForStringNotIn(string key, string value) this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForStringContains(string key, string value) + public void AddFilterForStringContains() { - var filter = new StringContainsFilter { Key = key }; - string[] filterValuesList = value.Split(','); + var filter = new StringContainsFilter { Key = Key }; + string[] filterValuesList = Value.Split(','); foreach (string filterValue in filterValuesList) { filter.Values.Add(filterValue); @@ -71,10 +94,10 @@ public void AddFilterForStringContains(string key, string value) this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForStringNotContains(string key, string value) + public void AddFilterForStringNotContains() { - var filter = new StringNotContainsFilter { Key = key }; - string[] filterValuesList = value.Split(','); + var filter = new StringNotContainsFilter { Key = Key }; + string[] filterValuesList = Value.Split(','); foreach (string filterValue in filterValuesList) { filter.Values.Add(filterValue); @@ -83,10 +106,10 @@ public void AddFilterForStringNotContains(string key, string value) this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForStringBeginsWith(string key, string value) + public void AddFilterForStringBeginsWith() { - var filter = new StringBeginsWithFilter { Key = key }; - string[] filterValuesList = value.Split(','); + var filter = new StringBeginsWithFilter { Key = Key }; + string[] filterValuesList = Value.Split(','); foreach (string filterValue in filterValuesList) { filter.Values.Add(filterValue); @@ -95,10 +118,10 @@ public void AddFilterForStringBeginsWith(string key, string value) this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForStringNotBeginsWith(string key, string value) + public void AddFilterForStringNotBeginsWith() { - var filter = new StringNotBeginsWithFilter { Key = key }; - string[] filterValuesList = value.Split(','); + var filter = new StringNotBeginsWithFilter { Key = Key }; + string[] filterValuesList = Value.Split(','); foreach (string filterValue in filterValuesList) { filter.Values.Add(filterValue); @@ -107,10 +130,10 @@ public void AddFilterForStringNotBeginsWith(string key, string value) this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForStringEndsWith(string key, string value) + public void AddFilterForStringEndsWith() { - var filter = new StringEndsWithFilter { Key = key }; - string[] filterValuesList = value.Split(','); + var filter = new StringEndsWithFilter { Key = Key }; + string[] filterValuesList = Value.Split(','); foreach (string filterValue in filterValuesList) { filter.Values.Add(filterValue); @@ -119,10 +142,10 @@ public void AddFilterForStringEndsWith(string key, string value) this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForStringNotEndsWith(string key, string value) + public void AddFilterForStringNotEndsWith() { - var filter = new StringNotEndsWithFilter { Key = key }; - string[] filterValuesList = value.Split(','); + var filter = new StringNotEndsWithFilter { Key = Key }; + string[] filterValuesList = Value.Split(','); foreach (string filterValue in filterValuesList) { filter.Values.Add(filterValue); @@ -131,54 +154,54 @@ public void AddFilterForStringNotEndsWith(string key, string value) this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForNumberLessThan(string key, string value) + public void AddFilterForNumberLessThan() { var filter = new NumberLessThanFilter { - Key = key, - Value = double.Parse(value) + Key = Key, + Value = double.Parse(Value) }; this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForNumberGreaterThan(string key, string value) + public void AddFilterForNumberGreaterThan() { var filter = new NumberGreaterThanFilter { - Key = key, - Value = double.Parse(value) + Key = Key, + Value = double.Parse(Value) }; this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForNumberLessThanOrEquals(string key, string value) + public void AddFilterForNumberLessThanOrEquals() { var filter = new NumberLessThanOrEqualsFilter { - Key = key, - Value = double.Parse(value) + Key = Key, + Value = double.Parse(Value) }; this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForNumberGreaterThanOrEquals(string key, string value) + public void AddFilterForNumberGreaterThanOrEquals() { var filter = new NumberGreaterThanOrEqualsFilter { - Key = key, - Value = double.Parse(value) + Key = Key, + Value = double.Parse(Value) }; this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForNumberIn(string key, string value) + public void AddFilterForNumberIn() { - var filter = new NumberInFilter { Key = key }; - string[] filterValuesList = value.Split(','); + var filter = new NumberInFilter { Key = Key }; + string[] filterValuesList = Value.Split(','); foreach (string filterValue in filterValuesList) { filter.Values.Add(double.Parse(filterValue)); @@ -187,10 +210,10 @@ public void AddFilterForNumberIn(string key, string value) this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForNumberNotIn(string key, string value) + public void AddFilterForNumberNotIn() { - var filter = new NumberNotInFilter { Key = key }; - string[] filterValuesList = value.Split(','); + var filter = new NumberNotInFilter { Key = Key }; + string[] filterValuesList = Value.Split(','); foreach (string filterValue in filterValuesList) { filter.Values.Add(double.Parse(filterValue)); @@ -199,10 +222,10 @@ public void AddFilterForNumberNotIn(string key, string value) this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForNumberNotInRange(string key, string value) + public void AddFilterForNumberNotInRange() { - var filter = new NumberNotInRangeFilter { Key = key }; - string[] filterValuesList = value.Split(','); + var filter = new NumberNotInRangeFilter { Key = Key }; + string[] filterValuesList = Value.Split(','); foreach (string filterValue in filterValuesList) { List doubleRangeValues = new List(); @@ -217,10 +240,10 @@ public void AddFilterForNumberNotInRange(string key, string value) this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForNumberInRange(string key, string value) + public void AddFilterForNumberInRange() { - var filter = new NumberInRangeFilter { Key = key }; - string[] filterValuesList = value.Split(','); + var filter = new NumberInRangeFilter { Key = Key }; + string[] filterValuesList = Value.Split(','); foreach (string filterValue in filterValuesList) { List doubleRangeValues = new List(); @@ -235,17 +258,22 @@ public void AddFilterForNumberInRange(string key, string value) this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForIsNullOrUndefined(string key) + public void AddFilterForIsNullOrUndefined() { - var filter = new IsNullOrUndefinedFilter { Key = key }; + var filter = new IsNullOrUndefinedFilter { Key = Key }; this.filtersConfiguration.Filters.Add(filter); } - public void AddFilterForIsNotNull(string key) + public void AddFilterForIsNotNull() { - var filter = new IsNotNullFilter { Key = key }; + var filter = new IsNotNullFilter { Key = Key }; this.filtersConfiguration.Filters.Add(filter); } + public string Key { get; set; } + + public string Value { get; set; } + + public string OperatorType { get; set; } } } diff --git a/src/ServiceBusExplorer/Forms/CreateEventGridSubscriptionForm.cs b/src/ServiceBusExplorer/Forms/CreateEventGridSubscriptionForm.cs index 4fb68c33..993b87f7 100644 --- a/src/ServiceBusExplorer/Forms/CreateEventGridSubscriptionForm.cs +++ b/src/ServiceBusExplorer/Forms/CreateEventGridSubscriptionForm.cs @@ -91,12 +91,12 @@ private void btnOk_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(Key) && !string.IsNullOrEmpty(Operator)) { - throw new EventGridException("Key cannot be empty"); + throw new Exception("Key cannot be empty"); } if (!string.IsNullOrEmpty(Operator) && (textBoxFilterValue.Visible || comboBoxFilterValue.Visible) && string.IsNullOrEmpty(Value)) { - throw new EventGridException("Specify a value for the operator"); + throw new Exception("Specify a value for the operator"); } if (IsValueFieldInputValid()) @@ -123,13 +123,13 @@ private void btnOk_Click(object sender, EventArgs e) } } } + + DialogResult = DialogResult.OK; } catch (Exception ex) { HandleException(ex); } - - DialogResult = DialogResult.OK; } private void addFilter_Click(object sender, EventArgs e) @@ -156,12 +156,12 @@ private void addFilter_Click(object sender, EventArgs e) if (string.IsNullOrEmpty(Key) && !string.IsNullOrEmpty(Operator)) { - throw new EventGridException("Key cannot be empty"); + throw new Exception("Key cannot be empty"); } if (!string.IsNullOrEmpty(Operator) && (textBoxFilterValue.Visible || comboBoxFilterValue.Visible) && string.IsNullOrEmpty(Value)) { - throw new EventGridException("Specify a value for the operator"); + throw new Exception("Specify a value for the operator"); } if (IsValueFieldInputValid()) @@ -219,10 +219,7 @@ private void HandleException(Exception? ex) { return; } - if (ex.GetType() == typeof(EventGridException)) - { - throw ex; - } + writeToLog(string.Format(CultureInfo.CurrentCulture, ExceptionFormat, ex?.Message)); } diff --git a/src/ServiceBusExplorer/Forms/EventGridConnectForm.Designer.cs b/src/ServiceBusExplorer/Forms/EventGridConnectForm.Designer.cs index a7d457a2..966febf9 100644 --- a/src/ServiceBusExplorer/Forms/EventGridConnectForm.Designer.cs +++ b/src/ServiceBusExplorer/Forms/EventGridConnectForm.Designer.cs @@ -152,7 +152,7 @@ private void InitializeComponent() this.cboApiVersion.Location = new System.Drawing.Point(19, 200); this.cboApiVersion.Margin = new System.Windows.Forms.Padding(2); this.cboApiVersion.Name = "cboApiVersion"; - this.cboApiVersion.Size = new System.Drawing.Size(193, 28); + this.cboApiVersion.Size = new System.Drawing.Size(193, 21); this.cboApiVersion.TabIndex = 54; // // cloudGroupBox @@ -178,7 +178,7 @@ private void InitializeComponent() this.btnPublicCloud.ForeColor = System.Drawing.SystemColors.ControlText; this.btnPublicCloud.Location = new System.Drawing.Point(4, 7); this.btnPublicCloud.Name = "btnPublicCloud"; - this.btnPublicCloud.Size = new System.Drawing.Size(80, 24); + this.btnPublicCloud.Size = new System.Drawing.Size(54, 17); this.btnPublicCloud.TabIndex = 40; this.btnPublicCloud.TabStop = true; this.btnPublicCloud.Text = "Public"; @@ -190,7 +190,7 @@ private void InitializeComponent() this.btnCustomCloud.ForeColor = System.Drawing.SystemColors.ControlText; this.btnCustomCloud.Location = new System.Drawing.Point(4, 24); this.btnCustomCloud.Name = "btnCustomCloud"; - this.btnCustomCloud.Size = new System.Drawing.Size(170, 24); + this.btnCustomCloud.Size = new System.Drawing.Size(111, 17); this.btnCustomCloud.TabIndex = 40; this.btnCustomCloud.Text = "Custom Tenant ID"; this.btnCustomCloud.UseVisualStyleBackColor = true; @@ -204,7 +204,7 @@ private void InitializeComponent() this.txtCustomId.ForeColor = System.Drawing.SystemColors.ControlText; this.txtCustomId.Location = new System.Drawing.Point(121, 19); this.txtCustomId.Name = "txtCustomId"; - this.txtCustomId.Size = new System.Drawing.Size(188, 26); + this.txtCustomId.Size = new System.Drawing.Size(188, 20); this.txtCustomId.TabIndex = 41; // // lblCloud @@ -213,7 +213,7 @@ private void InitializeComponent() this.lblCloud.ForeColor = System.Drawing.SystemColors.ControlText; this.lblCloud.Location = new System.Drawing.Point(16, 276); this.lblCloud.Name = "lblCloud"; - this.lblCloud.Size = new System.Drawing.Size(113, 20); + this.lblCloud.Size = new System.Drawing.Size(74, 13); this.lblCloud.TabIndex = 51; this.lblCloud.Text = "Cloud Tenant:"; // @@ -224,7 +224,7 @@ private void InitializeComponent() this.txtRetryTimeout.ForeColor = System.Drawing.SystemColors.ControlText; this.txtRetryTimeout.Location = new System.Drawing.Point(16, 242); this.txtRetryTimeout.Name = "txtRetryTimeout"; - this.txtRetryTimeout.Size = new System.Drawing.Size(103, 26); + this.txtRetryTimeout.Size = new System.Drawing.Size(103, 20); this.txtRetryTimeout.TabIndex = 19; this.txtRetryTimeout.Text = "60"; // @@ -234,7 +234,7 @@ private void InitializeComponent() this.lblTimeout.ForeColor = System.Drawing.SystemColors.ControlText; this.lblTimeout.Location = new System.Drawing.Point(16, 227); this.lblTimeout.Name = "lblTimeout"; - this.lblTimeout.Size = new System.Drawing.Size(145, 20); + this.lblTimeout.Size = new System.Drawing.Size(90, 13); this.lblTimeout.TabIndex = 18; this.lblTimeout.Text = "Retry Timeout (s):"; // @@ -245,9 +245,8 @@ private void InitializeComponent() this.txtSubscriptionId.ForeColor = System.Drawing.SystemColors.ControlText; this.txtSubscriptionId.Location = new System.Drawing.Point(16, 49); this.txtSubscriptionId.Name = "txtSubscriptionId"; - this.txtSubscriptionId.Size = new System.Drawing.Size(336, 26); + this.txtSubscriptionId.Size = new System.Drawing.Size(336, 20); this.txtSubscriptionId.TabIndex = 16; - this.txtSubscriptionId.Text = "d33c5f7a-02ea-40f4-bf52-07f17e84d6a8"; // // lblApiVersion // @@ -255,7 +254,7 @@ private void InitializeComponent() this.lblApiVersion.ForeColor = System.Drawing.SystemColors.ControlText; this.lblApiVersion.Location = new System.Drawing.Point(16, 176); this.lblApiVersion.Name = "lblApiVersion"; - this.lblApiVersion.Size = new System.Drawing.Size(102, 20); + this.lblApiVersion.Size = new System.Drawing.Size(65, 13); this.lblApiVersion.TabIndex = 10; this.lblApiVersion.Text = "API Version:"; // @@ -269,7 +268,6 @@ private void InitializeComponent() this.txtResourceGroupName.Name = "txtResourceGroupName"; this.txtResourceGroupName.Size = new System.Drawing.Size(336, 20); this.txtResourceGroupName.TabIndex = 1; - this.txtResourceGroupName.Text = "HarriePlayGround"; // // lblResourceGroupName // @@ -277,7 +275,7 @@ private void InitializeComponent() this.lblResourceGroupName.ForeColor = System.Drawing.SystemColors.ControlText; this.lblResourceGroupName.Location = new System.Drawing.Point(16, 83); this.lblResourceGroupName.Name = "lblResourceGroupName"; - this.lblResourceGroupName.Size = new System.Drawing.Size(186, 20); + this.lblResourceGroupName.Size = new System.Drawing.Size(119, 13); this.lblResourceGroupName.TabIndex = 0; this.lblResourceGroupName.Text = "Resource Group Name:"; // @@ -287,7 +285,7 @@ private void InitializeComponent() this.lblSubscriptionId.ForeColor = System.Drawing.SystemColors.ControlText; this.lblSubscriptionId.Location = new System.Drawing.Point(16, 34); this.lblSubscriptionId.Name = "lblSubscriptionId"; - this.lblSubscriptionId.Size = new System.Drawing.Size(129, 20); + this.lblSubscriptionId.Size = new System.Drawing.Size(82, 13); this.lblSubscriptionId.TabIndex = 6; this.lblSubscriptionId.Text = "Subscription ID:"; // @@ -298,9 +296,8 @@ private void InitializeComponent() this.txtNamespaceName.ForeColor = System.Drawing.SystemColors.ControlText; this.txtNamespaceName.Location = new System.Drawing.Point(16, 145); this.txtNamespaceName.Name = "txtNamespaceName"; - this.txtNamespaceName.Size = new System.Drawing.Size(336, 26); + this.txtNamespaceName.Size = new System.Drawing.Size(336, 20); this.txtNamespaceName.TabIndex = 3; - this.txtNamespaceName.Text = "ServiceBusExplorerNamespace"; // // lblNamespaceName // @@ -308,7 +305,7 @@ private void InitializeComponent() this.lblNamespaceName.ForeColor = System.Drawing.SystemColors.ControlText; this.lblNamespaceName.Location = new System.Drawing.Point(16, 133); this.lblNamespaceName.Name = "lblNamespaceName"; - this.lblNamespaceName.Size = new System.Drawing.Size(152, 20); + this.lblNamespaceName.Size = new System.Drawing.Size(98, 13); this.lblNamespaceName.TabIndex = 2; this.lblNamespaceName.Text = "Namespace Name:"; //