From 17109ee15a4a093abce1cab339255e83568f5c3a Mon Sep 17 00:00:00 2001 From: Arnaud TAMAILLON Date: Wed, 30 Dec 2020 21:03:20 +0100 Subject: [PATCH 01/18] Prevent tab to switch after receiving messages (#489) --- src/ServiceBusExplorer/Forms/MainForm.Designer.cs | 2 +- src/ServiceBusExplorer/Forms/MainForm.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ServiceBusExplorer/Forms/MainForm.Designer.cs b/src/ServiceBusExplorer/Forms/MainForm.Designer.cs index 68476306..70378ab6 100644 --- a/src/ServiceBusExplorer/Forms/MainForm.Designer.cs +++ b/src/ServiceBusExplorer/Forms/MainForm.Designer.cs @@ -616,7 +616,7 @@ private void InitializeComponent() this.serviceBusTreeView.TabIndex = 13; this.serviceBusTreeView.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.serviceBusTreeView_BeforeExpand); this.serviceBusTreeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.serviceBusTreeView_NodeMouseClick); - this.serviceBusTreeView.KeyUp += new System.Windows.Forms.KeyEventHandler(this.serviceBusTreeView_KeyUp); + this.serviceBusTreeView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.serviceBusTreeView_KeyDown); // // panelMain // diff --git a/src/ServiceBusExplorer/Forms/MainForm.cs b/src/ServiceBusExplorer/Forms/MainForm.cs index a21d2610..429c3514 100644 --- a/src/ServiceBusExplorer/Forms/MainForm.cs +++ b/src/ServiceBusExplorer/Forms/MainForm.cs @@ -2273,7 +2273,7 @@ private void createEntity_Click(object sender, EventArgs e) } } - private void serviceBusTreeView_KeyUp(object sender, KeyEventArgs keyEventArgs) + private void serviceBusTreeView_KeyDown(object sender, KeyEventArgs keyEventArgs) { switch (keyEventArgs.KeyCode) { @@ -4622,6 +4622,7 @@ private void LazyLoadNode(TreeNode entityNode) SubscriptionRetrievedFormat, subscription.Name, topic.Path), false); treeNodesToLazyLoad.Add(subscriptionNode); + ApplyColor(subscriptionNode, true); } } } @@ -4654,6 +4655,7 @@ private void LazyLoadNode(TreeNode entityNode) topic.Path), false); } } + ApplyColor(subscriptionNode, true); } } catch (Exception ex) From b70bbb235327fb968f1c2c95f406351c30abf332 Mon Sep 17 00:00:00 2001 From: Arnaud TAMAILLON Date: Wed, 30 Dec 2020 21:05:24 +0100 Subject: [PATCH 02/18] Fix coloring of subscription nodes (#488) From 26efedacffbf1716a54dc01c5470c953d4aab43d Mon Sep 17 00:00:00 2001 From: Gabriel Weyer Date: Mon, 4 Jan 2021 21:03:30 +1100 Subject: [PATCH 03/18] Fix errors displayed by Rider / ReSharper (#491) * Ignore Rider directory The ".idea" directory is similar to the ".vs" directory and should not be committed. * Configure Rider and ReSharper C# language level * Decrease ReSharper code inspection severity This removes all the solution errors. Co-authored-by: Gabriel Weyer --- .gitignore | 3 ++ src/Common/Common.csproj.DotSettings | 2 ++ .../ServiceBusExplorer.Tests.csproj | 3 +- ...erviceBusExplorer.Tests.csproj.DotSettings | 2 ++ src/ServiceBusExplorer.sln.DotSettings | 29 ++++++++++--------- .../ServiceBusExplorer.csproj | 5 +--- .../ServiceBusExplorer.csproj.DotSettings | 2 ++ 7 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 src/Common/Common.csproj.DotSettings create mode 100644 src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj.DotSettings create mode 100644 src/ServiceBusExplorer/ServiceBusExplorer.csproj.DotSettings diff --git a/.gitignore b/.gitignore index e41ba880..7c41d0b5 100644 --- a/.gitignore +++ b/.gitignore @@ -157,3 +157,6 @@ $RECYCLE.BIN/ # Visual Studio 2015 cache/options directory .vs/ + +# JetBrains Rider +.idea/ diff --git a/src/Common/Common.csproj.DotSettings b/src/Common/Common.csproj.DotSettings new file mode 100644 index 00000000..ccad4e83 --- /dev/null +++ b/src/Common/Common.csproj.DotSettings @@ -0,0 +1,2 @@ + + Default diff --git a/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj b/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj index 48e6f9a8..74e57211 100644 --- a/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj +++ b/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj @@ -14,16 +14,15 @@ + latest AnyCPU bin\Debug\ - latest AnyCPU bin\Release\ - latest diff --git a/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj.DotSettings b/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj.DotSettings new file mode 100644 index 00000000..ccad4e83 --- /dev/null +++ b/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj.DotSettings @@ -0,0 +1,2 @@ + + Default diff --git a/src/ServiceBusExplorer.sln.DotSettings b/src/ServiceBusExplorer.sln.DotSettings index f05931a9..64d45c63 100644 --- a/src/ServiceBusExplorer.sln.DotSettings +++ b/src/ServiceBusExplorer.sln.DotSettings @@ -20,7 +20,7 @@ WARNING ERROR ERROR - ERROR + WARNING ERROR ERROR DO_NOT_SHOW @@ -31,7 +31,7 @@ ERROR ERROR ERROR - ERROR + WARNING ERROR ERROR ERROR @@ -49,7 +49,7 @@ ERROR DO_NOT_SHOW DO_NOT_SHOW - ERROR + WARNING DO_NOT_SHOW DO_NOT_SHOW ERROR @@ -63,7 +63,7 @@ ERROR WARNING ERROR - ERROR + WARNING ERROR ERROR ERROR @@ -80,20 +80,20 @@ ERROR SUGGESTION ERROR - ERROR - ERROR + WARNING + WARNING ERROR ERROR ERROR ERROR ERROR - ERROR - ERROR + WARNING + WARNING ERROR WARNING - ERROR + WARNING ERROR - ERROR + WARNING DoHide DoHide DoHide @@ -116,9 +116,9 @@ ERROR ERROR ERROR - ERROR + WARNING ERROR - ERROR + WARNING ERROR ERROR ERROR @@ -130,7 +130,7 @@ SUGGESTION WARNING WARNING - ERROR + WARNING HINT WARNING ERROR @@ -590,6 +590,9 @@ II.2.12 <HandlesEvent /> <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> True + True + True + True True True True diff --git a/src/ServiceBusExplorer/ServiceBusExplorer.csproj b/src/ServiceBusExplorer/ServiceBusExplorer.csproj index f30a70b5..70f303e3 100644 --- a/src/ServiceBusExplorer/ServiceBusExplorer.csproj +++ b/src/ServiceBusExplorer/ServiceBusExplorer.csproj @@ -35,6 +35,7 @@ false false true + 8 AnyCPU @@ -47,7 +48,6 @@ 4 false true - 8 AnyCPU @@ -58,7 +58,6 @@ prompt 4 false - 8 NewServiceBusExplorerLogo.ico @@ -77,7 +76,6 @@ AnyCPU prompt MinimumRecommendedRules.ruleset - 8 bin\Release\ @@ -88,7 +86,6 @@ prompt MinimumRecommendedRules.ruleset false - 8 true diff --git a/src/ServiceBusExplorer/ServiceBusExplorer.csproj.DotSettings b/src/ServiceBusExplorer/ServiceBusExplorer.csproj.DotSettings new file mode 100644 index 00000000..ccad4e83 --- /dev/null +++ b/src/ServiceBusExplorer/ServiceBusExplorer.csproj.DotSettings @@ -0,0 +1,2 @@ + + Default From 78c9e1fa85ed0b587608a3e47e72b98996d2a56b Mon Sep 17 00:00:00 2001 From: Arnaud TAMAILLON Date: Mon, 4 Jan 2021 11:52:17 +0100 Subject: [PATCH 04/18] UI refactorings & enhancements (#493) * Enhance numeric text box configurability * Switch to numeric text box where intended * Create a TimeSpan control * Switch Custom Properties display to PropertyGrid * Harmonize "long" DateTime formats to 24h/short month * Fix time filter date time format and filter form operator incorrect parsing --- .../DataGridViewDateTimePickerColumn.cs | 6 +- .../Controls/HandleNotificationHubControl.cs | 183 +-- .../HandleNotificationHubControl.designer.cs | 1246 +++++------------ .../HandleNotificationHubControl.resx | 106 +- .../Controls/HandleQueueControl.Designer.cs | 730 ++-------- .../Controls/HandleQueueControl.cs | 698 ++------- .../HandleSubscriptionControl.Designer.cs | 524 +------ .../Controls/HandleSubscriptionControl.cs | 482 +------ .../Controls/HandleTopicControl.Designer.cs | 594 ++------ .../Controls/HandleTopicControl.cs | 462 +----- .../Controls/ListenerControl.Designer.cs | 248 ++-- .../Controls/ListenerControl.cs | 12 +- .../Controls/NumericTextBox.cs | 53 +- .../PartitionListenerControl.Designer.cs | 2 +- .../Controls/TimeSpanControl.Designer.cs | 183 +++ .../Controls/TimeSpanControl.cs | 88 ++ .../Controls/TimeSpanControl.resx | 120 ++ .../Forms/DateTimeForm.Designer.cs | 4 +- .../Forms/DateTimeRangeForm.Designer.cs | 4 +- .../Forms/FilterForm.Designer.cs | 3 +- src/ServiceBusExplorer/Forms/FilterForm.cs | 42 +- .../Forms/ReceiveModeForm.Designer.cs | 9 +- .../Forms/ReceiveModeForm.cs | 35 - .../Forms/RegistrationsForm.Designer.cs | 7 +- .../Forms/RegistrationsForm.cs | 35 - .../ServiceBusExplorer.csproj | 13 +- .../UIHelpers/DictionaryPropertyDescriptor.cs | 69 + .../DictionaryPropertyGridAdapter.cs | 87 ++ src/Utilities/Helpers/TimeFilterInfo.cs | 6 +- 29 files changed, 1666 insertions(+), 4385 deletions(-) create mode 100644 src/ServiceBusExplorer/Controls/TimeSpanControl.Designer.cs create mode 100644 src/ServiceBusExplorer/Controls/TimeSpanControl.cs create mode 100644 src/ServiceBusExplorer/Controls/TimeSpanControl.resx create mode 100644 src/ServiceBusExplorer/UIHelpers/DictionaryPropertyDescriptor.cs create mode 100644 src/ServiceBusExplorer/UIHelpers/DictionaryPropertyGridAdapter.cs diff --git a/src/ServiceBusExplorer/Controls/DataGridViewDateTimePickerColumn.cs b/src/ServiceBusExplorer/Controls/DataGridViewDateTimePickerColumn.cs index 718a3987..601e8a73 100644 --- a/src/ServiceBusExplorer/Controls/DataGridViewDateTimePickerColumn.cs +++ b/src/ServiceBusExplorer/Controls/DataGridViewDateTimePickerColumn.cs @@ -59,7 +59,7 @@ public class CalendarCell : DataGridViewTextBoxCell public CalendarCell() { // Use the short date format. - Style.Format = "yyyy/MM/dd HH:mm"; + Style.Format = "dd MMM yyyy HH:mm:ss"; } public override void InitializeEditingControl(int rowIndex, object initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle) @@ -73,7 +73,7 @@ public override void InitializeEditingControl(int rowIndex, object initialFormat control.Format = DateTimePickerFormat.Custom; control.ShowUpDown = false; // ReSharper disable LocalizableElement - control.CustomFormat = "yyyy/MM/dd HH:mm"; + control.CustomFormat = "dd MMM yyyy HH:mm:ss"; if (DefaultNewRowValue == null) { control.Value = DateTime.Now; @@ -120,7 +120,7 @@ public CalendarEditingControl() // property. public object EditingControlFormattedValue { - get { return Value.ToString("yyyy/MM/dd HH:mm"); } + get { return Value.ToString("dd MMM yyyy HH:mm:ss"); } set { var s = value as string; diff --git a/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.cs b/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.cs index dfd283ee..57297b9e 100644 --- a/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.cs @@ -29,10 +29,8 @@ using System.Globalization; using System.Linq; using System.Reflection; -using System.Runtime.InteropServices; using System.Security.Cryptography.X509Certificates; using System.Text; -using System.Threading; using System.Web.Script.Serialization; using System.Windows.Forms; using Microsoft.Azure.NotificationHubs; @@ -114,11 +112,7 @@ public partial class HandleNotificationHubControl : UserControl private const string SelectNotificationTemplate = "Select a Notification Template..."; private const string ManualTemplate = "Manual"; private const string PathCannotBeNull = "The Path field cannot be null."; - private const string DuplicateDetectionHistoryTimeWindowDaysMustBeANumber = "The Days value of the DuplicateDetectionHistoryTimeWindow field must be a number."; - private const string DuplicateDetectionHistoryTimeWindowHoursMustBeANumber = "The Hours value of the DuplicateDetectionHistoryTimeWindow field must be a number."; - private const string DuplicateDetectionHistoryTimeWindowMinutesMustBeANumber = "The Minutes value of the DuplicateDetectionHistoryTimeWindow field must be a number."; - private const string DuplicateDetectionHistoryTimeWindowSecondsMustBeANumber = "The Seconds value of the DuplicateDetectionHistoryTimeWindow field must be a number."; - private const string DuplicateDetectionHistoryTimeWindowMillisecondsMustBeANumber = "The Milliseconds value of the DuplicateDetectionHistoryTimeWindow field must be a number."; + private const string RegistrationTimeToLive = "RegistrationTimeToLive"; private const string NotificationPayloadCannotBeNull = "The notification payload cannot be null."; private const string JsonPayloadTemplateCannotBeNull = "The JSON payload cannot be null."; private const string PayloadIsNotInJsonFormat = "The payload is not in JSON format."; @@ -404,11 +398,7 @@ private void InitializeControls() txtPath.GotFocus += textBox_GotFocus; toolTip.SetToolTip(txtPath, PathTooltip); - toolTip.SetToolTip(txtRegistrationTimeToLiveWindowDays, DuplicateDetectionHistoryTimeWindowTooltip); - toolTip.SetToolTip(txtRegistrationTimeToLiveWindowHours, DuplicateDetectionHistoryTimeWindowTooltip); - toolTip.SetToolTip(txtRegistrationTimeToLiveWindowMinutes, DuplicateDetectionHistoryTimeWindowTooltip); - toolTip.SetToolTip(txtRegistrationTimeToLiveWindowSeconds, DuplicateDetectionHistoryTimeWindowTooltip); - toolTip.SetToolTip(txtRegistrationTimeToLiveWindowMilliseconds, DuplicateDetectionHistoryTimeWindowTooltip); + toolTip.SetToolTip(tsRegistrationTimeToLive, DuplicateDetectionHistoryTimeWindowTooltip); toolTip.SetToolTip(txtPackageSid, PackageSidTooltip); toolTip.SetToolTip(txtClientSecret, ClientSecretTooltip); toolTip.SetToolTip(txtMpnsCredentialCertificateThumbprint, MpnsCertificateThumbprintTooltip); @@ -1194,11 +1184,7 @@ private void InitializeData() // RegistrationTtl if (notificationHubDescription.RegistrationTtl != null) { - txtRegistrationTimeToLiveWindowDays.Text = notificationHubDescription.RegistrationTtl.Value.Days.ToString(CultureInfo.InvariantCulture); - txtRegistrationTimeToLiveWindowHours.Text = notificationHubDescription.RegistrationTtl.Value.Hours.ToString(CultureInfo.InvariantCulture); - txtRegistrationTimeToLiveWindowMinutes.Text = notificationHubDescription.RegistrationTtl.Value.Minutes.ToString(CultureInfo.InvariantCulture); - txtRegistrationTimeToLiveWindowSeconds.Text = notificationHubDescription.RegistrationTtl.Value.Seconds.ToString(CultureInfo.InvariantCulture); - txtRegistrationTimeToLiveWindowMilliseconds.Text = notificationHubDescription.RegistrationTtl.Value.Milliseconds.ToString(CultureInfo.InvariantCulture); + tsRegistrationTimeToLive.TimeSpanValue = notificationHubDescription.RegistrationTtl; } if (notificationHubDescription.WnsCredential != null) @@ -2074,61 +2060,16 @@ private async void btnCreateDelete_Click(object sender, EventArgs e) mpnsCredentialCertificateKey); } - var days = 0; - var hours = 0; - var minutes = 0; - var seconds = 0; - var milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowDays.Text) || - !string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowHours.Text) || - !string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowMinutes.Text) || - !string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowSeconds.Text) || - !string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowMilliseconds.Text)) + if (tsRegistrationTimeToLive.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowDays.Text)) - { - if (!int.TryParse(txtRegistrationTimeToLiveWindowDays.Text, out days)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowHours.Text)) - { - if (!int.TryParse(txtRegistrationTimeToLiveWindowHours.Text, out hours)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowMinutes.Text)) - { - if (!int.TryParse(txtRegistrationTimeToLiveWindowMinutes.Text, out minutes)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowSeconds.Text)) - { - if (!int.TryParse(txtRegistrationTimeToLiveWindowSeconds.Text, out seconds)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowMilliseconds.Text)) - { - if (!int.TryParse(txtRegistrationTimeToLiveWindowMilliseconds.Text, out milliseconds)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowMillisecondsMustBeANumber); - return; - } - } - description.RegistrationTtl = new TimeSpan(days, hours, minutes, seconds, milliseconds); + description.RegistrationTtl = tsRegistrationTimeToLive.TimeSpanValue.Value; } - + else + { + writeToLog(tsRegistrationTimeToLive.GetErrorMessage(RegistrationTimeToLive)); + return; + } + var bindingList = authorizationRulesBindingSource.DataSource as BindingList; if (bindingList != null) { @@ -2221,59 +2162,14 @@ private void btnCancelUpdate_Click(object sender, EventArgs e) { try { - var days = 0; - var hours = 0; - var minutes = 0; - var seconds = 0; - var milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowDays.Text) || - !string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowHours.Text) || - !string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowMinutes.Text) || - !string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowSeconds.Text) || - !string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowMilliseconds.Text)) + if (tsRegistrationTimeToLive.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowDays.Text)) - { - if (!int.TryParse(txtRegistrationTimeToLiveWindowDays.Text, out days)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowHours.Text)) - { - if (!int.TryParse(txtRegistrationTimeToLiveWindowHours.Text, out hours)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowMinutes.Text)) - { - if (!int.TryParse(txtRegistrationTimeToLiveWindowMinutes.Text, out minutes)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowSeconds.Text)) - { - if (!int.TryParse(txtRegistrationTimeToLiveWindowSeconds.Text, out seconds)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtRegistrationTimeToLiveWindowMilliseconds.Text)) - { - if (!int.TryParse(txtRegistrationTimeToLiveWindowMilliseconds.Text, out milliseconds)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowMillisecondsMustBeANumber); - return; - } - } - notificationHubDescription.RegistrationTtl = new TimeSpan(days, hours, minutes, seconds, milliseconds); + notificationHubDescription.RegistrationTtl = tsRegistrationTimeToLive.TimeSpanValue.Value; + } + else + { + writeToLog(tsRegistrationTimeToLive.GetErrorMessage(RegistrationTimeToLive)); + return; } notificationHubDescription.WnsCredential = !string.IsNullOrWhiteSpace(txtPackageSid.Text) && @@ -2412,42 +2308,7 @@ private void button_MouseLeave(object sender, EventArgs e) control.ForeColor = SystemColors.ControlText; } } - - private void textBox_KeyPress(object sender, KeyPressEventArgs e) - { - OnKeyPress(e); - - var numberFormatInfo = CultureInfo.CurrentCulture.NumberFormat; - var decimalSeparator = numberFormatInfo.NumberDecimalSeparator; - var groupSeparator = numberFormatInfo.NumberGroupSeparator; - var negativeSign = numberFormatInfo.NegativeSign; - - var keyInput = e.KeyChar.ToString(CultureInfo.InvariantCulture); - - if (Char.IsDigit(e.KeyChar)) - { - // Digits are OK - } - else if (keyInput.Equals(decimalSeparator) || keyInput.Equals(groupSeparator) || - keyInput.Equals(negativeSign)) - { - // Decimal separator is OK - } - else if (e.KeyChar == '\b') - { - // Backspace key is OK - } - else if (e.KeyChar == ' ') - { - - } - else - { - // Swallow this invalid key and beep - e.Handled = true; - } - } - + private void mainTabControl_SelectedIndexChanged(object sender, EventArgs e) { btnRegistrations.Enabled = mainTabControl.SelectedTab.Name == DescriptionPage || mainTabControl.SelectedTab.Name == AuthorizationPage || mainTabControl.SelectedTab.Name == RegistrationsPage; @@ -2461,12 +2322,6 @@ private void mainTabControl_SelectedIndexChanged(object sender, EventArgs e) } } - private void tabPageAppleNativeNotification_Resize(object sender, EventArgs e) - { - grouperExpiry.Size = new Size(grouperExpiry.Size.Width, - appleSplitContainer.Panel2.Size.Height); - } - private void btnRegistrations_Click(object sender, EventArgs e) { GetRegistrations(true, null); diff --git a/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.designer.cs b/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.designer.cs index 4d6fb536..396cb2c0 100644 --- a/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.designer.cs +++ b/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.designer.cs @@ -55,16 +55,7 @@ private void InitializeComponent() this.lblPackageSid = new System.Windows.Forms.Label(); this.txtPackageSid = new System.Windows.Forms.TextBox(); this.grouperDuplicateDetectionHistoryTimeWindow = new ServiceBusExplorer.Controls.Grouper(); - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds = new System.Windows.Forms.Label(); - this.txtRegistrationTimeToLiveWindowMilliseconds = new System.Windows.Forms.TextBox(); - this.lblDuplicateDetectionHistoryTimeWindowSeconds = new System.Windows.Forms.Label(); - this.txtRegistrationTimeToLiveWindowSeconds = new System.Windows.Forms.TextBox(); - this.lblDuplicateDetectionHistoryTimeWindowMinutes = new System.Windows.Forms.Label(); - this.txtRegistrationTimeToLiveWindowMinutes = new System.Windows.Forms.TextBox(); - this.lblDuplicateDetectionHistoryTimeWindowHours = new System.Windows.Forms.Label(); - this.lblDuplicateDetectionHistoryTimeWindowDays = new System.Windows.Forms.Label(); - this.txtRegistrationTimeToLiveWindowHours = new System.Windows.Forms.TextBox(); - this.txtRegistrationTimeToLiveWindowDays = new System.Windows.Forms.TextBox(); + this.tsRegistrationTimeToLive = new ServiceBusExplorer.Controls.TimeSpanControl(); this.grouperPath = new ServiceBusExplorer.Controls.Grouper(); this.lblRelativeURI = new System.Windows.Forms.Label(); this.txtPath = new System.Windows.Forms.TextBox(); @@ -165,18 +156,7 @@ private void InitializeComponent() this.appleHeadersDataGridView = new System.Windows.Forms.DataGridView(); this.tabAppleNotificationExpiry = new System.Windows.Forms.TabPage(); this.grouperApnsExpiry = new ServiceBusExplorer.Controls.Grouper(); - this.label1 = new System.Windows.Forms.Label(); - this.txtApnsExpiryMilliseconds = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.txtApnsExpirySeconds = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.txtApnsExpiryMinutes = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.txtApnsExpiryHours = new System.Windows.Forms.TextBox(); - this.txtApnsExpiryDays = new System.Windows.Forms.TextBox(); - this.grouperExpiry = new ServiceBusExplorer.Controls.Grouper(); - this.expiryDateTimePicker = new System.Windows.Forms.DateTimePicker(); + this.tsApnsExpiry = new ServiceBusExplorer.Controls.TimeSpanControl(); this.tabPageGoogleNativeNotification = new System.Windows.Forms.TabPage(); this.gcmSplitContainer = new System.Windows.Forms.SplitContainer(); this.grouper1 = new ServiceBusExplorer.Controls.Grouper(); @@ -193,8 +173,6 @@ private void InitializeComponent() this.tabGcmAdditionalHeaders = new System.Windows.Forms.TabPage(); this.grouperGcmAdditionalHeaders = new ServiceBusExplorer.Controls.Grouper(); this.gcmHeadersDataGridView = new System.Windows.Forms.DataGridView(); - this.grouper4 = new ServiceBusExplorer.Controls.Grouper(); - this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker(); this.btnRefresh = new System.Windows.Forms.Button(); this.btnCancelUpdate = new System.Windows.Forms.Button(); this.btnCreateDelete = new System.Windows.Forms.Button(); @@ -326,7 +304,6 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.appleHeadersDataGridView)).BeginInit(); this.tabAppleNotificationExpiry.SuspendLayout(); this.grouperApnsExpiry.SuspendLayout(); - this.grouperExpiry.SuspendLayout(); this.tabPageGoogleNativeNotification.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gcmSplitContainer)).BeginInit(); this.gcmSplitContainer.Panel1.SuspendLayout(); @@ -347,7 +324,6 @@ private void InitializeComponent() this.tabGcmAdditionalHeaders.SuspendLayout(); this.grouperGcmAdditionalHeaders.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gcmHeadersDataGridView)).BeginInit(); - this.grouper4.SuspendLayout(); this.registrationContextMenuStrip.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.templatePropertiesBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.wnsHeadersBindingSource)).BeginInit(); @@ -373,10 +349,9 @@ private void InitializeComponent() this.btnSend.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnSend.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSend.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnSend.Location = new System.Drawing.Point(907, 620); - this.btnSend.Margin = new System.Windows.Forms.Padding(4); + this.btnSend.Location = new System.Drawing.Point(680, 504); this.btnSend.Name = "btnSend"; - this.btnSend.Size = new System.Drawing.Size(96, 30); + this.btnSend.Size = new System.Drawing.Size(72, 24); this.btnSend.TabIndex = 3; this.btnSend.Text = "Send"; this.btnSend.UseVisualStyleBackColor = false; @@ -400,12 +375,11 @@ private void InitializeComponent() this.mainTabControl.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this.mainTabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.mainTabControl.ItemSize = new System.Drawing.Size(76, 18); - this.mainTabControl.Location = new System.Drawing.Point(21, 20); - this.mainTabControl.Margin = new System.Windows.Forms.Padding(4); + this.mainTabControl.Location = new System.Drawing.Point(16, 16); this.mainTabControl.Multiline = true; this.mainTabControl.Name = "mainTabControl"; this.mainTabControl.SelectedIndex = 0; - this.mainTabControl.Size = new System.Drawing.Size(1301, 591); + this.mainTabControl.Size = new System.Drawing.Size(976, 480); this.mainTabControl.TabIndex = 4; this.mainTabControl.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.mainTabControl_DrawItem); this.mainTabControl.SelectedIndexChanged += new System.EventHandler(this.mainTabControl_SelectedIndexChanged); @@ -423,10 +397,9 @@ private void InitializeComponent() this.tabPageDescription.Controls.Add(this.grouperPath); this.tabPageDescription.ForeColor = System.Drawing.SystemColors.ControlText; this.tabPageDescription.Location = new System.Drawing.Point(4, 22); - this.tabPageDescription.Margin = new System.Windows.Forms.Padding(4); this.tabPageDescription.Name = "tabPageDescription"; - this.tabPageDescription.Padding = new System.Windows.Forms.Padding(4); - this.tabPageDescription.Size = new System.Drawing.Size(1293, 565); + this.tabPageDescription.Padding = new System.Windows.Forms.Padding(3); + this.tabPageDescription.Size = new System.Drawing.Size(968, 454); this.tabPageDescription.TabIndex = 3; this.tabPageDescription.Text = "Description"; // @@ -445,16 +418,15 @@ private void InitializeComponent() this.grouperNotificationHubInformation.ForeColor = System.Drawing.Color.White; this.grouperNotificationHubInformation.GroupImage = null; this.grouperNotificationHubInformation.GroupTitle = "Notification Hub Information"; - this.grouperNotificationHubInformation.Location = new System.Drawing.Point(875, 138); - this.grouperNotificationHubInformation.Margin = new System.Windows.Forms.Padding(4); + this.grouperNotificationHubInformation.Location = new System.Drawing.Point(656, 112); this.grouperNotificationHubInformation.Name = "grouperNotificationHubInformation"; - this.grouperNotificationHubInformation.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperNotificationHubInformation.Padding = new System.Windows.Forms.Padding(20); this.grouperNotificationHubInformation.PaintGroupBox = true; this.grouperNotificationHubInformation.RoundCorners = 4; this.grouperNotificationHubInformation.ShadowColor = System.Drawing.Color.DarkGray; this.grouperNotificationHubInformation.ShadowControl = false; this.grouperNotificationHubInformation.ShadowThickness = 1; - this.grouperNotificationHubInformation.Size = new System.Drawing.Size(395, 400); + this.grouperNotificationHubInformation.Size = new System.Drawing.Size(296, 325); this.grouperNotificationHubInformation.TabIndex = 36; // // propertyListView @@ -465,11 +437,11 @@ private void InitializeComponent() this.propertyListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.nameColumnHeader, this.valueColumnHeader}); - this.propertyListView.Location = new System.Drawing.Point(21, 39); - this.propertyListView.Margin = new System.Windows.Forms.Padding(4); + this.propertyListView.HideSelection = false; + this.propertyListView.Location = new System.Drawing.Point(16, 32); this.propertyListView.Name = "propertyListView"; this.propertyListView.OwnerDraw = true; - this.propertyListView.Size = new System.Drawing.Size(351, 340); + this.propertyListView.Size = new System.Drawing.Size(264, 277); this.propertyListView.TabIndex = 0; this.propertyListView.UseCompatibleStateImageBehavior = false; this.propertyListView.View = System.Windows.Forms.View.Details; @@ -504,16 +476,15 @@ private void InitializeComponent() this.grouperUserMetadata.ForeColor = System.Drawing.Color.White; this.grouperUserMetadata.GroupImage = null; this.grouperUserMetadata.GroupTitle = "User Metdata"; - this.grouperUserMetadata.Location = new System.Drawing.Point(448, 20); - this.grouperUserMetadata.Margin = new System.Windows.Forms.Padding(4); + this.grouperUserMetadata.Location = new System.Drawing.Point(336, 16); this.grouperUserMetadata.Name = "grouperUserMetadata"; - this.grouperUserMetadata.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperUserMetadata.Padding = new System.Windows.Forms.Padding(20); this.grouperUserMetadata.PaintGroupBox = true; this.grouperUserMetadata.RoundCorners = 4; this.grouperUserMetadata.ShadowColor = System.Drawing.Color.DarkGray; this.grouperUserMetadata.ShadowControl = false; this.grouperUserMetadata.ShadowThickness = 1; - this.grouperUserMetadata.Size = new System.Drawing.Size(405, 108); + this.grouperUserMetadata.Size = new System.Drawing.Size(304, 88); this.grouperUserMetadata.TabIndex = 34; // // txtUserMetadata @@ -521,20 +492,18 @@ private void InitializeComponent() this.txtUserMetadata.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.txtUserMetadata.BackColor = System.Drawing.SystemColors.Window; - this.txtUserMetadata.Location = new System.Drawing.Point(27, 52); - this.txtUserMetadata.Margin = new System.Windows.Forms.Padding(4); + this.txtUserMetadata.Location = new System.Drawing.Point(20, 48); this.txtUserMetadata.Name = "txtUserMetadata"; - this.txtUserMetadata.Size = new System.Drawing.Size(308, 23); + this.txtUserMetadata.Size = new System.Drawing.Size(232, 20); this.txtUserMetadata.TabIndex = 28; // // lblUserMetadata // this.lblUserMetadata.AutoSize = true; this.lblUserMetadata.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblUserMetadata.Location = new System.Drawing.Point(27, 32); - this.lblUserMetadata.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblUserMetadata.Location = new System.Drawing.Point(20, 32); this.lblUserMetadata.Name = "lblUserMetadata"; - this.lblUserMetadata.Size = new System.Drawing.Size(187, 17); + this.lblUserMetadata.Size = new System.Drawing.Size(142, 13); this.lblUserMetadata.TabIndex = 30; this.lblUserMetadata.Text = "Notification Hub Description:"; // @@ -547,10 +516,9 @@ private void InitializeComponent() this.btnOpenDescriptionForm.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnOpenDescriptionForm.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOpenDescriptionForm.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnOpenDescriptionForm.Location = new System.Drawing.Point(347, 52); - this.btnOpenDescriptionForm.Margin = new System.Windows.Forms.Padding(4); + this.btnOpenDescriptionForm.Location = new System.Drawing.Point(260, 48); this.btnOpenDescriptionForm.Name = "btnOpenDescriptionForm"; - this.btnOpenDescriptionForm.Size = new System.Drawing.Size(32, 26); + this.btnOpenDescriptionForm.Size = new System.Drawing.Size(24, 21); this.btnOpenDescriptionForm.TabIndex = 29; this.btnOpenDescriptionForm.Text = "..."; this.btnOpenDescriptionForm.TextAlign = System.Drawing.ContentAlignment.TopCenter; @@ -576,16 +544,15 @@ private void InitializeComponent() this.grouperGoogleCloudMessaggingSettings.ForeColor = System.Drawing.Color.White; this.grouperGoogleCloudMessaggingSettings.GroupImage = null; this.grouperGoogleCloudMessaggingSettings.GroupTitle = "Google Cloud Messagging Settings"; - this.grouperGoogleCloudMessaggingSettings.Location = new System.Drawing.Point(448, 138); - this.grouperGoogleCloudMessaggingSettings.Margin = new System.Windows.Forms.Padding(4); + this.grouperGoogleCloudMessaggingSettings.Location = new System.Drawing.Point(336, 112); this.grouperGoogleCloudMessaggingSettings.Name = "grouperGoogleCloudMessaggingSettings"; - this.grouperGoogleCloudMessaggingSettings.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperGoogleCloudMessaggingSettings.Padding = new System.Windows.Forms.Padding(20); this.grouperGoogleCloudMessaggingSettings.PaintGroupBox = true; this.grouperGoogleCloudMessaggingSettings.RoundCorners = 4; this.grouperGoogleCloudMessaggingSettings.ShadowColor = System.Drawing.Color.DarkGray; this.grouperGoogleCloudMessaggingSettings.ShadowControl = false; this.grouperGoogleCloudMessaggingSettings.ShadowThickness = 1; - this.grouperGoogleCloudMessaggingSettings.Size = new System.Drawing.Size(405, 197); + this.grouperGoogleCloudMessaggingSettings.Size = new System.Drawing.Size(304, 160); this.grouperGoogleCloudMessaggingSettings.TabIndex = 33; // // btnClearGcmNotification @@ -597,10 +564,9 @@ private void InitializeComponent() this.btnClearGcmNotification.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnClearGcmNotification.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnClearGcmNotification.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnClearGcmNotification.Location = new System.Drawing.Point(288, 153); - this.btnClearGcmNotification.Margin = new System.Windows.Forms.Padding(4); + this.btnClearGcmNotification.Location = new System.Drawing.Point(216, 124); this.btnClearGcmNotification.Name = "btnClearGcmNotification"; - this.btnClearGcmNotification.Size = new System.Drawing.Size(96, 30); + this.btnClearGcmNotification.Size = new System.Drawing.Size(72, 24); this.btnClearGcmNotification.TabIndex = 36; this.btnClearGcmNotification.Text = "Clear"; this.btnClearGcmNotification.UseVisualStyleBackColor = false; @@ -611,21 +577,19 @@ private void InitializeComponent() this.txtGcmEndpoint.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.txtGcmEndpoint.BackColor = System.Drawing.SystemColors.Window; - this.txtGcmEndpoint.Location = new System.Drawing.Point(21, 113); - this.txtGcmEndpoint.Margin = new System.Windows.Forms.Padding(4); + this.txtGcmEndpoint.Location = new System.Drawing.Point(16, 92); this.txtGcmEndpoint.Name = "txtGcmEndpoint"; this.txtGcmEndpoint.ReadOnly = true; - this.txtGcmEndpoint.Size = new System.Drawing.Size(361, 23); + this.txtGcmEndpoint.Size = new System.Drawing.Size(272, 20); this.txtGcmEndpoint.TabIndex = 27; // // lblGcmEndpoint // this.lblGcmEndpoint.AutoSize = true; this.lblGcmEndpoint.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblGcmEndpoint.Location = new System.Drawing.Point(21, 94); - this.lblGcmEndpoint.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblGcmEndpoint.Location = new System.Drawing.Point(16, 76); this.lblGcmEndpoint.Name = "lblGcmEndpoint"; - this.lblGcmEndpoint.Size = new System.Drawing.Size(103, 17); + this.lblGcmEndpoint.Size = new System.Drawing.Size(79, 13); this.lblGcmEndpoint.TabIndex = 26; this.lblGcmEndpoint.Text = "GCM Endpoint:"; // @@ -633,10 +597,9 @@ private void InitializeComponent() // this.lblGcmApiKey.AutoSize = true; this.lblGcmApiKey.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblGcmApiKey.Location = new System.Drawing.Point(21, 39); - this.lblGcmApiKey.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblGcmApiKey.Location = new System.Drawing.Point(16, 32); this.lblGcmApiKey.Name = "lblGcmApiKey"; - this.lblGcmApiKey.Size = new System.Drawing.Size(96, 17); + this.lblGcmApiKey.Size = new System.Drawing.Size(75, 13); this.lblGcmApiKey.TabIndex = 25; this.lblGcmApiKey.Text = "GCM API Key:"; // @@ -646,10 +609,9 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtGcmApiKey.BackColor = System.Drawing.SystemColors.Window; this.txtGcmApiKey.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.txtGcmApiKey.Location = new System.Drawing.Point(21, 59); - this.txtGcmApiKey.Margin = new System.Windows.Forms.Padding(4); + this.txtGcmApiKey.Location = new System.Drawing.Point(16, 48); this.txtGcmApiKey.Name = "txtGcmApiKey"; - this.txtGcmApiKey.Size = new System.Drawing.Size(361, 23); + this.txtGcmApiKey.Size = new System.Drawing.Size(272, 20); this.txtGcmApiKey.TabIndex = 0; // // grouperWindowsPhoneNotificationSettings @@ -672,16 +634,15 @@ private void InitializeComponent() this.grouperWindowsPhoneNotificationSettings.ForeColor = System.Drawing.Color.White; this.grouperWindowsPhoneNotificationSettings.GroupImage = null; this.grouperWindowsPhoneNotificationSettings.GroupTitle = "Windows Phone Notification Settings"; - this.grouperWindowsPhoneNotificationSettings.Location = new System.Drawing.Point(21, 345); - this.grouperWindowsPhoneNotificationSettings.Margin = new System.Windows.Forms.Padding(4); + this.grouperWindowsPhoneNotificationSettings.Location = new System.Drawing.Point(16, 280); this.grouperWindowsPhoneNotificationSettings.Name = "grouperWindowsPhoneNotificationSettings"; - this.grouperWindowsPhoneNotificationSettings.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperWindowsPhoneNotificationSettings.Padding = new System.Windows.Forms.Padding(20); this.grouperWindowsPhoneNotificationSettings.PaintGroupBox = true; this.grouperWindowsPhoneNotificationSettings.RoundCorners = 4; this.grouperWindowsPhoneNotificationSettings.ShadowColor = System.Drawing.Color.DarkGray; this.grouperWindowsPhoneNotificationSettings.ShadowControl = false; this.grouperWindowsPhoneNotificationSettings.ShadowThickness = 1; - this.grouperWindowsPhoneNotificationSettings.Size = new System.Drawing.Size(405, 197); + this.grouperWindowsPhoneNotificationSettings.Size = new System.Drawing.Size(304, 160); this.grouperWindowsPhoneNotificationSettings.TabIndex = 32; // // btnClearMpnsNotification @@ -693,10 +654,9 @@ private void InitializeComponent() this.btnClearMpnsNotification.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnClearMpnsNotification.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnClearMpnsNotification.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnClearMpnsNotification.Location = new System.Drawing.Point(288, 153); - this.btnClearMpnsNotification.Margin = new System.Windows.Forms.Padding(4); + this.btnClearMpnsNotification.Location = new System.Drawing.Point(216, 124); this.btnClearMpnsNotification.Name = "btnClearMpnsNotification"; - this.btnClearMpnsNotification.Size = new System.Drawing.Size(96, 30); + this.btnClearMpnsNotification.Size = new System.Drawing.Size(72, 24); this.btnClearMpnsNotification.TabIndex = 35; this.btnClearMpnsNotification.Text = "Clear"; this.btnClearMpnsNotification.UseVisualStyleBackColor = false; @@ -706,10 +666,9 @@ private void InitializeComponent() // this.checkBoxEnableUnauthenticatedMpns.AutoSize = true; this.checkBoxEnableUnauthenticatedMpns.ForeColor = System.Drawing.SystemColors.ControlText; - this.checkBoxEnableUnauthenticatedMpns.Location = new System.Drawing.Point(21, 113); - this.checkBoxEnableUnauthenticatedMpns.Margin = new System.Windows.Forms.Padding(4); + this.checkBoxEnableUnauthenticatedMpns.Location = new System.Drawing.Point(16, 92); this.checkBoxEnableUnauthenticatedMpns.Name = "checkBoxEnableUnauthenticatedMpns"; - this.checkBoxEnableUnauthenticatedMpns.Size = new System.Drawing.Size(294, 21); + this.checkBoxEnableUnauthenticatedMpns.Size = new System.Drawing.Size(224, 17); this.checkBoxEnableUnauthenticatedMpns.TabIndex = 29; this.checkBoxEnableUnauthenticatedMpns.Text = "Enable unauthenticated push notifications"; this.checkBoxEnableUnauthenticatedMpns.UseVisualStyleBackColor = true; @@ -724,10 +683,9 @@ private void InitializeComponent() this.btnMpnsCredentialUploadCertificate.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnMpnsCredentialUploadCertificate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnMpnsCredentialUploadCertificate.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnMpnsCredentialUploadCertificate.Location = new System.Drawing.Point(181, 153); - this.btnMpnsCredentialUploadCertificate.Margin = new System.Windows.Forms.Padding(4); + this.btnMpnsCredentialUploadCertificate.Location = new System.Drawing.Point(136, 124); this.btnMpnsCredentialUploadCertificate.Name = "btnMpnsCredentialUploadCertificate"; - this.btnMpnsCredentialUploadCertificate.Size = new System.Drawing.Size(96, 30); + this.btnMpnsCredentialUploadCertificate.Size = new System.Drawing.Size(72, 24); this.btnMpnsCredentialUploadCertificate.TabIndex = 28; this.btnMpnsCredentialUploadCertificate.Text = "Upload"; this.btnMpnsCredentialUploadCertificate.UseVisualStyleBackColor = false; @@ -737,10 +695,9 @@ private void InitializeComponent() // this.lblMpnsCredentialCertificateThumbprint.AutoSize = true; this.lblMpnsCredentialCertificateThumbprint.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblMpnsCredentialCertificateThumbprint.Location = new System.Drawing.Point(21, 39); - this.lblMpnsCredentialCertificateThumbprint.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblMpnsCredentialCertificateThumbprint.Location = new System.Drawing.Point(16, 32); this.lblMpnsCredentialCertificateThumbprint.Name = "lblMpnsCredentialCertificateThumbprint"; - this.lblMpnsCredentialCertificateThumbprint.Size = new System.Drawing.Size(151, 17); + this.lblMpnsCredentialCertificateThumbprint.Size = new System.Drawing.Size(113, 13); this.lblMpnsCredentialCertificateThumbprint.TabIndex = 27; this.lblMpnsCredentialCertificateThumbprint.Text = "Certificate Thumbprint:"; // @@ -750,11 +707,10 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtMpnsCredentialCertificateThumbprint.BackColor = System.Drawing.SystemColors.Window; this.txtMpnsCredentialCertificateThumbprint.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.txtMpnsCredentialCertificateThumbprint.Location = new System.Drawing.Point(21, 59); - this.txtMpnsCredentialCertificateThumbprint.Margin = new System.Windows.Forms.Padding(4); + this.txtMpnsCredentialCertificateThumbprint.Location = new System.Drawing.Point(16, 48); this.txtMpnsCredentialCertificateThumbprint.Name = "txtMpnsCredentialCertificateThumbprint"; this.txtMpnsCredentialCertificateThumbprint.ReadOnly = true; - this.txtMpnsCredentialCertificateThumbprint.Size = new System.Drawing.Size(361, 23); + this.txtMpnsCredentialCertificateThumbprint.Size = new System.Drawing.Size(272, 20); this.txtMpnsCredentialCertificateThumbprint.TabIndex = 26; // // grouperAppleNotificationSettings @@ -778,16 +734,15 @@ private void InitializeComponent() this.grouperAppleNotificationSettings.ForeColor = System.Drawing.Color.White; this.grouperAppleNotificationSettings.GroupImage = null; this.grouperAppleNotificationSettings.GroupTitle = "Apple Notification Settings"; - this.grouperAppleNotificationSettings.Location = new System.Drawing.Point(448, 345); - this.grouperAppleNotificationSettings.Margin = new System.Windows.Forms.Padding(4); + this.grouperAppleNotificationSettings.Location = new System.Drawing.Point(336, 280); this.grouperAppleNotificationSettings.Name = "grouperAppleNotificationSettings"; - this.grouperAppleNotificationSettings.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperAppleNotificationSettings.Padding = new System.Windows.Forms.Padding(20); this.grouperAppleNotificationSettings.PaintGroupBox = true; this.grouperAppleNotificationSettings.RoundCorners = 4; this.grouperAppleNotificationSettings.ShadowColor = System.Drawing.Color.DarkGray; this.grouperAppleNotificationSettings.ShadowControl = false; this.grouperAppleNotificationSettings.ShadowThickness = 1; - this.grouperAppleNotificationSettings.Size = new System.Drawing.Size(405, 197); + this.grouperAppleNotificationSettings.Size = new System.Drawing.Size(304, 160); this.grouperAppleNotificationSettings.TabIndex = 15; // // btnClearApnsNotification @@ -799,10 +754,9 @@ private void InitializeComponent() this.btnClearApnsNotification.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnClearApnsNotification.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnClearApnsNotification.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnClearApnsNotification.Location = new System.Drawing.Point(288, 153); - this.btnClearApnsNotification.Margin = new System.Windows.Forms.Padding(4); + this.btnClearApnsNotification.Location = new System.Drawing.Point(216, 124); this.btnClearApnsNotification.Name = "btnClearApnsNotification"; - this.btnClearApnsNotification.Size = new System.Drawing.Size(96, 30); + this.btnClearApnsNotification.Size = new System.Drawing.Size(72, 24); this.btnClearApnsNotification.TabIndex = 34; this.btnClearApnsNotification.Text = "Clear"; this.btnClearApnsNotification.UseVisualStyleBackColor = false; @@ -813,21 +767,19 @@ private void InitializeComponent() this.txtApnsEndpoint.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.txtApnsEndpoint.BackColor = System.Drawing.SystemColors.Window; - this.txtApnsEndpoint.Location = new System.Drawing.Point(21, 113); - this.txtApnsEndpoint.Margin = new System.Windows.Forms.Padding(4); + this.txtApnsEndpoint.Location = new System.Drawing.Point(16, 92); this.txtApnsEndpoint.Name = "txtApnsEndpoint"; this.txtApnsEndpoint.ReadOnly = true; - this.txtApnsEndpoint.Size = new System.Drawing.Size(361, 23); + this.txtApnsEndpoint.Size = new System.Drawing.Size(272, 20); this.txtApnsEndpoint.TabIndex = 33; // // lblApnsEndpoint // this.lblApnsEndpoint.AutoSize = true; this.lblApnsEndpoint.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblApnsEndpoint.Location = new System.Drawing.Point(21, 94); - this.lblApnsEndpoint.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblApnsEndpoint.Location = new System.Drawing.Point(16, 76); this.lblApnsEndpoint.Name = "lblApnsEndpoint"; - this.lblApnsEndpoint.Size = new System.Drawing.Size(109, 17); + this.lblApnsEndpoint.Size = new System.Drawing.Size(84, 13); this.lblApnsEndpoint.TabIndex = 32; this.lblApnsEndpoint.Text = "APNS Endpoint:"; // @@ -840,10 +792,9 @@ private void InitializeComponent() this.btnApnsCredentialUploadCertificate.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnApnsCredentialUploadCertificate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnApnsCredentialUploadCertificate.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnApnsCredentialUploadCertificate.Location = new System.Drawing.Point(181, 153); - this.btnApnsCredentialUploadCertificate.Margin = new System.Windows.Forms.Padding(4); + this.btnApnsCredentialUploadCertificate.Location = new System.Drawing.Point(136, 124); this.btnApnsCredentialUploadCertificate.Name = "btnApnsCredentialUploadCertificate"; - this.btnApnsCredentialUploadCertificate.Size = new System.Drawing.Size(96, 30); + this.btnApnsCredentialUploadCertificate.Size = new System.Drawing.Size(72, 24); this.btnApnsCredentialUploadCertificate.TabIndex = 31; this.btnApnsCredentialUploadCertificate.Text = "Upload"; this.btnApnsCredentialUploadCertificate.UseVisualStyleBackColor = false; @@ -853,10 +804,9 @@ private void InitializeComponent() // this.lblApnsCredentialCertificateThumbprint.AutoSize = true; this.lblApnsCredentialCertificateThumbprint.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblApnsCredentialCertificateThumbprint.Location = new System.Drawing.Point(21, 39); - this.lblApnsCredentialCertificateThumbprint.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblApnsCredentialCertificateThumbprint.Location = new System.Drawing.Point(16, 32); this.lblApnsCredentialCertificateThumbprint.Name = "lblApnsCredentialCertificateThumbprint"; - this.lblApnsCredentialCertificateThumbprint.Size = new System.Drawing.Size(151, 17); + this.lblApnsCredentialCertificateThumbprint.Size = new System.Drawing.Size(113, 13); this.lblApnsCredentialCertificateThumbprint.TabIndex = 30; this.lblApnsCredentialCertificateThumbprint.Text = "Certificate Thumbprint:"; // @@ -866,11 +816,10 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtApnsCredentialCertificateThumbprint.BackColor = System.Drawing.SystemColors.Window; this.txtApnsCredentialCertificateThumbprint.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.txtApnsCredentialCertificateThumbprint.Location = new System.Drawing.Point(21, 59); - this.txtApnsCredentialCertificateThumbprint.Margin = new System.Windows.Forms.Padding(4); + this.txtApnsCredentialCertificateThumbprint.Location = new System.Drawing.Point(16, 48); this.txtApnsCredentialCertificateThumbprint.Name = "txtApnsCredentialCertificateThumbprint"; this.txtApnsCredentialCertificateThumbprint.ReadOnly = true; - this.txtApnsCredentialCertificateThumbprint.Size = new System.Drawing.Size(361, 23); + this.txtApnsCredentialCertificateThumbprint.Size = new System.Drawing.Size(272, 20); this.txtApnsCredentialCertificateThumbprint.TabIndex = 29; // // grouperWindowsNotificationSettings @@ -893,16 +842,15 @@ private void InitializeComponent() this.grouperWindowsNotificationSettings.ForeColor = System.Drawing.Color.White; this.grouperWindowsNotificationSettings.GroupImage = null; this.grouperWindowsNotificationSettings.GroupTitle = "Windows Notification Settings"; - this.grouperWindowsNotificationSettings.Location = new System.Drawing.Point(21, 138); - this.grouperWindowsNotificationSettings.Margin = new System.Windows.Forms.Padding(4); + this.grouperWindowsNotificationSettings.Location = new System.Drawing.Point(16, 112); this.grouperWindowsNotificationSettings.Name = "grouperWindowsNotificationSettings"; - this.grouperWindowsNotificationSettings.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperWindowsNotificationSettings.Padding = new System.Windows.Forms.Padding(20); this.grouperWindowsNotificationSettings.PaintGroupBox = true; this.grouperWindowsNotificationSettings.RoundCorners = 4; this.grouperWindowsNotificationSettings.ShadowColor = System.Drawing.Color.DarkGray; this.grouperWindowsNotificationSettings.ShadowControl = false; this.grouperWindowsNotificationSettings.ShadowThickness = 1; - this.grouperWindowsNotificationSettings.Size = new System.Drawing.Size(405, 197); + this.grouperWindowsNotificationSettings.Size = new System.Drawing.Size(304, 160); this.grouperWindowsNotificationSettings.TabIndex = 14; // // btnClearWnsNotification @@ -914,10 +862,9 @@ private void InitializeComponent() this.btnClearWnsNotification.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnClearWnsNotification.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnClearWnsNotification.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnClearWnsNotification.Location = new System.Drawing.Point(288, 153); - this.btnClearWnsNotification.Margin = new System.Windows.Forms.Padding(4); + this.btnClearWnsNotification.Location = new System.Drawing.Point(216, 124); this.btnClearWnsNotification.Name = "btnClearWnsNotification"; - this.btnClearWnsNotification.Size = new System.Drawing.Size(96, 30); + this.btnClearWnsNotification.Size = new System.Drawing.Size(72, 24); this.btnClearWnsNotification.TabIndex = 37; this.btnClearWnsNotification.Text = "Clear"; this.btnClearWnsNotification.UseVisualStyleBackColor = false; @@ -928,20 +875,18 @@ private void InitializeComponent() this.txtClientSecret.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.txtClientSecret.BackColor = System.Drawing.SystemColors.Window; - this.txtClientSecret.Location = new System.Drawing.Point(21, 113); - this.txtClientSecret.Margin = new System.Windows.Forms.Padding(4); + this.txtClientSecret.Location = new System.Drawing.Point(16, 92); this.txtClientSecret.Name = "txtClientSecret"; - this.txtClientSecret.Size = new System.Drawing.Size(361, 23); + this.txtClientSecret.Size = new System.Drawing.Size(272, 20); this.txtClientSecret.TabIndex = 1; // // lblClientSecret // this.lblClientSecret.AutoSize = true; this.lblClientSecret.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblClientSecret.Location = new System.Drawing.Point(21, 94); - this.lblClientSecret.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblClientSecret.Location = new System.Drawing.Point(16, 76); this.lblClientSecret.Name = "lblClientSecret"; - this.lblClientSecret.Size = new System.Drawing.Size(92, 17); + this.lblClientSecret.Size = new System.Drawing.Size(70, 13); this.lblClientSecret.TabIndex = 29; this.lblClientSecret.Text = "Client Secret:"; // @@ -949,10 +894,9 @@ private void InitializeComponent() // this.lblPackageSid.AutoSize = true; this.lblPackageSid.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblPackageSid.Location = new System.Drawing.Point(21, 39); - this.lblPackageSid.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblPackageSid.Location = new System.Drawing.Point(16, 32); this.lblPackageSid.Name = "lblPackageSid"; - this.lblPackageSid.Size = new System.Drawing.Size(93, 17); + this.lblPackageSid.Size = new System.Drawing.Size(74, 13); this.lblPackageSid.TabIndex = 25; this.lblPackageSid.Text = "Package SID:"; // @@ -962,10 +906,9 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtPackageSid.BackColor = System.Drawing.SystemColors.Window; this.txtPackageSid.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.txtPackageSid.Location = new System.Drawing.Point(21, 59); - this.txtPackageSid.Margin = new System.Windows.Forms.Padding(4); + this.txtPackageSid.Location = new System.Drawing.Point(16, 48); this.txtPackageSid.Name = "txtPackageSid"; - this.txtPackageSid.Size = new System.Drawing.Size(361, 23); + this.txtPackageSid.Size = new System.Drawing.Size(272, 20); this.txtPackageSid.TabIndex = 0; // // grouperDuplicateDetectionHistoryTimeWindow @@ -976,137 +919,30 @@ private void InitializeComponent() this.grouperDuplicateDetectionHistoryTimeWindow.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.grouperDuplicateDetectionHistoryTimeWindow.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperDuplicateDetectionHistoryTimeWindow.BorderThickness = 1F; - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowMilliseconds); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtRegistrationTimeToLiveWindowMilliseconds); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowSeconds); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtRegistrationTimeToLiveWindowSeconds); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowMinutes); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtRegistrationTimeToLiveWindowMinutes); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowHours); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowDays); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtRegistrationTimeToLiveWindowHours); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtRegistrationTimeToLiveWindowDays); + this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.tsRegistrationTimeToLive); this.grouperDuplicateDetectionHistoryTimeWindow.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperDuplicateDetectionHistoryTimeWindow.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.grouperDuplicateDetectionHistoryTimeWindow.ForeColor = System.Drawing.Color.White; this.grouperDuplicateDetectionHistoryTimeWindow.GroupImage = null; this.grouperDuplicateDetectionHistoryTimeWindow.GroupTitle = "Registration Time To Live"; - this.grouperDuplicateDetectionHistoryTimeWindow.Location = new System.Drawing.Point(875, 20); - this.grouperDuplicateDetectionHistoryTimeWindow.Margin = new System.Windows.Forms.Padding(4); + this.grouperDuplicateDetectionHistoryTimeWindow.Location = new System.Drawing.Point(656, 16); this.grouperDuplicateDetectionHistoryTimeWindow.Name = "grouperDuplicateDetectionHistoryTimeWindow"; - this.grouperDuplicateDetectionHistoryTimeWindow.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperDuplicateDetectionHistoryTimeWindow.Padding = new System.Windows.Forms.Padding(20); this.grouperDuplicateDetectionHistoryTimeWindow.PaintGroupBox = true; this.grouperDuplicateDetectionHistoryTimeWindow.RoundCorners = 4; this.grouperDuplicateDetectionHistoryTimeWindow.ShadowColor = System.Drawing.Color.DarkGray; this.grouperDuplicateDetectionHistoryTimeWindow.ShadowControl = false; this.grouperDuplicateDetectionHistoryTimeWindow.ShadowThickness = 1; - this.grouperDuplicateDetectionHistoryTimeWindow.Size = new System.Drawing.Size(395, 108); + this.grouperDuplicateDetectionHistoryTimeWindow.Size = new System.Drawing.Size(296, 88); this.grouperDuplicateDetectionHistoryTimeWindow.TabIndex = 12; // - // lblDuplicateDetectionHistoryTimeWindowMilliseconds - // - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.Location = new System.Drawing.Point(320, 39); - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.Name = "lblDuplicateDetectionHistoryTimeWindowMilliseconds"; - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.Size = new System.Drawing.Size(64, 17); - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.TabIndex = 25; - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.Text = "Millisecs:"; - // - // txtRegistrationTimeToLiveWindowMilliseconds - // - this.txtRegistrationTimeToLiveWindowMilliseconds.BackColor = System.Drawing.SystemColors.Window; - this.txtRegistrationTimeToLiveWindowMilliseconds.Location = new System.Drawing.Point(320, 59); - this.txtRegistrationTimeToLiveWindowMilliseconds.Margin = new System.Windows.Forms.Padding(4); - this.txtRegistrationTimeToLiveWindowMilliseconds.Name = "txtRegistrationTimeToLiveWindowMilliseconds"; - this.txtRegistrationTimeToLiveWindowMilliseconds.Size = new System.Drawing.Size(52, 23); - this.txtRegistrationTimeToLiveWindowMilliseconds.TabIndex = 3; - this.txtRegistrationTimeToLiveWindowMilliseconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDuplicateDetectionHistoryTimeWindowSeconds - // - this.lblDuplicateDetectionHistoryTimeWindowSeconds.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowSeconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowSeconds.Location = new System.Drawing.Point(245, 39); - this.lblDuplicateDetectionHistoryTimeWindowSeconds.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblDuplicateDetectionHistoryTimeWindowSeconds.Name = "lblDuplicateDetectionHistoryTimeWindowSeconds"; - this.lblDuplicateDetectionHistoryTimeWindowSeconds.Size = new System.Drawing.Size(67, 17); - this.lblDuplicateDetectionHistoryTimeWindowSeconds.TabIndex = 24; - this.lblDuplicateDetectionHistoryTimeWindowSeconds.Text = "Seconds:"; - // - // txtRegistrationTimeToLiveWindowSeconds - // - this.txtRegistrationTimeToLiveWindowSeconds.BackColor = System.Drawing.SystemColors.Window; - this.txtRegistrationTimeToLiveWindowSeconds.Location = new System.Drawing.Point(245, 59); - this.txtRegistrationTimeToLiveWindowSeconds.Margin = new System.Windows.Forms.Padding(4); - this.txtRegistrationTimeToLiveWindowSeconds.Name = "txtRegistrationTimeToLiveWindowSeconds"; - this.txtRegistrationTimeToLiveWindowSeconds.Size = new System.Drawing.Size(52, 23); - this.txtRegistrationTimeToLiveWindowSeconds.TabIndex = 2; - this.txtRegistrationTimeToLiveWindowSeconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDuplicateDetectionHistoryTimeWindowMinutes - // - this.lblDuplicateDetectionHistoryTimeWindowMinutes.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowMinutes.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowMinutes.Location = new System.Drawing.Point(171, 39); - this.lblDuplicateDetectionHistoryTimeWindowMinutes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblDuplicateDetectionHistoryTimeWindowMinutes.Name = "lblDuplicateDetectionHistoryTimeWindowMinutes"; - this.lblDuplicateDetectionHistoryTimeWindowMinutes.Size = new System.Drawing.Size(61, 17); - this.lblDuplicateDetectionHistoryTimeWindowMinutes.TabIndex = 23; - this.lblDuplicateDetectionHistoryTimeWindowMinutes.Text = "Minutes:"; - // - // txtRegistrationTimeToLiveWindowMinutes - // - this.txtRegistrationTimeToLiveWindowMinutes.BackColor = System.Drawing.SystemColors.Window; - this.txtRegistrationTimeToLiveWindowMinutes.Location = new System.Drawing.Point(171, 59); - this.txtRegistrationTimeToLiveWindowMinutes.Margin = new System.Windows.Forms.Padding(4); - this.txtRegistrationTimeToLiveWindowMinutes.Name = "txtRegistrationTimeToLiveWindowMinutes"; - this.txtRegistrationTimeToLiveWindowMinutes.Size = new System.Drawing.Size(52, 23); - this.txtRegistrationTimeToLiveWindowMinutes.TabIndex = 2; - this.txtRegistrationTimeToLiveWindowMinutes.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDuplicateDetectionHistoryTimeWindowHours - // - this.lblDuplicateDetectionHistoryTimeWindowHours.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowHours.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowHours.Location = new System.Drawing.Point(96, 39); - this.lblDuplicateDetectionHistoryTimeWindowHours.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblDuplicateDetectionHistoryTimeWindowHours.Name = "lblDuplicateDetectionHistoryTimeWindowHours"; - this.lblDuplicateDetectionHistoryTimeWindowHours.Size = new System.Drawing.Size(50, 17); - this.lblDuplicateDetectionHistoryTimeWindowHours.TabIndex = 22; - this.lblDuplicateDetectionHistoryTimeWindowHours.Text = "Hours:"; - // - // lblDuplicateDetectionHistoryTimeWindowDays - // - this.lblDuplicateDetectionHistoryTimeWindowDays.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowDays.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowDays.Location = new System.Drawing.Point(21, 39); - this.lblDuplicateDetectionHistoryTimeWindowDays.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblDuplicateDetectionHistoryTimeWindowDays.Name = "lblDuplicateDetectionHistoryTimeWindowDays"; - this.lblDuplicateDetectionHistoryTimeWindowDays.Size = new System.Drawing.Size(44, 17); - this.lblDuplicateDetectionHistoryTimeWindowDays.TabIndex = 21; - this.lblDuplicateDetectionHistoryTimeWindowDays.Text = "Days:"; - // - // txtRegistrationTimeToLiveWindowHours - // - this.txtRegistrationTimeToLiveWindowHours.BackColor = System.Drawing.SystemColors.Window; - this.txtRegistrationTimeToLiveWindowHours.Location = new System.Drawing.Point(96, 59); - this.txtRegistrationTimeToLiveWindowHours.Margin = new System.Windows.Forms.Padding(4); - this.txtRegistrationTimeToLiveWindowHours.Name = "txtRegistrationTimeToLiveWindowHours"; - this.txtRegistrationTimeToLiveWindowHours.Size = new System.Drawing.Size(52, 23); - this.txtRegistrationTimeToLiveWindowHours.TabIndex = 1; - this.txtRegistrationTimeToLiveWindowHours.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // txtRegistrationTimeToLiveWindowDays - // - this.txtRegistrationTimeToLiveWindowDays.BackColor = System.Drawing.SystemColors.Window; - this.txtRegistrationTimeToLiveWindowDays.Location = new System.Drawing.Point(21, 59); - this.txtRegistrationTimeToLiveWindowDays.Margin = new System.Windows.Forms.Padding(4); - this.txtRegistrationTimeToLiveWindowDays.Name = "txtRegistrationTimeToLiveWindowDays"; - this.txtRegistrationTimeToLiveWindowDays.Size = new System.Drawing.Size(52, 23); - this.txtRegistrationTimeToLiveWindowDays.TabIndex = 0; - this.txtRegistrationTimeToLiveWindowDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); + // tsRegistrationTimeToLive + // + this.tsRegistrationTimeToLive.Location = new System.Drawing.Point(13, 29); + this.tsRegistrationTimeToLive.Name = "tsRegistrationTimeToLive"; + this.tsRegistrationTimeToLive.Size = new System.Drawing.Size(273, 42); + this.tsRegistrationTimeToLive.TabIndex = 26; + this.tsRegistrationTimeToLive.TimeSpanValue = null; // // grouperPath // @@ -1124,26 +960,24 @@ private void InitializeComponent() this.grouperPath.ForeColor = System.Drawing.Color.White; this.grouperPath.GroupImage = null; this.grouperPath.GroupTitle = "Path"; - this.grouperPath.Location = new System.Drawing.Point(21, 20); - this.grouperPath.Margin = new System.Windows.Forms.Padding(4); + this.grouperPath.Location = new System.Drawing.Point(16, 16); this.grouperPath.Name = "grouperPath"; - this.grouperPath.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperPath.Padding = new System.Windows.Forms.Padding(20); this.grouperPath.PaintGroupBox = true; this.grouperPath.RoundCorners = 4; this.grouperPath.ShadowColor = System.Drawing.Color.DarkGray; this.grouperPath.ShadowControl = false; this.grouperPath.ShadowThickness = 1; - this.grouperPath.Size = new System.Drawing.Size(405, 108); + this.grouperPath.Size = new System.Drawing.Size(304, 88); this.grouperPath.TabIndex = 13; // // lblRelativeURI // this.lblRelativeURI.AutoSize = true; this.lblRelativeURI.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblRelativeURI.Location = new System.Drawing.Point(21, 39); - this.lblRelativeURI.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblRelativeURI.Location = new System.Drawing.Point(16, 32); this.lblRelativeURI.Name = "lblRelativeURI"; - this.lblRelativeURI.Size = new System.Drawing.Size(90, 17); + this.lblRelativeURI.Size = new System.Drawing.Size(71, 13); this.lblRelativeURI.TabIndex = 22; this.lblRelativeURI.Text = "Relative URI:"; // @@ -1153,10 +987,9 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtPath.BackColor = System.Drawing.SystemColors.Window; this.txtPath.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.txtPath.Location = new System.Drawing.Point(21, 59); - this.txtPath.Margin = new System.Windows.Forms.Padding(4); + this.txtPath.Location = new System.Drawing.Point(16, 48); this.txtPath.Name = "txtPath"; - this.txtPath.Size = new System.Drawing.Size(361, 23); + this.txtPath.Size = new System.Drawing.Size(272, 20); this.txtPath.TabIndex = 0; // // tabPageAuthorization @@ -1165,9 +998,8 @@ private void InitializeComponent() this.tabPageAuthorization.Controls.Add(this.grouperAuthorizationRuleList); this.tabPageAuthorization.ForeColor = System.Drawing.SystemColors.ControlText; this.tabPageAuthorization.Location = new System.Drawing.Point(4, 22); - this.tabPageAuthorization.Margin = new System.Windows.Forms.Padding(4); this.tabPageAuthorization.Name = "tabPageAuthorization"; - this.tabPageAuthorization.Size = new System.Drawing.Size(1293, 565); + this.tabPageAuthorization.Size = new System.Drawing.Size(968, 454); this.tabPageAuthorization.TabIndex = 6; this.tabPageAuthorization.Text = "Authorization Rules"; // @@ -1187,16 +1019,15 @@ private void InitializeComponent() this.grouperAuthorizationRuleList.ForeColor = System.Drawing.Color.White; this.grouperAuthorizationRuleList.GroupImage = null; this.grouperAuthorizationRuleList.GroupTitle = "Authorization Rule List"; - this.grouperAuthorizationRuleList.Location = new System.Drawing.Point(21, 10); - this.grouperAuthorizationRuleList.Margin = new System.Windows.Forms.Padding(4); + this.grouperAuthorizationRuleList.Location = new System.Drawing.Point(16, 8); this.grouperAuthorizationRuleList.Name = "grouperAuthorizationRuleList"; - this.grouperAuthorizationRuleList.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperAuthorizationRuleList.Padding = new System.Windows.Forms.Padding(20); this.grouperAuthorizationRuleList.PaintGroupBox = true; this.grouperAuthorizationRuleList.RoundCorners = 4; this.grouperAuthorizationRuleList.ShadowColor = System.Drawing.Color.DarkGray; this.grouperAuthorizationRuleList.ShadowControl = false; this.grouperAuthorizationRuleList.ShadowThickness = 1; - this.grouperAuthorizationRuleList.Size = new System.Drawing.Size(1248, 532); + this.grouperAuthorizationRuleList.Size = new System.Drawing.Size(936, 432); this.grouperAuthorizationRuleList.TabIndex = 21; this.grouperAuthorizationRuleList.CustomPaint += new System.Action(this.grouperAuthorizationRuleList_CustomPaint); // @@ -1211,15 +1042,14 @@ private void InitializeComponent() this.authorizationRulesDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.authorizationRulesDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.authorizationRulesDataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.authorizationRulesDataGridView.Location = new System.Drawing.Point(21, 39); - this.authorizationRulesDataGridView.Margin = new System.Windows.Forms.Padding(4); + this.authorizationRulesDataGridView.Location = new System.Drawing.Point(16, 32); this.authorizationRulesDataGridView.MultiSelect = false; this.authorizationRulesDataGridView.Name = "authorizationRulesDataGridView"; this.authorizationRulesDataGridView.RowHeadersWidth = 24; this.authorizationRulesDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.authorizationRulesDataGridView.ShowCellErrors = false; this.authorizationRulesDataGridView.ShowRowErrors = false; - this.authorizationRulesDataGridView.Size = new System.Drawing.Size(1205, 474); + this.authorizationRulesDataGridView.Size = new System.Drawing.Size(904, 385); this.authorizationRulesDataGridView.TabIndex = 0; this.authorizationRulesDataGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.authorizationRulesDataGridView_CellContentClick); this.authorizationRulesDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.authorizationRulesDataGridView_DataError); @@ -1235,10 +1065,9 @@ private void InitializeComponent() this.tabPageRegistrations.Controls.Add(this.registrationsSplitContainer); this.tabPageRegistrations.ForeColor = System.Drawing.SystemColors.ControlText; this.tabPageRegistrations.Location = new System.Drawing.Point(4, 22); - this.tabPageRegistrations.Margin = new System.Windows.Forms.Padding(4); this.tabPageRegistrations.Name = "tabPageRegistrations"; - this.tabPageRegistrations.Padding = new System.Windows.Forms.Padding(4); - this.tabPageRegistrations.Size = new System.Drawing.Size(1293, 565); + this.tabPageRegistrations.Padding = new System.Windows.Forms.Padding(3); + this.tabPageRegistrations.Size = new System.Drawing.Size(968, 454); this.tabPageRegistrations.TabIndex = 4; this.tabPageRegistrations.Text = "Registrations"; // @@ -1247,8 +1076,7 @@ private void InitializeComponent() this.registrationsSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.registrationsSplitContainer.Location = new System.Drawing.Point(21, 20); - this.registrationsSplitContainer.Margin = new System.Windows.Forms.Padding(4); + this.registrationsSplitContainer.Location = new System.Drawing.Point(16, 16); this.registrationsSplitContainer.Name = "registrationsSplitContainer"; // // registrationsSplitContainer.Panel1 @@ -1258,9 +1086,9 @@ private void InitializeComponent() // registrationsSplitContainer.Panel2 // this.registrationsSplitContainer.Panel2.Controls.Add(this.grouperRegistrationProperties); - this.registrationsSplitContainer.Size = new System.Drawing.Size(1248, 522); - this.registrationsSplitContainer.SplitterDistance = 761; - this.registrationsSplitContainer.SplitterWidth = 21; + this.registrationsSplitContainer.Size = new System.Drawing.Size(936, 424); + this.registrationsSplitContainer.SplitterDistance = 570; + this.registrationsSplitContainer.SplitterWidth = 16; this.registrationsSplitContainer.TabIndex = 5; // // grouperRegistrations @@ -1284,25 +1112,23 @@ private void InitializeComponent() this.grouperRegistrations.GroupImage = null; this.grouperRegistrations.GroupTitle = "Registration List"; this.grouperRegistrations.Location = new System.Drawing.Point(0, 0); - this.grouperRegistrations.Margin = new System.Windows.Forms.Padding(4); this.grouperRegistrations.Name = "grouperRegistrations"; - this.grouperRegistrations.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperRegistrations.Padding = new System.Windows.Forms.Padding(20); this.grouperRegistrations.PaintGroupBox = true; this.grouperRegistrations.RoundCorners = 4; this.grouperRegistrations.ShadowColor = System.Drawing.Color.DarkGray; this.grouperRegistrations.ShadowControl = false; this.grouperRegistrations.ShadowThickness = 1; - this.grouperRegistrations.Size = new System.Drawing.Size(761, 522); + this.grouperRegistrations.Size = new System.Drawing.Size(570, 424); this.grouperRegistrations.TabIndex = 21; this.grouperRegistrations.CustomPaint += new System.Action(this.grouperRegistrations_CustomPaint); // // pictFindRegistrations // this.pictFindRegistrations.Image = global::ServiceBusExplorer.Properties.Resources.FindExtension; - this.pictFindRegistrations.Location = new System.Drawing.Point(153, 0); - this.pictFindRegistrations.Margin = new System.Windows.Forms.Padding(4); + this.pictFindRegistrations.Location = new System.Drawing.Point(115, 0); this.pictFindRegistrations.Name = "pictFindRegistrations"; - this.pictFindRegistrations.Size = new System.Drawing.Size(32, 30); + this.pictFindRegistrations.Size = new System.Drawing.Size(24, 24); this.pictFindRegistrations.TabIndex = 9; this.pictFindRegistrations.TabStop = false; this.pictFindRegistrations.Click += new System.EventHandler(this.pictFindRegistrations_Click); @@ -1314,10 +1140,9 @@ private void InitializeComponent() this.txtCurrentRegistrationPage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.txtCurrentRegistrationPage.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.txtCurrentRegistrationPage.Location = new System.Drawing.Point(128, 482); - this.txtCurrentRegistrationPage.Margin = new System.Windows.Forms.Padding(4); + this.txtCurrentRegistrationPage.Location = new System.Drawing.Point(96, 392); this.txtCurrentRegistrationPage.Name = "txtCurrentRegistrationPage"; - this.txtCurrentRegistrationPage.Size = new System.Drawing.Size(504, 23); + this.txtCurrentRegistrationPage.Size = new System.Drawing.Size(378, 20); this.txtCurrentRegistrationPage.TabIndex = 8; this.txtCurrentRegistrationPage.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; // @@ -1332,10 +1157,9 @@ private void InitializeComponent() this.btnPreviousRegistrationPage.ForeColor = System.Drawing.SystemColors.ControlText; this.btnPreviousRegistrationPage.ImageKey = "ButtonPrevious.png"; this.btnPreviousRegistrationPage.ImageList = this.imageList; - this.btnPreviousRegistrationPage.Location = new System.Drawing.Point(75, 482); - this.btnPreviousRegistrationPage.Margin = new System.Windows.Forms.Padding(4); + this.btnPreviousRegistrationPage.Location = new System.Drawing.Point(56, 392); this.btnPreviousRegistrationPage.Name = "btnPreviousRegistrationPage"; - this.btnPreviousRegistrationPage.Size = new System.Drawing.Size(43, 25); + this.btnPreviousRegistrationPage.Size = new System.Drawing.Size(32, 20); this.btnPreviousRegistrationPage.TabIndex = 6; this.btnPreviousRegistrationPage.UseVisualStyleBackColor = false; this.btnPreviousRegistrationPage.Click += new System.EventHandler(this.btnPreviousRegistrationPage_Click); @@ -1360,10 +1184,9 @@ private void InitializeComponent() this.btnFirstRegistrationPage.ForeColor = System.Drawing.SystemColors.ControlText; this.btnFirstRegistrationPage.ImageKey = "ButtonFirst.png"; this.btnFirstRegistrationPage.ImageList = this.imageList; - this.btnFirstRegistrationPage.Location = new System.Drawing.Point(21, 482); - this.btnFirstRegistrationPage.Margin = new System.Windows.Forms.Padding(4); + this.btnFirstRegistrationPage.Location = new System.Drawing.Point(16, 392); this.btnFirstRegistrationPage.Name = "btnFirstRegistrationPage"; - this.btnFirstRegistrationPage.Size = new System.Drawing.Size(43, 25); + this.btnFirstRegistrationPage.Size = new System.Drawing.Size(32, 20); this.btnFirstRegistrationPage.TabIndex = 5; this.btnFirstRegistrationPage.UseVisualStyleBackColor = false; this.btnFirstRegistrationPage.Click += new System.EventHandler(this.btnFirstRegistrationPage_Click); @@ -1379,10 +1202,9 @@ private void InitializeComponent() this.btnLastRegistrationPage.ForeColor = System.Drawing.SystemColors.ControlText; this.btnLastRegistrationPage.ImageKey = "ButtonLast.png"; this.btnLastRegistrationPage.ImageList = this.imageList; - this.btnLastRegistrationPage.Location = new System.Drawing.Point(697, 482); - this.btnLastRegistrationPage.Margin = new System.Windows.Forms.Padding(4); + this.btnLastRegistrationPage.Location = new System.Drawing.Point(522, 392); this.btnLastRegistrationPage.Name = "btnLastRegistrationPage"; - this.btnLastRegistrationPage.Size = new System.Drawing.Size(43, 25); + this.btnLastRegistrationPage.Size = new System.Drawing.Size(32, 20); this.btnLastRegistrationPage.TabIndex = 4; this.btnLastRegistrationPage.UseVisualStyleBackColor = false; this.btnLastRegistrationPage.Click += new System.EventHandler(this.btnLastRegistrationPage_Click); @@ -1398,10 +1220,9 @@ private void InitializeComponent() this.btnNextRegistrationPage.ForeColor = System.Drawing.SystemColors.ControlText; this.btnNextRegistrationPage.ImageKey = "ButtonNext.png"; this.btnNextRegistrationPage.ImageList = this.imageList; - this.btnNextRegistrationPage.Location = new System.Drawing.Point(644, 482); - this.btnNextRegistrationPage.Margin = new System.Windows.Forms.Padding(4); + this.btnNextRegistrationPage.Location = new System.Drawing.Point(482, 392); this.btnNextRegistrationPage.Name = "btnNextRegistrationPage"; - this.btnNextRegistrationPage.Size = new System.Drawing.Size(43, 25); + this.btnNextRegistrationPage.Size = new System.Drawing.Size(32, 20); this.btnNextRegistrationPage.TabIndex = 3; this.btnNextRegistrationPage.UseVisualStyleBackColor = false; this.btnNextRegistrationPage.Click += new System.EventHandler(this.btnNextRegistrationPage_Click); @@ -1418,14 +1239,13 @@ private void InitializeComponent() this.registrationsDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.registrationsDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.registrationsDataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.registrationsDataGridView.Location = new System.Drawing.Point(21, 39); - this.registrationsDataGridView.Margin = new System.Windows.Forms.Padding(4); + this.registrationsDataGridView.Location = new System.Drawing.Point(16, 32); this.registrationsDataGridView.Name = "registrationsDataGridView"; this.registrationsDataGridView.ReadOnly = true; this.registrationsDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.registrationsDataGridView.ShowCellErrors = false; this.registrationsDataGridView.ShowRowErrors = false; - this.registrationsDataGridView.Size = new System.Drawing.Size(719, 417); + this.registrationsDataGridView.Size = new System.Drawing.Size(538, 339); this.registrationsDataGridView.TabIndex = 0; this.registrationsDataGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellClick); this.registrationsDataGridView.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.registrationsDataGridView_CellMouseDown); @@ -1457,15 +1277,14 @@ private void InitializeComponent() this.grouperRegistrationProperties.GroupImage = null; this.grouperRegistrationProperties.GroupTitle = "Registration Properties"; this.grouperRegistrationProperties.Location = new System.Drawing.Point(0, 0); - this.grouperRegistrationProperties.Margin = new System.Windows.Forms.Padding(4); this.grouperRegistrationProperties.Name = "grouperRegistrationProperties"; - this.grouperRegistrationProperties.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperRegistrationProperties.Padding = new System.Windows.Forms.Padding(20); this.grouperRegistrationProperties.PaintGroupBox = true; this.grouperRegistrationProperties.RoundCorners = 4; this.grouperRegistrationProperties.ShadowColor = System.Drawing.Color.DarkGray; this.grouperRegistrationProperties.ShadowControl = false; this.grouperRegistrationProperties.ShadowThickness = 1; - this.grouperRegistrationProperties.Size = new System.Drawing.Size(466, 522); + this.grouperRegistrationProperties.Size = new System.Drawing.Size(350, 424); this.grouperRegistrationProperties.TabIndex = 19; this.grouperRegistrationProperties.CustomPaint += new System.Action(this.grouperRegistrationProperties_CustomPaint); // @@ -1478,10 +1297,9 @@ private void InitializeComponent() this.btnRefreshRegistrations.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnRefreshRegistrations.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnRefreshRegistrations.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnRefreshRegistrations.Location = new System.Drawing.Point(22, 473); - this.btnRefreshRegistrations.Margin = new System.Windows.Forms.Padding(4); + this.btnRefreshRegistrations.Location = new System.Drawing.Point(16, 384); this.btnRefreshRegistrations.Name = "btnRefreshRegistrations"; - this.btnRefreshRegistrations.Size = new System.Drawing.Size(96, 30); + this.btnRefreshRegistrations.Size = new System.Drawing.Size(72, 24); this.btnRefreshRegistrations.TabIndex = 0; this.btnRefreshRegistrations.Text = "Refresh"; this.btnRefreshRegistrations.UseVisualStyleBackColor = false; @@ -1498,10 +1316,9 @@ private void InitializeComponent() this.btnCreateRegistration.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnCreateRegistration.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCreateRegistration.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnCreateRegistration.Location = new System.Drawing.Point(129, 473); - this.btnCreateRegistration.Margin = new System.Windows.Forms.Padding(4); + this.btnCreateRegistration.Location = new System.Drawing.Point(97, 384); this.btnCreateRegistration.Name = "btnCreateRegistration"; - this.btnCreateRegistration.Size = new System.Drawing.Size(96, 30); + this.btnCreateRegistration.Size = new System.Drawing.Size(72, 24); this.btnCreateRegistration.TabIndex = 1; this.btnCreateRegistration.Text = "Create"; this.btnCreateRegistration.UseVisualStyleBackColor = false; @@ -1518,10 +1335,9 @@ private void InitializeComponent() this.btnDeleteRegistration.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnDeleteRegistration.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnDeleteRegistration.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnDeleteRegistration.Location = new System.Drawing.Point(236, 473); - this.btnDeleteRegistration.Margin = new System.Windows.Forms.Padding(4); + this.btnDeleteRegistration.Location = new System.Drawing.Point(177, 384); this.btnDeleteRegistration.Name = "btnDeleteRegistration"; - this.btnDeleteRegistration.Size = new System.Drawing.Size(96, 30); + this.btnDeleteRegistration.Size = new System.Drawing.Size(72, 24); this.btnDeleteRegistration.TabIndex = 2; this.btnDeleteRegistration.Text = "Delete"; this.btnDeleteRegistration.UseVisualStyleBackColor = false; @@ -1538,10 +1354,9 @@ private void InitializeComponent() this.btnUpdateRegistration.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnUpdateRegistration.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnUpdateRegistration.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnUpdateRegistration.Location = new System.Drawing.Point(342, 473); - this.btnUpdateRegistration.Margin = new System.Windows.Forms.Padding(4); + this.btnUpdateRegistration.Location = new System.Drawing.Point(256, 384); this.btnUpdateRegistration.Name = "btnUpdateRegistration"; - this.btnUpdateRegistration.Size = new System.Drawing.Size(96, 30); + this.btnUpdateRegistration.Size = new System.Drawing.Size(72, 24); this.btnUpdateRegistration.TabIndex = 3; this.btnUpdateRegistration.Text = "Update"; this.btnUpdateRegistration.UseVisualStyleBackColor = false; @@ -1557,10 +1372,9 @@ private void InitializeComponent() this.registrationPropertyGrid.BackColor = System.Drawing.SystemColors.Window; this.registrationPropertyGrid.HelpVisible = false; this.registrationPropertyGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - this.registrationPropertyGrid.Location = new System.Drawing.Point(21, 39); - this.registrationPropertyGrid.Margin = new System.Windows.Forms.Padding(4); + this.registrationPropertyGrid.Location = new System.Drawing.Point(16, 32); this.registrationPropertyGrid.Name = "registrationPropertyGrid"; - this.registrationPropertyGrid.Size = new System.Drawing.Size(417, 417); + this.registrationPropertyGrid.Size = new System.Drawing.Size(313, 339); this.registrationPropertyGrid.TabIndex = 1; this.registrationPropertyGrid.ToolbarVisible = false; this.registrationPropertyGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.sessionPropertyGrid_PropertyValueChanged); @@ -1571,10 +1385,9 @@ private void InitializeComponent() this.tabPageTemplateNotification.Controls.Add(this.templateSplitContainer); this.tabPageTemplateNotification.ForeColor = System.Drawing.SystemColors.ControlText; this.tabPageTemplateNotification.Location = new System.Drawing.Point(4, 22); - this.tabPageTemplateNotification.Margin = new System.Windows.Forms.Padding(4); this.tabPageTemplateNotification.Name = "tabPageTemplateNotification"; - this.tabPageTemplateNotification.Padding = new System.Windows.Forms.Padding(4); - this.tabPageTemplateNotification.Size = new System.Drawing.Size(1293, 565); + this.tabPageTemplateNotification.Padding = new System.Windows.Forms.Padding(3); + this.tabPageTemplateNotification.Size = new System.Drawing.Size(968, 454); this.tabPageTemplateNotification.TabIndex = 0; this.tabPageTemplateNotification.Text = "Template"; // @@ -1583,8 +1396,7 @@ private void InitializeComponent() this.templateSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.templateSplitContainer.Location = new System.Drawing.Point(21, 20); - this.templateSplitContainer.Margin = new System.Windows.Forms.Padding(4); + this.templateSplitContainer.Location = new System.Drawing.Point(16, 16); this.templateSplitContainer.Name = "templateSplitContainer"; // // templateSplitContainer.Panel1 @@ -1594,16 +1406,15 @@ private void InitializeComponent() // templateSplitContainer.Panel2 // this.templateSplitContainer.Panel2.Controls.Add(this.templatePropertiesTabControl); - this.templateSplitContainer.Size = new System.Drawing.Size(1248, 522); - this.templateSplitContainer.SplitterDistance = 613; - this.templateSplitContainer.SplitterWidth = 21; + this.templateSplitContainer.Size = new System.Drawing.Size(936, 424); + this.templateSplitContainer.SplitterDistance = 459; + this.templateSplitContainer.SplitterWidth = 16; this.templateSplitContainer.TabIndex = 2; // // templateSplitContainer1 // this.templateSplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; this.templateSplitContainer1.Location = new System.Drawing.Point(0, 0); - this.templateSplitContainer1.Margin = new System.Windows.Forms.Padding(4); this.templateSplitContainer1.Name = "templateSplitContainer1"; this.templateSplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; // @@ -1614,9 +1425,9 @@ private void InitializeComponent() // templateSplitContainer1.Panel2 // this.templateSplitContainer1.Panel2.Controls.Add(this.templateTagsTabControl); - this.templateSplitContainer1.Size = new System.Drawing.Size(613, 522); - this.templateSplitContainer1.SplitterDistance = 289; - this.templateSplitContainer1.SplitterWidth = 10; + this.templateSplitContainer1.Size = new System.Drawing.Size(459, 424); + this.templateSplitContainer1.SplitterDistance = 234; + this.templateSplitContainer1.SplitterWidth = 8; this.templateSplitContainer1.TabIndex = 15; // // grouperBody @@ -1634,15 +1445,14 @@ private void InitializeComponent() this.grouperBody.GroupImage = null; this.grouperBody.GroupTitle = "Notification Payload"; this.grouperBody.Location = new System.Drawing.Point(0, 0); - this.grouperBody.Margin = new System.Windows.Forms.Padding(4); this.grouperBody.Name = "grouperBody"; - this.grouperBody.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperBody.Padding = new System.Windows.Forms.Padding(20); this.grouperBody.PaintGroupBox = true; this.grouperBody.RoundCorners = 4; this.grouperBody.ShadowColor = System.Drawing.Color.DarkGray; this.grouperBody.ShadowControl = false; this.grouperBody.ShadowThickness = 1; - this.grouperBody.Size = new System.Drawing.Size(613, 289); + this.grouperBody.Size = new System.Drawing.Size(459, 234); this.grouperBody.TabIndex = 15; // // txtTemplatePayload @@ -1652,14 +1462,13 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtTemplatePayload.BackColor = System.Drawing.SystemColors.Window; this.txtTemplatePayload.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtTemplatePayload.Location = new System.Drawing.Point(21, 39); - this.txtTemplatePayload.Margin = new System.Windows.Forms.Padding(4); + this.txtTemplatePayload.Location = new System.Drawing.Point(16, 32); this.txtTemplatePayload.MaxLength = 0; this.txtTemplatePayload.Multiline = true; this.txtTemplatePayload.Name = "txtTemplatePayload"; this.txtTemplatePayload.ReadOnly = true; this.txtTemplatePayload.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtTemplatePayload.Size = new System.Drawing.Size(569, 229); + this.txtTemplatePayload.Size = new System.Drawing.Size(427, 186); this.txtTemplatePayload.TabIndex = 0; // // templateTagsTabControl @@ -1670,10 +1479,9 @@ private void InitializeComponent() this.templateTagsTabControl.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this.templateTagsTabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.templateTagsTabControl.Location = new System.Drawing.Point(0, 0); - this.templateTagsTabControl.Margin = new System.Windows.Forms.Padding(4); this.templateTagsTabControl.Name = "templateTagsTabControl"; this.templateTagsTabControl.SelectedIndex = 0; - this.templateTagsTabControl.Size = new System.Drawing.Size(613, 223); + this.templateTagsTabControl.Size = new System.Drawing.Size(459, 182); this.templateTagsTabControl.TabIndex = 11; this.templateTagsTabControl.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.templateTagsTabControl_DrawItem); // @@ -1682,10 +1490,9 @@ private void InitializeComponent() this.tabTemplateTagExpression.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabTemplateTagExpression.Controls.Add(this.grouperTemplateTagExpression); this.tabTemplateTagExpression.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabTemplateTagExpression.Location = new System.Drawing.Point(4, 27); - this.tabTemplateTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.tabTemplateTagExpression.Location = new System.Drawing.Point(4, 24); this.tabTemplateTagExpression.Name = "tabTemplateTagExpression"; - this.tabTemplateTagExpression.Size = new System.Drawing.Size(605, 192); + this.tabTemplateTagExpression.Size = new System.Drawing.Size(451, 154); this.tabTemplateTagExpression.TabIndex = 2; this.tabTemplateTagExpression.Text = "Tag Expression"; // @@ -1705,16 +1512,15 @@ private void InitializeComponent() this.grouperTemplateTagExpression.ForeColor = System.Drawing.Color.White; this.grouperTemplateTagExpression.GroupImage = null; this.grouperTemplateTagExpression.GroupTitle = "Tag Expression"; - this.grouperTemplateTagExpression.Location = new System.Drawing.Point(21, 10); - this.grouperTemplateTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.grouperTemplateTagExpression.Location = new System.Drawing.Point(16, 8); this.grouperTemplateTagExpression.Name = "grouperTemplateTagExpression"; - this.grouperTemplateTagExpression.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperTemplateTagExpression.Padding = new System.Windows.Forms.Padding(20); this.grouperTemplateTagExpression.PaintGroupBox = true; this.grouperTemplateTagExpression.RoundCorners = 4; this.grouperTemplateTagExpression.ShadowColor = System.Drawing.Color.DarkGray; this.grouperTemplateTagExpression.ShadowControl = false; this.grouperTemplateTagExpression.ShadowThickness = 1; - this.grouperTemplateTagExpression.Size = new System.Drawing.Size(560, 159); + this.grouperTemplateTagExpression.Size = new System.Drawing.Size(419, 133); this.grouperTemplateTagExpression.TabIndex = 14; // // txtTemplateTagExpression @@ -1724,13 +1530,12 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtTemplateTagExpression.BackColor = System.Drawing.SystemColors.Window; this.txtTemplateTagExpression.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtTemplateTagExpression.Location = new System.Drawing.Point(21, 39); - this.txtTemplateTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.txtTemplateTagExpression.Location = new System.Drawing.Point(16, 32); this.txtTemplateTagExpression.MaxLength = 0; this.txtTemplateTagExpression.Multiline = true; this.txtTemplateTagExpression.Name = "txtTemplateTagExpression"; this.txtTemplateTagExpression.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtTemplateTagExpression.Size = new System.Drawing.Size(516, 99); + this.txtTemplateTagExpression.Size = new System.Drawing.Size(387, 85); this.txtTemplateTagExpression.TabIndex = 0; // // tabTemplateNotificationTags @@ -1738,11 +1543,10 @@ private void InitializeComponent() this.tabTemplateNotificationTags.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabTemplateNotificationTags.Controls.Add(this.grouperTemplateTags); this.tabTemplateNotificationTags.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabTemplateNotificationTags.Location = new System.Drawing.Point(4, 27); - this.tabTemplateNotificationTags.Margin = new System.Windows.Forms.Padding(4); + this.tabTemplateNotificationTags.Location = new System.Drawing.Point(4, 24); this.tabTemplateNotificationTags.Name = "tabTemplateNotificationTags"; - this.tabTemplateNotificationTags.Padding = new System.Windows.Forms.Padding(4); - this.tabTemplateNotificationTags.Size = new System.Drawing.Size(605, 192); + this.tabTemplateNotificationTags.Size = new System.Drawing.Size(452, 153); + this.tabTemplateNotificationTags.Padding = new System.Windows.Forms.Padding(3); this.tabTemplateNotificationTags.TabIndex = 5; this.tabTemplateNotificationTags.Text = "Notification Tags"; // @@ -1762,16 +1566,15 @@ private void InitializeComponent() this.grouperTemplateTags.ForeColor = System.Drawing.Color.White; this.grouperTemplateTags.GroupImage = null; this.grouperTemplateTags.GroupTitle = "Notification Tags"; - this.grouperTemplateTags.Location = new System.Drawing.Point(21, 10); - this.grouperTemplateTags.Margin = new System.Windows.Forms.Padding(4); + this.grouperTemplateTags.Location = new System.Drawing.Point(16, 8); this.grouperTemplateTags.Name = "grouperTemplateTags"; - this.grouperTemplateTags.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperTemplateTags.Padding = new System.Windows.Forms.Padding(20); this.grouperTemplateTags.PaintGroupBox = true; this.grouperTemplateTags.RoundCorners = 4; this.grouperTemplateTags.ShadowColor = System.Drawing.Color.DarkGray; this.grouperTemplateTags.ShadowControl = false; this.grouperTemplateTags.ShadowThickness = 1; - this.grouperTemplateTags.Size = new System.Drawing.Size(560, 159); + this.grouperTemplateTags.Size = new System.Drawing.Size(420, 132); this.grouperTemplateTags.TabIndex = 16; this.grouperTemplateTags.CustomPaint += new System.Action(this.grouperTemplateTags_CustomPaint); // @@ -1785,10 +1588,9 @@ private void InitializeComponent() this.templateTagsDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.templateTagsDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.templateTagsDataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.templateTagsDataGridView.Location = new System.Drawing.Point(21, 39); - this.templateTagsDataGridView.Margin = new System.Windows.Forms.Padding(4); + this.templateTagsDataGridView.Location = new System.Drawing.Point(16, 32); this.templateTagsDataGridView.Name = "templateTagsDataGridView"; - this.templateTagsDataGridView.Size = new System.Drawing.Size(516, 96); + this.templateTagsDataGridView.Size = new System.Drawing.Size(387, 80); this.templateTagsDataGridView.TabIndex = 3; this.templateTagsDataGridView.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.dataGridView_EditingControlShowing); this.templateTagsDataGridView.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dataGridView_RowsAdded); @@ -1803,10 +1605,9 @@ private void InitializeComponent() this.templatePropertiesTabControl.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this.templatePropertiesTabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.templatePropertiesTabControl.Location = new System.Drawing.Point(0, 0); - this.templatePropertiesTabControl.Margin = new System.Windows.Forms.Padding(4); this.templatePropertiesTabControl.Name = "templatePropertiesTabControl"; this.templatePropertiesTabControl.SelectedIndex = 0; - this.templatePropertiesTabControl.Size = new System.Drawing.Size(614, 522); + this.templatePropertiesTabControl.Size = new System.Drawing.Size(461, 424); this.templatePropertiesTabControl.TabIndex = 18; this.templatePropertiesTabControl.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.templatePropertiesTabControl_DrawItem); // @@ -1815,10 +1616,9 @@ private void InitializeComponent() this.tabTemplateNotificationProperties.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabTemplateNotificationProperties.Controls.Add(this.grouperTemplateNotificationProperties); this.tabTemplateNotificationProperties.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabTemplateNotificationProperties.Location = new System.Drawing.Point(4, 27); - this.tabTemplateNotificationProperties.Margin = new System.Windows.Forms.Padding(4); + this.tabTemplateNotificationProperties.Location = new System.Drawing.Point(4, 24); this.tabTemplateNotificationProperties.Name = "tabTemplateNotificationProperties"; - this.tabTemplateNotificationProperties.Size = new System.Drawing.Size(606, 491); + this.tabTemplateNotificationProperties.Size = new System.Drawing.Size(453, 396); this.tabTemplateNotificationProperties.TabIndex = 2; this.tabTemplateNotificationProperties.Text = "Notification Properties"; // @@ -1838,16 +1638,15 @@ private void InitializeComponent() this.grouperTemplateNotificationProperties.ForeColor = System.Drawing.Color.White; this.grouperTemplateNotificationProperties.GroupImage = null; this.grouperTemplateNotificationProperties.GroupTitle = "Notification Properties"; - this.grouperTemplateNotificationProperties.Location = new System.Drawing.Point(21, 10); - this.grouperTemplateNotificationProperties.Margin = new System.Windows.Forms.Padding(4); + this.grouperTemplateNotificationProperties.Location = new System.Drawing.Point(16, 8); this.grouperTemplateNotificationProperties.Name = "grouperTemplateNotificationProperties"; - this.grouperTemplateNotificationProperties.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperTemplateNotificationProperties.Padding = new System.Windows.Forms.Padding(20); this.grouperTemplateNotificationProperties.PaintGroupBox = true; this.grouperTemplateNotificationProperties.RoundCorners = 4; this.grouperTemplateNotificationProperties.ShadowColor = System.Drawing.Color.DarkGray; this.grouperTemplateNotificationProperties.ShadowControl = false; this.grouperTemplateNotificationProperties.ShadowThickness = 1; - this.grouperTemplateNotificationProperties.Size = new System.Drawing.Size(561, 454); + this.grouperTemplateNotificationProperties.Size = new System.Drawing.Size(422, 371); this.grouperTemplateNotificationProperties.TabIndex = 19; this.grouperTemplateNotificationProperties.CustomPaint += new System.Action(this.grouperTemplateNotificationProperties_CustomPaint); // @@ -1861,10 +1660,9 @@ private void InitializeComponent() this.templateNotificationDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.templateNotificationDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.templateNotificationDataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.templateNotificationDataGridView.Location = new System.Drawing.Point(21, 39); - this.templateNotificationDataGridView.Margin = new System.Windows.Forms.Padding(4); + this.templateNotificationDataGridView.Location = new System.Drawing.Point(16, 32); this.templateNotificationDataGridView.Name = "templateNotificationDataGridView"; - this.templateNotificationDataGridView.Size = new System.Drawing.Size(518, 395); + this.templateNotificationDataGridView.Size = new System.Drawing.Size(389, 323); this.templateNotificationDataGridView.TabIndex = 0; this.templateNotificationDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.templateNotificationDataGridView_DataError); this.templateNotificationDataGridView.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.dataGridView_EditingControlShowing); @@ -1878,11 +1676,10 @@ private void InitializeComponent() this.tabTemplateAdditionalHeaders.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabTemplateAdditionalHeaders.Controls.Add(this.grouperTemplateAdditionalHeaders); this.tabTemplateAdditionalHeaders.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabTemplateAdditionalHeaders.Location = new System.Drawing.Point(4, 27); - this.tabTemplateAdditionalHeaders.Margin = new System.Windows.Forms.Padding(4); + this.tabTemplateAdditionalHeaders.Location = new System.Drawing.Point(4, 24); this.tabTemplateAdditionalHeaders.Name = "tabTemplateAdditionalHeaders"; - this.tabTemplateAdditionalHeaders.Padding = new System.Windows.Forms.Padding(4); - this.tabTemplateAdditionalHeaders.Size = new System.Drawing.Size(606, 491); + this.tabTemplateAdditionalHeaders.Size = new System.Drawing.Size(452, 396); + this.tabTemplateAdditionalHeaders.Padding = new System.Windows.Forms.Padding(3); this.tabTemplateAdditionalHeaders.TabIndex = 5; this.tabTemplateAdditionalHeaders.Text = "Additional Headers"; // @@ -1902,16 +1699,15 @@ private void InitializeComponent() this.grouperTemplateAdditionalHeaders.ForeColor = System.Drawing.Color.White; this.grouperTemplateAdditionalHeaders.GroupImage = null; this.grouperTemplateAdditionalHeaders.GroupTitle = "Additional Headers"; - this.grouperTemplateAdditionalHeaders.Location = new System.Drawing.Point(21, 10); - this.grouperTemplateAdditionalHeaders.Margin = new System.Windows.Forms.Padding(4); + this.grouperTemplateAdditionalHeaders.Location = new System.Drawing.Point(16, 8); this.grouperTemplateAdditionalHeaders.Name = "grouperTemplateAdditionalHeaders"; - this.grouperTemplateAdditionalHeaders.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperTemplateAdditionalHeaders.Padding = new System.Windows.Forms.Padding(20); this.grouperTemplateAdditionalHeaders.PaintGroupBox = true; this.grouperTemplateAdditionalHeaders.RoundCorners = 4; this.grouperTemplateAdditionalHeaders.ShadowColor = System.Drawing.Color.DarkGray; this.grouperTemplateAdditionalHeaders.ShadowControl = false; this.grouperTemplateAdditionalHeaders.ShadowThickness = 1; - this.grouperTemplateAdditionalHeaders.Size = new System.Drawing.Size(561, 454); + this.grouperTemplateAdditionalHeaders.Size = new System.Drawing.Size(421, 371); this.grouperTemplateAdditionalHeaders.TabIndex = 20; this.grouperTemplateAdditionalHeaders.CustomPaint += new System.Action(this.grouperTemplateAdditionalHeaders_CustomPaint); // @@ -1925,10 +1721,9 @@ private void InitializeComponent() this.templateHeadersDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.templateHeadersDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.templateHeadersDataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.templateHeadersDataGridView.Location = new System.Drawing.Point(21, 39); - this.templateHeadersDataGridView.Margin = new System.Windows.Forms.Padding(4); + this.templateHeadersDataGridView.Location = new System.Drawing.Point(16, 32); this.templateHeadersDataGridView.Name = "templateHeadersDataGridView"; - this.templateHeadersDataGridView.Size = new System.Drawing.Size(518, 400); + this.templateHeadersDataGridView.Size = new System.Drawing.Size(388, 327); this.templateHeadersDataGridView.TabIndex = 0; this.templateHeadersDataGridView.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.dataGridView_EditingControlShowing); this.templateHeadersDataGridView.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dataGridView_RowsAdded); @@ -1941,10 +1736,9 @@ private void InitializeComponent() this.tabPageMpnsNativeNotification.Controls.Add(this.mpnsSplitContainer); this.tabPageMpnsNativeNotification.ForeColor = System.Drawing.SystemColors.ControlText; this.tabPageMpnsNativeNotification.Location = new System.Drawing.Point(4, 22); - this.tabPageMpnsNativeNotification.Margin = new System.Windows.Forms.Padding(4); this.tabPageMpnsNativeNotification.Name = "tabPageMpnsNativeNotification"; - this.tabPageMpnsNativeNotification.Padding = new System.Windows.Forms.Padding(4); - this.tabPageMpnsNativeNotification.Size = new System.Drawing.Size(1293, 565); + this.tabPageMpnsNativeNotification.Padding = new System.Windows.Forms.Padding(3); + this.tabPageMpnsNativeNotification.Size = new System.Drawing.Size(968, 454); this.tabPageMpnsNativeNotification.TabIndex = 1; this.tabPageMpnsNativeNotification.Text = "Windows Phone"; // @@ -1953,8 +1747,7 @@ private void InitializeComponent() this.mpnsSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.mpnsSplitContainer.Location = new System.Drawing.Point(21, 20); - this.mpnsSplitContainer.Margin = new System.Windows.Forms.Padding(4); + this.mpnsSplitContainer.Location = new System.Drawing.Point(16, 16); this.mpnsSplitContainer.Name = "mpnsSplitContainer"; // // mpnsSplitContainer.Panel1 @@ -1964,16 +1757,15 @@ private void InitializeComponent() // mpnsSplitContainer.Panel2 // this.mpnsSplitContainer.Panel2.Controls.Add(this.mpnsTemplateTabControl); - this.mpnsSplitContainer.Size = new System.Drawing.Size(1248, 522); - this.mpnsSplitContainer.SplitterDistance = 613; - this.mpnsSplitContainer.SplitterWidth = 21; + this.mpnsSplitContainer.Size = new System.Drawing.Size(936, 424); + this.mpnsSplitContainer.SplitterDistance = 459; + this.mpnsSplitContainer.SplitterWidth = 16; this.mpnsSplitContainer.TabIndex = 4; // // mpnsSplitContainer1 // this.mpnsSplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; this.mpnsSplitContainer1.Location = new System.Drawing.Point(0, 0); - this.mpnsSplitContainer1.Margin = new System.Windows.Forms.Padding(4); this.mpnsSplitContainer1.Name = "mpnsSplitContainer1"; this.mpnsSplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; // @@ -1984,9 +1776,9 @@ private void InitializeComponent() // mpnsSplitContainer1.Panel2 // this.mpnsSplitContainer1.Panel2.Controls.Add(this.mpnsTagsTabControl); - this.mpnsSplitContainer1.Size = new System.Drawing.Size(613, 522); - this.mpnsSplitContainer1.SplitterDistance = 289; - this.mpnsSplitContainer1.SplitterWidth = 10; + this.mpnsSplitContainer1.Size = new System.Drawing.Size(459, 424); + this.mpnsSplitContainer1.SplitterDistance = 234; + this.mpnsSplitContainer1.SplitterWidth = 8; this.mpnsSplitContainer1.TabIndex = 0; // // grouperMpnsTemplate @@ -2004,15 +1796,14 @@ private void InitializeComponent() this.grouperMpnsTemplate.GroupImage = null; this.grouperMpnsTemplate.GroupTitle = "Notification Payload"; this.grouperMpnsTemplate.Location = new System.Drawing.Point(0, 0); - this.grouperMpnsTemplate.Margin = new System.Windows.Forms.Padding(4); this.grouperMpnsTemplate.Name = "grouperMpnsTemplate"; - this.grouperMpnsTemplate.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperMpnsTemplate.Padding = new System.Windows.Forms.Padding(20); this.grouperMpnsTemplate.PaintGroupBox = true; this.grouperMpnsTemplate.RoundCorners = 4; this.grouperMpnsTemplate.ShadowColor = System.Drawing.Color.DarkGray; this.grouperMpnsTemplate.ShadowControl = false; this.grouperMpnsTemplate.ShadowThickness = 1; - this.grouperMpnsTemplate.Size = new System.Drawing.Size(613, 289); + this.grouperMpnsTemplate.Size = new System.Drawing.Size(459, 234); this.grouperMpnsTemplate.TabIndex = 16; // // txtMpnsPayload @@ -2022,14 +1813,13 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtMpnsPayload.BackColor = System.Drawing.SystemColors.Window; this.txtMpnsPayload.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtMpnsPayload.Location = new System.Drawing.Point(21, 39); - this.txtMpnsPayload.Margin = new System.Windows.Forms.Padding(4); + this.txtMpnsPayload.Location = new System.Drawing.Point(16, 32); this.txtMpnsPayload.MaxLength = 0; this.txtMpnsPayload.Multiline = true; this.txtMpnsPayload.Name = "txtMpnsPayload"; this.txtMpnsPayload.ReadOnly = true; this.txtMpnsPayload.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtMpnsPayload.Size = new System.Drawing.Size(569, 229); + this.txtMpnsPayload.Size = new System.Drawing.Size(427, 186); this.txtMpnsPayload.TabIndex = 0; this.txtMpnsPayload.TextChanged += new System.EventHandler(this.txtMpnsPayload_TextChanged); // @@ -2041,10 +1831,9 @@ private void InitializeComponent() this.mpnsTagsTabControl.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this.mpnsTagsTabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.mpnsTagsTabControl.Location = new System.Drawing.Point(0, 0); - this.mpnsTagsTabControl.Margin = new System.Windows.Forms.Padding(4); this.mpnsTagsTabControl.Name = "mpnsTagsTabControl"; this.mpnsTagsTabControl.SelectedIndex = 0; - this.mpnsTagsTabControl.Size = new System.Drawing.Size(613, 223); + this.mpnsTagsTabControl.Size = new System.Drawing.Size(459, 182); this.mpnsTagsTabControl.TabIndex = 12; this.mpnsTagsTabControl.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.mpnsTagsTabControl_DrawItem); // @@ -2053,10 +1842,9 @@ private void InitializeComponent() this.tabMpnsTagExpression.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabMpnsTagExpression.Controls.Add(this.grouperMpnsTagExpression); this.tabMpnsTagExpression.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabMpnsTagExpression.Location = new System.Drawing.Point(4, 27); - this.tabMpnsTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.tabMpnsTagExpression.Location = new System.Drawing.Point(4, 24); this.tabMpnsTagExpression.Name = "tabMpnsTagExpression"; - this.tabMpnsTagExpression.Size = new System.Drawing.Size(605, 192); + this.tabMpnsTagExpression.Size = new System.Drawing.Size(451, 154); this.tabMpnsTagExpression.TabIndex = 2; this.tabMpnsTagExpression.Text = "Tag Expression"; // @@ -2076,16 +1864,15 @@ private void InitializeComponent() this.grouperMpnsTagExpression.ForeColor = System.Drawing.Color.White; this.grouperMpnsTagExpression.GroupImage = null; this.grouperMpnsTagExpression.GroupTitle = "Tag Expression"; - this.grouperMpnsTagExpression.Location = new System.Drawing.Point(21, 10); - this.grouperMpnsTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.grouperMpnsTagExpression.Location = new System.Drawing.Point(16, 8); this.grouperMpnsTagExpression.Name = "grouperMpnsTagExpression"; - this.grouperMpnsTagExpression.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperMpnsTagExpression.Padding = new System.Windows.Forms.Padding(20); this.grouperMpnsTagExpression.PaintGroupBox = true; this.grouperMpnsTagExpression.RoundCorners = 4; this.grouperMpnsTagExpression.ShadowColor = System.Drawing.Color.DarkGray; this.grouperMpnsTagExpression.ShadowControl = false; this.grouperMpnsTagExpression.ShadowThickness = 1; - this.grouperMpnsTagExpression.Size = new System.Drawing.Size(560, 159); + this.grouperMpnsTagExpression.Size = new System.Drawing.Size(419, 133); this.grouperMpnsTagExpression.TabIndex = 14; // // txtMpnsTagExpression @@ -2095,13 +1882,12 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtMpnsTagExpression.BackColor = System.Drawing.SystemColors.Window; this.txtMpnsTagExpression.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtMpnsTagExpression.Location = new System.Drawing.Point(21, 39); - this.txtMpnsTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.txtMpnsTagExpression.Location = new System.Drawing.Point(16, 32); this.txtMpnsTagExpression.MaxLength = 0; this.txtMpnsTagExpression.Multiline = true; this.txtMpnsTagExpression.Name = "txtMpnsTagExpression"; this.txtMpnsTagExpression.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtMpnsTagExpression.Size = new System.Drawing.Size(516, 99); + this.txtMpnsTagExpression.Size = new System.Drawing.Size(387, 85); this.txtMpnsTagExpression.TabIndex = 0; // // tabMpnsNotificationTags @@ -2109,11 +1895,10 @@ private void InitializeComponent() this.tabMpnsNotificationTags.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabMpnsNotificationTags.Controls.Add(this.grouperMpnsTags); this.tabMpnsNotificationTags.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabMpnsNotificationTags.Location = new System.Drawing.Point(4, 27); - this.tabMpnsNotificationTags.Margin = new System.Windows.Forms.Padding(4); + this.tabMpnsNotificationTags.Location = new System.Drawing.Point(4, 24); this.tabMpnsNotificationTags.Name = "tabMpnsNotificationTags"; - this.tabMpnsNotificationTags.Padding = new System.Windows.Forms.Padding(4); - this.tabMpnsNotificationTags.Size = new System.Drawing.Size(605, 192); + this.tabMpnsNotificationTags.Size = new System.Drawing.Size(452, 153); + this.tabMpnsNotificationTags.Padding = new System.Windows.Forms.Padding(3); this.tabMpnsNotificationTags.TabIndex = 5; this.tabMpnsNotificationTags.Text = "Notification Tags"; // @@ -2133,16 +1918,15 @@ private void InitializeComponent() this.grouperMpnsTags.ForeColor = System.Drawing.Color.White; this.grouperMpnsTags.GroupImage = null; this.grouperMpnsTags.GroupTitle = "Notification Tags"; - this.grouperMpnsTags.Location = new System.Drawing.Point(21, 10); - this.grouperMpnsTags.Margin = new System.Windows.Forms.Padding(4); + this.grouperMpnsTags.Location = new System.Drawing.Point(16, 8); this.grouperMpnsTags.Name = "grouperMpnsTags"; - this.grouperMpnsTags.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperMpnsTags.Padding = new System.Windows.Forms.Padding(20); this.grouperMpnsTags.PaintGroupBox = true; this.grouperMpnsTags.RoundCorners = 4; this.grouperMpnsTags.ShadowColor = System.Drawing.Color.DarkGray; this.grouperMpnsTags.ShadowControl = false; this.grouperMpnsTags.ShadowThickness = 1; - this.grouperMpnsTags.Size = new System.Drawing.Size(560, 159); + this.grouperMpnsTags.Size = new System.Drawing.Size(420, 132); this.grouperMpnsTags.TabIndex = 16; this.grouperMpnsTags.CustomPaint += new System.Action(this.grouperMpnsTags_CustomPaint); // @@ -2156,10 +1940,9 @@ private void InitializeComponent() this.mpnsTagsDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.mpnsTagsDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.mpnsTagsDataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.mpnsTagsDataGridView.Location = new System.Drawing.Point(21, 39); - this.mpnsTagsDataGridView.Margin = new System.Windows.Forms.Padding(4); + this.mpnsTagsDataGridView.Location = new System.Drawing.Point(16, 32); this.mpnsTagsDataGridView.Name = "mpnsTagsDataGridView"; - this.mpnsTagsDataGridView.Size = new System.Drawing.Size(516, 96); + this.mpnsTagsDataGridView.Size = new System.Drawing.Size(387, 80); this.mpnsTagsDataGridView.TabIndex = 3; this.mpnsTagsDataGridView.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.dataGridView_EditingControlShowing); this.mpnsTagsDataGridView.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dataGridView_RowsAdded); @@ -2174,10 +1957,9 @@ private void InitializeComponent() this.mpnsTemplateTabControl.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this.mpnsTemplateTabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.mpnsTemplateTabControl.Location = new System.Drawing.Point(0, 0); - this.mpnsTemplateTabControl.Margin = new System.Windows.Forms.Padding(4); this.mpnsTemplateTabControl.Name = "mpnsTemplateTabControl"; this.mpnsTemplateTabControl.SelectedIndex = 0; - this.mpnsTemplateTabControl.Size = new System.Drawing.Size(614, 522); + this.mpnsTemplateTabControl.Size = new System.Drawing.Size(461, 424); this.mpnsTemplateTabControl.TabIndex = 17; this.mpnsTemplateTabControl.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.mpnsTemplateTabControl_DrawItem); // @@ -2186,10 +1968,9 @@ private void InitializeComponent() this.tabMpnsNotificationTemplate.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabMpnsNotificationTemplate.Controls.Add(this.grouperMpnsNotificationTemplate); this.tabMpnsNotificationTemplate.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabMpnsNotificationTemplate.Location = new System.Drawing.Point(4, 27); - this.tabMpnsNotificationTemplate.Margin = new System.Windows.Forms.Padding(4); + this.tabMpnsNotificationTemplate.Location = new System.Drawing.Point(4, 24); this.tabMpnsNotificationTemplate.Name = "tabMpnsNotificationTemplate"; - this.tabMpnsNotificationTemplate.Size = new System.Drawing.Size(606, 491); + this.tabMpnsNotificationTemplate.Size = new System.Drawing.Size(453, 396); this.tabMpnsNotificationTemplate.TabIndex = 2; this.tabMpnsNotificationTemplate.Text = "Notification Template"; // @@ -2210,16 +1991,15 @@ private void InitializeComponent() this.grouperMpnsNotificationTemplate.ForeColor = System.Drawing.Color.White; this.grouperMpnsNotificationTemplate.GroupImage = null; this.grouperMpnsNotificationTemplate.GroupTitle = "Notification Template"; - this.grouperMpnsNotificationTemplate.Location = new System.Drawing.Point(21, 10); - this.grouperMpnsNotificationTemplate.Margin = new System.Windows.Forms.Padding(4); + this.grouperMpnsNotificationTemplate.Location = new System.Drawing.Point(16, 8); this.grouperMpnsNotificationTemplate.Name = "grouperMpnsNotificationTemplate"; - this.grouperMpnsNotificationTemplate.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperMpnsNotificationTemplate.Padding = new System.Windows.Forms.Padding(20); this.grouperMpnsNotificationTemplate.PaintGroupBox = true; this.grouperMpnsNotificationTemplate.RoundCorners = 4; this.grouperMpnsNotificationTemplate.ShadowColor = System.Drawing.Color.DarkGray; this.grouperMpnsNotificationTemplate.ShadowControl = false; this.grouperMpnsNotificationTemplate.ShadowThickness = 1; - this.grouperMpnsNotificationTemplate.Size = new System.Drawing.Size(561, 454); + this.grouperMpnsNotificationTemplate.Size = new System.Drawing.Size(422, 371); this.grouperMpnsNotificationTemplate.TabIndex = 19; this.grouperMpnsNotificationTemplate.CustomPaint += new System.Action(this.grouperMpnsNotificationTemplate_CustomPaint); // @@ -2230,10 +2010,9 @@ private void InitializeComponent() this.cboMpnsNotificationTemplate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cboMpnsNotificationTemplate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cboMpnsNotificationTemplate.FormattingEnabled = true; - this.cboMpnsNotificationTemplate.Location = new System.Drawing.Point(21, 39); - this.cboMpnsNotificationTemplate.Margin = new System.Windows.Forms.Padding(4); + this.cboMpnsNotificationTemplate.Location = new System.Drawing.Point(16, 32); this.cboMpnsNotificationTemplate.Name = "cboMpnsNotificationTemplate"; - this.cboMpnsNotificationTemplate.Size = new System.Drawing.Size(517, 25); + this.cboMpnsNotificationTemplate.Size = new System.Drawing.Size(390, 21); this.cboMpnsNotificationTemplate.TabIndex = 25; this.cboMpnsNotificationTemplate.SelectedIndexChanged += new System.EventHandler(this.cboMpnsNotificationTemplate_SelectedIndexChanged); // @@ -2243,10 +2022,9 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.mpnsTemplatePropertyGrid.HelpVisible = false; - this.mpnsTemplatePropertyGrid.Location = new System.Drawing.Point(21, 89); - this.mpnsTemplatePropertyGrid.Margin = new System.Windows.Forms.Padding(4); + this.mpnsTemplatePropertyGrid.Location = new System.Drawing.Point(16, 72); this.mpnsTemplatePropertyGrid.Name = "mpnsTemplatePropertyGrid"; - this.mpnsTemplatePropertyGrid.Size = new System.Drawing.Size(518, 346); + this.mpnsTemplatePropertyGrid.Size = new System.Drawing.Size(389, 284); this.mpnsTemplatePropertyGrid.TabIndex = 24; this.mpnsTemplatePropertyGrid.ToolbarVisible = false; this.mpnsTemplatePropertyGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.mpnsTemplatePropertyGrid_PropertyValueChanged); @@ -2256,11 +2034,10 @@ private void InitializeComponent() this.tabMpnsAdditionalHeaders.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabMpnsAdditionalHeaders.Controls.Add(this.grouperMpnsAdditionalHeaders); this.tabMpnsAdditionalHeaders.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabMpnsAdditionalHeaders.Location = new System.Drawing.Point(4, 27); - this.tabMpnsAdditionalHeaders.Margin = new System.Windows.Forms.Padding(4); + this.tabMpnsAdditionalHeaders.Location = new System.Drawing.Point(4, 24); this.tabMpnsAdditionalHeaders.Name = "tabMpnsAdditionalHeaders"; - this.tabMpnsAdditionalHeaders.Padding = new System.Windows.Forms.Padding(4); - this.tabMpnsAdditionalHeaders.Size = new System.Drawing.Size(606, 491); + this.tabMpnsAdditionalHeaders.Size = new System.Drawing.Size(452, 396); + this.tabMpnsAdditionalHeaders.Padding = new System.Windows.Forms.Padding(3); this.tabMpnsAdditionalHeaders.TabIndex = 5; this.tabMpnsAdditionalHeaders.Text = "Additional Headers"; // @@ -2280,16 +2057,15 @@ private void InitializeComponent() this.grouperMpnsAdditionalHeaders.ForeColor = System.Drawing.Color.White; this.grouperMpnsAdditionalHeaders.GroupImage = null; this.grouperMpnsAdditionalHeaders.GroupTitle = "Additional Headers"; - this.grouperMpnsAdditionalHeaders.Location = new System.Drawing.Point(21, 10); - this.grouperMpnsAdditionalHeaders.Margin = new System.Windows.Forms.Padding(4); + this.grouperMpnsAdditionalHeaders.Location = new System.Drawing.Point(16, 8); this.grouperMpnsAdditionalHeaders.Name = "grouperMpnsAdditionalHeaders"; - this.grouperMpnsAdditionalHeaders.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperMpnsAdditionalHeaders.Padding = new System.Windows.Forms.Padding(20); this.grouperMpnsAdditionalHeaders.PaintGroupBox = true; this.grouperMpnsAdditionalHeaders.RoundCorners = 4; this.grouperMpnsAdditionalHeaders.ShadowColor = System.Drawing.Color.DarkGray; this.grouperMpnsAdditionalHeaders.ShadowControl = false; this.grouperMpnsAdditionalHeaders.ShadowThickness = 1; - this.grouperMpnsAdditionalHeaders.Size = new System.Drawing.Size(561, 454); + this.grouperMpnsAdditionalHeaders.Size = new System.Drawing.Size(421, 371); this.grouperMpnsAdditionalHeaders.TabIndex = 20; this.grouperMpnsAdditionalHeaders.CustomPaint += new System.Action(this.grouperMpnsAdditionalHeaders_CustomPaint); // @@ -2303,10 +2079,9 @@ private void InitializeComponent() this.mpnsHeadersDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.mpnsHeadersDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.mpnsHeadersDataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.mpnsHeadersDataGridView.Location = new System.Drawing.Point(21, 39); - this.mpnsHeadersDataGridView.Margin = new System.Windows.Forms.Padding(4); + this.mpnsHeadersDataGridView.Location = new System.Drawing.Point(16, 32); this.mpnsHeadersDataGridView.Name = "mpnsHeadersDataGridView"; - this.mpnsHeadersDataGridView.Size = new System.Drawing.Size(518, 400); + this.mpnsHeadersDataGridView.Size = new System.Drawing.Size(388, 327); this.mpnsHeadersDataGridView.TabIndex = 0; this.mpnsHeadersDataGridView.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.dataGridView_EditingControlShowing); this.mpnsHeadersDataGridView.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dataGridView_RowsAdded); @@ -2319,10 +2094,9 @@ private void InitializeComponent() this.tabPageWnsNativeNotification.Controls.Add(this.wnsSplitContainer); this.tabPageWnsNativeNotification.ForeColor = System.Drawing.SystemColors.ControlText; this.tabPageWnsNativeNotification.Location = new System.Drawing.Point(4, 22); - this.tabPageWnsNativeNotification.Margin = new System.Windows.Forms.Padding(4); this.tabPageWnsNativeNotification.Name = "tabPageWnsNativeNotification"; - this.tabPageWnsNativeNotification.Padding = new System.Windows.Forms.Padding(4); - this.tabPageWnsNativeNotification.Size = new System.Drawing.Size(1293, 565); + this.tabPageWnsNativeNotification.Padding = new System.Windows.Forms.Padding(3); + this.tabPageWnsNativeNotification.Size = new System.Drawing.Size(968, 454); this.tabPageWnsNativeNotification.TabIndex = 1; this.tabPageWnsNativeNotification.Text = "Windows"; // @@ -2331,8 +2105,7 @@ private void InitializeComponent() this.wnsSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.wnsSplitContainer.Location = new System.Drawing.Point(21, 20); - this.wnsSplitContainer.Margin = new System.Windows.Forms.Padding(4); + this.wnsSplitContainer.Location = new System.Drawing.Point(16, 16); this.wnsSplitContainer.Name = "wnsSplitContainer"; // // wnsSplitContainer.Panel1 @@ -2342,16 +2115,15 @@ private void InitializeComponent() // wnsSplitContainer.Panel2 // this.wnsSplitContainer.Panel2.Controls.Add(this.wnsTemplateTabControl); - this.wnsSplitContainer.Size = new System.Drawing.Size(1248, 522); - this.wnsSplitContainer.SplitterDistance = 613; - this.wnsSplitContainer.SplitterWidth = 21; + this.wnsSplitContainer.Size = new System.Drawing.Size(936, 424); + this.wnsSplitContainer.SplitterDistance = 459; + this.wnsSplitContainer.SplitterWidth = 16; this.wnsSplitContainer.TabIndex = 3; // // wnsSplitContainer1 // this.wnsSplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; this.wnsSplitContainer1.Location = new System.Drawing.Point(0, 0); - this.wnsSplitContainer1.Margin = new System.Windows.Forms.Padding(4); this.wnsSplitContainer1.Name = "wnsSplitContainer1"; this.wnsSplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; // @@ -2362,9 +2134,9 @@ private void InitializeComponent() // wnsSplitContainer1.Panel2 // this.wnsSplitContainer1.Panel2.Controls.Add(this.wnsTagsTabControl); - this.wnsSplitContainer1.Size = new System.Drawing.Size(613, 522); - this.wnsSplitContainer1.SplitterDistance = 289; - this.wnsSplitContainer1.SplitterWidth = 10; + this.wnsSplitContainer1.Size = new System.Drawing.Size(459, 424); + this.wnsSplitContainer1.SplitterDistance = 234; + this.wnsSplitContainer1.SplitterWidth = 8; this.wnsSplitContainer1.TabIndex = 0; // // grouperWnsTemplate @@ -2382,15 +2154,14 @@ private void InitializeComponent() this.grouperWnsTemplate.GroupImage = null; this.grouperWnsTemplate.GroupTitle = "Notification Payload"; this.grouperWnsTemplate.Location = new System.Drawing.Point(0, 0); - this.grouperWnsTemplate.Margin = new System.Windows.Forms.Padding(4); this.grouperWnsTemplate.Name = "grouperWnsTemplate"; - this.grouperWnsTemplate.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperWnsTemplate.Padding = new System.Windows.Forms.Padding(20); this.grouperWnsTemplate.PaintGroupBox = true; this.grouperWnsTemplate.RoundCorners = 4; this.grouperWnsTemplate.ShadowColor = System.Drawing.Color.DarkGray; this.grouperWnsTemplate.ShadowControl = false; this.grouperWnsTemplate.ShadowThickness = 1; - this.grouperWnsTemplate.Size = new System.Drawing.Size(613, 289); + this.grouperWnsTemplate.Size = new System.Drawing.Size(459, 234); this.grouperWnsTemplate.TabIndex = 16; // // txtWnsPayload @@ -2400,14 +2171,13 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtWnsPayload.BackColor = System.Drawing.SystemColors.Window; this.txtWnsPayload.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtWnsPayload.Location = new System.Drawing.Point(21, 39); - this.txtWnsPayload.Margin = new System.Windows.Forms.Padding(4); + this.txtWnsPayload.Location = new System.Drawing.Point(16, 32); this.txtWnsPayload.MaxLength = 0; this.txtWnsPayload.Multiline = true; this.txtWnsPayload.Name = "txtWnsPayload"; this.txtWnsPayload.ReadOnly = true; this.txtWnsPayload.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtWnsPayload.Size = new System.Drawing.Size(569, 229); + this.txtWnsPayload.Size = new System.Drawing.Size(427, 186); this.txtWnsPayload.TabIndex = 0; this.txtWnsPayload.TextChanged += new System.EventHandler(this.txtWnsPayload_TextChanged); // @@ -2419,10 +2189,9 @@ private void InitializeComponent() this.wnsTagsTabControl.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this.wnsTagsTabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.wnsTagsTabControl.Location = new System.Drawing.Point(0, 0); - this.wnsTagsTabControl.Margin = new System.Windows.Forms.Padding(4); this.wnsTagsTabControl.Name = "wnsTagsTabControl"; this.wnsTagsTabControl.SelectedIndex = 0; - this.wnsTagsTabControl.Size = new System.Drawing.Size(613, 223); + this.wnsTagsTabControl.Size = new System.Drawing.Size(459, 182); this.wnsTagsTabControl.TabIndex = 13; this.wnsTagsTabControl.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.wnsTagsTabControl_DrawItem); // @@ -2431,10 +2200,9 @@ private void InitializeComponent() this.tabWnsTagExpression.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabWnsTagExpression.Controls.Add(this.grouperWnsTagExpression); this.tabWnsTagExpression.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabWnsTagExpression.Location = new System.Drawing.Point(4, 27); - this.tabWnsTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.tabWnsTagExpression.Location = new System.Drawing.Point(4, 24); this.tabWnsTagExpression.Name = "tabWnsTagExpression"; - this.tabWnsTagExpression.Size = new System.Drawing.Size(605, 192); + this.tabWnsTagExpression.Size = new System.Drawing.Size(451, 154); this.tabWnsTagExpression.TabIndex = 2; this.tabWnsTagExpression.Text = "Tag Expression"; // @@ -2454,16 +2222,15 @@ private void InitializeComponent() this.grouperWnsTagExpression.ForeColor = System.Drawing.Color.White; this.grouperWnsTagExpression.GroupImage = null; this.grouperWnsTagExpression.GroupTitle = "Tag Expression"; - this.grouperWnsTagExpression.Location = new System.Drawing.Point(21, 10); - this.grouperWnsTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.grouperWnsTagExpression.Location = new System.Drawing.Point(16, 8); this.grouperWnsTagExpression.Name = "grouperWnsTagExpression"; - this.grouperWnsTagExpression.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperWnsTagExpression.Padding = new System.Windows.Forms.Padding(20); this.grouperWnsTagExpression.PaintGroupBox = true; this.grouperWnsTagExpression.RoundCorners = 4; this.grouperWnsTagExpression.ShadowColor = System.Drawing.Color.DarkGray; this.grouperWnsTagExpression.ShadowControl = false; this.grouperWnsTagExpression.ShadowThickness = 1; - this.grouperWnsTagExpression.Size = new System.Drawing.Size(560, 159); + this.grouperWnsTagExpression.Size = new System.Drawing.Size(419, 133); this.grouperWnsTagExpression.TabIndex = 14; // // txtWnsTagExpression @@ -2473,13 +2240,12 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtWnsTagExpression.BackColor = System.Drawing.SystemColors.Window; this.txtWnsTagExpression.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtWnsTagExpression.Location = new System.Drawing.Point(21, 39); - this.txtWnsTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.txtWnsTagExpression.Location = new System.Drawing.Point(16, 32); this.txtWnsTagExpression.MaxLength = 0; this.txtWnsTagExpression.Multiline = true; this.txtWnsTagExpression.Name = "txtWnsTagExpression"; this.txtWnsTagExpression.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtWnsTagExpression.Size = new System.Drawing.Size(516, 99); + this.txtWnsTagExpression.Size = new System.Drawing.Size(387, 85); this.txtWnsTagExpression.TabIndex = 0; // // tabWnsNotificationTags @@ -2487,11 +2253,10 @@ private void InitializeComponent() this.tabWnsNotificationTags.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabWnsNotificationTags.Controls.Add(this.grouperWnsTags); this.tabWnsNotificationTags.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabWnsNotificationTags.Location = new System.Drawing.Point(4, 27); - this.tabWnsNotificationTags.Margin = new System.Windows.Forms.Padding(4); + this.tabWnsNotificationTags.Location = new System.Drawing.Point(4, 24); this.tabWnsNotificationTags.Name = "tabWnsNotificationTags"; - this.tabWnsNotificationTags.Padding = new System.Windows.Forms.Padding(4); - this.tabWnsNotificationTags.Size = new System.Drawing.Size(605, 192); + this.tabWnsNotificationTags.Size = new System.Drawing.Size(452, 153); + this.tabWnsNotificationTags.Padding = new System.Windows.Forms.Padding(3); this.tabWnsNotificationTags.TabIndex = 5; this.tabWnsNotificationTags.Text = "Notification Tags"; // @@ -2511,16 +2276,15 @@ private void InitializeComponent() this.grouperWnsTags.ForeColor = System.Drawing.Color.White; this.grouperWnsTags.GroupImage = null; this.grouperWnsTags.GroupTitle = "Notification Tags"; - this.grouperWnsTags.Location = new System.Drawing.Point(21, 10); - this.grouperWnsTags.Margin = new System.Windows.Forms.Padding(4); + this.grouperWnsTags.Location = new System.Drawing.Point(16, 8); this.grouperWnsTags.Name = "grouperWnsTags"; - this.grouperWnsTags.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperWnsTags.Padding = new System.Windows.Forms.Padding(20); this.grouperWnsTags.PaintGroupBox = true; this.grouperWnsTags.RoundCorners = 4; this.grouperWnsTags.ShadowColor = System.Drawing.Color.DarkGray; this.grouperWnsTags.ShadowControl = false; this.grouperWnsTags.ShadowThickness = 1; - this.grouperWnsTags.Size = new System.Drawing.Size(560, 159); + this.grouperWnsTags.Size = new System.Drawing.Size(420, 132); this.grouperWnsTags.TabIndex = 16; this.grouperWnsTags.CustomPaint += new System.Action(this.grouperWnsTags_CustomPaint); // @@ -2534,10 +2298,9 @@ private void InitializeComponent() this.wnsTagsDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.wnsTagsDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.wnsTagsDataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.wnsTagsDataGridView.Location = new System.Drawing.Point(21, 39); - this.wnsTagsDataGridView.Margin = new System.Windows.Forms.Padding(4); + this.wnsTagsDataGridView.Location = new System.Drawing.Point(16, 32); this.wnsTagsDataGridView.Name = "wnsTagsDataGridView"; - this.wnsTagsDataGridView.Size = new System.Drawing.Size(516, 96); + this.wnsTagsDataGridView.Size = new System.Drawing.Size(387, 80); this.wnsTagsDataGridView.TabIndex = 3; this.wnsTagsDataGridView.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.dataGridView_EditingControlShowing); this.wnsTagsDataGridView.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dataGridView_RowsAdded); @@ -2552,10 +2315,9 @@ private void InitializeComponent() this.wnsTemplateTabControl.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this.wnsTemplateTabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.wnsTemplateTabControl.Location = new System.Drawing.Point(0, 0); - this.wnsTemplateTabControl.Margin = new System.Windows.Forms.Padding(4); this.wnsTemplateTabControl.Name = "wnsTemplateTabControl"; this.wnsTemplateTabControl.SelectedIndex = 0; - this.wnsTemplateTabControl.Size = new System.Drawing.Size(614, 522); + this.wnsTemplateTabControl.Size = new System.Drawing.Size(461, 424); this.wnsTemplateTabControl.TabIndex = 16; this.wnsTemplateTabControl.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.wnsTemplateTabControl_DrawItem); // @@ -2564,10 +2326,9 @@ private void InitializeComponent() this.tabWnsTemplate.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabWnsTemplate.Controls.Add(this.grouperWnsNotificationTemplate); this.tabWnsTemplate.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabWnsTemplate.Location = new System.Drawing.Point(4, 27); - this.tabWnsTemplate.Margin = new System.Windows.Forms.Padding(4); + this.tabWnsTemplate.Location = new System.Drawing.Point(4, 24); this.tabWnsTemplate.Name = "tabWnsTemplate"; - this.tabWnsTemplate.Size = new System.Drawing.Size(606, 491); + this.tabWnsTemplate.Size = new System.Drawing.Size(453, 396); this.tabWnsTemplate.TabIndex = 2; this.tabWnsTemplate.Text = "Notification Template"; // @@ -2588,16 +2349,15 @@ private void InitializeComponent() this.grouperWnsNotificationTemplate.ForeColor = System.Drawing.Color.White; this.grouperWnsNotificationTemplate.GroupImage = null; this.grouperWnsNotificationTemplate.GroupTitle = "Notification Template"; - this.grouperWnsNotificationTemplate.Location = new System.Drawing.Point(21, 10); - this.grouperWnsNotificationTemplate.Margin = new System.Windows.Forms.Padding(4); + this.grouperWnsNotificationTemplate.Location = new System.Drawing.Point(16, 8); this.grouperWnsNotificationTemplate.Name = "grouperWnsNotificationTemplate"; - this.grouperWnsNotificationTemplate.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperWnsNotificationTemplate.Padding = new System.Windows.Forms.Padding(20); this.grouperWnsNotificationTemplate.PaintGroupBox = true; this.grouperWnsNotificationTemplate.RoundCorners = 4; this.grouperWnsNotificationTemplate.ShadowColor = System.Drawing.Color.DarkGray; this.grouperWnsNotificationTemplate.ShadowControl = false; this.grouperWnsNotificationTemplate.ShadowThickness = 1; - this.grouperWnsNotificationTemplate.Size = new System.Drawing.Size(561, 454); + this.grouperWnsNotificationTemplate.Size = new System.Drawing.Size(422, 371); this.grouperWnsNotificationTemplate.TabIndex = 19; this.grouperWnsNotificationTemplate.CustomPaint += new System.Action(this.grouperWnsNotificationTemplate_CustomPaint); // @@ -2608,10 +2368,9 @@ private void InitializeComponent() this.cboWnsNotificationTemplate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cboWnsNotificationTemplate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cboWnsNotificationTemplate.FormattingEnabled = true; - this.cboWnsNotificationTemplate.Location = new System.Drawing.Point(21, 39); - this.cboWnsNotificationTemplate.Margin = new System.Windows.Forms.Padding(4); + this.cboWnsNotificationTemplate.Location = new System.Drawing.Point(16, 32); this.cboWnsNotificationTemplate.Name = "cboWnsNotificationTemplate"; - this.cboWnsNotificationTemplate.Size = new System.Drawing.Size(517, 25); + this.cboWnsNotificationTemplate.Size = new System.Drawing.Size(390, 21); this.cboWnsNotificationTemplate.TabIndex = 25; this.cboWnsNotificationTemplate.SelectedIndexChanged += new System.EventHandler(this.cboWnsNotificationTemplate_SelectedIndexChanged); // @@ -2621,10 +2380,9 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.wnsTemplatePropertyGrid.HelpVisible = false; - this.wnsTemplatePropertyGrid.Location = new System.Drawing.Point(21, 89); - this.wnsTemplatePropertyGrid.Margin = new System.Windows.Forms.Padding(4); + this.wnsTemplatePropertyGrid.Location = new System.Drawing.Point(16, 72); this.wnsTemplatePropertyGrid.Name = "wnsTemplatePropertyGrid"; - this.wnsTemplatePropertyGrid.Size = new System.Drawing.Size(518, 346); + this.wnsTemplatePropertyGrid.Size = new System.Drawing.Size(389, 284); this.wnsTemplatePropertyGrid.TabIndex = 24; this.wnsTemplatePropertyGrid.ToolbarVisible = false; this.wnsTemplatePropertyGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.wnsTemplatePropertyGrid_PropertyValueChanged); @@ -2634,11 +2392,10 @@ private void InitializeComponent() this.tabWnsAdditionalHeaders.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabWnsAdditionalHeaders.Controls.Add(this.grouperWnsAdditionalHeaders); this.tabWnsAdditionalHeaders.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabWnsAdditionalHeaders.Location = new System.Drawing.Point(4, 27); - this.tabWnsAdditionalHeaders.Margin = new System.Windows.Forms.Padding(4); + this.tabWnsAdditionalHeaders.Location = new System.Drawing.Point(4, 24); this.tabWnsAdditionalHeaders.Name = "tabWnsAdditionalHeaders"; - this.tabWnsAdditionalHeaders.Padding = new System.Windows.Forms.Padding(4); - this.tabWnsAdditionalHeaders.Size = new System.Drawing.Size(606, 491); + this.tabWnsAdditionalHeaders.Size = new System.Drawing.Size(452, 396); + this.tabWnsAdditionalHeaders.Padding = new System.Windows.Forms.Padding(3); this.tabWnsAdditionalHeaders.TabIndex = 5; this.tabWnsAdditionalHeaders.Text = "Additional Headers"; // @@ -2658,16 +2415,15 @@ private void InitializeComponent() this.grouperWnsAdditionalHeaders.ForeColor = System.Drawing.Color.White; this.grouperWnsAdditionalHeaders.GroupImage = null; this.grouperWnsAdditionalHeaders.GroupTitle = "Additional Headers"; - this.grouperWnsAdditionalHeaders.Location = new System.Drawing.Point(21, 10); - this.grouperWnsAdditionalHeaders.Margin = new System.Windows.Forms.Padding(4); + this.grouperWnsAdditionalHeaders.Location = new System.Drawing.Point(16, 8); this.grouperWnsAdditionalHeaders.Name = "grouperWnsAdditionalHeaders"; - this.grouperWnsAdditionalHeaders.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperWnsAdditionalHeaders.Padding = new System.Windows.Forms.Padding(20); this.grouperWnsAdditionalHeaders.PaintGroupBox = true; this.grouperWnsAdditionalHeaders.RoundCorners = 4; this.grouperWnsAdditionalHeaders.ShadowColor = System.Drawing.Color.DarkGray; this.grouperWnsAdditionalHeaders.ShadowControl = false; this.grouperWnsAdditionalHeaders.ShadowThickness = 1; - this.grouperWnsAdditionalHeaders.Size = new System.Drawing.Size(561, 454); + this.grouperWnsAdditionalHeaders.Size = new System.Drawing.Size(421, 371); this.grouperWnsAdditionalHeaders.TabIndex = 20; this.grouperWnsAdditionalHeaders.CustomPaint += new System.Action(this.grouperWnsAdditionalHeaders_CustomPaint); // @@ -2681,10 +2437,9 @@ private void InitializeComponent() this.wnsHeadersDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.wnsHeadersDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.wnsHeadersDataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.wnsHeadersDataGridView.Location = new System.Drawing.Point(21, 39); - this.wnsHeadersDataGridView.Margin = new System.Windows.Forms.Padding(4); + this.wnsHeadersDataGridView.Location = new System.Drawing.Point(16, 32); this.wnsHeadersDataGridView.Name = "wnsHeadersDataGridView"; - this.wnsHeadersDataGridView.Size = new System.Drawing.Size(518, 400); + this.wnsHeadersDataGridView.Size = new System.Drawing.Size(388, 327); this.wnsHeadersDataGridView.TabIndex = 0; this.wnsHeadersDataGridView.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.dataGridView_EditingControlShowing); this.wnsHeadersDataGridView.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dataGridView_RowsAdded); @@ -2697,20 +2452,17 @@ private void InitializeComponent() this.tabPageAppleNativeNotification.Controls.Add(this.appleSplitContainer); this.tabPageAppleNativeNotification.ForeColor = System.Drawing.SystemColors.ControlText; this.tabPageAppleNativeNotification.Location = new System.Drawing.Point(4, 22); - this.tabPageAppleNativeNotification.Margin = new System.Windows.Forms.Padding(4); this.tabPageAppleNativeNotification.Name = "tabPageAppleNativeNotification"; - this.tabPageAppleNativeNotification.Size = new System.Drawing.Size(1293, 565); + this.tabPageAppleNativeNotification.Size = new System.Drawing.Size(968, 454); this.tabPageAppleNativeNotification.TabIndex = 2; this.tabPageAppleNativeNotification.Text = "Apple"; - this.tabPageAppleNativeNotification.Resize += new System.EventHandler(this.tabPageAppleNativeNotification_Resize); // // appleSplitContainer // this.appleSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.appleSplitContainer.Location = new System.Drawing.Point(21, 20); - this.appleSplitContainer.Margin = new System.Windows.Forms.Padding(4); + this.appleSplitContainer.Location = new System.Drawing.Point(16, 16); this.appleSplitContainer.Name = "appleSplitContainer"; this.appleSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; // @@ -2721,10 +2473,9 @@ private void InitializeComponent() // appleSplitContainer.Panel2 // this.appleSplitContainer.Panel2.Controls.Add(this.appleLowerSplitContainer); - this.appleSplitContainer.Panel2.Controls.Add(this.grouperExpiry); - this.appleSplitContainer.Size = new System.Drawing.Size(1248, 522); - this.appleSplitContainer.SplitterDistance = 289; - this.appleSplitContainer.SplitterWidth = 10; + this.appleSplitContainer.Size = new System.Drawing.Size(936, 424); + this.appleSplitContainer.SplitterDistance = 234; + this.appleSplitContainer.SplitterWidth = 8; this.appleSplitContainer.TabIndex = 16; // // grouperJsonPayload @@ -2742,15 +2493,14 @@ private void InitializeComponent() this.grouperJsonPayload.GroupImage = null; this.grouperJsonPayload.GroupTitle = "Json Payload"; this.grouperJsonPayload.Location = new System.Drawing.Point(0, 0); - this.grouperJsonPayload.Margin = new System.Windows.Forms.Padding(4); this.grouperJsonPayload.Name = "grouperJsonPayload"; - this.grouperJsonPayload.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperJsonPayload.Padding = new System.Windows.Forms.Padding(20); this.grouperJsonPayload.PaintGroupBox = true; this.grouperJsonPayload.RoundCorners = 4; this.grouperJsonPayload.ShadowColor = System.Drawing.Color.DarkGray; this.grouperJsonPayload.ShadowControl = false; this.grouperJsonPayload.ShadowThickness = 1; - this.grouperJsonPayload.Size = new System.Drawing.Size(1248, 289); + this.grouperJsonPayload.Size = new System.Drawing.Size(936, 234); this.grouperJsonPayload.TabIndex = 15; this.grouperJsonPayload.CustomPaint += new System.Action(this.grouperJsonPayload_CustomPaint); // @@ -2761,13 +2511,12 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtApnsJsonPayload.BackColor = System.Drawing.SystemColors.Window; this.txtApnsJsonPayload.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtApnsJsonPayload.Location = new System.Drawing.Point(21, 39); - this.txtApnsJsonPayload.Margin = new System.Windows.Forms.Padding(4); + this.txtApnsJsonPayload.Location = new System.Drawing.Point(16, 32); this.txtApnsJsonPayload.MaxLength = 0; this.txtApnsJsonPayload.Multiline = true; this.txtApnsJsonPayload.Name = "txtApnsJsonPayload"; this.txtApnsJsonPayload.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtApnsJsonPayload.Size = new System.Drawing.Size(1204, 229); + this.txtApnsJsonPayload.Size = new System.Drawing.Size(904, 186); this.txtApnsJsonPayload.TabIndex = 0; this.txtApnsJsonPayload.TextChanged += new System.EventHandler(this.txtApnsJsonPayload_TextChanged); // @@ -2775,7 +2524,6 @@ private void InitializeComponent() // this.appleLowerSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; this.appleLowerSplitContainer.Location = new System.Drawing.Point(0, 0); - this.appleLowerSplitContainer.Margin = new System.Windows.Forms.Padding(4); this.appleLowerSplitContainer.Name = "appleLowerSplitContainer"; // // appleLowerSplitContainer.Panel1 @@ -2785,9 +2533,9 @@ private void InitializeComponent() // appleLowerSplitContainer.Panel2 // this.appleLowerSplitContainer.Panel2.Controls.Add(this.appleAdditionalHeadersTabControl); - this.appleLowerSplitContainer.Size = new System.Drawing.Size(1248, 223); - this.appleLowerSplitContainer.SplitterDistance = 613; - this.appleLowerSplitContainer.SplitterWidth = 21; + this.appleLowerSplitContainer.Size = new System.Drawing.Size(936, 182); + this.appleLowerSplitContainer.SplitterDistance = 459; + this.appleLowerSplitContainer.SplitterWidth = 16; this.appleLowerSplitContainer.TabIndex = 35; // // appleTagsTabControl @@ -2798,10 +2546,9 @@ private void InitializeComponent() this.appleTagsTabControl.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this.appleTagsTabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.appleTagsTabControl.Location = new System.Drawing.Point(0, 0); - this.appleTagsTabControl.Margin = new System.Windows.Forms.Padding(4); this.appleTagsTabControl.Name = "appleTagsTabControl"; this.appleTagsTabControl.SelectedIndex = 0; - this.appleTagsTabControl.Size = new System.Drawing.Size(613, 223); + this.appleTagsTabControl.Size = new System.Drawing.Size(459, 182); this.appleTagsTabControl.TabIndex = 14; this.appleTagsTabControl.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.appleTagsTabControl_DrawItem); // @@ -2810,10 +2557,9 @@ private void InitializeComponent() this.tabAppleTagExpression.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabAppleTagExpression.Controls.Add(this.grouperAppleTagExpression); this.tabAppleTagExpression.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabAppleTagExpression.Location = new System.Drawing.Point(4, 27); - this.tabAppleTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.tabAppleTagExpression.Location = new System.Drawing.Point(4, 24); this.tabAppleTagExpression.Name = "tabAppleTagExpression"; - this.tabAppleTagExpression.Size = new System.Drawing.Size(605, 192); + this.tabAppleTagExpression.Size = new System.Drawing.Size(451, 154); this.tabAppleTagExpression.TabIndex = 2; this.tabAppleTagExpression.Text = "Tag Expression"; // @@ -2833,16 +2579,15 @@ private void InitializeComponent() this.grouperAppleTagExpression.ForeColor = System.Drawing.Color.White; this.grouperAppleTagExpression.GroupImage = null; this.grouperAppleTagExpression.GroupTitle = "Tag Expression"; - this.grouperAppleTagExpression.Location = new System.Drawing.Point(21, 10); - this.grouperAppleTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.grouperAppleTagExpression.Location = new System.Drawing.Point(16, 8); this.grouperAppleTagExpression.Name = "grouperAppleTagExpression"; - this.grouperAppleTagExpression.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperAppleTagExpression.Padding = new System.Windows.Forms.Padding(20); this.grouperAppleTagExpression.PaintGroupBox = true; this.grouperAppleTagExpression.RoundCorners = 4; this.grouperAppleTagExpression.ShadowColor = System.Drawing.Color.DarkGray; this.grouperAppleTagExpression.ShadowControl = false; this.grouperAppleTagExpression.ShadowThickness = 1; - this.grouperAppleTagExpression.Size = new System.Drawing.Size(560, 159); + this.grouperAppleTagExpression.Size = new System.Drawing.Size(419, 133); this.grouperAppleTagExpression.TabIndex = 14; // // txtAppleTagExpression @@ -2852,13 +2597,12 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtAppleTagExpression.BackColor = System.Drawing.SystemColors.Window; this.txtAppleTagExpression.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtAppleTagExpression.Location = new System.Drawing.Point(21, 39); - this.txtAppleTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.txtAppleTagExpression.Location = new System.Drawing.Point(16, 32); this.txtAppleTagExpression.MaxLength = 0; this.txtAppleTagExpression.Multiline = true; this.txtAppleTagExpression.Name = "txtAppleTagExpression"; this.txtAppleTagExpression.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtAppleTagExpression.Size = new System.Drawing.Size(516, 99); + this.txtAppleTagExpression.Size = new System.Drawing.Size(387, 85); this.txtAppleTagExpression.TabIndex = 0; // // tabAppleNotificationTags @@ -2866,11 +2610,10 @@ private void InitializeComponent() this.tabAppleNotificationTags.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabAppleNotificationTags.Controls.Add(this.grouperAppleTags); this.tabAppleNotificationTags.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabAppleNotificationTags.Location = new System.Drawing.Point(4, 27); - this.tabAppleNotificationTags.Margin = new System.Windows.Forms.Padding(4); + this.tabAppleNotificationTags.Location = new System.Drawing.Point(4, 24); this.tabAppleNotificationTags.Name = "tabAppleNotificationTags"; - this.tabAppleNotificationTags.Padding = new System.Windows.Forms.Padding(4); - this.tabAppleNotificationTags.Size = new System.Drawing.Size(605, 192); + this.tabAppleNotificationTags.Size = new System.Drawing.Size(452, 153); + this.tabAppleNotificationTags.Padding = new System.Windows.Forms.Padding(3); this.tabAppleNotificationTags.TabIndex = 5; this.tabAppleNotificationTags.Text = "Notification Tags"; // @@ -2890,16 +2633,15 @@ private void InitializeComponent() this.grouperAppleTags.ForeColor = System.Drawing.Color.White; this.grouperAppleTags.GroupImage = null; this.grouperAppleTags.GroupTitle = "Notification Tags"; - this.grouperAppleTags.Location = new System.Drawing.Point(21, 10); - this.grouperAppleTags.Margin = new System.Windows.Forms.Padding(4); + this.grouperAppleTags.Location = new System.Drawing.Point(16, 8); this.grouperAppleTags.Name = "grouperAppleTags"; - this.grouperAppleTags.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperAppleTags.Padding = new System.Windows.Forms.Padding(20); this.grouperAppleTags.PaintGroupBox = true; this.grouperAppleTags.RoundCorners = 4; this.grouperAppleTags.ShadowColor = System.Drawing.Color.DarkGray; this.grouperAppleTags.ShadowControl = false; this.grouperAppleTags.ShadowThickness = 1; - this.grouperAppleTags.Size = new System.Drawing.Size(560, 159); + this.grouperAppleTags.Size = new System.Drawing.Size(420, 132); this.grouperAppleTags.TabIndex = 16; this.grouperAppleTags.CustomPaint += new System.Action(this.grouperAppleTags_CustomPaint); // @@ -2913,10 +2655,9 @@ private void InitializeComponent() this.appleTagsDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.appleTagsDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.appleTagsDataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.appleTagsDataGridView.Location = new System.Drawing.Point(21, 39); - this.appleTagsDataGridView.Margin = new System.Windows.Forms.Padding(4); + this.appleTagsDataGridView.Location = new System.Drawing.Point(16, 32); this.appleTagsDataGridView.Name = "appleTagsDataGridView"; - this.appleTagsDataGridView.Size = new System.Drawing.Size(516, 96); + this.appleTagsDataGridView.Size = new System.Drawing.Size(387, 80); this.appleTagsDataGridView.TabIndex = 3; this.appleTagsDataGridView.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.dataGridView_EditingControlShowing); this.appleTagsDataGridView.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dataGridView_RowsAdded); @@ -2931,10 +2672,9 @@ private void InitializeComponent() this.appleAdditionalHeadersTabControl.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this.appleAdditionalHeadersTabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.appleAdditionalHeadersTabControl.Location = new System.Drawing.Point(0, 0); - this.appleAdditionalHeadersTabControl.Margin = new System.Windows.Forms.Padding(4); this.appleAdditionalHeadersTabControl.Name = "appleAdditionalHeadersTabControl"; this.appleAdditionalHeadersTabControl.SelectedIndex = 0; - this.appleAdditionalHeadersTabControl.Size = new System.Drawing.Size(614, 223); + this.appleAdditionalHeadersTabControl.Size = new System.Drawing.Size(461, 182); this.appleAdditionalHeadersTabControl.TabIndex = 15; this.appleAdditionalHeadersTabControl.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.appleAdditionalHeadersTabControl_DrawItem); // @@ -2943,10 +2683,9 @@ private void InitializeComponent() this.tabAppleAdditionalHeaders.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabAppleAdditionalHeaders.Controls.Add(this.grouperAppleAdditionalHeaders); this.tabAppleAdditionalHeaders.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabAppleAdditionalHeaders.Location = new System.Drawing.Point(4, 27); - this.tabAppleAdditionalHeaders.Margin = new System.Windows.Forms.Padding(4); + this.tabAppleAdditionalHeaders.Location = new System.Drawing.Point(4, 24); this.tabAppleAdditionalHeaders.Name = "tabAppleAdditionalHeaders"; - this.tabAppleAdditionalHeaders.Size = new System.Drawing.Size(606, 192); + this.tabAppleAdditionalHeaders.Size = new System.Drawing.Size(453, 154); this.tabAppleAdditionalHeaders.TabIndex = 2; this.tabAppleAdditionalHeaders.Text = "Additional Headers"; // @@ -2966,16 +2705,15 @@ private void InitializeComponent() this.grouperAppleAdditionalHeaders.ForeColor = System.Drawing.Color.White; this.grouperAppleAdditionalHeaders.GroupImage = null; this.grouperAppleAdditionalHeaders.GroupTitle = "Additional Headers"; - this.grouperAppleAdditionalHeaders.Location = new System.Drawing.Point(21, 10); - this.grouperAppleAdditionalHeaders.Margin = new System.Windows.Forms.Padding(4); + this.grouperAppleAdditionalHeaders.Location = new System.Drawing.Point(16, 8); this.grouperAppleAdditionalHeaders.Name = "grouperAppleAdditionalHeaders"; - this.grouperAppleAdditionalHeaders.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperAppleAdditionalHeaders.Padding = new System.Windows.Forms.Padding(20); this.grouperAppleAdditionalHeaders.PaintGroupBox = true; this.grouperAppleAdditionalHeaders.RoundCorners = 4; this.grouperAppleAdditionalHeaders.ShadowColor = System.Drawing.Color.DarkGray; this.grouperAppleAdditionalHeaders.ShadowControl = false; this.grouperAppleAdditionalHeaders.ShadowThickness = 1; - this.grouperAppleAdditionalHeaders.Size = new System.Drawing.Size(561, 159); + this.grouperAppleAdditionalHeaders.Size = new System.Drawing.Size(422, 133); this.grouperAppleAdditionalHeaders.TabIndex = 21; this.grouperAppleAdditionalHeaders.CustomPaint += new System.Action(this.grouperAppleAdditionalHeaders_CustomPaint); // @@ -2989,10 +2727,9 @@ private void InitializeComponent() this.appleHeadersDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.appleHeadersDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.appleHeadersDataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.appleHeadersDataGridView.Location = new System.Drawing.Point(21, 39); - this.appleHeadersDataGridView.Margin = new System.Windows.Forms.Padding(4); + this.appleHeadersDataGridView.Location = new System.Drawing.Point(16, 32); this.appleHeadersDataGridView.Name = "appleHeadersDataGridView"; - this.appleHeadersDataGridView.Size = new System.Drawing.Size(518, 105); + this.appleHeadersDataGridView.Size = new System.Drawing.Size(389, 89); this.appleHeadersDataGridView.TabIndex = 0; this.appleHeadersDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.appleHeadersDataGridView_DataError); this.appleHeadersDataGridView.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.dataGridView_EditingControlShowing); @@ -3005,11 +2742,10 @@ private void InitializeComponent() this.tabAppleNotificationExpiry.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabAppleNotificationExpiry.Controls.Add(this.grouperApnsExpiry); this.tabAppleNotificationExpiry.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabAppleNotificationExpiry.Location = new System.Drawing.Point(4, 27); - this.tabAppleNotificationExpiry.Margin = new System.Windows.Forms.Padding(4); + this.tabAppleNotificationExpiry.Location = new System.Drawing.Point(4, 24); this.tabAppleNotificationExpiry.Name = "tabAppleNotificationExpiry"; - this.tabAppleNotificationExpiry.Padding = new System.Windows.Forms.Padding(4); - this.tabAppleNotificationExpiry.Size = new System.Drawing.Size(606, 192); + this.tabAppleNotificationExpiry.Size = new System.Drawing.Size(452, 153); + this.tabAppleNotificationExpiry.Padding = new System.Windows.Forms.Padding(3); this.tabAppleNotificationExpiry.TabIndex = 5; this.tabAppleNotificationExpiry.Text = "Notification Expiry"; // @@ -3023,173 +2759,30 @@ private void InitializeComponent() this.grouperApnsExpiry.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.grouperApnsExpiry.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperApnsExpiry.BorderThickness = 1F; - this.grouperApnsExpiry.Controls.Add(this.label1); - this.grouperApnsExpiry.Controls.Add(this.txtApnsExpiryMilliseconds); - this.grouperApnsExpiry.Controls.Add(this.label2); - this.grouperApnsExpiry.Controls.Add(this.txtApnsExpirySeconds); - this.grouperApnsExpiry.Controls.Add(this.label3); - this.grouperApnsExpiry.Controls.Add(this.txtApnsExpiryMinutes); - this.grouperApnsExpiry.Controls.Add(this.label4); - this.grouperApnsExpiry.Controls.Add(this.label5); - this.grouperApnsExpiry.Controls.Add(this.txtApnsExpiryHours); - this.grouperApnsExpiry.Controls.Add(this.txtApnsExpiryDays); + this.grouperApnsExpiry.Controls.Add(this.tsApnsExpiry); this.grouperApnsExpiry.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperApnsExpiry.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.grouperApnsExpiry.ForeColor = System.Drawing.Color.White; this.grouperApnsExpiry.GroupImage = null; this.grouperApnsExpiry.GroupTitle = "Notification Expiry"; - this.grouperApnsExpiry.Location = new System.Drawing.Point(21, 10); - this.grouperApnsExpiry.Margin = new System.Windows.Forms.Padding(4); + this.grouperApnsExpiry.Location = new System.Drawing.Point(16, 8); this.grouperApnsExpiry.Name = "grouperApnsExpiry"; - this.grouperApnsExpiry.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperApnsExpiry.Padding = new System.Windows.Forms.Padding(20); this.grouperApnsExpiry.PaintGroupBox = true; this.grouperApnsExpiry.RoundCorners = 4; this.grouperApnsExpiry.ShadowColor = System.Drawing.Color.DarkGray; this.grouperApnsExpiry.ShadowControl = false; this.grouperApnsExpiry.ShadowThickness = 1; - this.grouperApnsExpiry.Size = new System.Drawing.Size(561, 159); + this.grouperApnsExpiry.Size = new System.Drawing.Size(421, 132); this.grouperApnsExpiry.TabIndex = 19; // - // label1 - // - this.label1.AutoSize = true; - this.label1.ForeColor = System.Drawing.SystemColors.ControlText; - this.label1.Location = new System.Drawing.Point(320, 39); - this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(64, 17); - this.label1.TabIndex = 25; - this.label1.Text = "Millisecs:"; - // - // txtApnsExpiryMilliseconds - // - this.txtApnsExpiryMilliseconds.BackColor = System.Drawing.SystemColors.Window; - this.txtApnsExpiryMilliseconds.Location = new System.Drawing.Point(320, 59); - this.txtApnsExpiryMilliseconds.Margin = new System.Windows.Forms.Padding(4); - this.txtApnsExpiryMilliseconds.Name = "txtApnsExpiryMilliseconds"; - this.txtApnsExpiryMilliseconds.Size = new System.Drawing.Size(52, 23); - this.txtApnsExpiryMilliseconds.TabIndex = 3; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.ForeColor = System.Drawing.SystemColors.ControlText; - this.label2.Location = new System.Drawing.Point(245, 39); - this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(67, 17); - this.label2.TabIndex = 24; - this.label2.Text = "Seconds:"; - // - // txtApnsExpirySeconds - // - this.txtApnsExpirySeconds.BackColor = System.Drawing.SystemColors.Window; - this.txtApnsExpirySeconds.Location = new System.Drawing.Point(245, 59); - this.txtApnsExpirySeconds.Margin = new System.Windows.Forms.Padding(4); - this.txtApnsExpirySeconds.Name = "txtApnsExpirySeconds"; - this.txtApnsExpirySeconds.Size = new System.Drawing.Size(52, 23); - this.txtApnsExpirySeconds.TabIndex = 2; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.ForeColor = System.Drawing.SystemColors.ControlText; - this.label3.Location = new System.Drawing.Point(171, 39); - this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(61, 17); - this.label3.TabIndex = 23; - this.label3.Text = "Minutes:"; - // - // txtApnsExpiryMinutes - // - this.txtApnsExpiryMinutes.BackColor = System.Drawing.SystemColors.Window; - this.txtApnsExpiryMinutes.Location = new System.Drawing.Point(171, 59); - this.txtApnsExpiryMinutes.Margin = new System.Windows.Forms.Padding(4); - this.txtApnsExpiryMinutes.Name = "txtApnsExpiryMinutes"; - this.txtApnsExpiryMinutes.Size = new System.Drawing.Size(52, 23); - this.txtApnsExpiryMinutes.TabIndex = 2; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.ForeColor = System.Drawing.SystemColors.ControlText; - this.label4.Location = new System.Drawing.Point(96, 39); - this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(50, 17); - this.label4.TabIndex = 22; - this.label4.Text = "Hours:"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.ForeColor = System.Drawing.SystemColors.ControlText; - this.label5.Location = new System.Drawing.Point(21, 39); - this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(44, 17); - this.label5.TabIndex = 21; - this.label5.Text = "Days:"; - // - // txtApnsExpiryHours - // - this.txtApnsExpiryHours.BackColor = System.Drawing.SystemColors.Window; - this.txtApnsExpiryHours.Location = new System.Drawing.Point(96, 59); - this.txtApnsExpiryHours.Margin = new System.Windows.Forms.Padding(4); - this.txtApnsExpiryHours.Name = "txtApnsExpiryHours"; - this.txtApnsExpiryHours.Size = new System.Drawing.Size(52, 23); - this.txtApnsExpiryHours.TabIndex = 1; - // - // txtApnsExpiryDays - // - this.txtApnsExpiryDays.BackColor = System.Drawing.SystemColors.Window; - this.txtApnsExpiryDays.Location = new System.Drawing.Point(21, 59); - this.txtApnsExpiryDays.Margin = new System.Windows.Forms.Padding(4); - this.txtApnsExpiryDays.Name = "txtApnsExpiryDays"; - this.txtApnsExpiryDays.Size = new System.Drawing.Size(52, 23); - this.txtApnsExpiryDays.TabIndex = 0; - // - // grouperExpiry - // - this.grouperExpiry.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.grouperExpiry.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - this.grouperExpiry.BackgroundGradientColor = System.Drawing.Color.White; - this.grouperExpiry.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; - this.grouperExpiry.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.grouperExpiry.BorderThickness = 1F; - this.grouperExpiry.Controls.Add(this.expiryDateTimePicker); - this.grouperExpiry.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.grouperExpiry.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.grouperExpiry.ForeColor = System.Drawing.Color.White; - this.grouperExpiry.GroupImage = null; - this.grouperExpiry.GroupTitle = "Expiry Time"; - this.grouperExpiry.Location = new System.Drawing.Point(939, 0); - this.grouperExpiry.Margin = new System.Windows.Forms.Padding(4); - this.grouperExpiry.Name = "grouperExpiry"; - this.grouperExpiry.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); - this.grouperExpiry.PaintGroupBox = true; - this.grouperExpiry.RoundCorners = 4; - this.grouperExpiry.ShadowColor = System.Drawing.Color.DarkGray; - this.grouperExpiry.ShadowControl = false; - this.grouperExpiry.ShadowThickness = 1; - this.grouperExpiry.Size = new System.Drawing.Size(309, 0); - this.grouperExpiry.TabIndex = 34; - // - // expiryDateTimePicker - // - this.expiryDateTimePicker.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.expiryDateTimePicker.Checked = false; - this.expiryDateTimePicker.CustomFormat = "dd MMMM yyyy hh:mm:ss"; - this.expiryDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom; - this.expiryDateTimePicker.Location = new System.Drawing.Point(21, 39); - this.expiryDateTimePicker.Margin = new System.Windows.Forms.Padding(4); - this.expiryDateTimePicker.Name = "expiryDateTimePicker"; - this.expiryDateTimePicker.ShowCheckBox = true; - this.expiryDateTimePicker.Size = new System.Drawing.Size(269, 23); - this.expiryDateTimePicker.TabIndex = 36; + // tsApnsExpiry + // + this.tsApnsExpiry.Location = new System.Drawing.Point(13, 29); + this.tsApnsExpiry.Name = "tsApnsExpiry"; + this.tsApnsExpiry.Size = new System.Drawing.Size(273, 42); + this.tsApnsExpiry.TabIndex = 26; + this.tsApnsExpiry.TimeSpanValue = null; // // tabPageGoogleNativeNotification // @@ -3197,9 +2790,8 @@ private void InitializeComponent() this.tabPageGoogleNativeNotification.Controls.Add(this.gcmSplitContainer); this.tabPageGoogleNativeNotification.ForeColor = System.Drawing.SystemColors.ControlText; this.tabPageGoogleNativeNotification.Location = new System.Drawing.Point(4, 22); - this.tabPageGoogleNativeNotification.Margin = new System.Windows.Forms.Padding(4); this.tabPageGoogleNativeNotification.Name = "tabPageGoogleNativeNotification"; - this.tabPageGoogleNativeNotification.Size = new System.Drawing.Size(1293, 565); + this.tabPageGoogleNativeNotification.Size = new System.Drawing.Size(968, 454); this.tabPageGoogleNativeNotification.TabIndex = 5; this.tabPageGoogleNativeNotification.Text = "Google"; // @@ -3208,8 +2800,7 @@ private void InitializeComponent() this.gcmSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.gcmSplitContainer.Location = new System.Drawing.Point(21, 20); - this.gcmSplitContainer.Margin = new System.Windows.Forms.Padding(4); + this.gcmSplitContainer.Location = new System.Drawing.Point(16, 16); this.gcmSplitContainer.Name = "gcmSplitContainer"; this.gcmSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; // @@ -3220,10 +2811,9 @@ private void InitializeComponent() // gcmSplitContainer.Panel2 // this.gcmSplitContainer.Panel2.Controls.Add(this.gcmLowerSplitContainer); - this.gcmSplitContainer.Panel2.Controls.Add(this.grouper4); - this.gcmSplitContainer.Size = new System.Drawing.Size(1248, 522); - this.gcmSplitContainer.SplitterDistance = 289; - this.gcmSplitContainer.SplitterWidth = 10; + this.gcmSplitContainer.Size = new System.Drawing.Size(936, 424); + this.gcmSplitContainer.SplitterDistance = 234; + this.gcmSplitContainer.SplitterWidth = 8; this.gcmSplitContainer.TabIndex = 17; // // grouper1 @@ -3241,15 +2831,14 @@ private void InitializeComponent() this.grouper1.GroupImage = null; this.grouper1.GroupTitle = "Json Payload"; this.grouper1.Location = new System.Drawing.Point(0, 0); - this.grouper1.Margin = new System.Windows.Forms.Padding(4); this.grouper1.Name = "grouper1"; - this.grouper1.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouper1.Padding = new System.Windows.Forms.Padding(20); this.grouper1.PaintGroupBox = true; this.grouper1.RoundCorners = 4; this.grouper1.ShadowColor = System.Drawing.Color.DarkGray; this.grouper1.ShadowControl = false; this.grouper1.ShadowThickness = 1; - this.grouper1.Size = new System.Drawing.Size(1248, 289); + this.grouper1.Size = new System.Drawing.Size(936, 234); this.grouper1.TabIndex = 15; // // txtGcmJsonPayload @@ -3259,13 +2848,12 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtGcmJsonPayload.BackColor = System.Drawing.SystemColors.Window; this.txtGcmJsonPayload.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtGcmJsonPayload.Location = new System.Drawing.Point(21, 39); - this.txtGcmJsonPayload.Margin = new System.Windows.Forms.Padding(4); + this.txtGcmJsonPayload.Location = new System.Drawing.Point(16, 32); this.txtGcmJsonPayload.MaxLength = 0; this.txtGcmJsonPayload.Multiline = true; this.txtGcmJsonPayload.Name = "txtGcmJsonPayload"; this.txtGcmJsonPayload.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtGcmJsonPayload.Size = new System.Drawing.Size(1204, 229); + this.txtGcmJsonPayload.Size = new System.Drawing.Size(904, 186); this.txtGcmJsonPayload.TabIndex = 0; this.txtGcmJsonPayload.TextChanged += new System.EventHandler(this.txtGcmJsonPayload_TextChanged); // @@ -3273,7 +2861,6 @@ private void InitializeComponent() // this.gcmLowerSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; this.gcmLowerSplitContainer.Location = new System.Drawing.Point(0, 0); - this.gcmLowerSplitContainer.Margin = new System.Windows.Forms.Padding(4); this.gcmLowerSplitContainer.Name = "gcmLowerSplitContainer"; // // gcmLowerSplitContainer.Panel1 @@ -3283,9 +2870,9 @@ private void InitializeComponent() // gcmLowerSplitContainer.Panel2 // this.gcmLowerSplitContainer.Panel2.Controls.Add(this.gcmAdditionalHeadersTabControl); - this.gcmLowerSplitContainer.Size = new System.Drawing.Size(1248, 223); - this.gcmLowerSplitContainer.SplitterDistance = 613; - this.gcmLowerSplitContainer.SplitterWidth = 21; + this.gcmLowerSplitContainer.Size = new System.Drawing.Size(936, 182); + this.gcmLowerSplitContainer.SplitterDistance = 459; + this.gcmLowerSplitContainer.SplitterWidth = 16; this.gcmLowerSplitContainer.TabIndex = 35; // // gcmTagsTabControl @@ -3296,10 +2883,9 @@ private void InitializeComponent() this.gcmTagsTabControl.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this.gcmTagsTabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.gcmTagsTabControl.Location = new System.Drawing.Point(0, 0); - this.gcmTagsTabControl.Margin = new System.Windows.Forms.Padding(4); this.gcmTagsTabControl.Name = "gcmTagsTabControl"; this.gcmTagsTabControl.SelectedIndex = 0; - this.gcmTagsTabControl.Size = new System.Drawing.Size(613, 223); + this.gcmTagsTabControl.Size = new System.Drawing.Size(459, 182); this.gcmTagsTabControl.TabIndex = 15; this.gcmTagsTabControl.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.gcmTagsTabControl_DrawItem); // @@ -3308,10 +2894,9 @@ private void InitializeComponent() this.tabGcmTagExpression.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabGcmTagExpression.Controls.Add(this.grouperGcmTagExpression); this.tabGcmTagExpression.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabGcmTagExpression.Location = new System.Drawing.Point(4, 27); - this.tabGcmTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.tabGcmTagExpression.Location = new System.Drawing.Point(4, 24); this.tabGcmTagExpression.Name = "tabGcmTagExpression"; - this.tabGcmTagExpression.Size = new System.Drawing.Size(605, 192); + this.tabGcmTagExpression.Size = new System.Drawing.Size(451, 154); this.tabGcmTagExpression.TabIndex = 2; this.tabGcmTagExpression.Text = "Tag Expression"; // @@ -3331,16 +2916,15 @@ private void InitializeComponent() this.grouperGcmTagExpression.ForeColor = System.Drawing.Color.White; this.grouperGcmTagExpression.GroupImage = null; this.grouperGcmTagExpression.GroupTitle = "Tag Expression"; - this.grouperGcmTagExpression.Location = new System.Drawing.Point(21, 10); - this.grouperGcmTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.grouperGcmTagExpression.Location = new System.Drawing.Point(16, 8); this.grouperGcmTagExpression.Name = "grouperGcmTagExpression"; - this.grouperGcmTagExpression.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperGcmTagExpression.Padding = new System.Windows.Forms.Padding(20); this.grouperGcmTagExpression.PaintGroupBox = true; this.grouperGcmTagExpression.RoundCorners = 4; this.grouperGcmTagExpression.ShadowColor = System.Drawing.Color.DarkGray; this.grouperGcmTagExpression.ShadowControl = false; this.grouperGcmTagExpression.ShadowThickness = 1; - this.grouperGcmTagExpression.Size = new System.Drawing.Size(560, 159); + this.grouperGcmTagExpression.Size = new System.Drawing.Size(419, 133); this.grouperGcmTagExpression.TabIndex = 14; // // txtGcmTagExpression @@ -3350,13 +2934,12 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtGcmTagExpression.BackColor = System.Drawing.SystemColors.Window; this.txtGcmTagExpression.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtGcmTagExpression.Location = new System.Drawing.Point(21, 39); - this.txtGcmTagExpression.Margin = new System.Windows.Forms.Padding(4); + this.txtGcmTagExpression.Location = new System.Drawing.Point(16, 32); this.txtGcmTagExpression.MaxLength = 0; this.txtGcmTagExpression.Multiline = true; this.txtGcmTagExpression.Name = "txtGcmTagExpression"; this.txtGcmTagExpression.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtGcmTagExpression.Size = new System.Drawing.Size(516, 99); + this.txtGcmTagExpression.Size = new System.Drawing.Size(387, 85); this.txtGcmTagExpression.TabIndex = 0; // // tabGcmNotificationTags @@ -3364,11 +2947,10 @@ private void InitializeComponent() this.tabGcmNotificationTags.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabGcmNotificationTags.Controls.Add(this.grouperGcmTags); this.tabGcmNotificationTags.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabGcmNotificationTags.Location = new System.Drawing.Point(4, 27); - this.tabGcmNotificationTags.Margin = new System.Windows.Forms.Padding(4); + this.tabGcmNotificationTags.Location = new System.Drawing.Point(4, 24); this.tabGcmNotificationTags.Name = "tabGcmNotificationTags"; - this.tabGcmNotificationTags.Padding = new System.Windows.Forms.Padding(4); - this.tabGcmNotificationTags.Size = new System.Drawing.Size(605, 192); + this.tabGcmNotificationTags.Size = new System.Drawing.Size(452, 153); + this.tabGcmNotificationTags.Padding = new System.Windows.Forms.Padding(3); this.tabGcmNotificationTags.TabIndex = 5; this.tabGcmNotificationTags.Text = "Notification Tags"; // @@ -3388,16 +2970,15 @@ private void InitializeComponent() this.grouperGcmTags.ForeColor = System.Drawing.Color.White; this.grouperGcmTags.GroupImage = null; this.grouperGcmTags.GroupTitle = "Notification Tags"; - this.grouperGcmTags.Location = new System.Drawing.Point(21, 10); - this.grouperGcmTags.Margin = new System.Windows.Forms.Padding(4); + this.grouperGcmTags.Location = new System.Drawing.Point(16, 8); this.grouperGcmTags.Name = "grouperGcmTags"; - this.grouperGcmTags.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperGcmTags.Padding = new System.Windows.Forms.Padding(20); this.grouperGcmTags.PaintGroupBox = true; this.grouperGcmTags.RoundCorners = 4; this.grouperGcmTags.ShadowColor = System.Drawing.Color.DarkGray; this.grouperGcmTags.ShadowControl = false; this.grouperGcmTags.ShadowThickness = 1; - this.grouperGcmTags.Size = new System.Drawing.Size(556, 159); + this.grouperGcmTags.Size = new System.Drawing.Size(417, 132); this.grouperGcmTags.TabIndex = 16; this.grouperGcmTags.CustomPaint += new System.Action(this.grouperGcmTags_CustomPaint); // @@ -3411,10 +2992,9 @@ private void InitializeComponent() this.gcmTagsDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.gcmTagsDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gcmTagsDataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.gcmTagsDataGridView.Location = new System.Drawing.Point(21, 39); - this.gcmTagsDataGridView.Margin = new System.Windows.Forms.Padding(4); + this.gcmTagsDataGridView.Location = new System.Drawing.Point(16, 32); this.gcmTagsDataGridView.Name = "gcmTagsDataGridView"; - this.gcmTagsDataGridView.Size = new System.Drawing.Size(512, 96); + this.gcmTagsDataGridView.Size = new System.Drawing.Size(384, 80); this.gcmTagsDataGridView.TabIndex = 3; this.gcmTagsDataGridView.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.dataGridView_EditingControlShowing); this.gcmTagsDataGridView.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dataGridView_RowsAdded); @@ -3428,10 +3008,9 @@ private void InitializeComponent() this.gcmAdditionalHeadersTabControl.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this.gcmAdditionalHeadersTabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.gcmAdditionalHeadersTabControl.Location = new System.Drawing.Point(0, 0); - this.gcmAdditionalHeadersTabControl.Margin = new System.Windows.Forms.Padding(4); this.gcmAdditionalHeadersTabControl.Name = "gcmAdditionalHeadersTabControl"; this.gcmAdditionalHeadersTabControl.SelectedIndex = 0; - this.gcmAdditionalHeadersTabControl.Size = new System.Drawing.Size(614, 223); + this.gcmAdditionalHeadersTabControl.Size = new System.Drawing.Size(461, 182); this.gcmAdditionalHeadersTabControl.TabIndex = 16; this.gcmAdditionalHeadersTabControl.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.gcmAdditionalHeadersTabControl_DrawItem); // @@ -3440,10 +3019,9 @@ private void InitializeComponent() this.tabGcmAdditionalHeaders.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabGcmAdditionalHeaders.Controls.Add(this.grouperGcmAdditionalHeaders); this.tabGcmAdditionalHeaders.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabGcmAdditionalHeaders.Location = new System.Drawing.Point(4, 27); - this.tabGcmAdditionalHeaders.Margin = new System.Windows.Forms.Padding(4); + this.tabGcmAdditionalHeaders.Location = new System.Drawing.Point(4, 24); this.tabGcmAdditionalHeaders.Name = "tabGcmAdditionalHeaders"; - this.tabGcmAdditionalHeaders.Size = new System.Drawing.Size(606, 192); + this.tabGcmAdditionalHeaders.Size = new System.Drawing.Size(453, 154); this.tabGcmAdditionalHeaders.TabIndex = 2; this.tabGcmAdditionalHeaders.Text = "Additional Headers"; // @@ -3463,16 +3041,15 @@ private void InitializeComponent() this.grouperGcmAdditionalHeaders.ForeColor = System.Drawing.Color.White; this.grouperGcmAdditionalHeaders.GroupImage = null; this.grouperGcmAdditionalHeaders.GroupTitle = "Additional Headers"; - this.grouperGcmAdditionalHeaders.Location = new System.Drawing.Point(21, 10); - this.grouperGcmAdditionalHeaders.Margin = new System.Windows.Forms.Padding(4); + this.grouperGcmAdditionalHeaders.Location = new System.Drawing.Point(16, 8); this.grouperGcmAdditionalHeaders.Name = "grouperGcmAdditionalHeaders"; - this.grouperGcmAdditionalHeaders.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperGcmAdditionalHeaders.Padding = new System.Windows.Forms.Padding(20); this.grouperGcmAdditionalHeaders.PaintGroupBox = true; this.grouperGcmAdditionalHeaders.RoundCorners = 4; this.grouperGcmAdditionalHeaders.ShadowColor = System.Drawing.Color.DarkGray; this.grouperGcmAdditionalHeaders.ShadowControl = false; this.grouperGcmAdditionalHeaders.ShadowThickness = 1; - this.grouperGcmAdditionalHeaders.Size = new System.Drawing.Size(561, 159); + this.grouperGcmAdditionalHeaders.Size = new System.Drawing.Size(422, 133); this.grouperGcmAdditionalHeaders.TabIndex = 21; this.grouperGcmAdditionalHeaders.CustomPaint += new System.Action(this.grouperGcmAdditionalHeaders_CustomPaint); // @@ -3486,10 +3063,9 @@ private void InitializeComponent() this.gcmHeadersDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.gcmHeadersDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gcmHeadersDataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.gcmHeadersDataGridView.Location = new System.Drawing.Point(21, 39); - this.gcmHeadersDataGridView.Margin = new System.Windows.Forms.Padding(4); + this.gcmHeadersDataGridView.Location = new System.Drawing.Point(16, 32); this.gcmHeadersDataGridView.Name = "gcmHeadersDataGridView"; - this.gcmHeadersDataGridView.Size = new System.Drawing.Size(518, 105); + this.gcmHeadersDataGridView.Size = new System.Drawing.Size(389, 89); this.gcmHeadersDataGridView.TabIndex = 1; this.gcmHeadersDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.gcmHeadersDataGridView_DataError); this.gcmHeadersDataGridView.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.dataGridView_EditingControlShowing); @@ -3497,47 +3073,6 @@ private void InitializeComponent() this.gcmHeadersDataGridView.RowsRemoved += new System.Windows.Forms.DataGridViewRowsRemovedEventHandler(this.dataGridView_RowsRemoved); this.gcmHeadersDataGridView.Resize += new System.EventHandler(this.dataGridView_Resize); // - // grouper4 - // - this.grouper4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.grouper4.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - this.grouper4.BackgroundGradientColor = System.Drawing.Color.White; - this.grouper4.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; - this.grouper4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.grouper4.BorderThickness = 1F; - this.grouper4.Controls.Add(this.dateTimePicker1); - this.grouper4.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.grouper4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.grouper4.ForeColor = System.Drawing.Color.White; - this.grouper4.GroupImage = null; - this.grouper4.GroupTitle = "Expiry Time"; - this.grouper4.Location = new System.Drawing.Point(939, 0); - this.grouper4.Margin = new System.Windows.Forms.Padding(4); - this.grouper4.Name = "grouper4"; - this.grouper4.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); - this.grouper4.PaintGroupBox = true; - this.grouper4.RoundCorners = 4; - this.grouper4.ShadowColor = System.Drawing.Color.DarkGray; - this.grouper4.ShadowControl = false; - this.grouper4.ShadowThickness = 1; - this.grouper4.Size = new System.Drawing.Size(309, 0); - this.grouper4.TabIndex = 34; - // - // dateTimePicker1 - // - this.dateTimePicker1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.dateTimePicker1.Checked = false; - this.dateTimePicker1.CustomFormat = "dd MMMM yyyy hh:mm:ss"; - this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom; - this.dateTimePicker1.Location = new System.Drawing.Point(21, 39); - this.dateTimePicker1.Margin = new System.Windows.Forms.Padding(4); - this.dateTimePicker1.Name = "dateTimePicker1"; - this.dateTimePicker1.ShowCheckBox = true; - this.dateTimePicker1.Size = new System.Drawing.Size(269, 23); - this.dateTimePicker1.TabIndex = 36; - // // btnRefresh // this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); @@ -3547,10 +3082,9 @@ private void InitializeComponent() this.btnRefresh.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnRefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnRefresh.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnRefresh.Location = new System.Drawing.Point(1013, 620); - this.btnRefresh.Margin = new System.Windows.Forms.Padding(4); + this.btnRefresh.Location = new System.Drawing.Point(760, 504); this.btnRefresh.Name = "btnRefresh"; - this.btnRefresh.Size = new System.Drawing.Size(96, 30); + this.btnRefresh.Size = new System.Drawing.Size(72, 24); this.btnRefresh.TabIndex = 4; this.btnRefresh.Text = "Refresh"; this.btnRefresh.UseVisualStyleBackColor = false; @@ -3567,10 +3101,9 @@ private void InitializeComponent() this.btnCancelUpdate.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnCancelUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCancelUpdate.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnCancelUpdate.Location = new System.Drawing.Point(1227, 620); - this.btnCancelUpdate.Margin = new System.Windows.Forms.Padding(4); + this.btnCancelUpdate.Location = new System.Drawing.Point(920, 504); this.btnCancelUpdate.Name = "btnCancelUpdate"; - this.btnCancelUpdate.Size = new System.Drawing.Size(96, 30); + this.btnCancelUpdate.Size = new System.Drawing.Size(72, 24); this.btnCancelUpdate.TabIndex = 6; this.btnCancelUpdate.Text = "Update"; this.btnCancelUpdate.UseVisualStyleBackColor = false; @@ -3587,10 +3120,9 @@ private void InitializeComponent() this.btnCreateDelete.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnCreateDelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCreateDelete.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnCreateDelete.Location = new System.Drawing.Point(1120, 620); - this.btnCreateDelete.Margin = new System.Windows.Forms.Padding(4); + this.btnCreateDelete.Location = new System.Drawing.Point(840, 504); this.btnCreateDelete.Name = "btnCreateDelete"; - this.btnCreateDelete.Size = new System.Drawing.Size(96, 30); + this.btnCreateDelete.Size = new System.Drawing.Size(72, 24); this.btnCreateDelete.TabIndex = 5; this.btnCreateDelete.Text = "Create"; this.btnCreateDelete.UseVisualStyleBackColor = false; @@ -3607,10 +3139,9 @@ private void InitializeComponent() this.btnRegistrations.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnRegistrations.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnRegistrations.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnRegistrations.Location = new System.Drawing.Point(792, 620); - this.btnRegistrations.Margin = new System.Windows.Forms.Padding(4); + this.btnRegistrations.Location = new System.Drawing.Point(594, 504); this.btnRegistrations.Name = "btnRegistrations"; - this.btnRegistrations.Size = new System.Drawing.Size(104, 30); + this.btnRegistrations.Size = new System.Drawing.Size(78, 24); this.btnRegistrations.TabIndex = 2; this.btnRegistrations.Text = "Registrations"; this.btnRegistrations.UseVisualStyleBackColor = false; @@ -3625,25 +3156,25 @@ private void InitializeComponent() this.updateRegistrationToolStripMenuItem, this.deleteRegistrationToolStripMenuItem}); this.registrationContextMenuStrip.Name = "registrationContextMenuStrip"; - this.registrationContextMenuStrip.Size = new System.Drawing.Size(212, 52); + this.registrationContextMenuStrip.Size = new System.Drawing.Size(179, 48); // // updateRegistrationToolStripMenuItem // this.updateRegistrationToolStripMenuItem.Name = "updateRegistrationToolStripMenuItem"; - this.updateRegistrationToolStripMenuItem.Size = new System.Drawing.Size(211, 24); + this.updateRegistrationToolStripMenuItem.Size = new System.Drawing.Size(178, 22); this.updateRegistrationToolStripMenuItem.Text = "Update Registration"; this.updateRegistrationToolStripMenuItem.Click += new System.EventHandler(this.updateRegistrationToolStripMenuItem_Click); // // deleteRegistrationToolStripMenuItem // this.deleteRegistrationToolStripMenuItem.Name = "deleteRegistrationToolStripMenuItem"; - this.deleteRegistrationToolStripMenuItem.Size = new System.Drawing.Size(211, 24); + this.deleteRegistrationToolStripMenuItem.Size = new System.Drawing.Size(178, 22); this.deleteRegistrationToolStripMenuItem.Text = "Delete Registration"; this.deleteRegistrationToolStripMenuItem.Click += new System.EventHandler(this.deleteRegistrationToolStripMenuItem_Click); // // HandleNotificationHubControl // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.Controls.Add(this.btnRegistrations); @@ -3652,9 +3183,8 @@ private void InitializeComponent() this.Controls.Add(this.btnCreateDelete); this.Controls.Add(this.mainTabControl); this.Controls.Add(this.btnSend); - this.Margin = new System.Windows.Forms.Padding(4); this.Name = "HandleNotificationHubControl"; - this.Size = new System.Drawing.Size(1344, 670); + this.Size = new System.Drawing.Size(1008, 544); this.Resize += new System.EventHandler(this.HandleNotificationHubControl_Resize); this.mainTabControl.ResumeLayout(false); this.tabPageDescription.ResumeLayout(false); @@ -3670,7 +3200,6 @@ private void InitializeComponent() this.grouperWindowsNotificationSettings.ResumeLayout(false); this.grouperWindowsNotificationSettings.PerformLayout(); this.grouperDuplicateDetectionHistoryTimeWindow.ResumeLayout(false); - this.grouperDuplicateDetectionHistoryTimeWindow.PerformLayout(); this.grouperPath.ResumeLayout(false); this.grouperPath.PerformLayout(); this.tabPageAuthorization.ResumeLayout(false); @@ -3783,8 +3312,6 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.appleHeadersDataGridView)).EndInit(); this.tabAppleNotificationExpiry.ResumeLayout(false); this.grouperApnsExpiry.ResumeLayout(false); - this.grouperApnsExpiry.PerformLayout(); - this.grouperExpiry.ResumeLayout(false); this.tabPageGoogleNativeNotification.ResumeLayout(false); this.gcmSplitContainer.Panel1.ResumeLayout(false); this.gcmSplitContainer.Panel2.ResumeLayout(false); @@ -3807,7 +3334,6 @@ private void InitializeComponent() this.tabGcmAdditionalHeaders.ResumeLayout(false); this.grouperGcmAdditionalHeaders.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.gcmHeadersDataGridView)).EndInit(); - this.grouper4.ResumeLayout(false); this.registrationContextMenuStrip.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.templatePropertiesBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.wnsHeadersBindingSource)).EndInit(); @@ -3851,16 +3377,6 @@ private void InitializeComponent() private System.Windows.Forms.Label lblPackageSid; private System.Windows.Forms.TextBox txtPackageSid; private Grouper grouperDuplicateDetectionHistoryTimeWindow; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowMilliseconds; - private System.Windows.Forms.TextBox txtRegistrationTimeToLiveWindowMilliseconds; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowSeconds; - private System.Windows.Forms.TextBox txtRegistrationTimeToLiveWindowSeconds; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowMinutes; - private System.Windows.Forms.TextBox txtRegistrationTimeToLiveWindowMinutes; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowHours; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowDays; - private System.Windows.Forms.TextBox txtRegistrationTimeToLiveWindowHours; - private System.Windows.Forms.TextBox txtRegistrationTimeToLiveWindowDays; private Grouper grouperPath; private System.Windows.Forms.Label lblRelativeURI; private System.Windows.Forms.TextBox txtPath; @@ -3908,8 +3424,6 @@ private void InitializeComponent() private Grouper grouperJsonPayload; private System.Windows.Forms.TextBox txtApnsJsonPayload; private System.Windows.Forms.SplitContainer appleLowerSplitContainer; - private Grouper grouperExpiry; - private System.Windows.Forms.DateTimePicker expiryDateTimePicker; private System.Windows.Forms.BindingSource appleHeadersBindingSource; private System.Windows.Forms.BindingSource appleTagsBindingSource; private System.Windows.Forms.TextBox txtGcmEndpoint; @@ -3921,8 +3435,6 @@ private void InitializeComponent() private Grouper grouper1; private System.Windows.Forms.TextBox txtGcmJsonPayload; private System.Windows.Forms.SplitContainer gcmLowerSplitContainer; - private Grouper grouper4; - private System.Windows.Forms.DateTimePicker dateTimePicker1; private System.Windows.Forms.BindingSource gcmHeadersBindingSource; private System.Windows.Forms.BindingSource gcmTagsBindingSource; private Grouper grouperUserMetadata; @@ -4011,20 +3523,12 @@ private void InitializeComponent() private System.Windows.Forms.DataGridView appleHeadersDataGridView; private System.Windows.Forms.TabPage tabAppleNotificationExpiry; private Grouper grouperApnsExpiry; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox txtApnsExpiryMilliseconds; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.TextBox txtApnsExpirySeconds; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.TextBox txtApnsExpiryMinutes; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.TextBox txtApnsExpiryHours; - private System.Windows.Forms.TextBox txtApnsExpiryDays; internal System.Windows.Forms.TabControl gcmAdditionalHeadersTabControl; private System.Windows.Forms.TabPage tabGcmAdditionalHeaders; private Grouper grouperGcmAdditionalHeaders; private System.Windows.Forms.DataGridView gcmHeadersDataGridView; private System.Windows.Forms.PictureBox pictFindRegistrations; + private TimeSpanControl tsRegistrationTimeToLive; + private TimeSpanControl tsApnsExpiry; } } diff --git a/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.resx b/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.resx index 29af7504..5952cd21 100644 --- a/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.resx +++ b/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.resx @@ -127,67 +127,67 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAC - DgAAAk1TRnQBSQFMAgEBBAEAAcABAwHAAQMBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA + ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2 + DQAAAk1TRnQBSQFMAgEBBAEAAdgBAwHYAQMBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA AwABIAMAAQEBAAEgBgABIP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wBTAAMIAQsCSQFI AYgDLwFKMAABMQIwAU0CUgFRAaEYAAJSAVEBoQExAjABTTAAAy8BSgNMAZMDDAEQMAADJwE6AmIBWAHv AmIBWAHvAyYBOBwAAyMBNAFeAlsB2QG9AY4BAAH/A0gBhigAAwcBCQFPAk4BlwF/AXoBSwH+AYwCAAH/ GAABnAIAAf8CfwFnAf4BTwJOAZcDBwEJKAADRQF/AeIBtQGAAf8CYQFbAeEDKQE+HAADJwE6AmIBWAHv - AmIBWAHvAyYBOAFGAkUBfgHXAaUBAwH/AdcBpAEDAf8BRgJFAX4UAAMBAQIDQwF3AmoBRwH5AcsBlgEA + AmIBWAHvAyYBOAFGAkUBfgHXAaUBAAH/AdcBpAEAAf8BRgJFAX4UAAMBAQIDQwF3AmoBRwH5AcsBlgEA Af8BzgGaAQAB/wNIAYYkAAMgAS8BXgJaAdUBxQGTAQAB/wHMAZYBAAH/AZMCAAH/GAABnQIAAf8B4QGt AYoB/wHRAZ8BAAH/Al4BWgHVAyABLyQAAUYCRQF/AecBtwGMAf8B2wGnAYQB/wMrAfwDSAGEAwMBBBQA - AUYCRQF+AdcBpQEDAf8B1wGkAQMB/wFGAkUBfgFGAkUBfwHfAawBhgH/Ad4BrAGGAf8BRgJFAX8QAAMU + AUYCRQF+AdcBpQEAAf8B1wGkAQAB/wFGAkUBfgFGAkUBfwHfAawBhgH/Ad4BrAGGAf8BRgJFAX8QAAMU ARsBWgJXAb0BuQGHAQAB/wHPAZoBAAH/AdsBpgGDAf8B3QGrAYQB/wNIAYYfAAEBA0ABcQNcAfgByQGU - AQAB/wHXAaIBBwH/Ad4BqgGGAf8BnAIAAf8YAAGcAgAB/wHbAacBgwH/AdMBngEDAf8BxwGSAQAB/wNc - AfgDQAFxAwABARwAAUYCRQF/Ad8BrQGFAf8B1wGjAQgB/wHOAZgBAAH/AbwBiQEAAf8DWwHIAxkBIxAA - AUYCRQF/Ad8BrAGGAf8B3gGsAYYB/wFGAkUBfwFGAkUBfwHXAaMBBgH/AdYBowEGAf8BRgJFAX8MAAMy - AVEBZAFbAVkB7AGxAQUBAAH/AcQBjgEAAf8B1gGhAQYB/wHmAbMBkAH/AekBtwGTAf8DSAGGGAADEgEY + AQAB/wHXAaIBBAH/Ad4BqgGGAf8BnAIAAf8YAAGcAgAB/wHbAacBgwH/AdMBngEAAf8BxwGSAQAB/wNc + AfgDQAFxAwABARwAAUYCRQF/Ad8BrQGFAf8B1wGjAQUB/wHOAZgBAAH/AbwBiQEAAf8DWwHIAxkBIxAA + AUYCRQF/Ad8BrAGGAf8B3gGsAYYB/wFGAkUBfwFGAkUBfwHXAaMBAwH/AdYBowEDAf8BRgJFAX8MAAMy + AVEBZAFbAVkB7AGxAQIBAAH/AcQBjgEAAf8B1gGhAQMB/wHmAbMBkAH/AekBtwGTAf8DSAGGGAADEgEY AVcCVgG4AaICAAH/AbsBhQEAAf8BzQGYAQAB/wHfAasBhwH/AesBuAGWAf8BowIAAf8YAAGaAgAB/wHS - AZ0BAgH/Ac0BmAEAAf8BxAGOAQAB/wG5AYIBAAH/AaUCAAH/AVcCVgG4AxIBGBgAAUYCRQF/AdYBowEF - Af8B0AGbAQAB/wHJAZMBAAH/Ab4BiAEAAf8BsgEEAQAB/wFkAWABUwHxAzgBXgwAAUYCRQF/AdcBowEG - Af8B1gGjAQYB/wFGAkUBfwFGAkUBfwHHAZIBAAH/AcYBkgEAAf8BRgJFAX8EAAMHAQoDTgGZAX8BTwEs - Af4BlQIAAf8BrgEBAQAB/wHBAYsBAAH/AdIBnAEBAf8B3gGqAYcB/wHgAa4BigH/A0gBhhQAAzABSwFi - AlgB6QGJAgAB/wGiAgAB/wG5AYIBAAH/AcoBlAEAAf8B2QGkAYEB/wHgAa0BigH/AaICAAH/GAABmAIA - Af8ByQGTAQAB/wHFAY8BAAH/Ab4BiAEAAf8BtQEHAQAB/wGmAgAB/wGUAgAB/wFiAlgB6QMwAUsUAAFG - AkUBfwHLAZcBAAH/AccBkgEAAf8BwgGMAQAB/wG6AYQBAAH/Aa4BAQEAAf8BnQIAAf8BigIAAf8BVAJS - AaYDCwEPBAABRgJFAX8BxwGSAQAB/wHGAZIBAAH/AUYCRQF/AUYCRQF/AbMBBwEAAf8BswEGAQAB/wFG - AkUBfwMcASgBYAJbAdYBAgIAAf8BjwIAAf8BpgEGAQAB/wG5AZABAAH/AckBnwEHAf8B0wGqAYkB/wHZ - AbABkQH/AdoBsgGSAf8DSAGGEAACTAFLAZABfAFSATIB/gGEAgAB/wGcAgAB/wGxAYgBAAH/AcMBmgEB - Af8BzwGmAYUB/wHXAa4BjgH/AdoBsgGSAf8BogIAAf8YAAGYAgAB/wHEAZEBAAH/AcABjQEAAf8BugGF - AQAB/wGuAQEBAAH/AaACAAH/AZACAAH/AQcCAAH/AXQBQgEhAf4BTAJLAZAQAAFGAkUBfwHGAZUBAAH/ - AcIBkAEAAf8BvQGKAQAB/wG1AQgBAAH/AacCAAH/AZgCAAH/AYcCAAH/AwAB/wFcAlcB3wMhATABRgJF - AX8BswEHAQAB/wGzAQYBAAH/AUYCRQF/AkYBRQF/AbUBkQEAAf8BsAGIAQAB/wJGAUUBfwMhATACYQFd - AeIBlQIAAf8BnwEHAQAB/wGtAYoBAAH/AbkBlgEAAf8BxQGgAQgB/wHOAacBhgH/AdIBqwGKAf8B0gGs - AYoB/wNIAYYQAAJNAUwBkQF/AW0BTAH+AZkBAgEAAf8BpwGFAQAB/wG0AZEBAAH/AcABmwEEAf8BygGk - AYMB/wHQAaoBiQH/AdIBrAGKAf8BoQIAAf8YAAGeAgAB/wHMAaUBgwH/AcsBowGCAf8BxwGgAQgB/wHA - AZsBAwH/AbUBjgEAAf8BpAEEAQAB/wGNAgAB/wF4AUQBIQH+Ak0BTAGREAABRgJFAX8BzQGmAYQB/wHM - AaQBgwH/AckBogGAAf8BxAGeAQYB/wG7AZUBAAH/Aa0BhQEAAf8BmQIAAf8BBwIAAf8BXAJXAd8DIQEw - AkYBRQF/AbUBkQEAAf8BsAGIAQAB/wJGAUUBfwJGAUUBfwGpAYoBAAH/AbABkgEHAf8CRgFFAX8EAAMN - ARECVQFTAa0BqQGFAQAB/wGzAZUBAAH/AbwBnQEIAf8BxAGkAYUB/wHKAakBiQH/Ac4BrAGMAf8BzgGs - AYsB/wNIAYYUAAIxATABTQJgAVkB6wGvAZIBAAH/AbgBmgEFAf8BwAGhAYIB/wHIAacBhwH/AcwBqwGL - Af8BzgGsAYwB/wGiAgAB/xgAAaECAAH/Ac0BqwGLAf8BzAGqAYoB/wHJAacBhwH/AcUBpAGEAf8BvwGe - AQgB/wG4AZkBAwH/AmABWQHrAjEBMAFNFAABRgJFAX8BzQGrAYoB/wHNAasBigH/AcsBqQGJAf8BxwGm - AYYB/wHCAaEBggH/AbsBnAEGAf8BswGNAQAB/wNSAakDDAEQBAACRgFFAX8BqQGKAQAB/wGwAZIBBwH/ - AkYBRQF/AkYBRQF/AaEBhgEAAf8BqAGPAQcB/wJGAUUBfwwAAzwBZgNZAfUBwwGpAYsB/wHIAawBjgH/ - AcwBrwGQAf8BzQGxAZIB/wHNAbABkQH/A0gBhhgAAxMBGgJaAVcCvQGeAQgB/wHGAasBjAH/AcoBrgGQ - Af8BzQGwAZIB/wHOAbEBkgH/AaYBAgEAAf8YAAGoAQQBAAH/AdEBtAGUAf8B0QGzAZQB/wHPAbIBkgH/ - AcwBrwGQAf8BxAGjAYMB/wJaAVcBvQMTARoYAAFGAkUBfwHRAbQBlQH/AdEBtAGUAf8B0AGyAZMB/wHO - AbABkQH/AcsBrgGPAf8DZQH0AzsBYwwAAkYBRQF/AaEBhgEAAf8BqAGPAQcB/wJGAUUBfwJGAUUBfwGn - AY8BCAH/Aa0BlgGIAf8CRgFFAX8QAAMdASoCXAFYAdEBzgGyAZQB/wHTAboBnAH/AdQBuwGcAf8B0wG7 - AZwB/wNIAYYcAAMBAQIDQwF4A00B+gHTAbsBnQH/AdQBuwGdAf8B1AG7AZ0B/wGtAYEBAAH/GAABsQGG - AQAB/wHZAcABoQH/AdkBvwGgAf8B2AG/AaAB/wNNAfoDQwF4AwEBAhwAAUYCRQF/AdoBwgGkAf8B2QHA - AaEB/wHYAb8BoAH/AdMBtgGXAf8CXgFcAc4DHAEnEAACRgFFAX8BpwGPAQgB/wGtAZYBiAH/AkYBRQF/ - AkYBRQF+AbIBnAGOAf8BtgGiAZUB/wJGAUUBfhQAAwYBCANMAZIDfwH+AeEBzQGtAf8B4QHMAa0B/wNI - AYYkAAMlATcCYQFcAdwB3gHHAagB/wHhAc0BrQH/AbgBjAEAAf8YAAG8AZEBAAH/AeUB0AGwAf8B4QHJ - AakB/wJhAVwB3AMlATckAAJGAUUBfwHnAdQBtgH/AeUB0AGwAf8CqAGJAf0DSwGOAwQBBhQAAkYBRQF+ - AbIBnAGOAf8BtgGiAZUB/wJGAUUBfgMlATcDYQHuA2EB7gMlATccAAIxATABTQNcAeoB8AHeAcAB/wNI - AYYoAAMKAQ4CUgFQAaQB3gG/AZ0B/wHHAZ0BAQH/GAAByAGfAQYB/wHeAb4BnAH/AlIBUAGkAwoBDigA - AkYBRQF/Ae8B3gHDAf8DXwHoAy8BSRwAAyUBNwNhAe4DYQHuAyUBNzAAAxMBGgNPAZcDJwE6MAADNwFa - A0cBgBgAA0cBgAM3AVowAAMhATADSgGNAxEBF/8AMQABQgFNAT4HAAE+AwABKAMAAUADAAEgAwABAQEA - AQEGAAEBFgAD/4EACf8B8QH/AucB/wGPAf8BDwHhAf8BhwHhAf8BhwHwAQ8BgQH/AQcB4AH/AYEB8AEP - AQEB/AEHAeABPwGAAfABDgEBAfgBBwHgAR8BgAFwAQgBAQHwAQcB4AEPAYABEAEAAQEB4AEHAeABBwGA - AgABAQHgAQcB4AEHAYABAAEIAQEB8AEHAeABDwGAARABDgEBAfgBBwHgAR8BgAFwAQ8BAQH8AQcB4AE/ - AYAB8AEPAYEB/wEHAeAB/wGBAfABDwHhAf8BhwHhAf8BhwHwAf8B8QH/AucB/wGPCf8L + AZ0BAAH/Ac0BmAEAAf8BxAGOAQAB/wG5AYIBAAH/AaUCAAH/AVcCVgG4AxIBGBgAAUYCRQF/AdYBowEC + Af8B0AGbAQAB/wHJAZMBAAH/Ab4BiAEAAf8BsgEBAQAB/wFkAWABUwHxAzgBXgwAAUYCRQF/AdcBowED + Af8B1gGjAQMB/wFGAkUBfwFGAkUBfwHHAZIBAAH/AcYBkgEAAf8BRgJFAX8EAAMHAQoDTgGZAX8BTwEs + Af4BlQIAAf8BrgIAAf8BwQGLAQAB/wHSAZwBAAH/Ad4BqgGHAf8B4AGuAYoB/wNIAYYUAAMwAUsBYgJY + AekBiQIAAf8BogIAAf8BuQGCAQAB/wHKAZQBAAH/AdkBpAGBAf8B4AGtAYoB/wGiAgAB/xgAAZgCAAH/ + AckBkwEAAf8BxQGPAQAB/wG+AYgBAAH/AbUBBAEAAf8BpgIAAf8BlAIAAf8BYgJYAekDMAFLFAABRgJF + AX8BywGXAQAB/wHHAZIBAAH/AcIBjAEAAf8BugGEAQAB/wGuAgAB/wGdAgAB/wGKAgAB/wFUAlIBpgML + AQ8EAAFGAkUBfwHHAZIBAAH/AcYBkgEAAf8BRgJFAX8BRgJFAX8BswEEAQAB/wGzAQMBAAH/AUYCRQF/ + AxwBKAFgAlsB1gMAAf8BjwIAAf8BpgEDAQAB/wG5AZABAAH/AckBnwEEAf8B0wGqAYkB/wHZAbABkQH/ + AdoBsgGSAf8DSAGGEAACTAFLAZABfAFSATIB/gGEAgAB/wGcAgAB/wGxAYgBAAH/AcMBmgEAAf8BzwGm + AYUB/wHXAa4BjgH/AdoBsgGSAf8BogIAAf8YAAGYAgAB/wHEAZEBAAH/AcABjQEAAf8BugGFAQAB/wGu + AgAB/wGgAgAB/wGQAgAB/wEEAgAB/wF0AUIBIQH+AUwCSwGQEAABRgJFAX8BxgGVAQAB/wHCAZABAAH/ + Ab0BigEAAf8BtQEFAQAB/wGnAgAB/wGYAgAB/wGHAgAB/wMAAf8BXAJXAd8DIQEwAUYCRQF/AbMBBAEA + Af8BswEDAQAB/wFGAkUBfwJGAUUBfwG1AZEBAAH/AbABiAEAAf8CRgFFAX8DIQEwAmEBXQHiAZUCAAH/ + AZ8BBAEAAf8BrQGKAQAB/wG5AZYBAAH/AcUBoAEFAf8BzgGnAYYB/wHSAasBigH/AdIBrAGKAf8DSAGG + EAACTQFMAZEBfwFtAUwB/gGZAgAB/wGnAYUBAAH/AbQBkQEAAf8BwAGbAQEB/wHKAaQBgwH/AdABqgGJ + Af8B0gGsAYoB/wGhAgAB/xgAAZ4CAAH/AcwBpQGDAf8BywGjAYIB/wHHAaABBQH/AcABmwEAAf8BtQGO + AQAB/wGkAQEBAAH/AY0CAAH/AXgBRAEhAf4CTQFMAZEQAAFGAkUBfwHNAaYBhAH/AcwBpAGDAf8ByQGi + AYAB/wHEAZ4BAwH/AbsBlQEAAf8BrQGFAQAB/wGZAgAB/wEEAgAB/wFcAlcB3wMhATACRgFFAX8BtQGR + AQAB/wGwAYgBAAH/AkYBRQF/AkYBRQF/AakBigEAAf8BsAGSAQQB/wJGAUUBfwQAAw0BEQJVAVMBrQGp + AYUBAAH/AbMBlQEAAf8BvAGdAQUB/wHEAaQBhQH/AcoBqQGJAf8BzgGsAYwB/wHOAawBiwH/A0gBhhQA + AjEBMAFNAmABWQHrAa8BkgEAAf8BuAGaAQIB/wHAAaEBggH/AcgBpwGHAf8BzAGrAYsB/wHOAawBjAH/ + AaICAAH/GAABoQIAAf8BzQGrAYsB/wHMAaoBigH/AckBpwGHAf8BxQGkAYQB/wG/AZ4BBQH/AbgBmQEA + Af8CYAFZAesCMQEwAU0UAAFGAkUBfwHNAasBigH/Ac0BqwGKAf8BywGpAYkB/wHHAaYBhgH/AcIBoQGC + Af8BuwGcAQMB/wGzAY0BAAH/A1IBqQMMARAEAAJGAUUBfwGpAYoBAAH/AbABkgEEAf8CRgFFAX8CRgFF + AX8BoQGGAQAB/wGoAY8BBAH/AkYBRQF/DAADPAFmA1kB9QHDAakBiwH/AcgBrAGOAf8BzAGvAZAB/wHN + AbEBkgH/Ac0BsAGRAf8DSAGGGAADEwEaAloBVwK9AZ4BBQH/AcYBqwGMAf8BygGuAZAB/wHNAbABkgH/ + Ac4BsQGSAf8BpgIAAf8YAAGoAQEBAAH/AdEBtAGUAf8B0QGzAZQB/wHPAbIBkgH/AcwBrwGQAf8BxAGj + AYMB/wJaAVcBvQMTARoYAAFGAkUBfwHRAbQBlQH/AdEBtAGUAf8B0AGyAZMB/wHOAbABkQH/AcsBrgGP + Af8DZQH0AzsBYwwAAkYBRQF/AaEBhgEAAf8BqAGPAQQB/wJGAUUBfwJGAUUBfwGnAY8BBQH/Aa0BlgGI + Af8CRgFFAX8QAAMdASoCXAFYAdEBzgGyAZQB/wHTAboBnAH/AdQBuwGcAf8B0wG7AZwB/wNIAYYcAAMB + AQIDQwF4A00B+gHTAbsBnQH/AdQBuwGdAf8B1AG7AZ0B/wGtAYEBAAH/GAABsQGGAQAB/wHZAcABoQH/ + AdkBvwGgAf8B2AG/AaAB/wNNAfoDQwF4AwEBAhwAAUYCRQF/AdoBwgGkAf8B2QHAAaEB/wHYAb8BoAH/ + AdMBtgGXAf8CXgFcAc4DHAEnEAACRgFFAX8BpwGPAQUB/wGtAZYBiAH/AkYBRQF/AkYBRQF+AbIBnAGO + Af8BtgGiAZUB/wJGAUUBfhQAAwYBCANMAZIDfwH+AeEBzQGtAf8B4QHMAa0B/wNIAYYkAAMlATcCYQFc + AdwB3gHHAagB/wHhAc0BrQH/AbgBjAEAAf8YAAG8AZEBAAH/AeUB0AGwAf8B4QHJAakB/wJhAVwB3AMl + ATckAAJGAUUBfwHnAdQBtgH/AeUB0AGwAf8CqAGJAf0DSwGOAwQBBhQAAkYBRQF+AbIBnAGOAf8BtgGi + AZUB/wJGAUUBfgMlATcDYQHuA2EB7gMlATccAAIxATABTQNcAeoB8AHeAcAB/wNIAYYoAAMKAQ4CUgFQ + AaQB3gG/AZ0B/wHHAZ0BAAH/GAAByAGfAQMB/wHeAb4BnAH/AlIBUAGkAwoBDigAAkYBRQF/Ae8B3gHD + Af8DXwHoAy8BSRwAAyUBNwNhAe4DYQHuAyUBNzAAAxMBGgNPAZcDJwE6MAADNwFaA0cBgBgAA0cBgAM3 + AVowAAMhATADSgGNAxEBF/8AMQABQgFNAT4HAAE+AwABKAMAAUADAAEgAwABAQEAAQEGAAEBFgAD/4EA + Cf8B8QH/AucB/wGPAf8BDwHhAf8BhwHhAf8BhwHwAQ8BgQH/AQcB4AH/AYEB8AEPAQEB/AEHAeABPwGA + AfABDgEBAfgBBwHgAR8BgAFwAQgBAQHwAQcB4AEPAYABEAEAAQEB4AEHAeABBwGAAgABAQHgAQcB4AEH + AYABAAEIAQEB8AEHAeABDwGAARABDgEBAfgBBwHgAR8BgAFwAQ8BAQH8AQcB4AE/AYAB8AEPAYEB/wEH + AeAB/wGBAfABDwHhAf8BhwHhAf8BhwHwAf8B8QH/AucB/wGPCf8L diff --git a/src/ServiceBusExplorer/Controls/HandleQueueControl.Designer.cs b/src/ServiceBusExplorer/Controls/HandleQueueControl.Designer.cs index c831d1d2..627c387e 100644 --- a/src/ServiceBusExplorer/Controls/HandleQueueControl.Designer.cs +++ b/src/ServiceBusExplorer/Controls/HandleQueueControl.Designer.cs @@ -25,31 +25,13 @@ private void InitializeComponent() this.mainTabControl = new System.Windows.Forms.TabControl(); this.tabPageDescription = new System.Windows.Forms.TabPage(); this.grouperAutoDeleteOnIdle = new ServiceBusExplorer.Controls.Grouper(); - this.lblAutoDeleteOnIdleMilliseconds = new System.Windows.Forms.Label(); - this.txtAutoDeleteOnIdleMilliseconds = new System.Windows.Forms.TextBox(); - this.lblAutoDeleteOnIdleSeconds = new System.Windows.Forms.Label(); - this.txtAutoDeleteOnIdleSeconds = new System.Windows.Forms.TextBox(); - this.lblAutoDeleteOnIdleMinutes = new System.Windows.Forms.Label(); - this.txtAutoDeleteOnIdleMinutes = new System.Windows.Forms.TextBox(); - this.lblAutoDeleteOnIdleHours = new System.Windows.Forms.Label(); - this.lblAutoDeleteOnIdleDays = new System.Windows.Forms.Label(); - this.txtAutoDeleteOnIdleHours = new System.Windows.Forms.TextBox(); - this.txtAutoDeleteOnIdleDays = new System.Windows.Forms.TextBox(); + this.tsAutoDeleteOnIdle = new ServiceBusExplorer.Controls.TimeSpanControl(); this.grouperQueueInformation = new ServiceBusExplorer.Controls.Grouper(); this.propertyListView = new System.Windows.Forms.ListView(); this.nameColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.valueColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.groupergrouperDefaultMessageTimeToLive = new ServiceBusExplorer.Controls.Grouper(); - this.lblDefaultMessageTimeToLiveMilliseconds = new System.Windows.Forms.Label(); - this.txtDefaultMessageTimeToLiveMilliseconds = new System.Windows.Forms.TextBox(); - this.lblDefaultMessageTimeToLiveSeconds = new System.Windows.Forms.Label(); - this.txtDefaultMessageTimeToLiveSeconds = new System.Windows.Forms.TextBox(); - this.lblDefaultMessageTimeToLiveMinutes = new System.Windows.Forms.Label(); - this.txtDefaultMessageTimeToLiveMinutes = new System.Windows.Forms.TextBox(); - this.lbllblDefaultMessageTimeToLiveHours = new System.Windows.Forms.Label(); - this.lblDefaultMessageTimeToLiveDays = new System.Windows.Forms.Label(); - this.txtDefaultMessageTimeToLiveHours = new System.Windows.Forms.TextBox(); - this.txtDefaultMessageTimeToLiveDays = new System.Windows.Forms.TextBox(); + this.tsDefaultMessageTimeToLive = new ServiceBusExplorer.Controls.TimeSpanControl(); this.grouperQueueSettings = new ServiceBusExplorer.Controls.Grouper(); this.checkedListBox = new System.Windows.Forms.CheckedListBox(); this.grouperQueueProperties = new ServiceBusExplorer.Controls.Grouper(); @@ -66,29 +48,11 @@ private void InitializeComponent() this.lblForwardTo = new System.Windows.Forms.Label(); this.txtForwardTo = new System.Windows.Forms.TextBox(); this.lblMaxDeliveryCount = new System.Windows.Forms.Label(); - this.txtMaxDeliveryCount = new System.Windows.Forms.TextBox(); + this.txtMaxDeliveryCount = new ServiceBusExplorer.Controls.NumericTextBox(); this.grouperLockDuration = new ServiceBusExplorer.Controls.Grouper(); - this.lblLockDurationMilliseconds = new System.Windows.Forms.Label(); - this.txtLockDurationMilliseconds = new System.Windows.Forms.TextBox(); - this.lblLockDurationSeconds = new System.Windows.Forms.Label(); - this.txtLockDurationSeconds = new System.Windows.Forms.TextBox(); - this.lblLockDurationMinutes = new System.Windows.Forms.Label(); - this.txtLockDurationMinutes = new System.Windows.Forms.TextBox(); - this.lblLockDurationHours = new System.Windows.Forms.Label(); - this.lblLockDurationDays = new System.Windows.Forms.Label(); - this.txtLockDurationHours = new System.Windows.Forms.TextBox(); - this.txtLockDurationDays = new System.Windows.Forms.TextBox(); + this.tsLockDuration = new ServiceBusExplorer.Controls.TimeSpanControl(); this.grouperDuplicateDetectionHistoryTimeWindow = new ServiceBusExplorer.Controls.Grouper(); - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds = new System.Windows.Forms.Label(); - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds = new System.Windows.Forms.TextBox(); - this.lblDuplicateDetectionHistoryTimeWindowSeconds = new System.Windows.Forms.Label(); - this.txtDuplicateDetectionHistoryTimeWindowSeconds = new System.Windows.Forms.TextBox(); - this.lblDuplicateDetectionHistoryTimeWindowMinutes = new System.Windows.Forms.Label(); - this.txtDuplicateDetectionHistoryTimeWindowMinutes = new System.Windows.Forms.TextBox(); - this.lblDuplicateDetectionHistoryTimeWindowHours = new System.Windows.Forms.Label(); - this.lblDuplicateDetectionHistoryTimeWindowDays = new System.Windows.Forms.Label(); - this.txtDuplicateDetectionHistoryTimeWindowHours = new System.Windows.Forms.TextBox(); - this.txtDuplicateDetectionHistoryTimeWindowDays = new System.Windows.Forms.TextBox(); + this.tsDuplicateDetectionHistoryTimeWindow = new ServiceBusExplorer.Controls.TimeSpanControl(); this.grouperPath = new ServiceBusExplorer.Controls.Grouper(); this.lblRelativeURI = new System.Windows.Forms.Label(); this.txtPath = new System.Windows.Forms.TextBox(); @@ -108,9 +72,6 @@ private void InitializeComponent() this.grouperMessageSystemProperties = new ServiceBusExplorer.Controls.Grouper(); this.messagePropertyGrid = new System.Windows.Forms.PropertyGrid(); this.grouperMessageCustomProperties = new ServiceBusExplorer.Controls.Grouper(); - this.messagePropertyListView = new System.Windows.Forms.ListView(); - this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.tabPageDeadletter = new System.Windows.Forms.TabPage(); this.deadletterSplitContainer = new System.Windows.Forms.SplitContainer(); this.deadletterMainSplitContainer = new System.Windows.Forms.SplitContainer(); @@ -124,9 +85,6 @@ private void InitializeComponent() this.grouperDeadletterSystemProperties = new ServiceBusExplorer.Controls.Grouper(); this.deadletterPropertyGrid = new System.Windows.Forms.PropertyGrid(); this.grouperDeadletterCustomProperties = new ServiceBusExplorer.Controls.Grouper(); - this.deadletterPropertyListView = new System.Windows.Forms.ListView(); - this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.tabPageTransferDeadletter = new System.Windows.Forms.TabPage(); this.transferDeadletterSplitContainer = new System.Windows.Forms.SplitContainer(); this.transferMainSplitContainer = new System.Windows.Forms.SplitContainer(); @@ -139,9 +97,6 @@ private void InitializeComponent() this.grouperTransferDeadletterSystemProperties = new ServiceBusExplorer.Controls.Grouper(); this.transferDeadletterPropertyGrid = new System.Windows.Forms.PropertyGrid(); this.grouperTransferDeadletterCustomProperties = new ServiceBusExplorer.Controls.Grouper(); - this.transferDeadletterPropertyListView = new System.Windows.Forms.ListView(); - this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.tabPageSessions = new System.Windows.Forms.TabPage(); this.sessionListStateSplitContainer = new System.Windows.Forms.SplitContainer(); this.sessionMainSplitContainer = new System.Windows.Forms.SplitContainer(); @@ -159,13 +114,17 @@ private void InitializeComponent() this.resubmitSelectedMessagesInBatchModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.saveSelectedMessageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveSelectedMessageBodyAsFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveSelectedMessagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveSelectedMessagesBodyAsFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.deadletterContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.repairAndResubmitDeadletterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.resubmitSelectedDeadletterInBatchModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.saveSelectedDeadletteredMessageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveSelectedDeadletteredMessageBodyAsFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveSelectedDeadletteredMessagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveSelectedDeadletteredMessagesBodyAsFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.deleteSelectedMessageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.deleteSelectedMessagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.messagesBindingSource = new System.Windows.Forms.BindingSource(this.components); @@ -182,13 +141,12 @@ private void InitializeComponent() this.resubmitSelectedTransferDeadletterInBatchModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.saveSelectedTransferDeadletteredMessageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveSelectedTransferDeadletteredMessagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveSelectedMessageBodyAsFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveSelectedMessagesBodyAsFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveSelectedTransferDeadletteredMessageBodyAsFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveSelectedTransferDeadletteredMessagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveSelectedTransferDeadletteredMessagesBodyAsFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveSelectedDeadletteredMessageBodyAsFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveSelectedDeadletteredMessagesBodyAsFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.messageCustomPropertyGrid = new System.Windows.Forms.PropertyGrid(); + this.deadletterCustomPropertyGrid = new System.Windows.Forms.PropertyGrid(); + this.transferDeadletterCustomPropertyGrid = new System.Windows.Forms.PropertyGrid(); this.mainTabControl.SuspendLayout(); this.tabPageDescription.SuspendLayout(); this.grouperAutoDeleteOnIdle.SuspendLayout(); @@ -409,16 +367,7 @@ private void InitializeComponent() this.grouperAutoDeleteOnIdle.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.grouperAutoDeleteOnIdle.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperAutoDeleteOnIdle.BorderThickness = 1F; - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleMilliseconds); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleMilliseconds); - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleSeconds); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleSeconds); - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleMinutes); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleMinutes); - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleHours); - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleDays); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleHours); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleDays); + this.grouperAutoDeleteOnIdle.Controls.Add(this.tsAutoDeleteOnIdle); this.grouperAutoDeleteOnIdle.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperAutoDeleteOnIdle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.grouperAutoDeleteOnIdle.ForeColor = System.Drawing.Color.White; @@ -435,100 +384,13 @@ private void InitializeComponent() this.grouperAutoDeleteOnIdle.Size = new System.Drawing.Size(296, 80); this.grouperAutoDeleteOnIdle.TabIndex = 1; // - // lblAutoDeleteOnIdleMilliseconds - // - this.lblAutoDeleteOnIdleMilliseconds.AutoSize = true; - this.lblAutoDeleteOnIdleMilliseconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleMilliseconds.Location = new System.Drawing.Point(240, 28); - this.lblAutoDeleteOnIdleMilliseconds.Name = "lblAutoDeleteOnIdleMilliseconds"; - this.lblAutoDeleteOnIdleMilliseconds.Size = new System.Drawing.Size(49, 13); - this.lblAutoDeleteOnIdleMilliseconds.TabIndex = 25; - this.lblAutoDeleteOnIdleMilliseconds.Text = "Millisecs:"; - // - // txtAutoDeleteOnIdleMilliseconds - // - this.txtAutoDeleteOnIdleMilliseconds.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleMilliseconds.Location = new System.Drawing.Point(240, 44); - this.txtAutoDeleteOnIdleMilliseconds.Name = "txtAutoDeleteOnIdleMilliseconds"; - this.txtAutoDeleteOnIdleMilliseconds.Size = new System.Drawing.Size(40, 20); - this.txtAutoDeleteOnIdleMilliseconds.TabIndex = 4; - this.txtAutoDeleteOnIdleMilliseconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblAutoDeleteOnIdleSeconds - // - this.lblAutoDeleteOnIdleSeconds.AutoSize = true; - this.lblAutoDeleteOnIdleSeconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleSeconds.Location = new System.Drawing.Point(184, 28); - this.lblAutoDeleteOnIdleSeconds.Name = "lblAutoDeleteOnIdleSeconds"; - this.lblAutoDeleteOnIdleSeconds.Size = new System.Drawing.Size(52, 13); - this.lblAutoDeleteOnIdleSeconds.TabIndex = 24; - this.lblAutoDeleteOnIdleSeconds.Text = "Seconds:"; - // - // txtAutoDeleteOnIdleSeconds - // - this.txtAutoDeleteOnIdleSeconds.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleSeconds.Location = new System.Drawing.Point(184, 44); - this.txtAutoDeleteOnIdleSeconds.Name = "txtAutoDeleteOnIdleSeconds"; - this.txtAutoDeleteOnIdleSeconds.Size = new System.Drawing.Size(40, 20); - this.txtAutoDeleteOnIdleSeconds.TabIndex = 3; - this.txtAutoDeleteOnIdleSeconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblAutoDeleteOnIdleMinutes - // - this.lblAutoDeleteOnIdleMinutes.AutoSize = true; - this.lblAutoDeleteOnIdleMinutes.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleMinutes.Location = new System.Drawing.Point(128, 28); - this.lblAutoDeleteOnIdleMinutes.Name = "lblAutoDeleteOnIdleMinutes"; - this.lblAutoDeleteOnIdleMinutes.Size = new System.Drawing.Size(47, 13); - this.lblAutoDeleteOnIdleMinutes.TabIndex = 23; - this.lblAutoDeleteOnIdleMinutes.Text = "Minutes:"; - // - // txtAutoDeleteOnIdleMinutes - // - this.txtAutoDeleteOnIdleMinutes.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleMinutes.Location = new System.Drawing.Point(128, 44); - this.txtAutoDeleteOnIdleMinutes.Name = "txtAutoDeleteOnIdleMinutes"; - this.txtAutoDeleteOnIdleMinutes.Size = new System.Drawing.Size(40, 20); - this.txtAutoDeleteOnIdleMinutes.TabIndex = 2; - this.txtAutoDeleteOnIdleMinutes.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblAutoDeleteOnIdleHours - // - this.lblAutoDeleteOnIdleHours.AutoSize = true; - this.lblAutoDeleteOnIdleHours.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleHours.Location = new System.Drawing.Point(72, 28); - this.lblAutoDeleteOnIdleHours.Name = "lblAutoDeleteOnIdleHours"; - this.lblAutoDeleteOnIdleHours.Size = new System.Drawing.Size(38, 13); - this.lblAutoDeleteOnIdleHours.TabIndex = 22; - this.lblAutoDeleteOnIdleHours.Text = "Hours:"; - // - // lblAutoDeleteOnIdleDays - // - this.lblAutoDeleteOnIdleDays.AutoSize = true; - this.lblAutoDeleteOnIdleDays.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleDays.Location = new System.Drawing.Point(16, 28); - this.lblAutoDeleteOnIdleDays.Name = "lblAutoDeleteOnIdleDays"; - this.lblAutoDeleteOnIdleDays.Size = new System.Drawing.Size(34, 13); - this.lblAutoDeleteOnIdleDays.TabIndex = 21; - this.lblAutoDeleteOnIdleDays.Text = "Days:"; - // - // txtAutoDeleteOnIdleHours - // - this.txtAutoDeleteOnIdleHours.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleHours.Location = new System.Drawing.Point(72, 44); - this.txtAutoDeleteOnIdleHours.Name = "txtAutoDeleteOnIdleHours"; - this.txtAutoDeleteOnIdleHours.Size = new System.Drawing.Size(40, 20); - this.txtAutoDeleteOnIdleHours.TabIndex = 1; - this.txtAutoDeleteOnIdleHours.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // txtAutoDeleteOnIdleDays - // - this.txtAutoDeleteOnIdleDays.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleDays.Location = new System.Drawing.Point(16, 44); - this.txtAutoDeleteOnIdleDays.Name = "txtAutoDeleteOnIdleDays"; - this.txtAutoDeleteOnIdleDays.Size = new System.Drawing.Size(40, 20); - this.txtAutoDeleteOnIdleDays.TabIndex = 0; - this.txtAutoDeleteOnIdleDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); + // tsAutoDeleteOnIdle + // + this.tsAutoDeleteOnIdle.Location = new System.Drawing.Point(13, 25); + this.tsAutoDeleteOnIdle.Name = "tsAutoDeleteOnIdle"; + this.tsAutoDeleteOnIdle.Size = new System.Drawing.Size(273, 42); + this.tsAutoDeleteOnIdle.TabIndex = 26; + this.tsAutoDeleteOnIdle.TimeSpanValue = null; // // grouperQueueInformation // @@ -565,6 +427,7 @@ private void InitializeComponent() this.propertyListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.nameColumnHeader, this.valueColumnHeader}); + this.propertyListView.HideSelection = false; this.propertyListView.Location = new System.Drawing.Point(16, 32); this.propertyListView.Name = "propertyListView"; this.propertyListView.OwnerDraw = true; @@ -594,16 +457,7 @@ private void InitializeComponent() this.groupergrouperDefaultMessageTimeToLive.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.groupergrouperDefaultMessageTimeToLive.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.groupergrouperDefaultMessageTimeToLive.BorderThickness = 1F; - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lblDefaultMessageTimeToLiveMilliseconds); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveMilliseconds); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lblDefaultMessageTimeToLiveSeconds); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveSeconds); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lblDefaultMessageTimeToLiveMinutes); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveMinutes); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lbllblDefaultMessageTimeToLiveHours); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lblDefaultMessageTimeToLiveDays); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveHours); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveDays); + this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.tsDefaultMessageTimeToLive); this.groupergrouperDefaultMessageTimeToLive.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.groupergrouperDefaultMessageTimeToLive.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.groupergrouperDefaultMessageTimeToLive.ForeColor = System.Drawing.Color.White; @@ -620,100 +474,13 @@ private void InitializeComponent() this.groupergrouperDefaultMessageTimeToLive.Size = new System.Drawing.Size(296, 80); this.groupergrouperDefaultMessageTimeToLive.TabIndex = 2; // - // lblDefaultMessageTimeToLiveMilliseconds - // - this.lblDefaultMessageTimeToLiveMilliseconds.AutoSize = true; - this.lblDefaultMessageTimeToLiveMilliseconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDefaultMessageTimeToLiveMilliseconds.Location = new System.Drawing.Point(240, 28); - this.lblDefaultMessageTimeToLiveMilliseconds.Name = "lblDefaultMessageTimeToLiveMilliseconds"; - this.lblDefaultMessageTimeToLiveMilliseconds.Size = new System.Drawing.Size(49, 13); - this.lblDefaultMessageTimeToLiveMilliseconds.TabIndex = 25; - this.lblDefaultMessageTimeToLiveMilliseconds.Text = "Millisecs:"; - // - // txtDefaultMessageTimeToLiveMilliseconds - // - this.txtDefaultMessageTimeToLiveMilliseconds.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveMilliseconds.Location = new System.Drawing.Point(240, 44); - this.txtDefaultMessageTimeToLiveMilliseconds.Name = "txtDefaultMessageTimeToLiveMilliseconds"; - this.txtDefaultMessageTimeToLiveMilliseconds.Size = new System.Drawing.Size(40, 20); - this.txtDefaultMessageTimeToLiveMilliseconds.TabIndex = 4; - this.txtDefaultMessageTimeToLiveMilliseconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDefaultMessageTimeToLiveSeconds - // - this.lblDefaultMessageTimeToLiveSeconds.AutoSize = true; - this.lblDefaultMessageTimeToLiveSeconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDefaultMessageTimeToLiveSeconds.Location = new System.Drawing.Point(184, 28); - this.lblDefaultMessageTimeToLiveSeconds.Name = "lblDefaultMessageTimeToLiveSeconds"; - this.lblDefaultMessageTimeToLiveSeconds.Size = new System.Drawing.Size(52, 13); - this.lblDefaultMessageTimeToLiveSeconds.TabIndex = 24; - this.lblDefaultMessageTimeToLiveSeconds.Text = "Seconds:"; - // - // txtDefaultMessageTimeToLiveSeconds - // - this.txtDefaultMessageTimeToLiveSeconds.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveSeconds.Location = new System.Drawing.Point(184, 44); - this.txtDefaultMessageTimeToLiveSeconds.Name = "txtDefaultMessageTimeToLiveSeconds"; - this.txtDefaultMessageTimeToLiveSeconds.Size = new System.Drawing.Size(40, 20); - this.txtDefaultMessageTimeToLiveSeconds.TabIndex = 3; - this.txtDefaultMessageTimeToLiveSeconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDefaultMessageTimeToLiveMinutes - // - this.lblDefaultMessageTimeToLiveMinutes.AutoSize = true; - this.lblDefaultMessageTimeToLiveMinutes.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDefaultMessageTimeToLiveMinutes.Location = new System.Drawing.Point(128, 28); - this.lblDefaultMessageTimeToLiveMinutes.Name = "lblDefaultMessageTimeToLiveMinutes"; - this.lblDefaultMessageTimeToLiveMinutes.Size = new System.Drawing.Size(47, 13); - this.lblDefaultMessageTimeToLiveMinutes.TabIndex = 23; - this.lblDefaultMessageTimeToLiveMinutes.Text = "Minutes:"; - // - // txtDefaultMessageTimeToLiveMinutes - // - this.txtDefaultMessageTimeToLiveMinutes.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveMinutes.Location = new System.Drawing.Point(128, 44); - this.txtDefaultMessageTimeToLiveMinutes.Name = "txtDefaultMessageTimeToLiveMinutes"; - this.txtDefaultMessageTimeToLiveMinutes.Size = new System.Drawing.Size(40, 20); - this.txtDefaultMessageTimeToLiveMinutes.TabIndex = 2; - this.txtDefaultMessageTimeToLiveMinutes.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lbllblDefaultMessageTimeToLiveHours - // - this.lbllblDefaultMessageTimeToLiveHours.AutoSize = true; - this.lbllblDefaultMessageTimeToLiveHours.ForeColor = System.Drawing.SystemColors.ControlText; - this.lbllblDefaultMessageTimeToLiveHours.Location = new System.Drawing.Point(72, 28); - this.lbllblDefaultMessageTimeToLiveHours.Name = "lbllblDefaultMessageTimeToLiveHours"; - this.lbllblDefaultMessageTimeToLiveHours.Size = new System.Drawing.Size(38, 13); - this.lbllblDefaultMessageTimeToLiveHours.TabIndex = 22; - this.lbllblDefaultMessageTimeToLiveHours.Text = "Hours:"; - // - // lblDefaultMessageTimeToLiveDays - // - this.lblDefaultMessageTimeToLiveDays.AutoSize = true; - this.lblDefaultMessageTimeToLiveDays.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDefaultMessageTimeToLiveDays.Location = new System.Drawing.Point(16, 28); - this.lblDefaultMessageTimeToLiveDays.Name = "lblDefaultMessageTimeToLiveDays"; - this.lblDefaultMessageTimeToLiveDays.Size = new System.Drawing.Size(34, 13); - this.lblDefaultMessageTimeToLiveDays.TabIndex = 21; - this.lblDefaultMessageTimeToLiveDays.Text = "Days:"; - // - // txtDefaultMessageTimeToLiveHours - // - this.txtDefaultMessageTimeToLiveHours.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveHours.Location = new System.Drawing.Point(72, 44); - this.txtDefaultMessageTimeToLiveHours.Name = "txtDefaultMessageTimeToLiveHours"; - this.txtDefaultMessageTimeToLiveHours.Size = new System.Drawing.Size(40, 20); - this.txtDefaultMessageTimeToLiveHours.TabIndex = 1; - this.txtDefaultMessageTimeToLiveHours.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // txtDefaultMessageTimeToLiveDays - // - this.txtDefaultMessageTimeToLiveDays.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveDays.Location = new System.Drawing.Point(16, 44); - this.txtDefaultMessageTimeToLiveDays.Name = "txtDefaultMessageTimeToLiveDays"; - this.txtDefaultMessageTimeToLiveDays.Size = new System.Drawing.Size(40, 20); - this.txtDefaultMessageTimeToLiveDays.TabIndex = 0; - this.txtDefaultMessageTimeToLiveDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); + // tsDefaultMessageTimeToLive + // + this.tsDefaultMessageTimeToLive.Location = new System.Drawing.Point(13, 25); + this.tsDefaultMessageTimeToLive.Name = "tsDefaultMessageTimeToLive"; + this.tsDefaultMessageTimeToLive.Size = new System.Drawing.Size(273, 42); + this.tsDefaultMessageTimeToLive.TabIndex = 27; + this.tsDefaultMessageTimeToLive.TimeSpanValue = null; // // grouperQueueSettings // @@ -976,6 +743,9 @@ private void InitializeComponent() // // txtMaxDeliveryCount // + this.txtMaxDeliveryCount.AllowDecimal = false; + this.txtMaxDeliveryCount.AllowNegative = false; + this.txtMaxDeliveryCount.AllowSpace = false; this.txtMaxDeliveryCount.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.txtMaxDeliveryCount.BackColor = System.Drawing.SystemColors.Window; @@ -983,7 +753,6 @@ private void InitializeComponent() this.txtMaxDeliveryCount.Name = "txtMaxDeliveryCount"; this.txtMaxDeliveryCount.Size = new System.Drawing.Size(232, 20); this.txtMaxDeliveryCount.TabIndex = 0; - this.txtMaxDeliveryCount.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); // // grouperLockDuration // @@ -992,16 +761,7 @@ private void InitializeComponent() this.grouperLockDuration.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.grouperLockDuration.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperLockDuration.BorderThickness = 1F; - this.grouperLockDuration.Controls.Add(this.lblLockDurationMilliseconds); - this.grouperLockDuration.Controls.Add(this.txtLockDurationMilliseconds); - this.grouperLockDuration.Controls.Add(this.lblLockDurationSeconds); - this.grouperLockDuration.Controls.Add(this.txtLockDurationSeconds); - this.grouperLockDuration.Controls.Add(this.lblLockDurationMinutes); - this.grouperLockDuration.Controls.Add(this.txtLockDurationMinutes); - this.grouperLockDuration.Controls.Add(this.lblLockDurationHours); - this.grouperLockDuration.Controls.Add(this.lblLockDurationDays); - this.grouperLockDuration.Controls.Add(this.txtLockDurationHours); - this.grouperLockDuration.Controls.Add(this.txtLockDurationDays); + this.grouperLockDuration.Controls.Add(this.tsLockDuration); this.grouperLockDuration.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperLockDuration.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.grouperLockDuration.ForeColor = System.Drawing.Color.White; @@ -1018,100 +778,13 @@ private void InitializeComponent() this.grouperLockDuration.Size = new System.Drawing.Size(296, 80); this.grouperLockDuration.TabIndex = 4; // - // lblLockDurationMilliseconds - // - this.lblLockDurationMilliseconds.AutoSize = true; - this.lblLockDurationMilliseconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblLockDurationMilliseconds.Location = new System.Drawing.Point(240, 28); - this.lblLockDurationMilliseconds.Name = "lblLockDurationMilliseconds"; - this.lblLockDurationMilliseconds.Size = new System.Drawing.Size(49, 13); - this.lblLockDurationMilliseconds.TabIndex = 25; - this.lblLockDurationMilliseconds.Text = "Millisecs:"; - // - // txtLockDurationMilliseconds - // - this.txtLockDurationMilliseconds.BackColor = System.Drawing.SystemColors.Window; - this.txtLockDurationMilliseconds.Location = new System.Drawing.Point(240, 44); - this.txtLockDurationMilliseconds.Name = "txtLockDurationMilliseconds"; - this.txtLockDurationMilliseconds.Size = new System.Drawing.Size(40, 20); - this.txtLockDurationMilliseconds.TabIndex = 4; - this.txtLockDurationMilliseconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblLockDurationSeconds - // - this.lblLockDurationSeconds.AutoSize = true; - this.lblLockDurationSeconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblLockDurationSeconds.Location = new System.Drawing.Point(184, 28); - this.lblLockDurationSeconds.Name = "lblLockDurationSeconds"; - this.lblLockDurationSeconds.Size = new System.Drawing.Size(52, 13); - this.lblLockDurationSeconds.TabIndex = 24; - this.lblLockDurationSeconds.Text = "Seconds:"; - // - // txtLockDurationSeconds - // - this.txtLockDurationSeconds.BackColor = System.Drawing.SystemColors.Window; - this.txtLockDurationSeconds.Location = new System.Drawing.Point(184, 44); - this.txtLockDurationSeconds.Name = "txtLockDurationSeconds"; - this.txtLockDurationSeconds.Size = new System.Drawing.Size(40, 20); - this.txtLockDurationSeconds.TabIndex = 3; - this.txtLockDurationSeconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblLockDurationMinutes - // - this.lblLockDurationMinutes.AutoSize = true; - this.lblLockDurationMinutes.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblLockDurationMinutes.Location = new System.Drawing.Point(128, 28); - this.lblLockDurationMinutes.Name = "lblLockDurationMinutes"; - this.lblLockDurationMinutes.Size = new System.Drawing.Size(47, 13); - this.lblLockDurationMinutes.TabIndex = 23; - this.lblLockDurationMinutes.Text = "Minutes:"; - // - // txtLockDurationMinutes - // - this.txtLockDurationMinutes.BackColor = System.Drawing.SystemColors.Window; - this.txtLockDurationMinutes.Location = new System.Drawing.Point(128, 44); - this.txtLockDurationMinutes.Name = "txtLockDurationMinutes"; - this.txtLockDurationMinutes.Size = new System.Drawing.Size(40, 20); - this.txtLockDurationMinutes.TabIndex = 2; - this.txtLockDurationMinutes.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblLockDurationHours - // - this.lblLockDurationHours.AutoSize = true; - this.lblLockDurationHours.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblLockDurationHours.Location = new System.Drawing.Point(72, 28); - this.lblLockDurationHours.Name = "lblLockDurationHours"; - this.lblLockDurationHours.Size = new System.Drawing.Size(38, 13); - this.lblLockDurationHours.TabIndex = 22; - this.lblLockDurationHours.Text = "Hours:"; - // - // lblLockDurationDays - // - this.lblLockDurationDays.AutoSize = true; - this.lblLockDurationDays.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblLockDurationDays.Location = new System.Drawing.Point(16, 28); - this.lblLockDurationDays.Name = "lblLockDurationDays"; - this.lblLockDurationDays.Size = new System.Drawing.Size(34, 13); - this.lblLockDurationDays.TabIndex = 21; - this.lblLockDurationDays.Text = "Days:"; - // - // txtLockDurationHours - // - this.txtLockDurationHours.BackColor = System.Drawing.SystemColors.Window; - this.txtLockDurationHours.Location = new System.Drawing.Point(72, 44); - this.txtLockDurationHours.Name = "txtLockDurationHours"; - this.txtLockDurationHours.Size = new System.Drawing.Size(40, 20); - this.txtLockDurationHours.TabIndex = 1; - this.txtLockDurationHours.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // txtLockDurationDays - // - this.txtLockDurationDays.BackColor = System.Drawing.SystemColors.Window; - this.txtLockDurationDays.Location = new System.Drawing.Point(16, 44); - this.txtLockDurationDays.Name = "txtLockDurationDays"; - this.txtLockDurationDays.Size = new System.Drawing.Size(40, 20); - this.txtLockDurationDays.TabIndex = 0; - this.txtLockDurationDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); + // tsLockDuration + // + this.tsLockDuration.Location = new System.Drawing.Point(13, 25); + this.tsLockDuration.Name = "tsLockDuration"; + this.tsLockDuration.Size = new System.Drawing.Size(273, 42); + this.tsLockDuration.TabIndex = 28; + this.tsLockDuration.TimeSpanValue = null; // // grouperDuplicateDetectionHistoryTimeWindow // @@ -1120,16 +793,7 @@ private void InitializeComponent() this.grouperDuplicateDetectionHistoryTimeWindow.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.grouperDuplicateDetectionHistoryTimeWindow.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperDuplicateDetectionHistoryTimeWindow.BorderThickness = 1F; - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowMilliseconds); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtDuplicateDetectionHistoryTimeWindowMilliseconds); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowSeconds); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtDuplicateDetectionHistoryTimeWindowSeconds); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowMinutes); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtDuplicateDetectionHistoryTimeWindowMinutes); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowHours); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowDays); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtDuplicateDetectionHistoryTimeWindowHours); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtDuplicateDetectionHistoryTimeWindowDays); + this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.tsDuplicateDetectionHistoryTimeWindow); this.grouperDuplicateDetectionHistoryTimeWindow.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperDuplicateDetectionHistoryTimeWindow.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.grouperDuplicateDetectionHistoryTimeWindow.ForeColor = System.Drawing.Color.White; @@ -1146,100 +810,13 @@ private void InitializeComponent() this.grouperDuplicateDetectionHistoryTimeWindow.Size = new System.Drawing.Size(296, 80); this.grouperDuplicateDetectionHistoryTimeWindow.TabIndex = 3; // - // lblDuplicateDetectionHistoryTimeWindowMilliseconds - // - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.Location = new System.Drawing.Point(240, 28); - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.Name = "lblDuplicateDetectionHistoryTimeWindowMilliseconds"; - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.Size = new System.Drawing.Size(49, 13); - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.TabIndex = 25; - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.Text = "Millisecs:"; - // - // txtDuplicateDetectionHistoryTimeWindowMilliseconds - // - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds.BackColor = System.Drawing.SystemColors.Window; - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds.Location = new System.Drawing.Point(240, 44); - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds.Name = "txtDuplicateDetectionHistoryTimeWindowMilliseconds"; - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds.Size = new System.Drawing.Size(40, 20); - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds.TabIndex = 4; - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDuplicateDetectionHistoryTimeWindowSeconds - // - this.lblDuplicateDetectionHistoryTimeWindowSeconds.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowSeconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowSeconds.Location = new System.Drawing.Point(184, 28); - this.lblDuplicateDetectionHistoryTimeWindowSeconds.Name = "lblDuplicateDetectionHistoryTimeWindowSeconds"; - this.lblDuplicateDetectionHistoryTimeWindowSeconds.Size = new System.Drawing.Size(52, 13); - this.lblDuplicateDetectionHistoryTimeWindowSeconds.TabIndex = 24; - this.lblDuplicateDetectionHistoryTimeWindowSeconds.Text = "Seconds:"; - // - // txtDuplicateDetectionHistoryTimeWindowSeconds - // - this.txtDuplicateDetectionHistoryTimeWindowSeconds.BackColor = System.Drawing.SystemColors.Window; - this.txtDuplicateDetectionHistoryTimeWindowSeconds.Location = new System.Drawing.Point(184, 44); - this.txtDuplicateDetectionHistoryTimeWindowSeconds.Name = "txtDuplicateDetectionHistoryTimeWindowSeconds"; - this.txtDuplicateDetectionHistoryTimeWindowSeconds.Size = new System.Drawing.Size(40, 20); - this.txtDuplicateDetectionHistoryTimeWindowSeconds.TabIndex = 3; - this.txtDuplicateDetectionHistoryTimeWindowSeconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDuplicateDetectionHistoryTimeWindowMinutes - // - this.lblDuplicateDetectionHistoryTimeWindowMinutes.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowMinutes.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowMinutes.Location = new System.Drawing.Point(128, 28); - this.lblDuplicateDetectionHistoryTimeWindowMinutes.Name = "lblDuplicateDetectionHistoryTimeWindowMinutes"; - this.lblDuplicateDetectionHistoryTimeWindowMinutes.Size = new System.Drawing.Size(47, 13); - this.lblDuplicateDetectionHistoryTimeWindowMinutes.TabIndex = 23; - this.lblDuplicateDetectionHistoryTimeWindowMinutes.Text = "Minutes:"; - // - // txtDuplicateDetectionHistoryTimeWindowMinutes - // - this.txtDuplicateDetectionHistoryTimeWindowMinutes.BackColor = System.Drawing.SystemColors.Window; - this.txtDuplicateDetectionHistoryTimeWindowMinutes.Location = new System.Drawing.Point(128, 44); - this.txtDuplicateDetectionHistoryTimeWindowMinutes.Name = "txtDuplicateDetectionHistoryTimeWindowMinutes"; - this.txtDuplicateDetectionHistoryTimeWindowMinutes.Size = new System.Drawing.Size(40, 20); - this.txtDuplicateDetectionHistoryTimeWindowMinutes.TabIndex = 2; - this.txtDuplicateDetectionHistoryTimeWindowMinutes.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDuplicateDetectionHistoryTimeWindowHours - // - this.lblDuplicateDetectionHistoryTimeWindowHours.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowHours.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowHours.Location = new System.Drawing.Point(72, 28); - this.lblDuplicateDetectionHistoryTimeWindowHours.Name = "lblDuplicateDetectionHistoryTimeWindowHours"; - this.lblDuplicateDetectionHistoryTimeWindowHours.Size = new System.Drawing.Size(38, 13); - this.lblDuplicateDetectionHistoryTimeWindowHours.TabIndex = 22; - this.lblDuplicateDetectionHistoryTimeWindowHours.Text = "Hours:"; - // - // lblDuplicateDetectionHistoryTimeWindowDays - // - this.lblDuplicateDetectionHistoryTimeWindowDays.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowDays.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowDays.Location = new System.Drawing.Point(16, 28); - this.lblDuplicateDetectionHistoryTimeWindowDays.Name = "lblDuplicateDetectionHistoryTimeWindowDays"; - this.lblDuplicateDetectionHistoryTimeWindowDays.Size = new System.Drawing.Size(34, 13); - this.lblDuplicateDetectionHistoryTimeWindowDays.TabIndex = 21; - this.lblDuplicateDetectionHistoryTimeWindowDays.Text = "Days:"; - // - // txtDuplicateDetectionHistoryTimeWindowHours - // - this.txtDuplicateDetectionHistoryTimeWindowHours.BackColor = System.Drawing.SystemColors.Window; - this.txtDuplicateDetectionHistoryTimeWindowHours.Location = new System.Drawing.Point(72, 44); - this.txtDuplicateDetectionHistoryTimeWindowHours.Name = "txtDuplicateDetectionHistoryTimeWindowHours"; - this.txtDuplicateDetectionHistoryTimeWindowHours.Size = new System.Drawing.Size(40, 20); - this.txtDuplicateDetectionHistoryTimeWindowHours.TabIndex = 1; - this.txtDuplicateDetectionHistoryTimeWindowHours.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // txtDuplicateDetectionHistoryTimeWindowDays - // - this.txtDuplicateDetectionHistoryTimeWindowDays.BackColor = System.Drawing.SystemColors.Window; - this.txtDuplicateDetectionHistoryTimeWindowDays.Location = new System.Drawing.Point(16, 44); - this.txtDuplicateDetectionHistoryTimeWindowDays.Name = "txtDuplicateDetectionHistoryTimeWindowDays"; - this.txtDuplicateDetectionHistoryTimeWindowDays.Size = new System.Drawing.Size(40, 20); - this.txtDuplicateDetectionHistoryTimeWindowDays.TabIndex = 0; - this.txtDuplicateDetectionHistoryTimeWindowDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); + // tsDuplicateDetectionHistoryTimeWindow + // + this.tsDuplicateDetectionHistoryTimeWindow.Location = new System.Drawing.Point(13, 25); + this.tsDuplicateDetectionHistoryTimeWindow.Name = "tsDuplicateDetectionHistoryTimeWindow"; + this.tsDuplicateDetectionHistoryTimeWindow.Size = new System.Drawing.Size(273, 42); + this.tsDuplicateDetectionHistoryTimeWindow.TabIndex = 29; + this.tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue = null; // // grouperPath // @@ -1619,7 +1196,7 @@ private void InitializeComponent() this.grouperMessageCustomProperties.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.grouperMessageCustomProperties.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperMessageCustomProperties.BorderThickness = 1F; - this.grouperMessageCustomProperties.Controls.Add(this.messagePropertyListView); + this.grouperMessageCustomProperties.Controls.Add(this.messageCustomPropertyGrid); this.grouperMessageCustomProperties.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperMessageCustomProperties.Dock = System.Windows.Forms.DockStyle.Fill; this.grouperMessageCustomProperties.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); @@ -1638,36 +1215,6 @@ private void InitializeComponent() this.grouperMessageCustomProperties.TabIndex = 27; this.grouperMessageCustomProperties.CustomPaint += new System.Action(this.grouperMessageCustomProperties_CustomPaint); // - // messagePropertyListView - // - this.messagePropertyListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.messagePropertyListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader1, - this.columnHeader2}); - this.messagePropertyListView.Location = new System.Drawing.Point(16, 32); - this.messagePropertyListView.Name = "messagePropertyListView"; - this.messagePropertyListView.OwnerDraw = true; - this.messagePropertyListView.Size = new System.Drawing.Size(282, 164); - this.messagePropertyListView.TabIndex = 0; - this.messagePropertyListView.UseCompatibleStateImageBehavior = false; - this.messagePropertyListView.View = System.Windows.Forms.View.Details; - this.messagePropertyListView.DrawColumnHeader += new System.Windows.Forms.DrawListViewColumnHeaderEventHandler(this.listView_DrawColumnHeader); - this.messagePropertyListView.DrawItem += new System.Windows.Forms.DrawListViewItemEventHandler(this.listView_DrawItem); - this.messagePropertyListView.DrawSubItem += new System.Windows.Forms.DrawListViewSubItemEventHandler(this.listView_DrawSubItem); - this.messagePropertyListView.Resize += new System.EventHandler(this.listView_Resize); - // - // columnHeader1 - // - this.columnHeader1.Text = "Name"; - this.columnHeader1.Width = 113; - // - // columnHeader2 - // - this.columnHeader2.Text = "Value"; - this.columnHeader2.Width = 115; - // // tabPageDeadletter // this.tabPageDeadletter.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); @@ -1921,7 +1468,7 @@ private void InitializeComponent() this.deadletterPropertyGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.deadletterPropertyGrid.Location = new System.Drawing.Point(16, 32); this.deadletterPropertyGrid.Name = "deadletterPropertyGrid"; - this.deadletterPropertyGrid.Size = new System.Drawing.Size(281, 384); + this.deadletterPropertyGrid.Size = new System.Drawing.Size(281, 163); this.deadletterPropertyGrid.TabIndex = 1; this.deadletterPropertyGrid.ToolbarVisible = false; // @@ -1932,7 +1479,7 @@ private void InitializeComponent() this.grouperDeadletterCustomProperties.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.grouperDeadletterCustomProperties.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperDeadletterCustomProperties.BorderThickness = 1F; - this.grouperDeadletterCustomProperties.Controls.Add(this.deadletterPropertyListView); + this.grouperDeadletterCustomProperties.Controls.Add(this.deadletterCustomPropertyGrid); this.grouperDeadletterCustomProperties.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperDeadletterCustomProperties.Dock = System.Windows.Forms.DockStyle.Fill; this.grouperDeadletterCustomProperties.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); @@ -1951,36 +1498,6 @@ private void InitializeComponent() this.grouperDeadletterCustomProperties.TabIndex = 27; this.grouperDeadletterCustomProperties.CustomPaint += new System.Action(this.grouperDeadletterCustomProperties_CustomPaint); // - // deadletterPropertyListView - // - this.deadletterPropertyListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.deadletterPropertyListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader3, - this.columnHeader4}); - this.deadletterPropertyListView.Location = new System.Drawing.Point(16, 32); - this.deadletterPropertyListView.Name = "deadletterPropertyListView"; - this.deadletterPropertyListView.OwnerDraw = true; - this.deadletterPropertyListView.Size = new System.Drawing.Size(282, 164); - this.deadletterPropertyListView.TabIndex = 0; - this.deadletterPropertyListView.UseCompatibleStateImageBehavior = false; - this.deadletterPropertyListView.View = System.Windows.Forms.View.Details; - this.deadletterPropertyListView.DrawColumnHeader += new System.Windows.Forms.DrawListViewColumnHeaderEventHandler(this.listView_DrawColumnHeader); - this.deadletterPropertyListView.DrawItem += new System.Windows.Forms.DrawListViewItemEventHandler(this.listView_DrawItem); - this.deadletterPropertyListView.DrawSubItem += new System.Windows.Forms.DrawListViewSubItemEventHandler(this.listView_DrawSubItem); - this.deadletterPropertyListView.Resize += new System.EventHandler(this.listView_Resize); - // - // columnHeader3 - // - this.columnHeader3.Text = "Name"; - this.columnHeader3.Width = 113; - // - // columnHeader4 - // - this.columnHeader4.Text = "Value"; - this.columnHeader4.Width = 115; - // // tabPageTransferDeadletter // this.tabPageTransferDeadletter.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); @@ -2143,7 +1660,7 @@ private void InitializeComponent() '\"', '\'', '\''}; - this.txtTransferDeadletterText.AutoScrollMinSize = new System.Drawing.Size(2, 14); + this.txtTransferDeadletterText.AutoScrollMinSize = new System.Drawing.Size(27, 14); this.txtTransferDeadletterText.BackBrush = null; this.txtTransferDeadletterText.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtTransferDeadletterText.CharHeight = 14; @@ -2228,7 +1745,7 @@ private void InitializeComponent() this.grouperTransferDeadletterCustomProperties.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.grouperTransferDeadletterCustomProperties.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperTransferDeadletterCustomProperties.BorderThickness = 1F; - this.grouperTransferDeadletterCustomProperties.Controls.Add(this.transferDeadletterPropertyListView); + this.grouperTransferDeadletterCustomProperties.Controls.Add(this.transferDeadletterCustomPropertyGrid); this.grouperTransferDeadletterCustomProperties.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperTransferDeadletterCustomProperties.Dock = System.Windows.Forms.DockStyle.Fill; this.grouperTransferDeadletterCustomProperties.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); @@ -2247,36 +1764,6 @@ private void InitializeComponent() this.grouperTransferDeadletterCustomProperties.TabIndex = 27; this.grouperTransferDeadletterCustomProperties.CustomPaint += new System.Action(this.grouperDeadletterCustomProperties_CustomPaint); // - // transferDeadletterPropertyListView - // - this.transferDeadletterPropertyListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.transferDeadletterPropertyListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader5, - this.columnHeader6}); - this.transferDeadletterPropertyListView.Location = new System.Drawing.Point(16, 32); - this.transferDeadletterPropertyListView.Name = "transferDeadletterPropertyListView"; - this.transferDeadletterPropertyListView.OwnerDraw = true; - this.transferDeadletterPropertyListView.Size = new System.Drawing.Size(282, 164); - this.transferDeadletterPropertyListView.TabIndex = 0; - this.transferDeadletterPropertyListView.UseCompatibleStateImageBehavior = false; - this.transferDeadletterPropertyListView.View = System.Windows.Forms.View.Details; - this.transferDeadletterPropertyListView.DrawColumnHeader += new System.Windows.Forms.DrawListViewColumnHeaderEventHandler(this.listView_DrawColumnHeader); - this.transferDeadletterPropertyListView.DrawItem += new System.Windows.Forms.DrawListViewItemEventHandler(this.listView_DrawItem); - this.transferDeadletterPropertyListView.DrawSubItem += new System.Windows.Forms.DrawListViewSubItemEventHandler(this.listView_DrawSubItem); - this.transferDeadletterPropertyListView.Resize += new System.EventHandler(this.listView_Resize); - // - // columnHeader5 - // - this.columnHeader5.Text = "Name"; - this.columnHeader5.Width = 113; - // - // columnHeader6 - // - this.columnHeader6.Text = "Value"; - this.columnHeader6.Width = 115; - // // tabPageSessions // this.tabPageSessions.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); @@ -2590,7 +2077,7 @@ private void InitializeComponent() this.deleteSelectedMessageToolStripMenuItem, this.deleteSelectedMessagesToolStripMenuItem}); this.deadletterContextMenuStrip.Name = "registrationContextMenuStrip"; - this.deadletterContextMenuStrip.Size = new System.Drawing.Size(306, 208); + this.deadletterContextMenuStrip.Size = new System.Drawing.Size(306, 186); // // repairAndResubmitDeadletterToolStripMenuItem // @@ -2769,6 +2256,51 @@ private void InitializeComponent() this.saveSelectedTransferDeadletteredMessagesBodyAsFileToolStripMenuItem.Text = "Save Selected Messages Text as File"; this.saveSelectedTransferDeadletteredMessagesBodyAsFileToolStripMenuItem.Click += new System.EventHandler(this.saveSelectedTransferDeadletteredMessagesBodyAsFileToolStripMenuItem_Click); // + // messageCustomPropertyGrid + // + this.messageCustomPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.messageCustomPropertyGrid.BackColor = System.Drawing.SystemColors.Window; + this.messageCustomPropertyGrid.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText; + this.messageCustomPropertyGrid.HelpVisible = false; + this.messageCustomPropertyGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.messageCustomPropertyGrid.Location = new System.Drawing.Point(16, 32); + this.messageCustomPropertyGrid.Name = "messageCustomPropertyGrid"; + this.messageCustomPropertyGrid.Size = new System.Drawing.Size(281, 164); + this.messageCustomPropertyGrid.TabIndex = 1; + this.messageCustomPropertyGrid.ToolbarVisible = false; + // + // deadletterCustomPropertyGrid + // + this.deadletterCustomPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.deadletterCustomPropertyGrid.BackColor = System.Drawing.SystemColors.Window; + this.deadletterCustomPropertyGrid.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText; + this.deadletterCustomPropertyGrid.HelpVisible = false; + this.deadletterCustomPropertyGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.deadletterCustomPropertyGrid.Location = new System.Drawing.Point(16, 32); + this.deadletterCustomPropertyGrid.Name = "deadletterCustomPropertyGrid"; + this.deadletterCustomPropertyGrid.Size = new System.Drawing.Size(281, 164); + this.deadletterCustomPropertyGrid.TabIndex = 2; + this.deadletterCustomPropertyGrid.ToolbarVisible = false; + // + // transferDeadletterCustomPropertyGrid + // + this.transferDeadletterCustomPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.transferDeadletterCustomPropertyGrid.BackColor = System.Drawing.SystemColors.Window; + this.transferDeadletterCustomPropertyGrid.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText; + this.transferDeadletterCustomPropertyGrid.HelpVisible = false; + this.transferDeadletterCustomPropertyGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.transferDeadletterCustomPropertyGrid.Location = new System.Drawing.Point(16, 32); + this.transferDeadletterCustomPropertyGrid.Name = "transferDeadletterCustomPropertyGrid"; + this.transferDeadletterCustomPropertyGrid.Size = new System.Drawing.Size(281, 164); + this.transferDeadletterCustomPropertyGrid.TabIndex = 3; + this.transferDeadletterCustomPropertyGrid.ToolbarVisible = false; + // // HandleQueueControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -2790,17 +2322,13 @@ private void InitializeComponent() this.mainTabControl.ResumeLayout(false); this.tabPageDescription.ResumeLayout(false); this.grouperAutoDeleteOnIdle.ResumeLayout(false); - this.grouperAutoDeleteOnIdle.PerformLayout(); this.grouperQueueInformation.ResumeLayout(false); this.groupergrouperDefaultMessageTimeToLive.ResumeLayout(false); - this.groupergrouperDefaultMessageTimeToLive.PerformLayout(); this.grouperQueueSettings.ResumeLayout(false); this.grouperQueueProperties.ResumeLayout(false); this.grouperQueueProperties.PerformLayout(); this.grouperLockDuration.ResumeLayout(false); - this.grouperLockDuration.PerformLayout(); this.grouperDuplicateDetectionHistoryTimeWindow.ResumeLayout(false); - this.grouperDuplicateDetectionHistoryTimeWindow.PerformLayout(); this.grouperPath.ResumeLayout(false); this.grouperPath.PerformLayout(); this.tabPageAuthorization.ResumeLayout(false); @@ -2905,16 +2433,6 @@ private void InitializeComponent() private System.Windows.Forms.TabPage tabPageDescription; private System.Windows.Forms.TabPage tabPageMessages; private Grouper grouperAutoDeleteOnIdle; - private System.Windows.Forms.Label lblAutoDeleteOnIdleMilliseconds; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleMilliseconds; - private System.Windows.Forms.Label lblAutoDeleteOnIdleSeconds; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleSeconds; - private System.Windows.Forms.Label lblAutoDeleteOnIdleMinutes; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleMinutes; - private System.Windows.Forms.Label lblAutoDeleteOnIdleHours; - private System.Windows.Forms.Label lblAutoDeleteOnIdleDays; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleHours; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleDays; private Grouper grouperQueueInformation; private System.Windows.Forms.ListView propertyListView; private System.Windows.Forms.ColumnHeader nameColumnHeader; @@ -2932,40 +2450,10 @@ private void InitializeComponent() private System.Windows.Forms.Label lblForwardTo; private System.Windows.Forms.TextBox txtForwardTo; private System.Windows.Forms.Label lblMaxDeliveryCount; - private System.Windows.Forms.TextBox txtMaxDeliveryCount; + private ServiceBusExplorer.Controls.NumericTextBox txtMaxDeliveryCount; private Grouper grouperLockDuration; - private System.Windows.Forms.Label lblLockDurationMilliseconds; - private System.Windows.Forms.TextBox txtLockDurationMilliseconds; - private System.Windows.Forms.Label lblLockDurationSeconds; - private System.Windows.Forms.TextBox txtLockDurationSeconds; - private System.Windows.Forms.Label lblLockDurationMinutes; - private System.Windows.Forms.TextBox txtLockDurationMinutes; - private System.Windows.Forms.Label lblLockDurationHours; - private System.Windows.Forms.Label lblLockDurationDays; - private System.Windows.Forms.TextBox txtLockDurationHours; - private System.Windows.Forms.TextBox txtLockDurationDays; private Grouper groupergrouperDefaultMessageTimeToLive; - private System.Windows.Forms.Label lblDefaultMessageTimeToLiveMilliseconds; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveMilliseconds; - private System.Windows.Forms.Label lblDefaultMessageTimeToLiveSeconds; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveSeconds; - private System.Windows.Forms.Label lblDefaultMessageTimeToLiveMinutes; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveMinutes; - private System.Windows.Forms.Label lbllblDefaultMessageTimeToLiveHours; - private System.Windows.Forms.Label lblDefaultMessageTimeToLiveDays; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveHours; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveDays; private Grouper grouperDuplicateDetectionHistoryTimeWindow; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowMilliseconds; - private System.Windows.Forms.TextBox txtDuplicateDetectionHistoryTimeWindowMilliseconds; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowSeconds; - private System.Windows.Forms.TextBox txtDuplicateDetectionHistoryTimeWindowSeconds; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowMinutes; - private System.Windows.Forms.TextBox txtDuplicateDetectionHistoryTimeWindowMinutes; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowHours; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowDays; - private System.Windows.Forms.TextBox txtDuplicateDetectionHistoryTimeWindowHours; - private System.Windows.Forms.TextBox txtDuplicateDetectionHistoryTimeWindowDays; private Grouper grouperPath; private System.Windows.Forms.Label lblRelativeURI; private System.Windows.Forms.TextBox txtPath; @@ -3041,32 +2529,30 @@ private void InitializeComponent() private Grouper grouperMessageSystemProperties; private System.Windows.Forms.PropertyGrid messagePropertyGrid; private Grouper grouperMessageCustomProperties; - private System.Windows.Forms.ListView messagePropertyListView; - private System.Windows.Forms.ColumnHeader columnHeader1; - private System.Windows.Forms.ColumnHeader columnHeader2; private System.Windows.Forms.PropertyGrid deadletterPropertyGrid; private System.Windows.Forms.SplitContainer deadletterPropertiesSplitContainer; private Grouper grouperDeadletterSystemProperties; private Grouper grouperDeadletterText; private FastColoredTextBoxNS.FastColoredTextBox txtDeadletterText; private Grouper grouperDeadletterCustomProperties; - private System.Windows.Forms.ListView deadletterPropertyListView; - private System.Windows.Forms.ColumnHeader columnHeader3; - private System.Windows.Forms.ColumnHeader columnHeader4; private System.Windows.Forms.SplitContainer transferDeadletterPropertiesSplitContainer; private Grouper grouperTransferDeadletterSystemProperties; private System.Windows.Forms.PropertyGrid transferDeadletterPropertyGrid; private Grouper grouperTransferDeadletterText; private FastColoredTextBoxNS.FastColoredTextBox txtTransferDeadletterText; private Grouper grouperTransferDeadletterCustomProperties; - private System.Windows.Forms.ListView transferDeadletterPropertyListView; - private System.Windows.Forms.ColumnHeader columnHeader5; - private System.Windows.Forms.ColumnHeader columnHeader6; private System.Windows.Forms.ToolStripMenuItem saveSelectedMessageBodyAsFileToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem saveSelectedMessagesBodyAsFileToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem saveSelectedDeadletteredMessageBodyAsFileToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem saveSelectedDeadletteredMessagesBodyAsFileToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem saveSelectedTransferDeadletteredMessageBodyAsFileToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem saveSelectedTransferDeadletteredMessagesBodyAsFileToolStripMenuItem; + private TimeSpanControl tsAutoDeleteOnIdle; + private TimeSpanControl tsDefaultMessageTimeToLive; + private TimeSpanControl tsLockDuration; + private TimeSpanControl tsDuplicateDetectionHistoryTimeWindow; + private System.Windows.Forms.PropertyGrid messageCustomPropertyGrid; + private System.Windows.Forms.PropertyGrid deadletterCustomPropertyGrid; + private System.Windows.Forms.PropertyGrid transferDeadletterCustomPropertyGrid; } } diff --git a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs index 2570d83f..0c701b32 100644 --- a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs @@ -100,66 +100,11 @@ public partial class HandleQueueControl : UserControl private const string PathCannotBeNull = "The Path field cannot be null."; private const string MaxDeliveryCountMustBeANumber = "The MaxDeliveryCount field must be a number."; - private const string DefaultMessageTimeToLiveDaysMustBeANumber = - "The Days value of the DefaultMessageTimeToLive field must be a number."; - - private const string DefaultMessageTimeToLiveHoursMustBeANumber = - "The Hours value of the DefaultMessageTimeToLive field must be a number."; - - private const string DefaultMessageTimeToLiveMinutesMustBeANumber = - "The Minutes value of the DefaultMessageTimeToLive field must be a number."; - - private const string DefaultMessageTimeToLiveSecondsMustBeANumber = - "The Seconds value of the DefaultMessageTimeToLive field must be a number."; - - private const string DefaultMessageTimeToLiveMillisecondsMustBeANumber = - "The Milliseconds value of the DefaultMessageTimeToLive field must be a number."; - - private const string DuplicateDetectionHistoryTimeWindowDaysMustBeANumber = - "The Days value of the DuplicateDetectionHistoryTimeWindow field must be a number."; - - private const string DuplicateDetectionHistoryTimeWindowHoursMustBeANumber = - "The Hours value of the DuplicateDetectionHistoryTimeWindow field must be a number."; - - private const string DuplicateDetectionHistoryTimeWindowMinutesMustBeANumber = - "The Minutes value of the DuplicateDetectionHistoryTimeWindow field must be a number."; - - private const string DuplicateDetectionHistoryTimeWindowSecondsMustBeANumber = - "The Seconds value of the DuplicateDetectionHistoryTimeWindow field must be a number."; - - private const string DuplicateDetectionHistoryTimeWindowMillisecondsMustBeANumber = - "The Milliseconds value of the DuplicateDetectionHistoryTimeWindow field must be a number."; - - private const string LockDurationDaysMustBeANumber = - "The Days value of the LockDuration field must be a number."; - - private const string LockDurationHoursMustBeANumber = - "The Hours value of the LockDuration field must be a number."; - - private const string LockDurationMinutesMustBeANumber = - "The Minutes value of the LockDuration field must be a number."; - - private const string LockDurationSecondsMustBeANumber = - "The Seconds value of the LockDuration field must be a number."; - - private const string LockDurationMillisecondsMustBeANumber = - "The Milliseconds value of the LockDuration field must be a number."; - - private const string AutoDeleteOnIdleDaysMustBeANumber = - "The Days value of the AutoDeleteOnIdle field must be a number."; - - private const string AutoDeleteOnIdleHoursMustBeANumber = - "The Hours value of the AutoDeleteOnIdle field must be a number."; - - private const string AutoDeleteOnIdleMinutesMustBeANumber = - "The Minutes value of the AutoDeleteOnIdle field must be a number."; - - private const string AutoDeleteOnIdleSecondsMustBeANumber = - "The Seconds value of the AutoDeleteOnIdle field must be a number."; - - private const string AutoDeleteOnIdleMillisecondsMustBeANumber = - "The Milliseconds value of the AutoDeleteOnIdle field must be a number."; - + private const string DefaultMessageTimeToLive = "DefaultMessageTimeToLive"; + private const string DuplicateDetectionHistoryTimeWindow = "DuplicateDetectionHistoryTimeWindow"; + private const string LockDuration = "LockDuration"; + private const string AutoDeleteOnIdle = "AutoDeleteOnIdle"; + private const string CannotForwardToItself = "The value of the ForwardTo property of the current queue cannot be set to itself."; @@ -361,7 +306,7 @@ public void GetMessages() if (receiveModeForm.ShowDialog() == DialogResult.OK) { txtMessageText.Text = string.Empty; - messagePropertyListView.Items.Clear(); + messageCustomPropertyGrid.SelectedObject = null; messagePropertyGrid.SelectedObject = null; var messageInspector = !string.IsNullOrEmpty(receiveModeForm.Inspector) && serviceBusHelper.BrokeredMessageInspectors.ContainsKey( @@ -460,7 +405,7 @@ public void GetDeadletterMessages() return; } txtDeadletterText.Text = string.Empty; - deadletterPropertyListView.Items.Clear(); + deadletterCustomPropertyGrid.SelectedObject = null; deadletterPropertyGrid.SelectedObject = null; var messageInspector = !string.IsNullOrEmpty(receiveModeForm.Inspector) && serviceBusHelper.BrokeredMessageInspectors.ContainsKey(receiveModeForm.Inspector) ? Activator.CreateInstance(serviceBusHelper.BrokeredMessageInspectors[receiveModeForm.Inspector]) as IBrokeredMessageInspector @@ -485,7 +430,7 @@ public void GetTransferDeadletterMessages() return; } txtTransferDeadletterText.Text = string.Empty; - transferDeadletterPropertyListView.Items.Clear(); + transferDeadletterCustomPropertyGrid.SelectedObject = null; transferDeadletterPropertyGrid.SelectedObject = null; var messageInspector = !string.IsNullOrEmpty(receiveModeForm.Inspector) && serviceBusHelper.BrokeredMessageInspectors.ContainsKey(receiveModeForm.Inspector) ? Activator.CreateInstance(serviceBusHelper.BrokeredMessageInspectors[receiveModeForm.Inspector]) as IBrokeredMessageInspector @@ -1043,31 +988,10 @@ private void InitializeControls() toolTip.SetToolTip(txtForwardTo, ForwardToTooltip); toolTip.SetToolTip(txtForwardDeadLetteredMessagesTo, ForwardDeadLetteredMessagesToTooltip); toolTip.SetToolTip(trackBarMaxQueueSize, MaxQueueSizeTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveDays, DefaultMessageTimeToLiveTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveHours, DefaultMessageTimeToLiveTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveMinutes, DefaultMessageTimeToLiveTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveSeconds, DefaultMessageTimeToLiveTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveMilliseconds, DefaultMessageTimeToLiveTooltip); - toolTip.SetToolTip(txtDuplicateDetectionHistoryTimeWindowDays, - DuplicateDetectionHistoryTimeWindowTooltip); - toolTip.SetToolTip(txtDuplicateDetectionHistoryTimeWindowHours, - DuplicateDetectionHistoryTimeWindowTooltip); - toolTip.SetToolTip(txtDuplicateDetectionHistoryTimeWindowMinutes, - DuplicateDetectionHistoryTimeWindowTooltip); - toolTip.SetToolTip(txtDuplicateDetectionHistoryTimeWindowSeconds, - DuplicateDetectionHistoryTimeWindowTooltip); - toolTip.SetToolTip(txtDuplicateDetectionHistoryTimeWindowMilliseconds, - DuplicateDetectionHistoryTimeWindowTooltip); - toolTip.SetToolTip(txtLockDurationDays, LockDurationTooltip); - toolTip.SetToolTip(txtLockDurationHours, LockDurationTooltip); - toolTip.SetToolTip(txtLockDurationMinutes, LockDurationTooltip); - toolTip.SetToolTip(txtLockDurationSeconds, LockDurationTooltip); - toolTip.SetToolTip(txtLockDurationMilliseconds, LockDurationTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleDays, AutoDeleteOnIdleTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleHours, AutoDeleteOnIdleTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleMinutes, AutoDeleteOnIdleTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleSeconds, AutoDeleteOnIdleTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleMilliseconds, AutoDeleteOnIdleTooltip); + toolTip.SetToolTip(tsDefaultMessageTimeToLive, DefaultMessageTimeToLiveTooltip); + toolTip.SetToolTip(tsDuplicateDetectionHistoryTimeWindow, DuplicateDetectionHistoryTimeWindowTooltip); + toolTip.SetToolTip(tsLockDuration, LockDurationTooltip); + toolTip.SetToolTip(tsAutoDeleteOnIdle, AutoDeleteOnIdleTooltip); toolTip.SetToolTip(txtMaxDeliveryCount, MaxDeliveryCountTooltip); } else @@ -1253,47 +1177,16 @@ private void InitializeData() txtMaxDeliveryCount.Text = queueDescription.MaxDeliveryCount.ToString(CultureInfo.InvariantCulture); // DefaultMessageTimeToLive - txtDefaultMessageTimeToLiveDays.Text = - queueDescription.DefaultMessageTimeToLive.Days.ToString(CultureInfo.InvariantCulture); - txtDefaultMessageTimeToLiveHours.Text = - queueDescription.DefaultMessageTimeToLive.Hours.ToString(CultureInfo.InvariantCulture); - txtDefaultMessageTimeToLiveMinutes.Text = - queueDescription.DefaultMessageTimeToLive.Minutes.ToString(CultureInfo.InvariantCulture); - txtDefaultMessageTimeToLiveSeconds.Text = - queueDescription.DefaultMessageTimeToLive.Seconds.ToString(CultureInfo.InvariantCulture); - txtDefaultMessageTimeToLiveMilliseconds.Text = - queueDescription.DefaultMessageTimeToLive.Milliseconds.ToString(CultureInfo.InvariantCulture); + tsDefaultMessageTimeToLive.TimeSpanValue = queueDescription.DefaultMessageTimeToLive; // DuplicateDetectionHistoryTimeWindow - txtDuplicateDetectionHistoryTimeWindowDays.Text = - queueDescription.DuplicateDetectionHistoryTimeWindow.Days.ToString(CultureInfo.InvariantCulture); - txtDuplicateDetectionHistoryTimeWindowHours.Text = - queueDescription.DuplicateDetectionHistoryTimeWindow.Hours.ToString(CultureInfo.InvariantCulture); - txtDuplicateDetectionHistoryTimeWindowMinutes.Text = - queueDescription.DuplicateDetectionHistoryTimeWindow.Minutes.ToString(CultureInfo.InvariantCulture); - txtDuplicateDetectionHistoryTimeWindowSeconds.Text = - queueDescription.DuplicateDetectionHistoryTimeWindow.Seconds.ToString(CultureInfo.InvariantCulture); - txtDuplicateDetectionHistoryTimeWindowMilliseconds.Text = - queueDescription.DuplicateDetectionHistoryTimeWindow.Milliseconds.ToString(CultureInfo.InvariantCulture); + tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue = queueDescription.DuplicateDetectionHistoryTimeWindow; // LockDuration - txtLockDurationDays.Text = queueDescription.LockDuration.Days.ToString(CultureInfo.InvariantCulture); - txtLockDurationHours.Text = queueDescription.LockDuration.Hours.ToString(CultureInfo.InvariantCulture); - txtLockDurationMinutes.Text = queueDescription.LockDuration.Minutes.ToString(CultureInfo.InvariantCulture); - txtLockDurationSeconds.Text = queueDescription.LockDuration.Seconds.ToString(CultureInfo.InvariantCulture); - txtLockDurationMilliseconds.Text = - queueDescription.LockDuration.Milliseconds.ToString(CultureInfo.InvariantCulture); + tsLockDuration.TimeSpanValue = queueDescription.LockDuration; // AutoDeleteOnIdle - txtAutoDeleteOnIdleDays.Text = queueDescription.AutoDeleteOnIdle.Days.ToString(CultureInfo.InvariantCulture); - txtAutoDeleteOnIdleHours.Text = - queueDescription.AutoDeleteOnIdle.Hours.ToString(CultureInfo.InvariantCulture); - txtAutoDeleteOnIdleMinutes.Text = - queueDescription.AutoDeleteOnIdle.Minutes.ToString(CultureInfo.InvariantCulture); - txtAutoDeleteOnIdleSeconds.Text = - queueDescription.AutoDeleteOnIdle.Seconds.ToString(CultureInfo.InvariantCulture); - txtAutoDeleteOnIdleMilliseconds.Text = - queueDescription.AutoDeleteOnIdle.Milliseconds.ToString(CultureInfo.InvariantCulture); + tsAutoDeleteOnIdle.TimeSpanValue = queueDescription.AutoDeleteOnIdle; // EnableBatchedOperations checkedListBox.SetItemChecked(EnableBatchedOperationsIndex, @@ -2141,227 +2034,46 @@ private async void btnCreateDelete_Click(object sender, EventArgs e) } } - var days = 0; - var hours = 0; - var minutes = 0; - var seconds = 0; - var milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveDays.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveHours.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMinutes.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveSeconds.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMilliseconds.Text)) + if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveDays.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveDays.Text, out days)) - { - writeToLog(DefaultMessageTimeToLiveDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveHours.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveHours.Text, out hours)) - { - writeToLog(DefaultMessageTimeToLiveHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMinutes.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveMinutes.Text, out minutes)) - { - writeToLog(DefaultMessageTimeToLiveMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveSeconds.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveSeconds.Text, out seconds)) - { - writeToLog(DefaultMessageTimeToLiveSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMilliseconds.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveMilliseconds.Text, out milliseconds)) - { - writeToLog(DefaultMessageTimeToLiveMillisecondsMustBeANumber); - return; - } - } - description.DefaultMessageTimeToLive = new TimeSpan(days, hours, minutes, seconds, milliseconds); + description.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; } - - days = 0; - hours = 0; - minutes = 0; - seconds = 0; - milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowDays.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowHours.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMinutes.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowSeconds.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMilliseconds.Text)) + else { - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowDays.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowDays.Text, out days)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowHours.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowHours.Text, out hours)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMinutes.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowMinutes.Text, out minutes)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowSeconds.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowSeconds.Text, out seconds)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMilliseconds.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowMilliseconds.Text, out milliseconds)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowMillisecondsMustBeANumber); - return; - } - } - description.DuplicateDetectionHistoryTimeWindow = new TimeSpan(days, hours, minutes, seconds, - milliseconds); + writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); + return; } - days = 0; - hours = 0; - minutes = 0; - seconds = 0; - milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtLockDurationDays.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationHours.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationMinutes.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationSeconds.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationMilliseconds.Text)) + if (tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtLockDurationDays.Text)) - { - if (!int.TryParse(txtLockDurationDays.Text, out days)) - { - writeToLog(LockDurationDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationHours.Text)) - { - if (!int.TryParse(txtLockDurationHours.Text, out hours)) - { - writeToLog(LockDurationHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationMinutes.Text)) - { - if (!int.TryParse(txtLockDurationMinutes.Text, out minutes)) - { - writeToLog(LockDurationMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationSeconds.Text)) - { - if (!int.TryParse(txtLockDurationSeconds.Text, out seconds)) - { - writeToLog(LockDurationSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationMilliseconds.Text)) - { - if (!int.TryParse(txtLockDurationMilliseconds.Text, out milliseconds)) - { - writeToLog(LockDurationMillisecondsMustBeANumber); - return; - } - } - description.LockDuration = new TimeSpan(days, hours, minutes, seconds, milliseconds); + description.DuplicateDetectionHistoryTimeWindow = tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.Value; + } + else + { + writeToLog(tsDuplicateDetectionHistoryTimeWindow.GetErrorMessage(DuplicateDetectionHistoryTimeWindow)); + return; } - days = 0; - hours = 0; - minutes = 0; - seconds = 0; - milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleDays.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleHours.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMinutes.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleSeconds.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMilliseconds.Text)) + if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleDays.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleDays.Text, out days)) - { - writeToLog(AutoDeleteOnIdleDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleHours.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleHours.Text, out hours)) - { - writeToLog(AutoDeleteOnIdleHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMinutes.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleMinutes.Text, out minutes)) - { - writeToLog(AutoDeleteOnIdleMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleSeconds.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleSeconds.Text, out seconds)) - { - writeToLog(AutoDeleteOnIdleSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMilliseconds.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleMilliseconds.Text, out milliseconds)) - { - writeToLog(AutoDeleteOnIdleMillisecondsMustBeANumber); - return; - } - } - description.AutoDeleteOnIdle = new TimeSpan(days, hours, minutes, seconds, milliseconds); + description.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; + } + else + { + writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); + return; } + if (tsLockDuration.TimeSpanValue.HasValue) + { + description.LockDuration = tsLockDuration.TimeSpanValue.Value; + } + else + { + writeToLog(tsLockDuration.GetErrorMessage(LockDuration)); + return; + } + description.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); description.EnableDeadLetteringOnMessageExpiration = checkedListBox.GetItemChecked(EnableDeadLetteringOnMessageExpirationIndex); @@ -2530,233 +2242,44 @@ private void btnCancelUpdate_Click(object sender, EventArgs e) } } - var days = 0; - var hours = 0; - var minutes = 0; - var seconds = 0; - var milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveDays.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveHours.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMinutes.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveSeconds.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMilliseconds.Text)) + if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveDays.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveDays.Text, out days)) - { - writeToLog(DefaultMessageTimeToLiveDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveHours.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveHours.Text, out hours)) - { - writeToLog(DefaultMessageTimeToLiveHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMinutes.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveMinutes.Text, out minutes)) - { - writeToLog(DefaultMessageTimeToLiveMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveSeconds.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveSeconds.Text, out seconds)) - { - writeToLog(DefaultMessageTimeToLiveSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMilliseconds.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveMilliseconds.Text, out milliseconds)) - { - writeToLog(DefaultMessageTimeToLiveMillisecondsMustBeANumber); - return; - } - } - var timeSpan = new TimeSpan(days, hours, minutes, seconds, milliseconds); - if (!timeSpan.IsMaxValue()) - { - queueDescription.DefaultMessageTimeToLive = timeSpan; - } + queueDescription.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; + } + else + { + writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); + return; } - days = 0; - hours = 0; - minutes = 0; - seconds = 0; - milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowDays.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowHours.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMinutes.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowSeconds.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMilliseconds.Text)) + if (tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowDays.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowDays.Text, out days)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowHours.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowHours.Text, out hours)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMinutes.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowMinutes.Text, out minutes)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowSeconds.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowSeconds.Text, out seconds)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMilliseconds.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowMilliseconds.Text, out milliseconds)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowMillisecondsMustBeANumber); - return; - } - } - queueDescription.DuplicateDetectionHistoryTimeWindow = new TimeSpan(days, hours, minutes, - seconds, milliseconds); + queueDescription.DuplicateDetectionHistoryTimeWindow = tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.Value; + } + else + { + writeToLog(tsDuplicateDetectionHistoryTimeWindow.GetErrorMessage(DuplicateDetectionHistoryTimeWindow)); + return; } - days = 0; - hours = 0; - minutes = 0; - seconds = 0; - milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtLockDurationDays.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationHours.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationMinutes.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationSeconds.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationMilliseconds.Text)) + if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtLockDurationDays.Text)) - { - if (!int.TryParse(txtLockDurationDays.Text, out days)) - { - writeToLog(LockDurationDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationHours.Text)) - { - if (!int.TryParse(txtLockDurationHours.Text, out hours)) - { - writeToLog(LockDurationHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationMinutes.Text)) - { - if (!int.TryParse(txtLockDurationMinutes.Text, out minutes)) - { - writeToLog(LockDurationMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationSeconds.Text)) - { - if (!int.TryParse(txtLockDurationSeconds.Text, out seconds)) - { - writeToLog(LockDurationSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationMilliseconds.Text)) - { - if (!int.TryParse(txtLockDurationMilliseconds.Text, out milliseconds)) - { - writeToLog(LockDurationMillisecondsMustBeANumber); - return; - } - } - queueDescription.LockDuration = new TimeSpan(days, hours, minutes, seconds, milliseconds); + queueDescription.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; + } + else + { + writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); + return; } - days = 0; - hours = 0; - minutes = 0; - seconds = 0; - milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleDays.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleHours.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMinutes.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleSeconds.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMilliseconds.Text)) + if (tsLockDuration.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleDays.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleDays.Text, out days)) - { - writeToLog(AutoDeleteOnIdleDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleHours.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleHours.Text, out hours)) - { - writeToLog(AutoDeleteOnIdleHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMinutes.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleMinutes.Text, out minutes)) - { - writeToLog(AutoDeleteOnIdleMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleSeconds.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleSeconds.Text, out seconds)) - { - writeToLog(AutoDeleteOnIdleSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMilliseconds.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleMilliseconds.Text, out milliseconds)) - { - writeToLog(AutoDeleteOnIdleMillisecondsMustBeANumber); - return; - } - } - var timeSpan = new TimeSpan(days, hours, minutes, seconds, milliseconds); - if (!timeSpan.IsMaxValue()) - { - queueDescription.AutoDeleteOnIdle = timeSpan; - } + queueDescription.LockDuration = tsLockDuration.TimeSpanValue.Value; + } + else + { + writeToLog(tsLockDuration.GetErrorMessage(LockDuration)); + return; } queueDescription.EnableBatchedOperations = @@ -3287,9 +2810,7 @@ private void messagesDataGridView_RowEnter(object sender, DataGridViewCellEventA LanguageDetector.SetFormattedMessage(serviceBusHelper, brokeredMessage, txtMessageText); - var listViewItems = brokeredMessage.Properties.Select(p => new ListViewItem(new[] { p.Key, Convert.ToString(p.Value) })).ToArray(); - messagePropertyListView.Items.Clear(); - messagePropertyListView.Items.AddRange(listViewItems); + messageCustomPropertyGrid.SelectedObject = new DictionaryPropertyGridAdapter(brokeredMessage.Properties); messagePropertyGrid.SelectedObject = brokeredMessage; } // ReSharper disable once EmptyGeneralCatchClause @@ -3423,9 +2944,7 @@ private void deadletterDataGridView_RowEnter(object sender, DataGridViewCellEven LanguageDetector.SetFormattedMessage(serviceBusHelper, deadletterMessage, txtDeadletterText); - var listViewItems = deadletterMessage.Properties.Select(p => new ListViewItem(new[] { p.Key, Convert.ToString(p.Value) })).ToArray(); - deadletterPropertyListView.Items.Clear(); - deadletterPropertyListView.Items.AddRange(listViewItems); + deadletterCustomPropertyGrid.SelectedObject = new DictionaryPropertyGridAdapter(deadletterMessage.Properties); } private void transferDeadletterDataGridView_RowEnter(object sender, DataGridViewCellEventArgs e) @@ -3445,46 +2964,9 @@ private void transferDeadletterDataGridView_RowEnter(object sender, DataGridView LanguageDetector.SetFormattedMessage(serviceBusHelper, transferDeadletterMessage, txtTransferDeadletterText); - var listViewItems = transferDeadletterMessage.Properties.Select(p => new ListViewItem(new[] { p.Key, Convert.ToString(p.Value) })).ToArray(); - transferDeadletterPropertyListView.Items.Clear(); - transferDeadletterPropertyListView.Items.AddRange(listViewItems); + transferDeadletterCustomPropertyGrid.SelectedObject = new DictionaryPropertyGridAdapter(transferDeadletterMessage.Properties); } - - private void textBox_KeyPress(object sender, KeyPressEventArgs e) - { - OnKeyPress(e); - - var numberFormatInfo = CultureInfo.CurrentCulture.NumberFormat; - var decimalSeparator = numberFormatInfo.NumberDecimalSeparator; - var groupSeparator = numberFormatInfo.NumberGroupSeparator; - var negativeSign = numberFormatInfo.NegativeSign; - - var keyInput = e.KeyChar.ToString(CultureInfo.InvariantCulture); - - if (char.IsDigit(e.KeyChar)) - { - // Digits are OK - } - else if (keyInput.Equals(decimalSeparator) || keyInput.Equals(groupSeparator) || - keyInput.Equals(negativeSign)) - { - // Decimal separator is OK - } - else if (e.KeyChar == '\b') - { - // Backspace key is OK - } - else if (e.KeyChar == ' ') - { - - } - else - { - // Swallow this invalid key and beep - e.Handled = true; - } - } - + private void authorizationRulesDataGridView_Resize(object sender, EventArgs e) { try @@ -3688,9 +3170,9 @@ private void grouperMessageText_CustomPaint(PaintEventArgs obj) private void grouperMessageCustomProperties_CustomPaint(PaintEventArgs obj) { - messagePropertyListView.Size = new Size(grouperMessageCustomProperties.Size.Width - messagePropertyListView.Location.X * 2, - grouperMessageCustomProperties.Size.Height - messagePropertyListView.Location.Y - - messagePropertyListView.Location.X); + messageCustomPropertyGrid.Size = new Size(grouperMessageCustomProperties.Size.Width - messageCustomPropertyGrid.Location.X * 2, + grouperMessageCustomProperties.Size.Height - messageCustomPropertyGrid.Location.Y - + messageCustomPropertyGrid.Location.X); } private void grouperMessageSystemProperties_CustomPaint(PaintEventArgs obj) @@ -3707,10 +3189,10 @@ private void grouperDeadletterText_CustomPaint(PaintEventArgs obj) private void grouperDeadletterCustomProperties_CustomPaint(PaintEventArgs obj) { - deadletterPropertyListView.Size = - new Size(grouperDeadletterCustomProperties.Size.Width - deadletterPropertyListView.Location.X * 2, - grouperDeadletterCustomProperties.Size.Height - deadletterPropertyListView.Location.Y - - deadletterPropertyListView.Location.X); + deadletterCustomPropertyGrid.Size = + new Size(grouperDeadletterCustomProperties.Size.Width - deadletterCustomPropertyGrid.Location.X * 2, + grouperDeadletterCustomProperties.Size.Height - deadletterCustomPropertyGrid.Location.Y - + deadletterCustomPropertyGrid.Location.X); } private void grouperDeadletterSystemProperties_CustomPaint(PaintEventArgs obj) @@ -3730,10 +3212,10 @@ private void grouperTransferDeadletterText_CustomPaint(PaintEventArgs obj) private void grouperTransferDeadletterCustomProperties_CustomPaint(PaintEventArgs obj) { - transferDeadletterPropertyListView.Size = - new Size(grouperTransferDeadletterCustomProperties.Size.Width - transferDeadletterPropertyListView.Location.X * 2, - grouperTransferDeadletterCustomProperties.Size.Height - transferDeadletterPropertyListView.Location.Y - - transferDeadletterPropertyListView.Location.X); + transferDeadletterCustomPropertyGrid.Size = + new Size(grouperTransferDeadletterCustomProperties.Size.Width - transferDeadletterCustomPropertyGrid.Location.X * 2, + grouperTransferDeadletterCustomProperties.Size.Height - transferDeadletterCustomPropertyGrid.Location.Y - + transferDeadletterCustomPropertyGrid.Location.X); } private void grouperTransferDeadletterSystemProperties_CustomPaint(PaintEventArgs obj) @@ -4106,7 +3588,7 @@ private void FilterMessages() if (!bindingList.Any()) { txtMessageText.Text = string.Empty; - messagePropertyListView.Items.Clear(); + messageCustomPropertyGrid.SelectedObject = null; messagePropertyGrid.SelectedObject = null; } else @@ -4175,7 +3657,7 @@ private void FilterDeadletters() if (!bindingList.Any()) { txtDeadletterText.Text = string.Empty; - deadletterPropertyListView.Items.Clear(); + deadletterCustomPropertyGrid.SelectedObject = null; deadletterPropertyGrid.SelectedObject = null; } else diff --git a/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.Designer.cs b/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.Designer.cs index 1a90a493..95393e26 100644 --- a/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.Designer.cs +++ b/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.Designer.cs @@ -28,27 +28,9 @@ private void InitializeComponent() this.mainTabControl = new System.Windows.Forms.TabControl(); this.tabPageDescription = new System.Windows.Forms.TabPage(); this.grouperAutoDeleteOnIdle = new ServiceBusExplorer.Controls.Grouper(); - this.lblAutoDeleteOnIdleMilliseconds = new System.Windows.Forms.Label(); - this.txtAutoDeleteOnIdleMilliseconds = new System.Windows.Forms.TextBox(); - this.lblAutoDeleteOnIdleSeconds = new System.Windows.Forms.Label(); - this.txtAutoDeleteOnIdleSeconds = new System.Windows.Forms.TextBox(); - this.lblAutoDeleteOnIdleMinutes = new System.Windows.Forms.Label(); - this.txtAutoDeleteOnIdleMinutes = new System.Windows.Forms.TextBox(); - this.lblAutoDeleteOnIdleHours = new System.Windows.Forms.Label(); - this.lblAutoDeleteOnIdleDays = new System.Windows.Forms.Label(); - this.txtAutoDeleteOnIdleHours = new System.Windows.Forms.TextBox(); - this.txtAutoDeleteOnIdleDays = new System.Windows.Forms.TextBox(); + this.tsAutoDeleteOnIdle = new ServiceBusExplorer.Controls.TimeSpanControl(); this.groupergrouperDefaultMessageTimeToLive = new ServiceBusExplorer.Controls.Grouper(); - this.lblDefaultMessageTimeToLiveMilliseconds = new System.Windows.Forms.Label(); - this.txtDefaultMessageTimeToLiveMilliseconds = new System.Windows.Forms.TextBox(); - this.lblDefaultMessageTimeToLiveSeconds = new System.Windows.Forms.Label(); - this.txtDefaultMessageTimeToLiveSeconds = new System.Windows.Forms.TextBox(); - this.lblDefaultMessageTimeToLiveMinutes = new System.Windows.Forms.Label(); - this.txtDefaultMessageTimeToLiveMinutes = new System.Windows.Forms.TextBox(); - this.lbllblDefaultMessageTimeToLiveHours = new System.Windows.Forms.Label(); - this.lblDefaultMessageTimeToLiveDays = new System.Windows.Forms.Label(); - this.txtDefaultMessageTimeToLiveHours = new System.Windows.Forms.TextBox(); - this.txtDefaultMessageTimeToLiveDays = new System.Windows.Forms.TextBox(); + this.tsDefaultMessageTimeToLive = new ServiceBusExplorer.Controls.TimeSpanControl(); this.grouperName = new ServiceBusExplorer.Controls.Grouper(); this.lblRelativeURI = new System.Windows.Forms.Label(); this.txtName = new System.Windows.Forms.TextBox(); @@ -74,18 +56,9 @@ private void InitializeComponent() this.txtForwardTo = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.labelUserDescription = new System.Windows.Forms.Label(); - this.txtMaxDeliveryCount = new System.Windows.Forms.TextBox(); + this.txtMaxDeliveryCount = new ServiceBusExplorer.Controls.NumericTextBox(); this.grouperLockDuration = new ServiceBusExplorer.Controls.Grouper(); - this.lblLockDurationMilliseconds = new System.Windows.Forms.Label(); - this.txtLockDurationMilliseconds = new System.Windows.Forms.TextBox(); - this.lblLockDurationSeconds = new System.Windows.Forms.Label(); - this.txtLockDurationSeconds = new System.Windows.Forms.TextBox(); - this.lblLockDurationMinutes = new System.Windows.Forms.Label(); - this.txtLockDurationMinutes = new System.Windows.Forms.TextBox(); - this.lblLockDurationHours = new System.Windows.Forms.Label(); - this.lblLockDurationDays = new System.Windows.Forms.Label(); - this.txtLockDurationHours = new System.Windows.Forms.TextBox(); - this.txtLockDurationDays = new System.Windows.Forms.TextBox(); + this.tsLockDuration = new ServiceBusExplorer.Controls.TimeSpanControl(); this.grouperSubscriptionSettings = new ServiceBusExplorer.Controls.Grouper(); this.checkedListBox = new System.Windows.Forms.CheckedListBox(); this.tabPageMessages = new System.Windows.Forms.TabPage(); @@ -101,9 +74,6 @@ private void InitializeComponent() this.grouperMessageProperties = new ServiceBusExplorer.Controls.Grouper(); this.messagePropertyGrid = new System.Windows.Forms.PropertyGrid(); this.grouperMessageCustomProperties = new ServiceBusExplorer.Controls.Grouper(); - this.messagePropertyListView = new System.Windows.Forms.ListView(); - this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.tabPageDeadletter = new System.Windows.Forms.TabPage(); this.deadletterSplitContainer = new System.Windows.Forms.SplitContainer(); this.deadletterMainSplitContainer = new System.Windows.Forms.SplitContainer(); @@ -117,9 +87,6 @@ private void InitializeComponent() this.grouperDeadletterSystemProperties = new ServiceBusExplorer.Controls.Grouper(); this.deadletterPropertyGrid = new System.Windows.Forms.PropertyGrid(); this.grouperDeadletterCustomProperties = new ServiceBusExplorer.Controls.Grouper(); - this.deadletterPropertyListView = new System.Windows.Forms.ListView(); - this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.tabPageSessions = new System.Windows.Forms.TabPage(); this.sessionsSplitContainer = new System.Windows.Forms.SplitContainer(); this.sessionMainSplitContainer = new System.Windows.Forms.SplitContainer(); @@ -150,6 +117,8 @@ private void InitializeComponent() this.saveSelectedMessagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.btnPurgeMessages = new System.Windows.Forms.Button(); this.btnPurgeDeadletterQueueMessages = new System.Windows.Forms.Button(); + this.messageCustomPropertyGrid = new System.Windows.Forms.PropertyGrid(); + this.deadletterCustomPropertyGrid = new System.Windows.Forms.PropertyGrid(); this.mainTabControl.SuspendLayout(); this.tabPageDescription.SuspendLayout(); this.grouperAutoDeleteOnIdle.SuspendLayout(); @@ -391,16 +360,7 @@ private void InitializeComponent() this.grouperAutoDeleteOnIdle.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.grouperAutoDeleteOnIdle.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperAutoDeleteOnIdle.BorderThickness = 1F; - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleMilliseconds); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleMilliseconds); - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleSeconds); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleSeconds); - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleMinutes); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleMinutes); - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleHours); - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleDays); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleHours); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleDays); + this.grouperAutoDeleteOnIdle.Controls.Add(this.tsAutoDeleteOnIdle); this.grouperAutoDeleteOnIdle.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperAutoDeleteOnIdle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.grouperAutoDeleteOnIdle.ForeColor = System.Drawing.Color.White; @@ -417,100 +377,13 @@ private void InitializeComponent() this.grouperAutoDeleteOnIdle.Size = new System.Drawing.Size(296, 80); this.grouperAutoDeleteOnIdle.TabIndex = 1; // - // lblAutoDeleteOnIdleMilliseconds - // - this.lblAutoDeleteOnIdleMilliseconds.AutoSize = true; - this.lblAutoDeleteOnIdleMilliseconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleMilliseconds.Location = new System.Drawing.Point(240, 28); - this.lblAutoDeleteOnIdleMilliseconds.Name = "lblAutoDeleteOnIdleMilliseconds"; - this.lblAutoDeleteOnIdleMilliseconds.Size = new System.Drawing.Size(49, 13); - this.lblAutoDeleteOnIdleMilliseconds.TabIndex = 25; - this.lblAutoDeleteOnIdleMilliseconds.Text = "Millisecs:"; - // - // txtAutoDeleteOnIdleMilliseconds - // - this.txtAutoDeleteOnIdleMilliseconds.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleMilliseconds.Location = new System.Drawing.Point(240, 44); - this.txtAutoDeleteOnIdleMilliseconds.Name = "txtAutoDeleteOnIdleMilliseconds"; - this.txtAutoDeleteOnIdleMilliseconds.Size = new System.Drawing.Size(40, 20); - this.txtAutoDeleteOnIdleMilliseconds.TabIndex = 4; - this.txtAutoDeleteOnIdleMilliseconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblAutoDeleteOnIdleSeconds - // - this.lblAutoDeleteOnIdleSeconds.AutoSize = true; - this.lblAutoDeleteOnIdleSeconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleSeconds.Location = new System.Drawing.Point(184, 28); - this.lblAutoDeleteOnIdleSeconds.Name = "lblAutoDeleteOnIdleSeconds"; - this.lblAutoDeleteOnIdleSeconds.Size = new System.Drawing.Size(52, 13); - this.lblAutoDeleteOnIdleSeconds.TabIndex = 24; - this.lblAutoDeleteOnIdleSeconds.Text = "Seconds:"; - // - // txtAutoDeleteOnIdleSeconds - // - this.txtAutoDeleteOnIdleSeconds.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleSeconds.Location = new System.Drawing.Point(184, 44); - this.txtAutoDeleteOnIdleSeconds.Name = "txtAutoDeleteOnIdleSeconds"; - this.txtAutoDeleteOnIdleSeconds.Size = new System.Drawing.Size(40, 20); - this.txtAutoDeleteOnIdleSeconds.TabIndex = 3; - this.txtAutoDeleteOnIdleSeconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblAutoDeleteOnIdleMinutes - // - this.lblAutoDeleteOnIdleMinutes.AutoSize = true; - this.lblAutoDeleteOnIdleMinutes.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleMinutes.Location = new System.Drawing.Point(128, 28); - this.lblAutoDeleteOnIdleMinutes.Name = "lblAutoDeleteOnIdleMinutes"; - this.lblAutoDeleteOnIdleMinutes.Size = new System.Drawing.Size(47, 13); - this.lblAutoDeleteOnIdleMinutes.TabIndex = 23; - this.lblAutoDeleteOnIdleMinutes.Text = "Minutes:"; - // - // txtAutoDeleteOnIdleMinutes - // - this.txtAutoDeleteOnIdleMinutes.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleMinutes.Location = new System.Drawing.Point(128, 44); - this.txtAutoDeleteOnIdleMinutes.Name = "txtAutoDeleteOnIdleMinutes"; - this.txtAutoDeleteOnIdleMinutes.Size = new System.Drawing.Size(40, 20); - this.txtAutoDeleteOnIdleMinutes.TabIndex = 2; - this.txtAutoDeleteOnIdleMinutes.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblAutoDeleteOnIdleHours - // - this.lblAutoDeleteOnIdleHours.AutoSize = true; - this.lblAutoDeleteOnIdleHours.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleHours.Location = new System.Drawing.Point(72, 28); - this.lblAutoDeleteOnIdleHours.Name = "lblAutoDeleteOnIdleHours"; - this.lblAutoDeleteOnIdleHours.Size = new System.Drawing.Size(38, 13); - this.lblAutoDeleteOnIdleHours.TabIndex = 22; - this.lblAutoDeleteOnIdleHours.Text = "Hours:"; - // - // lblAutoDeleteOnIdleDays - // - this.lblAutoDeleteOnIdleDays.AutoSize = true; - this.lblAutoDeleteOnIdleDays.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleDays.Location = new System.Drawing.Point(16, 28); - this.lblAutoDeleteOnIdleDays.Name = "lblAutoDeleteOnIdleDays"; - this.lblAutoDeleteOnIdleDays.Size = new System.Drawing.Size(34, 13); - this.lblAutoDeleteOnIdleDays.TabIndex = 21; - this.lblAutoDeleteOnIdleDays.Text = "Days:"; - // - // txtAutoDeleteOnIdleHours - // - this.txtAutoDeleteOnIdleHours.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleHours.Location = new System.Drawing.Point(72, 44); - this.txtAutoDeleteOnIdleHours.Name = "txtAutoDeleteOnIdleHours"; - this.txtAutoDeleteOnIdleHours.Size = new System.Drawing.Size(40, 20); - this.txtAutoDeleteOnIdleHours.TabIndex = 1; - this.txtAutoDeleteOnIdleHours.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // txtAutoDeleteOnIdleDays - // - this.txtAutoDeleteOnIdleDays.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleDays.Location = new System.Drawing.Point(16, 44); - this.txtAutoDeleteOnIdleDays.Name = "txtAutoDeleteOnIdleDays"; - this.txtAutoDeleteOnIdleDays.Size = new System.Drawing.Size(40, 20); - this.txtAutoDeleteOnIdleDays.TabIndex = 0; - this.txtAutoDeleteOnIdleDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); + // tsAutoDeleteOnIdle + // + this.tsAutoDeleteOnIdle.Location = new System.Drawing.Point(14, 25); + this.tsAutoDeleteOnIdle.Name = "tsAutoDeleteOnIdle"; + this.tsAutoDeleteOnIdle.Size = new System.Drawing.Size(273, 42); + this.tsAutoDeleteOnIdle.TabIndex = 1; + this.tsAutoDeleteOnIdle.TimeSpanValue = null; // // groupergrouperDefaultMessageTimeToLive // @@ -519,16 +392,7 @@ private void InitializeComponent() this.groupergrouperDefaultMessageTimeToLive.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.groupergrouperDefaultMessageTimeToLive.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.groupergrouperDefaultMessageTimeToLive.BorderThickness = 1F; - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lblDefaultMessageTimeToLiveMilliseconds); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveMilliseconds); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lblDefaultMessageTimeToLiveSeconds); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveSeconds); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lblDefaultMessageTimeToLiveMinutes); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveMinutes); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lbllblDefaultMessageTimeToLiveHours); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lblDefaultMessageTimeToLiveDays); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveHours); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveDays); + this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.tsDefaultMessageTimeToLive); this.groupergrouperDefaultMessageTimeToLive.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.groupergrouperDefaultMessageTimeToLive.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.groupergrouperDefaultMessageTimeToLive.ForeColor = System.Drawing.Color.White; @@ -545,100 +409,13 @@ private void InitializeComponent() this.groupergrouperDefaultMessageTimeToLive.Size = new System.Drawing.Size(296, 80); this.groupergrouperDefaultMessageTimeToLive.TabIndex = 2; // - // lblDefaultMessageTimeToLiveMilliseconds - // - this.lblDefaultMessageTimeToLiveMilliseconds.AutoSize = true; - this.lblDefaultMessageTimeToLiveMilliseconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDefaultMessageTimeToLiveMilliseconds.Location = new System.Drawing.Point(240, 28); - this.lblDefaultMessageTimeToLiveMilliseconds.Name = "lblDefaultMessageTimeToLiveMilliseconds"; - this.lblDefaultMessageTimeToLiveMilliseconds.Size = new System.Drawing.Size(49, 13); - this.lblDefaultMessageTimeToLiveMilliseconds.TabIndex = 25; - this.lblDefaultMessageTimeToLiveMilliseconds.Text = "Millisecs:"; - // - // txtDefaultMessageTimeToLiveMilliseconds - // - this.txtDefaultMessageTimeToLiveMilliseconds.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveMilliseconds.Location = new System.Drawing.Point(240, 44); - this.txtDefaultMessageTimeToLiveMilliseconds.Name = "txtDefaultMessageTimeToLiveMilliseconds"; - this.txtDefaultMessageTimeToLiveMilliseconds.Size = new System.Drawing.Size(40, 20); - this.txtDefaultMessageTimeToLiveMilliseconds.TabIndex = 4; - this.txtDefaultMessageTimeToLiveMilliseconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDefaultMessageTimeToLiveSeconds - // - this.lblDefaultMessageTimeToLiveSeconds.AutoSize = true; - this.lblDefaultMessageTimeToLiveSeconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDefaultMessageTimeToLiveSeconds.Location = new System.Drawing.Point(184, 28); - this.lblDefaultMessageTimeToLiveSeconds.Name = "lblDefaultMessageTimeToLiveSeconds"; - this.lblDefaultMessageTimeToLiveSeconds.Size = new System.Drawing.Size(52, 13); - this.lblDefaultMessageTimeToLiveSeconds.TabIndex = 24; - this.lblDefaultMessageTimeToLiveSeconds.Text = "Seconds:"; - // - // txtDefaultMessageTimeToLiveSeconds - // - this.txtDefaultMessageTimeToLiveSeconds.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveSeconds.Location = new System.Drawing.Point(184, 44); - this.txtDefaultMessageTimeToLiveSeconds.Name = "txtDefaultMessageTimeToLiveSeconds"; - this.txtDefaultMessageTimeToLiveSeconds.Size = new System.Drawing.Size(40, 20); - this.txtDefaultMessageTimeToLiveSeconds.TabIndex = 3; - this.txtDefaultMessageTimeToLiveSeconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDefaultMessageTimeToLiveMinutes - // - this.lblDefaultMessageTimeToLiveMinutes.AutoSize = true; - this.lblDefaultMessageTimeToLiveMinutes.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDefaultMessageTimeToLiveMinutes.Location = new System.Drawing.Point(128, 28); - this.lblDefaultMessageTimeToLiveMinutes.Name = "lblDefaultMessageTimeToLiveMinutes"; - this.lblDefaultMessageTimeToLiveMinutes.Size = new System.Drawing.Size(47, 13); - this.lblDefaultMessageTimeToLiveMinutes.TabIndex = 23; - this.lblDefaultMessageTimeToLiveMinutes.Text = "Minutes:"; - // - // txtDefaultMessageTimeToLiveMinutes - // - this.txtDefaultMessageTimeToLiveMinutes.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveMinutes.Location = new System.Drawing.Point(128, 44); - this.txtDefaultMessageTimeToLiveMinutes.Name = "txtDefaultMessageTimeToLiveMinutes"; - this.txtDefaultMessageTimeToLiveMinutes.Size = new System.Drawing.Size(40, 20); - this.txtDefaultMessageTimeToLiveMinutes.TabIndex = 2; - this.txtDefaultMessageTimeToLiveMinutes.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lbllblDefaultMessageTimeToLiveHours - // - this.lbllblDefaultMessageTimeToLiveHours.AutoSize = true; - this.lbllblDefaultMessageTimeToLiveHours.ForeColor = System.Drawing.SystemColors.ControlText; - this.lbllblDefaultMessageTimeToLiveHours.Location = new System.Drawing.Point(72, 28); - this.lbllblDefaultMessageTimeToLiveHours.Name = "lbllblDefaultMessageTimeToLiveHours"; - this.lbllblDefaultMessageTimeToLiveHours.Size = new System.Drawing.Size(38, 13); - this.lbllblDefaultMessageTimeToLiveHours.TabIndex = 22; - this.lbllblDefaultMessageTimeToLiveHours.Text = "Hours:"; - // - // lblDefaultMessageTimeToLiveDays - // - this.lblDefaultMessageTimeToLiveDays.AutoSize = true; - this.lblDefaultMessageTimeToLiveDays.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDefaultMessageTimeToLiveDays.Location = new System.Drawing.Point(16, 28); - this.lblDefaultMessageTimeToLiveDays.Name = "lblDefaultMessageTimeToLiveDays"; - this.lblDefaultMessageTimeToLiveDays.Size = new System.Drawing.Size(34, 13); - this.lblDefaultMessageTimeToLiveDays.TabIndex = 21; - this.lblDefaultMessageTimeToLiveDays.Text = "Days:"; - // - // txtDefaultMessageTimeToLiveHours - // - this.txtDefaultMessageTimeToLiveHours.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveHours.Location = new System.Drawing.Point(72, 44); - this.txtDefaultMessageTimeToLiveHours.Name = "txtDefaultMessageTimeToLiveHours"; - this.txtDefaultMessageTimeToLiveHours.Size = new System.Drawing.Size(40, 20); - this.txtDefaultMessageTimeToLiveHours.TabIndex = 1; - this.txtDefaultMessageTimeToLiveHours.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // txtDefaultMessageTimeToLiveDays - // - this.txtDefaultMessageTimeToLiveDays.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveDays.Location = new System.Drawing.Point(16, 44); - this.txtDefaultMessageTimeToLiveDays.Name = "txtDefaultMessageTimeToLiveDays"; - this.txtDefaultMessageTimeToLiveDays.Size = new System.Drawing.Size(40, 20); - this.txtDefaultMessageTimeToLiveDays.TabIndex = 0; - this.txtDefaultMessageTimeToLiveDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); + // tsDefaultMessageTimeToLive + // + this.tsDefaultMessageTimeToLive.Location = new System.Drawing.Point(14, 25); + this.tsDefaultMessageTimeToLive.Name = "tsDefaultMessageTimeToLive"; + this.tsDefaultMessageTimeToLive.Size = new System.Drawing.Size(273, 42); + this.tsDefaultMessageTimeToLive.TabIndex = 2; + this.tsDefaultMessageTimeToLive.TimeSpanValue = null; // // grouperName // @@ -827,6 +604,7 @@ private void InitializeComponent() this.propertyListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.nameColumnHeader, this.valueColumnHeader}); + this.propertyListView.HideSelection = false; this.propertyListView.Location = new System.Drawing.Point(16, 32); this.propertyListView.Name = "propertyListView"; this.propertyListView.OwnerDraw = true; @@ -1011,6 +789,9 @@ private void InitializeComponent() // // txtMaxDeliveryCount // + this.txtMaxDeliveryCount.AllowDecimal = false; + this.txtMaxDeliveryCount.AllowNegative = false; + this.txtMaxDeliveryCount.AllowSpace = false; this.txtMaxDeliveryCount.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.txtMaxDeliveryCount.BackColor = System.Drawing.SystemColors.Window; @@ -1018,7 +799,6 @@ private void InitializeComponent() this.txtMaxDeliveryCount.Name = "txtMaxDeliveryCount"; this.txtMaxDeliveryCount.Size = new System.Drawing.Size(232, 20); this.txtMaxDeliveryCount.TabIndex = 0; - this.txtMaxDeliveryCount.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); // // grouperLockDuration // @@ -1027,16 +807,7 @@ private void InitializeComponent() this.grouperLockDuration.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.grouperLockDuration.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperLockDuration.BorderThickness = 1F; - this.grouperLockDuration.Controls.Add(this.lblLockDurationMilliseconds); - this.grouperLockDuration.Controls.Add(this.txtLockDurationMilliseconds); - this.grouperLockDuration.Controls.Add(this.lblLockDurationSeconds); - this.grouperLockDuration.Controls.Add(this.txtLockDurationSeconds); - this.grouperLockDuration.Controls.Add(this.lblLockDurationMinutes); - this.grouperLockDuration.Controls.Add(this.txtLockDurationMinutes); - this.grouperLockDuration.Controls.Add(this.lblLockDurationHours); - this.grouperLockDuration.Controls.Add(this.lblLockDurationDays); - this.grouperLockDuration.Controls.Add(this.txtLockDurationHours); - this.grouperLockDuration.Controls.Add(this.txtLockDurationDays); + this.grouperLockDuration.Controls.Add(this.tsLockDuration); this.grouperLockDuration.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperLockDuration.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.grouperLockDuration.ForeColor = System.Drawing.Color.White; @@ -1053,100 +824,13 @@ private void InitializeComponent() this.grouperLockDuration.Size = new System.Drawing.Size(296, 80); this.grouperLockDuration.TabIndex = 3; // - // lblLockDurationMilliseconds - // - this.lblLockDurationMilliseconds.AutoSize = true; - this.lblLockDurationMilliseconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblLockDurationMilliseconds.Location = new System.Drawing.Point(240, 28); - this.lblLockDurationMilliseconds.Name = "lblLockDurationMilliseconds"; - this.lblLockDurationMilliseconds.Size = new System.Drawing.Size(49, 13); - this.lblLockDurationMilliseconds.TabIndex = 25; - this.lblLockDurationMilliseconds.Text = "Millisecs:"; - // - // txtLockDurationMilliseconds - // - this.txtLockDurationMilliseconds.BackColor = System.Drawing.SystemColors.Window; - this.txtLockDurationMilliseconds.Location = new System.Drawing.Point(240, 44); - this.txtLockDurationMilliseconds.Name = "txtLockDurationMilliseconds"; - this.txtLockDurationMilliseconds.Size = new System.Drawing.Size(40, 20); - this.txtLockDurationMilliseconds.TabIndex = 4; - this.txtLockDurationMilliseconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblLockDurationSeconds - // - this.lblLockDurationSeconds.AutoSize = true; - this.lblLockDurationSeconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblLockDurationSeconds.Location = new System.Drawing.Point(184, 28); - this.lblLockDurationSeconds.Name = "lblLockDurationSeconds"; - this.lblLockDurationSeconds.Size = new System.Drawing.Size(52, 13); - this.lblLockDurationSeconds.TabIndex = 24; - this.lblLockDurationSeconds.Text = "Seconds:"; - // - // txtLockDurationSeconds - // - this.txtLockDurationSeconds.BackColor = System.Drawing.SystemColors.Window; - this.txtLockDurationSeconds.Location = new System.Drawing.Point(184, 44); - this.txtLockDurationSeconds.Name = "txtLockDurationSeconds"; - this.txtLockDurationSeconds.Size = new System.Drawing.Size(40, 20); - this.txtLockDurationSeconds.TabIndex = 3; - this.txtLockDurationSeconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblLockDurationMinutes - // - this.lblLockDurationMinutes.AutoSize = true; - this.lblLockDurationMinutes.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblLockDurationMinutes.Location = new System.Drawing.Point(128, 28); - this.lblLockDurationMinutes.Name = "lblLockDurationMinutes"; - this.lblLockDurationMinutes.Size = new System.Drawing.Size(47, 13); - this.lblLockDurationMinutes.TabIndex = 23; - this.lblLockDurationMinutes.Text = "Minutes:"; - // - // txtLockDurationMinutes - // - this.txtLockDurationMinutes.BackColor = System.Drawing.SystemColors.Window; - this.txtLockDurationMinutes.Location = new System.Drawing.Point(128, 44); - this.txtLockDurationMinutes.Name = "txtLockDurationMinutes"; - this.txtLockDurationMinutes.Size = new System.Drawing.Size(40, 20); - this.txtLockDurationMinutes.TabIndex = 2; - this.txtLockDurationMinutes.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblLockDurationHours - // - this.lblLockDurationHours.AutoSize = true; - this.lblLockDurationHours.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblLockDurationHours.Location = new System.Drawing.Point(72, 28); - this.lblLockDurationHours.Name = "lblLockDurationHours"; - this.lblLockDurationHours.Size = new System.Drawing.Size(38, 13); - this.lblLockDurationHours.TabIndex = 22; - this.lblLockDurationHours.Text = "Hours:"; - // - // lblLockDurationDays - // - this.lblLockDurationDays.AutoSize = true; - this.lblLockDurationDays.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblLockDurationDays.Location = new System.Drawing.Point(16, 28); - this.lblLockDurationDays.Name = "lblLockDurationDays"; - this.lblLockDurationDays.Size = new System.Drawing.Size(34, 13); - this.lblLockDurationDays.TabIndex = 21; - this.lblLockDurationDays.Text = "Days:"; - // - // txtLockDurationHours - // - this.txtLockDurationHours.BackColor = System.Drawing.SystemColors.Window; - this.txtLockDurationHours.Location = new System.Drawing.Point(72, 44); - this.txtLockDurationHours.Name = "txtLockDurationHours"; - this.txtLockDurationHours.Size = new System.Drawing.Size(40, 20); - this.txtLockDurationHours.TabIndex = 1; - this.txtLockDurationHours.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // txtLockDurationDays - // - this.txtLockDurationDays.BackColor = System.Drawing.SystemColors.Window; - this.txtLockDurationDays.Location = new System.Drawing.Point(16, 44); - this.txtLockDurationDays.Name = "txtLockDurationDays"; - this.txtLockDurationDays.Size = new System.Drawing.Size(40, 20); - this.txtLockDurationDays.TabIndex = 0; - this.txtLockDurationDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); + // tsLockDuration + // + this.tsLockDuration.Location = new System.Drawing.Point(16, 25); + this.tsLockDuration.Name = "tsLockDuration"; + this.tsLockDuration.Size = new System.Drawing.Size(273, 42); + this.tsLockDuration.TabIndex = 3; + this.tsLockDuration.TimeSpanValue = null; // // grouperSubscriptionSettings // @@ -1380,6 +1064,7 @@ private void InitializeComponent() this.txtMessageText.CharWidth = 8; this.txtMessageText.Cursor = System.Windows.Forms.Cursors.IBeam; this.txtMessageText.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.txtMessageText.Font = new System.Drawing.Font("Courier New", 9.75F); this.txtMessageText.ForeColor = System.Drawing.SystemColors.ControlText; this.txtMessageText.IsReplaceMode = false; this.txtMessageText.Location = new System.Drawing.Point(16, 32); @@ -1456,7 +1141,7 @@ private void InitializeComponent() this.grouperMessageCustomProperties.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.grouperMessageCustomProperties.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperMessageCustomProperties.BorderThickness = 1F; - this.grouperMessageCustomProperties.Controls.Add(this.messagePropertyListView); + this.grouperMessageCustomProperties.Controls.Add(this.messageCustomPropertyGrid); this.grouperMessageCustomProperties.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperMessageCustomProperties.Dock = System.Windows.Forms.DockStyle.Fill; this.grouperMessageCustomProperties.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); @@ -1474,36 +1159,6 @@ private void InitializeComponent() this.grouperMessageCustomProperties.Size = new System.Drawing.Size(313, 212); this.grouperMessageCustomProperties.TabIndex = 27; // - // messagePropertyListView - // - this.messagePropertyListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.messagePropertyListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader1, - this.columnHeader2}); - this.messagePropertyListView.Location = new System.Drawing.Point(16, 32); - this.messagePropertyListView.Name = "messagePropertyListView"; - this.messagePropertyListView.OwnerDraw = true; - this.messagePropertyListView.Size = new System.Drawing.Size(281, 164); - this.messagePropertyListView.TabIndex = 0; - this.messagePropertyListView.UseCompatibleStateImageBehavior = false; - this.messagePropertyListView.View = System.Windows.Forms.View.Details; - this.messagePropertyListView.DrawColumnHeader += new System.Windows.Forms.DrawListViewColumnHeaderEventHandler(this.listView_DrawColumnHeader); - this.messagePropertyListView.DrawItem += new System.Windows.Forms.DrawListViewItemEventHandler(this.listView_DrawItem); - this.messagePropertyListView.DrawSubItem += new System.Windows.Forms.DrawListViewSubItemEventHandler(this.listView_DrawSubItem); - this.messagePropertyListView.Resize += new System.EventHandler(this.listView_Resize); - // - // columnHeader1 - // - this.columnHeader1.Text = "Name"; - this.columnHeader1.Width = 113; - // - // columnHeader2 - // - this.columnHeader2.Text = "Value"; - this.columnHeader2.Width = 115; - // // tabPageDeadletter // this.tabPageDeadletter.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); @@ -1690,7 +1345,6 @@ private void InitializeComponent() this.txtDeadletterText.CharWidth = 8; this.txtDeadletterText.Cursor = System.Windows.Forms.Cursors.IBeam; this.txtDeadletterText.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); - this.txtDeadletterText.Font = new System.Drawing.Font("Courier New", 9.75F); this.txtDeadletterText.ForeColor = System.Drawing.SystemColors.ControlText; this.txtDeadletterText.IsReplaceMode = false; this.txtDeadletterText.Location = new System.Drawing.Point(16, 32); @@ -1768,7 +1422,7 @@ private void InitializeComponent() this.grouperDeadletterCustomProperties.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.grouperDeadletterCustomProperties.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperDeadletterCustomProperties.BorderThickness = 1F; - this.grouperDeadletterCustomProperties.Controls.Add(this.deadletterPropertyListView); + this.grouperDeadletterCustomProperties.Controls.Add(this.deadletterCustomPropertyGrid); this.grouperDeadletterCustomProperties.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperDeadletterCustomProperties.Dock = System.Windows.Forms.DockStyle.Fill; this.grouperDeadletterCustomProperties.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); @@ -1787,36 +1441,6 @@ private void InitializeComponent() this.grouperDeadletterCustomProperties.TabIndex = 27; this.grouperDeadletterCustomProperties.CustomPaint += new System.Action(this.grouperDeadletterCustomProperties_CustomPaint); // - // deadletterPropertyListView - // - this.deadletterPropertyListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.deadletterPropertyListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader3, - this.columnHeader4}); - this.deadletterPropertyListView.Location = new System.Drawing.Point(16, 32); - this.deadletterPropertyListView.Name = "deadletterPropertyListView"; - this.deadletterPropertyListView.OwnerDraw = true; - this.deadletterPropertyListView.Size = new System.Drawing.Size(281, 164); - this.deadletterPropertyListView.TabIndex = 0; - this.deadletterPropertyListView.UseCompatibleStateImageBehavior = false; - this.deadletterPropertyListView.View = System.Windows.Forms.View.Details; - this.deadletterPropertyListView.DrawColumnHeader += new System.Windows.Forms.DrawListViewColumnHeaderEventHandler(this.listView_DrawColumnHeader); - this.deadletterPropertyListView.DrawItem += new System.Windows.Forms.DrawListViewItemEventHandler(this.listView_DrawItem); - this.deadletterPropertyListView.DrawSubItem += new System.Windows.Forms.DrawListViewSubItemEventHandler(this.listView_DrawSubItem); - this.deadletterPropertyListView.Resize += new System.EventHandler(this.listView_Resize); - // - // columnHeader3 - // - this.columnHeader3.Text = "Name"; - this.columnHeader3.Width = 113; - // - // columnHeader4 - // - this.columnHeader4.Text = "Value"; - this.columnHeader4.Width = 115; - // // tabPageSessions // this.tabPageSessions.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); @@ -2148,6 +1772,34 @@ private void InitializeComponent() this.btnPurgeDeadletterQueueMessages.MouseEnter += new System.EventHandler(this.button_MouseEnter); this.btnPurgeDeadletterQueueMessages.MouseLeave += new System.EventHandler(this.button_MouseLeave); // + // messageCustomPropertyGrid + // + this.messageCustomPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.messageCustomPropertyGrid.BackColor = System.Drawing.SystemColors.Window; + this.messageCustomPropertyGrid.HelpVisible = false; + this.messageCustomPropertyGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.messageCustomPropertyGrid.Location = new System.Drawing.Point(16, 32); + this.messageCustomPropertyGrid.Name = "messageCustomPropertyGrid"; + this.messageCustomPropertyGrid.Size = new System.Drawing.Size(280, 164); + this.messageCustomPropertyGrid.TabIndex = 2; + this.messageCustomPropertyGrid.ToolbarVisible = false; + // + // deadletterCustomPropertyGrid + // + this.deadletterCustomPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.deadletterCustomPropertyGrid.BackColor = System.Drawing.SystemColors.Window; + this.deadletterCustomPropertyGrid.HelpVisible = false; + this.deadletterCustomPropertyGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.deadletterCustomPropertyGrid.Location = new System.Drawing.Point(16, 32); + this.deadletterCustomPropertyGrid.Name = "deadletterCustomPropertyGrid"; + this.deadletterCustomPropertyGrid.Size = new System.Drawing.Size(280, 164); + this.deadletterCustomPropertyGrid.TabIndex = 3; + this.deadletterCustomPropertyGrid.ToolbarVisible = false; + // // HandleSubscriptionControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -2168,9 +1820,7 @@ private void InitializeComponent() this.mainTabControl.ResumeLayout(false); this.tabPageDescription.ResumeLayout(false); this.grouperAutoDeleteOnIdle.ResumeLayout(false); - this.grouperAutoDeleteOnIdle.PerformLayout(); this.groupergrouperDefaultMessageTimeToLive.ResumeLayout(false); - this.groupergrouperDefaultMessageTimeToLive.PerformLayout(); this.grouperName.ResumeLayout(false); this.grouperName.PerformLayout(); this.grouperDefaultRule.ResumeLayout(false); @@ -2179,7 +1829,6 @@ private void InitializeComponent() this.grouperSubscriptionProperties.ResumeLayout(false); this.grouperSubscriptionProperties.PerformLayout(); this.grouperLockDuration.ResumeLayout(false); - this.grouperLockDuration.PerformLayout(); this.grouperSubscriptionSettings.ResumeLayout(false); this.tabPageMessages.ResumeLayout(false); this.messagesSplitContainer.Panel1.ResumeLayout(false); @@ -2274,16 +1923,6 @@ private void InitializeComponent() private Grouper grouperDeadletterList; private System.Windows.Forms.DataGridView deadletterDataGridView; private Grouper groupergrouperDefaultMessageTimeToLive; - private System.Windows.Forms.Label lblDefaultMessageTimeToLiveMilliseconds; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveMilliseconds; - private System.Windows.Forms.Label lblDefaultMessageTimeToLiveSeconds; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveSeconds; - private System.Windows.Forms.Label lblDefaultMessageTimeToLiveMinutes; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveMinutes; - private System.Windows.Forms.Label lbllblDefaultMessageTimeToLiveHours; - private System.Windows.Forms.Label lblDefaultMessageTimeToLiveDays; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveHours; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveDays; private Grouper grouperName; private System.Windows.Forms.Label lblRelativeURI; private System.Windows.Forms.TextBox txtName; @@ -2306,31 +1945,11 @@ private void InitializeComponent() private System.Windows.Forms.TextBox txtForwardTo; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label labelUserDescription; - private System.Windows.Forms.TextBox txtMaxDeliveryCount; + private ServiceBusExplorer.Controls.NumericTextBox txtMaxDeliveryCount; private Grouper grouperLockDuration; - private System.Windows.Forms.Label lblLockDurationMilliseconds; - private System.Windows.Forms.TextBox txtLockDurationMilliseconds; - private System.Windows.Forms.Label lblLockDurationSeconds; - private System.Windows.Forms.TextBox txtLockDurationSeconds; - private System.Windows.Forms.Label lblLockDurationMinutes; - private System.Windows.Forms.TextBox txtLockDurationMinutes; - private System.Windows.Forms.Label lblLockDurationHours; - private System.Windows.Forms.Label lblLockDurationDays; - private System.Windows.Forms.TextBox txtLockDurationHours; - private System.Windows.Forms.TextBox txtLockDurationDays; private Grouper grouperSubscriptionSettings; private System.Windows.Forms.CheckedListBox checkedListBox; private Grouper grouperAutoDeleteOnIdle; - private System.Windows.Forms.Label lblAutoDeleteOnIdleMilliseconds; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleMilliseconds; - private System.Windows.Forms.Label lblAutoDeleteOnIdleSeconds; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleSeconds; - private System.Windows.Forms.Label lblAutoDeleteOnIdleMinutes; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleMinutes; - private System.Windows.Forms.Label lblAutoDeleteOnIdleHours; - private System.Windows.Forms.Label lblAutoDeleteOnIdleDays; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleHours; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleDays; private System.Windows.Forms.BindingSource sessionsBindingSource; private System.Windows.Forms.BindingSource messagesBindingSource; private System.Windows.Forms.BindingSource deadletterBindingSource; @@ -2368,9 +1987,6 @@ private void InitializeComponent() private Grouper grouperMessageProperties; private System.Windows.Forms.PropertyGrid messagePropertyGrid; private Grouper grouperMessageCustomProperties; - private System.Windows.Forms.ListView messagePropertyListView; - private System.Windows.Forms.ColumnHeader columnHeader1; - private System.Windows.Forms.ColumnHeader columnHeader2; private Grouper grouperMessageText; private FastColoredTextBoxNS.FastColoredTextBox txtMessageText; private System.Windows.Forms.SplitContainer deadletterPropertiesSplitContainer; @@ -2379,8 +1995,10 @@ private void InitializeComponent() private Grouper grouperDeadletterText; private FastColoredTextBoxNS.FastColoredTextBox txtDeadletterText; private Grouper grouperDeadletterCustomProperties; - private System.Windows.Forms.ListView deadletterPropertyListView; - private System.Windows.Forms.ColumnHeader columnHeader3; - private System.Windows.Forms.ColumnHeader columnHeader4; + private TimeSpanControl tsAutoDeleteOnIdle; + private TimeSpanControl tsDefaultMessageTimeToLive; + private TimeSpanControl tsLockDuration; + private System.Windows.Forms.PropertyGrid messageCustomPropertyGrid; + private System.Windows.Forms.PropertyGrid deadletterCustomPropertyGrid; } } diff --git a/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs b/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs index 4d0f80c1..8ce570b0 100644 --- a/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs @@ -89,24 +89,10 @@ public partial class HandleSubscriptionControl : UserControl private const string NameCannotBeNull = "The Name field cannot be null."; private const string MaxDeliveryCountMustBeANumber = "The MaxDeliveryCount field must be a number."; - private const string DefaultMessageTimeToLiveDaysMustBeANumber = "The Days value of the DefaultMessageTimeToLive field must be a number."; - private const string DefaultMessageTimeToLiveHoursMustBeANumber = "The Hours value of the DefaultMessageTimeToLive field must be a number."; - private const string DefaultMessageTimeToLiveMinutesMustBeANumber = "The Minutes value of the DefaultMessageTimeToLive field must be a number."; - private const string DefaultMessageTimeToLiveSecondsMustBeANumber = "The Seconds value of the DefaultMessageTimeToLive field must be a number."; - private const string DefaultMessageTimeToLiveMillisecondsMustBeANumber = "The Milliseconds value of the DefaultMessageTimeToLive field must be a number."; - - private const string LockDurationDaysMustBeANumber = "The Days value of the LockDuration field must be a number."; - private const string LockDurationHoursMustBeANumber = "The Hours value of the LockDuration field must be a number."; - private const string LockDurationMinutesMustBeANumber = "The Minutes value of the LockDuration field must be a number."; - private const string LockDurationSecondsMustBeANumber = "The Seconds value of the LockDuration field must be a number."; - private const string LockDurationMillisecondsMustBeANumber = "The Milliseconds value of the LockDuration field must be a number."; - - private const string AutoDeleteOnIdleDaysMustBeANumber = "The Days value of the AutoDeleteOnIdle field must be a number."; - private const string AutoDeleteOnIdleHoursMustBeANumber = "The Hours value of the AutoDeleteOnIdle field must be a number."; - private const string AutoDeleteOnIdleMinutesMustBeANumber = "The Minutes value of the AutoDeleteOnIdle field must be a number."; - private const string AutoDeleteOnIdleSecondsMustBeANumber = "The Seconds value of the AutoDeleteOnIdle field must be a number."; - private const string AutoDeleteOnIdleMillisecondsMustBeANumber = "The Milliseconds value of the AutoDeleteOnIdle field must be a number."; - + const string DefaultMessageTimeToLive = "DefaultMessageTimeToLive"; + const string LockDuration = "LockDuration"; + const string AutoDeleteOnIdle = "AutoDeleteOnIdle"; + private const string MessagesPeekedFromTheSubscription = "[{0}] messages peeked from the subscription [{1}]."; private const string MessagesPeekedFromTheDeadletterQueue = "[{0}] messages peeked from the deadletter queue of the subscription [{1}]."; private const string MessagesReceivedFromTheSubscription = "[{0}] messages received from the subscription [{1}]."; @@ -244,7 +230,7 @@ public void GetMessages() if (receiveModeForm.ShowDialog() == DialogResult.OK) { txtMessageText.Text = string.Empty; - messagePropertyListView.Items.Clear(); + messageCustomPropertyGrid.SelectedObject = null; messagePropertyGrid.SelectedObject = null; var messageInspector = !string.IsNullOrEmpty(receiveModeForm.Inspector) && serviceBusHelper.BrokeredMessageInspectors.ContainsKey(receiveModeForm.Inspector) ? @@ -271,7 +257,7 @@ public void GetDeadletterMessages() return; } txtDeadletterText.Text = string.Empty; - deadletterPropertyListView.Items.Clear(); + deadletterCustomPropertyGrid.SelectedObject = null; deadletterPropertyGrid.SelectedObject = null; var messageInspector = !string.IsNullOrEmpty(receiveModeForm.Inspector) && serviceBusHelper.BrokeredMessageInspectors.ContainsKey(receiveModeForm.Inspector) ? @@ -297,7 +283,7 @@ public void GetTransferDeadletterMessages() return; } txtDeadletterText.Text = string.Empty; - deadletterPropertyListView.Items.Clear(); + deadletterCustomPropertyGrid.SelectedObject = null; deadletterPropertyGrid.SelectedObject = null; var messageInspector = !string.IsNullOrEmpty(receiveModeForm.Inspector) && serviceBusHelper.BrokeredMessageInspectors.ContainsKey(receiveModeForm.Inspector) ? @@ -716,24 +702,12 @@ private void InitializeControls() toolTip.SetToolTip(txtUserMetadata, UserMetadataTooltip); toolTip.SetToolTip(txtForwardTo, ForwardToTooltip); toolTip.SetToolTip(txtForwardDeadLetteredMessagesTo, ForwardDeadLetteredMessagesToTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveDays, DefaultMessageTimeToLiveTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveHours, DefaultMessageTimeToLiveTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveMinutes, DefaultMessageTimeToLiveTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveSeconds, DefaultMessageTimeToLiveTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveMilliseconds, DefaultMessageTimeToLiveTooltip); + toolTip.SetToolTip(tsDefaultMessageTimeToLive, DefaultMessageTimeToLiveTooltip); toolTip.SetToolTip(txtFilter, FilterExpressionTooltip); toolTip.SetToolTip(txtAction, FilterActionTooltip); - toolTip.SetToolTip(txtLockDurationDays, LockDurationTooltip); - toolTip.SetToolTip(txtLockDurationHours, LockDurationTooltip); - toolTip.SetToolTip(txtLockDurationMinutes, LockDurationTooltip); - toolTip.SetToolTip(txtLockDurationSeconds, LockDurationTooltip); - toolTip.SetToolTip(txtLockDurationMilliseconds, LockDurationTooltip); + toolTip.SetToolTip(tsLockDuration, LockDurationTooltip); toolTip.SetToolTip(txtMaxDeliveryCount, MaxDeliveryCountTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleDays, AutoDeleteOnIdleTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleHours, AutoDeleteOnIdleTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleMinutes, AutoDeleteOnIdleTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleSeconds, AutoDeleteOnIdleTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleMilliseconds, AutoDeleteOnIdleTooltip); + toolTip.SetToolTip(tsAutoDeleteOnIdle, AutoDeleteOnIdleTooltip); } else { @@ -826,25 +800,13 @@ private void InitializeData() txtMaxDeliveryCount.Text = subscriptionWrapper.SubscriptionDescription.MaxDeliveryCount.ToString(CultureInfo.InvariantCulture); // DefaultMessageTimeToLive - txtDefaultMessageTimeToLiveDays.Text = subscriptionWrapper.SubscriptionDescription.DefaultMessageTimeToLive.Days.ToString(CultureInfo.InvariantCulture); - txtDefaultMessageTimeToLiveHours.Text = subscriptionWrapper.SubscriptionDescription.DefaultMessageTimeToLive.Hours.ToString(CultureInfo.InvariantCulture); - txtDefaultMessageTimeToLiveMinutes.Text = subscriptionWrapper.SubscriptionDescription.DefaultMessageTimeToLive.Minutes.ToString(CultureInfo.InvariantCulture); - txtDefaultMessageTimeToLiveSeconds.Text = subscriptionWrapper.SubscriptionDescription.DefaultMessageTimeToLive.Seconds.ToString(CultureInfo.InvariantCulture); - txtDefaultMessageTimeToLiveMilliseconds.Text = subscriptionWrapper.SubscriptionDescription.DefaultMessageTimeToLive.Milliseconds.ToString(CultureInfo.InvariantCulture); + tsDefaultMessageTimeToLive.TimeSpanValue = subscriptionWrapper.SubscriptionDescription.DefaultMessageTimeToLive; // LockDuration - txtLockDurationDays.Text = subscriptionWrapper.SubscriptionDescription.LockDuration.Days.ToString(CultureInfo.InvariantCulture); - txtLockDurationHours.Text = subscriptionWrapper.SubscriptionDescription.LockDuration.Hours.ToString(CultureInfo.InvariantCulture); - txtLockDurationMinutes.Text = subscriptionWrapper.SubscriptionDescription.LockDuration.Minutes.ToString(CultureInfo.InvariantCulture); - txtLockDurationSeconds.Text = subscriptionWrapper.SubscriptionDescription.LockDuration.Seconds.ToString(CultureInfo.InvariantCulture); - txtLockDurationMilliseconds.Text = subscriptionWrapper.SubscriptionDescription.LockDuration.Milliseconds.ToString(CultureInfo.InvariantCulture); + tsLockDuration.TimeSpanValue = subscriptionWrapper.SubscriptionDescription.LockDuration; // AutoDeleteOnIdle - txtAutoDeleteOnIdleDays.Text = subscriptionWrapper.SubscriptionDescription.AutoDeleteOnIdle.Days.ToString(CultureInfo.InvariantCulture); - txtAutoDeleteOnIdleHours.Text = subscriptionWrapper.SubscriptionDescription.AutoDeleteOnIdle.Hours.ToString(CultureInfo.InvariantCulture); - txtAutoDeleteOnIdleMinutes.Text = subscriptionWrapper.SubscriptionDescription.AutoDeleteOnIdle.Minutes.ToString(CultureInfo.InvariantCulture); - txtAutoDeleteOnIdleSeconds.Text = subscriptionWrapper.SubscriptionDescription.AutoDeleteOnIdle.Seconds.ToString(CultureInfo.InvariantCulture); - txtAutoDeleteOnIdleMilliseconds.Text = subscriptionWrapper.SubscriptionDescription.AutoDeleteOnIdle.Milliseconds.ToString(CultureInfo.InvariantCulture); + tsAutoDeleteOnIdle.TimeSpanValue = subscriptionWrapper.SubscriptionDescription.AutoDeleteOnIdle; // EnableDeadLetteringOnFilterEvaluationExceptions checkedListBox.SetItemChecked(EnableBatchedOperationsIndex, @@ -1402,171 +1364,36 @@ private async void btnCreateDelete_Click(object sender, EventArgs e) } } - var days = 0; - var hours = 0; - var minutes = 0; - var seconds = 0; - var milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveDays.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveHours.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMinutes.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveSeconds.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMilliseconds.Text)) + if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveDays.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveDays.Text, out days)) - { - writeToLog(DefaultMessageTimeToLiveDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveHours.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveHours.Text, out hours)) - { - writeToLog(DefaultMessageTimeToLiveHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMinutes.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveMinutes.Text, out minutes)) - { - writeToLog(DefaultMessageTimeToLiveMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveSeconds.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveSeconds.Text, out seconds)) - { - writeToLog(DefaultMessageTimeToLiveSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMilliseconds.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveMilliseconds.Text, out milliseconds)) - { - writeToLog(DefaultMessageTimeToLiveMillisecondsMustBeANumber); - return; - } - } - subscriptionDescription.DefaultMessageTimeToLive = new TimeSpan(days, hours, minutes, seconds, milliseconds); + subscriptionDescription.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; } - - days = 0; - hours = 0; - minutes = 0; - seconds = 0; - milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtLockDurationDays.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationHours.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationMinutes.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationSeconds.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationMilliseconds.Text)) + else { - if (!string.IsNullOrWhiteSpace(txtLockDurationDays.Text)) - { - if (!int.TryParse(txtLockDurationDays.Text, out days)) - { - writeToLog(LockDurationDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationHours.Text)) - { - if (!int.TryParse(txtLockDurationHours.Text, out hours)) - { - writeToLog(LockDurationHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationMinutes.Text)) - { - if (!int.TryParse(txtLockDurationMinutes.Text, out minutes)) - { - writeToLog(LockDurationMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationSeconds.Text)) - { - if (!int.TryParse(txtLockDurationSeconds.Text, out seconds)) - { - writeToLog(LockDurationSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationMilliseconds.Text)) - { - if (!int.TryParse(txtLockDurationMilliseconds.Text, out milliseconds)) - { - writeToLog(LockDurationMillisecondsMustBeANumber); - return; - } - } - subscriptionDescription.LockDuration = new TimeSpan(days, hours, minutes, seconds, milliseconds); + writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); + return; } - days = 0; - hours = 0; - minutes = 0; - seconds = 0; - milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleDays.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleHours.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMinutes.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleSeconds.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMilliseconds.Text)) + if (tsLockDuration.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleDays.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleDays.Text, out days)) - { - writeToLog(AutoDeleteOnIdleDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleHours.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleHours.Text, out hours)) - { - writeToLog(AutoDeleteOnIdleHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMinutes.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleMinutes.Text, out minutes)) - { - writeToLog(AutoDeleteOnIdleMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleSeconds.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleSeconds.Text, out seconds)) - { - writeToLog(AutoDeleteOnIdleSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMilliseconds.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleMilliseconds.Text, out milliseconds)) - { - writeToLog(AutoDeleteOnIdleMillisecondsMustBeANumber); - return; - } - } - subscriptionDescription.AutoDeleteOnIdle = new TimeSpan(days, hours, minutes, seconds, milliseconds); + subscriptionDescription.LockDuration = tsLockDuration.TimeSpanValue.Value; + } + else + { + writeToLog(tsLockDuration.GetErrorMessage(LockDuration)); + return; } + if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) + { + subscriptionDescription.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; + } + else + { + writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); + return; + } + subscriptionDescription.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); subscriptionDescription.EnableDeadLetteringOnFilterEvaluationExceptions = checkedListBox.GetItemChecked(EnableDeadLetteringOnFilterEvaluationExceptionsIndex); subscriptionDescription.EnableDeadLetteringOnMessageExpiration = checkedListBox.GetItemChecked(EnableDeadLetteringOnMessageExpirationIndex); @@ -1656,180 +1483,36 @@ private void btnCancelUpdate_Click(object sender, EventArgs e) } } - var days = 0; - var hours = 0; - var minutes = 0; - var seconds = 0; - var milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveDays.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveHours.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMinutes.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveSeconds.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMilliseconds.Text)) + if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveDays.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveDays.Text, out days)) - { - writeToLog(DefaultMessageTimeToLiveDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveHours.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveHours.Text, out hours)) - { - writeToLog(DefaultMessageTimeToLiveHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMinutes.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveMinutes.Text, out minutes)) - { - writeToLog(DefaultMessageTimeToLiveMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveSeconds.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveSeconds.Text, out seconds)) - { - writeToLog(DefaultMessageTimeToLiveSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMilliseconds.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveMilliseconds.Text, out milliseconds)) - { - writeToLog(DefaultMessageTimeToLiveMillisecondsMustBeANumber); - return; - } - } - subscriptionWrapper.SubscriptionDescription.DefaultMessageTimeToLive = new TimeSpan(days, hours, minutes, seconds, - milliseconds); + subscriptionWrapper.SubscriptionDescription.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; } - - days = 0; - hours = 0; - minutes = 0; - seconds = 0; - milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtLockDurationDays.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationHours.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationMinutes.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationSeconds.Text) || - !string.IsNullOrWhiteSpace(txtLockDurationMilliseconds.Text)) + else { - if (!string.IsNullOrWhiteSpace(txtLockDurationDays.Text)) - { - if (!int.TryParse(txtLockDurationDays.Text, out days)) - { - writeToLog(LockDurationDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationHours.Text)) - { - if (!int.TryParse(txtLockDurationHours.Text, out hours)) - { - writeToLog(LockDurationHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationMinutes.Text)) - { - if (!int.TryParse(txtLockDurationMinutes.Text, out minutes)) - { - writeToLog(LockDurationMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationSeconds.Text)) - { - if (!int.TryParse(txtLockDurationSeconds.Text, out seconds)) - { - writeToLog(LockDurationSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtLockDurationMilliseconds.Text)) - { - if (!int.TryParse(txtLockDurationMilliseconds.Text, out milliseconds)) - { - writeToLog(LockDurationMillisecondsMustBeANumber); - return; - } - } - var timeSpan = new TimeSpan(days, hours, minutes, seconds, milliseconds); - if (!timeSpan.IsMaxValue()) - { - subscriptionWrapper.SubscriptionDescription.LockDuration = timeSpan; - } + writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); + return; } - days = 0; - hours = 0; - minutes = 0; - seconds = 0; - milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleDays.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleHours.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMinutes.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleSeconds.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMilliseconds.Text)) + if (tsLockDuration.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleDays.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleDays.Text, out days)) - { - writeToLog(AutoDeleteOnIdleDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleHours.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleHours.Text, out hours)) - { - writeToLog(AutoDeleteOnIdleHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMinutes.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleMinutes.Text, out minutes)) - { - writeToLog(AutoDeleteOnIdleMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleSeconds.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleSeconds.Text, out seconds)) - { - writeToLog(AutoDeleteOnIdleSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMilliseconds.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleMilliseconds.Text, out milliseconds)) - { - writeToLog(AutoDeleteOnIdleMillisecondsMustBeANumber); - return; - } - } - var timeSpan = new TimeSpan(days, hours, minutes, seconds, milliseconds); - if (!timeSpan.IsMaxValue()) - { - subscriptionWrapper.SubscriptionDescription.AutoDeleteOnIdle = timeSpan; - } + subscriptionWrapper.SubscriptionDescription.LockDuration = tsLockDuration.TimeSpanValue.Value; + } + else + { + writeToLog(tsLockDuration.GetErrorMessage(LockDuration)); + return; } + if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) + { + subscriptionWrapper.SubscriptionDescription.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; + } + else + { + writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); + return; + } + subscriptionWrapper.SubscriptionDescription.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); subscriptionWrapper.SubscriptionDescription.EnableDeadLetteringOnFilterEvaluationExceptions = checkedListBox.GetItemChecked(EnableDeadLetteringOnFilterEvaluationExceptionsIndex); subscriptionWrapper.SubscriptionDescription.EnableDeadLetteringOnMessageExpiration = checkedListBox.GetItemChecked(EnableDeadLetteringOnMessageExpirationIndex); @@ -2252,9 +1935,7 @@ private void messagesDataGridView_RowEnter(object sender, DataGridViewCellEventA LanguageDetector.SetFormattedMessage(serviceBusHelper, brokeredMessage, txtMessageText); - var listViewItems = brokeredMessage.Properties.Select(p => new ListViewItem(new[] { p.Key, Convert.ToString(p.Value) })).ToArray(); - messagePropertyListView.Items.Clear(); - messagePropertyListView.Items.AddRange(listViewItems); + messageCustomPropertyGrid.SelectedObject = new DictionaryPropertyGridAdapter(brokeredMessage.Properties); } } @@ -2347,9 +2028,7 @@ private void deadletterDataGridView_RowEnter(object sender, DataGridViewCellEven LanguageDetector.SetFormattedMessage(serviceBusHelper, deadletterMessage, txtDeadletterText); - var listViewItems = deadletterMessage.Properties.Select(p => new ListViewItem(new[] { p.Key, Convert.ToString(p.Value) })).ToArray(); - deadletterPropertyListView.Items.Clear(); - deadletterPropertyListView.Items.AddRange(listViewItems); + deadletterCustomPropertyGrid.SelectedObject = new DictionaryPropertyGridAdapter(deadletterMessage.Properties); } } @@ -2375,41 +2054,6 @@ private void DisablePage(string pageName) hiddenPages.Add(page); } - private void textBox_KeyPress(object sender, KeyPressEventArgs e) - { - OnKeyPress(e); - - var numberFormatInfo = CultureInfo.CurrentCulture.NumberFormat; - var decimalSeparator = numberFormatInfo.NumberDecimalSeparator; - var groupSeparator = numberFormatInfo.NumberGroupSeparator; - var negativeSign = numberFormatInfo.NegativeSign; - - var keyInput = e.KeyChar.ToString(CultureInfo.InvariantCulture); - - if (char.IsDigit(e.KeyChar)) - { - // Digits are OK - } - else if (keyInput.Equals(decimalSeparator) || keyInput.Equals(groupSeparator) || - keyInput.Equals(negativeSign)) - { - // Decimal separator is OK - } - else if (e.KeyChar == '\b') - { - // Backspace key is OK - } - else if (e.KeyChar == ' ') - { - - } - else - { - // Swallow this invalid key and beep - e.Handled = true; - } - } - private void messagesDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) @@ -2478,8 +2122,8 @@ private void grouperMessageText_CustomPaint(PaintEventArgs obj) private void grouperMessageCustomProperties_CustomPaint(PaintEventArgs obj) { - messagePropertyListView.Size = new Size(grouperMessageCustomProperties.Size.Width - (messagePropertyListView.Location.X * 2), - grouperMessageCustomProperties.Size.Height - messagePropertyListView.Location.Y - messagePropertyListView.Location.X); + messageCustomPropertyGrid.Size = new Size(grouperMessageCustomProperties.Size.Width - (messageCustomPropertyGrid.Location.X * 2), + grouperMessageCustomProperties.Size.Height - messageCustomPropertyGrid.Location.Y - messageCustomPropertyGrid.Location.X); } private void grouperMessageProperties_CustomPaint(PaintEventArgs obj) @@ -2496,8 +2140,8 @@ private void grouperDeadletterText_CustomPaint(PaintEventArgs obj) private void grouperDeadletterCustomProperties_CustomPaint(PaintEventArgs obj) { - deadletterPropertyListView.Size = new Size(grouperDeadletterCustomProperties.Size.Width - (deadletterPropertyListView.Location.X * 2), - grouperDeadletterCustomProperties.Size.Height - deadletterPropertyListView.Location.Y - deadletterPropertyListView.Location.X); + deadletterCustomPropertyGrid.Size = new Size(grouperDeadletterCustomProperties.Size.Width - (deadletterCustomPropertyGrid.Location.X * 2), + grouperDeadletterCustomProperties.Size.Height - deadletterCustomPropertyGrid.Location.Y - deadletterCustomPropertyGrid.Location.X); } private void grouperDeadletterSystemProperties_CustomPaint(PaintEventArgs obj) diff --git a/src/ServiceBusExplorer/Controls/HandleTopicControl.Designer.cs b/src/ServiceBusExplorer/Controls/HandleTopicControl.Designer.cs index c7ca22d1..be3c6581 100644 --- a/src/ServiceBusExplorer/Controls/HandleTopicControl.Designer.cs +++ b/src/ServiceBusExplorer/Controls/HandleTopicControl.Designer.cs @@ -22,43 +22,13 @@ private void InitializeComponent() this.messagesBindingSource = new System.Windows.Forms.BindingSource(this.components); this.tabPageDescription = new System.Windows.Forms.TabPage(); this.grouperAutoDeleteOnIdle = new ServiceBusExplorer.Controls.Grouper(); - this.lblAutoDeleteOnIdleMilliseconds = new System.Windows.Forms.Label(); - this.txtAutoDeleteOnIdleMilliseconds = new System.Windows.Forms.TextBox(); - this.lblAutoDeleteOnIdleSeconds = new System.Windows.Forms.Label(); - this.txtAutoDeleteOnIdleSeconds = new System.Windows.Forms.TextBox(); - this.lblAutoDeleteOnIdleMinutes = new System.Windows.Forms.Label(); - this.txtAutoDeleteOnIdleMinutes = new System.Windows.Forms.TextBox(); - this.lblAutoDeleteOnIdleHours = new System.Windows.Forms.Label(); - this.lblAutoDeleteOnIdleDays = new System.Windows.Forms.Label(); - this.txtAutoDeleteOnIdleHours = new System.Windows.Forms.TextBox(); - this.txtAutoDeleteOnIdleDays = new System.Windows.Forms.TextBox(); this.groupergrouperDefaultMessageTimeToLive = new ServiceBusExplorer.Controls.Grouper(); - this.lblDefaultMessageTimeToLiveMilliseconds = new System.Windows.Forms.Label(); - this.txtDefaultMessageTimeToLiveMilliseconds = new System.Windows.Forms.TextBox(); - this.lblDefaultMessageTimeToLiveSeconds = new System.Windows.Forms.Label(); - this.txtDefaultMessageTimeToLiveSeconds = new System.Windows.Forms.TextBox(); - this.lblDefaultMessageTimeToLiveMinutes = new System.Windows.Forms.Label(); - this.txtDefaultMessageTimeToLiveMinutes = new System.Windows.Forms.TextBox(); - this.lbllblDefaultMessageTimeToLiveHours = new System.Windows.Forms.Label(); - this.lblDefaultMessageTimeToLiveDays = new System.Windows.Forms.Label(); - this.txtDefaultMessageTimeToLiveHours = new System.Windows.Forms.TextBox(); - this.txtDefaultMessageTimeToLiveDays = new System.Windows.Forms.TextBox(); this.grouperTopicSettings = new ServiceBusExplorer.Controls.Grouper(); this.checkedListBox = new System.Windows.Forms.CheckedListBox(); this.grouperPath = new ServiceBusExplorer.Controls.Grouper(); this.lblRelativeURI = new System.Windows.Forms.Label(); this.txtPath = new System.Windows.Forms.TextBox(); this.grouperDuplicateDetectionHistoryTimeWindow = new ServiceBusExplorer.Controls.Grouper(); - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds = new System.Windows.Forms.Label(); - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds = new System.Windows.Forms.TextBox(); - this.lblDuplicateDetectionHistoryTimeWindowSeconds = new System.Windows.Forms.Label(); - this.txtDuplicateDetectionHistoryTimeWindowSeconds = new System.Windows.Forms.TextBox(); - this.lblDuplicateDetectionHistoryTimeWindowMinutes = new System.Windows.Forms.Label(); - this.txtDuplicateDetectionHistoryTimeWindowMinutes = new System.Windows.Forms.TextBox(); - this.lblDuplicateDetectionHistoryTimeWindowHours = new System.Windows.Forms.Label(); - this.lblDuplicateDetectionHistoryTimeWindowDays = new System.Windows.Forms.Label(); - this.txtDuplicateDetectionHistoryTimeWindowHours = new System.Windows.Forms.TextBox(); - this.txtDuplicateDetectionHistoryTimeWindowDays = new System.Windows.Forms.TextBox(); this.grouperTopicProperties = new ServiceBusExplorer.Controls.Grouper(); this.lblMaxTopicSizeInGB = new System.Windows.Forms.Label(); this.trackBarMaxTopicSize = new ServiceBusExplorer.Controls.CustomTrackBar(); @@ -80,6 +50,9 @@ private void InitializeComponent() this.btnCreateDelete = new System.Windows.Forms.Button(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.authorizationRulesBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.tsDefaultMessageTimeToLive = new ServiceBusExplorer.Controls.TimeSpanControl(); + this.tsDuplicateDetectionHistoryTimeWindow = new ServiceBusExplorer.Controls.TimeSpanControl(); + this.tsAutoDeleteOnIdle = new ServiceBusExplorer.Controls.TimeSpanControl(); ((System.ComponentModel.ISupportInitialize)(this.deadletterBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.sessionsBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.messagesBindingSource)).BeginInit(); @@ -109,10 +82,9 @@ private void InitializeComponent() this.tabPageDescription.Controls.Add(this.grouperTopicProperties); this.tabPageDescription.Controls.Add(this.grouperTopicInformation); this.tabPageDescription.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabPageDescription.Location = new System.Drawing.Point(4, 27); - this.tabPageDescription.Margin = new System.Windows.Forms.Padding(4); + this.tabPageDescription.Location = new System.Drawing.Point(4, 24); this.tabPageDescription.Name = "tabPageDescription"; - this.tabPageDescription.Size = new System.Drawing.Size(1293, 560); + this.tabPageDescription.Size = new System.Drawing.Size(968, 452); this.tabPageDescription.TabIndex = 2; this.tabPageDescription.Text = "Description"; // @@ -123,138 +95,23 @@ private void InitializeComponent() this.grouperAutoDeleteOnIdle.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.grouperAutoDeleteOnIdle.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperAutoDeleteOnIdle.BorderThickness = 1F; - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleMilliseconds); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleMilliseconds); - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleSeconds); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleSeconds); - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleMinutes); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleMinutes); - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleHours); - this.grouperAutoDeleteOnIdle.Controls.Add(this.lblAutoDeleteOnIdleDays); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleHours); - this.grouperAutoDeleteOnIdle.Controls.Add(this.txtAutoDeleteOnIdleDays); + this.grouperAutoDeleteOnIdle.Controls.Add(this.tsAutoDeleteOnIdle); this.grouperAutoDeleteOnIdle.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperAutoDeleteOnIdle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.grouperAutoDeleteOnIdle.ForeColor = System.Drawing.Color.White; this.grouperAutoDeleteOnIdle.GroupImage = null; this.grouperAutoDeleteOnIdle.GroupTitle = "Auto Delete On Idle"; - this.grouperAutoDeleteOnIdle.Location = new System.Drawing.Point(21, 118); - this.grouperAutoDeleteOnIdle.Margin = new System.Windows.Forms.Padding(4); + this.grouperAutoDeleteOnIdle.Location = new System.Drawing.Point(16, 96); this.grouperAutoDeleteOnIdle.Name = "grouperAutoDeleteOnIdle"; - this.grouperAutoDeleteOnIdle.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperAutoDeleteOnIdle.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); this.grouperAutoDeleteOnIdle.PaintGroupBox = true; this.grouperAutoDeleteOnIdle.RoundCorners = 4; this.grouperAutoDeleteOnIdle.ShadowColor = System.Drawing.Color.DarkGray; this.grouperAutoDeleteOnIdle.ShadowControl = false; this.grouperAutoDeleteOnIdle.ShadowThickness = 1; - this.grouperAutoDeleteOnIdle.Size = new System.Drawing.Size(395, 98); + this.grouperAutoDeleteOnIdle.Size = new System.Drawing.Size(296, 80); this.grouperAutoDeleteOnIdle.TabIndex = 1; // - // lblAutoDeleteOnIdleMilliseconds - // - this.lblAutoDeleteOnIdleMilliseconds.AutoSize = true; - this.lblAutoDeleteOnIdleMilliseconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleMilliseconds.Location = new System.Drawing.Point(320, 34); - this.lblAutoDeleteOnIdleMilliseconds.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblAutoDeleteOnIdleMilliseconds.Name = "lblAutoDeleteOnIdleMilliseconds"; - this.lblAutoDeleteOnIdleMilliseconds.Size = new System.Drawing.Size(64, 17); - this.lblAutoDeleteOnIdleMilliseconds.TabIndex = 25; - this.lblAutoDeleteOnIdleMilliseconds.Text = "Millisecs:"; - // - // txtAutoDeleteOnIdleMilliseconds - // - this.txtAutoDeleteOnIdleMilliseconds.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleMilliseconds.Location = new System.Drawing.Point(320, 54); - this.txtAutoDeleteOnIdleMilliseconds.Margin = new System.Windows.Forms.Padding(4); - this.txtAutoDeleteOnIdleMilliseconds.Name = "txtAutoDeleteOnIdleMilliseconds"; - this.txtAutoDeleteOnIdleMilliseconds.Size = new System.Drawing.Size(52, 23); - this.txtAutoDeleteOnIdleMilliseconds.TabIndex = 4; - this.txtAutoDeleteOnIdleMilliseconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblAutoDeleteOnIdleSeconds - // - this.lblAutoDeleteOnIdleSeconds.AutoSize = true; - this.lblAutoDeleteOnIdleSeconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleSeconds.Location = new System.Drawing.Point(245, 34); - this.lblAutoDeleteOnIdleSeconds.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblAutoDeleteOnIdleSeconds.Name = "lblAutoDeleteOnIdleSeconds"; - this.lblAutoDeleteOnIdleSeconds.Size = new System.Drawing.Size(67, 17); - this.lblAutoDeleteOnIdleSeconds.TabIndex = 24; - this.lblAutoDeleteOnIdleSeconds.Text = "Seconds:"; - // - // txtAutoDeleteOnIdleSeconds - // - this.txtAutoDeleteOnIdleSeconds.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleSeconds.Location = new System.Drawing.Point(245, 54); - this.txtAutoDeleteOnIdleSeconds.Margin = new System.Windows.Forms.Padding(4); - this.txtAutoDeleteOnIdleSeconds.Name = "txtAutoDeleteOnIdleSeconds"; - this.txtAutoDeleteOnIdleSeconds.Size = new System.Drawing.Size(52, 23); - this.txtAutoDeleteOnIdleSeconds.TabIndex = 3; - this.txtAutoDeleteOnIdleSeconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblAutoDeleteOnIdleMinutes - // - this.lblAutoDeleteOnIdleMinutes.AutoSize = true; - this.lblAutoDeleteOnIdleMinutes.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleMinutes.Location = new System.Drawing.Point(171, 34); - this.lblAutoDeleteOnIdleMinutes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblAutoDeleteOnIdleMinutes.Name = "lblAutoDeleteOnIdleMinutes"; - this.lblAutoDeleteOnIdleMinutes.Size = new System.Drawing.Size(61, 17); - this.lblAutoDeleteOnIdleMinutes.TabIndex = 23; - this.lblAutoDeleteOnIdleMinutes.Text = "Minutes:"; - // - // txtAutoDeleteOnIdleMinutes - // - this.txtAutoDeleteOnIdleMinutes.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleMinutes.Location = new System.Drawing.Point(171, 54); - this.txtAutoDeleteOnIdleMinutes.Margin = new System.Windows.Forms.Padding(4); - this.txtAutoDeleteOnIdleMinutes.Name = "txtAutoDeleteOnIdleMinutes"; - this.txtAutoDeleteOnIdleMinutes.Size = new System.Drawing.Size(52, 23); - this.txtAutoDeleteOnIdleMinutes.TabIndex = 2; - this.txtAutoDeleteOnIdleMinutes.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblAutoDeleteOnIdleHours - // - this.lblAutoDeleteOnIdleHours.AutoSize = true; - this.lblAutoDeleteOnIdleHours.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleHours.Location = new System.Drawing.Point(96, 34); - this.lblAutoDeleteOnIdleHours.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblAutoDeleteOnIdleHours.Name = "lblAutoDeleteOnIdleHours"; - this.lblAutoDeleteOnIdleHours.Size = new System.Drawing.Size(50, 17); - this.lblAutoDeleteOnIdleHours.TabIndex = 22; - this.lblAutoDeleteOnIdleHours.Text = "Hours:"; - // - // lblAutoDeleteOnIdleDays - // - this.lblAutoDeleteOnIdleDays.AutoSize = true; - this.lblAutoDeleteOnIdleDays.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblAutoDeleteOnIdleDays.Location = new System.Drawing.Point(21, 34); - this.lblAutoDeleteOnIdleDays.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblAutoDeleteOnIdleDays.Name = "lblAutoDeleteOnIdleDays"; - this.lblAutoDeleteOnIdleDays.Size = new System.Drawing.Size(44, 17); - this.lblAutoDeleteOnIdleDays.TabIndex = 21; - this.lblAutoDeleteOnIdleDays.Text = "Days:"; - // - // txtAutoDeleteOnIdleHours - // - this.txtAutoDeleteOnIdleHours.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleHours.Location = new System.Drawing.Point(96, 54); - this.txtAutoDeleteOnIdleHours.Margin = new System.Windows.Forms.Padding(4); - this.txtAutoDeleteOnIdleHours.Name = "txtAutoDeleteOnIdleHours"; - this.txtAutoDeleteOnIdleHours.Size = new System.Drawing.Size(52, 23); - this.txtAutoDeleteOnIdleHours.TabIndex = 1; - this.txtAutoDeleteOnIdleHours.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // txtAutoDeleteOnIdleDays - // - this.txtAutoDeleteOnIdleDays.BackColor = System.Drawing.SystemColors.Window; - this.txtAutoDeleteOnIdleDays.Location = new System.Drawing.Point(21, 54); - this.txtAutoDeleteOnIdleDays.Margin = new System.Windows.Forms.Padding(4); - this.txtAutoDeleteOnIdleDays.Name = "txtAutoDeleteOnIdleDays"; - this.txtAutoDeleteOnIdleDays.Size = new System.Drawing.Size(52, 23); - this.txtAutoDeleteOnIdleDays.TabIndex = 0; - this.txtAutoDeleteOnIdleDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // // groupergrouperDefaultMessageTimeToLive // this.groupergrouperDefaultMessageTimeToLive.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); @@ -262,138 +119,23 @@ private void InitializeComponent() this.groupergrouperDefaultMessageTimeToLive.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.groupergrouperDefaultMessageTimeToLive.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.groupergrouperDefaultMessageTimeToLive.BorderThickness = 1F; - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lblDefaultMessageTimeToLiveMilliseconds); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveMilliseconds); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lblDefaultMessageTimeToLiveSeconds); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveSeconds); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lblDefaultMessageTimeToLiveMinutes); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveMinutes); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lbllblDefaultMessageTimeToLiveHours); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.lblDefaultMessageTimeToLiveDays); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveHours); - this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.txtDefaultMessageTimeToLiveDays); + this.groupergrouperDefaultMessageTimeToLive.Controls.Add(this.tsDefaultMessageTimeToLive); this.groupergrouperDefaultMessageTimeToLive.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.groupergrouperDefaultMessageTimeToLive.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.groupergrouperDefaultMessageTimeToLive.ForeColor = System.Drawing.Color.White; this.groupergrouperDefaultMessageTimeToLive.GroupImage = null; this.groupergrouperDefaultMessageTimeToLive.GroupTitle = "Default Message Time To Live"; - this.groupergrouperDefaultMessageTimeToLive.Location = new System.Drawing.Point(437, 118); - this.groupergrouperDefaultMessageTimeToLive.Margin = new System.Windows.Forms.Padding(4); + this.groupergrouperDefaultMessageTimeToLive.Location = new System.Drawing.Point(328, 96); this.groupergrouperDefaultMessageTimeToLive.Name = "groupergrouperDefaultMessageTimeToLive"; - this.groupergrouperDefaultMessageTimeToLive.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.groupergrouperDefaultMessageTimeToLive.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); this.groupergrouperDefaultMessageTimeToLive.PaintGroupBox = true; this.groupergrouperDefaultMessageTimeToLive.RoundCorners = 4; this.groupergrouperDefaultMessageTimeToLive.ShadowColor = System.Drawing.Color.DarkGray; this.groupergrouperDefaultMessageTimeToLive.ShadowControl = false; this.groupergrouperDefaultMessageTimeToLive.ShadowThickness = 1; - this.groupergrouperDefaultMessageTimeToLive.Size = new System.Drawing.Size(395, 98); + this.groupergrouperDefaultMessageTimeToLive.Size = new System.Drawing.Size(296, 80); this.groupergrouperDefaultMessageTimeToLive.TabIndex = 2; // - // lblDefaultMessageTimeToLiveMilliseconds - // - this.lblDefaultMessageTimeToLiveMilliseconds.AutoSize = true; - this.lblDefaultMessageTimeToLiveMilliseconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDefaultMessageTimeToLiveMilliseconds.Location = new System.Drawing.Point(320, 34); - this.lblDefaultMessageTimeToLiveMilliseconds.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblDefaultMessageTimeToLiveMilliseconds.Name = "lblDefaultMessageTimeToLiveMilliseconds"; - this.lblDefaultMessageTimeToLiveMilliseconds.Size = new System.Drawing.Size(64, 17); - this.lblDefaultMessageTimeToLiveMilliseconds.TabIndex = 25; - this.lblDefaultMessageTimeToLiveMilliseconds.Text = "Millisecs:"; - // - // txtDefaultMessageTimeToLiveMilliseconds - // - this.txtDefaultMessageTimeToLiveMilliseconds.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveMilliseconds.Location = new System.Drawing.Point(320, 54); - this.txtDefaultMessageTimeToLiveMilliseconds.Margin = new System.Windows.Forms.Padding(4); - this.txtDefaultMessageTimeToLiveMilliseconds.Name = "txtDefaultMessageTimeToLiveMilliseconds"; - this.txtDefaultMessageTimeToLiveMilliseconds.Size = new System.Drawing.Size(52, 23); - this.txtDefaultMessageTimeToLiveMilliseconds.TabIndex = 4; - this.txtDefaultMessageTimeToLiveMilliseconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDefaultMessageTimeToLiveSeconds - // - this.lblDefaultMessageTimeToLiveSeconds.AutoSize = true; - this.lblDefaultMessageTimeToLiveSeconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDefaultMessageTimeToLiveSeconds.Location = new System.Drawing.Point(245, 34); - this.lblDefaultMessageTimeToLiveSeconds.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblDefaultMessageTimeToLiveSeconds.Name = "lblDefaultMessageTimeToLiveSeconds"; - this.lblDefaultMessageTimeToLiveSeconds.Size = new System.Drawing.Size(67, 17); - this.lblDefaultMessageTimeToLiveSeconds.TabIndex = 24; - this.lblDefaultMessageTimeToLiveSeconds.Text = "Seconds:"; - // - // txtDefaultMessageTimeToLiveSeconds - // - this.txtDefaultMessageTimeToLiveSeconds.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveSeconds.Location = new System.Drawing.Point(245, 54); - this.txtDefaultMessageTimeToLiveSeconds.Margin = new System.Windows.Forms.Padding(4); - this.txtDefaultMessageTimeToLiveSeconds.Name = "txtDefaultMessageTimeToLiveSeconds"; - this.txtDefaultMessageTimeToLiveSeconds.Size = new System.Drawing.Size(52, 23); - this.txtDefaultMessageTimeToLiveSeconds.TabIndex = 3; - this.txtDefaultMessageTimeToLiveSeconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDefaultMessageTimeToLiveMinutes - // - this.lblDefaultMessageTimeToLiveMinutes.AutoSize = true; - this.lblDefaultMessageTimeToLiveMinutes.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDefaultMessageTimeToLiveMinutes.Location = new System.Drawing.Point(171, 34); - this.lblDefaultMessageTimeToLiveMinutes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblDefaultMessageTimeToLiveMinutes.Name = "lblDefaultMessageTimeToLiveMinutes"; - this.lblDefaultMessageTimeToLiveMinutes.Size = new System.Drawing.Size(61, 17); - this.lblDefaultMessageTimeToLiveMinutes.TabIndex = 23; - this.lblDefaultMessageTimeToLiveMinutes.Text = "Minutes:"; - // - // txtDefaultMessageTimeToLiveMinutes - // - this.txtDefaultMessageTimeToLiveMinutes.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveMinutes.Location = new System.Drawing.Point(171, 54); - this.txtDefaultMessageTimeToLiveMinutes.Margin = new System.Windows.Forms.Padding(4); - this.txtDefaultMessageTimeToLiveMinutes.Name = "txtDefaultMessageTimeToLiveMinutes"; - this.txtDefaultMessageTimeToLiveMinutes.Size = new System.Drawing.Size(52, 23); - this.txtDefaultMessageTimeToLiveMinutes.TabIndex = 2; - this.txtDefaultMessageTimeToLiveMinutes.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lbllblDefaultMessageTimeToLiveHours - // - this.lbllblDefaultMessageTimeToLiveHours.AutoSize = true; - this.lbllblDefaultMessageTimeToLiveHours.ForeColor = System.Drawing.SystemColors.ControlText; - this.lbllblDefaultMessageTimeToLiveHours.Location = new System.Drawing.Point(96, 34); - this.lbllblDefaultMessageTimeToLiveHours.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lbllblDefaultMessageTimeToLiveHours.Name = "lbllblDefaultMessageTimeToLiveHours"; - this.lbllblDefaultMessageTimeToLiveHours.Size = new System.Drawing.Size(50, 17); - this.lbllblDefaultMessageTimeToLiveHours.TabIndex = 22; - this.lbllblDefaultMessageTimeToLiveHours.Text = "Hours:"; - // - // lblDefaultMessageTimeToLiveDays - // - this.lblDefaultMessageTimeToLiveDays.AutoSize = true; - this.lblDefaultMessageTimeToLiveDays.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDefaultMessageTimeToLiveDays.Location = new System.Drawing.Point(21, 34); - this.lblDefaultMessageTimeToLiveDays.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblDefaultMessageTimeToLiveDays.Name = "lblDefaultMessageTimeToLiveDays"; - this.lblDefaultMessageTimeToLiveDays.Size = new System.Drawing.Size(44, 17); - this.lblDefaultMessageTimeToLiveDays.TabIndex = 21; - this.lblDefaultMessageTimeToLiveDays.Text = "Days:"; - // - // txtDefaultMessageTimeToLiveHours - // - this.txtDefaultMessageTimeToLiveHours.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveHours.Location = new System.Drawing.Point(96, 54); - this.txtDefaultMessageTimeToLiveHours.Margin = new System.Windows.Forms.Padding(4); - this.txtDefaultMessageTimeToLiveHours.Name = "txtDefaultMessageTimeToLiveHours"; - this.txtDefaultMessageTimeToLiveHours.Size = new System.Drawing.Size(52, 23); - this.txtDefaultMessageTimeToLiveHours.TabIndex = 1; - this.txtDefaultMessageTimeToLiveHours.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // txtDefaultMessageTimeToLiveDays - // - this.txtDefaultMessageTimeToLiveDays.BackColor = System.Drawing.SystemColors.Window; - this.txtDefaultMessageTimeToLiveDays.Location = new System.Drawing.Point(21, 54); - this.txtDefaultMessageTimeToLiveDays.Margin = new System.Windows.Forms.Padding(4); - this.txtDefaultMessageTimeToLiveDays.Name = "txtDefaultMessageTimeToLiveDays"; - this.txtDefaultMessageTimeToLiveDays.Size = new System.Drawing.Size(52, 23); - this.txtDefaultMessageTimeToLiveDays.TabIndex = 0; - this.txtDefaultMessageTimeToLiveDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // // grouperTopicSettings // this.grouperTopicSettings.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -409,16 +151,15 @@ private void InitializeComponent() this.grouperTopicSettings.ForeColor = System.Drawing.Color.White; this.grouperTopicSettings.GroupImage = null; this.grouperTopicSettings.GroupTitle = "Topic Settings"; - this.grouperTopicSettings.Location = new System.Drawing.Point(437, 335); - this.grouperTopicSettings.Margin = new System.Windows.Forms.Padding(4); + this.grouperTopicSettings.Location = new System.Drawing.Point(328, 272); this.grouperTopicSettings.Name = "grouperTopicSettings"; - this.grouperTopicSettings.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperTopicSettings.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); this.grouperTopicSettings.PaintGroupBox = true; this.grouperTopicSettings.RoundCorners = 4; this.grouperTopicSettings.ShadowColor = System.Drawing.Color.DarkGray; this.grouperTopicSettings.ShadowControl = false; this.grouperTopicSettings.ShadowThickness = 1; - this.grouperTopicSettings.Size = new System.Drawing.Size(395, 207); + this.grouperTopicSettings.Size = new System.Drawing.Size(296, 168); this.grouperTopicSettings.TabIndex = 5; // // checkedListBox @@ -437,10 +178,10 @@ private void InitializeComponent() "Requires Duplicate Detection", "Enforce Message Ordering", "Is Anonymous Accessible"}); - this.checkedListBox.Location = new System.Drawing.Point(21, 53); - this.checkedListBox.Margin = new System.Windows.Forms.Padding(11, 10, 11, 10); + this.checkedListBox.Location = new System.Drawing.Point(16, 43); + this.checkedListBox.Margin = new System.Windows.Forms.Padding(8, 8, 8, 8); this.checkedListBox.Name = "checkedListBox"; - this.checkedListBox.Size = new System.Drawing.Size(351, 130); + this.checkedListBox.Size = new System.Drawing.Size(264, 94); this.checkedListBox.TabIndex = 0; this.checkedListBox.ThreeDCheckBoxes = true; this.checkedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.checkedListBox_ItemCheck); @@ -459,26 +200,24 @@ private void InitializeComponent() this.grouperPath.ForeColor = System.Drawing.Color.White; this.grouperPath.GroupImage = null; this.grouperPath.GroupTitle = "Path"; - this.grouperPath.Location = new System.Drawing.Point(21, 10); - this.grouperPath.Margin = new System.Windows.Forms.Padding(4); + this.grouperPath.Location = new System.Drawing.Point(16, 8); this.grouperPath.Name = "grouperPath"; - this.grouperPath.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperPath.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); this.grouperPath.PaintGroupBox = true; this.grouperPath.RoundCorners = 4; this.grouperPath.ShadowColor = System.Drawing.Color.DarkGray; this.grouperPath.ShadowControl = false; this.grouperPath.ShadowThickness = 1; - this.grouperPath.Size = new System.Drawing.Size(811, 98); + this.grouperPath.Size = new System.Drawing.Size(608, 80); this.grouperPath.TabIndex = 0; // // lblRelativeURI // this.lblRelativeURI.AutoSize = true; this.lblRelativeURI.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblRelativeURI.Location = new System.Drawing.Point(21, 34); - this.lblRelativeURI.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblRelativeURI.Location = new System.Drawing.Point(16, 28); this.lblRelativeURI.Name = "lblRelativeURI"; - this.lblRelativeURI.Size = new System.Drawing.Size(90, 17); + this.lblRelativeURI.Size = new System.Drawing.Size(71, 13); this.lblRelativeURI.TabIndex = 22; this.lblRelativeURI.Text = "Relative URI:"; // @@ -488,10 +227,9 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.txtPath.BackColor = System.Drawing.SystemColors.Window; this.txtPath.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.txtPath.Location = new System.Drawing.Point(21, 54); - this.txtPath.Margin = new System.Windows.Forms.Padding(4); + this.txtPath.Location = new System.Drawing.Point(16, 44); this.txtPath.Name = "txtPath"; - this.txtPath.Size = new System.Drawing.Size(767, 23); + this.txtPath.Size = new System.Drawing.Size(576, 20); this.txtPath.TabIndex = 0; // // grouperDuplicateDetectionHistoryTimeWindow @@ -501,138 +239,23 @@ private void InitializeComponent() this.grouperDuplicateDetectionHistoryTimeWindow.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; this.grouperDuplicateDetectionHistoryTimeWindow.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperDuplicateDetectionHistoryTimeWindow.BorderThickness = 1F; - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowMilliseconds); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtDuplicateDetectionHistoryTimeWindowMilliseconds); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowSeconds); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtDuplicateDetectionHistoryTimeWindowSeconds); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowMinutes); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtDuplicateDetectionHistoryTimeWindowMinutes); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowHours); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.lblDuplicateDetectionHistoryTimeWindowDays); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtDuplicateDetectionHistoryTimeWindowHours); - this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.txtDuplicateDetectionHistoryTimeWindowDays); + this.grouperDuplicateDetectionHistoryTimeWindow.Controls.Add(this.tsDuplicateDetectionHistoryTimeWindow); this.grouperDuplicateDetectionHistoryTimeWindow.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperDuplicateDetectionHistoryTimeWindow.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.grouperDuplicateDetectionHistoryTimeWindow.ForeColor = System.Drawing.Color.White; this.grouperDuplicateDetectionHistoryTimeWindow.GroupImage = null; this.grouperDuplicateDetectionHistoryTimeWindow.GroupTitle = "Duplicate Detection History Time Window"; - this.grouperDuplicateDetectionHistoryTimeWindow.Location = new System.Drawing.Point(437, 226); - this.grouperDuplicateDetectionHistoryTimeWindow.Margin = new System.Windows.Forms.Padding(4); + this.grouperDuplicateDetectionHistoryTimeWindow.Location = new System.Drawing.Point(328, 184); this.grouperDuplicateDetectionHistoryTimeWindow.Name = "grouperDuplicateDetectionHistoryTimeWindow"; - this.grouperDuplicateDetectionHistoryTimeWindow.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperDuplicateDetectionHistoryTimeWindow.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); this.grouperDuplicateDetectionHistoryTimeWindow.PaintGroupBox = true; this.grouperDuplicateDetectionHistoryTimeWindow.RoundCorners = 4; this.grouperDuplicateDetectionHistoryTimeWindow.ShadowColor = System.Drawing.Color.DarkGray; this.grouperDuplicateDetectionHistoryTimeWindow.ShadowControl = false; this.grouperDuplicateDetectionHistoryTimeWindow.ShadowThickness = 1; - this.grouperDuplicateDetectionHistoryTimeWindow.Size = new System.Drawing.Size(395, 98); + this.grouperDuplicateDetectionHistoryTimeWindow.Size = new System.Drawing.Size(296, 80); this.grouperDuplicateDetectionHistoryTimeWindow.TabIndex = 4; // - // lblDuplicateDetectionHistoryTimeWindowMilliseconds - // - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.Location = new System.Drawing.Point(320, 34); - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.Name = "lblDuplicateDetectionHistoryTimeWindowMilliseconds"; - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.Size = new System.Drawing.Size(64, 17); - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.TabIndex = 25; - this.lblDuplicateDetectionHistoryTimeWindowMilliseconds.Text = "Millisecs:"; - // - // txtDuplicateDetectionHistoryTimeWindowMilliseconds - // - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds.BackColor = System.Drawing.SystemColors.Window; - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds.Location = new System.Drawing.Point(320, 54); - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds.Margin = new System.Windows.Forms.Padding(4); - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds.Name = "txtDuplicateDetectionHistoryTimeWindowMilliseconds"; - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds.Size = new System.Drawing.Size(52, 23); - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds.TabIndex = 4; - this.txtDuplicateDetectionHistoryTimeWindowMilliseconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDuplicateDetectionHistoryTimeWindowSeconds - // - this.lblDuplicateDetectionHistoryTimeWindowSeconds.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowSeconds.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowSeconds.Location = new System.Drawing.Point(245, 34); - this.lblDuplicateDetectionHistoryTimeWindowSeconds.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblDuplicateDetectionHistoryTimeWindowSeconds.Name = "lblDuplicateDetectionHistoryTimeWindowSeconds"; - this.lblDuplicateDetectionHistoryTimeWindowSeconds.Size = new System.Drawing.Size(67, 17); - this.lblDuplicateDetectionHistoryTimeWindowSeconds.TabIndex = 24; - this.lblDuplicateDetectionHistoryTimeWindowSeconds.Text = "Seconds:"; - // - // txtDuplicateDetectionHistoryTimeWindowSeconds - // - this.txtDuplicateDetectionHistoryTimeWindowSeconds.BackColor = System.Drawing.SystemColors.Window; - this.txtDuplicateDetectionHistoryTimeWindowSeconds.Location = new System.Drawing.Point(245, 54); - this.txtDuplicateDetectionHistoryTimeWindowSeconds.Margin = new System.Windows.Forms.Padding(4); - this.txtDuplicateDetectionHistoryTimeWindowSeconds.Name = "txtDuplicateDetectionHistoryTimeWindowSeconds"; - this.txtDuplicateDetectionHistoryTimeWindowSeconds.Size = new System.Drawing.Size(52, 23); - this.txtDuplicateDetectionHistoryTimeWindowSeconds.TabIndex = 3; - this.txtDuplicateDetectionHistoryTimeWindowSeconds.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDuplicateDetectionHistoryTimeWindowMinutes - // - this.lblDuplicateDetectionHistoryTimeWindowMinutes.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowMinutes.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowMinutes.Location = new System.Drawing.Point(171, 34); - this.lblDuplicateDetectionHistoryTimeWindowMinutes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblDuplicateDetectionHistoryTimeWindowMinutes.Name = "lblDuplicateDetectionHistoryTimeWindowMinutes"; - this.lblDuplicateDetectionHistoryTimeWindowMinutes.Size = new System.Drawing.Size(61, 17); - this.lblDuplicateDetectionHistoryTimeWindowMinutes.TabIndex = 23; - this.lblDuplicateDetectionHistoryTimeWindowMinutes.Text = "Minutes:"; - // - // txtDuplicateDetectionHistoryTimeWindowMinutes - // - this.txtDuplicateDetectionHistoryTimeWindowMinutes.BackColor = System.Drawing.SystemColors.Window; - this.txtDuplicateDetectionHistoryTimeWindowMinutes.Location = new System.Drawing.Point(171, 54); - this.txtDuplicateDetectionHistoryTimeWindowMinutes.Margin = new System.Windows.Forms.Padding(4); - this.txtDuplicateDetectionHistoryTimeWindowMinutes.Name = "txtDuplicateDetectionHistoryTimeWindowMinutes"; - this.txtDuplicateDetectionHistoryTimeWindowMinutes.Size = new System.Drawing.Size(52, 23); - this.txtDuplicateDetectionHistoryTimeWindowMinutes.TabIndex = 2; - this.txtDuplicateDetectionHistoryTimeWindowMinutes.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // lblDuplicateDetectionHistoryTimeWindowHours - // - this.lblDuplicateDetectionHistoryTimeWindowHours.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowHours.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowHours.Location = new System.Drawing.Point(96, 34); - this.lblDuplicateDetectionHistoryTimeWindowHours.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblDuplicateDetectionHistoryTimeWindowHours.Name = "lblDuplicateDetectionHistoryTimeWindowHours"; - this.lblDuplicateDetectionHistoryTimeWindowHours.Size = new System.Drawing.Size(50, 17); - this.lblDuplicateDetectionHistoryTimeWindowHours.TabIndex = 22; - this.lblDuplicateDetectionHistoryTimeWindowHours.Text = "Hours:"; - // - // lblDuplicateDetectionHistoryTimeWindowDays - // - this.lblDuplicateDetectionHistoryTimeWindowDays.AutoSize = true; - this.lblDuplicateDetectionHistoryTimeWindowDays.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblDuplicateDetectionHistoryTimeWindowDays.Location = new System.Drawing.Point(21, 34); - this.lblDuplicateDetectionHistoryTimeWindowDays.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblDuplicateDetectionHistoryTimeWindowDays.Name = "lblDuplicateDetectionHistoryTimeWindowDays"; - this.lblDuplicateDetectionHistoryTimeWindowDays.Size = new System.Drawing.Size(44, 17); - this.lblDuplicateDetectionHistoryTimeWindowDays.TabIndex = 21; - this.lblDuplicateDetectionHistoryTimeWindowDays.Text = "Days:"; - // - // txtDuplicateDetectionHistoryTimeWindowHours - // - this.txtDuplicateDetectionHistoryTimeWindowHours.BackColor = System.Drawing.SystemColors.Window; - this.txtDuplicateDetectionHistoryTimeWindowHours.Location = new System.Drawing.Point(96, 54); - this.txtDuplicateDetectionHistoryTimeWindowHours.Margin = new System.Windows.Forms.Padding(4); - this.txtDuplicateDetectionHistoryTimeWindowHours.Name = "txtDuplicateDetectionHistoryTimeWindowHours"; - this.txtDuplicateDetectionHistoryTimeWindowHours.Size = new System.Drawing.Size(52, 23); - this.txtDuplicateDetectionHistoryTimeWindowHours.TabIndex = 1; - this.txtDuplicateDetectionHistoryTimeWindowHours.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // - // txtDuplicateDetectionHistoryTimeWindowDays - // - this.txtDuplicateDetectionHistoryTimeWindowDays.BackColor = System.Drawing.SystemColors.Window; - this.txtDuplicateDetectionHistoryTimeWindowDays.Location = new System.Drawing.Point(21, 54); - this.txtDuplicateDetectionHistoryTimeWindowDays.Margin = new System.Windows.Forms.Padding(4); - this.txtDuplicateDetectionHistoryTimeWindowDays.Name = "txtDuplicateDetectionHistoryTimeWindowDays"; - this.txtDuplicateDetectionHistoryTimeWindowDays.Size = new System.Drawing.Size(52, 23); - this.txtDuplicateDetectionHistoryTimeWindowDays.TabIndex = 0; - this.txtDuplicateDetectionHistoryTimeWindowDays.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); - // // grouperTopicProperties // this.grouperTopicProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -653,26 +276,24 @@ private void InitializeComponent() this.grouperTopicProperties.ForeColor = System.Drawing.Color.White; this.grouperTopicProperties.GroupImage = null; this.grouperTopicProperties.GroupTitle = "Topic Properties"; - this.grouperTopicProperties.Location = new System.Drawing.Point(21, 226); - this.grouperTopicProperties.Margin = new System.Windows.Forms.Padding(4); + this.grouperTopicProperties.Location = new System.Drawing.Point(16, 184); this.grouperTopicProperties.Name = "grouperTopicProperties"; - this.grouperTopicProperties.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperTopicProperties.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); this.grouperTopicProperties.PaintGroupBox = true; this.grouperTopicProperties.RoundCorners = 4; this.grouperTopicProperties.ShadowColor = System.Drawing.Color.DarkGray; this.grouperTopicProperties.ShadowControl = false; this.grouperTopicProperties.ShadowThickness = 1; - this.grouperTopicProperties.Size = new System.Drawing.Size(395, 315); + this.grouperTopicProperties.Size = new System.Drawing.Size(296, 256); this.grouperTopicProperties.TabIndex = 3; // // lblMaxTopicSizeInGB // this.lblMaxTopicSizeInGB.AutoSize = true; this.lblMaxTopicSizeInGB.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblMaxTopicSizeInGB.Location = new System.Drawing.Point(336, 59); - this.lblMaxTopicSizeInGB.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblMaxTopicSizeInGB.Location = new System.Drawing.Point(252, 48); this.lblMaxTopicSizeInGB.Name = "lblMaxTopicSizeInGB"; - this.lblMaxTopicSizeInGB.Size = new System.Drawing.Size(40, 17); + this.lblMaxTopicSizeInGB.Size = new System.Drawing.Size(31, 13); this.lblMaxTopicSizeInGB.TabIndex = 33; this.lblMaxTopicSizeInGB.Text = "1 GB"; // @@ -684,12 +305,11 @@ private void InitializeComponent() this.trackBarMaxTopicSize.ForeColor = System.Drawing.Color.Black; this.trackBarMaxTopicSize.IndentHeight = 6; this.trackBarMaxTopicSize.LargeChange = 1; - this.trackBarMaxTopicSize.Location = new System.Drawing.Point(11, 49); - this.trackBarMaxTopicSize.Margin = new System.Windows.Forms.Padding(4); + this.trackBarMaxTopicSize.Location = new System.Drawing.Point(8, 40); this.trackBarMaxTopicSize.Maximum = 10; this.trackBarMaxTopicSize.Minimum = 1; this.trackBarMaxTopicSize.Name = "trackBarMaxTopicSize"; - this.trackBarMaxTopicSize.Size = new System.Drawing.Size(331, 29); + this.trackBarMaxTopicSize.Size = new System.Drawing.Size(248, 29); this.trackBarMaxTopicSize.TabIndex = 35; this.trackBarMaxTopicSize.TextTickStyle = System.Windows.Forms.TickStyle.None; this.trackBarMaxTopicSize.TickColor = System.Drawing.Color.Black; @@ -708,22 +328,20 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.txtUserMetadata.BackColor = System.Drawing.SystemColors.Window; - this.txtUserMetadata.Location = new System.Drawing.Point(21, 108); - this.txtUserMetadata.Margin = new System.Windows.Forms.Padding(4); + this.txtUserMetadata.Location = new System.Drawing.Point(16, 88); this.txtUserMetadata.MaxLength = 0; this.txtUserMetadata.Multiline = true; this.txtUserMetadata.Name = "txtUserMetadata"; - this.txtUserMetadata.Size = new System.Drawing.Size(308, 186); + this.txtUserMetadata.Size = new System.Drawing.Size(232, 152); this.txtUserMetadata.TabIndex = 2; // // lblUserMetadata // this.lblUserMetadata.AutoSize = true; this.lblUserMetadata.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblUserMetadata.Location = new System.Drawing.Point(21, 89); - this.lblUserMetadata.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblUserMetadata.Location = new System.Drawing.Point(16, 72); this.lblUserMetadata.Name = "lblUserMetadata"; - this.lblUserMetadata.Size = new System.Drawing.Size(117, 17); + this.lblUserMetadata.Size = new System.Drawing.Size(88, 13); this.lblUserMetadata.TabIndex = 27; this.lblUserMetadata.Text = "User Description:"; // @@ -736,10 +354,9 @@ private void InitializeComponent() this.btnOpenDescriptionForm.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnOpenDescriptionForm.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOpenDescriptionForm.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnOpenDescriptionForm.Location = new System.Drawing.Point(341, 108); - this.btnOpenDescriptionForm.Margin = new System.Windows.Forms.Padding(4); + this.btnOpenDescriptionForm.Location = new System.Drawing.Point(256, 88); this.btnOpenDescriptionForm.Name = "btnOpenDescriptionForm"; - this.btnOpenDescriptionForm.Size = new System.Drawing.Size(32, 26); + this.btnOpenDescriptionForm.Size = new System.Drawing.Size(24, 21); this.btnOpenDescriptionForm.TabIndex = 3; this.btnOpenDescriptionForm.Text = "..."; this.btnOpenDescriptionForm.TextAlign = System.Drawing.ContentAlignment.TopCenter; @@ -752,10 +369,9 @@ private void InitializeComponent() // this.lblMaxTopicSize.AutoSize = true; this.lblMaxTopicSize.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblMaxTopicSize.Location = new System.Drawing.Point(21, 34); - this.lblMaxTopicSize.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblMaxTopicSize.Location = new System.Drawing.Point(16, 28); this.lblMaxTopicSize.Name = "lblMaxTopicSize"; - this.lblMaxTopicSize.Size = new System.Drawing.Size(154, 17); + this.lblMaxTopicSize.Size = new System.Drawing.Size(118, 13); this.lblMaxTopicSize.TabIndex = 24; this.lblMaxTopicSize.Text = "Max Queue Size In GB:"; // @@ -775,16 +391,15 @@ private void InitializeComponent() this.grouperTopicInformation.ForeColor = System.Drawing.Color.White; this.grouperTopicInformation.GroupImage = null; this.grouperTopicInformation.GroupTitle = "Topic Information"; - this.grouperTopicInformation.Location = new System.Drawing.Point(853, 10); - this.grouperTopicInformation.Margin = new System.Windows.Forms.Padding(4); + this.grouperTopicInformation.Location = new System.Drawing.Point(640, 8); this.grouperTopicInformation.Name = "grouperTopicInformation"; - this.grouperTopicInformation.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperTopicInformation.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); this.grouperTopicInformation.PaintGroupBox = true; this.grouperTopicInformation.RoundCorners = 4; this.grouperTopicInformation.ShadowColor = System.Drawing.Color.DarkGray; this.grouperTopicInformation.ShadowControl = false; this.grouperTopicInformation.ShadowThickness = 1; - this.grouperTopicInformation.Size = new System.Drawing.Size(416, 532); + this.grouperTopicInformation.Size = new System.Drawing.Size(312, 432); this.grouperTopicInformation.TabIndex = 6; // // propertyListView @@ -795,11 +410,11 @@ private void InitializeComponent() this.propertyListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.nameColumnHeader, this.valueColumnHeader}); - this.propertyListView.Location = new System.Drawing.Point(21, 39); - this.propertyListView.Margin = new System.Windows.Forms.Padding(4); + this.propertyListView.HideSelection = false; + this.propertyListView.Location = new System.Drawing.Point(16, 32); this.propertyListView.Name = "propertyListView"; this.propertyListView.OwnerDraw = true; - this.propertyListView.Size = new System.Drawing.Size(371, 472); + this.propertyListView.Size = new System.Drawing.Size(279, 384); this.propertyListView.TabIndex = 0; this.propertyListView.UseCompatibleStateImageBehavior = false; this.propertyListView.View = System.Windows.Forms.View.Details; @@ -827,11 +442,10 @@ private void InitializeComponent() this.mainTabControl.Controls.Add(this.tabPageAuthorization); this.mainTabControl.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this.mainTabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.mainTabControl.Location = new System.Drawing.Point(21, 20); - this.mainTabControl.Margin = new System.Windows.Forms.Padding(4); + this.mainTabControl.Location = new System.Drawing.Point(16, 16); this.mainTabControl.Name = "mainTabControl"; this.mainTabControl.SelectedIndex = 0; - this.mainTabControl.Size = new System.Drawing.Size(1301, 591); + this.mainTabControl.Size = new System.Drawing.Size(976, 480); this.mainTabControl.TabIndex = 19; this.mainTabControl.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.mainTabControl_DrawItem); // @@ -840,10 +454,9 @@ private void InitializeComponent() this.tabPageAuthorization.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.tabPageAuthorization.Controls.Add(this.grouperAuthorizationRuleList); this.tabPageAuthorization.ForeColor = System.Drawing.SystemColors.ControlText; - this.tabPageAuthorization.Location = new System.Drawing.Point(4, 27); - this.tabPageAuthorization.Margin = new System.Windows.Forms.Padding(4); + this.tabPageAuthorization.Location = new System.Drawing.Point(4, 24); this.tabPageAuthorization.Name = "tabPageAuthorization"; - this.tabPageAuthorization.Size = new System.Drawing.Size(1293, 560); + this.tabPageAuthorization.Size = new System.Drawing.Size(968, 452); this.tabPageAuthorization.TabIndex = 3; this.tabPageAuthorization.Text = "Authorization Rules"; // @@ -863,16 +476,15 @@ private void InitializeComponent() this.grouperAuthorizationRuleList.ForeColor = System.Drawing.Color.White; this.grouperAuthorizationRuleList.GroupImage = null; this.grouperAuthorizationRuleList.GroupTitle = "Authorization Rule List"; - this.grouperAuthorizationRuleList.Location = new System.Drawing.Point(21, 10); - this.grouperAuthorizationRuleList.Margin = new System.Windows.Forms.Padding(4); + this.grouperAuthorizationRuleList.Location = new System.Drawing.Point(16, 8); this.grouperAuthorizationRuleList.Name = "grouperAuthorizationRuleList"; - this.grouperAuthorizationRuleList.Padding = new System.Windows.Forms.Padding(27, 25, 27, 25); + this.grouperAuthorizationRuleList.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); this.grouperAuthorizationRuleList.PaintGroupBox = true; this.grouperAuthorizationRuleList.RoundCorners = 4; this.grouperAuthorizationRuleList.ShadowColor = System.Drawing.Color.DarkGray; this.grouperAuthorizationRuleList.ShadowControl = false; this.grouperAuthorizationRuleList.ShadowThickness = 1; - this.grouperAuthorizationRuleList.Size = new System.Drawing.Size(1248, 532); + this.grouperAuthorizationRuleList.Size = new System.Drawing.Size(936, 432); this.grouperAuthorizationRuleList.TabIndex = 21; this.grouperAuthorizationRuleList.CustomPaint += new System.Action(this.grouperAuthorizationRuleList_CustomPaint); // @@ -887,15 +499,14 @@ private void InitializeComponent() this.authorizationRulesDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.authorizationRulesDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.authorizationRulesDataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.authorizationRulesDataGridView.Location = new System.Drawing.Point(21, 39); - this.authorizationRulesDataGridView.Margin = new System.Windows.Forms.Padding(4); + this.authorizationRulesDataGridView.Location = new System.Drawing.Point(16, 32); this.authorizationRulesDataGridView.MultiSelect = false; this.authorizationRulesDataGridView.Name = "authorizationRulesDataGridView"; this.authorizationRulesDataGridView.RowHeadersWidth = 24; this.authorizationRulesDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.authorizationRulesDataGridView.ShowCellErrors = false; this.authorizationRulesDataGridView.ShowRowErrors = false; - this.authorizationRulesDataGridView.Size = new System.Drawing.Size(1205, 474); + this.authorizationRulesDataGridView.Size = new System.Drawing.Size(904, 385); this.authorizationRulesDataGridView.TabIndex = 0; this.authorizationRulesDataGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.authorizationRulesDataGridView_CellContentClick); this.authorizationRulesDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.authorizationRulesDataGridView_DataError); @@ -914,10 +525,9 @@ private void InitializeComponent() this.btnRefresh.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnRefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnRefresh.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnRefresh.Location = new System.Drawing.Point(907, 620); - this.btnRefresh.Margin = new System.Windows.Forms.Padding(4); + this.btnRefresh.Location = new System.Drawing.Point(680, 504); this.btnRefresh.Name = "btnRefresh"; - this.btnRefresh.Size = new System.Drawing.Size(96, 30); + this.btnRefresh.Size = new System.Drawing.Size(72, 24); this.btnRefresh.TabIndex = 2; this.btnRefresh.Text = "Refresh"; this.btnRefresh.UseVisualStyleBackColor = false; @@ -934,10 +544,9 @@ private void InitializeComponent() this.btnChangeStatus.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnChangeStatus.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnChangeStatus.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnChangeStatus.Location = new System.Drawing.Point(1013, 620); - this.btnChangeStatus.Margin = new System.Windows.Forms.Padding(4); + this.btnChangeStatus.Location = new System.Drawing.Point(760, 504); this.btnChangeStatus.Name = "btnChangeStatus"; - this.btnChangeStatus.Size = new System.Drawing.Size(96, 30); + this.btnChangeStatus.Size = new System.Drawing.Size(72, 24); this.btnChangeStatus.TabIndex = 3; this.btnChangeStatus.Text = "Disable"; this.btnChangeStatus.UseVisualStyleBackColor = false; @@ -954,10 +563,9 @@ private void InitializeComponent() this.btnCancelUpdate.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnCancelUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCancelUpdate.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnCancelUpdate.Location = new System.Drawing.Point(1227, 620); - this.btnCancelUpdate.Margin = new System.Windows.Forms.Padding(4); + this.btnCancelUpdate.Location = new System.Drawing.Point(920, 504); this.btnCancelUpdate.Name = "btnCancelUpdate"; - this.btnCancelUpdate.Size = new System.Drawing.Size(96, 30); + this.btnCancelUpdate.Size = new System.Drawing.Size(72, 24); this.btnCancelUpdate.TabIndex = 5; this.btnCancelUpdate.Text = "Update"; this.btnCancelUpdate.UseVisualStyleBackColor = false; @@ -974,10 +582,9 @@ private void InitializeComponent() this.btnCreateDelete.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnCreateDelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCreateDelete.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnCreateDelete.Location = new System.Drawing.Point(1120, 620); - this.btnCreateDelete.Margin = new System.Windows.Forms.Padding(4); + this.btnCreateDelete.Location = new System.Drawing.Point(840, 504); this.btnCreateDelete.Name = "btnCreateDelete"; - this.btnCreateDelete.Size = new System.Drawing.Size(96, 30); + this.btnCreateDelete.Size = new System.Drawing.Size(72, 24); this.btnCreateDelete.TabIndex = 4; this.btnCreateDelete.Text = "Create"; this.btnCreateDelete.UseVisualStyleBackColor = false; @@ -985,9 +592,33 @@ private void InitializeComponent() this.btnCreateDelete.MouseEnter += new System.EventHandler(this.button_MouseEnter); this.btnCreateDelete.MouseLeave += new System.EventHandler(this.button_MouseLeave); // + // tsDefaultMessageTimeToLive + // + this.tsDefaultMessageTimeToLive.Location = new System.Drawing.Point(13, 25); + this.tsDefaultMessageTimeToLive.Name = "tsDefaultMessageTimeToLive"; + this.tsDefaultMessageTimeToLive.Size = new System.Drawing.Size(273, 42); + this.tsDefaultMessageTimeToLive.TabIndex = 26; + this.tsDefaultMessageTimeToLive.TimeSpanValue = null; + // + // tsDuplicateDetectionHistoryTimeWindow + // + this.tsDuplicateDetectionHistoryTimeWindow.Location = new System.Drawing.Point(13, 25); + this.tsDuplicateDetectionHistoryTimeWindow.Name = "tsDuplicateDetectionHistoryTimeWindow"; + this.tsDuplicateDetectionHistoryTimeWindow.Size = new System.Drawing.Size(273, 42); + this.tsDuplicateDetectionHistoryTimeWindow.TabIndex = 27; + this.tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue = null; + // + // tsAutoDeleteOnIdle + // + this.tsAutoDeleteOnIdle.Location = new System.Drawing.Point(13, 25); + this.tsAutoDeleteOnIdle.Name = "tsAutoDeleteOnIdle"; + this.tsAutoDeleteOnIdle.Size = new System.Drawing.Size(273, 42); + this.tsAutoDeleteOnIdle.TabIndex = 28; + this.tsAutoDeleteOnIdle.TimeSpanValue = null; + // // HandleTopicControl // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.Controls.Add(this.mainTabControl); @@ -995,22 +626,18 @@ private void InitializeComponent() this.Controls.Add(this.btnChangeStatus); this.Controls.Add(this.btnCancelUpdate); this.Controls.Add(this.btnCreateDelete); - this.Margin = new System.Windows.Forms.Padding(4); this.Name = "HandleTopicControl"; - this.Size = new System.Drawing.Size(1344, 670); + this.Size = new System.Drawing.Size(1008, 544); ((System.ComponentModel.ISupportInitialize)(this.deadletterBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.sessionsBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.messagesBindingSource)).EndInit(); this.tabPageDescription.ResumeLayout(false); this.grouperAutoDeleteOnIdle.ResumeLayout(false); - this.grouperAutoDeleteOnIdle.PerformLayout(); this.groupergrouperDefaultMessageTimeToLive.ResumeLayout(false); - this.groupergrouperDefaultMessageTimeToLive.PerformLayout(); this.grouperTopicSettings.ResumeLayout(false); this.grouperPath.ResumeLayout(false); this.grouperPath.PerformLayout(); this.grouperDuplicateDetectionHistoryTimeWindow.ResumeLayout(false); - this.grouperDuplicateDetectionHistoryTimeWindow.PerformLayout(); this.grouperTopicProperties.ResumeLayout(false); this.grouperTopicProperties.PerformLayout(); this.grouperTopicInformation.ResumeLayout(false); @@ -1037,32 +664,12 @@ private void InitializeComponent() private System.Windows.Forms.Button btnCreateDelete; private System.Windows.Forms.ToolTip toolTip1; private Grouper groupergrouperDefaultMessageTimeToLive; - private System.Windows.Forms.Label lblDefaultMessageTimeToLiveMilliseconds; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveMilliseconds; - private System.Windows.Forms.Label lblDefaultMessageTimeToLiveSeconds; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveSeconds; - private System.Windows.Forms.Label lblDefaultMessageTimeToLiveMinutes; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveMinutes; - private System.Windows.Forms.Label lbllblDefaultMessageTimeToLiveHours; - private System.Windows.Forms.Label lblDefaultMessageTimeToLiveDays; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveHours; - private System.Windows.Forms.TextBox txtDefaultMessageTimeToLiveDays; private Grouper grouperTopicSettings; private System.Windows.Forms.CheckedListBox checkedListBox; private Grouper grouperPath; private System.Windows.Forms.Label lblRelativeURI; private System.Windows.Forms.TextBox txtPath; private Grouper grouperDuplicateDetectionHistoryTimeWindow; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowMilliseconds; - private System.Windows.Forms.TextBox txtDuplicateDetectionHistoryTimeWindowMilliseconds; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowSeconds; - private System.Windows.Forms.TextBox txtDuplicateDetectionHistoryTimeWindowSeconds; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowMinutes; - private System.Windows.Forms.TextBox txtDuplicateDetectionHistoryTimeWindowMinutes; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowHours; - private System.Windows.Forms.Label lblDuplicateDetectionHistoryTimeWindowDays; - private System.Windows.Forms.TextBox txtDuplicateDetectionHistoryTimeWindowHours; - private System.Windows.Forms.TextBox txtDuplicateDetectionHistoryTimeWindowDays; private Grouper grouperTopicProperties; private System.Windows.Forms.Label lblMaxTopicSizeInGB; private CustomTrackBar trackBarMaxTopicSize; @@ -1075,19 +682,12 @@ private void InitializeComponent() private System.Windows.Forms.ColumnHeader nameColumnHeader; private System.Windows.Forms.ColumnHeader valueColumnHeader; private Grouper grouperAutoDeleteOnIdle; - private System.Windows.Forms.Label lblAutoDeleteOnIdleMilliseconds; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleMilliseconds; - private System.Windows.Forms.Label lblAutoDeleteOnIdleSeconds; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleSeconds; - private System.Windows.Forms.Label lblAutoDeleteOnIdleMinutes; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleMinutes; - private System.Windows.Forms.Label lblAutoDeleteOnIdleHours; - private System.Windows.Forms.Label lblAutoDeleteOnIdleDays; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleHours; - private System.Windows.Forms.TextBox txtAutoDeleteOnIdleDays; private System.Windows.Forms.TabPage tabPageAuthorization; private Grouper grouperAuthorizationRuleList; private System.Windows.Forms.DataGridView authorizationRulesDataGridView; private System.Windows.Forms.BindingSource authorizationRulesBindingSource; + private TimeSpanControl tsAutoDeleteOnIdle; + private TimeSpanControl tsDefaultMessageTimeToLive; + private TimeSpanControl tsDuplicateDetectionHistoryTimeWindow; } } diff --git a/src/ServiceBusExplorer/Controls/HandleTopicControl.cs b/src/ServiceBusExplorer/Controls/HandleTopicControl.cs index 1148e29f..aa17bd26 100644 --- a/src/ServiceBusExplorer/Controls/HandleTopicControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleTopicControl.cs @@ -77,23 +77,11 @@ public partial class HandleTopicControl : UserControl // Messages //*************************** private const string PathCannotBeNull = "The Path field cannot be null."; - private const string DefaultMessageTimeToLiveDaysMustBeANumber = "The Days value of the DefaultMessageTimeToLive field must be a number."; - private const string DefaultMessageTimeToLiveHoursMustBeANumber = "The Hours value of the DefaultMessageTimeToLive field must be a number."; - private const string DefaultMessageTimeToLiveMinutesMustBeANumber = "The Minutes value of the DefaultMessageTimeToLive field must be a number."; - private const string DefaultMessageTimeToLiveSecondsMustBeANumber = "The Seconds value of the DefaultMessageTimeToLive field must be a number."; - private const string DefaultMessageTimeToLiveMillisecondsMustBeANumber = "The Milliseconds value of the DefaultMessageTimeToLive field must be a number."; - - private const string DuplicateDetectionHistoryTimeWindowDaysMustBeANumber = "The Days value of the DuplicateDetectionHistoryTimeWindow field must be a number."; - private const string DuplicateDetectionHistoryTimeWindowHoursMustBeANumber = "The Hours value of the DuplicateDetectionHistoryTimeWindow field must be a number."; - private const string DuplicateDetectionHistoryTimeWindowMinutesMustBeANumber = "The Minutes value of the DuplicateDetectionHistoryTimeWindow field must be a number."; - private const string DuplicateDetectionHistoryTimeWindowSecondsMustBeANumber = "The Seconds value of the DuplicateDetectionHistoryTimeWindow field must be a number."; - private const string DuplicateDetectionHistoryTimeWindowMillisecondsMustBeANumber = "The Milliseconds value of the DuplicateDetectionHistoryTimeWindow field must be a number."; - - private const string AutoDeleteOnIdleDaysMustBeANumber = "The Days value of the AutoDeleteOnIdle field must be a number."; - private const string AutoDeleteOnIdleHoursMustBeANumber = "The Hours value of the AutoDeleteOnIdle field must be a number."; - private const string AutoDeleteOnIdleMinutesMustBeANumber = "The Minutes value of the AutoDeleteOnIdle field must be a number."; - private const string AutoDeleteOnIdleSecondsMustBeANumber = "The Seconds value of the AutoDeleteOnIdle field must be a number."; - private const string AutoDeleteOnIdleMillisecondsMustBeANumber = "The Milliseconds value of the AutoDeleteOnIdle field must be a number."; + + private const string DefaultMessageTimeToLive = "DefaultMessageTimeToLive"; + private const string DuplicateDetectionHistoryTimeWindow = "DuplicateDetectionHistoryTimeWindow"; + private const string AutoDeleteOnIdle = "AutoDeleteOnIdle"; + private const string AuthorizationRuleDeleteMessage = "The Authorization Rule will be permanently deleted"; private const string KeyNameCannotBeNull = "Authorization Rule [{0}]: the KeyName cannot be null"; @@ -263,22 +251,9 @@ private void InitializeControls() toolTip.SetToolTip(txtPath, PathTooltip); toolTip.SetToolTip(txtUserMetadata, UserMetadataTooltip); toolTip.SetToolTip(trackBarMaxTopicSize, MaxTopicSizeTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveDays, DefaultMessageTimeToLiveTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveHours, DefaultMessageTimeToLiveTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveMinutes, DefaultMessageTimeToLiveTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveSeconds, DefaultMessageTimeToLiveTooltip); - toolTip.SetToolTip(txtDefaultMessageTimeToLiveMilliseconds, DefaultMessageTimeToLiveTooltip); - toolTip.SetToolTip(txtDuplicateDetectionHistoryTimeWindowDays, DuplicateDetectionHistoryTimeWindowTooltip); - toolTip.SetToolTip(txtDuplicateDetectionHistoryTimeWindowHours, DuplicateDetectionHistoryTimeWindowTooltip); - toolTip.SetToolTip(txtDuplicateDetectionHistoryTimeWindowMinutes, DuplicateDetectionHistoryTimeWindowTooltip); - toolTip.SetToolTip(txtDuplicateDetectionHistoryTimeWindowSeconds, DuplicateDetectionHistoryTimeWindowTooltip); - toolTip.SetToolTip(txtDuplicateDetectionHistoryTimeWindowMilliseconds, DuplicateDetectionHistoryTimeWindowTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleDays, AutoDeleteOnIdleTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleHours, AutoDeleteOnIdleTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleMinutes, AutoDeleteOnIdleTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleSeconds, AutoDeleteOnIdleTooltip); - toolTip.SetToolTip(txtAutoDeleteOnIdleMilliseconds, AutoDeleteOnIdleTooltip); - + toolTip.SetToolTip(tsDefaultMessageTimeToLive, DefaultMessageTimeToLiveTooltip); + toolTip.SetToolTip(tsDuplicateDetectionHistoryTimeWindow, DuplicateDetectionHistoryTimeWindowTooltip); + toolTip.SetToolTip(tsAutoDeleteOnIdle, AutoDeleteOnIdleTooltip); } else { @@ -399,25 +374,13 @@ private void InitializeData() } // DefaultMessageTimeToLive - txtDefaultMessageTimeToLiveDays.Text = topicDescription.DefaultMessageTimeToLive.Days.ToString(CultureInfo.InvariantCulture); - txtDefaultMessageTimeToLiveHours.Text = topicDescription.DefaultMessageTimeToLive.Hours.ToString(CultureInfo.InvariantCulture); - txtDefaultMessageTimeToLiveMinutes.Text = topicDescription.DefaultMessageTimeToLive.Minutes.ToString(CultureInfo.InvariantCulture); - txtDefaultMessageTimeToLiveSeconds.Text = topicDescription.DefaultMessageTimeToLive.Seconds.ToString(CultureInfo.InvariantCulture); - txtDefaultMessageTimeToLiveMilliseconds.Text = topicDescription.DefaultMessageTimeToLive.Milliseconds.ToString(CultureInfo.InvariantCulture); + tsDefaultMessageTimeToLive.TimeSpanValue = topicDescription.DefaultMessageTimeToLive; // DuplicateDetectionHistoryTimeWindow - txtDuplicateDetectionHistoryTimeWindowDays.Text = topicDescription.DuplicateDetectionHistoryTimeWindow.Days.ToString(CultureInfo.InvariantCulture); - txtDuplicateDetectionHistoryTimeWindowHours.Text = topicDescription.DuplicateDetectionHistoryTimeWindow.Hours.ToString(CultureInfo.InvariantCulture); - txtDuplicateDetectionHistoryTimeWindowMinutes.Text = topicDescription.DuplicateDetectionHistoryTimeWindow.Minutes.ToString(CultureInfo.InvariantCulture); - txtDuplicateDetectionHistoryTimeWindowSeconds.Text = topicDescription.DuplicateDetectionHistoryTimeWindow.Seconds.ToString(CultureInfo.InvariantCulture); - txtDuplicateDetectionHistoryTimeWindowMilliseconds.Text = topicDescription.DuplicateDetectionHistoryTimeWindow.Milliseconds.ToString(CultureInfo.InvariantCulture); + tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue = topicDescription.DuplicateDetectionHistoryTimeWindow; // AutoDeleteOnIdle - txtAutoDeleteOnIdleDays.Text = topicDescription.AutoDeleteOnIdle.Days.ToString(CultureInfo.InvariantCulture); - txtAutoDeleteOnIdleHours.Text = topicDescription.AutoDeleteOnIdle.Hours.ToString(CultureInfo.InvariantCulture); - txtAutoDeleteOnIdleMinutes.Text = topicDescription.AutoDeleteOnIdle.Minutes.ToString(CultureInfo.InvariantCulture); - txtAutoDeleteOnIdleSeconds.Text = topicDescription.AutoDeleteOnIdle.Seconds.ToString(CultureInfo.InvariantCulture); - txtAutoDeleteOnIdleMilliseconds.Text = topicDescription.AutoDeleteOnIdle.Milliseconds.ToString(CultureInfo.InvariantCulture); + tsAutoDeleteOnIdle.TimeSpanValue = topicDescription.AutoDeleteOnIdle; // EnableBatchedOperations checkedListBox.SetItemChecked(EnableBatchedOperationsIndex, @@ -507,171 +470,36 @@ private async void btnCreateDelete_Click(object sender, EventArgs e) UserMetadata = txtUserMetadata.Text }; - var days = 0; - var hours = 0; - var minutes = 0; - var seconds = 0; - var milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveDays.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveHours.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMinutes.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveSeconds.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMilliseconds.Text)) + if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveDays.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveDays.Text, out days)) - { - writeToLog(DefaultMessageTimeToLiveDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveHours.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveHours.Text, out hours)) - { - writeToLog(DefaultMessageTimeToLiveHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMinutes.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveMinutes.Text, out minutes)) - { - writeToLog(DefaultMessageTimeToLiveMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveSeconds.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveSeconds.Text, out seconds)) - { - writeToLog(DefaultMessageTimeToLiveSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMilliseconds.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveMilliseconds.Text, out milliseconds)) - { - writeToLog(DefaultMessageTimeToLiveMillisecondsMustBeANumber); - return; - } - } - description.DefaultMessageTimeToLive = new TimeSpan(days, hours, minutes, seconds, milliseconds); + description.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; } - - days = 0; - hours = 0; - minutes = 0; - seconds = 0; - milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowDays.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowHours.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMinutes.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowSeconds.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMilliseconds.Text)) + else { - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowDays.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowDays.Text, out days)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowHours.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowHours.Text, out hours)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMinutes.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowMinutes.Text, out minutes)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowSeconds.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowSeconds.Text, out seconds)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMilliseconds.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowMilliseconds.Text, out milliseconds)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowMillisecondsMustBeANumber); - return; - } - } - description.DuplicateDetectionHistoryTimeWindow = new TimeSpan(days, hours, minutes, seconds, milliseconds); + writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); + return; } - days = 0; - hours = 0; - minutes = 0; - seconds = 0; - milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleDays.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleHours.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMinutes.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleSeconds.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMilliseconds.Text)) + if (tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleDays.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleDays.Text, out days)) - { - writeToLog(AutoDeleteOnIdleDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleHours.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleHours.Text, out hours)) - { - writeToLog(AutoDeleteOnIdleHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMinutes.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleMinutes.Text, out minutes)) - { - writeToLog(AutoDeleteOnIdleMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleSeconds.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleSeconds.Text, out seconds)) - { - writeToLog(AutoDeleteOnIdleSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMilliseconds.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleMilliseconds.Text, out milliseconds)) - { - writeToLog(AutoDeleteOnIdleMillisecondsMustBeANumber); - return; - } - } - description.AutoDeleteOnIdle = new TimeSpan(days, hours, minutes, seconds, milliseconds); + description.DuplicateDetectionHistoryTimeWindow = tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.Value; + } + else + { + writeToLog(tsDuplicateDetectionHistoryTimeWindow.GetErrorMessage(DuplicateDetectionHistoryTimeWindow)); + return; } + if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) + { + description.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; + } + else + { + writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); + return; + } + description.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); description.EnableFilteringMessagesBeforePublishing = checkedListBox.GetItemChecked(EnableFilteringMessagesBeforePublishingIndex); if (serviceBusHelper.IsCloudNamespace) @@ -781,181 +609,34 @@ private void btnCancelUpdate_Click(object sender, EventArgs e) { topicDescription.UserMetadata = txtUserMetadata.Text; - var days = 0; - var hours = 0; - var minutes = 0; - var seconds = 0; - var milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveDays.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveHours.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMinutes.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveSeconds.Text) || - !string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMilliseconds.Text)) + if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveDays.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveDays.Text, out days)) - { - writeToLog(DefaultMessageTimeToLiveDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveHours.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveHours.Text, out hours)) - { - writeToLog(DefaultMessageTimeToLiveHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMinutes.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveMinutes.Text, out minutes)) - { - writeToLog(DefaultMessageTimeToLiveMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveSeconds.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveSeconds.Text, out seconds)) - { - writeToLog(DefaultMessageTimeToLiveSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDefaultMessageTimeToLiveMilliseconds.Text)) - { - if (!int.TryParse(txtDefaultMessageTimeToLiveMilliseconds.Text, out milliseconds)) - { - writeToLog(DefaultMessageTimeToLiveMillisecondsMustBeANumber); - return; - } - } - var timeSpan = new TimeSpan(days, hours, minutes, seconds, milliseconds); - if (!timeSpan.IsMaxValue()) - { - topicDescription.DefaultMessageTimeToLive = timeSpan; - } + topicDescription.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; + } + else + { + writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); + return; } - days = 0; - hours = 0; - minutes = 0; - seconds = 0; - milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowDays.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowHours.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMinutes.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowSeconds.Text) || - !string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMilliseconds.Text)) + if (tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowDays.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowDays.Text, out days)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowHours.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowHours.Text, out hours)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMinutes.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowMinutes.Text, out minutes)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowSeconds.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowSeconds.Text, out seconds)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtDuplicateDetectionHistoryTimeWindowMilliseconds.Text)) - { - if (!int.TryParse(txtDuplicateDetectionHistoryTimeWindowMilliseconds.Text, out milliseconds)) - { - writeToLog(DuplicateDetectionHistoryTimeWindowMillisecondsMustBeANumber); - return; - } - } - var timeSpan = new TimeSpan(days, hours, minutes, seconds, milliseconds); - if (!timeSpan.IsMaxValue()) - { - topicDescription.DuplicateDetectionHistoryTimeWindow = timeSpan; - } + topicDescription.DuplicateDetectionHistoryTimeWindow = tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.Value; + } + else + { + writeToLog(tsDuplicateDetectionHistoryTimeWindow.GetErrorMessage(DuplicateDetectionHistoryTimeWindow)); + return; } - days = 0; - hours = 0; - minutes = 0; - seconds = 0; - milliseconds = 0; - - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleDays.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleHours.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMinutes.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleSeconds.Text) || - !string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMilliseconds.Text)) + if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) { - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleDays.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleDays.Text, out days)) - { - writeToLog(AutoDeleteOnIdleDaysMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleHours.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleHours.Text, out hours)) - { - writeToLog(AutoDeleteOnIdleHoursMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMinutes.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleMinutes.Text, out minutes)) - { - writeToLog(AutoDeleteOnIdleMinutesMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleSeconds.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleSeconds.Text, out seconds)) - { - writeToLog(AutoDeleteOnIdleSecondsMustBeANumber); - return; - } - } - if (!string.IsNullOrWhiteSpace(txtAutoDeleteOnIdleMilliseconds.Text)) - { - if (!int.TryParse(txtAutoDeleteOnIdleMilliseconds.Text, out milliseconds)) - { - writeToLog(AutoDeleteOnIdleMillisecondsMustBeANumber); - return; - } - } - var timeSpan = new TimeSpan(days, hours, minutes, seconds, milliseconds); - if (!timeSpan.IsMaxValue()) - { - topicDescription.AutoDeleteOnIdle = timeSpan; - } + topicDescription.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; + } + else + { + writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); + return; } topicDescription.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); @@ -1267,41 +948,6 @@ private void DrawTabControlTabs(TabControl tabControl, DrawItemEventArgs e, Imag } } - private void textBox_KeyPress(object sender, KeyPressEventArgs e) - { - OnKeyPress(e); - - var numberFormatInfo = CultureInfo.CurrentCulture.NumberFormat; - var decimalSeparator = numberFormatInfo.NumberDecimalSeparator; - var groupSeparator = numberFormatInfo.NumberGroupSeparator; - var negativeSign = numberFormatInfo.NegativeSign; - - var keyInput = e.KeyChar.ToString(CultureInfo.InvariantCulture); - - if (Char.IsDigit(e.KeyChar)) - { - // Digits are OK - } - else if (keyInput.Equals(decimalSeparator) || keyInput.Equals(groupSeparator) || - keyInput.Equals(negativeSign)) - { - // Decimal separator is OK - } - else if (e.KeyChar == '\b') - { - // Backspace key is OK - } - else if (e.KeyChar == ' ') - { - - } - else - { - // Swallow this invalid key and beep - e.Handled = true; - } - } - private void grouperAuthorizationRuleList_CustomPaint(PaintEventArgs e) { e.Graphics.DrawRectangle(new Pen(SystemColors.ActiveBorder, 1), diff --git a/src/ServiceBusExplorer/Controls/ListenerControl.Designer.cs b/src/ServiceBusExplorer/Controls/ListenerControl.Designer.cs index 696dccba..80943659 100644 --- a/src/ServiceBusExplorer/Controls/ListenerControl.Designer.cs +++ b/src/ServiceBusExplorer/Controls/ListenerControl.Designer.cs @@ -69,9 +69,12 @@ private void InitializeComponent() this.grouperMessageList = new ServiceBusExplorer.Controls.Grouper(); this.pictFindMessages = new System.Windows.Forms.PictureBox(); this.messagesDataGridView = new System.Windows.Forms.DataGridView(); + this.grouperMessageText = new ServiceBusExplorer.Controls.Grouper(); + this.txtMessageText = new FastColoredTextBoxNS.FastColoredTextBox(); this.messagePropertiesSplitContainer = new System.Windows.Forms.SplitContainer(); this.grouperMessageSystemProperties = new ServiceBusExplorer.Controls.Grouper(); this.messagePropertyGrid = new System.Windows.Forms.PropertyGrid(); + this.grouperMessageCustomProperties = new ServiceBusExplorer.Controls.Grouper(); this.messagesContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.repairAndResubmitMessageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.resubmitSelectedMessagesInBatchModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -85,12 +88,7 @@ private void InitializeComponent() this.entityInformationContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.copyPartitionInformationToClipboardMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); - this.grouperMessageCustomProperties = new ServiceBusExplorer.Controls.Grouper(); - this.messagePropertyListView = new System.Windows.Forms.ListView(); - this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.grouperMessageText = new ServiceBusExplorer.Controls.Grouper(); - this.txtMessageText = new FastColoredTextBoxNS.FastColoredTextBox(); + this.messageCustomPropertyGrid = new System.Windows.Forms.PropertyGrid(); this.mainTabControl.SuspendLayout(); this.tabPageListener.SuspendLayout(); this.grouperStatistics.SuspendLayout(); @@ -109,17 +107,17 @@ private void InitializeComponent() this.grouperMessageList.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictFindMessages)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.messagesDataGridView)).BeginInit(); + this.grouperMessageText.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.txtMessageText)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.messagePropertiesSplitContainer)).BeginInit(); this.messagePropertiesSplitContainer.Panel1.SuspendLayout(); this.messagePropertiesSplitContainer.Panel2.SuspendLayout(); this.messagePropertiesSplitContainer.SuspendLayout(); this.grouperMessageSystemProperties.SuspendLayout(); + this.grouperMessageCustomProperties.SuspendLayout(); this.messagesContextMenuStrip.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.messagesBindingSource)).BeginInit(); this.entityInformationContextMenuStrip.SuspendLayout(); - this.grouperMessageCustomProperties.SuspendLayout(); - this.grouperMessageText.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.txtMessageText)).BeginInit(); this.SuspendLayout(); // // btnClose @@ -272,6 +270,8 @@ private void InitializeComponent() // // txtMessageSizePerSecond // + this.txtMessageSizePerSecond.AllowDecimal = false; + this.txtMessageSizePerSecond.AllowNegative = false; this.txtMessageSizePerSecond.AllowSpace = false; this.txtMessageSizePerSecond.Location = new System.Drawing.Point(160, 88); this.txtMessageSizePerSecond.Name = "txtMessageSizePerSecond"; @@ -290,6 +290,8 @@ private void InitializeComponent() // // txtAverageDuration // + this.txtAverageDuration.AllowDecimal = false; + this.txtAverageDuration.AllowNegative = false; this.txtAverageDuration.AllowSpace = false; this.txtAverageDuration.Location = new System.Drawing.Point(16, 88); this.txtAverageDuration.Name = "txtAverageDuration"; @@ -298,6 +300,8 @@ private void InitializeComponent() // // txtMessagesTotal // + this.txtMessagesTotal.AllowDecimal = false; + this.txtMessagesTotal.AllowNegative = false; this.txtMessagesTotal.AllowSpace = false; this.txtMessagesTotal.Location = new System.Drawing.Point(16, 48); this.txtMessagesTotal.Name = "txtMessagesTotal"; @@ -316,6 +320,8 @@ private void InitializeComponent() // // txtMessagesPerSecond // + this.txtMessagesPerSecond.AllowDecimal = false; + this.txtMessagesPerSecond.AllowNegative = false; this.txtMessagesPerSecond.AllowSpace = false; this.txtMessagesPerSecond.Location = new System.Drawing.Point(160, 48); this.txtMessagesPerSecond.Name = "txtMessagesPerSecond"; @@ -452,6 +458,7 @@ private void InitializeComponent() this.propertyListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.nameColumnHeader, this.valueColumnHeader}); + this.propertyListView.HideSelection = false; this.propertyListView.Location = new System.Drawing.Point(16, 32); this.propertyListView.Name = "propertyListView"; this.propertyListView.OwnerDraw = true; @@ -520,6 +527,8 @@ private void InitializeComponent() // // txtMessageWaitTimeout // + this.txtMessageWaitTimeout.AllowDecimal = false; + this.txtMessageWaitTimeout.AllowNegative = false; this.txtMessageWaitTimeout.AllowSpace = false; this.txtMessageWaitTimeout.Location = new System.Drawing.Point(632, 48); this.txtMessageWaitTimeout.Name = "txtMessageWaitTimeout"; @@ -539,6 +548,8 @@ private void InitializeComponent() // // txtAutoRenewTimeout // + this.txtAutoRenewTimeout.AllowDecimal = false; + this.txtAutoRenewTimeout.AllowNegative = false; this.txtAutoRenewTimeout.AllowSpace = false; this.txtAutoRenewTimeout.Location = new System.Drawing.Point(496, 48); this.txtAutoRenewTimeout.Name = "txtAutoRenewTimeout"; @@ -558,6 +569,8 @@ private void InitializeComponent() // // txtPrefetchCount // + this.txtPrefetchCount.AllowDecimal = false; + this.txtPrefetchCount.AllowNegative = false; this.txtPrefetchCount.AllowSpace = false; this.txtPrefetchCount.Location = new System.Drawing.Point(256, 48); this.txtPrefetchCount.Name = "txtPrefetchCount"; @@ -670,6 +683,8 @@ private void InitializeComponent() // // txtRefreshInformation // + this.txtRefreshInformation.AllowDecimal = false; + this.txtRefreshInformation.AllowNegative = false; this.txtRefreshInformation.AllowSpace = false; this.txtRefreshInformation.Location = new System.Drawing.Point(136, 48); this.txtRefreshInformation.Name = "txtRefreshInformation"; @@ -690,6 +705,8 @@ private void InitializeComponent() // // txtMaxConcurrentCalls // + this.txtMaxConcurrentCalls.AllowDecimal = false; + this.txtMaxConcurrentCalls.AllowNegative = false; this.txtMaxConcurrentCalls.AllowSpace = false; this.txtMaxConcurrentCalls.Location = new System.Drawing.Point(16, 48); this.txtMaxConcurrentCalls.Name = "txtMaxConcurrentCalls"; @@ -832,6 +849,63 @@ private void InitializeComponent() this.messagesDataGridView.Sorted += new System.EventHandler(this.dataGridView_Sorted); this.messagesDataGridView.Resize += new System.EventHandler(this.dataGridView_Resize); // + // grouperMessageText + // + this.grouperMessageText.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.grouperMessageText.BackgroundGradientColor = System.Drawing.Color.White; + this.grouperMessageText.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; + this.grouperMessageText.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.grouperMessageText.BorderThickness = 1F; + this.grouperMessageText.Controls.Add(this.txtMessageText); + this.grouperMessageText.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.grouperMessageText.Dock = System.Windows.Forms.DockStyle.Fill; + this.grouperMessageText.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.grouperMessageText.ForeColor = System.Drawing.Color.White; + this.grouperMessageText.GroupImage = null; + this.grouperMessageText.GroupTitle = "Message Text"; + this.grouperMessageText.Location = new System.Drawing.Point(0, 0); + this.grouperMessageText.Name = "grouperMessageText"; + this.grouperMessageText.Padding = new System.Windows.Forms.Padding(20); + this.grouperMessageText.PaintGroupBox = true; + this.grouperMessageText.RoundCorners = 4; + this.grouperMessageText.ShadowColor = System.Drawing.Color.DarkGray; + this.grouperMessageText.ShadowControl = false; + this.grouperMessageText.ShadowThickness = 1; + this.grouperMessageText.Size = new System.Drawing.Size(608, 212); + this.grouperMessageText.TabIndex = 26; + this.grouperMessageText.CustomPaint += new System.Action(this.grouperMessageText_CustomPaint); + // + // txtMessageText + // + this.txtMessageText.AutoCompleteBracketsList = new char[] { + '(', + ')', + '{', + '}', + '[', + ']', + '\"', + '\"', + '\'', + '\''}; + this.txtMessageText.AutoScrollMinSize = new System.Drawing.Size(27, 14); + this.txtMessageText.BackBrush = null; + this.txtMessageText.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtMessageText.CharHeight = 14; + this.txtMessageText.CharWidth = 8; + this.txtMessageText.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtMessageText.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.txtMessageText.ForeColor = System.Drawing.SystemColors.ControlText; + this.txtMessageText.IsReplaceMode = false; + this.txtMessageText.Location = new System.Drawing.Point(16, 32); + this.txtMessageText.Name = "txtMessageText"; + this.txtMessageText.Paddings = new System.Windows.Forms.Padding(0); + this.txtMessageText.SelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255))))); + this.txtMessageText.ServiceColors = ((FastColoredTextBoxNS.ServiceColors)(resources.GetObject("txtMessageText.ServiceColors"))); + this.txtMessageText.Size = new System.Drawing.Size(576, 164); + this.txtMessageText.TabIndex = 0; + this.txtMessageText.Zoom = 100; + // // messagePropertiesSplitContainer // this.messagePropertiesSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; @@ -891,6 +965,32 @@ private void InitializeComponent() this.messagePropertyGrid.TabIndex = 2; this.messagePropertyGrid.ToolbarVisible = false; // + // grouperMessageCustomProperties + // + this.grouperMessageCustomProperties.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.grouperMessageCustomProperties.BackgroundGradientColor = System.Drawing.Color.White; + this.grouperMessageCustomProperties.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; + this.grouperMessageCustomProperties.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.grouperMessageCustomProperties.BorderThickness = 1F; + this.grouperMessageCustomProperties.Controls.Add(this.messageCustomPropertyGrid); + this.grouperMessageCustomProperties.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.grouperMessageCustomProperties.Dock = System.Windows.Forms.DockStyle.Fill; + this.grouperMessageCustomProperties.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.grouperMessageCustomProperties.ForeColor = System.Drawing.Color.White; + this.grouperMessageCustomProperties.GroupImage = null; + this.grouperMessageCustomProperties.GroupTitle = "Message Custom Properties"; + this.grouperMessageCustomProperties.Location = new System.Drawing.Point(0, 0); + this.grouperMessageCustomProperties.Name = "grouperMessageCustomProperties"; + this.grouperMessageCustomProperties.Padding = new System.Windows.Forms.Padding(20); + this.grouperMessageCustomProperties.PaintGroupBox = true; + this.grouperMessageCustomProperties.RoundCorners = 4; + this.grouperMessageCustomProperties.ShadowColor = System.Drawing.Color.DarkGray; + this.grouperMessageCustomProperties.ShadowControl = false; + this.grouperMessageCustomProperties.ShadowThickness = 1; + this.grouperMessageCustomProperties.Size = new System.Drawing.Size(312, 212); + this.grouperMessageCustomProperties.TabIndex = 27; + this.grouperMessageCustomProperties.CustomPaint += new System.Action(this.grouperMessageCustomProperties_CustomPaint); + // // messagesContextMenuStrip // this.messagesContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -992,119 +1092,19 @@ private void InitializeComponent() this.copyPartitionInformationToClipboardMenuItem.ToolTipText = "Copy entity information to clipboard."; this.copyPartitionInformationToClipboardMenuItem.Click += new System.EventHandler(this.copyEntityInformationToClipboardMenuItem_Click); // - // grouperMessageCustomProperties - // - this.grouperMessageCustomProperties.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - this.grouperMessageCustomProperties.BackgroundGradientColor = System.Drawing.Color.White; - this.grouperMessageCustomProperties.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; - this.grouperMessageCustomProperties.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.grouperMessageCustomProperties.BorderThickness = 1F; - this.grouperMessageCustomProperties.Controls.Add(this.messagePropertyListView); - this.grouperMessageCustomProperties.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.grouperMessageCustomProperties.Dock = System.Windows.Forms.DockStyle.Fill; - this.grouperMessageCustomProperties.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.grouperMessageCustomProperties.ForeColor = System.Drawing.Color.White; - this.grouperMessageCustomProperties.GroupImage = null; - this.grouperMessageCustomProperties.GroupTitle = "Message Custom Properties"; - this.grouperMessageCustomProperties.Location = new System.Drawing.Point(0, 0); - this.grouperMessageCustomProperties.Name = "grouperMessageCustomProperties"; - this.grouperMessageCustomProperties.Padding = new System.Windows.Forms.Padding(20); - this.grouperMessageCustomProperties.PaintGroupBox = true; - this.grouperMessageCustomProperties.RoundCorners = 4; - this.grouperMessageCustomProperties.ShadowColor = System.Drawing.Color.DarkGray; - this.grouperMessageCustomProperties.ShadowControl = false; - this.grouperMessageCustomProperties.ShadowThickness = 1; - this.grouperMessageCustomProperties.Size = new System.Drawing.Size(312, 212); - this.grouperMessageCustomProperties.TabIndex = 27; - this.grouperMessageCustomProperties.CustomPaint += new System.Action(this.grouperMessageCustomProperties_CustomPaint); - // - // messagePropertyListView + // messageCustomPropertyGrid // - this.messagePropertyListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.messageCustomPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.messagePropertyListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader1, - this.columnHeader2}); - this.messagePropertyListView.Location = new System.Drawing.Point(16, 32); - this.messagePropertyListView.Name = "messagePropertyListView"; - this.messagePropertyListView.OwnerDraw = true; - this.messagePropertyListView.Size = new System.Drawing.Size(280, 164); - this.messagePropertyListView.TabIndex = 0; - this.messagePropertyListView.UseCompatibleStateImageBehavior = false; - this.messagePropertyListView.View = System.Windows.Forms.View.Details; - this.messagePropertyListView.DrawColumnHeader += new System.Windows.Forms.DrawListViewColumnHeaderEventHandler(this.listView_DrawColumnHeader); - this.messagePropertyListView.DrawItem += new System.Windows.Forms.DrawListViewItemEventHandler(this.listView_DrawItem); - this.messagePropertyListView.DrawSubItem += new System.Windows.Forms.DrawListViewSubItemEventHandler(this.listView_DrawSubItem); - this.messagePropertyListView.Resize += new System.EventHandler(this.listView_Resize); - // - // columnHeader1 - // - this.columnHeader1.Text = "Name"; - this.columnHeader1.Width = 113; - // - // columnHeader2 - // - this.columnHeader2.Text = "Value"; - this.columnHeader2.Width = 115; - // - // grouperMessageText - // - this.grouperMessageText.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - this.grouperMessageText.BackgroundGradientColor = System.Drawing.Color.White; - this.grouperMessageText.BackgroundGradientMode = ServiceBusExplorer.Controls.Grouper.GroupBoxGradientMode.None; - this.grouperMessageText.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.grouperMessageText.BorderThickness = 1F; - this.grouperMessageText.Controls.Add(this.txtMessageText); - this.grouperMessageText.CustomGroupBoxColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.grouperMessageText.Dock = System.Windows.Forms.DockStyle.Fill; - this.grouperMessageText.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.grouperMessageText.ForeColor = System.Drawing.Color.White; - this.grouperMessageText.GroupImage = null; - this.grouperMessageText.GroupTitle = "Message Text"; - this.grouperMessageText.Location = new System.Drawing.Point(0, 0); - this.grouperMessageText.Name = "grouperMessageText"; - this.grouperMessageText.Padding = new System.Windows.Forms.Padding(20); - this.grouperMessageText.PaintGroupBox = true; - this.grouperMessageText.RoundCorners = 4; - this.grouperMessageText.ShadowColor = System.Drawing.Color.DarkGray; - this.grouperMessageText.ShadowControl = false; - this.grouperMessageText.ShadowThickness = 1; - this.grouperMessageText.Size = new System.Drawing.Size(608, 212); - this.grouperMessageText.TabIndex = 26; - this.grouperMessageText.CustomPaint += new System.Action(this.grouperMessageText_CustomPaint); - // - // txtMessageText - // - this.txtMessageText.AutoCompleteBracketsList = new char[] { - '(', - ')', - '{', - '}', - '[', - ']', - '\"', - '\"', - '\'', - '\''}; - this.txtMessageText.AutoScrollMinSize = new System.Drawing.Size(27, 14); - this.txtMessageText.BackBrush = null; - this.txtMessageText.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtMessageText.CharHeight = 14; - this.txtMessageText.CharWidth = 8; - this.txtMessageText.Cursor = System.Windows.Forms.Cursors.IBeam; - this.txtMessageText.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); - this.txtMessageText.Font = new System.Drawing.Font("Courier New", 9.75F); - this.txtMessageText.ForeColor = System.Drawing.SystemColors.ControlText; - this.txtMessageText.IsReplaceMode = false; - this.txtMessageText.Location = new System.Drawing.Point(16, 32); - this.txtMessageText.Name = "txtMessageText"; - this.txtMessageText.Paddings = new System.Windows.Forms.Padding(0); - this.txtMessageText.SelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255))))); - this.txtMessageText.ServiceColors = ((FastColoredTextBoxNS.ServiceColors)(resources.GetObject("txtMessageText.ServiceColors"))); - this.txtMessageText.Size = new System.Drawing.Size(576, 164); - this.txtMessageText.TabIndex = 0; - this.txtMessageText.Zoom = 100; + this.messageCustomPropertyGrid.BackColor = System.Drawing.SystemColors.Window; + this.messageCustomPropertyGrid.HelpVisible = false; + this.messageCustomPropertyGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.messageCustomPropertyGrid.Location = new System.Drawing.Point(16, 32); + this.messageCustomPropertyGrid.Name = "messageCustomPropertyGrid"; + this.messageCustomPropertyGrid.Size = new System.Drawing.Size(280, 164); + this.messageCustomPropertyGrid.TabIndex = 3; + this.messageCustomPropertyGrid.ToolbarVisible = false; // // ListenerControl // @@ -1141,17 +1141,17 @@ private void InitializeComponent() this.grouperMessageList.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pictFindMessages)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.messagesDataGridView)).EndInit(); + this.grouperMessageText.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.txtMessageText)).EndInit(); this.messagePropertiesSplitContainer.Panel1.ResumeLayout(false); this.messagePropertiesSplitContainer.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.messagePropertiesSplitContainer)).EndInit(); this.messagePropertiesSplitContainer.ResumeLayout(false); this.grouperMessageSystemProperties.ResumeLayout(false); + this.grouperMessageCustomProperties.ResumeLayout(false); this.messagesContextMenuStrip.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.messagesBindingSource)).EndInit(); this.entityInformationContextMenuStrip.ResumeLayout(false); - this.grouperMessageCustomProperties.ResumeLayout(false); - this.grouperMessageText.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.txtMessageText)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -1224,8 +1224,6 @@ private void InitializeComponent() private Grouper grouperMessageText; private FastColoredTextBoxNS.FastColoredTextBox txtMessageText; private Grouper grouperMessageCustomProperties; - private System.Windows.Forms.ListView messagePropertyListView; - private System.Windows.Forms.ColumnHeader columnHeader1; - private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.PropertyGrid messageCustomPropertyGrid; } } diff --git a/src/ServiceBusExplorer/Controls/ListenerControl.cs b/src/ServiceBusExplorer/Controls/ListenerControl.cs index 624a4f53..ae325765 100644 --- a/src/ServiceBusExplorer/Controls/ListenerControl.cs +++ b/src/ServiceBusExplorer/Controls/ListenerControl.cs @@ -624,9 +624,7 @@ private void messagesDataGridView_RowEnter(object sender, DataGridViewCellEventA LanguageDetector.SetFormattedMessage(serviceBusHelper, brokeredMessage, txtMessageText); - var listViewItems = brokeredMessage.Properties.Select(p => new ListViewItem(new[] { p.Key, (p.Value ?? string.Empty).ToString() })).ToArray(); - messagePropertyListView.Items.Clear(); - messagePropertyListView.Items.AddRange(listViewItems); + messageCustomPropertyGrid.SelectedObject = new DictionaryPropertyGridAdapter(brokeredMessage.Properties); } private void tabPageMessages_Resize(object sender, EventArgs e) @@ -637,7 +635,7 @@ private void tabPageMessages_Resize(object sender, EventArgs e) messagesSplitContainer.SuspendLayout(); grouperMessageCustomProperties.Size = new Size(grouperMessageCustomProperties.Size.Width, messageMainSplitContainer.Panel2.Size.Height); messagePropertyGrid.Size = new Size(grouperMessageSystemProperties.Size.Width - 32, messagePropertyGrid.Size.Height); - messagePropertyListView.Size = new Size(grouperMessageCustomProperties.Size.Width - 32, messagePropertyListView.Size.Height); + messageCustomPropertyGrid.Size = new Size(grouperMessageCustomProperties.Size.Width - 32, messageCustomPropertyGrid.Size.Height); grouperMessageCustomPropertiesWidth = grouperMessageCustomProperties.Width; } finally @@ -693,8 +691,8 @@ private void grouperMessageText_CustomPaint(PaintEventArgs obj) private void grouperMessageCustomProperties_CustomPaint(PaintEventArgs obj) { - messagePropertyListView.Size = new Size(grouperMessageCustomProperties.Size.Width - (messagePropertyListView.Location.X * 2), - grouperMessageCustomProperties.Size.Height - messagePropertyListView.Location.Y - messagePropertyListView.Location.X); + messageCustomPropertyGrid.Size = new Size(grouperMessageCustomProperties.Size.Width - (messageCustomPropertyGrid.Location.X * 2), + grouperMessageCustomProperties.Size.Height - messageCustomPropertyGrid.Location.Y - messageCustomPropertyGrid.Location.X); } private void grouperMessageSystemProperties_CustomPaint(PaintEventArgs obj) @@ -1042,7 +1040,7 @@ private void btnClear_Click(object sender, EventArgs e) containerForm.Clear(); } txtMessageText.Text = null; - messagePropertyListView.Clear(); + messageCustomPropertyGrid.SelectedObject = null; messagePropertyGrid.SelectedObject = null; } catch (Exception ex) diff --git a/src/ServiceBusExplorer/Controls/NumericTextBox.cs b/src/ServiceBusExplorer/Controls/NumericTextBox.cs index e94df427..b0dcf7e2 100644 --- a/src/ServiceBusExplorer/Controls/NumericTextBox.cs +++ b/src/ServiceBusExplorer/Controls/NumericTextBox.cs @@ -31,10 +31,6 @@ namespace ServiceBusExplorer.Controls { public class NumericTextBox : TextBox { - #region Private Fields - private bool allowSpace; - #endregion - #region Protected Methods // Restricts the entry of characters to digits (including hex), the negative sign, // the decimal point, and editing keystrokes (backspace). @@ -49,24 +45,28 @@ protected override void OnKeyPress(KeyPressEventArgs e) var keyInput = e.KeyChar.ToString(CultureInfo.InvariantCulture); - if (Char.IsDigit(e.KeyChar)) + + if (char.IsDigit(e.KeyChar)) { // Digits are OK } - else if (keyInput.Equals(decimalSeparator) || keyInput.Equals(groupSeparator) || - keyInput.Equals(negativeSign)) + else if (keyInput.Equals(groupSeparator)) + { + // group separator is OK + } + else if (AllowDecimal && keyInput.Equals(decimalSeparator)) + { + // Decimal separator is OK if configured + } + else if (AllowNegative && keyInput.Equals(negativeSign)) { - // Decimal separator is OK + // Negative is OK if configured } else if (e.KeyChar == '\b') { // Backspace key is OK } - // else if ((ModifierKeys & (Keys.Control | Keys.Alt)) != 0) - // { - // // Let the edit control handle control and alt key combinations - // } - else if (allowSpace && e.KeyChar == ' ') + else if (AllowSpace && e.KeyChar == ' ') { } @@ -79,22 +79,21 @@ protected override void OnKeyPress(KeyPressEventArgs e) #endregion #region Public Properties - public int IntegerValue - { - get { return Int32.Parse(Text); } - } - public decimal DecimalValue - { - get { return Decimal.Parse(Text); } - } + public bool IsValidIntegerValue => int.TryParse(Text, out _); - public bool AllowSpace - { - set { allowSpace = value; } + public int IntegerValue => int.Parse(Text); + + public bool IsValidDecimalValue => decimal.TryParse(Text, out _); + + public decimal DecimalValue => decimal.Parse(Text); + + public bool AllowSpace { set; get; } + + public bool AllowDecimal { set; get; } + + public bool AllowNegative { set; get; } - get { return allowSpace; } - } #endregion } -} \ No newline at end of file +} diff --git a/src/ServiceBusExplorer/Controls/PartitionListenerControl.Designer.cs b/src/ServiceBusExplorer/Controls/PartitionListenerControl.Designer.cs index 88aa9481..0505442d 100644 --- a/src/ServiceBusExplorer/Controls/PartitionListenerControl.Designer.cs +++ b/src/ServiceBusExplorer/Controls/PartitionListenerControl.Designer.cs @@ -564,7 +564,7 @@ private void InitializeComponent() // this.pickerStartingDateTimeUtc.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pickerStartingDateTimeUtc.Checked = false; - this.pickerStartingDateTimeUtc.CustomFormat = "dd MMM yyyy hh:mm tt"; + this.pickerStartingDateTimeUtc.CustomFormat = "dd MMM yyyy HH:mm:ss"; this.pickerStartingDateTimeUtc.Format = System.Windows.Forms.DateTimePickerFormat.Custom; this.pickerStartingDateTimeUtc.Location = new System.Drawing.Point(424, 48); this.pickerStartingDateTimeUtc.MinDate = new System.DateTime(2014, 1, 1, 0, 0, 0, 0); diff --git a/src/ServiceBusExplorer/Controls/TimeSpanControl.Designer.cs b/src/ServiceBusExplorer/Controls/TimeSpanControl.Designer.cs new file mode 100644 index 00000000..58a30dea --- /dev/null +++ b/src/ServiceBusExplorer/Controls/TimeSpanControl.Designer.cs @@ -0,0 +1,183 @@ + +namespace ServiceBusExplorer.Controls +{ + partial class TimeSpanControl + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.lblMilliseconds = new System.Windows.Forms.Label(); + this.lblSeconds = new System.Windows.Forms.Label(); + this.lblMinutes = new System.Windows.Forms.Label(); + this.lblHours = new System.Windows.Forms.Label(); + this.lblDays = new System.Windows.Forms.Label(); + this.txtMilliseconds = new ServiceBusExplorer.Controls.NumericTextBox(); + this.txtSeconds = new ServiceBusExplorer.Controls.NumericTextBox(); + this.txtMinutes = new ServiceBusExplorer.Controls.NumericTextBox(); + this.txtHours = new ServiceBusExplorer.Controls.NumericTextBox(); + this.txtDays = new ServiceBusExplorer.Controls.NumericTextBox(); + this.SuspendLayout(); + // + // lblMilliseconds + // + this.lblMilliseconds.AutoSize = true; + this.lblMilliseconds.ForeColor = System.Drawing.SystemColors.ControlText; + this.lblMilliseconds.Location = new System.Drawing.Point(221, 3); + this.lblMilliseconds.Name = "lblMilliseconds"; + this.lblMilliseconds.Size = new System.Drawing.Size(49, 13); + this.lblMilliseconds.TabIndex = 8; + this.lblMilliseconds.Text = "Millisecs:"; + // + // lblSeconds + // + this.lblSeconds.AutoSize = true; + this.lblSeconds.ForeColor = System.Drawing.SystemColors.ControlText; + this.lblSeconds.Location = new System.Drawing.Point(166, 3); + this.lblSeconds.Name = "lblSeconds"; + this.lblSeconds.Size = new System.Drawing.Size(52, 13); + this.lblSeconds.TabIndex = 6; + this.lblSeconds.Text = "Seconds:"; + // + // lblMinutes + // + this.lblMinutes.AutoSize = true; + this.lblMinutes.ForeColor = System.Drawing.SystemColors.ControlText; + this.lblMinutes.Location = new System.Drawing.Point(111, 3); + this.lblMinutes.Name = "lblMinutes"; + this.lblMinutes.Size = new System.Drawing.Size(47, 13); + this.lblMinutes.TabIndex = 4; + this.lblMinutes.Text = "Minutes:"; + // + // lblHours + // + this.lblHours.AutoSize = true; + this.lblHours.ForeColor = System.Drawing.SystemColors.ControlText; + this.lblHours.Location = new System.Drawing.Point(56, 3); + this.lblHours.Name = "lblHours"; + this.lblHours.Size = new System.Drawing.Size(38, 13); + this.lblHours.TabIndex = 2; + this.lblHours.Text = "Hours:"; + // + // lblDays + // + this.lblDays.AutoSize = true; + this.lblDays.ForeColor = System.Drawing.SystemColors.ControlText; + this.lblDays.Location = new System.Drawing.Point(1, 3); + this.lblDays.Name = "lblDays"; + this.lblDays.Size = new System.Drawing.Size(34, 13); + this.lblDays.TabIndex = 0; + this.lblDays.Text = "Days:"; + // + // txtMilliseconds + // + this.txtMilliseconds.AllowDecimal = false; + this.txtMilliseconds.AllowNegative = false; + this.txtMilliseconds.AllowSpace = false; + this.txtMilliseconds.BackColor = System.Drawing.SystemColors.Window; + this.txtMilliseconds.Location = new System.Drawing.Point(223, 19); + this.txtMilliseconds.Name = "txtMilliseconds"; + this.txtMilliseconds.Size = new System.Drawing.Size(40, 20); + this.txtMilliseconds.TabIndex = 9; + // + // txtSeconds + // + this.txtSeconds.AllowDecimal = false; + this.txtSeconds.AllowNegative = false; + this.txtSeconds.AllowSpace = false; + this.txtSeconds.BackColor = System.Drawing.SystemColors.Window; + this.txtSeconds.Location = new System.Drawing.Point(168, 19); + this.txtSeconds.Name = "txtSeconds"; + this.txtSeconds.Size = new System.Drawing.Size(40, 20); + this.txtSeconds.TabIndex = 7; + // + // txtMinutes + // + this.txtMinutes.AllowDecimal = false; + this.txtMinutes.AllowNegative = false; + this.txtMinutes.AllowSpace = false; + this.txtMinutes.BackColor = System.Drawing.SystemColors.Window; + this.txtMinutes.Location = new System.Drawing.Point(113, 19); + this.txtMinutes.Name = "txtMinutes"; + this.txtMinutes.Size = new System.Drawing.Size(40, 20); + this.txtMinutes.TabIndex = 5; + // + // txtHours + // + this.txtHours.AllowDecimal = false; + this.txtHours.AllowNegative = false; + this.txtHours.AllowSpace = false; + this.txtHours.BackColor = System.Drawing.SystemColors.Window; + this.txtHours.Location = new System.Drawing.Point(58, 19); + this.txtHours.Name = "txtHours"; + this.txtHours.Size = new System.Drawing.Size(40, 20); + this.txtHours.TabIndex = 3; + // + // txtDays + // + this.txtDays.AllowDecimal = false; + this.txtDays.AllowNegative = false; + this.txtDays.AllowSpace = false; + this.txtDays.BackColor = System.Drawing.SystemColors.Window; + this.txtDays.Location = new System.Drawing.Point(3, 19); + this.txtDays.Name = "txtDays"; + this.txtDays.Size = new System.Drawing.Size(40, 20); + this.txtDays.TabIndex = 1; + // + // TimeSpanControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lblMilliseconds); + this.Controls.Add(this.txtMilliseconds); + this.Controls.Add(this.lblSeconds); + this.Controls.Add(this.txtSeconds); + this.Controls.Add(this.lblMinutes); + this.Controls.Add(this.txtMinutes); + this.Controls.Add(this.lblHours); + this.Controls.Add(this.lblDays); + this.Controls.Add(this.txtHours); + this.Controls.Add(this.txtDays); + this.Name = "TimeSpanControl"; + this.Size = new System.Drawing.Size(273, 42); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label lblMilliseconds; + private NumericTextBox txtMilliseconds; + private System.Windows.Forms.Label lblSeconds; + private NumericTextBox txtSeconds; + private System.Windows.Forms.Label lblMinutes; + private NumericTextBox txtMinutes; + private System.Windows.Forms.Label lblHours; + private System.Windows.Forms.Label lblDays; + private NumericTextBox txtHours; + private NumericTextBox txtDays; + } +} diff --git a/src/ServiceBusExplorer/Controls/TimeSpanControl.cs b/src/ServiceBusExplorer/Controls/TimeSpanControl.cs new file mode 100644 index 00000000..97cc71f2 --- /dev/null +++ b/src/ServiceBusExplorer/Controls/TimeSpanControl.cs @@ -0,0 +1,88 @@ +namespace ServiceBusExplorer.Controls +{ + using System; + using System.Globalization; + using System.Windows.Forms; + + public partial class TimeSpanControl : UserControl + { + private const string Days = "Days"; + private const string Hours = "Hours"; + private const string Minutes = "Minutes"; + private const string Seconds = "Seconds"; + private const string Milliseconds = "Milliseconds"; + private const string FieldMustBeANumber = "The {0} value of the {1} field must be a number."; + + private TimeSpan? _value; + + public TimeSpanControl() + { + InitializeComponent(); + } + + public bool IsValidValue => txtDays.IsValidIntegerValue && txtHours.IsValidIntegerValue && txtMinutes.IsValidIntegerValue && txtSeconds.IsValidIntegerValue && txtMilliseconds.IsValidIntegerValue; + + public string GetErrorMessage(string fieldName) + { + if (IsValidValue) + { + return string.Empty; + } + + string fieldValue; + if (!txtDays.IsValidIntegerValue) + { + fieldValue = Days; + } + else if (!txtHours.IsValidIntegerValue) + { + fieldValue = Hours; + } + else if (!txtMinutes.IsValidIntegerValue) + { + fieldValue = Minutes; + } + else if (!txtSeconds.IsValidIntegerValue) + { + fieldValue = Seconds; + } + else + { + fieldValue = Milliseconds; + } + + return string.Format(FieldMustBeANumber, fieldValue, fieldName); + } + + public TimeSpan? TimeSpanValue + { + get + { + if (!IsValidValue) + { + return null; + } + + return new TimeSpan( + txtDays.IntegerValue, + txtHours.IntegerValue, + txtMinutes.IntegerValue, + txtSeconds.IntegerValue, + txtMilliseconds.IntegerValue + ); + } + set + { + if (value != _value) + { + _value = value; + txtDays.Text = value?.Days.ToString(CultureInfo.InvariantCulture) ?? string.Empty; + txtHours.Text = value?.Hours.ToString(CultureInfo.InvariantCulture) ?? string.Empty; + txtMinutes.Text = value?.Minutes.ToString(CultureInfo.InvariantCulture) ?? string.Empty; + txtSeconds.Text = value?.Seconds.ToString(CultureInfo.InvariantCulture) ?? string.Empty; + txtMilliseconds.Text = value?.Milliseconds.ToString(CultureInfo.InvariantCulture) ?? string.Empty; + } + } + } + } +} diff --git a/src/ServiceBusExplorer/Controls/TimeSpanControl.resx b/src/ServiceBusExplorer/Controls/TimeSpanControl.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/src/ServiceBusExplorer/Controls/TimeSpanControl.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/src/ServiceBusExplorer/Forms/DateTimeForm.Designer.cs b/src/ServiceBusExplorer/Forms/DateTimeForm.Designer.cs index 287b6544..86d9a943 100644 --- a/src/ServiceBusExplorer/Forms/DateTimeForm.Designer.cs +++ b/src/ServiceBusExplorer/Forms/DateTimeForm.Designer.cs @@ -129,7 +129,7 @@ private void InitializeComponent() this.dateTimePicker.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.dateTimePicker.Checked = false; - this.dateTimePicker.CustomFormat = "ddMMMMyyyy hh:mm:ss"; + this.dateTimePicker.CustomFormat = "dd MMM yyyy HH:mm:ss"; this.dateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom; this.dateTimePicker.Location = new System.Drawing.Point(16, 32); this.dateTimePicker.Name = "dateTimePicker"; @@ -163,4 +163,4 @@ private void InitializeComponent() private Grouper grouperCaption; private System.Windows.Forms.DateTimePicker dateTimePicker; } -} \ No newline at end of file +} diff --git a/src/ServiceBusExplorer/Forms/DateTimeRangeForm.Designer.cs b/src/ServiceBusExplorer/Forms/DateTimeRangeForm.Designer.cs index 433080a2..5ebbb174 100644 --- a/src/ServiceBusExplorer/Forms/DateTimeRangeForm.Designer.cs +++ b/src/ServiceBusExplorer/Forms/DateTimeRangeForm.Designer.cs @@ -131,7 +131,7 @@ private void InitializeComponent() this.dateFromTimePicker.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.dateFromTimePicker.Checked = false; - this.dateFromTimePicker.CustomFormat = "ddMMMMyyyy HH:mm"; + this.dateFromTimePicker.CustomFormat = "dd MMM yyyy HH:mm:ss"; this.dateFromTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom; this.dateFromTimePicker.Location = new System.Drawing.Point(16, 32); this.dateFromTimePicker.Name = "dateFromTimePicker"; @@ -170,7 +170,7 @@ private void InitializeComponent() this.dateToTimePicker.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.dateToTimePicker.Checked = false; - this.dateToTimePicker.CustomFormat = "ddMMMMyyyy HH:mm"; + this.dateToTimePicker.CustomFormat = "dd MMM yyyy HH:mm:ss"; this.dateToTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom; this.dateToTimePicker.Location = new System.Drawing.Point(16, 32); this.dateToTimePicker.Name = "dateToTimePicker"; diff --git a/src/ServiceBusExplorer/Forms/FilterForm.Designer.cs b/src/ServiceBusExplorer/Forms/FilterForm.Designer.cs index d9f37d9d..e7f5fad7 100644 --- a/src/ServiceBusExplorer/Forms/FilterForm.Designer.cs +++ b/src/ServiceBusExplorer/Forms/FilterForm.Designer.cs @@ -210,7 +210,6 @@ private void InitializeComponent() this.txtMessageCount.Size = new System.Drawing.Size(272, 20); this.txtMessageCount.TabIndex = 30; this.txtMessageCount.TextChanged += new System.EventHandler(this.txtMessageCount_TextChanged); - this.txtMessageCount.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress); // // lblMessageCount // @@ -342,4 +341,4 @@ private void InitializeComponent() private NumericTextBox txtMessageCount; private System.Windows.Forms.ComboBox cboMessageCountOperator; } -} \ No newline at end of file +} diff --git a/src/ServiceBusExplorer/Forms/FilterForm.cs b/src/ServiceBusExplorer/Forms/FilterForm.cs index 8d6d6bf3..26bdc783 100644 --- a/src/ServiceBusExplorer/Forms/FilterForm.cs +++ b/src/ServiceBusExplorer/Forms/FilterForm.cs @@ -82,7 +82,7 @@ public partial class FilterForm : Form #region Private Static Fields private static readonly List properties = new List { "CreatedAt", "AccessedAt", "UpdatedAt"}; - private static readonly List operators = new List { "ge", "gt", "le", "lt", "eq", "ne" }; + private static readonly List operators = new List { "Ge", "Gt", "Le", "Lt", "Eq", "Ne" }; private static readonly List timeFilters = new List(); #endregion @@ -413,7 +413,7 @@ private void ReadFilterExpression() { Property = timeFilterProperty, Operator = timeFilterOperator, - Value = timeFilterValue + Value = DateTime.Parse(timeFilterValue) }); } } @@ -453,7 +453,7 @@ private void WriteFilterExpression() { if (string.IsNullOrWhiteSpace(timeFilter.Property) || string.IsNullOrWhiteSpace(timeFilter.Operator) || - string.IsNullOrWhiteSpace(timeFilter.Value)) + !timeFilter.Value.HasValue) { continue; } @@ -464,7 +464,7 @@ private void WriteFilterExpression() builder.AppendFormat(TimeFilterFormat, timeFilter.Property, timeFilter.Operator, - timeFilter.Value); + timeFilter.Value.Value.ToUniversalTime().ToString("o")); appendAnd = true; } txtFilterExpression.TextChanged -= txtFilterExpression_TextChanged; @@ -492,40 +492,6 @@ private void grouperFilter_CustomPaint(PaintEventArgs e) timeFilterDataGridView.Size.Height + 1); } - private void textBox_KeyPress(object sender, KeyPressEventArgs e) - { - OnKeyPress(e); - - var numberFormatInfo = CultureInfo.CurrentCulture.NumberFormat; - var decimalSeparator = numberFormatInfo.NumberDecimalSeparator; - var groupSeparator = numberFormatInfo.NumberGroupSeparator; - var negativeSign = numberFormatInfo.NegativeSign; - - var keyInput = e.KeyChar.ToString(CultureInfo.InvariantCulture); - - if (Char.IsDigit(e.KeyChar)) - { - // Digits are OK - } - else if (keyInput.Equals(decimalSeparator) || keyInput.Equals(groupSeparator) || - keyInput.Equals(negativeSign)) - { - // Decimal separator is OK - } - else if (e.KeyChar == '\b') - { - // Backspace key is OK - } - else if (e.KeyChar == ' ') - { - - } - else - { - // Swallow this invalid key and beep - e.Handled = true; - } - } #endregion } } diff --git a/src/ServiceBusExplorer/Forms/ReceiveModeForm.Designer.cs b/src/ServiceBusExplorer/Forms/ReceiveModeForm.Designer.cs index 07e99197..6a1d42aa 100644 --- a/src/ServiceBusExplorer/Forms/ReceiveModeForm.Designer.cs +++ b/src/ServiceBusExplorer/Forms/ReceiveModeForm.Designer.cs @@ -60,11 +60,11 @@ private void InitializeComponent() this.grouperSession = new ServiceBusExplorer.Controls.Grouper(); this.txtFromSession = new System.Windows.Forms.TextBox(); this.grouperFrom = new ServiceBusExplorer.Controls.Grouper(); - this.txtFromSequenceNumber = new System.Windows.Forms.TextBox(); + this.txtFromSequenceNumber = new ServiceBusExplorer.Controls.NumericTextBox(); this.grouperInspector = new ServiceBusExplorer.Controls.Grouper(); this.cboReceiverInspector = new System.Windows.Forms.ComboBox(); this.grouperMessages = new ServiceBusExplorer.Controls.Grouper(); - this.txtMessageCount = new System.Windows.Forms.TextBox(); + this.txtMessageCount = new ServiceBusExplorer.Controls.NumericTextBox(); this.btnTop = new System.Windows.Forms.RadioButton(); this.btnAll = new System.Windows.Forms.RadioButton(); this.grouperReadMode = new ServiceBusExplorer.Controls.Grouper(); @@ -266,7 +266,6 @@ private void InitializeComponent() this.txtMessageCount.Name = "txtMessageCount"; this.txtMessageCount.Size = new System.Drawing.Size(80, 20); this.txtMessageCount.TabIndex = 42; - this.txtMessageCount.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtMessageCount_KeyPress); // // btnTop // @@ -383,7 +382,7 @@ private void InitializeComponent() private System.Windows.Forms.Button btnCancel; private System.Windows.Forms.Panel mainPanel; private Grouper grouperMessages; - private System.Windows.Forms.TextBox txtMessageCount; + private ServiceBusExplorer.Controls.NumericTextBox txtMessageCount; private System.Windows.Forms.RadioButton btnTop; private System.Windows.Forms.RadioButton btnAll; private Grouper grouperReadMode; @@ -392,7 +391,7 @@ private void InitializeComponent() private Grouper grouperInspector; private System.Windows.Forms.ComboBox cboReceiverInspector; private Grouper grouperFrom; - private System.Windows.Forms.TextBox txtFromSequenceNumber; + private ServiceBusExplorer.Controls.NumericTextBox txtFromSequenceNumber; private Grouper grouperSession; private System.Windows.Forms.TextBox txtFromSession; } diff --git a/src/ServiceBusExplorer/Forms/ReceiveModeForm.cs b/src/ServiceBusExplorer/Forms/ReceiveModeForm.cs index abdab906..5ff34301 100644 --- a/src/ServiceBusExplorer/Forms/ReceiveModeForm.cs +++ b/src/ServiceBusExplorer/Forms/ReceiveModeForm.cs @@ -133,41 +133,6 @@ private void button_MouseLeave(object sender, EventArgs e) } } - private void txtMessageCount_KeyPress(object sender, KeyPressEventArgs e) - { - OnKeyPress(e); - - var numberFormatInfo = CultureInfo.CurrentCulture.NumberFormat; - var decimalSeparator = numberFormatInfo.NumberDecimalSeparator; - var groupSeparator = numberFormatInfo.NumberGroupSeparator; - var negativeSign = numberFormatInfo.NegativeSign; - - var keyInput = e.KeyChar.ToString(CultureInfo.InvariantCulture); - - if (Char.IsDigit(e.KeyChar)) - { - // Digits are OK - } - else if (keyInput.Equals(decimalSeparator) || keyInput.Equals(groupSeparator) || - keyInput.Equals(negativeSign)) - { - // Decimal separator is OK - } - else if (e.KeyChar == '\b') - { - // Backspace key is OK - } - else if (e.KeyChar == ' ') - { - - } - else - { - // Swallow this invalid key and beep - e.Handled = true; - } - } - private void ReceiveModeForm_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '\r' || e.KeyChar == '\n') diff --git a/src/ServiceBusExplorer/Forms/RegistrationsForm.Designer.cs b/src/ServiceBusExplorer/Forms/RegistrationsForm.Designer.cs index 8ab7bf4c..7e8145bf 100644 --- a/src/ServiceBusExplorer/Forms/RegistrationsForm.Designer.cs +++ b/src/ServiceBusExplorer/Forms/RegistrationsForm.Designer.cs @@ -56,7 +56,7 @@ private void InitializeComponent() this.btnCancel = new System.Windows.Forms.Button(); this.mainPanel = new System.Windows.Forms.Panel(); this.radioButton1 = new System.Windows.Forms.RadioButton(); - this.txtTop = new System.Windows.Forms.TextBox(); + this.txtTop = new ServiceBusExplorer.Controls.NumericTextBox(); this.lblTop = new System.Windows.Forms.Label(); this.txtTag = new System.Windows.Forms.TextBox(); this.txtPnsHandle = new System.Windows.Forms.TextBox(); @@ -139,7 +139,6 @@ private void InitializeComponent() this.txtTop.Size = new System.Drawing.Size(152, 20); this.txtTop.TabIndex = 7; this.txtTop.Text = "100"; - this.txtTop.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtMessageCount_KeyPress); // // lblTop // @@ -222,7 +221,7 @@ private void InitializeComponent() private System.Windows.Forms.TextBox txtPnsHandle; private System.Windows.Forms.RadioButton btnTag; private System.Windows.Forms.Label lblTop; - private System.Windows.Forms.TextBox txtTop; + private ServiceBusExplorer.Controls.NumericTextBox txtTop; private System.Windows.Forms.RadioButton radioButton1; } -} \ No newline at end of file +} diff --git a/src/ServiceBusExplorer/Forms/RegistrationsForm.cs b/src/ServiceBusExplorer/Forms/RegistrationsForm.cs index 3299fc6b..df698cd9 100644 --- a/src/ServiceBusExplorer/Forms/RegistrationsForm.cs +++ b/src/ServiceBusExplorer/Forms/RegistrationsForm.cs @@ -133,41 +133,6 @@ private void button_MouseLeave(object sender, EventArgs e) } } - private void txtMessageCount_KeyPress(object sender, KeyPressEventArgs e) - { - OnKeyPress(e); - - var numberFormatInfo = CultureInfo.CurrentCulture.NumberFormat; - var decimalSeparator = numberFormatInfo.NumberDecimalSeparator; - var groupSeparator = numberFormatInfo.NumberGroupSeparator; - var negativeSign = numberFormatInfo.NegativeSign; - - var keyInput = e.KeyChar.ToString(CultureInfo.InvariantCulture); - - if (Char.IsDigit(e.KeyChar)) - { - // Digits are OK - } - else if (keyInput.Equals(decimalSeparator) || keyInput.Equals(groupSeparator) || - keyInput.Equals(negativeSign)) - { - // Decimal separator is OK - } - else if (e.KeyChar == '\b') - { - // Backspace key is OK - } - else if (e.KeyChar == ' ') - { - - } - else - { - // Swallow this invalid key and beep - e.Handled = true; - } - } - private void RegistrationsForm_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '\r' || e.KeyChar == '\n') diff --git a/src/ServiceBusExplorer/ServiceBusExplorer.csproj b/src/ServiceBusExplorer/ServiceBusExplorer.csproj index 70f303e3..f7657bd5 100644 --- a/src/ServiceBusExplorer/ServiceBusExplorer.csproj +++ b/src/ServiceBusExplorer/ServiceBusExplorer.csproj @@ -197,6 +197,12 @@ TestEventHubControl.cs + + UserControl + + + TimeSpanControl.cs + Component @@ -412,6 +418,8 @@ + + @@ -465,6 +473,9 @@ TestEventHubControl.cs + + TimeSpanControl.cs + Designer @@ -749,4 +760,4 @@ --> - + \ No newline at end of file diff --git a/src/ServiceBusExplorer/UIHelpers/DictionaryPropertyDescriptor.cs b/src/ServiceBusExplorer/UIHelpers/DictionaryPropertyDescriptor.cs new file mode 100644 index 00000000..e9d33ebb --- /dev/null +++ b/src/ServiceBusExplorer/UIHelpers/DictionaryPropertyDescriptor.cs @@ -0,0 +1,69 @@ +namespace ServiceBusExplorer.UIHelpers +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using System.Drawing.Design; + + public class DictionaryPropertyDescriptor : PropertyDescriptor + where TValue : class + { + private readonly IDictionary _dictionary; + private readonly TKey _key; + + internal DictionaryPropertyDescriptor(IDictionary dictionary, TKey key, bool isReadOnly) + : base(key.ToString(), null) + { + _dictionary = dictionary; + _key = key; + IsReadOnly = isReadOnly; + } + + public override Type PropertyType => _dictionary[_key].GetType(); + + public override void SetValue(object component, object value) + { + _dictionary[_key] = value as TValue; + } + + public override object GetValue(object component) + { + return _dictionary[_key]; + } + + public override bool IsReadOnly { get; } + + public override Type ComponentType => null; + + public override bool CanResetValue(object component) + { + return false; + } + + public override void ResetValue(object component) + { + } + + public override bool ShouldSerializeValue(object component) + { + return false; + } + + public override object GetEditor(Type editorBaseType) + { + if (editorBaseType == typeof(UITypeEditor)) + { + if (PropertyType == typeof(string)) + { + var value = _dictionary[_key] as string; + if (value != null && (value.Contains("\n") || value.Contains("\r"))) + { + return new System.ComponentModel.Design.MultilineStringEditor(); + } + } + } + + return base.GetEditor(editorBaseType); + } + } +} diff --git a/src/ServiceBusExplorer/UIHelpers/DictionaryPropertyGridAdapter.cs b/src/ServiceBusExplorer/UIHelpers/DictionaryPropertyGridAdapter.cs new file mode 100644 index 00000000..6f22b247 --- /dev/null +++ b/src/ServiceBusExplorer/UIHelpers/DictionaryPropertyGridAdapter.cs @@ -0,0 +1,87 @@ +namespace ServiceBusExplorer.UIHelpers +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.ComponentModel; + + public class DictionaryPropertyGridAdapter : ICustomTypeDescriptor where TValue : class + { + private readonly IDictionary _dictionary; + private readonly bool _isReadOnly; + + public DictionaryPropertyGridAdapter(IDictionary dictionary, bool isReadOnly = false) + { + _dictionary = dictionary; + _isReadOnly = isReadOnly; + } + + public string GetComponentName() + { + return TypeDescriptor.GetComponentName(this, true); + } + + public EventDescriptor GetDefaultEvent() + { + return TypeDescriptor.GetDefaultEvent(this, true); + } + + public string GetClassName() + { + return TypeDescriptor.GetClassName(this, true); + } + + public EventDescriptorCollection GetEvents(Attribute[] attributes) + { + return TypeDescriptor.GetEvents(this, attributes, true); + } + + EventDescriptorCollection ICustomTypeDescriptor.GetEvents() + { + return TypeDescriptor.GetEvents(this, true); + } + + public TypeConverter GetConverter() + { + return TypeDescriptor.GetConverter(this, true); + } + + public object GetPropertyOwner(PropertyDescriptor pd) + { + return _dictionary; + } + + public AttributeCollection GetAttributes() + { + return TypeDescriptor.GetAttributes(this, true); + } + + public object GetEditor(Type editorBaseType) + { + return TypeDescriptor.GetEditor(this, editorBaseType, true); + } + + public PropertyDescriptor GetDefaultProperty() + { + return null; + } + + PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties() + { + return ((ICustomTypeDescriptor)this).GetProperties(new Attribute[0]); + } + + public PropertyDescriptorCollection GetProperties(Attribute[] attributes) + { + var properties = new ArrayList(); + foreach (var e in _dictionary) + { + properties.Add(new DictionaryPropertyDescriptor(_dictionary, e.Key, _isReadOnly)); + } + + var props = (PropertyDescriptor[])properties.ToArray(typeof(PropertyDescriptor)); + + return new PropertyDescriptorCollection(props); + } + } +} diff --git a/src/Utilities/Helpers/TimeFilterInfo.cs b/src/Utilities/Helpers/TimeFilterInfo.cs index da28c6f2..f41c75d3 100644 --- a/src/Utilities/Helpers/TimeFilterInfo.cs +++ b/src/Utilities/Helpers/TimeFilterInfo.cs @@ -32,7 +32,7 @@ public class TimeFilterInfo #region Private Fields private string property; private string @operator; - private string dateTime; + private DateTime? dateTime; #endregion #region Public Events @@ -81,7 +81,7 @@ public string Operator } } - public string Value + public DateTime? Value { get { @@ -141,4 +141,4 @@ private string Adjust(string word) } #endregion } -} \ No newline at end of file +} From a7adaa46505b0a17a85167d2b7f7eba5381fd8ff Mon Sep 17 00:00:00 2001 From: Erik Mogensen Date: Mon, 4 Jan 2021 15:34:06 +0100 Subject: [PATCH 05/18] Upgraded Event hubs SDK (#490) * Upgraded Event hubs * Updated the new ServiceBus SDK * Changed errorhandling * Removed SubscriptionWrapper2 class * Removed changes to Service bus SDK. That is a separate branch * Upgraded NuGet packages for AMQP and Azure.Core. Co-authored-by: Erik Mogensen --- src/Common/Common.csproj | 46 +++++++++++++++++++++++++++++----- src/Common/app.config | 28 +++++++++++++++++++++ src/Common/packages.config | 17 ++++++++++--- src/EventHubs/EventHubs.csproj | 2 +- 4 files changed, 83 insertions(+), 10 deletions(-) diff --git a/src/Common/Common.csproj b/src/Common/Common.csproj index 528b4f4b..392cdcdd 100644 --- a/src/Common/Common.csproj +++ b/src/Common/Common.csproj @@ -34,11 +34,14 @@ 4 - - ..\packages\Microsoft.Azure.Amqp.2.4.2\lib\net45\Microsoft.Azure.Amqp.dll + + ..\packages\Azure.Core.1.6.0\lib\net461\Azure.Core.dll + + + ..\packages\Azure.Messaging.EventHubs.5.2.0\lib\netstandard2.0\Azure.Messaging.EventHubs.dll - - ..\packages\Microsoft.Azure.EventHubs.4.1.0\lib\netstandard2.0\Microsoft.Azure.EventHubs.dll + + ..\packages\Microsoft.Azure.Amqp.2.4.8\lib\net45\Microsoft.Azure.Amqp.dll ..\packages\Microsoft.Azure.NotificationHubs.1.0.9\lib\net45-full\Microsoft.Azure.NotificationHubs.dll @@ -52,6 +55,9 @@ ..\packages\Microsoft.Azure.Services.AppAuthentication.1.0.3\lib\net452\Microsoft.Azure.Services.AppAuthentication.dll + + ..\packages\Microsoft.Bcl.AsyncInterfaces.1.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + ..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.4.5.0\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll @@ -74,18 +80,24 @@ ..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll + + ..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll + - - ..\packages\System.Diagnostics.DiagnosticSource.4.5.1\lib\net46\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.4.6.0\lib\net46\System.Diagnostics.DiagnosticSource.dll ..\packages\System.IdentityModel.Tokens.Jwt.5.4.0\lib\net461\System.IdentityModel.Tokens.Jwt.dll + + ..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll + ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll @@ -103,10 +115,17 @@ True True + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + ..\packages\System.Reflection.TypeExtensions.4.5.1\lib\net461\System.Reflection.TypeExtensions.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll + ..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll @@ -134,6 +153,21 @@ True + + ..\packages\System.Text.Encodings.Web.4.6.0\lib\netstandard2.0\System.Text.Encodings.Web.dll + + + ..\packages\System.Text.Json.4.6.0\lib\net461\System.Text.Json.dll + + + ..\packages\System.Threading.Channels.4.6.0\lib\netstandard2.0\System.Threading.Channels.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll + + + ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll + diff --git a/src/Common/app.config b/src/Common/app.config index 027da686..9831fc69 100644 --- a/src/Common/app.config +++ b/src/Common/app.config @@ -22,6 +22,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/packages.config b/src/Common/packages.config index 710c6ae6..48d9db2f 100644 --- a/src/Common/packages.config +++ b/src/Common/packages.config @@ -1,27 +1,38 @@  - - + + + + - + + + + + + + + + + \ No newline at end of file diff --git a/src/EventHubs/EventHubs.csproj b/src/EventHubs/EventHubs.csproj index 1b42ba09..39c7a4f3 100644 --- a/src/EventHubs/EventHubs.csproj +++ b/src/EventHubs/EventHubs.csproj @@ -10,7 +10,7 @@ - + From 4b548c0cdff69e9b71d8e1acf6e7e7bdab799564 Mon Sep 17 00:00:00 2001 From: Erik Mogensen Date: Tue, 5 Jan 2021 06:27:41 +0100 Subject: [PATCH 06/18] Upgrade service bus SDK (#494) Co-authored-by: Erik Mogensen --- src/Common/Common.csproj | 12 +- src/Common/Helpers/ServiceBusHelper.cs | 58 ++-- src/Common/packages.config | 4 +- src/ServiceBus/Helpers/ServiceBusHelper2.cs | 7 +- src/ServiceBus/Helpers/ServiceBusPurger.cs | 273 +++++++++++------- .../Helpers/SubscriptionWrapper2.cs | 77 ----- src/ServiceBus/ServiceBus.csproj | 3 +- .../Controls/HandleQueueControl.cs | 40 +-- .../Controls/HandleSubscriptionControl.cs | 52 ++-- 9 files changed, 252 insertions(+), 274 deletions(-) delete mode 100644 src/ServiceBus/Helpers/SubscriptionWrapper2.cs diff --git a/src/Common/Common.csproj b/src/Common/Common.csproj index 392cdcdd..fcb63de5 100644 --- a/src/Common/Common.csproj +++ b/src/Common/Common.csproj @@ -37,9 +37,15 @@ ..\packages\Azure.Core.1.6.0\lib\net461\Azure.Core.dll + + ..\packages\Azure.Core.Amqp.1.0.0\lib\netstandard2.0\Azure.Core.Amqp.dll + ..\packages\Azure.Messaging.EventHubs.5.2.0\lib\netstandard2.0\Azure.Messaging.EventHubs.dll + + ..\packages\Azure.Messaging.ServiceBus.7.0.0\lib\netstandard2.0\Azure.Messaging.ServiceBus.dll + ..\packages\Microsoft.Azure.Amqp.2.4.8\lib\net45\Microsoft.Azure.Amqp.dll @@ -49,9 +55,6 @@ ..\packages\Microsoft.Azure.Relay.2.0.1\lib\net451\Microsoft.Azure.Relay.dll - - ..\packages\Microsoft.Azure.ServiceBus.4.0.0\lib\netstandard2.0\Microsoft.Azure.ServiceBus.dll - ..\packages\Microsoft.Azure.Services.AppAuthentication.1.0.3\lib\net452\Microsoft.Azure.Services.AppAuthentication.dll @@ -98,6 +101,9 @@ ..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll + + ..\packages\System.Memory.Data.1.0.1\lib\net461\System.Memory.Data.dll + ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll diff --git a/src/Common/Helpers/ServiceBusHelper.cs b/src/Common/Helpers/ServiceBusHelper.cs index 54a7240d..3de95d2e 100644 --- a/src/Common/Helpers/ServiceBusHelper.cs +++ b/src/Common/Helpers/ServiceBusHelper.cs @@ -34,14 +34,18 @@ using System.Threading; using System.Threading.Tasks; using System.Xml; + +using Azure.Messaging.ServiceBus.Administration; + using Microsoft.ServiceBus; using Microsoft.ServiceBus.Messaging; + using ServiceBusExplorer.Enums; using ServiceBusExplorer.Helpers; using ServiceBusExplorer.ServiceBus.Helpers; using ServiceBusExplorer.Utilities.Helpers; + using AzureNotificationHubs = Microsoft.Azure.NotificationHubs; -using NewSdkManagement = Microsoft.Azure.ServiceBus.Management; #endregion // ReSharper disable CheckNamespace @@ -1585,7 +1589,7 @@ public IEnumerable GetQueues(string filter, int timeoutInSecon throw new TimeoutException(); } } - return queues; + return queues; } return new List { @@ -1717,7 +1721,7 @@ public IEnumerable GetTopics(string filter, int timeoutInSecon var filters = new List(); if (string.IsNullOrWhiteSpace(filter)) { - filters.Add(filter); + filters.Add(filter); } else { @@ -1740,7 +1744,7 @@ public IEnumerable GetTopics(string filter, int timeoutInSecon throw new TimeoutException(); } } - return topics; + return topics; } return new List { @@ -4736,7 +4740,7 @@ public void ImportEntities(string xml) var importExportHelper = new ImportExportHelper(writeToLog); importExportHelper.DeserializeAndCreate(this, xml); } - + /// /// Reads the content of the BrokeredMessage passed as argument. /// @@ -5294,40 +5298,32 @@ public ServiceBusHelper2 GetServiceBusHelper2() var serviceBusHelper2 = new ServiceBusHelper2(); serviceBusHelper2.ConnectionString = ConnectionString; serviceBusHelper2.TransportType = UseAmqpWebSockets - ? Microsoft.Azure.ServiceBus.TransportType.AmqpWebSockets - : Microsoft.Azure.ServiceBus.TransportType.Amqp; + ? Azure.Messaging.ServiceBus.ServiceBusTransportType.AmqpWebSockets + : Azure.Messaging.ServiceBus.ServiceBusTransportType.AmqpTcp; return serviceBusHelper2; } - public async Task GetNewSdkQueueDescription(QueueDescription oldQueueDescription) + public async Task GetQueueProperties(QueueDescription oldQueueDescription) { - var managementClient = new NewSdkManagement.ManagementClient(connectionString); - try - { - return await managementClient.GetQueueAsync(oldQueueDescription.Path); - } - finally - { - await managementClient.CloseAsync(); - } + var administrationClient = new ServiceBusAdministrationClient(connectionString); + + return await administrationClient.GetQueueAsync(oldQueueDescription.Path); } - public async Task GetSubscriptionWrapper2(SubscriptionWrapper oldSubscriptionWrapper) + public async Task GetSubscriptionProperties(SubscriptionWrapper oldSubscriptionWrapper) { - var managementClient = new NewSdkManagement.ManagementClient(connectionString); - try - { - var newSdkTopicDescription = await managementClient.GetTopicAsync(oldSubscriptionWrapper.TopicDescription.Path); - var newSdkSubscriptionDescription = await managementClient.GetSubscriptionAsync( - newSdkTopicDescription.Path, - oldSubscriptionWrapper.SubscriptionDescription.Name); + var managementClient = new ServiceBusAdministrationClient(connectionString); - return new SubscriptionWrapper2(newSdkSubscriptionDescription, newSdkTopicDescription); - } - finally - { - await managementClient.CloseAsync(); - } + var topicResponse = await managementClient.GetTopicAsync( + oldSubscriptionWrapper.TopicDescription.Path) + .ConfigureAwait(false); + + var subscriptionResponse = await managementClient.GetSubscriptionAsync( + topicResponse.Value.Name, + oldSubscriptionWrapper.SubscriptionDescription.Name) + .ConfigureAwait(false); + + return subscriptionResponse.Value; } #endregion diff --git a/src/Common/packages.config b/src/Common/packages.config index 48d9db2f..f2964723 100644 --- a/src/Common/packages.config +++ b/src/Common/packages.config @@ -1,11 +1,12 @@  + + - @@ -18,6 +19,7 @@ + diff --git a/src/ServiceBus/Helpers/ServiceBusHelper2.cs b/src/ServiceBus/Helpers/ServiceBusHelper2.cs index 90ac20f4..e92d593a 100644 --- a/src/ServiceBus/Helpers/ServiceBusHelper2.cs +++ b/src/ServiceBus/Helpers/ServiceBusHelper2.cs @@ -20,17 +20,16 @@ #endregion #region Using Directives +using Azure.Messaging.ServiceBus; #endregion // ReSharper disable CheckNamespace namespace ServiceBusExplorer.ServiceBus.Helpers // ReSharper restore CheckNamespace { - using Microsoft.Azure.ServiceBus; - - public class ServiceBusHelper2 + public class ServiceBusHelper2 { public string ConnectionString { get; set; } - public TransportType TransportType { get; set; } + public ServiceBusTransportType TransportType { get; set; } } } diff --git a/src/ServiceBus/Helpers/ServiceBusPurger.cs b/src/ServiceBus/Helpers/ServiceBusPurger.cs index b336cb72..d354b601 100644 --- a/src/ServiceBus/Helpers/ServiceBusPurger.cs +++ b/src/ServiceBus/Helpers/ServiceBusPurger.cs @@ -19,34 +19,34 @@ //======================================================================================= #endregion +using Azure.Messaging.ServiceBus; +using Azure.Messaging.ServiceBus.Administration; + using System; using System.Collections.Generic; using System.Linq; -using Microsoft.Azure.ServiceBus; -using Microsoft.Azure.ServiceBus.Core; -using Microsoft.Azure.ServiceBus.Management; -using System.Threading.Tasks; using System.Threading; +using System.Threading.Tasks; namespace ServiceBusExplorer.ServiceBus.Helpers { public class ServiceBusPurger { - // Either queueDescription or subscriptWrapper is used - but never both. - readonly QueueDescription queueDescription; - readonly SubscriptionWrapper2 subscriptionWrapper; + // Either queueProperties or subscriptProperties is used - but never both. + readonly QueueProperties queueProperties; + readonly SubscriptionProperties subscriptionProperties; readonly ServiceBusHelper2 serviceBusHelper; - public ServiceBusPurger(ServiceBusHelper2 serviceBusHelper, QueueDescription queueDescription) + public ServiceBusPurger(ServiceBusHelper2 serviceBusHelper, QueueProperties queueProperties) { this.serviceBusHelper = serviceBusHelper; - this.queueDescription = queueDescription; + this.queueProperties = queueProperties; } - public ServiceBusPurger(ServiceBusHelper2 serviceBusHelper, SubscriptionWrapper2 subscriptionWrapper) + public ServiceBusPurger(ServiceBusHelper2 serviceBusHelper, SubscriptionProperties subscriptionProperties) { this.serviceBusHelper = serviceBusHelper; - this.subscriptionWrapper = subscriptionWrapper; + this.subscriptionProperties = subscriptionProperties; } /// @@ -65,46 +65,104 @@ public async Task Purge(bool purgeDeadLetterQueueInstead = false) } else { - totalMessagesPurged = await PurgeNonSessionEntity(purgeDeadLetterQueueInstead: purgeDeadLetterQueueInstead).ConfigureAwait(false); + totalMessagesPurged = await PurgeNonSessionEntity( + purgeDeadLetterQueueInstead: purgeDeadLetterQueueInstead).ConfigureAwait(false); } return totalMessagesPurged; } - async Task PurgeSessionEntity() + ServiceBusReceiver CreateServiceBusReceiver(ServiceBusClient client, + bool purgeDeadLetterQueueInstead) { - long messagesToPurgeCount = await GetMessageCount(deadLetterQueueData: false); + if (queueProperties != null) + { + return client.CreateReceiver( + queueProperties.Name, + new ServiceBusReceiverOptions + { + PrefetchCount = 50, + ReceiveMode = ServiceBusReceiveMode.ReceiveAndDelete, + SubQueue = purgeDeadLetterQueueInstead ? SubQueue.DeadLetter : SubQueue.None + }); + } + else + { + return client.CreateReceiver( + subscriptionProperties.TopicName, + subscriptionProperties.SubscriptionName, + new ServiceBusReceiverOptions + { + PrefetchCount = 50, + ReceiveMode = ServiceBusReceiveMode.ReceiveAndDelete, + SubQueue = purgeDeadLetterQueueInstead ? SubQueue.DeadLetter : SubQueue.None + }); + } + } - return await DoPurgeSessionEntity(messagesToPurgeCount).ConfigureAwait(false); + async Task CreateServiceBusSessionReceiver(ServiceBusClient client, + bool purgeDeadLetterQueueInstead) + { + if (queueProperties != null) + { + return await client.AcceptNextSessionAsync( + queueProperties.Name, + new ServiceBusSessionReceiverOptions + { + PrefetchCount = 10, + ReceiveMode = ServiceBusReceiveMode.ReceiveAndDelete + }) + .ConfigureAwait(false); + } + else + { + return await client.AcceptNextSessionAsync( + subscriptionProperties.TopicName, + subscriptionProperties.SubscriptionName, + new ServiceBusSessionReceiverOptions + { + PrefetchCount = 10, + ReceiveMode = ServiceBusReceiveMode.ReceiveAndDelete + }) + .ConfigureAwait(false); + } } - async Task DoPurgeSessionEntity(long messagesToPurgeCount) + async Task PurgeSessionEntity() { long totalMessagesPurged = 0; + var consecutiveSessionTimeOuts = 0; + ServiceBusSessionReceiver sessionReceiver = null; + long messagesToPurgeCount = await GetMessageCount(deadLetterQueueData: false) + .ConfigureAwait(false); - ISessionClient sessionClient = new SessionClient( - serviceBusHelper.ConnectionString, - GetEntityPath(deadLetterQueue: false), - null, - receiveMode: ReceiveMode.ReceiveAndDelete, - retryPolicy: RetryPolicy.Default, - prefetchCount: 10, - transportType: serviceBusHelper.TransportType); + var client = new ServiceBusClient( + serviceBusHelper.ConnectionString, + new ServiceBusClientOptions + { + TransportType = serviceBusHelper.TransportType + }); - var consecutiveSessionTimeOuts = 0; try { const int enoughZeroReceives = 3; + while (consecutiveSessionTimeOuts < enoughZeroReceives && totalMessagesPurged < messagesToPurgeCount) { - IMessageSession session = await sessionClient.AcceptMessageSessionAsync(); + sessionReceiver = await CreateServiceBusSessionReceiver( + client, + purgeDeadLetterQueueInstead: false) + .ConfigureAwait(false); var consecutiveZeroBatchReceives = 0; + while (consecutiveZeroBatchReceives < enoughZeroReceives && totalMessagesPurged < messagesToPurgeCount) { - var messages = await session.ReceiveAsync(1000, TimeSpan.FromMilliseconds(1000)) - .ConfigureAwait(false); + var messages = await sessionReceiver.ReceiveMessagesAsync( + maxMessages: 1000, + maxWaitTime: TimeSpan.FromMilliseconds(1000)) + .ConfigureAwait(false); if (messages != null && messages.Any()) { @@ -117,7 +175,7 @@ async Task DoPurgeSessionEntity(long messagesToPurgeCount) } } - await session.CloseAsync().ConfigureAwait(false); + await sessionReceiver.CloseAsync().ConfigureAwait(false); } } catch (TimeoutException) @@ -126,7 +184,7 @@ async Task DoPurgeSessionEntity(long messagesToPurgeCount) } finally { - await sessionClient.CloseAsync().ConfigureAwait(false); + await client.DisposeAsync().ConfigureAwait(false); } return totalMessagesPurged; @@ -134,8 +192,7 @@ async Task DoPurgeSessionEntity(long messagesToPurgeCount) async Task PurgeNonSessionEntity(bool purgeDeadLetterQueueInstead) { - var entityPath = GetEntityPath(purgeDeadLetterQueueInstead); - long messagesToPurgeCount = await GetMessageCount(purgeDeadLetterQueueInstead); + long messagesToPurgeCount = await GetMessageCount(purgeDeadLetterQueueInstead).ConfigureAwait(false); long purgedMessagesCount = 0; var messageCount = messagesToPurgeCount; var retries = 0; @@ -144,148 +201,140 @@ async Task PurgeNonSessionEntity(bool purgeDeadLetterQueueInstead) while (purgedMessagesCount < messagesToPurgeCount && messageCount >= 1 && retries < 3) { purgedMessagesCount += await DoPurgeNonSessionEntity( - queue: purgeDeadLetterQueueInstead ? true : queueDescription != null, messagesToPurgeCount: messagesToPurgeCount, - entityPath: entityPath) + purgeDeadLetterSubqueueInstead: purgeDeadLetterQueueInstead + ) .ConfigureAwait(false); - messageCount = await GetMessageCount(purgeDeadLetterQueueInstead); + messageCount = await GetMessageCount(purgeDeadLetterQueueInstead).ConfigureAwait(false); ++retries; } return purgedMessagesCount; } - string GetEntityPath(bool deadLetterQueue) - { - if (deadLetterQueue) - { - if (queueDescription != null) - { - return EntityNameHelper.FormatDeadLetterPath(queueDescription.Path); - } - else - { - var subscriptionPath = EntityNameHelper.FormatSubscriptionPath(subscriptionWrapper.TopicDescription.Path, - subscriptionWrapper.SubscriptionDescription.SubscriptionName); - return EntityNameHelper.FormatDeadLetterPath(subscriptionPath); - } - } - else - { - if (queueDescription != null) - { - return queueDescription.Path; - } - else - { - return EntityNameHelper.FormatSubscriptionPath(subscriptionWrapper.TopicDescription.Path, - subscriptionWrapper.SubscriptionDescription.SubscriptionName); - } - } - } - async Task GetMessageCount(bool deadLetterQueueData) { - var client = new ManagementClient(serviceBusHelper.ConnectionString); + var client = new ServiceBusAdministrationClient(serviceBusHelper.ConnectionString); if (deadLetterQueueData) { - if (queueDescription != null) + if (queueProperties != null) { - var runtimeInfo = await client.GetQueueRuntimeInfoAsync(queueDescription.Path); + var runtimeInfoResponse = await client.GetQueueRuntimePropertiesAsync(queueProperties.Name) + .ConfigureAwait(false); - return runtimeInfo.MessageCountDetails.DeadLetterMessageCount; + return runtimeInfoResponse.Value.DeadLetterMessageCount; } else { - var runtimeInfo = await client.GetSubscriptionRuntimeInfoAsync(subscriptionWrapper.TopicDescription.Path, - subscriptionWrapper.SubscriptionDescription.SubscriptionName); + var runtimeInfoResponse = await client.GetSubscriptionRuntimePropertiesAsync( + subscriptionProperties.TopicName, + subscriptionProperties.SubscriptionName) + .ConfigureAwait(false); - return runtimeInfo.MessageCountDetails.DeadLetterMessageCount; + return runtimeInfoResponse.Value.DeadLetterMessageCount; } } else { - if (queueDescription != null) + if (queueProperties != null) { - var runtimeInfo = await client.GetQueueRuntimeInfoAsync(queueDescription.Path); + var runtimeInfo = await client.GetQueueRuntimePropertiesAsync(queueProperties.Name) + .ConfigureAwait(false); - return runtimeInfo.MessageCountDetails.ActiveMessageCount; + return runtimeInfo.Value.ActiveMessageCount; } else { - var runtimeInfo = await client.GetSubscriptionRuntimeInfoAsync(subscriptionWrapper.TopicDescription.Path, - subscriptionWrapper.SubscriptionDescription.SubscriptionName); + var runtimeInfo = await client.GetSubscriptionRuntimePropertiesAsync( + subscriptionProperties.TopicName, + subscriptionProperties.SubscriptionName) + .ConfigureAwait(false); - return runtimeInfo.MessageCountDetails.ActiveMessageCount; + return runtimeInfo.Value.ActiveMessageCount; } } } - async Task DoPurgeNonSessionEntity(bool queue, long messagesToPurgeCount, string entityPath) + async Task DoPurgeNonSessionEntity(long messagesToPurgeCount, bool purgeDeadLetterSubqueueInstead) { long totalMessagesPurged = 0; var taskCount = Math.Min((int)messagesToPurgeCount / 1000 + 1, 20); var tasks = new Task[taskCount]; var quit = false; // This instance controls all the receiving tasks - for (var taskIndex = 0; taskIndex < tasks.Length; taskIndex++) + var client = new ServiceBusClient( + serviceBusHelper.ConnectionString, + new ServiceBusClientOptions { TransportType = serviceBusHelper.TransportType }); + + try { - tasks[taskIndex] = Task.Run(async () => + for (var taskIndex = 0; taskIndex < tasks.Length; taskIndex++) { - ClientEntity receiver; - - receiver = new MessageReceiver(serviceBusHelper.ConnectionString, entityPath, - ReceiveMode.ReceiveAndDelete, RetryPolicy.Default, prefetchCount: 50); - - try + tasks[taskIndex] = Task.Run(async () => { - var consecutiveZeroBatchReceives = 0; - const int enoughZeroBatchReceives = 3; + ServiceBusReceiver receiver = CreateServiceBusReceiver( + client, + purgeDeadLetterSubqueueInstead); - while (!quit && Interlocked.Read(ref totalMessagesPurged) < messagesToPurgeCount) + try { - IEnumerable messages; + var consecutiveZeroBatchReceives = 0; + const int enoughZeroBatchReceives = 3; - messages = await ((MessageReceiver)receiver).ReceiveAsync(1000, - TimeSpan.FromMilliseconds(20000 * (consecutiveZeroBatchReceives + 1))) - .ConfigureAwait(false); - - // ReSharper disable once PossibleMultipleEnumeration - if (messages != null && messages.Any()) + while (!quit && Interlocked.Read(ref totalMessagesPurged) < messagesToPurgeCount) { + IEnumerable messages; + + messages = await receiver.ReceiveMessagesAsync( + maxMessages: 1000, + maxWaitTime: TimeSpan.FromMilliseconds(20000 * (consecutiveZeroBatchReceives + 1))) + .ConfigureAwait(false); + // ReSharper disable once PossibleMultipleEnumeration - long messageCount = messages.Count(); - Interlocked.Add(ref totalMessagesPurged, messageCount); + if (messages != null && messages.Any()) + { + // ReSharper disable once PossibleMultipleEnumeration + long messageCount = messages.Count(); + Interlocked.Add(ref totalMessagesPurged, messageCount); + } + else + { + ++consecutiveZeroBatchReceives; + if (consecutiveZeroBatchReceives >= enoughZeroBatchReceives) + quit = true; + } } - else + } + finally + { + if (null != receiver) { - ++consecutiveZeroBatchReceives; - if (consecutiveZeroBatchReceives >= enoughZeroBatchReceives) - quit = true; + await receiver.CloseAsync().ConfigureAwait(false); } } - } - finally - { - await receiver.CloseAsync().ConfigureAwait(false); - } - }); // End of lambda + }); // End of lambda + } + + await Task.WhenAll(tasks).ConfigureAwait(false); + } + finally + { + await client.DisposeAsync().ConfigureAwait(false); } - await Task.WhenAll(tasks).ConfigureAwait(false); return totalMessagesPurged; } bool EntityRequiresSession() { - if (queueDescription != null) + if (queueProperties != null) { - return queueDescription.RequiresSession; + return queueProperties.RequiresSession; } - return subscriptionWrapper.SubscriptionDescription.RequiresSession; + return subscriptionProperties.RequiresSession; } } } diff --git a/src/ServiceBus/Helpers/SubscriptionWrapper2.cs b/src/ServiceBus/Helpers/SubscriptionWrapper2.cs deleted file mode 100644 index b00e0613..00000000 --- a/src/ServiceBus/Helpers/SubscriptionWrapper2.cs +++ /dev/null @@ -1,77 +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 Microsoft.Azure.ServiceBus.Management; - -#endregion - -namespace ServiceBusExplorer.ServiceBus.Helpers -{ - /// - /// This class adds a Subscriptions collection to the TopicDescription class - /// - public class SubscriptionWrapper2 - { - #region Public Constructors - /// - /// Initializes a new instance of the SubscriptionWrapper class. - /// - public SubscriptionWrapper2() - { - SubscriptionDescription = null; - TopicDescription = null; - Filter = null; - } - - /// - /// Initializes a new instance of the SubscriptionWrapper class. - /// - /// A subscription. - /// The topic the subscription belongs to. - public SubscriptionWrapper2(SubscriptionDescription subscription, TopicDescription topic) - { - SubscriptionDescription = subscription; - TopicDescription = topic; - } - - /// - /// Initializes a new instance of the SubscriptionWrapper class. - /// - /// A subscription. - /// The topic the subscription belongs to. - /// The OData filter. - public SubscriptionWrapper2(SubscriptionDescription subscription, TopicDescription topic, string filter) - { - SubscriptionDescription = subscription; - TopicDescription = topic; - Filter = filter; - } - #endregion - - #region Public Properties - public SubscriptionDescription SubscriptionDescription { get; set; } - public TopicDescription TopicDescription { get; set; } - public string Filter { get; set; } - #endregion - } -} diff --git a/src/ServiceBus/ServiceBus.csproj b/src/ServiceBus/ServiceBus.csproj index 423b6f02..13f11b90 100644 --- a/src/ServiceBus/ServiceBus.csproj +++ b/src/ServiceBus/ServiceBus.csproj @@ -2,14 +2,13 @@ netstandard2.0 - 7.3 ServiceBusExplorer.ServiceBus - + diff --git a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs index 0c701b32..badddbe8 100644 --- a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs @@ -24,22 +24,24 @@ #region Using Directives #nullable enable +using Microsoft.ServiceBus.Messaging; + +using ServiceBusExplorer.Forms; +using ServiceBusExplorer.Helpers; +using ServiceBusExplorer.ServiceBus.Helpers; +using ServiceBusExplorer.UIHelpers; +using ServiceBusExplorer.Utilities.Helpers; + using System; -using System.ComponentModel; -using System.Drawing; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; +using System.Drawing; using System.Globalization; using System.IO; -using System.Windows.Forms; using System.Linq; -using Microsoft.ServiceBus.Messaging; using System.Threading.Tasks; -using ServiceBusExplorer.Forms; -using ServiceBusExplorer.Helpers; -using ServiceBusExplorer.UIHelpers; -using ServiceBusExplorer.Utilities.Helpers; -using ServiceBusExplorer.ServiceBus.Helpers; +using System.Windows.Forms; #endregion @@ -353,12 +355,12 @@ public async Task PurgeMessagesAsync() Application.UseWaitCursor = true; var stopwatch = new Stopwatch(); stopwatch.Start(); - var newSdkQueueDescription = await serviceBusHelper.GetNewSdkQueueDescription(queueDescription); - var purger = new ServiceBusPurger(serviceBusHelper.GetServiceBusHelper2(), newSdkQueueDescription); + var queueProperties = await serviceBusHelper.GetQueueProperties(queueDescription); + var purger = new ServiceBusPurger(serviceBusHelper.GetServiceBusHelper2(), queueProperties); var count = await purger.Purge(); stopwatch.Stop(); MainForm.SingletonMainForm.refreshEntity_Click(null, null); - writeToLog($"[{count}] messages have been purged from the [{queueDescription.Path}] queue in [{stopwatch.ElapsedMilliseconds}] milliseconds."); + writeToLog($"[{count}] messages have been purged from the [{queueDescription.Path}] queue in [{stopwatch.ElapsedMilliseconds/1000}] seconds."); return count; } finally @@ -382,12 +384,12 @@ public async Task PurgeDeadletterQueueMessagesAsync() Application.UseWaitCursor = true; var stopwatch = new Stopwatch(); stopwatch.Start(); - var newSdkQueueDescription = await serviceBusHelper.GetNewSdkQueueDescription(queueDescription); + var newSdkQueueDescription = await serviceBusHelper.GetQueueProperties(queueDescription); var purger = new ServiceBusPurger(serviceBusHelper.GetServiceBusHelper2(), newSdkQueueDescription); var count = await purger.Purge(purgeDeadLetterQueueInstead: true); stopwatch.Stop(); MainForm.SingletonMainForm.refreshEntity_Click(null, null); - writeToLog($"[{count}] messages have been purged from the deadletter queue of the [{queueDescription.Path}] queue in [{stopwatch.ElapsedMilliseconds}] milliseconds."); + writeToLog($"[{count}] messages have been purged from the deadletter queue of the [{queueDescription.Path}] queue in [{stopwatch.ElapsedMilliseconds/1000}] seconds."); return count; } finally @@ -1244,8 +1246,8 @@ private void GetMessages(bool peek, bool all, int count, IBrokeredMessageInspect MessageReceiver receiver; if (fromSession != null) { - var queueClient = serviceBusHelper.MessagingFactory.CreateQueueClient(queueDescription.Path, - ReceiveMode.PeekLock); + var queueClient = serviceBusHelper.MessagingFactory.CreateQueueClient(queueDescription.Path, + ReceiveMode.PeekLock); receiver = queueClient.AcceptMessageSession(fromSession); } else @@ -1392,15 +1394,15 @@ private void ReadMessagesOneAtTheTime(bool peek, bool all, int count, IBrokeredM MessageReceiver messageReceiver; if (fromSession != null) { - var queueClient = serviceBusHelper.MessagingFactory.CreateQueueClient(queueDescription.Path, - ReceiveMode.PeekLock); + var queueClient = serviceBusHelper.MessagingFactory.CreateQueueClient(queueDescription.Path, + ReceiveMode.PeekLock); messageReceiver = queueClient.AcceptMessageSession(fromSession); } else { messageReceiver = serviceBusHelper.MessagingFactory.CreateMessageReceiver(queueDescription.Path, ReceiveMode.PeekLock); } - + for (var i = 0; i < count; i++) { BrokeredMessage message; diff --git a/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs b/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs index 8ce570b0..a64bc9c1 100644 --- a/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs @@ -21,6 +21,14 @@ #region Using Directives +using Microsoft.ServiceBus.Messaging; + +using ServiceBusExplorer.Forms; +using ServiceBusExplorer.Helpers; +using ServiceBusExplorer.ServiceBus.Helpers; +using ServiceBusExplorer.UIHelpers; +using ServiceBusExplorer.Utilities.Helpers; + using System; using System.Collections.Generic; using System.ComponentModel; @@ -31,12 +39,6 @@ using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; -using ServiceBusExplorer.Forms; -using ServiceBusExplorer.Helpers; -using ServiceBusExplorer.ServiceBus.Helpers; -using ServiceBusExplorer.UIHelpers; -using ServiceBusExplorer.Utilities.Helpers; -using Microsoft.ServiceBus.Messaging; #endregion @@ -129,7 +131,7 @@ public partial class HandleSubscriptionControl : UserControl private const string AutoDeleteOnIdleTooltip = "Gets or sets the maximum period of idleness after which the queue is auto deleted."; private const string ForwardToTooltip = "Gets or sets the path to the recipient to which the message is forwarded."; private const string ForwardDeadLetteredMessagesToTooltip = "Gets or sets the path to the recipient to which the dead lettered message is forwarded."; - + //*************************** // Property Labels //*************************** @@ -190,7 +192,7 @@ public partial class HandleSubscriptionControl : UserControl private SortableBindingList sessionBindingList; private bool buttonsMoved; #endregion - + #region Public Constructors public HandleSubscriptionControl(WriteToLogDelegate writeToLog, ServiceBusHelper serviceBusHelper, SubscriptionWrapper subscriptionWrapper) { @@ -200,7 +202,7 @@ public HandleSubscriptionControl(WriteToLogDelegate writeToLog, ServiceBusHelper InitializeComponent(); InitializeControls(); - } + } #endregion #region Public Events @@ -340,7 +342,7 @@ public void GetMessageSessions() GrouperMessagePropertiesWith - sessionsSplitContainer.SplitterWidth; sessionMainSplitContainer.SplitterDistance = - sessionMainSplitContainer.Size.Height/2 - 8; + sessionMainSplitContainer.Size.Height / 2 - 8; if (mainTabControl.TabPages[SessionsTabPage] != null) { @@ -375,14 +377,14 @@ public async Task PurgeMessagesAsync() Application.UseWaitCursor = true; var stopwatch = new Stopwatch(); stopwatch.Start(); - var subscriptionWrapper2 = await serviceBusHelper.GetSubscriptionWrapper2(subscriptionWrapper); - var purger = new ServiceBusPurger(serviceBusHelper.GetServiceBusHelper2(), subscriptionWrapper2); + var subscriptionProperties = await serviceBusHelper.GetSubscriptionProperties(subscriptionWrapper); + var purger = new ServiceBusPurger(serviceBusHelper.GetServiceBusHelper2(), subscriptionProperties); var count = await purger.Purge(); stopwatch.Stop(); MainForm.SingletonMainForm.refreshEntity_Click(null, null); - var entityPath = SubscriptionClient.FormatSubscriptionPath(subscriptionWrapper.SubscriptionDescription.TopicPath, + var entityPath = SubscriptionClient.FormatSubscriptionPath(subscriptionWrapper.SubscriptionDescription.TopicPath, subscriptionWrapper.SubscriptionDescription.Name); - writeToLog($"[{count}] messages have been purged from the [{entityPath}] subscription in [{stopwatch.ElapsedMilliseconds}] milliseconds."); + writeToLog($"[{count}] messages have been purged from the [{entityPath}] subscription in [{stopwatch.ElapsedMilliseconds/1000}] seconds."); return count; } finally @@ -405,14 +407,14 @@ public async Task PurgeDeadletterQueueMessagesAsync() Application.UseWaitCursor = true; var stopwatch = new Stopwatch(); stopwatch.Start(); - var subscriptionWrapper2 = await serviceBusHelper.GetSubscriptionWrapper2(subscriptionWrapper); + var subscriptionWrapper2 = await serviceBusHelper.GetSubscriptionProperties(subscriptionWrapper); var purger = new ServiceBusPurger(serviceBusHelper.GetServiceBusHelper2(), subscriptionWrapper2); var count = await purger.Purge(purgeDeadLetterQueueInstead: true); stopwatch.Stop(); var entityPath = SubscriptionClient.FormatSubscriptionPath(subscriptionWrapper.SubscriptionDescription.TopicPath, subscriptionWrapper.SubscriptionDescription.Name); MainForm.SingletonMainForm.refreshEntity_Click(null, null); - writeToLog($"[{count}] messages have been purged from the deadletter queue of the [{entityPath}] subscription in [{stopwatch.ElapsedMilliseconds}] milliseconds."); + writeToLog($"[{count}] messages have been purged from the deadletter queue of the [{entityPath}] subscription in [{stopwatch.ElapsedMilliseconds/1000}] seconds."); return count; } finally @@ -440,7 +442,7 @@ private void InitializeControls() DisablePage(MessagesTabPage); DisablePage(SessionsTabPage); DisablePage(DeadletterTabPage); - + if (subscriptionWrapper != null && subscriptionWrapper.TopicDescription != null && subscriptionWrapper.SubscriptionDescription != null) @@ -940,8 +942,8 @@ private void GetMessages(bool peek, bool all, int count, IBrokeredMessageInspect } catch (TimeoutException) { - writeToLog(string.Format(NoMessageReceivedFromTheSubscription, - MainForm.SingletonMainForm.ReceiveTimeout, + writeToLog(string.Format(NoMessageReceivedFromTheSubscription, + MainForm.SingletonMainForm.ReceiveTimeout, subscriptionWrapper.SubscriptionDescription.Name)); } catch (NotSupportedException) @@ -1217,7 +1219,7 @@ private void ReadDeadletterMessagesOneAtTheTime(bool peek, bool all, int count, subscriptionWrapper.SubscriptionDescription.Name), ReceiveMode.PeekLock); - for (var i=0; i < count; i++) + for (var i = 0; i < count; i++) { BrokeredMessage message; @@ -1410,8 +1412,8 @@ private async void btnCreateDelete_Click(object sender, EventArgs e) ruleDescription.Action = new SqlRuleAction(txtAction.Text); } - subscriptionWrapper.SubscriptionDescription = serviceBusHelper.CreateSubscription(subscriptionWrapper.TopicDescription, - subscriptionDescription, + subscriptionWrapper.SubscriptionDescription = serviceBusHelper.CreateSubscription(subscriptionWrapper.TopicDescription, + subscriptionDescription, ruleDescription); InitializeData(); } @@ -1882,10 +1884,10 @@ private void CalculateLastColumnWidth(object sender) var columnWidth = width / 4; dataGridView.Columns[0].Width = columnWidth - 20; dataGridView.Columns[3].Width = columnWidth; - dataGridView.Columns[4].Width = columnWidth +(width - (columnWidth * 4)) + 10; + dataGridView.Columns[4].Width = columnWidth + (width - (columnWidth * 4)) + 10; dataGridView.Columns[5].Width = columnWidth + 10; } - if (dataGridView == sessionsDataGridView && + if (dataGridView == sessionsDataGridView && dataGridView.ColumnCount == 4) { var width = dataGridView.Width - dataGridView.RowHeadersWidth; @@ -2082,7 +2084,7 @@ private void deadletterDataGridView_CellDoubleClick(object sender, DataGridViewC { return; } - using (var messageForm = new MessageForm(subscriptionWrapper, bindingList[e.RowIndex], + using (var messageForm = new MessageForm(subscriptionWrapper, bindingList[e.RowIndex], serviceBusHelper, writeToLog)) { messageForm.ShowDialog(); From 375aaf522723a95f65d3fa1c943b315f9cb821cf Mon Sep 17 00:00:00 2001 From: Paolo Salvatori Date: Tue, 5 Jan 2021 06:45:32 +0100 Subject: [PATCH 07/18] Refactored code to eliminate the following warnings due to non-nullable reference types in C# 8.0 (#495) CS8604 CS8602 CS8625 CS8600 CS8625 CS8619 --- .../Helpers/DeadLetterMessageHandler.cs | 4 +- .../Controls/HandleQueueControl.cs | 119 ++++++++++-------- .../Controls/HandleSubscriptionControl.cs | 2 +- .../Forms/ReceiveModeForm.cs | 4 +- 4 files changed, 69 insertions(+), 60 deletions(-) diff --git a/src/Common/Helpers/DeadLetterMessageHandler.cs b/src/Common/Helpers/DeadLetterMessageHandler.cs index e5bde099..bcccd813 100644 --- a/src/Common/Helpers/DeadLetterMessageHandler.cs +++ b/src/Common/Helpers/DeadLetterMessageHandler.cs @@ -87,9 +87,9 @@ public DeadLetterMessageHandler(WriteToLogDelegate writeToLog, ServiceBusHelper #endregion #region Public methods - public async Task DeleteMessages(List sequenceNumbers) + public async Task DeleteMessages(List sequenceNumbers) { - var sequenceNumbersToDeleteList = new List(); + var sequenceNumbersToDeleteList = new List(); foreach (var number in sequenceNumbers) { sequenceNumbersToDeleteList.Add(number); diff --git a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs index badddbe8..d5d23ed3 100644 --- a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs @@ -232,28 +232,28 @@ public partial class HandleQueueControl : UserControl #region Private Fields - private QueueDescription queueDescription; - private readonly ServiceBusHelper serviceBusHelper; - private readonly WriteToLogDelegate writeToLog; - private readonly string path; + private QueueDescription queueDescription = default!; + private readonly ServiceBusHelper serviceBusHelper = default!; + private readonly WriteToLogDelegate writeToLog = default!; + private readonly string path = default!; private readonly List hiddenPages = new List(); - private BrokeredMessage brokeredMessage; - private BrokeredMessage deadletterMessage; - private BrokeredMessage transferDeadletterMessage; - private int currentMessageRowIndex; - private int currentDeadletterMessageRowIndex; - private int currentTransferDeadletterMessageRowIndex; - private bool sorting; - private string messagesFilterExpression; - private string deadletterFilterExpression; - private DateTime? messagesFilterFromDate; - private DateTime? messagesFilterToDate; - private DateTime? deadletterFilterFromDate; - private DateTime? deadletterFilterToDate; - private SortableBindingList messageBindingList; - private SortableBindingList deadletterBindingList; - private SortableBindingList transferDeadletterBindingList; - private SortableBindingList sessionBindingList; + private BrokeredMessage brokeredMessage = default!; + private BrokeredMessage deadletterMessage = default!; + private BrokeredMessage transferDeadletterMessage = default!; + private int currentMessageRowIndex = default!; + private int currentDeadletterMessageRowIndex = default!; + private int currentTransferDeadletterMessageRowIndex = default!; + private bool sorting = default!; + private string messagesFilterExpression = default!; + private string deadletterFilterExpression = default!; + private DateTime? messagesFilterFromDate = default!; + private DateTime? messagesFilterToDate = default!; + private DateTime? deadletterFilterFromDate = default!; + private DateTime? deadletterFilterToDate = default!; + private SortableBindingList messageBindingList = default!; + private SortableBindingList deadletterBindingList = default!; + private SortableBindingList transferDeadletterBindingList = default!; + private SortableBindingList sessionBindingList = default!; private bool buttonsMoved; #endregion @@ -291,9 +291,9 @@ public HandleQueueControl(WriteToLogDelegate writeToLog, ServiceBusHelper servic #region Public Events - public event Action OnCancel; - public event Action OnRefresh; - public event Action OnChangeStatus; + public event Action OnCancel = default!; + public event Action OnRefresh = default!; + public event Action OnChangeStatus = default!; #endregion @@ -1228,7 +1228,7 @@ private void InitializeData() } } - private void GetMessages(bool peek, bool all, int count, IBrokeredMessageInspector messageInspector, long? fromSequenceNumber = null, string? fromSession = null) + private void GetMessages(bool peek, bool all, int count, IBrokeredMessageInspector? messageInspector, long? fromSequenceNumber = null, string? fromSession = null) { try { @@ -1384,7 +1384,7 @@ private void GetMessages(bool peek, bool all, int count, IBrokeredMessageInspect } } - private void ReadMessagesOneAtTheTime(bool peek, bool all, int count, IBrokeredMessageInspector messageInspector, long? fromSequenceNumber = null, string? fromSession = null) + private void ReadMessagesOneAtTheTime(bool peek, bool all, int count, IBrokeredMessageInspector? messageInspector, long? fromSequenceNumber = null, string? fromSession = null) { try { @@ -1465,9 +1465,12 @@ private void ReadMessagesOneAtTheTime(bool peek, bool all, int count, IBrokeredM continue; } totalRetrieved += retrieved; - brokeredMessages.Add(messageInspector != null - ? messageInspector.AfterReceiveMessage(message) - : message); + if (message != null) + { + brokeredMessages.Add(messageInspector != null + ? messageInspector.AfterReceiveMessage(message) + : message); + } } while (retrieved > 0 && (all || count > totalRetrieved)); writeToLog(string.Format(MessagesReceivedFromTheQueue, brokeredMessages.Count, queueDescription.Path)); } @@ -1510,7 +1513,7 @@ private void ReadMessagesOneAtTheTime(bool peek, bool all, int count, IBrokeredM } } - private void GetDeadletterMessages(bool peek, bool all, int count, IBrokeredMessageInspector messageInspector, long? fromSequenceNumber) + private void GetDeadletterMessages(bool peek, bool all, int count, IBrokeredMessageInspector? messageInspector, long? fromSequenceNumber) { try { @@ -1647,7 +1650,7 @@ private void GetDeadletterMessages(bool peek, bool all, int count, IBrokeredMess } } - private void GetTransferDeadletterMessages(bool peek, bool all, int count, IBrokeredMessageInspector messageInspector, long? fromSequenceNumber) + private void GetTransferDeadletterMessages(bool peek, bool all, int count, IBrokeredMessageInspector? messageInspector, long? fromSequenceNumber) { try { @@ -1784,7 +1787,7 @@ private void GetTransferDeadletterMessages(bool peek, bool all, int count, IBrok } } - private void ReadDeadletterMessagesOneAtTheTime(bool peek, bool all, int count, IBrokeredMessageInspector messageInspector, long? fromSequenceNumber) + private void ReadDeadletterMessagesOneAtTheTime(bool peek, bool all, int count, IBrokeredMessageInspector? messageInspector, long? fromSequenceNumber) { try { @@ -1833,9 +1836,12 @@ private void ReadDeadletterMessagesOneAtTheTime(bool peek, bool all, int count, continue; } totalRetrieved += retrieved; - brokeredMessages.Add(messageInspector != null + if (message != null) + { + brokeredMessages.Add(messageInspector != null ? messageInspector.AfterReceiveMessage(message) : message); + } } while (retrieved > 0 && (all || count > totalRetrieved)); writeToLog(string.Format(MessagesPeekedFromTheDeadletterQueue, brokeredMessages.Count, queueDescription.Path)); } @@ -1877,7 +1883,7 @@ private void ReadDeadletterMessagesOneAtTheTime(bool peek, bool all, int count, } } - private void ReadTransferDeadletterMessagesOneAtTheTime(bool peek, bool all, int count, IBrokeredMessageInspector messageInspector, long? fromSequenceNumber) + private void ReadTransferDeadletterMessagesOneAtTheTime(bool peek, bool all, int count, IBrokeredMessageInspector? messageInspector, long? fromSequenceNumber) { try { @@ -1926,9 +1932,12 @@ private void ReadTransferDeadletterMessagesOneAtTheTime(bool peek, bool all, int continue; } totalRetrieved += retrieved; - brokeredMessages.Add(messageInspector != null - ? messageInspector.AfterReceiveMessage(message) - : message); + if (message != null) + { + brokeredMessages.Add(messageInspector != null + ? messageInspector.AfterReceiveMessage(message) + : message); + } } while (retrieved > 0 && (all || count > totalRetrieved)); writeToLog(string.Format(MessagesPeekedFromTheTransferDeadletterQueue, brokeredMessages.Count, queueDescription.Path)); } @@ -2161,16 +2170,16 @@ private async void btnCreateDelete_Click(object sender, EventArgs e) } } - private void HandleException(Exception ex) + private void HandleException(Exception? ex) { if (string.IsNullOrWhiteSpace(ex?.Message)) { return; } - writeToLog(string.Format(CultureInfo.CurrentCulture, ExceptionFormat, ex.Message)); - if (!string.IsNullOrWhiteSpace(ex.InnerException?.Message)) + writeToLog(string.Format(CultureInfo.CurrentCulture, ExceptionFormat, ex?.Message)); + if (!string.IsNullOrWhiteSpace(ex?.InnerException?.Message)) { - writeToLog(string.Format(CultureInfo.CurrentCulture, InnerExceptionFormat, ex.InnerException.Message)); + writeToLog(string.Format(CultureInfo.CurrentCulture, InnerExceptionFormat, ex?.InnerException?.Message)); } } @@ -2453,7 +2462,7 @@ private SelectEntityForm creteSelectEntityFormForPath(string path) { if (!string.IsNullOrWhiteSpace(path)) { - QueueDescription queueDescriptionSource = null; + QueueDescription queueDescriptionSource = default!; try { queueDescriptionSource = serviceBusHelper.GetQueue(path); @@ -2466,7 +2475,7 @@ private SelectEntityForm creteSelectEntityFormForPath(string path) { return new SelectEntityForm(SelectEntityDialogTitle, SelectEntityGrouperTitle, SelectEntityLabelText, queueDescriptionSource); } - TopicDescription topicDescriptionSource = null; + TopicDescription topicDescriptionSource = default!; try { topicDescriptionSource = serviceBusHelper.GetTopic(path); @@ -2559,7 +2568,7 @@ private void mainTabControl_DrawItem(object sender, DrawItemEventArgs e) DrawTabControlTabs(mainTabControl, e, null); } - private void DrawTabControlTabs(TabControl tabControl, DrawItemEventArgs e, ImageList images) + private void DrawTabControlTabs(TabControl tabControl, DrawItemEventArgs e, ImageList? images) { // Get the bounding end of tab strip rectangles. var tabstripEndRect = tabControl.GetTabRect(tabControl.TabPages.Count - 1); @@ -2636,7 +2645,7 @@ private void DrawTabControlTabs(TabControl tabControl, DrawItemEventArgs e, Imag { // Get sice and image. var size = images.ImageSize; - Image icon = null; + Image icon = default!; if (page.ImageIndex > -1) icon = images.Images[page.ImageIndex]; else if (page.ImageKey != "") @@ -2969,7 +2978,7 @@ private void transferDeadletterDataGridView_RowEnter(object sender, DataGridView transferDeadletterCustomPropertyGrid.SelectedObject = new DictionaryPropertyGridAdapter(transferDeadletterMessage.Properties); } - private void authorizationRulesDataGridView_Resize(object sender, EventArgs e) + private void authorizationRulesDataGridView_Resize(object sender, EventArgs? e) { try { @@ -3320,7 +3329,7 @@ async void deleteSelectedMessagesToolStripMenuItem_Click(object sender, EventArg } } - var sequenceNumbersToDelete = messages.Select(s => s.SequenceNumber).ToList(); + var sequenceNumbersToDelete = messages.Select(s => s?.SequenceNumber).ToList(); var deadLetterMessageHandler = new DeadLetterMessageHandler(writeToLog, serviceBusHelper, MainForm.SingletonMainForm.ReceiveTimeout, queueDescription); @@ -3597,7 +3606,7 @@ private void FilterMessages() { if (messagesDataGridView.Rows.Count > 0) { - brokeredMessage = null; + brokeredMessage = default!; messagesDataGridView_RowEnter(this, new DataGridViewCellEventArgs(0, 0)); } } @@ -3666,7 +3675,7 @@ private void FilterDeadletters() { if (deadletterDataGridView.Rows.Count > 0) { - deadletterMessage = null; + deadletterMessage = default!; deadletterDataGridView_RowEnter(this, new DataGridViewCellEventArgs(0, 0)); } } @@ -3941,7 +3950,7 @@ private void saveSelectedMessagesToolStripMenuItem_Click(object sender, EventArg var messages = messagesDataGridView.SelectedRows.Cast() .Select(r => r.DataBoundItem as BrokeredMessage); - IEnumerable brokeredMessages = messages as BrokeredMessage[] ?? messages.ToArray(); + IEnumerable brokeredMessages = messages as BrokeredMessage?[] ?? messages.ToArray(); if (!brokeredMessages.Any()) { return; @@ -3985,7 +3994,7 @@ void saveSelectedMessagesBodyAsFileToolStripMenuItem_Click(object sender, EventA var messages = messagesDataGridView.SelectedRows.Cast() .Select(r => r.DataBoundItem as BrokeredMessage); - IEnumerable brokeredMessages = messages as BrokeredMessage[] ?? messages.ToArray(); + IEnumerable brokeredMessages = messages as BrokeredMessage[] ?? messages.ToArray(); if (!brokeredMessages.Any()) { return; @@ -4129,7 +4138,7 @@ private void saveSelectedDeadletteredMessagesToolStripMenuItem_Click(object send } var messages = deadletterDataGridView.SelectedRows.Cast() .Select(r => r.DataBoundItem as BrokeredMessage); - IEnumerable brokeredMessages = messages as BrokeredMessage[] ?? messages.ToArray(); + IEnumerable brokeredMessages = messages as BrokeredMessage[] ?? messages.ToArray(); if (!brokeredMessages.Any()) { return; @@ -4172,7 +4181,7 @@ void saveSelectedDeadletteredMessagesBodyAsFileToolStripMenuItem_Click(object se var messages = deadletterDataGridView.SelectedRows.Cast() .Select(r => r.DataBoundItem as BrokeredMessage); - IEnumerable brokeredMessages = messages as BrokeredMessage[] ?? messages.ToArray(); + IEnumerable brokeredMessages = messages as BrokeredMessage[] ?? messages.ToArray(); if (!brokeredMessages.Any()) { return; @@ -4317,7 +4326,7 @@ private void saveSelectedTransferDeadletteredMessagesToolStripMenuItem_Click(obj } var messages = transferDeadletterDataGridView.SelectedRows.Cast() .Select(r => r.DataBoundItem as BrokeredMessage); - IEnumerable brokeredMessages = messages as BrokeredMessage[] ?? messages.ToArray(); + IEnumerable brokeredMessages = messages as BrokeredMessage[] ?? messages.ToArray(); if (!brokeredMessages.Any()) { return; @@ -4360,7 +4369,7 @@ void saveSelectedTransferDeadletteredMessagesBodyAsFileToolStripMenuItem_Click(o var messages = transferDeadletterDataGridView.SelectedRows.Cast() .Select(r => r.DataBoundItem as BrokeredMessage); - IEnumerable brokeredMessages = messages as BrokeredMessage[] ?? messages.ToArray(); + IEnumerable brokeredMessages = messages as BrokeredMessage[] ?? messages.ToArray(); if (!brokeredMessages.Any()) { return; diff --git a/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs b/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs index a64bc9c1..37e5c1bc 100644 --- a/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs @@ -2240,7 +2240,7 @@ async void deleteSelectedMessagesToolStripMenuItem_Click(object sender, EventArg } } - var sequenceNumbersToDelete = messages.Select(s => s.SequenceNumber).ToList(); + var sequenceNumbersToDelete = messages.Select(s => s?.SequenceNumber).ToList(); var deadLetterMessageHandler = new DeadLetterMessageHandler(writeToLog, serviceBusHelper, MainForm.SingletonMainForm.ReceiveTimeout, subscriptionWrapper); diff --git a/src/ServiceBusExplorer/Forms/ReceiveModeForm.cs b/src/ServiceBusExplorer/Forms/ReceiveModeForm.cs index 5ff34301..e018443d 100644 --- a/src/ServiceBusExplorer/Forms/ReceiveModeForm.cs +++ b/src/ServiceBusExplorer/Forms/ReceiveModeForm.cs @@ -74,13 +74,13 @@ public override sealed string Text public int Count { get; private set; } public bool Peek { get; private set; } public bool All { get; private set; } - public string Inspector { get; private set; } + public string? Inspector { get; private set; } public long? FromSequenceNumber { get; private set; } public string? FromSession { get; private set; } #endregion #region Event Handlers - private void btnOk_Click(object sender, EventArgs e) + private void btnOk_Click(object? sender, EventArgs? e) { DialogResult = DialogResult.OK; if (int.TryParse(txtMessageCount.Text, out var count)) From f87537a5ded12501a9e33fc3edd2a29487246425 Mon Sep 17 00:00:00 2001 From: Erik Mogensen Date: Tue, 5 Jan 2021 09:33:49 +0100 Subject: [PATCH 08/18] Resubmit using textbox text. (#496) --- src/ServiceBusExplorer/Forms/MessageForm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ServiceBusExplorer/Forms/MessageForm.cs b/src/ServiceBusExplorer/Forms/MessageForm.cs index b37fb490..f162e0e7 100644 --- a/src/ServiceBusExplorer/Forms/MessageForm.cs +++ b/src/ServiceBusExplorer/Forms/MessageForm.cs @@ -385,7 +385,7 @@ private async void btnSubmit_Click(object sender, EventArgs e) // For body type ByteArray cloning is not an option. When cloned, supplied body can be only of a string or stream types, but not byte array :( outboundMessage = bodyType == BodyType.ByteArray ? brokeredMessage.CloneWithByteArrayBodyType(txtMessageText.Text, messagesSplitContainer.Visible) : - brokeredMessage.Clone(brokeredMessage.GetBody(), messagesSplitContainer.Visible); + brokeredMessage.Clone(txtMessageText.Text, messagesSplitContainer.Visible); } else { From 10d3ad045c4c7205ee7b56c9e8c18a9522091229 Mon Sep 17 00:00:00 2001 From: Sean Feldman Date: Tue, 5 Jan 2021 02:01:45 -0700 Subject: [PATCH 09/18] Small refactoring potpourri (#497) * Simplify Stopwatch usage * Early exit, reduce complexity/nesting * Replace Thread.Sleep in async methods with Task.Delay --- .../Helpers/DeadLetterMessageHandler.cs | 6 +- src/Common/Helpers/ImportExportHelper.cs | 167 +++++++++--------- src/Common/Helpers/RetryHelper.cs | 24 ++- src/Common/Helpers/ServiceBusHelper.cs | 120 ++++++------- 4 files changed, 162 insertions(+), 155 deletions(-) diff --git a/src/Common/Helpers/DeadLetterMessageHandler.cs b/src/Common/Helpers/DeadLetterMessageHandler.cs index bcccd813..a86cfd5e 100644 --- a/src/Common/Helpers/DeadLetterMessageHandler.cs +++ b/src/Common/Helpers/DeadLetterMessageHandler.cs @@ -112,8 +112,7 @@ public async Task DeleteMessages(List sequenceN throw new LockDurationTooLowException(); } - var stopwatch = new Stopwatch(); - stopwatch.Start(); + var stopwatch = Stopwatch.StartNew(); try { @@ -214,8 +213,7 @@ public async Task MoveMessages(MessageSender messageSe throw new LockDurationTooLowException(); } - var stopwatch = new Stopwatch(); - stopwatch.Start(); + var stopwatch = Stopwatch.StartNew(); try { diff --git a/src/Common/Helpers/ImportExportHelper.cs b/src/Common/Helpers/ImportExportHelper.cs index d9342c32..c95d9f2a 100644 --- a/src/Common/Helpers/ImportExportHelper.cs +++ b/src/Common/Helpers/ImportExportHelper.cs @@ -169,118 +169,119 @@ public ImportExportHelper(WriteToLogDelegate writeToLogDelegate) /// An XML string. public async Task ReadAndSerialize(ServiceBusHelper serviceBusHelper, List entityList) { - if (entityList != null && - entityList.Count > 0) + if (entityList == null || entityList.Count <= 0) { - using (var memoryStream = new MemoryStream()) + return null; + } + + using (var memoryStream = new MemoryStream()) + { + using (var stringWriter = new StreamWriter(memoryStream, Encoding.ASCII)) { - using (var stringWriter = new StreamWriter(memoryStream, Encoding.ASCII)) + var xmlWriterSettings = new System.Xml.XmlWriterSettings(); + xmlWriterSettings.Indent = true; + using (var xmlWriter = XmlWriter.Create(stringWriter, xmlWriterSettings)) { - var xmlWriterSettings = new System.Xml.XmlWriterSettings(); - xmlWriterSettings.Indent = true; - using (var xmlWriter = XmlWriter.Create(stringWriter, xmlWriterSettings)) + var queueList = entityList.Where(e => e is QueueDescription).Cast(); + var topicList = entityList.Where(e => e is TopicDescription).Cast(); + var relayList = entityList.Where(e => e is RelayDescription).Cast(); + var eventHubList = entityList.Where(e => e is EventHubDescription).Cast(); + var notificationHubList = entityList.Where(e => e is NotificationHubDescription).Cast(); + xmlWriter.WriteStartElement(EntityList, Namespace); + xmlWriter.WriteAttributeString(NamespaceAttribute, string.IsNullOrWhiteSpace(serviceBusHelper.Namespace) ? + Unknown : + serviceBusHelper.Namespace); + var queueDescriptions = queueList as QueueDescription[] ?? queueList.ToArray(); + if (queueDescriptions.Any()) { - var queueList = entityList.Where(e => e is QueueDescription).Cast(); - var topicList = entityList.Where(e => e is TopicDescription).Cast(); - var relayList = entityList.Where(e => e is RelayDescription).Cast(); - var eventHubList = entityList.Where(e => e is EventHubDescription).Cast(); - var notificationHubList = entityList.Where(e => e is NotificationHubDescription).Cast(); - xmlWriter.WriteStartElement(EntityList, Namespace); - xmlWriter.WriteAttributeString(NamespaceAttribute, string.IsNullOrWhiteSpace(serviceBusHelper.Namespace) ? - Unknown : - serviceBusHelper.Namespace); - var queueDescriptions = queueList as QueueDescription[] ?? queueList.ToArray(); - if (queueDescriptions.Any()) + xmlWriter.WriteStartElement(QueueEntityList); + foreach (var queue in queueDescriptions) { - xmlWriter.WriteStartElement(QueueEntityList); - foreach (var queue in queueDescriptions) + try { - try - { - await SerializeEntity(serviceBusHelper, xmlWriter, queue); - } - catch (Exception ex) - { - HandleException(ex); - } + await SerializeEntity(serviceBusHelper, xmlWriter, queue); + } + catch (Exception ex) + { + HandleException(ex); } - xmlWriter.WriteEndElement(); } - var topicDescriptions = topicList as TopicDescription[] ?? topicList.ToArray(); - if (topicDescriptions.Any()) + xmlWriter.WriteEndElement(); + } + var topicDescriptions = topicList as TopicDescription[] ?? topicList.ToArray(); + if (topicDescriptions.Any()) + { + xmlWriter.WriteStartElement(TopicEntityList); + foreach (var topic in topicDescriptions) { - xmlWriter.WriteStartElement(TopicEntityList); - foreach (var topic in topicDescriptions) + try + { + await SerializeEntity(serviceBusHelper, xmlWriter, topic); + } + catch (Exception ex) { - try - { - await SerializeEntity(serviceBusHelper, xmlWriter, topic); - } - catch (Exception ex) - { - HandleException(ex); - } + HandleException(ex); } - xmlWriter.WriteEndElement(); } - var relayDescriptions = relayList as RelayDescription[] ?? relayList.ToArray(); - if (relayDescriptions.Any()) + xmlWriter.WriteEndElement(); + } + var relayDescriptions = relayList as RelayDescription[] ?? relayList.ToArray(); + if (relayDescriptions.Any()) + { + xmlWriter.WriteStartElement(RelayEntityList); + foreach (var relay in relayDescriptions) { - xmlWriter.WriteStartElement(RelayEntityList); - foreach (var relay in relayDescriptions) + try { - try - { - await SerializeEntity(serviceBusHelper, xmlWriter, relay); - } - catch (Exception ex) - { - HandleException(ex); - } + await SerializeEntity(serviceBusHelper, xmlWriter, relay); + } + catch (Exception ex) + { + HandleException(ex); } - xmlWriter.WriteEndElement(); } - var eventHubDescriptions = eventHubList as EventHubDescription[] ?? eventHubList.ToArray(); - if (eventHubDescriptions.Any()) + xmlWriter.WriteEndElement(); + } + var eventHubDescriptions = eventHubList as EventHubDescription[] ?? eventHubList.ToArray(); + if (eventHubDescriptions.Any()) + { + xmlWriter.WriteStartElement(EventHubEntityList); + foreach (var eventHub in eventHubDescriptions) { - xmlWriter.WriteStartElement(EventHubEntityList); - foreach (var eventHub in eventHubDescriptions) + try + { + await SerializeEntity(serviceBusHelper, xmlWriter, eventHub); + } + catch (Exception ex) { - try - { - await SerializeEntity(serviceBusHelper, xmlWriter, eventHub); - } - catch (Exception ex) - { - HandleException(ex); - } + HandleException(ex); } - xmlWriter.WriteEndElement(); } - var notificationHubDescriptions = notificationHubList as NotificationHubDescription[] ?? notificationHubList.ToArray(); - if (notificationHubDescriptions.Any()) + xmlWriter.WriteEndElement(); + } + var notificationHubDescriptions = notificationHubList as NotificationHubDescription[] ?? notificationHubList.ToArray(); + if (notificationHubDescriptions.Any()) + { + xmlWriter.WriteStartElement(NotificationHubEntityList); + foreach (var notificationHub in notificationHubDescriptions) { - xmlWriter.WriteStartElement(NotificationHubEntityList); - foreach (var notificationHub in notificationHubDescriptions) + try + { + await SerializeEntity(serviceBusHelper, xmlWriter, notificationHub); + } + catch (Exception ex) { - try - { - await SerializeEntity(serviceBusHelper, xmlWriter, notificationHub); - } - catch (Exception ex) - { - HandleException(ex); - } + HandleException(ex); } - xmlWriter.WriteEndElement(); } xmlWriter.WriteEndElement(); } + xmlWriter.WriteEndElement(); } - return Encoding.UTF8.GetString(memoryStream.ToArray()); } + + return Encoding.UTF8.GetString(memoryStream.ToArray()); } - return null; } /// diff --git a/src/Common/Helpers/RetryHelper.cs b/src/Common/Helpers/RetryHelper.cs index 3f58544d..de59861f 100644 --- a/src/Common/Helpers/RetryHelper.cs +++ b/src/Common/Helpers/RetryHelper.cs @@ -156,7 +156,8 @@ public static async Task RetryActionAsync(Func action, WriteToLogDelegate action.Method.Name, retryCount - numRetries + 1, retryCount)); - Thread.Sleep(retryTimeout); + + await Task.Delay(retryTimeout); } catch (TimeoutException ex) { @@ -169,7 +170,8 @@ public static async Task RetryActionAsync(Func action, WriteToLogDelegate action.Method.Name, retryCount - numRetries + 1, retryCount)); - Thread.Sleep(retryTimeout); + + await Task.Delay(retryTimeout); } catch (Exception ex) { @@ -183,7 +185,8 @@ public static async Task RetryActionAsync(Func action, WriteToLogDelegate retryCount - numRetries + 1, retryCount)); writeToLog(string.Format(CaughtGenericException, ex.GetType())); - Thread.Sleep(retryTimeout); + + await Task.Delay(retryTimeout); } } while (numRetries-- > 0); } @@ -316,7 +319,8 @@ public static async Task RetryFuncAsync(Func> func, WriteToLogDele func.Method.Name, retryCount - numRetries + 1, retryCount)); - Thread.Sleep(retryTimeout); + + await Task.Delay(retryTimeout); } catch (MessagingCommunicationException ex) { @@ -329,7 +333,8 @@ public static async Task RetryFuncAsync(Func> func, WriteToLogDele func.Method.Name, retryCount - numRetries + 1, retryCount)); - Thread.Sleep(retryTimeout); + + await Task.Delay(retryTimeout); } catch (MessagingException ex) { @@ -342,7 +347,8 @@ public static async Task RetryFuncAsync(Func> func, WriteToLogDele func.Method.Name, retryCount - numRetries + 1, retryCount)); - Thread.Sleep(retryTimeout); + + await Task.Delay(retryTimeout); } catch (TimeoutException ex) { @@ -355,7 +361,8 @@ public static async Task RetryFuncAsync(Func> func, WriteToLogDele func.Method.Name, retryCount - numRetries + 1, retryCount)); - Thread.Sleep(retryTimeout); + + await Task.Delay(retryTimeout); } catch (Exception ex) { @@ -369,7 +376,8 @@ public static async Task RetryFuncAsync(Func> func, WriteToLogDele retryCount - numRetries + 1, retryCount)); writeToLog(string.Format(CaughtGenericException, ex.GetType())); - Thread.Sleep(retryTimeout); + + await Task.Delay(retryTimeout); } } while (numRetries-- > 0); return default(T); diff --git a/src/Common/Helpers/ServiceBusHelper.cs b/src/Common/Helpers/ServiceBusHelper.cs index 3de95d2e..9ac60754 100644 --- a/src/Common/Helpers/ServiceBusHelper.cs +++ b/src/Common/Helpers/ServiceBusHelper.cs @@ -3009,7 +3009,8 @@ await RetryHelper.RetryActionAsync(async () => if (senderThinkTime) { WriteToLog(string.Format(SleepingFor, thinkTime)); - Thread.Sleep(thinkTime); + + await Task.Delay(thinkTime); } } } @@ -3076,7 +3077,8 @@ await RetryHelper.RetryActionAsync(async () => if (senderThinkTime) { WriteToLog(string.Format(SleepingFor, thinkTime)); - Thread.Sleep(thinkTime); + + await Task.Delay(thinkTime); } } } @@ -3171,11 +3173,10 @@ public async Task SendEventDataBatch(EventHubClient eventHubClient, return elapsedMilliseconds; } List eventDataPayloadList = null; - var stopwatch = new Stopwatch(); var builder = new StringBuilder(); + var stopwatch = Stopwatch.StartNew(); try { - stopwatch.Start(); if (logging && verbose) { eventDataPayloadList = eventDataList.Select(e => e.Clone().GetBodyStream()).ToList(); @@ -3253,11 +3254,10 @@ public async Task SendEventDataBatch(EventHubSender eventHubSender, return elapsedMilliseconds; } List eventDataPayloadList = null; - var stopwatch = new Stopwatch(); var builder = new StringBuilder(); + var stopwatch = Stopwatch.StartNew(); try { - stopwatch.Start(); if (logging && verbose) { eventDataPayloadList = eventDataList.Select(e => e.Clone().GetBodyStream()).ToList(); @@ -3974,8 +3974,6 @@ public void SendBatch(MessageSender messageSender, } var stopwatch = new Stopwatch(); - - var builder = new StringBuilder(); var bodyStreams = new List(); if (logging && verbose) @@ -3993,63 +3991,65 @@ public void SendBatch(MessageSender messageSender, } elapsedMilliseconds = stopwatch.ElapsedMilliseconds; - if (logging) + if (!logging) + { + return; + } + + for (var i = 0; i < messageList.Count; i++) { - for (var i = 0; i < messageList.Count; i++) + try { - try - { - builder.AppendLine(string.Format(CultureInfo.CurrentCulture, MessageSuccessfullySent, - taskId, - string.IsNullOrWhiteSpace(messageList[i].MessageId) - ? NullValue - : messageList[i].MessageId, - string.IsNullOrWhiteSpace(messageList[i].SessionId) - ? NullValue - : messageList[i].SessionId, - string.IsNullOrWhiteSpace(messageList[i].Label) - ? NullValue - : messageList[i].Label, - messageList[i].Size)); - if (verbose) + builder.AppendLine(string.Format(CultureInfo.CurrentCulture, MessageSuccessfullySent, + taskId, + string.IsNullOrWhiteSpace(messageList[i].MessageId) + ? NullValue + : messageList[i].MessageId, + string.IsNullOrWhiteSpace(messageList[i].SessionId) + ? NullValue + : messageList[i].SessionId, + string.IsNullOrWhiteSpace(messageList[i].Label) + ? NullValue + : messageList[i].Label, + messageList[i].Size)); + if (verbose) + { + builder.AppendLine(SentMessagePayloadHeader); + var messageText = GetMessageText(bodyStreams[i], isBinary); + if (useWcf) { - builder.AppendLine(SentMessagePayloadHeader); - var messageText = GetMessageText(bodyStreams[i], isBinary); - if (useWcf) + var stringBuilder = new StringBuilder(); + using (var reader = XmlReader.Create(new StringReader(messageText))) { - var stringBuilder = new StringBuilder(); - using (var reader = XmlReader.Create(new StringReader(messageText))) + // The XmlWriter is used just to indent the XML message + var settings = new XmlWriterSettings { Indent = true }; + using (var writer = XmlWriter.Create(stringBuilder, settings)) { - // The XmlWriter is used just to indent the XML message - var settings = new XmlWriterSettings { Indent = true }; - using (var writer = XmlWriter.Create(stringBuilder, settings)) - { - writer.WriteNode(reader, true); - } + writer.WriteNode(reader, true); } - messageText = stringBuilder.ToString(); - } - builder.AppendLine(string.Format(MessageTextFormat, messageText.Contains('\n') ? messageText : - messageText.Substring(0, Math.Min(messageText.Length, 128)) + - (messageText.Length >= 128 ? "..." : ""))); - builder.AppendLine(SentMessagePropertiesHeader); - foreach (var p in messageList[i].Properties) - { - builder.AppendLine(string.Format(MessagePropertyFormat, - p.Key, - p.Value)); } + messageText = stringBuilder.ToString(); + } + builder.AppendLine(string.Format(MessageTextFormat, messageText.Contains('\n') ? messageText : + messageText.Substring(0, Math.Min(messageText.Length, 128)) + + (messageText.Length >= 128 ? "..." : ""))); + builder.AppendLine(SentMessagePropertiesHeader); + foreach (var p in messageList[i].Properties) + { + builder.AppendLine(string.Format(MessagePropertyFormat, + p.Key, + p.Value)); } - } - finally - { - messageList[i].Dispose(); } } - var traceMessage = builder.ToString(); - WriteToLog(traceMessage.Substring(0, traceMessage.Length - 1)); + finally + { + messageList[i].Dispose(); + } } + var traceMessage = builder.ToString(); + WriteToLog(traceMessage.Substring(0, traceMessage.Length - 1)); } /// @@ -4230,10 +4230,10 @@ public bool ReceiveMessages(MessageReceiver messageReceiver, IList messageList = null; try { - var stopwatch = new Stopwatch(); - stopwatch.Start(); + var stopwatch = Stopwatch.StartNew(); var messageEnumerable = messageReceiver.ReceiveBatch(batchSize, TimeSpan.FromSeconds(timeout)); stopwatch.Stop(); + messageList = messageEnumerable as IList ?? messageEnumerable.ToList(); if (messageInspector != null) { @@ -4248,10 +4248,10 @@ public bool ReceiveMessages(MessageReceiver messageReceiver, { if (completeReceive) { - stopwatch = new Stopwatch(); - stopwatch.Start(); + stopwatch = Stopwatch.StartNew(); messageReceiver.CompleteBatch(messageList.Select(b => b.LockToken)); stopwatch.Stop(); + if (stopwatch.ElapsedMilliseconds > maximumCompleteTime) { maximumCompleteTime = stopwatch.ElapsedMilliseconds; @@ -4363,10 +4363,10 @@ public bool ReceiveMessages(MessageReceiver messageReceiver, { try { - var stopwatch = new Stopwatch(); - stopwatch.Start(); + var stopwatch = Stopwatch.StartNew(); messageReceiver.CompleteBatch(messageList.Select(b => b.LockToken)); stopwatch.Stop(); + if (stopwatch.ElapsedMilliseconds > maximumCompleteTime) { maximumCompleteTime = stopwatch.ElapsedMilliseconds; @@ -4412,10 +4412,10 @@ public bool ReceiveMessages(MessageReceiver messageReceiver, { try { - var stopwatch = new Stopwatch(); var movedToDeadLetterQueue = false; var deferredMessage = false; var readDeferredMessage = false; + var stopwatch = new Stopwatch(); if (!readingDeferredMessages) { From 687d2966c955cc35ced542b41dd1f1c03a1c1559 Mon Sep 17 00:00:00 2001 From: Arnaud TAMAILLON Date: Thu, 7 Jan 2021 07:25:14 +0100 Subject: [PATCH 10/18] Make empty TimeSpanControl indicate usage of default value (#503) --- .../Controls/HandleNotificationHubControl.cs | 34 +++-- .../Controls/HandleQueueControl.cs | 138 ++++++++++-------- .../Controls/HandleSubscriptionControl.cs | 102 +++++++------ .../Controls/HandleTopicControl.cs | 104 +++++++------ .../Controls/NumericTextBox.cs | 2 + .../Controls/TimeSpanControl.cs | 4 +- 6 files changed, 227 insertions(+), 157 deletions(-) diff --git a/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.cs b/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.cs index 57297b9e..ab100a92 100644 --- a/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleNotificationHubControl.cs @@ -2060,14 +2060,17 @@ private async void btnCreateDelete_Click(object sender, EventArgs e) mpnsCredentialCertificateKey); } - if (tsRegistrationTimeToLive.TimeSpanValue.HasValue) + if (tsRegistrationTimeToLive.IsFilled) { - description.RegistrationTtl = tsRegistrationTimeToLive.TimeSpanValue.Value; - } - else - { - writeToLog(tsRegistrationTimeToLive.GetErrorMessage(RegistrationTimeToLive)); - return; + if (tsRegistrationTimeToLive.TimeSpanValue.HasValue) + { + description.RegistrationTtl = tsRegistrationTimeToLive.TimeSpanValue.Value; + } + else + { + writeToLog(tsRegistrationTimeToLive.GetErrorMessage(RegistrationTimeToLive)); + return; + } } var bindingList = authorizationRulesBindingSource.DataSource as BindingList; @@ -2162,14 +2165,17 @@ private void btnCancelUpdate_Click(object sender, EventArgs e) { try { - if (tsRegistrationTimeToLive.TimeSpanValue.HasValue) + if (tsRegistrationTimeToLive.IsFilled) { - notificationHubDescription.RegistrationTtl = tsRegistrationTimeToLive.TimeSpanValue.Value; - } - else - { - writeToLog(tsRegistrationTimeToLive.GetErrorMessage(RegistrationTimeToLive)); - return; + if (tsRegistrationTimeToLive.TimeSpanValue.HasValue) + { + notificationHubDescription.RegistrationTtl = tsRegistrationTimeToLive.TimeSpanValue.Value; + } + else + { + writeToLog(tsRegistrationTimeToLive.GetErrorMessage(RegistrationTimeToLive)); + return; + } } notificationHubDescription.WnsCredential = !string.IsNullOrWhiteSpace(txtPackageSid.Text) && diff --git a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs index d5d23ed3..635a29ee 100644 --- a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs @@ -2045,44 +2045,56 @@ private async void btnCreateDelete_Click(object sender, EventArgs e) } } - if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) + if (tsDefaultMessageTimeToLive.IsFilled) { - description.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; - } - else - { - writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); - return; + if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) + { + description.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; + } + else + { + writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); + return; + } } - if (tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.HasValue) + if (tsDuplicateDetectionHistoryTimeWindow.IsFilled) { - description.DuplicateDetectionHistoryTimeWindow = tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.Value; - } - else - { - writeToLog(tsDuplicateDetectionHistoryTimeWindow.GetErrorMessage(DuplicateDetectionHistoryTimeWindow)); - return; + if (tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.HasValue) + { + description.DuplicateDetectionHistoryTimeWindow = tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.Value; + } + else + { + writeToLog(tsDuplicateDetectionHistoryTimeWindow.GetErrorMessage(DuplicateDetectionHistoryTimeWindow)); + return; + } } - if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) + if (tsAutoDeleteOnIdle.IsFilled) { - description.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; - } - else - { - writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); - return; + if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) + { + description.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; + } + else + { + writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); + return; + } } - if (tsLockDuration.TimeSpanValue.HasValue) - { - description.LockDuration = tsLockDuration.TimeSpanValue.Value; - } - else + if (tsLockDuration.IsFilled) { - writeToLog(tsLockDuration.GetErrorMessage(LockDuration)); - return; + if (tsLockDuration.TimeSpanValue.HasValue) + { + description.LockDuration = tsLockDuration.TimeSpanValue.Value; + } + else + { + writeToLog(tsLockDuration.GetErrorMessage(LockDuration)); + return; + } } description.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); @@ -2253,46 +2265,58 @@ private void btnCancelUpdate_Click(object sender, EventArgs e) } } - if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) - { - queueDescription.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; - } - else + if (tsDefaultMessageTimeToLive.IsFilled) { - writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); - return; + if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) + { + queueDescription.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; + } + else + { + writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); + return; + } } - if (tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.HasValue) + if (tsDuplicateDetectionHistoryTimeWindow.IsFilled) { - queueDescription.DuplicateDetectionHistoryTimeWindow = tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.Value; - } - else - { - writeToLog(tsDuplicateDetectionHistoryTimeWindow.GetErrorMessage(DuplicateDetectionHistoryTimeWindow)); - return; + if (tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.HasValue) + { + queueDescription.DuplicateDetectionHistoryTimeWindow = tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.Value; + } + else + { + writeToLog(tsDuplicateDetectionHistoryTimeWindow.GetErrorMessage(DuplicateDetectionHistoryTimeWindow)); + return; + } } - if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) + if (tsAutoDeleteOnIdle.IsFilled) { - queueDescription.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; - } - else - { - writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); - return; + if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) + { + queueDescription.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; + } + else + { + writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); + return; + } } - if (tsLockDuration.TimeSpanValue.HasValue) - { - queueDescription.LockDuration = tsLockDuration.TimeSpanValue.Value; - } - else + if (tsLockDuration.IsFilled) { - writeToLog(tsLockDuration.GetErrorMessage(LockDuration)); - return; + if (tsLockDuration.TimeSpanValue.HasValue) + { + queueDescription.LockDuration = tsLockDuration.TimeSpanValue.Value; + } + else + { + writeToLog(tsLockDuration.GetErrorMessage(LockDuration)); + return; + } } - + queueDescription.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); queueDescription.EnableExpress = checkedListBox.GetItemChecked(EnableExpressIndex); diff --git a/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs b/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs index 37e5c1bc..97bd8ae5 100644 --- a/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs @@ -1366,34 +1366,43 @@ private async void btnCreateDelete_Click(object sender, EventArgs e) } } - if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) + if (tsDefaultMessageTimeToLive.IsFilled) { - subscriptionDescription.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; - } - else - { - writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); - return; + if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) + { + subscriptionDescription.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; + } + else + { + writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); + return; + } } - if (tsLockDuration.TimeSpanValue.HasValue) + if (tsLockDuration.IsFilled) { - subscriptionDescription.LockDuration = tsLockDuration.TimeSpanValue.Value; - } - else - { - writeToLog(tsLockDuration.GetErrorMessage(LockDuration)); - return; + if (tsLockDuration.TimeSpanValue.HasValue) + { + subscriptionDescription.LockDuration = tsLockDuration.TimeSpanValue.Value; + } + else + { + writeToLog(tsLockDuration.GetErrorMessage(LockDuration)); + return; + } } - if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) - { - subscriptionDescription.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; - } - else + if (tsAutoDeleteOnIdle.IsFilled) { - writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); - return; + if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) + { + subscriptionDescription.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; + } + else + { + writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); + return; + } } subscriptionDescription.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); @@ -1485,34 +1494,43 @@ private void btnCancelUpdate_Click(object sender, EventArgs e) } } - if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) + if (tsDefaultMessageTimeToLive.IsFilled) { - subscriptionWrapper.SubscriptionDescription.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; - } - else - { - writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); - return; + if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) + { + subscriptionWrapper.SubscriptionDescription.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; + } + else + { + writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); + return; + } } - if (tsLockDuration.TimeSpanValue.HasValue) + if (tsLockDuration.IsFilled) { - subscriptionWrapper.SubscriptionDescription.LockDuration = tsLockDuration.TimeSpanValue.Value; - } - else - { - writeToLog(tsLockDuration.GetErrorMessage(LockDuration)); - return; + if (tsLockDuration.TimeSpanValue.HasValue) + { + subscriptionWrapper.SubscriptionDescription.LockDuration = tsLockDuration.TimeSpanValue.Value; + } + else + { + writeToLog(tsLockDuration.GetErrorMessage(LockDuration)); + return; + } } - if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) - { - subscriptionWrapper.SubscriptionDescription.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; - } - else + if (tsAutoDeleteOnIdle.IsFilled) { - writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); - return; + if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) + { + subscriptionWrapper.SubscriptionDescription.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; + } + else + { + writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); + return; + } } subscriptionWrapper.SubscriptionDescription.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); diff --git a/src/ServiceBusExplorer/Controls/HandleTopicControl.cs b/src/ServiceBusExplorer/Controls/HandleTopicControl.cs index aa17bd26..e8f4e4dc 100644 --- a/src/ServiceBusExplorer/Controls/HandleTopicControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleTopicControl.cs @@ -470,34 +470,43 @@ private async void btnCreateDelete_Click(object sender, EventArgs e) UserMetadata = txtUserMetadata.Text }; - if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) + if (tsDefaultMessageTimeToLive.IsFilled) { - description.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; - } - else - { - writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); - return; + if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) + { + description.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; + } + else + { + writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); + return; + } } - if (tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.HasValue) - { - description.DuplicateDetectionHistoryTimeWindow = tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.Value; - } - else + if (tsDuplicateDetectionHistoryTimeWindow.IsFilled) { - writeToLog(tsDuplicateDetectionHistoryTimeWindow.GetErrorMessage(DuplicateDetectionHistoryTimeWindow)); - return; + if (tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.HasValue) + { + description.DuplicateDetectionHistoryTimeWindow = tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.Value; + } + else + { + writeToLog(tsDuplicateDetectionHistoryTimeWindow.GetErrorMessage(DuplicateDetectionHistoryTimeWindow)); + return; + } } - if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) - { - description.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; - } - else + if (tsAutoDeleteOnIdle.IsFilled) { - writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); - return; + if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) + { + description.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; + } + else + { + writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); + return; + } } description.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); @@ -609,36 +618,45 @@ private void btnCancelUpdate_Click(object sender, EventArgs e) { topicDescription.UserMetadata = txtUserMetadata.Text; - if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) - { - topicDescription.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; - } - else + if (tsDefaultMessageTimeToLive.IsFilled) { - writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); - return; + if (tsDefaultMessageTimeToLive.TimeSpanValue.HasValue) + { + topicDescription.DefaultMessageTimeToLive = tsDefaultMessageTimeToLive.TimeSpanValue.Value; + } + else + { + writeToLog(tsDefaultMessageTimeToLive.GetErrorMessage(DefaultMessageTimeToLive)); + return; + } } - if (tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.HasValue) + if (tsDuplicateDetectionHistoryTimeWindow.IsFilled) { - topicDescription.DuplicateDetectionHistoryTimeWindow = tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.Value; - } - else - { - writeToLog(tsDuplicateDetectionHistoryTimeWindow.GetErrorMessage(DuplicateDetectionHistoryTimeWindow)); - return; + if (tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.HasValue) + { + topicDescription.DuplicateDetectionHistoryTimeWindow = tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue.Value; + } + else + { + writeToLog(tsDuplicateDetectionHistoryTimeWindow.GetErrorMessage(DuplicateDetectionHistoryTimeWindow)); + return; + } } - if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) - { - topicDescription.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; - } - else + if (tsAutoDeleteOnIdle.IsFilled) { - writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); - return; + if (tsAutoDeleteOnIdle.TimeSpanValue.HasValue) + { + topicDescription.AutoDeleteOnIdle = tsAutoDeleteOnIdle.TimeSpanValue.Value; + } + else + { + writeToLog(tsAutoDeleteOnIdle.GetErrorMessage(AutoDeleteOnIdle)); + return; + } } - + topicDescription.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); topicDescription.EnableExpress = checkedListBox.GetItemChecked(EnableExpressIndex); topicDescription.EnableFilteringMessagesBeforePublishing = checkedListBox.GetItemChecked(EnableFilteringMessagesBeforePublishingIndex); diff --git a/src/ServiceBusExplorer/Controls/NumericTextBox.cs b/src/ServiceBusExplorer/Controls/NumericTextBox.cs index b0dcf7e2..bff2ed73 100644 --- a/src/ServiceBusExplorer/Controls/NumericTextBox.cs +++ b/src/ServiceBusExplorer/Controls/NumericTextBox.cs @@ -80,6 +80,8 @@ protected override void OnKeyPress(KeyPressEventArgs e) #region Public Properties + public bool IsFilled => !string.IsNullOrWhiteSpace(Text); + public bool IsValidIntegerValue => int.TryParse(Text, out _); public int IntegerValue => int.Parse(Text); diff --git a/src/ServiceBusExplorer/Controls/TimeSpanControl.cs b/src/ServiceBusExplorer/Controls/TimeSpanControl.cs index 97cc71f2..abb60b1b 100644 --- a/src/ServiceBusExplorer/Controls/TimeSpanControl.cs +++ b/src/ServiceBusExplorer/Controls/TimeSpanControl.cs @@ -20,6 +20,8 @@ public TimeSpanControl() InitializeComponent(); } + public bool IsFilled => txtDays.IsFilled || txtHours.IsFilled || txtMinutes.IsFilled || txtSeconds.IsFilled || txtMilliseconds.IsFilled; + public bool IsValidValue => txtDays.IsValidIntegerValue && txtHours.IsValidIntegerValue && txtMinutes.IsValidIntegerValue && txtSeconds.IsValidIntegerValue && txtMilliseconds.IsValidIntegerValue; public string GetErrorMessage(string fieldName) @@ -58,7 +60,7 @@ public TimeSpan? TimeSpanValue { get { - if (!IsValidValue) + if (!IsFilled || !IsValidValue) { return null; } From 88c7258eb94b16e6ed33b88242842f5aa7ac3646 Mon Sep 17 00:00:00 2001 From: Erik Mogensen Date: Fri, 8 Jan 2021 11:13:55 +0100 Subject: [PATCH 11/18] Updated some NuGet packages (#500) * Updated some NuGet packages * Fixed the app.config warning * Removed Microsoft.WindowsAzure.ConfigurationManager and updated GitVersion* * Cleaned up app.config for Common * Removed appSettings section from Common app.config --- src/Common/Common.csproj | 24 +++++++++---------- src/Common/app.config | 6 +---- src/Common/packages.config | 18 +++++++------- src/NotificationHubs/NotificationHubs.csproj | 2 +- src/NotificationHubs/packages.config | 2 +- .../ServiceBusExplorer.Tests.csproj | 6 ++--- .../ServiceBusExplorer.csproj | 16 +++++-------- src/Utilities/Utilities.csproj | 2 +- 8 files changed, 34 insertions(+), 42 deletions(-) diff --git a/src/Common/Common.csproj b/src/Common/Common.csproj index fcb63de5..754191aa 100644 --- a/src/Common/Common.csproj +++ b/src/Common/Common.csproj @@ -58,8 +58,8 @@ ..\packages\Microsoft.Azure.Services.AppAuthentication.1.0.3\lib\net452\Microsoft.Azure.Services.AppAuthentication.dll - - ..\packages\Microsoft.Bcl.AsyncInterfaces.1.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + + ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll ..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.4.5.0\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll @@ -74,17 +74,17 @@ ..\packages\Microsoft.IdentityModel.Tokens.5.4.0\lib\net461\Microsoft.IdentityModel.Tokens.dll - ..\packages\Microsoft.Rest.ClientRuntime.2.3.20\lib\net461\Microsoft.Rest.ClientRuntime.dll + ..\packages\Microsoft.Rest.ClientRuntime.2.3.22\lib\net461\Microsoft.Rest.ClientRuntime.dll - ..\packages\WindowsAzure.ServiceBus.6.0.0\lib\net462\Microsoft.ServiceBus.dll + ..\packages\WindowsAzure.ServiceBus.6.0.3\lib\net462\Microsoft.ServiceBus.dll - ..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll @@ -99,7 +99,7 @@ ..\packages\System.IdentityModel.Tokens.Jwt.5.4.0\lib\net461\System.IdentityModel.Tokens.Jwt.dll - ..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll ..\packages\System.Memory.Data.1.0.1\lib\net461\System.Memory.Data.dll @@ -139,7 +139,7 @@ True - ..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll + ..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll True True @@ -153,8 +153,8 @@ True True - - ..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll + + ..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll True True @@ -168,8 +168,8 @@ ..\packages\System.Threading.Channels.4.6.0\lib\netstandard2.0\System.Threading.Channels.dll - - ..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll diff --git a/src/Common/app.config b/src/Common/app.config index 9831fc69..2cac6939 100644 --- a/src/Common/app.config +++ b/src/Common/app.config @@ -2,10 +2,6 @@ - - - - @@ -52,4 +48,4 @@ - \ No newline at end of file + diff --git a/src/Common/packages.config b/src/Common/packages.config index f2964723..bd7494a9 100644 --- a/src/Common/packages.config +++ b/src/Common/packages.config @@ -8,17 +8,17 @@ - + - - - + + + - + @@ -27,14 +27,14 @@ - + - + - + - + \ No newline at end of file diff --git a/src/NotificationHubs/NotificationHubs.csproj b/src/NotificationHubs/NotificationHubs.csproj index 6d9deb70..78725291 100644 --- a/src/NotificationHubs/NotificationHubs.csproj +++ b/src/NotificationHubs/NotificationHubs.csproj @@ -35,7 +35,7 @@ ..\packages\Microsoft.Azure.NotificationHubs.1.0.9\lib\net45-full\Microsoft.Azure.NotificationHubs.dll - ..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/src/NotificationHubs/packages.config b/src/NotificationHubs/packages.config index f0d2fd7a..d38b685c 100644 --- a/src/NotificationHubs/packages.config +++ b/src/NotificationHubs/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj b/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj index 74e57211..d87ac196 100644 --- a/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj +++ b/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj @@ -25,7 +25,7 @@ bin\Release\ - + @@ -84,8 +84,8 @@ - - + + 6.0.0 diff --git a/src/ServiceBusExplorer/ServiceBusExplorer.csproj b/src/ServiceBusExplorer/ServiceBusExplorer.csproj index f7657bd5..140e6d61 100644 --- a/src/ServiceBusExplorer/ServiceBusExplorer.csproj +++ b/src/ServiceBusExplorer/ServiceBusExplorer.csproj @@ -586,10 +586,7 @@ Designer Resources.Designer.cs - - Designer - App.config - + SettingsSingleFileGenerator Settings.Designer.cs @@ -609,18 +606,17 @@ - - - + + + 4.5.0 - - + - + diff --git a/src/Utilities/Utilities.csproj b/src/Utilities/Utilities.csproj index 655d9e64..c93c7a08 100644 --- a/src/Utilities/Utilities.csproj +++ b/src/Utilities/Utilities.csproj @@ -9,7 +9,7 @@ - + From 5c79e701f6b92f75ce6382b56166fe50cc468bf0 Mon Sep 17 00:00:00 2001 From: Sean Feldman Date: Fri, 8 Jan 2021 03:29:29 -0700 Subject: [PATCH 12/18] Correctly reflect queue maximum size based on namespace SKU (#504) * Add helper method to identify wherever a namespace is a premium namespace or not * Set queue maximum size control to reflect namespace SKU * Arrange using directives * Set topic maximum size control to reflect namespace SKU * Using directive location --- src/ServiceBus/Helpers/ServiceBusHelper2.cs | 12 ++++++++++-- .../Controls/HandleQueueControl.cs | 6 +++++- .../Controls/HandleTopicControl.cs | 9 ++++++--- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/ServiceBus/Helpers/ServiceBusHelper2.cs b/src/ServiceBus/Helpers/ServiceBusHelper2.cs index e92d593a..54ed2ac6 100644 --- a/src/ServiceBus/Helpers/ServiceBusHelper2.cs +++ b/src/ServiceBus/Helpers/ServiceBusHelper2.cs @@ -19,9 +19,9 @@ //======================================================================================= #endregion -#region Using Directives +using System.Threading.Tasks; using Azure.Messaging.ServiceBus; -#endregion +using Azure.Messaging.ServiceBus.Administration; // ReSharper disable CheckNamespace namespace ServiceBusExplorer.ServiceBus.Helpers @@ -31,5 +31,13 @@ public class ServiceBusHelper2 { public string ConnectionString { get; set; } public ServiceBusTransportType TransportType { get; set; } + + public async Task IsPremiumNamespace() + { + var administrationClient = new ServiceBusAdministrationClient(ConnectionString); + NamespaceProperties namespaceProperties = await administrationClient.GetNamespacePropertiesAsync().ConfigureAwait(false); + + return namespaceProperties.MessagingSku == MessagingSku.Premium; + } } } diff --git a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs index 635a29ee..75c92ab3 100644 --- a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs @@ -234,6 +234,7 @@ public partial class HandleQueueControl : UserControl private QueueDescription queueDescription = default!; private readonly ServiceBusHelper serviceBusHelper = default!; + private readonly ServiceBusHelper2 serviceBusHelper2 = default!; private readonly WriteToLogDelegate writeToLog = default!; private readonly string path = default!; private readonly List hiddenPages = new List(); @@ -280,6 +281,7 @@ public HandleQueueControl(WriteToLogDelegate writeToLog, ServiceBusHelper servic { this.writeToLog = writeToLog; this.serviceBusHelper = serviceBusHelper; + this.serviceBusHelper2 = serviceBusHelper.GetServiceBusHelper2(); this.path = path; this.queueDescription = queueDescription; @@ -525,7 +527,9 @@ public void GetMessageSessions() private void InitializeControls() { - trackBarMaxQueueSize.Maximum = serviceBusHelper.IsCloudNamespace ? 5 : 11; + var maxSize = serviceBusHelper.IsCloudNamespace ? 5 : 11; + maxSize = serviceBusHelper2.IsPremiumNamespace().GetAwaiter().GetResult() ? 80 : maxSize; + trackBarMaxQueueSize.Maximum = maxSize; // Splitter controls messagesSplitContainer.SplitterWidth = 16; diff --git a/src/ServiceBusExplorer/Controls/HandleTopicControl.cs b/src/ServiceBusExplorer/Controls/HandleTopicControl.cs index e8f4e4dc..a6eda6ff 100644 --- a/src/ServiceBusExplorer/Controls/HandleTopicControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleTopicControl.cs @@ -27,9 +27,8 @@ using System.Drawing; using System.Globalization; using System.Linq; -using System.Runtime.InteropServices; -using System.Threading; using System.Windows.Forms; +using ServiceBusExplorer.ServiceBus.Helpers; using ServiceBusExplorer.Forms; using ServiceBusExplorer.Helpers; using ServiceBusExplorer.UIHelpers; @@ -126,6 +125,7 @@ public partial class HandleTopicControl : UserControl private readonly List hiddenPages = new List(); private TopicDescription topicDescription; private readonly ServiceBusHelper serviceBusHelper; + private readonly ServiceBusHelper2 serviceBusHelper2 = default!; private readonly WriteToLogDelegate writeToLog; private readonly string path; #endregion @@ -141,6 +141,7 @@ public HandleTopicControl(WriteToLogDelegate writeToLog, ServiceBusHelper servic { this.writeToLog = writeToLog; this.serviceBusHelper = serviceBusHelper; + this.serviceBusHelper2 = serviceBusHelper.GetServiceBusHelper2(); this.topicDescription = topicDescription; this.path = path; @@ -173,7 +174,9 @@ public void RefreshData(TopicDescription topic) #region Private Methods private void InitializeControls() { - trackBarMaxTopicSize.Maximum = serviceBusHelper.IsCloudNamespace ? 5 : 11; + var maxSize = serviceBusHelper.IsCloudNamespace ? 5 : 11; + maxSize = serviceBusHelper2.IsPremiumNamespace().GetAwaiter().GetResult() ? 80 : maxSize; + trackBarMaxTopicSize.Maximum = maxSize; // IsAnonymousAccessible if (serviceBusHelper.IsCloudNamespace) From 98e27d28a72f6f75edb8a646b6790fc2f51d5500 Mon Sep 17 00:00:00 2001 From: Paolo Salvatori Date: Fri, 8 Jan 2021 12:02:14 +0100 Subject: [PATCH 13/18] Change the tick frequency of the track bar used to set the max size of a queue or topic. When the SKU of the Service Bus namespace is Premium, the tick frequency is increased to 10. --- src/ServiceBusExplorer/Controls/HandleQueueControl.cs | 10 +++++++--- src/ServiceBusExplorer/Controls/HandleTopicControl.cs | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs index 75c92ab3..d2c4d31a 100644 --- a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs @@ -527,9 +527,13 @@ public void GetMessageSessions() private void InitializeControls() { - var maxSize = serviceBusHelper.IsCloudNamespace ? 5 : 11; - maxSize = serviceBusHelper2.IsPremiumNamespace().GetAwaiter().GetResult() ? 80 : maxSize; - trackBarMaxQueueSize.Maximum = maxSize; + trackBarMaxQueueSize.Maximum = serviceBusHelper.IsCloudNamespace ? 5 : 11; + + if (serviceBusHelper2.IsPremiumNamespace().GetAwaiter().GetResult()) + { + trackBarMaxQueueSize.Maximum = 80; + trackBarMaxQueueSize.TickFrequency = 10; + } // Splitter controls messagesSplitContainer.SplitterWidth = 16; diff --git a/src/ServiceBusExplorer/Controls/HandleTopicControl.cs b/src/ServiceBusExplorer/Controls/HandleTopicControl.cs index a6eda6ff..90b878ee 100644 --- a/src/ServiceBusExplorer/Controls/HandleTopicControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleTopicControl.cs @@ -174,9 +174,13 @@ public void RefreshData(TopicDescription topic) #region Private Methods private void InitializeControls() { - var maxSize = serviceBusHelper.IsCloudNamespace ? 5 : 11; - maxSize = serviceBusHelper2.IsPremiumNamespace().GetAwaiter().GetResult() ? 80 : maxSize; - trackBarMaxTopicSize.Maximum = maxSize; + trackBarMaxTopicSize.Maximum = serviceBusHelper.IsCloudNamespace ? 5 : 11; + + if (serviceBusHelper2.IsPremiumNamespace().GetAwaiter().GetResult()) + { + trackBarMaxTopicSize.Maximum = 80; + trackBarMaxTopicSize.TickFrequency = 10; + } // IsAnonymousAccessible if (serviceBusHelper.IsCloudNamespace) From bcff36ece7f80515b0d699ca224a7c2874cd9a15 Mon Sep 17 00:00:00 2001 From: Erik Mogensen Date: Mon, 18 Jan 2021 21:52:58 +0100 Subject: [PATCH 14/18] Update README.md (#508) * Update README.md with requirement to use Visual studio 2019 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 47ab366b..2a1d177b 100644 --- a/README.md +++ b/README.md @@ -27,14 +27,14 @@ Here are some guidelines concerning contributions: - All contributions should be done on `develop` - `master` is only for releases -- Every pull request is built by AppVeyor and should be linked to a GitHub issue. +- Every pull request is built by AppVeyor and should preferably be linked to a GitHub issue. - Write unit tests, if applicable If you just want to help out, feel free to pick one of our issues with the [`help wanted`](https://github.com/paolosalvatori/ServiceBusExplorer/labels/help%20wanted) label. # Development Environment -Visual Studio 2017 15.7 or later is required to build the solution. +Visual Studio 2019 16.8.0 or later is required to build the solution. When editing UI elements Visual Studio should run as a DPI-unaware process. For more information about this, see the [Visual Studio documentation](https://docs.microsoft.com/en-us/dotnet/framework/winforms/disable-dpi-awareness-visual-studio). In Visual Studio 2017 15.9.12 the informational bar looks like this ![AutoscalingTurnedOff](./media/AutoscalingTurnedOff.png) when it is running as a DPI-unaware process. From b42860f9d4fd26aa6c7915551b26f4d1e0497ceb Mon Sep 17 00:00:00 2001 From: Galdin Raphael Date: Tue, 26 Jan 2021 11:29:04 +0530 Subject: [PATCH 15/18] ListenerControl.cs: Fix typo in log message (#515) --- src/ServiceBusExplorer/Controls/ListenerControl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ServiceBusExplorer/Controls/ListenerControl.cs b/src/ServiceBusExplorer/Controls/ListenerControl.cs index ae325765..7d813e2a 100644 --- a/src/ServiceBusExplorer/Controls/ListenerControl.cs +++ b/src/ServiceBusExplorer/Controls/ListenerControl.cs @@ -74,7 +74,7 @@ public partial class ListenerControl : UserControl private const string SelectEntityGrouperTitle = "Forward To"; private const string SelectEntityLabelText = "Target Queue or Topic:"; private const string DoubleClickMessage = "Double-click a row to repair and resubmit the corresponding message."; - private const string MessageSentMessage = "[{0}] messages where sent to [{1}]"; + private const string MessageSentMessage = "[{0}] messages were sent to [{1}]"; private const string FilterExpressionTitle = "Define Filter Expression"; private const string FilterExpressionLabel = "Filter Expression"; private const string FilterExpressionNotValidMessage = "The filter expression [{0}] is not valid: {1}"; From ece8a219c1999eb74c93d61af19670666b5f5494 Mon Sep 17 00:00:00 2001 From: Erik Mogensen Date: Fri, 29 Jan 2021 11:19:11 +0100 Subject: [PATCH 16/18] Fix sending files (#514) * Only check message text if it going to use it. Changed error message. * Added text to the forms for testing queues and topics explaing that you have to increase the Message Count if you want to send all files. --- .../Controls/TestQueueControl.Designer.cs | 201 ++++++++++-------- .../Controls/TestQueueControl.cs | 4 +- .../Controls/TestTopicControl.Designer.cs | 36 +++- .../Controls/TestTopicControl.cs | 4 +- 4 files changed, 138 insertions(+), 107 deletions(-) diff --git a/src/ServiceBusExplorer/Controls/TestQueueControl.Designer.cs b/src/ServiceBusExplorer/Controls/TestQueueControl.Designer.cs index b78fa59d..1d3301e1 100644 --- a/src/ServiceBusExplorer/Controls/TestQueueControl.Designer.cs +++ b/src/ServiceBusExplorer/Controls/TestQueueControl.Designer.cs @@ -17,13 +17,13 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TestQueueControl)); - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title(); + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Legend legend3 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series9 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Series series10 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Series series11 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Series series12 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Title title3 = new System.Windows.Forms.DataVisualization.Charting.Title(); this.btnStart = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); @@ -184,6 +184,7 @@ private void InitializeComponent() this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); this.btnSelectFiles = new System.Windows.Forms.Button(); this.btnClearFiles = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); this.mainTabControl.SuspendLayout(); this.mainTabMessagePage.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); @@ -431,7 +432,6 @@ private void InitializeComponent() this.txtMessageText.CharWidth = 8; this.txtMessageText.Cursor = System.Windows.Forms.Cursors.IBeam; this.txtMessageText.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); - this.txtMessageText.Font = new System.Drawing.Font("Courier New", 9.75F); this.txtMessageText.ForeColor = System.Drawing.SystemColors.ControlText; this.txtMessageText.IsReplaceMode = false; this.txtMessageText.Location = new System.Drawing.Point(16, 32); @@ -447,6 +447,7 @@ private void InitializeComponent() // tabFilesPage // this.tabFilesPage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.tabFilesPage.Controls.Add(this.label2); this.tabFilesPage.Controls.Add(this.grouperMessageFiles); this.tabFilesPage.ForeColor = System.Drawing.SystemColors.ControlText; this.tabFilesPage.Location = new System.Drawing.Point(4, 24); @@ -477,7 +478,7 @@ private void InitializeComponent() this.grouperMessageFiles.ForeColor = System.Drawing.Color.White; this.grouperMessageFiles.GroupImage = null; this.grouperMessageFiles.GroupTitle = "Message Files"; - this.grouperMessageFiles.Location = new System.Drawing.Point(16, 8); + this.grouperMessageFiles.Location = new System.Drawing.Point(16, 81); this.grouperMessageFiles.Name = "grouperMessageFiles"; this.grouperMessageFiles.Padding = new System.Windows.Forms.Padding(20); this.grouperMessageFiles.PaintGroupBox = true; @@ -485,7 +486,7 @@ private void InitializeComponent() this.grouperMessageFiles.ShadowColor = System.Drawing.Color.DarkGray; this.grouperMessageFiles.ShadowControl = false; this.grouperMessageFiles.ShadowThickness = 1; - this.grouperMessageFiles.Size = new System.Drawing.Size(416, 317); + this.grouperMessageFiles.Size = new System.Drawing.Size(416, 244); this.grouperMessageFiles.TabIndex = 16; this.grouperMessageFiles.CustomPaint += new System.Action(this.grouperMessageFiles_CustomPaint); // @@ -495,7 +496,7 @@ private void InitializeComponent() this.radioButtonBinaryFile.AutoSize = true; this.radioButtonBinaryFile.Checked = true; this.radioButtonBinaryFile.ForeColor = System.Drawing.SystemColors.ControlText; - this.radioButtonBinaryFile.Location = new System.Drawing.Point(104, 286); + this.radioButtonBinaryFile.Location = new System.Drawing.Point(104, 213); this.radioButtonBinaryFile.Name = "radioButtonBinaryFile"; this.radioButtonBinaryFile.Size = new System.Drawing.Size(73, 17); this.radioButtonBinaryFile.TabIndex = 13; @@ -508,7 +509,7 @@ private void InitializeComponent() this.radioButtonXmlTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.radioButtonXmlTemplate.AutoSize = true; this.radioButtonXmlTemplate.ForeColor = System.Drawing.SystemColors.ControlText; - this.radioButtonXmlTemplate.Location = new System.Drawing.Point(305, 286); + this.radioButtonXmlTemplate.Location = new System.Drawing.Point(305, 213); this.radioButtonXmlTemplate.Name = "radioButtonXmlTemplate"; this.radioButtonXmlTemplate.Size = new System.Drawing.Size(94, 17); this.radioButtonXmlTemplate.TabIndex = 12; @@ -521,7 +522,7 @@ private void InitializeComponent() this.radioButtonJsonTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.radioButtonJsonTemplate.AutoSize = true; this.radioButtonJsonTemplate.ForeColor = System.Drawing.SystemColors.ControlText; - this.radioButtonJsonTemplate.Location = new System.Drawing.Point(192, 286); + this.radioButtonJsonTemplate.Location = new System.Drawing.Point(192, 213); this.radioButtonJsonTemplate.Name = "radioButtonJsonTemplate"; this.radioButtonJsonTemplate.Size = new System.Drawing.Size(100, 17); this.radioButtonJsonTemplate.TabIndex = 11; @@ -535,7 +536,7 @@ private void InitializeComponent() this.radioButtonTextFile.AutoSize = true; this.radioButtonTextFile.Checked = true; this.radioButtonTextFile.ForeColor = System.Drawing.SystemColors.ControlText; - this.radioButtonTextFile.Location = new System.Drawing.Point(16, 286); + this.radioButtonTextFile.Location = new System.Drawing.Point(16, 213); this.radioButtonTextFile.Name = "radioButtonTextFile"; this.radioButtonTextFile.Size = new System.Drawing.Size(65, 17); this.radioButtonTextFile.TabIndex = 10; @@ -569,7 +570,7 @@ private void InitializeComponent() this.messageFileListView.Location = new System.Drawing.Point(16, 32); this.messageFileListView.Name = "messageFileListView"; this.messageFileListView.OwnerDraw = true; - this.messageFileListView.Size = new System.Drawing.Size(384, 246); + this.messageFileListView.Size = new System.Drawing.Size(384, 173); this.messageFileListView.TabIndex = 2; this.messageFileListView.UseCompatibleStateImageBehavior = false; this.messageFileListView.View = System.Windows.Forms.View.Details; @@ -836,6 +837,8 @@ private void InitializeComponent() // // txtMessageCount // + this.txtMessageCount.AllowDecimal = false; + this.txtMessageCount.AllowNegative = false; this.txtMessageCount.AllowSpace = false; this.txtMessageCount.Location = new System.Drawing.Point(96, 264); this.txtMessageCount.Name = "txtMessageCount"; @@ -2379,89 +2382,89 @@ private void InitializeComponent() this.chart.BorderSkin.BorderWidth = 0; this.chart.BorderSkin.PageColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.chart.BorderSkin.SkinStyle = System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle.FrameTitle1; - chartArea1.Area3DStyle.Inclination = 15; - chartArea1.Area3DStyle.IsClustered = true; - chartArea1.Area3DStyle.IsRightAngleAxes = false; - chartArea1.Area3DStyle.Perspective = 10; - chartArea1.Area3DStyle.Rotation = 10; - chartArea1.Area3DStyle.WallWidth = 0; - chartArea1.AxisX.LabelAutoFitStyle = ((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles)(((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.IncreaseFont | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.DecreaseFont) + chartArea3.Area3DStyle.Inclination = 15; + chartArea3.Area3DStyle.IsClustered = true; + chartArea3.Area3DStyle.IsRightAngleAxes = false; + chartArea3.Area3DStyle.Perspective = 10; + chartArea3.Area3DStyle.Rotation = 10; + chartArea3.Area3DStyle.WallWidth = 0; + chartArea3.AxisX.LabelAutoFitStyle = ((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles)(((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.IncreaseFont | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.DecreaseFont) | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.WordWrap))); - chartArea1.AxisX.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold); - chartArea1.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - chartArea1.AxisX.ScrollBar.LineColor = System.Drawing.Color.Black; - chartArea1.AxisX.ScrollBar.Size = 10D; - chartArea1.AxisX.Title = "Messages"; - chartArea1.AxisX.TitleFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - chartArea1.AxisY.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold); - chartArea1.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - chartArea1.AxisY.ScrollBar.LineColor = System.Drawing.Color.Black; - chartArea1.AxisY.ScrollBar.Size = 10D; - chartArea1.AxisY.Title = "Time - Msg/Sec"; - chartArea1.AxisY.TitleFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - chartArea1.AxisY2.Title = "Messages/Sec"; - chartArea1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom; - chartArea1.BackSecondaryColor = System.Drawing.Color.White; - chartArea1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - chartArea1.BorderDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid; - chartArea1.CursorX.IsUserEnabled = true; - chartArea1.CursorX.IsUserSelectionEnabled = true; - chartArea1.CursorY.IsUserEnabled = true; - chartArea1.CursorY.IsUserSelectionEnabled = true; - chartArea1.Name = "Default"; - chartArea1.ShadowColor = System.Drawing.Color.White; - this.chart.ChartAreas.Add(chartArea1); - legend1.Alignment = System.Drawing.StringAlignment.Far; - legend1.BackColor = System.Drawing.Color.Transparent; - legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top; - legend1.Font = new System.Drawing.Font("Trebuchet MS", 8.25F); - legend1.IsTextAutoFit = false; - legend1.MaximumAutoSize = 5F; - legend1.Name = "Default"; - this.chart.Legends.Add(legend1); + chartArea3.AxisX.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold); + chartArea3.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + chartArea3.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + chartArea3.AxisX.ScrollBar.LineColor = System.Drawing.Color.Black; + chartArea3.AxisX.ScrollBar.Size = 10D; + chartArea3.AxisX.Title = "Messages"; + chartArea3.AxisX.TitleFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + chartArea3.AxisY.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold); + chartArea3.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + chartArea3.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + chartArea3.AxisY.ScrollBar.LineColor = System.Drawing.Color.Black; + chartArea3.AxisY.ScrollBar.Size = 10D; + chartArea3.AxisY.Title = "Time - Msg/Sec"; + chartArea3.AxisY.TitleFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + chartArea3.AxisY2.Title = "Messages/Sec"; + chartArea3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + chartArea3.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom; + chartArea3.BackSecondaryColor = System.Drawing.Color.White; + chartArea3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + chartArea3.BorderDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid; + chartArea3.CursorX.IsUserEnabled = true; + chartArea3.CursorX.IsUserSelectionEnabled = true; + chartArea3.CursorY.IsUserEnabled = true; + chartArea3.CursorY.IsUserSelectionEnabled = true; + chartArea3.Name = "Default"; + chartArea3.ShadowColor = System.Drawing.Color.White; + this.chart.ChartAreas.Add(chartArea3); + legend3.Alignment = System.Drawing.StringAlignment.Far; + legend3.BackColor = System.Drawing.Color.Transparent; + legend3.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top; + legend3.Font = new System.Drawing.Font("Trebuchet MS", 8.25F); + legend3.IsTextAutoFit = false; + legend3.MaximumAutoSize = 5F; + legend3.Name = "Default"; + this.chart.Legends.Add(legend3); this.chart.Location = new System.Drawing.Point(152, 16); this.chart.Name = "chart"; - series1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); - series1.BorderWidth = 2; - series1.ChartArea = "Default"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine; - series1.Legend = "Default"; - series1.LegendText = "Sender Latency"; - series1.Name = "SenderLatency"; - series2.BorderColor = System.Drawing.Color.Red; - series2.BorderWidth = 2; - series2.ChartArea = "Default"; - series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine; - series2.Legend = "Default"; - series2.LegendText = "Receiver Latency"; - series2.Name = "ReceiverLatency"; - series3.BorderWidth = 2; - series3.ChartArea = "Default"; - series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine; - series3.Legend = "Default"; - series3.LegendText = "Sender Throughput"; - series3.Name = "SenderThroughput"; - series4.BorderWidth = 2; - series4.ChartArea = "Default"; - series4.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine; - series4.Legend = "Default"; - series4.LegendText = "Receiver Throughput"; - series4.Name = "ReceiverThroughput"; - this.chart.Series.Add(series1); - this.chart.Series.Add(series2); - this.chart.Series.Add(series3); - this.chart.Series.Add(series4); + series9.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105))))); + series9.BorderWidth = 2; + series9.ChartArea = "Default"; + series9.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine; + series9.Legend = "Default"; + series9.LegendText = "Sender Latency"; + series9.Name = "SenderLatency"; + series10.BorderColor = System.Drawing.Color.Red; + series10.BorderWidth = 2; + series10.ChartArea = "Default"; + series10.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine; + series10.Legend = "Default"; + series10.LegendText = "Receiver Latency"; + series10.Name = "ReceiverLatency"; + series11.BorderWidth = 2; + series11.ChartArea = "Default"; + series11.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine; + series11.Legend = "Default"; + series11.LegendText = "Sender Throughput"; + series11.Name = "SenderThroughput"; + series12.BorderWidth = 2; + series12.ChartArea = "Default"; + series12.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine; + series12.Legend = "Default"; + series12.LegendText = "Receiver Throughput"; + series12.Name = "ReceiverThroughput"; + this.chart.Series.Add(series9); + this.chart.Series.Add(series10); + this.chart.Series.Add(series11); + this.chart.Series.Add(series12); this.chart.Size = new System.Drawing.Size(668, 352); this.chart.TabIndex = 126; - title1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - title1.Name = "Title"; - title1.ShadowColor = System.Drawing.Color.Transparent; - title1.ShadowOffset = 1; - title1.Text = "Sender & Receiver Performance Counters"; - this.chart.Titles.Add(title1); + title3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + title3.Name = "Title"; + title3.ShadowColor = System.Drawing.Color.Transparent; + title3.ShadowOffset = 1; + title3.Text = "Sender & Receiver Performance Counters"; + this.chart.Titles.Add(title3); // // btnOpenFile // @@ -2516,6 +2519,17 @@ private void InitializeComponent() this.btnClearFiles.Text = "Clear Files"; this.btnClearFiles.UseVisualStyleBackColor = false; this.btnClearFiles.Click += new System.EventHandler(this.btnClearFiles_Click); + // + // label2 + // + this.label2.ForeColor = System.Drawing.SystemColors.ControlText; + this.label2.Location = new System.Drawing.Point(16, 22); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(416, 56); + this.label2.TabIndex = 33; + this.label2.Text = "The default is to just send one message so if you have selected muliple files and" + + " want to send all of them you have to change the Message Count on the Sender tab" + + "."; // // TestQueueControl // @@ -2744,5 +2758,6 @@ private void InitializeComponent() private System.Windows.Forms.ComboBox cboMessageFormat; private Grouper grouperMessageText; private FastColoredTextBoxNS.FastColoredTextBox txtMessageText; + private System.Windows.Forms.Label label2; } } diff --git a/src/ServiceBusExplorer/Controls/TestQueueControl.cs b/src/ServiceBusExplorer/Controls/TestQueueControl.cs index 4474b379..8a6dc3e7 100644 --- a/src/ServiceBusExplorer/Controls/TestQueueControl.cs +++ b/src/ServiceBusExplorer/Controls/TestQueueControl.cs @@ -93,7 +93,7 @@ public partial class TestQueueControl : UserControl private const string TransactionAborted = " - Transaction aborted."; private const string NoMoreSessionsToAccept = "Receiver[{0}]: No more sessions to accept."; private const string FilterExpressionIsNotValid = "The filter expression is not valid."; - private const string NoMessageSelected = "No message to send has been selected under the Files tab."; + private const string NoMessageSelected = "No file to send has been selected under the Files tab."; private const string SelectBrokeredMessageGenerator = "Select a BrokeredMessage generator..."; private const string InvalidJsonTemplate = "{0} is an invalid JSON template. The file will be used as text message rather than a template."; private const string InvalidXmlTemplate = "{0} is an invalid XML template. The file will be used as text message rather than a template."; @@ -437,7 +437,7 @@ private bool ValidateParameters() { try { - if (string.IsNullOrWhiteSpace(txtMessageText.Text)) + if (messageTabControl.SelectedIndex == MessageTabPage && string.IsNullOrWhiteSpace(txtMessageText.Text)) { writeToLog(MessageCannotBeNull); return false; diff --git a/src/ServiceBusExplorer/Controls/TestTopicControl.Designer.cs b/src/ServiceBusExplorer/Controls/TestTopicControl.Designer.cs index b4cd11a2..7c784c31 100644 --- a/src/ServiceBusExplorer/Controls/TestTopicControl.Designer.cs +++ b/src/ServiceBusExplorer/Controls/TestTopicControl.Designer.cs @@ -186,6 +186,7 @@ private void InitializeComponent() this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); this.btnClearFiles = new System.Windows.Forms.Button(); this.btnSelectFiles = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); this.mainTabControl.SuspendLayout(); this.mainTabMessagePage.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); @@ -433,7 +434,6 @@ private void InitializeComponent() this.txtMessageText.CharWidth = 8; this.txtMessageText.Cursor = System.Windows.Forms.Cursors.IBeam; this.txtMessageText.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); - this.txtMessageText.Font = new System.Drawing.Font("Courier New", 9.75F); this.txtMessageText.ForeColor = System.Drawing.SystemColors.ControlText; this.txtMessageText.IsReplaceMode = false; this.txtMessageText.Location = new System.Drawing.Point(16, 32); @@ -449,6 +449,7 @@ private void InitializeComponent() // tabFilesPage // this.tabFilesPage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.tabFilesPage.Controls.Add(this.label2); this.tabFilesPage.Controls.Add(this.grouperMessageFiles); this.tabFilesPage.ForeColor = System.Drawing.SystemColors.ControlText; this.tabFilesPage.Location = new System.Drawing.Point(4, 24); @@ -479,7 +480,7 @@ private void InitializeComponent() this.grouperMessageFiles.ForeColor = System.Drawing.Color.White; this.grouperMessageFiles.GroupImage = null; this.grouperMessageFiles.GroupTitle = "Message Files"; - this.grouperMessageFiles.Location = new System.Drawing.Point(16, 8); + this.grouperMessageFiles.Location = new System.Drawing.Point(16, 78); this.grouperMessageFiles.Name = "grouperMessageFiles"; this.grouperMessageFiles.Padding = new System.Windows.Forms.Padding(20); this.grouperMessageFiles.PaintGroupBox = true; @@ -487,7 +488,7 @@ private void InitializeComponent() this.grouperMessageFiles.ShadowColor = System.Drawing.Color.DarkGray; this.grouperMessageFiles.ShadowControl = false; this.grouperMessageFiles.ShadowThickness = 1; - this.grouperMessageFiles.Size = new System.Drawing.Size(416, 317); + this.grouperMessageFiles.Size = new System.Drawing.Size(416, 247); this.grouperMessageFiles.TabIndex = 17; this.grouperMessageFiles.CustomPaint += new System.Action(this.grouperMessageFiles_CustomPaint); // @@ -496,7 +497,7 @@ private void InitializeComponent() this.radioButtonBinaryFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.radioButtonBinaryFile.AutoSize = true; this.radioButtonBinaryFile.ForeColor = System.Drawing.SystemColors.ControlText; - this.radioButtonBinaryFile.Location = new System.Drawing.Point(104, 286); + this.radioButtonBinaryFile.Location = new System.Drawing.Point(104, 216); this.radioButtonBinaryFile.Name = "radioButtonBinaryFile"; this.radioButtonBinaryFile.Size = new System.Drawing.Size(73, 17); this.radioButtonBinaryFile.TabIndex = 15; @@ -508,9 +509,9 @@ private void InitializeComponent() this.radioButtonJsonTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.radioButtonJsonTemplate.AutoSize = true; this.radioButtonJsonTemplate.ForeColor = System.Drawing.SystemColors.ControlText; - this.radioButtonJsonTemplate.Location = new System.Drawing.Point(192, 286); + this.radioButtonJsonTemplate.Location = new System.Drawing.Point(192, 216); this.radioButtonJsonTemplate.Name = "radioButtonJsonTemplate"; - this.radioButtonJsonTemplate.Size = new System.Drawing.Size(94, 17); + this.radioButtonJsonTemplate.Size = new System.Drawing.Size(100, 17); this.radioButtonJsonTemplate.TabIndex = 14; this.radioButtonJsonTemplate.TabStop = true; this.radioButtonJsonTemplate.Text = "JSON Template"; @@ -521,9 +522,9 @@ private void InitializeComponent() this.radioButtonXmlTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.radioButtonXmlTemplate.AutoSize = true; this.radioButtonXmlTemplate.ForeColor = System.Drawing.SystemColors.ControlText; - this.radioButtonXmlTemplate.Location = new System.Drawing.Point(310, 286); + this.radioButtonXmlTemplate.Location = new System.Drawing.Point(305, 216); this.radioButtonXmlTemplate.Name = "radioButtonXmlTemplate"; - this.radioButtonXmlTemplate.Size = new System.Drawing.Size(89, 17); + this.radioButtonXmlTemplate.Size = new System.Drawing.Size(94, 17); this.radioButtonXmlTemplate.TabIndex = 9; this.radioButtonXmlTemplate.TabStop = true; this.radioButtonXmlTemplate.Text = "XML Template"; @@ -535,7 +536,7 @@ private void InitializeComponent() this.radioButtonTextFile.AutoSize = true; this.radioButtonTextFile.Checked = true; this.radioButtonTextFile.ForeColor = System.Drawing.SystemColors.ControlText; - this.radioButtonTextFile.Location = new System.Drawing.Point(16, 286); + this.radioButtonTextFile.Location = new System.Drawing.Point(16, 216); this.radioButtonTextFile.Name = "radioButtonTextFile"; this.radioButtonTextFile.Size = new System.Drawing.Size(65, 17); this.radioButtonTextFile.TabIndex = 7; @@ -565,10 +566,11 @@ private void InitializeComponent() this.nameColumnHeader, this.sizeColumnHeader}); this.messageFileListView.FullRowSelect = true; + this.messageFileListView.HideSelection = false; this.messageFileListView.Location = new System.Drawing.Point(16, 32); this.messageFileListView.Name = "messageFileListView"; this.messageFileListView.OwnerDraw = true; - this.messageFileListView.Size = new System.Drawing.Size(384, 246); + this.messageFileListView.Size = new System.Drawing.Size(384, 176); this.messageFileListView.TabIndex = 2; this.messageFileListView.UseCompatibleStateImageBehavior = false; this.messageFileListView.View = System.Windows.Forms.View.Details; @@ -834,6 +836,8 @@ private void InitializeComponent() // // txtMessageCount // + this.txtMessageCount.AllowDecimal = false; + this.txtMessageCount.AllowNegative = false; this.txtMessageCount.AllowSpace = false; this.txtMessageCount.Location = new System.Drawing.Point(96, 259); this.txtMessageCount.Name = "txtMessageCount"; @@ -2542,6 +2546,17 @@ private void InitializeComponent() this.btnSelectFiles.Text = "Select Files"; this.btnSelectFiles.UseVisualStyleBackColor = false; this.btnSelectFiles.Click += new System.EventHandler(this.btnSelectFiles_Click); + // + // label2 + // + this.label2.ForeColor = System.Drawing.SystemColors.ControlText; + this.label2.Location = new System.Drawing.Point(16, 19); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(416, 56); + this.label2.TabIndex = 34; + this.label2.Text = "The default is to just send one message so if you have selected muliple files and" + + " want to send all of them you have to change the Message Count on the Sender tab" + + "."; // // TestTopicControl // @@ -2772,5 +2787,6 @@ private void InitializeComponent() private System.Windows.Forms.ComboBox cboMessageFormat; private Grouper grouperMessageText; private FastColoredTextBoxNS.FastColoredTextBox txtMessageText; + private System.Windows.Forms.Label label2; } } diff --git a/src/ServiceBusExplorer/Controls/TestTopicControl.cs b/src/ServiceBusExplorer/Controls/TestTopicControl.cs index c5b385c7..0034b1f4 100644 --- a/src/ServiceBusExplorer/Controls/TestTopicControl.cs +++ b/src/ServiceBusExplorer/Controls/TestTopicControl.cs @@ -93,7 +93,7 @@ public partial class TestTopicControl : UserControl private const string NoMoreSessionsToAccept = "Receiver[{0}]: No more sessions to accept."; private const string FilterExpressionIsNotValid = "The filter expression is not valid."; private const string NoSubscriptionSelected = "No subscription has been selected."; - private const string NoMessageSelected = "No message to send has been selected under the Files tab."; + private const string NoMessageSelected = "No file to send has been selected under the Files tab."; private const string SelectBrokeredMessageGenerator = "Select a BrokeredMessage generator..."; private const string InvalidJsonTemplate = "{0} is an invalid JSON template. The file will be used as text message rather than a template."; private const string InvalidXmlTemplate = "{0} is an invalid XML template. The file will be used as text message rather than a template."; @@ -440,7 +440,7 @@ private bool ValidateParameters() { try { - if (string.IsNullOrWhiteSpace(txtMessageText.Text)) + if (messageTabControl.SelectedIndex == MessageTabPage && string.IsNullOrWhiteSpace(txtMessageText.Text)) { writeToLog(MessageCannotBeNull); return false; From 627580eeee6d39b96c452376cb6ac5cff965205c Mon Sep 17 00:00:00 2001 From: Erik Mogensen Date: Fri, 29 Jan 2021 11:22:27 +0100 Subject: [PATCH 17/18] Remove queue settings for premium (#516) * Fix for queues * Renamed constants and variables * Remove some topic settings for the topic form * Cleanup --- .../Controls/HandleQueueControl.Designer.cs | 111 ++++++------- .../Controls/HandleQueueControl.cs | 155 ++++++++++-------- .../Controls/HandleTopicControl.Designer.cs | 80 ++++----- .../Controls/HandleTopicControl.cs | 115 +++++++------ .../ServiceBusExplorer.csproj | 1 + .../UIHelpers/CheckistBoxExtensions.cs | 68 ++++++++ 6 files changed, 313 insertions(+), 217 deletions(-) create mode 100644 src/ServiceBusExplorer/UIHelpers/CheckistBoxExtensions.cs diff --git a/src/ServiceBusExplorer/Controls/HandleQueueControl.Designer.cs b/src/ServiceBusExplorer/Controls/HandleQueueControl.Designer.cs index 627c387e..02e9522e 100644 --- a/src/ServiceBusExplorer/Controls/HandleQueueControl.Designer.cs +++ b/src/ServiceBusExplorer/Controls/HandleQueueControl.Designer.cs @@ -72,6 +72,7 @@ private void InitializeComponent() this.grouperMessageSystemProperties = new ServiceBusExplorer.Controls.Grouper(); this.messagePropertyGrid = new System.Windows.Forms.PropertyGrid(); this.grouperMessageCustomProperties = new ServiceBusExplorer.Controls.Grouper(); + this.messageCustomPropertyGrid = new System.Windows.Forms.PropertyGrid(); this.tabPageDeadletter = new System.Windows.Forms.TabPage(); this.deadletterSplitContainer = new System.Windows.Forms.SplitContainer(); this.deadletterMainSplitContainer = new System.Windows.Forms.SplitContainer(); @@ -85,6 +86,7 @@ private void InitializeComponent() this.grouperDeadletterSystemProperties = new ServiceBusExplorer.Controls.Grouper(); this.deadletterPropertyGrid = new System.Windows.Forms.PropertyGrid(); this.grouperDeadletterCustomProperties = new ServiceBusExplorer.Controls.Grouper(); + this.deadletterCustomPropertyGrid = new System.Windows.Forms.PropertyGrid(); this.tabPageTransferDeadletter = new System.Windows.Forms.TabPage(); this.transferDeadletterSplitContainer = new System.Windows.Forms.SplitContainer(); this.transferMainSplitContainer = new System.Windows.Forms.SplitContainer(); @@ -97,6 +99,7 @@ private void InitializeComponent() this.grouperTransferDeadletterSystemProperties = new ServiceBusExplorer.Controls.Grouper(); this.transferDeadletterPropertyGrid = new System.Windows.Forms.PropertyGrid(); this.grouperTransferDeadletterCustomProperties = new ServiceBusExplorer.Controls.Grouper(); + this.transferDeadletterCustomPropertyGrid = new System.Windows.Forms.PropertyGrid(); this.tabPageSessions = new System.Windows.Forms.TabPage(); this.sessionListStateSplitContainer = new System.Windows.Forms.SplitContainer(); this.sessionMainSplitContainer = new System.Windows.Forms.SplitContainer(); @@ -144,9 +147,6 @@ private void InitializeComponent() this.saveSelectedTransferDeadletteredMessageBodyAsFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveSelectedTransferDeadletteredMessagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveSelectedTransferDeadletteredMessagesBodyAsFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.messageCustomPropertyGrid = new System.Windows.Forms.PropertyGrid(); - this.deadletterCustomPropertyGrid = new System.Windows.Forms.PropertyGrid(); - this.transferDeadletterCustomPropertyGrid = new System.Windows.Forms.PropertyGrid(); this.mainTabControl.SuspendLayout(); this.tabPageDescription.SuspendLayout(); this.grouperAutoDeleteOnIdle.SuspendLayout(); @@ -516,15 +516,6 @@ private void InitializeComponent() this.checkedListBox.CheckOnClick = true; this.checkedListBox.ForeColor = System.Drawing.SystemColors.WindowText; this.checkedListBox.FormattingEnabled = true; - this.checkedListBox.Items.AddRange(new object[] { - "Enable Batched Operations", - "Enable Dead Lettering On Message Expiration", - "Enable Partitioning", - "Enable Express", - "Requires Duplicate Detection", - "Requires Session", - "Enforce Message Ordering", - "Is Anonymous Accessible"}); this.checkedListBox.Location = new System.Drawing.Point(16, 32); this.checkedListBox.Margin = new System.Windows.Forms.Padding(8); this.checkedListBox.Name = "checkedListBox"; @@ -1111,7 +1102,7 @@ private void InitializeComponent() '\"', '\'', '\''}; - this.txtMessageText.AutoScrollMinSize = new System.Drawing.Size(27, 14); + this.txtMessageText.AutoScrollMinSize = new System.Drawing.Size(2, 14); this.txtMessageText.BackBrush = null; this.txtMessageText.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtMessageText.CharHeight = 14; @@ -1215,6 +1206,21 @@ private void InitializeComponent() this.grouperMessageCustomProperties.TabIndex = 27; this.grouperMessageCustomProperties.CustomPaint += new System.Action(this.grouperMessageCustomProperties_CustomPaint); // + // messageCustomPropertyGrid + // + this.messageCustomPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.messageCustomPropertyGrid.BackColor = System.Drawing.SystemColors.Window; + this.messageCustomPropertyGrid.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText; + this.messageCustomPropertyGrid.HelpVisible = false; + this.messageCustomPropertyGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.messageCustomPropertyGrid.Location = new System.Drawing.Point(16, 32); + this.messageCustomPropertyGrid.Name = "messageCustomPropertyGrid"; + this.messageCustomPropertyGrid.Size = new System.Drawing.Size(281, 164); + this.messageCustomPropertyGrid.TabIndex = 1; + this.messageCustomPropertyGrid.ToolbarVisible = false; + // // tabPageDeadletter // this.tabPageDeadletter.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); @@ -1394,7 +1400,7 @@ private void InitializeComponent() '\"', '\'', '\''}; - this.txtDeadletterText.AutoScrollMinSize = new System.Drawing.Size(27, 14); + this.txtDeadletterText.AutoScrollMinSize = new System.Drawing.Size(2, 14); this.txtDeadletterText.BackBrush = null; this.txtDeadletterText.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtDeadletterText.CharHeight = 14; @@ -1498,6 +1504,21 @@ private void InitializeComponent() this.grouperDeadletterCustomProperties.TabIndex = 27; this.grouperDeadletterCustomProperties.CustomPaint += new System.Action(this.grouperDeadletterCustomProperties_CustomPaint); // + // deadletterCustomPropertyGrid + // + this.deadletterCustomPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.deadletterCustomPropertyGrid.BackColor = System.Drawing.SystemColors.Window; + this.deadletterCustomPropertyGrid.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText; + this.deadletterCustomPropertyGrid.HelpVisible = false; + this.deadletterCustomPropertyGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.deadletterCustomPropertyGrid.Location = new System.Drawing.Point(16, 32); + this.deadletterCustomPropertyGrid.Name = "deadletterCustomPropertyGrid"; + this.deadletterCustomPropertyGrid.Size = new System.Drawing.Size(281, 164); + this.deadletterCustomPropertyGrid.TabIndex = 2; + this.deadletterCustomPropertyGrid.ToolbarVisible = false; + // // tabPageTransferDeadletter // this.tabPageTransferDeadletter.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); @@ -1660,7 +1681,7 @@ private void InitializeComponent() '\"', '\'', '\''}; - this.txtTransferDeadletterText.AutoScrollMinSize = new System.Drawing.Size(27, 14); + this.txtTransferDeadletterText.AutoScrollMinSize = new System.Drawing.Size(2, 14); this.txtTransferDeadletterText.BackBrush = null; this.txtTransferDeadletterText.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtTransferDeadletterText.CharHeight = 14; @@ -1764,6 +1785,21 @@ private void InitializeComponent() this.grouperTransferDeadletterCustomProperties.TabIndex = 27; this.grouperTransferDeadletterCustomProperties.CustomPaint += new System.Action(this.grouperDeadletterCustomProperties_CustomPaint); // + // transferDeadletterCustomPropertyGrid + // + this.transferDeadletterCustomPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.transferDeadletterCustomPropertyGrid.BackColor = System.Drawing.SystemColors.Window; + this.transferDeadletterCustomPropertyGrid.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText; + this.transferDeadletterCustomPropertyGrid.HelpVisible = false; + this.transferDeadletterCustomPropertyGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.transferDeadletterCustomPropertyGrid.Location = new System.Drawing.Point(16, 32); + this.transferDeadletterCustomPropertyGrid.Name = "transferDeadletterCustomPropertyGrid"; + this.transferDeadletterCustomPropertyGrid.Size = new System.Drawing.Size(281, 164); + this.transferDeadletterCustomPropertyGrid.TabIndex = 3; + this.transferDeadletterCustomPropertyGrid.ToolbarVisible = false; + // // tabPageSessions // this.tabPageSessions.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); @@ -2256,51 +2292,6 @@ private void InitializeComponent() this.saveSelectedTransferDeadletteredMessagesBodyAsFileToolStripMenuItem.Text = "Save Selected Messages Text as File"; this.saveSelectedTransferDeadletteredMessagesBodyAsFileToolStripMenuItem.Click += new System.EventHandler(this.saveSelectedTransferDeadletteredMessagesBodyAsFileToolStripMenuItem_Click); // - // messageCustomPropertyGrid - // - this.messageCustomPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.messageCustomPropertyGrid.BackColor = System.Drawing.SystemColors.Window; - this.messageCustomPropertyGrid.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText; - this.messageCustomPropertyGrid.HelpVisible = false; - this.messageCustomPropertyGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - this.messageCustomPropertyGrid.Location = new System.Drawing.Point(16, 32); - this.messageCustomPropertyGrid.Name = "messageCustomPropertyGrid"; - this.messageCustomPropertyGrid.Size = new System.Drawing.Size(281, 164); - this.messageCustomPropertyGrid.TabIndex = 1; - this.messageCustomPropertyGrid.ToolbarVisible = false; - // - // deadletterCustomPropertyGrid - // - this.deadletterCustomPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.deadletterCustomPropertyGrid.BackColor = System.Drawing.SystemColors.Window; - this.deadletterCustomPropertyGrid.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText; - this.deadletterCustomPropertyGrid.HelpVisible = false; - this.deadletterCustomPropertyGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - this.deadletterCustomPropertyGrid.Location = new System.Drawing.Point(16, 32); - this.deadletterCustomPropertyGrid.Name = "deadletterCustomPropertyGrid"; - this.deadletterCustomPropertyGrid.Size = new System.Drawing.Size(281, 164); - this.deadletterCustomPropertyGrid.TabIndex = 2; - this.deadletterCustomPropertyGrid.ToolbarVisible = false; - // - // transferDeadletterCustomPropertyGrid - // - this.transferDeadletterCustomPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.transferDeadletterCustomPropertyGrid.BackColor = System.Drawing.SystemColors.Window; - this.transferDeadletterCustomPropertyGrid.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText; - this.transferDeadletterCustomPropertyGrid.HelpVisible = false; - this.transferDeadletterCustomPropertyGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - this.transferDeadletterCustomPropertyGrid.Location = new System.Drawing.Point(16, 32); - this.transferDeadletterCustomPropertyGrid.Name = "transferDeadletterCustomPropertyGrid"; - this.transferDeadletterCustomPropertyGrid.Size = new System.Drawing.Size(281, 164); - this.transferDeadletterCustomPropertyGrid.TabIndex = 3; - this.transferDeadletterCustomPropertyGrid.ToolbarVisible = false; - // // HandleQueueControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs index d2c4d31a..3713950d 100644 --- a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs @@ -61,16 +61,16 @@ public partial class HandleQueueControl : UserControl private const string SizeInGigabytes = "{0} GB"; //*************************** - // Indexes + // CheckListBox item texts //*************************** - private const int EnableBatchedOperationsIndex = 0; - private const int EnableDeadLetteringOnMessageExpirationIndex = 1; - private const int EnablePartitioningIndex = 2; - private const int EnableExpressIndex = 3; - private const int RequiresDuplicateDetectionIndex = 4; - private const int RequiresSessionIndex = 5; - private const int SupportOrderingIndex = 6; - private const int IsAnonymousAccessibleIndex = 7; + private const string EnableBatchedOperationsItemText = "Enable Batched Operations"; + private const string EnableDeadLetteringOnMessageExpirationItemText = "Enable Dead Lettering On Message Expiration"; + private const string EnablePartitioningItemText = "Enable Partitioning"; + private const string EnableExpressItemText = "Enable Express"; + private const string RequiresDuplicateDetectionItemText = "Requires Duplicate Detection"; + private const string RequiresSessionItemText = "Requires Session"; + private const string SupportOrderingItemText = "Enforce Message Ordering"; + private const string IsAnonymousAccessibleItemText = "Is Anonymous Accessible"; //*************************** // Texts @@ -106,7 +106,7 @@ public partial class HandleQueueControl : UserControl private const string DuplicateDetectionHistoryTimeWindow = "DuplicateDetectionHistoryTimeWindow"; private const string LockDuration = "LockDuration"; private const string AutoDeleteOnIdle = "AutoDeleteOnIdle"; - + private const string CannotForwardToItself = "The value of the ForwardTo property of the current queue cannot be set to itself."; @@ -238,6 +238,7 @@ public partial class HandleQueueControl : UserControl private readonly WriteToLogDelegate writeToLog = default!; private readonly string path = default!; private readonly List hiddenPages = new List(); + private readonly bool premiumNamespace; private BrokeredMessage brokeredMessage = default!; private BrokeredMessage deadletterMessage = default!; private BrokeredMessage transferDeadletterMessage = default!; @@ -269,6 +270,19 @@ public partial class HandleQueueControl : UserControl "SharedAccessKey" }; + + private static List QueueSettingsList = new List() + { + EnableBatchedOperationsItemText, + EnableDeadLetteringOnMessageExpirationItemText, + EnablePartitioningItemText, + EnableExpressItemText, + RequiresDuplicateDetectionItemText, + RequiresSessionItemText, + SupportOrderingItemText, + IsAnonymousAccessibleItemText + }; + private static readonly List Operators = new List { "ge", "gt", "le", "lt", "eq", "ne" }; private static readonly List TimeGranularityList = new List { "PT5M", "PT1H", "P1D", "P7D" }; @@ -284,11 +298,11 @@ public HandleQueueControl(WriteToLogDelegate writeToLog, ServiceBusHelper servic this.serviceBusHelper2 = serviceBusHelper.GetServiceBusHelper2(); this.path = path; this.queueDescription = queueDescription; + this.premiumNamespace = serviceBusHelper2.IsPremiumNamespace().GetAwaiter().GetResult(); InitializeComponent(); - InitializeControls(); + InitializeControls(initialCall: true); } - #endregion #region Public Events @@ -362,7 +376,7 @@ public async Task PurgeMessagesAsync() var count = await purger.Purge(); stopwatch.Stop(); MainForm.SingletonMainForm.refreshEntity_Click(null, null); - writeToLog($"[{count}] messages have been purged from the [{queueDescription.Path}] queue in [{stopwatch.ElapsedMilliseconds/1000}] seconds."); + writeToLog($"[{count}] messages have been purged from the [{queueDescription.Path}] queue in [{stopwatch.ElapsedMilliseconds / 1000}] seconds."); return count; } finally @@ -391,7 +405,7 @@ public async Task PurgeDeadletterQueueMessagesAsync() var count = await purger.Purge(purgeDeadLetterQueueInstead: true); stopwatch.Stop(); MainForm.SingletonMainForm.refreshEntity_Click(null, null); - writeToLog($"[{count}] messages have been purged from the deadletter queue of the [{queueDescription.Path}] queue in [{stopwatch.ElapsedMilliseconds/1000}] seconds."); + writeToLog($"[{count}] messages have been purged from the deadletter queue of the [{queueDescription.Path}] queue in [{stopwatch.ElapsedMilliseconds / 1000}] seconds."); return count; } finally @@ -525,16 +539,38 @@ public void GetMessageSessions() #region Private Methods - private void InitializeControls() + private void InitializeControls(bool initialCall) { trackBarMaxQueueSize.Maximum = serviceBusHelper.IsCloudNamespace ? 5 : 11; - - if (serviceBusHelper2.IsPremiumNamespace().GetAwaiter().GetResult()) + + if (this.premiumNamespace) { trackBarMaxQueueSize.Maximum = 80; trackBarMaxQueueSize.TickFrequency = 10; } + // This must only be done once per instance of this class + if (initialCall) + { + checkedListBox.Items.Clear(); + + foreach (string item in QueueSettingsList) + { + switch (item) + { + // Don't add some settings for premium and Service Bus Server namespaces + case EnablePartitioningItemText when this.premiumNamespace: + case EnableExpressItemText when this.premiumNamespace: + case IsAnonymousAccessibleItemText when serviceBusHelper.IsCloudNamespace: + break; + + default: + checkedListBox.Items.Add(item); + break; + } + } + } + // Splitter controls messagesSplitContainer.SplitterWidth = 16; sessionListStateSplitContainer.SplitterWidth = 16; @@ -557,15 +593,6 @@ private void InitializeControls() DisablePage(DeadletterTabPage); DisablePage(TransferDeadletterTabPage); - // IsAnonymousAccessible - if (serviceBusHelper.IsCloudNamespace) - { - if (checkedListBox.Items.Count > IsAnonymousAccessibleIndex) - { - checkedListBox.Items.RemoveAt(IsAnonymousAccessibleIndex); - } - } - // Set Grid style authorizationRulesDataGridView.EnableHeadersVisualStyles = false; @@ -1199,39 +1226,39 @@ private void InitializeData() tsAutoDeleteOnIdle.TimeSpanValue = queueDescription.AutoDeleteOnIdle; // EnableBatchedOperations - checkedListBox.SetItemChecked(EnableBatchedOperationsIndex, + checkedListBox.SetItemChecked(EnableBatchedOperationsItemText, queueDescription.EnableBatchedOperations); // EnableDeadLetteringOnMessageExpiration - checkedListBox.SetItemChecked(EnableDeadLetteringOnMessageExpirationIndex, + checkedListBox.SetItemChecked(EnableDeadLetteringOnMessageExpirationItemText, queueDescription.EnableDeadLetteringOnMessageExpiration); - if (serviceBusHelper.IsCloudNamespace) + if (serviceBusHelper.IsCloudNamespace && !this.premiumNamespace) { // EnablePartitioning - checkedListBox.SetItemChecked(EnablePartitioningIndex, queueDescription.EnablePartitioning); + checkedListBox.SetItemChecked(EnablePartitioningItemText, queueDescription.EnablePartitioning); // EnableExpress - checkedListBox.SetItemChecked(EnableExpressIndex, queueDescription.EnableExpress); + checkedListBox.SetItemChecked(EnableExpressItemText, queueDescription.EnableExpress); } // RequiresDuplicateDetection - checkedListBox.SetItemChecked(RequiresDuplicateDetectionIndex, + checkedListBox.SetItemChecked(RequiresDuplicateDetectionItemText, queueDescription.RequiresDuplicateDetection); // RequiresSession - checkedListBox.SetItemChecked(RequiresSessionIndex, + checkedListBox.SetItemChecked(RequiresSessionItemText, queueDescription.RequiresSession); // SupportOrdering - checkedListBox.SetItemChecked(SupportOrderingIndex, + checkedListBox.SetItemChecked(SupportOrderingItemText, queueDescription.SupportOrdering); // IsAnonymousAccessible if (!serviceBusHelper.IsCloudNamespace) { - checkedListBox.SetItemChecked(IsAnonymousAccessibleIndex, + checkedListBox.SetItemChecked(IsAnonymousAccessibleItemText, queueDescription.IsAnonymousAccessible); } } @@ -2104,23 +2131,22 @@ private async void btnCreateDelete_Click(object sender, EventArgs e) return; } } - - description.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); + + description.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsItemText); description.EnableDeadLetteringOnMessageExpiration = - checkedListBox.GetItemChecked(EnableDeadLetteringOnMessageExpirationIndex); - if (serviceBusHelper.IsCloudNamespace) - { - description.EnablePartitioning = checkedListBox.GetItemChecked(EnablePartitioningIndex); - description.EnableExpress = checkedListBox.GetItemChecked(EnableExpressIndex); - } + checkedListBox.GetItemChecked(EnableDeadLetteringOnMessageExpirationItemText); + + // The following two items are not shown on Premium namespaces + description.EnablePartitioning = checkedListBox.GetItemChecked(EnablePartitioningItemText, defaultValue: false); + description.EnableExpress = checkedListBox.GetItemChecked(EnableExpressItemText, defaultValue: false); + description.RequiresDuplicateDetection = - checkedListBox.GetItemChecked(RequiresDuplicateDetectionIndex); - description.RequiresSession = checkedListBox.GetItemChecked(RequiresSessionIndex); - description.SupportOrdering = checkedListBox.GetItemChecked(SupportOrderingIndex); - if (!serviceBusHelper.IsCloudNamespace) - { - description.IsAnonymousAccessible = checkedListBox.GetItemChecked(IsAnonymousAccessibleIndex); - } + checkedListBox.GetItemChecked(RequiresDuplicateDetectionItemText); + description.RequiresSession = checkedListBox.GetItemChecked(RequiresSessionItemText); + description.SupportOrdering = checkedListBox.GetItemChecked(SupportOrderingItemText); + + // The following item is only shown on Service Bus for Windows Server namespaces + description.IsAnonymousAccessible = checkedListBox.GetItemChecked(IsAnonymousAccessibleItemText, defaultValue: false); var bindingList = authorizationRulesBindingSource.DataSource as BindingList; @@ -2181,7 +2207,7 @@ private async void btnCreateDelete_Click(object sender, EventArgs e) queueDescription = serviceBusHelper.CreateQueue(description); - InitializeControls(); + InitializeControls(initialCall: false); } } catch (Exception ex) @@ -2209,19 +2235,19 @@ private void checkedListBox_ItemCheck(object sender, ItemCheckEventArgs e) { return; } - if (e.Index == EnablePartitioningIndex) + if (e.Index == checkedListBox.Items.IndexOf(EnablePartitioningItemText)) { e.NewValue = queueDescription.EnablePartitioning ? CheckState.Checked : CheckState.Unchecked; } - if (e.Index == RequiresSessionIndex) + if (e.Index == checkedListBox.Items.IndexOf(RequiresSessionItemText)) { e.NewValue = queueDescription.RequiresSession ? CheckState.Checked : CheckState.Unchecked; } - if (e.Index == RequiresDuplicateDetectionIndex) + if (e.Index == checkedListBox.Items.IndexOf(RequiresDuplicateDetectionItemText)) { e.NewValue = queueDescription.RequiresDuplicateDetection ? CheckState.Checked : CheckState.Unchecked; } - if (e.Index == IsAnonymousAccessibleIndex) + if (e.Index == checkedListBox.Items.IndexOf(IsAnonymousAccessibleItemText)) { e.NewValue = queueDescription.IsAnonymousAccessible ? CheckState.Checked : CheckState.Unchecked; } @@ -2324,19 +2350,16 @@ private void btnCancelUpdate_Click(object sender, EventArgs e) return; } } - + queueDescription.EnableBatchedOperations = - checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); - queueDescription.EnableExpress = checkedListBox.GetItemChecked(EnableExpressIndex); + checkedListBox.GetItemChecked(EnableBatchedOperationsItemText); + queueDescription.EnableExpress = checkedListBox.GetItemChecked(EnableExpressItemText, defaultValue: false); queueDescription.EnableDeadLetteringOnMessageExpiration = - checkedListBox.GetItemChecked(EnableDeadLetteringOnMessageExpirationIndex); - queueDescription.SupportOrdering = checkedListBox.GetItemChecked(SupportOrderingIndex); + checkedListBox.GetItemChecked(EnableDeadLetteringOnMessageExpirationItemText); + queueDescription.SupportOrdering = checkedListBox.GetItemChecked(SupportOrderingItemText); - if (!serviceBusHelper.IsCloudNamespace) - { - queueDescription.IsAnonymousAccessible = - checkedListBox.GetItemChecked(IsAnonymousAccessibleIndex); - } + queueDescription.IsAnonymousAccessible = + checkedListBox.GetItemChecked(IsAnonymousAccessibleItemText, defaultValue: false); var bindingList = authorizationRulesBindingSource.DataSource as BindingList; @@ -3009,7 +3032,7 @@ private void transferDeadletterDataGridView_RowEnter(object sender, DataGridView transferDeadletterCustomPropertyGrid.SelectedObject = new DictionaryPropertyGridAdapter(transferDeadletterMessage.Properties); } - + private void authorizationRulesDataGridView_Resize(object sender, EventArgs? e) { try diff --git a/src/ServiceBusExplorer/Controls/HandleTopicControl.Designer.cs b/src/ServiceBusExplorer/Controls/HandleTopicControl.Designer.cs index be3c6581..a99694b9 100644 --- a/src/ServiceBusExplorer/Controls/HandleTopicControl.Designer.cs +++ b/src/ServiceBusExplorer/Controls/HandleTopicControl.Designer.cs @@ -22,13 +22,16 @@ private void InitializeComponent() this.messagesBindingSource = new System.Windows.Forms.BindingSource(this.components); this.tabPageDescription = new System.Windows.Forms.TabPage(); this.grouperAutoDeleteOnIdle = new ServiceBusExplorer.Controls.Grouper(); + this.tsAutoDeleteOnIdle = new ServiceBusExplorer.Controls.TimeSpanControl(); this.groupergrouperDefaultMessageTimeToLive = new ServiceBusExplorer.Controls.Grouper(); + this.tsDefaultMessageTimeToLive = new ServiceBusExplorer.Controls.TimeSpanControl(); this.grouperTopicSettings = new ServiceBusExplorer.Controls.Grouper(); this.checkedListBox = new System.Windows.Forms.CheckedListBox(); this.grouperPath = new ServiceBusExplorer.Controls.Grouper(); this.lblRelativeURI = new System.Windows.Forms.Label(); this.txtPath = new System.Windows.Forms.TextBox(); this.grouperDuplicateDetectionHistoryTimeWindow = new ServiceBusExplorer.Controls.Grouper(); + this.tsDuplicateDetectionHistoryTimeWindow = new ServiceBusExplorer.Controls.TimeSpanControl(); this.grouperTopicProperties = new ServiceBusExplorer.Controls.Grouper(); this.lblMaxTopicSizeInGB = new System.Windows.Forms.Label(); this.trackBarMaxTopicSize = new ServiceBusExplorer.Controls.CustomTrackBar(); @@ -50,9 +53,6 @@ private void InitializeComponent() this.btnCreateDelete = new System.Windows.Forms.Button(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.authorizationRulesBindingSource = new System.Windows.Forms.BindingSource(this.components); - this.tsDefaultMessageTimeToLive = new ServiceBusExplorer.Controls.TimeSpanControl(); - this.tsDuplicateDetectionHistoryTimeWindow = new ServiceBusExplorer.Controls.TimeSpanControl(); - this.tsAutoDeleteOnIdle = new ServiceBusExplorer.Controls.TimeSpanControl(); ((System.ComponentModel.ISupportInitialize)(this.deadletterBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.sessionsBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.messagesBindingSource)).BeginInit(); @@ -103,7 +103,7 @@ private void InitializeComponent() this.grouperAutoDeleteOnIdle.GroupTitle = "Auto Delete On Idle"; this.grouperAutoDeleteOnIdle.Location = new System.Drawing.Point(16, 96); this.grouperAutoDeleteOnIdle.Name = "grouperAutoDeleteOnIdle"; - this.grouperAutoDeleteOnIdle.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); + this.grouperAutoDeleteOnIdle.Padding = new System.Windows.Forms.Padding(20); this.grouperAutoDeleteOnIdle.PaintGroupBox = true; this.grouperAutoDeleteOnIdle.RoundCorners = 4; this.grouperAutoDeleteOnIdle.ShadowColor = System.Drawing.Color.DarkGray; @@ -112,6 +112,14 @@ private void InitializeComponent() this.grouperAutoDeleteOnIdle.Size = new System.Drawing.Size(296, 80); this.grouperAutoDeleteOnIdle.TabIndex = 1; // + // tsAutoDeleteOnIdle + // + this.tsAutoDeleteOnIdle.Location = new System.Drawing.Point(13, 25); + this.tsAutoDeleteOnIdle.Name = "tsAutoDeleteOnIdle"; + this.tsAutoDeleteOnIdle.Size = new System.Drawing.Size(273, 42); + this.tsAutoDeleteOnIdle.TabIndex = 28; + this.tsAutoDeleteOnIdle.TimeSpanValue = null; + // // groupergrouperDefaultMessageTimeToLive // this.groupergrouperDefaultMessageTimeToLive.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); @@ -127,7 +135,7 @@ private void InitializeComponent() this.groupergrouperDefaultMessageTimeToLive.GroupTitle = "Default Message Time To Live"; this.groupergrouperDefaultMessageTimeToLive.Location = new System.Drawing.Point(328, 96); this.groupergrouperDefaultMessageTimeToLive.Name = "groupergrouperDefaultMessageTimeToLive"; - this.groupergrouperDefaultMessageTimeToLive.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); + this.groupergrouperDefaultMessageTimeToLive.Padding = new System.Windows.Forms.Padding(20); this.groupergrouperDefaultMessageTimeToLive.PaintGroupBox = true; this.groupergrouperDefaultMessageTimeToLive.RoundCorners = 4; this.groupergrouperDefaultMessageTimeToLive.ShadowColor = System.Drawing.Color.DarkGray; @@ -136,6 +144,14 @@ private void InitializeComponent() this.groupergrouperDefaultMessageTimeToLive.Size = new System.Drawing.Size(296, 80); this.groupergrouperDefaultMessageTimeToLive.TabIndex = 2; // + // tsDefaultMessageTimeToLive + // + this.tsDefaultMessageTimeToLive.Location = new System.Drawing.Point(13, 25); + this.tsDefaultMessageTimeToLive.Name = "tsDefaultMessageTimeToLive"; + this.tsDefaultMessageTimeToLive.Size = new System.Drawing.Size(273, 42); + this.tsDefaultMessageTimeToLive.TabIndex = 26; + this.tsDefaultMessageTimeToLive.TimeSpanValue = null; + // // grouperTopicSettings // this.grouperTopicSettings.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -153,7 +169,7 @@ private void InitializeComponent() this.grouperTopicSettings.GroupTitle = "Topic Settings"; this.grouperTopicSettings.Location = new System.Drawing.Point(328, 272); this.grouperTopicSettings.Name = "grouperTopicSettings"; - this.grouperTopicSettings.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); + this.grouperTopicSettings.Padding = new System.Windows.Forms.Padding(20); this.grouperTopicSettings.PaintGroupBox = true; this.grouperTopicSettings.RoundCorners = 4; this.grouperTopicSettings.ShadowColor = System.Drawing.Color.DarkGray; @@ -170,16 +186,8 @@ private void InitializeComponent() this.checkedListBox.CheckOnClick = true; this.checkedListBox.ForeColor = System.Drawing.SystemColors.WindowText; this.checkedListBox.FormattingEnabled = true; - this.checkedListBox.Items.AddRange(new object[] { - "Enable Batched Operations", - "Enable Filtering Messages Before Publishing", - "Enable Partitioning", - "Enable Express", - "Requires Duplicate Detection", - "Enforce Message Ordering", - "Is Anonymous Accessible"}); this.checkedListBox.Location = new System.Drawing.Point(16, 43); - this.checkedListBox.Margin = new System.Windows.Forms.Padding(8, 8, 8, 8); + this.checkedListBox.Margin = new System.Windows.Forms.Padding(8); this.checkedListBox.Name = "checkedListBox"; this.checkedListBox.Size = new System.Drawing.Size(264, 94); this.checkedListBox.TabIndex = 0; @@ -202,7 +210,7 @@ private void InitializeComponent() this.grouperPath.GroupTitle = "Path"; this.grouperPath.Location = new System.Drawing.Point(16, 8); this.grouperPath.Name = "grouperPath"; - this.grouperPath.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); + this.grouperPath.Padding = new System.Windows.Forms.Padding(20); this.grouperPath.PaintGroupBox = true; this.grouperPath.RoundCorners = 4; this.grouperPath.ShadowColor = System.Drawing.Color.DarkGray; @@ -247,7 +255,7 @@ private void InitializeComponent() this.grouperDuplicateDetectionHistoryTimeWindow.GroupTitle = "Duplicate Detection History Time Window"; this.grouperDuplicateDetectionHistoryTimeWindow.Location = new System.Drawing.Point(328, 184); this.grouperDuplicateDetectionHistoryTimeWindow.Name = "grouperDuplicateDetectionHistoryTimeWindow"; - this.grouperDuplicateDetectionHistoryTimeWindow.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); + this.grouperDuplicateDetectionHistoryTimeWindow.Padding = new System.Windows.Forms.Padding(20); this.grouperDuplicateDetectionHistoryTimeWindow.PaintGroupBox = true; this.grouperDuplicateDetectionHistoryTimeWindow.RoundCorners = 4; this.grouperDuplicateDetectionHistoryTimeWindow.ShadowColor = System.Drawing.Color.DarkGray; @@ -256,6 +264,14 @@ private void InitializeComponent() this.grouperDuplicateDetectionHistoryTimeWindow.Size = new System.Drawing.Size(296, 80); this.grouperDuplicateDetectionHistoryTimeWindow.TabIndex = 4; // + // tsDuplicateDetectionHistoryTimeWindow + // + this.tsDuplicateDetectionHistoryTimeWindow.Location = new System.Drawing.Point(13, 25); + this.tsDuplicateDetectionHistoryTimeWindow.Name = "tsDuplicateDetectionHistoryTimeWindow"; + this.tsDuplicateDetectionHistoryTimeWindow.Size = new System.Drawing.Size(273, 42); + this.tsDuplicateDetectionHistoryTimeWindow.TabIndex = 27; + this.tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue = null; + // // grouperTopicProperties // this.grouperTopicProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -278,7 +294,7 @@ private void InitializeComponent() this.grouperTopicProperties.GroupTitle = "Topic Properties"; this.grouperTopicProperties.Location = new System.Drawing.Point(16, 184); this.grouperTopicProperties.Name = "grouperTopicProperties"; - this.grouperTopicProperties.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); + this.grouperTopicProperties.Padding = new System.Windows.Forms.Padding(20); this.grouperTopicProperties.PaintGroupBox = true; this.grouperTopicProperties.RoundCorners = 4; this.grouperTopicProperties.ShadowColor = System.Drawing.Color.DarkGray; @@ -393,7 +409,7 @@ private void InitializeComponent() this.grouperTopicInformation.GroupTitle = "Topic Information"; this.grouperTopicInformation.Location = new System.Drawing.Point(640, 8); this.grouperTopicInformation.Name = "grouperTopicInformation"; - this.grouperTopicInformation.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); + this.grouperTopicInformation.Padding = new System.Windows.Forms.Padding(20); this.grouperTopicInformation.PaintGroupBox = true; this.grouperTopicInformation.RoundCorners = 4; this.grouperTopicInformation.ShadowColor = System.Drawing.Color.DarkGray; @@ -478,7 +494,7 @@ private void InitializeComponent() this.grouperAuthorizationRuleList.GroupTitle = "Authorization Rule List"; this.grouperAuthorizationRuleList.Location = new System.Drawing.Point(16, 8); this.grouperAuthorizationRuleList.Name = "grouperAuthorizationRuleList"; - this.grouperAuthorizationRuleList.Padding = new System.Windows.Forms.Padding(20, 20, 20, 20); + this.grouperAuthorizationRuleList.Padding = new System.Windows.Forms.Padding(20); this.grouperAuthorizationRuleList.PaintGroupBox = true; this.grouperAuthorizationRuleList.RoundCorners = 4; this.grouperAuthorizationRuleList.ShadowColor = System.Drawing.Color.DarkGray; @@ -592,30 +608,6 @@ private void InitializeComponent() this.btnCreateDelete.MouseEnter += new System.EventHandler(this.button_MouseEnter); this.btnCreateDelete.MouseLeave += new System.EventHandler(this.button_MouseLeave); // - // tsDefaultMessageTimeToLive - // - this.tsDefaultMessageTimeToLive.Location = new System.Drawing.Point(13, 25); - this.tsDefaultMessageTimeToLive.Name = "tsDefaultMessageTimeToLive"; - this.tsDefaultMessageTimeToLive.Size = new System.Drawing.Size(273, 42); - this.tsDefaultMessageTimeToLive.TabIndex = 26; - this.tsDefaultMessageTimeToLive.TimeSpanValue = null; - // - // tsDuplicateDetectionHistoryTimeWindow - // - this.tsDuplicateDetectionHistoryTimeWindow.Location = new System.Drawing.Point(13, 25); - this.tsDuplicateDetectionHistoryTimeWindow.Name = "tsDuplicateDetectionHistoryTimeWindow"; - this.tsDuplicateDetectionHistoryTimeWindow.Size = new System.Drawing.Size(273, 42); - this.tsDuplicateDetectionHistoryTimeWindow.TabIndex = 27; - this.tsDuplicateDetectionHistoryTimeWindow.TimeSpanValue = null; - // - // tsAutoDeleteOnIdle - // - this.tsAutoDeleteOnIdle.Location = new System.Drawing.Point(13, 25); - this.tsAutoDeleteOnIdle.Name = "tsAutoDeleteOnIdle"; - this.tsAutoDeleteOnIdle.Size = new System.Drawing.Size(273, 42); - this.tsAutoDeleteOnIdle.TabIndex = 28; - this.tsAutoDeleteOnIdle.TimeSpanValue = null; - // // HandleTopicControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/src/ServiceBusExplorer/Controls/HandleTopicControl.cs b/src/ServiceBusExplorer/Controls/HandleTopicControl.cs index 90b878ee..b5402a8a 100644 --- a/src/ServiceBusExplorer/Controls/HandleTopicControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleTopicControl.cs @@ -50,15 +50,15 @@ public partial class HandleTopicControl : UserControl private const string SizeInGigabytes = "{0} GB"; //*************************** - // Indexes + // CheckListBox item texts //*************************** - private const int EnableBatchedOperationsIndex = 0; - private const int EnableFilteringMessagesBeforePublishingIndex = 1; - private const int EnablePartitioningIndex = 2; - private const int EnableExpressIndex = 3; - private const int RequiresDuplicateDetectionIndex = 4; - private const int SupportOrderingIndex = 5; - private const int IsAnonymousAccessibleIndex = 6; + private const string EnableBatchedOperationsItemText = "Enable Batched Operations"; + private const string EnableFilteringMessagesBeforePublishingItemText = "Enable Filtering Messages Before Publishing"; + private const string EnablePartitioningItemText = "Enable Partitioning"; + private const string EnableExpressItemText = "Enable Express"; + private const string RequiresDuplicateDetectionItemText = "Requires Duplicate Detection"; + private const string SupportOrderingItemText = "Enforce Message Ordering"; + private const string IsAnonymousAccessibleItemText = "Is Anonymous Accessible"; //*************************** // Texts @@ -127,10 +127,22 @@ public partial class HandleTopicControl : UserControl private readonly ServiceBusHelper serviceBusHelper; private readonly ServiceBusHelper2 serviceBusHelper2 = default!; private readonly WriteToLogDelegate writeToLog; + private readonly bool premiumNamespace; private readonly string path; #endregion #region Private Static Fields + private static List topicSettingsList = new List() + { + EnableBatchedOperationsItemText, + EnableFilteringMessagesBeforePublishingItemText, + EnablePartitioningItemText, + EnableExpressItemText, + RequiresDuplicateDetectionItemText, + SupportOrderingItemText, + IsAnonymousAccessibleItemText + }; + private static readonly List claimTypes = new List { "NameIdentifier", "Upn", "Role", "SharedAccessKey" }; private static readonly List operators = new List { "ge", "gt", "le", "lt", "eq", "ne" }; private static readonly List timeGranularityList = new List { "PT5M", "PT1H", "P1D", "P7D" }; @@ -142,11 +154,12 @@ public HandleTopicControl(WriteToLogDelegate writeToLog, ServiceBusHelper servic this.writeToLog = writeToLog; this.serviceBusHelper = serviceBusHelper; this.serviceBusHelper2 = serviceBusHelper.GetServiceBusHelper2(); + this.premiumNamespace = serviceBusHelper2.IsPremiumNamespace().GetAwaiter().GetResult(); this.topicDescription = topicDescription; this.path = path; InitializeComponent(); - InitializeControls(); + InitializeControls(initialCall: true); } #endregion @@ -172,22 +185,35 @@ public void RefreshData(TopicDescription topic) #endregion #region Private Methods - private void InitializeControls() + private void InitializeControls(bool initialCall) { trackBarMaxTopicSize.Maximum = serviceBusHelper.IsCloudNamespace ? 5 : 11; - if (serviceBusHelper2.IsPremiumNamespace().GetAwaiter().GetResult()) + if (this.premiumNamespace) { trackBarMaxTopicSize.Maximum = 80; trackBarMaxTopicSize.TickFrequency = 10; } - // IsAnonymousAccessible - if (serviceBusHelper.IsCloudNamespace) + // This must only be done once per instance of this class + if (initialCall) { - if (checkedListBox.Items.Count > IsAnonymousAccessibleIndex) + checkedListBox.Items.Clear(); + + foreach (string item in topicSettingsList) { - checkedListBox.Items.RemoveAt(IsAnonymousAccessibleIndex); + switch (item) + { + // Don't add some settings for premium and Service Bus Server namespaces + case EnablePartitioningItemText when this.premiumNamespace: + case EnableExpressItemText when this.premiumNamespace: + case IsAnonymousAccessibleItemText when serviceBusHelper.IsCloudNamespace: + break; + + default: + checkedListBox.Items.Add(item); + break; + } } } @@ -390,34 +416,34 @@ private void InitializeData() tsAutoDeleteOnIdle.TimeSpanValue = topicDescription.AutoDeleteOnIdle; // EnableBatchedOperations - checkedListBox.SetItemChecked(EnableBatchedOperationsIndex, + checkedListBox.SetItemChecked(EnableBatchedOperationsItemText, topicDescription.EnableBatchedOperations); // EnableFilteringMessagesBeforePublishing - checkedListBox.SetItemChecked(EnableFilteringMessagesBeforePublishingIndex, + checkedListBox.SetItemChecked(EnableFilteringMessagesBeforePublishingItemText, topicDescription.EnableFilteringMessagesBeforePublishing); - if (serviceBusHelper.IsCloudNamespace) + if (serviceBusHelper.IsCloudNamespace && !this.premiumNamespace) { // EnablePartitioning - checkedListBox.SetItemChecked(EnablePartitioningIndex, topicDescription.EnablePartitioning); + checkedListBox.SetItemChecked(EnablePartitioningItemText, topicDescription.EnablePartitioning); // EnableExpress - checkedListBox.SetItemChecked(EnableExpressIndex, topicDescription.EnableExpress); + checkedListBox.SetItemChecked(EnableExpressItemText, topicDescription.EnableExpress); } // RequiresDuplicateDetection - checkedListBox.SetItemChecked(RequiresDuplicateDetectionIndex, + checkedListBox.SetItemChecked(RequiresDuplicateDetectionItemText, topicDescription.RequiresDuplicateDetection); // SupportOrdering - checkedListBox.SetItemChecked(SupportOrderingIndex, + checkedListBox.SetItemChecked(SupportOrderingItemText, topicDescription.SupportOrdering); // IsAnonymousAccessible if (!serviceBusHelper.IsCloudNamespace && topicDescription != null) { - checkedListBox.SetItemChecked(IsAnonymousAccessibleIndex, + checkedListBox.SetItemChecked(IsAnonymousAccessibleItemText, topicDescription.IsAnonymousAccessible); } } @@ -428,15 +454,15 @@ private void checkedListBox_ItemCheck(object sender, ItemCheckEventArgs e) { return; } - if (e.Index == EnablePartitioningIndex) + if (e.Index == checkedListBox.Items.IndexOf(EnablePartitioningItemText)) { e.NewValue = topicDescription.EnablePartitioning ? CheckState.Checked : CheckState.Unchecked; } - if (e.Index == RequiresDuplicateDetectionIndex) + if (e.Index == checkedListBox.Items.IndexOf(RequiresDuplicateDetectionItemText)) { e.NewValue = topicDescription.RequiresDuplicateDetection ? CheckState.Checked : CheckState.Unchecked; } - if (e.Index == IsAnonymousAccessibleIndex) + if (e.Index == checkedListBox.Items.IndexOf(IsAnonymousAccessibleItemText)) { e.NewValue = topicDescription.IsAnonymousAccessible ? CheckState.Checked : CheckState.Unchecked; } @@ -516,15 +542,14 @@ private async void btnCreateDelete_Click(object sender, EventArgs e) } } - description.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); - description.EnableFilteringMessagesBeforePublishing = checkedListBox.GetItemChecked(EnableFilteringMessagesBeforePublishingIndex); - if (serviceBusHelper.IsCloudNamespace) - { - description.EnablePartitioning = checkedListBox.GetItemChecked(EnablePartitioningIndex); - description.EnableExpress = checkedListBox.GetItemChecked(EnableExpressIndex); - } - description.RequiresDuplicateDetection = checkedListBox.GetItemChecked(RequiresDuplicateDetectionIndex); - description.SupportOrdering = checkedListBox.GetItemChecked(SupportOrderingIndex); + description.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsItemText); + description.EnableFilteringMessagesBeforePublishing = checkedListBox.GetItemChecked(EnableFilteringMessagesBeforePublishingItemText); + + description.EnablePartitioning = checkedListBox.GetItemChecked(EnablePartitioningItemText, defaultValue: false); + description.EnableExpress = checkedListBox.GetItemChecked(EnableExpressItemText, defaultValue: false); + + description.RequiresDuplicateDetection = checkedListBox.GetItemChecked(RequiresDuplicateDetectionItemText); + description.SupportOrdering = checkedListBox.GetItemChecked(SupportOrderingItemText); var bindingList = authorizationRulesBindingSource.DataSource as BindingList; if (bindingList != null) @@ -584,11 +609,11 @@ private async void btnCreateDelete_Click(object sender, EventArgs e) if (!serviceBusHelper.IsCloudNamespace) { - description.IsAnonymousAccessible = checkedListBox.GetItemChecked(IsAnonymousAccessibleIndex); + description.IsAnonymousAccessible = checkedListBox.GetItemChecked(IsAnonymousAccessibleItemText); } topicDescription = serviceBusHelper.CreateTopic(description); - InitializeControls(); + InitializeControls(initialCall: false); } } catch (Exception ex) @@ -664,15 +689,11 @@ private void btnCancelUpdate_Click(object sender, EventArgs e) } } - topicDescription.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsIndex); - topicDescription.EnableExpress = checkedListBox.GetItemChecked(EnableExpressIndex); - topicDescription.EnableFilteringMessagesBeforePublishing = checkedListBox.GetItemChecked(EnableFilteringMessagesBeforePublishingIndex); - topicDescription.SupportOrdering = checkedListBox.GetItemChecked(SupportOrderingIndex); - - if (!serviceBusHelper.IsCloudNamespace) - { - topicDescription.IsAnonymousAccessible = checkedListBox.GetItemChecked(IsAnonymousAccessibleIndex); - } + topicDescription.EnableBatchedOperations = checkedListBox.GetItemChecked(EnableBatchedOperationsItemText); + topicDescription.EnableExpress = checkedListBox.GetItemChecked(EnableExpressItemText, defaultValue: false); + topicDescription.EnableFilteringMessagesBeforePublishing = checkedListBox.GetItemChecked(EnableFilteringMessagesBeforePublishingItemText); + topicDescription.SupportOrdering = checkedListBox.GetItemChecked(SupportOrderingItemText); + topicDescription.IsAnonymousAccessible = checkedListBox.GetItemChecked(IsAnonymousAccessibleItemText, defaultValue: false); var bindingList = authorizationRulesBindingSource.DataSource as BindingList; if (bindingList != null) @@ -748,7 +769,7 @@ private void btnCancelUpdate_Click(object sender, EventArgs e) { topicDescription.Status = EntityStatus.Active; topicDescription = serviceBusHelper.NamespaceManager.UpdateTopic(topicDescription); - InitializeControls(); + InitializeControls(initialCall: false); } } } diff --git a/src/ServiceBusExplorer/ServiceBusExplorer.csproj b/src/ServiceBusExplorer/ServiceBusExplorer.csproj index 140e6d61..5bc77de5 100644 --- a/src/ServiceBusExplorer/ServiceBusExplorer.csproj +++ b/src/ServiceBusExplorer/ServiceBusExplorer.csproj @@ -401,6 +401,7 @@ AboutForm.cs + diff --git a/src/ServiceBusExplorer/UIHelpers/CheckistBoxExtensions.cs b/src/ServiceBusExplorer/UIHelpers/CheckistBoxExtensions.cs new file mode 100644 index 00000000..f12c6482 --- /dev/null +++ b/src/ServiceBusExplorer/UIHelpers/CheckistBoxExtensions.cs @@ -0,0 +1,68 @@ +#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; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +#endregion +namespace ServiceBusExplorer.UIHelpers +{ + public static class CheckistBoxExtensions + { + public static bool GetItemChecked(this CheckedListBox listBox, string itemText) + { + int index = GetIndex(listBox, itemText); + + return listBox.GetItemChecked(index); + } + + public static bool GetItemChecked(this CheckedListBox listBox, string itemText, bool defaultValue) + { + int index = listBox.Items.IndexOf(itemText); + + if (index < 0 || index > listBox.Items.Count - 1) return defaultValue; + + return listBox.GetItemChecked(index); + } + + public static void SetItemChecked(this CheckedListBox listBox, string itemText, bool value) + { + int index = GetIndex(listBox, itemText); + + listBox.SetItemChecked(index, value); + } + + private static int GetIndex(CheckedListBox listBox, string itemText) + { + int index = listBox.Items.IndexOf(itemText); + + if (index < 0 || index > listBox.Items.Count - 1) + { + throw new ArgumentException($"{itemText} does not exist the listbox"); + } + + return index; + } + } +} From 3a690ea069cc9bb9d9e4815c4aeb1004c9d65335 Mon Sep 17 00:00:00 2001 From: Erik Mogensen Date: Fri, 19 Feb 2021 12:19:14 +0100 Subject: [PATCH 18/18] Refresh entities after resubmit (#511) * Refactored refreshEntity_Click * Refactored the refresh of the selected queue node * Renamed GetEntities -> ShowEntities * Refactored the refresh of the selected queue node * Autotformatted * Moved RefreshQueueNode * Added updating of target and source queue/topic * Removed commented code * Rearragned usings * Minor cleanup and changing three calls to async * Changed null check * Used C# 7 features to increase readability --- src/ServiceBus/Helpers/ServiceBusHelper2.cs | 12 + .../Controls/HandleQueueControl.cs | 12 +- .../Controls/HandleSubscriptionControl.cs | 6 +- .../Controls/TestQueueControl.cs | 2 +- .../Controls/TestSubscriptionControl.cs | 2 +- .../Controls/TestTopicControl.cs | 2 +- src/ServiceBusExplorer/Forms/MainForm.cs | 2577 ++++++++--------- src/ServiceBusExplorer/Forms/MessageForm.cs | 18 +- 8 files changed, 1281 insertions(+), 1350 deletions(-) diff --git a/src/ServiceBus/Helpers/ServiceBusHelper2.cs b/src/ServiceBus/Helpers/ServiceBusHelper2.cs index 54ed2ac6..4be0d2b9 100644 --- a/src/ServiceBus/Helpers/ServiceBusHelper2.cs +++ b/src/ServiceBus/Helpers/ServiceBusHelper2.cs @@ -39,5 +39,17 @@ public async Task IsPremiumNamespace() return namespaceProperties.MessagingSku == MessagingSku.Premium; } + + public async Task IsQueue(string name) + { + var administrationClient = new ServiceBusAdministrationClient(ConnectionString); + return await administrationClient.QueueExistsAsync(name).ConfigureAwait(false); + } + + public async Task IsTopic(string name) + { + var administrationClient = new ServiceBusAdministrationClient(ConnectionString); + return await administrationClient.TopicExistsAsync(name).ConfigureAwait(false); + } } } diff --git a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs index 3713950d..eccb6106 100644 --- a/src/ServiceBusExplorer/Controls/HandleQueueControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleQueueControl.cs @@ -375,8 +375,9 @@ public async Task PurgeMessagesAsync() var purger = new ServiceBusPurger(serviceBusHelper.GetServiceBusHelper2(), queueProperties); var count = await purger.Purge(); stopwatch.Stop(); - MainForm.SingletonMainForm.refreshEntity_Click(null, null); - writeToLog($"[{count}] messages have been purged from the [{queueDescription.Path}] queue in [{stopwatch.ElapsedMilliseconds / 1000}] seconds."); + MainForm.SingletonMainForm.RefreshSelectedEntity(); + writeToLog($"[{count}] messages have been purged from the [{queueDescription.Path}] queue in [{stopwatch.ElapsedMilliseconds/1000}] seconds."); + return count; } finally @@ -404,8 +405,9 @@ public async Task PurgeDeadletterQueueMessagesAsync() var purger = new ServiceBusPurger(serviceBusHelper.GetServiceBusHelper2(), newSdkQueueDescription); var count = await purger.Purge(purgeDeadLetterQueueInstead: true); stopwatch.Stop(); - MainForm.SingletonMainForm.refreshEntity_Click(null, null); - writeToLog($"[{count}] messages have been purged from the deadletter queue of the [{queueDescription.Path}] queue in [{stopwatch.ElapsedMilliseconds / 1000}] seconds."); + MainForm.SingletonMainForm.RefreshSelectedEntity(); + writeToLog($"[{count}] messages have been purged from the deadletter queue of the [{queueDescription.Path}] queue in [{stopwatch.ElapsedMilliseconds/1000}] seconds."); + return count; } finally @@ -3417,7 +3419,7 @@ async void deleteSelectedMessagesToolStripMenuItem_Click(object sender, EventArg Application.UseWaitCursor = false; } - MainForm.SingletonMainForm.refreshEntity_Click(null, null); + MainForm.SingletonMainForm.RefreshSelectedEntity(); } private void deadletterDataGridView_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) diff --git a/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs b/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs index 97bd8ae5..812e719e 100644 --- a/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleSubscriptionControl.cs @@ -381,7 +381,7 @@ public async Task PurgeMessagesAsync() var purger = new ServiceBusPurger(serviceBusHelper.GetServiceBusHelper2(), subscriptionProperties); var count = await purger.Purge(); stopwatch.Stop(); - MainForm.SingletonMainForm.refreshEntity_Click(null, null); + MainForm.SingletonMainForm.RefreshSelectedEntity(); var entityPath = SubscriptionClient.FormatSubscriptionPath(subscriptionWrapper.SubscriptionDescription.TopicPath, subscriptionWrapper.SubscriptionDescription.Name); writeToLog($"[{count}] messages have been purged from the [{entityPath}] subscription in [{stopwatch.ElapsedMilliseconds/1000}] seconds."); @@ -413,7 +413,7 @@ public async Task PurgeDeadletterQueueMessagesAsync() stopwatch.Stop(); var entityPath = SubscriptionClient.FormatSubscriptionPath(subscriptionWrapper.SubscriptionDescription.TopicPath, subscriptionWrapper.SubscriptionDescription.Name); - MainForm.SingletonMainForm.refreshEntity_Click(null, null); + MainForm.SingletonMainForm.RefreshSelectedEntity(); writeToLog($"[{count}] messages have been purged from the deadletter queue of the [{entityPath}] subscription in [{stopwatch.ElapsedMilliseconds/1000}] seconds."); return count; } @@ -2291,7 +2291,7 @@ async void deleteSelectedMessagesToolStripMenuItem_Click(object sender, EventArg Application.UseWaitCursor = false; } - MainForm.SingletonMainForm.refreshEntity_Click(null, null); + MainForm.SingletonMainForm.RefreshSelectedEntity(); } private void deadletterDataGridView_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) diff --git a/src/ServiceBusExplorer/Controls/TestQueueControl.cs b/src/ServiceBusExplorer/Controls/TestQueueControl.cs index 8a6dc3e7..38eff62d 100644 --- a/src/ServiceBusExplorer/Controls/TestQueueControl.cs +++ b/src/ServiceBusExplorer/Controls/TestQueueControl.cs @@ -622,7 +622,7 @@ private async void btnStart_Click(object sender, EventArgs e) Invoke((MethodInvoker) delegate { btnStart.Text = StartCaption; - MainForm.SingletonMainForm.refreshEntity_Click(null, null); + MainForm.SingletonMainForm.RefreshSelectedEntity(); }); } }; diff --git a/src/ServiceBusExplorer/Controls/TestSubscriptionControl.cs b/src/ServiceBusExplorer/Controls/TestSubscriptionControl.cs index 1ff023b6..6907c057 100644 --- a/src/ServiceBusExplorer/Controls/TestSubscriptionControl.cs +++ b/src/ServiceBusExplorer/Controls/TestSubscriptionControl.cs @@ -315,7 +315,7 @@ private async void btnStart_Click(object sender, EventArgs e) Invoke((MethodInvoker) delegate { btnStart.Text = StartCaption; - MainForm.SingletonMainForm.refreshEntity_Click(null, null); + MainForm.SingletonMainForm.RefreshSelectedEntity(); }); } }; diff --git a/src/ServiceBusExplorer/Controls/TestTopicControl.cs b/src/ServiceBusExplorer/Controls/TestTopicControl.cs index 0034b1f4..96138fee 100644 --- a/src/ServiceBusExplorer/Controls/TestTopicControl.cs +++ b/src/ServiceBusExplorer/Controls/TestTopicControl.cs @@ -605,7 +605,7 @@ private async void btnStart_Click(object sender, EventArgs e) Invoke((MethodInvoker) delegate { btnStart.Text = StartCaption; - MainForm.SingletonMainForm.refreshEntity_Click(null, null); + MainForm.SingletonMainForm.RefreshSelectedEntity(); }); } }; diff --git a/src/ServiceBusExplorer/Forms/MainForm.cs b/src/ServiceBusExplorer/Forms/MainForm.cs index 429c3514..cba9be0b 100644 --- a/src/ServiceBusExplorer/Forms/MainForm.cs +++ b/src/ServiceBusExplorer/Forms/MainForm.cs @@ -20,14 +20,13 @@ #endregion #region Using Directives - using Microsoft.Azure.NotificationHubs; +using Microsoft.ServiceBus.Messaging; using ServiceBusExplorer.Controls; using ServiceBusExplorer.Enums; using ServiceBusExplorer.Helpers; using ServiceBusExplorer.UIHelpers; using ServiceBusExplorer.Utilities.Helpers; -using Microsoft.ServiceBus.Messaging; using System; using System.Collections; using System.Collections.Concurrent; @@ -41,6 +40,7 @@ using System.Linq; using System.Net; using System.Reflection; +using System.Text.RegularExpressions; using System.Runtime.Serialization; using System.Text; using System.Threading; @@ -50,8 +50,6 @@ namespace ServiceBusExplorer.Forms { - using System.Text.RegularExpressions; - public partial class MainForm : Form { #region Private Constants @@ -161,7 +159,6 @@ public partial class MainForm : Form private const string ImportToolStripMenuItemToolTipText = "Import entity definition from file."; private const string EventClick = "EventClick"; private const string EventsProperty = "Events"; - private const string ChangeStatusQueueMenuItem = "changeStatusQueueMenuItem"; private const string ChangeStatusTopicMenuItem = "changeStatusTopicMenuItem"; private const string ChangeStatusSubscriptionMenuItem = "changeStatusSubscriptionMenuItem"; private const string ChangeStatusEventHubMenuItem = "changeStatusEventHubMenuItem"; @@ -349,7 +346,7 @@ private void SavedConnectionToolStripMenuItem_Click(object sender, EventArgs e) } panelMain.Controls.Clear(); panelMain.BackColor = SystemColors.Window; - GetEntities(EntityType.All); + ShowEntities(EntityType.All); } /// @@ -468,7 +465,7 @@ private void optionsToolStripMenuItem_Click(object sender, EventArgs e) } if (reloadEntities) { - GetEntities(EntityType.All); + ShowEntities(EntityType.All); } UseAscii = optionForm.MainSettings.UseAscii; @@ -482,7 +479,7 @@ private void optionsToolStripMenuItem_Click(object sender, EventArgs e) MessageContentType = optionForm.MainSettings.MessageContentType; SelectedEntities = optionForm.MainSettings.SelectedEntities; - + messageBodyType = optionForm.MainSettings.MessageBodyType; ServiceBusHelper.ConnectivityMode = optionForm.MainSettings.ConnectivityMode; ServiceBusHelper.UseAmqpWebSockets = optionForm.MainSettings.UseAmqpWebSockets; @@ -545,7 +542,7 @@ void MainForm_OnRefresh() { serviceBusTreeView.SelectedNode = currentNode; currentNode.EnsureVisible(); - refreshEntity_Click(null, null); + RefreshSelectedEntity(); } } @@ -604,7 +601,7 @@ void serviceBusHelper_OnDelete(ServiceBusHelperEventArgs args) } else { - GetEntities(EntityType.Queue); + ShowEntities(EntityType.Queue); } serviceBusTreeView.SelectedNode = queueListNode; queueListNode.EnsureVisible(); @@ -634,7 +631,7 @@ void serviceBusHelper_OnDelete(ServiceBusHelperEventArgs args) } else { - GetEntities(EntityType.Topic); + ShowEntities(EntityType.Topic); } serviceBusTreeView.SelectedNode = topicListNode; topicListNode.EnsureVisible(); @@ -664,7 +661,7 @@ void serviceBusHelper_OnDelete(ServiceBusHelperEventArgs args) } else { - GetEntities(EntityType.Relay); + ShowEntities(EntityType.Relay); } serviceBusTreeView.SelectedNode = relayListNode; relayListNode.EnsureVisible(); @@ -694,7 +691,7 @@ void serviceBusHelper_OnDelete(ServiceBusHelperEventArgs args) } else { - GetEntities(EntityType.EventHub); + ShowEntities(EntityType.EventHub); } serviceBusTreeView.SelectedNode = eventHubListNode; eventHubListNode.EnsureVisible(); @@ -724,7 +721,7 @@ void serviceBusHelper_OnDelete(ServiceBusHelperEventArgs args) } else { - GetEntities(EntityType.NotificationHub); + ShowEntities(EntityType.NotificationHub); } serviceBusTreeView.SelectedNode = notificationHubListNode; notificationHubListNode.EnsureVisible(); @@ -742,7 +739,7 @@ void serviceBusHelper_OnDelete(ServiceBusHelperEventArgs args) var topicNode = FindNode(subscription.TopicPath, topicListNode); if (topicNode == null) { - GetEntities(EntityType.Topic); + ShowEntities(EntityType.Topic); return; } if (topicNode.Nodes.ContainsKey(SubscriptionEntities)) @@ -768,19 +765,19 @@ void serviceBusHelper_OnDelete(ServiceBusHelperEventArgs args) } else { - GetEntities(EntityType.Topic); + ShowEntities(EntityType.Topic); return; } } else { - GetEntities(EntityType.Topic); + ShowEntities(EntityType.Topic); return; } } else { - GetEntities(EntityType.Topic); + ShowEntities(EntityType.Topic); return; } serviceBusTreeView.SelectedNode = null; @@ -800,7 +797,7 @@ void serviceBusHelper_OnDelete(ServiceBusHelperEventArgs args) var topicNode = FindNode(wrapper.SubscriptionDescription.TopicPath, topicListNode); if (topicNode == null) { - GetEntities(EntityType.Topic); + ShowEntities(EntityType.Topic); return; } if (topicNode.Nodes.ContainsKey(SubscriptionEntities)) @@ -833,25 +830,25 @@ void serviceBusHelper_OnDelete(ServiceBusHelperEventArgs args) } else { - GetEntities(EntityType.Topic); + ShowEntities(EntityType.Topic); return; } } else { - GetEntities(EntityType.Topic); + ShowEntities(EntityType.Topic); return; } } else { - GetEntities(EntityType.Topic); + ShowEntities(EntityType.Topic); return; } } else { - GetEntities(EntityType.Topic); + ShowEntities(EntityType.Topic); return; } serviceBusTreeView.SelectedNode = null; @@ -861,13 +858,12 @@ void serviceBusHelper_OnDelete(ServiceBusHelperEventArgs args) { var eventHubListNode = FindNode(Constants.EventHubEntities, rootNode); var notificationHub = args.EntityInstance as ConsumerGroupDescription; - if (notificationHub != null && - !string.IsNullOrWhiteSpace(notificationHub.EventHubPath)) + if (!string.IsNullOrWhiteSpace(notificationHub?.EventHubPath)) { var eventHubNode = FindNode(notificationHub.EventHubPath, eventHubListNode); if (eventHubNode == null) { - GetEntities(EntityType.EventHub); + ShowEntities(EntityType.EventHub); return; } if (eventHubNode.Nodes.ContainsKey(ConsumerGroupEntities)) @@ -893,19 +889,19 @@ void serviceBusHelper_OnDelete(ServiceBusHelperEventArgs args) } else { - GetEntities(EntityType.EventHub); + ShowEntities(EntityType.EventHub); return; } } else { - GetEntities(EntityType.EventHub); + ShowEntities(EntityType.EventHub); return; } } else { - GetEntities(EntityType.EventHub); + ShowEntities(EntityType.EventHub); return; } serviceBusTreeView.SelectedNode = null; @@ -933,6 +929,7 @@ void serviceBusHelper_OnCreate(ServiceBusHelperEventArgs args) { serviceBusTreeView.SuspendDrawing(); serviceBusTreeView.SuspendLayout(); + // QueueDescription Entity if (args.EntityType == EntityType.Queue) { @@ -960,6 +957,7 @@ void serviceBusHelper_OnCreate(ServiceBusHelperEventArgs args) } return; } + // TopicDescription Entity if (args.EntityType == EntityType.Topic) { @@ -987,6 +985,7 @@ void serviceBusHelper_OnCreate(ServiceBusHelperEventArgs args) } return; } + // RelayDescription Entity if (args.EntityType == EntityType.Relay) { @@ -1014,6 +1013,7 @@ void serviceBusHelper_OnCreate(ServiceBusHelperEventArgs args) } return; } + // EventHubDescription Entity if (args.EntityType == EntityType.EventHub) { @@ -1068,6 +1068,7 @@ void serviceBusHelper_OnCreate(ServiceBusHelperEventArgs args) } return; } + // SubscriptionDescription Entity if (args.EntityType == EntityType.Subscription) { @@ -1129,13 +1130,13 @@ void serviceBusHelper_OnCreate(ServiceBusHelperEventArgs args) } return; } + // RuleDescription Entity if (args.EntityType == EntityType.Rule) { var wrapper = args.EntityInstance as RuleWrapper; - if (wrapper == null || - wrapper.SubscriptionDescription == null || - wrapper.RuleDescription == null) + if (wrapper?.SubscriptionDescription == null || + wrapper?.RuleDescription == null) { return; } @@ -1360,7 +1361,7 @@ private void aboutToolStripMenuItem_Click(object sender, EventArgs e) private void displayHelpToolStripMenuItem_Click(object sender, EventArgs e) { - CommandLineOptions.ProcessCommandLineArguments(new string[]{"--help"}, out var argument, out var value, out var helpText); + CommandLineOptions.ProcessCommandLineArguments(new[] { "--help" }, out _, out _, out var helpText); WriteToLog(helpText); } @@ -1389,7 +1390,7 @@ private void connectToolStripMenuItem_Click(object sender, EventArgs e) } panelMain.Controls.Clear(); panelMain.BackColor = SystemColors.Window; - GetEntities(EntityType.All); + ShowEntities(EntityType.All); } } catch (Exception ex) @@ -1426,7 +1427,7 @@ private void serviceBusTreeView_NodeMouseClick(object sender, TreeNodeMouseClick private void refreshEntityMenuItem_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; - GetEntities(EntityType.All); + ShowEntities(EntityType.All); Cursor.Current = Cursors.Default; } @@ -1530,9 +1531,8 @@ private void exportEntity_Click(object sender, EventArgs e) return; } // Url Segment Node - if (serviceBusTreeView.SelectedNode.Tag is UrlSegmentWrapper) + if (serviceBusTreeView.SelectedNode.Tag is UrlSegmentWrapper urlSegmentWrapper) { - var urlSegmentWrapper = serviceBusTreeView.SelectedNode.Tag as UrlSegmentWrapper; if (urlSegmentWrapper.EntityType == EntityType.Queue) { var queueList = new List(); @@ -1559,44 +1559,44 @@ private void exportEntity_Click(object sender, EventArgs e) } return; } + // Queue Node - if (serviceBusTreeView.SelectedNode.Tag is QueueDescription) + if (serviceBusTreeView.SelectedNode.Tag is QueueDescription queueDescription) { - var queueDescription = serviceBusTreeView.SelectedNode.Tag as QueueDescription; ExportEntities(new List { queueDescription }, queueDescription.Path, QueueEntity); return; } + // Topic Node - if (serviceBusTreeView.SelectedNode.Tag is TopicDescription) + if (serviceBusTreeView.SelectedNode.Tag is TopicDescription topicDescription) { - var topicDescription = serviceBusTreeView.SelectedNode.Tag as TopicDescription; ExportEntities(new List { topicDescription }, topicDescription.Path, TopicEntity); } + // Relay Node - if (serviceBusTreeView.SelectedNode.Tag is RelayDescription) + if (serviceBusTreeView.SelectedNode.Tag is RelayDescription relayDescription) { - var relayDescription = serviceBusTreeView.SelectedNode.Tag as RelayDescription; ExportEntities(new List { relayDescription }, relayDescription.Path, RelayEntity); return; } + // EventHub Node - if (serviceBusTreeView.SelectedNode.Tag is EventHubDescription) + if (serviceBusTreeView.SelectedNode.Tag is EventHubDescription eventHubDescription) { - var eventHubDescription = serviceBusTreeView.SelectedNode.Tag as EventHubDescription; ExportEntities(new List { eventHubDescription }, eventHubDescription.Path, EventHubEntity); } + // NotificationHub Node - if (serviceBusTreeView.SelectedNode.Tag is NotificationHubDescription) + if (serviceBusTreeView.SelectedNode.Tag is NotificationHubDescription notificationHubDescription) { - var notificationHubDescription = serviceBusTreeView.SelectedNode.Tag as NotificationHubDescription; ExportEntities(new List { notificationHubDescription }, notificationHubDescription.Path, NotificationHubEntity); @@ -1653,9 +1653,8 @@ private void renameEntity_Click(object sender, EventArgs e) Cursor.Current = Cursors.WaitCursor; // Queue Node - if (serviceBusTreeView.SelectedNode.Tag is QueueDescription) + if (serviceBusTreeView.SelectedNode.Tag is QueueDescription queueDescription) { - var queueDescription = serviceBusTreeView.SelectedNode.Tag as QueueDescription; using (var parameterForm = new ParameterForm($"Enter a new name for the {queueDescription.Path} queue.", new List { "Name" }, new List { queueDescription.Path }, @@ -1671,9 +1670,8 @@ private void renameEntity_Click(object sender, EventArgs e) } // Topic Node - if (serviceBusTreeView.SelectedNode.Tag is TopicDescription) + if (serviceBusTreeView.SelectedNode.Tag is TopicDescription topicDescription) { - var topicDescription = serviceBusTreeView.SelectedNode.Tag as TopicDescription; using (var parameterForm = new ParameterForm($"Enter a new name for the {topicDescription.Path} topic.", new List { "Name" }, new List { topicDescription.Path }, @@ -1698,570 +1696,637 @@ private void renameEntity_Click(object sender, EventArgs e) } // ReSharper disable once FunctionComplexityOverflow - public void refreshEntity_Click(object sender, EventArgs e) + private void refreshEntity_Click(object sender, EventArgs e) + { + RefreshSelectedEntity(); + } + + private void RefreshIndividualSubscription(SubscriptionDescription subscriptionDescription, TreeNode subscriptionNode) + { + var rules = serviceBusHelper.GetRules(subscriptionDescription); + var ruleDescriptions = rules as RuleDescription[] ?? rules.ToArray(); + if (!ruleDescriptions.Any()) + { + subscriptionNode.Nodes.Clear(); + return; + } + var subscriptionNodeWasExpanded = subscriptionNode.IsExpanded; + var rulesNodeWasExpanded = subscriptionNode.Nodes.Count > 0 && subscriptionNode.Nodes[0].IsExpanded; + subscriptionNode.Nodes.Clear(); + var rulesNode = subscriptionNode.Nodes.Add(RuleEntities, RuleEntities, RuleListIconIndex, RuleListIconIndex); + rulesNode.ContextMenuStrip = rulesContextMenuStrip; + rulesNode.Tag = new RuleWrapper(null, subscriptionDescription); + foreach (var rule in ruleDescriptions) + { + var ruleNode = rulesNode.Nodes.Add(rule.Name, rule.Name, RuleIconIndex, RuleIconIndex); + ruleNode.ContextMenuStrip = ruleContextMenuStrip; + ruleNode.Tag = new RuleWrapper(rule, subscriptionDescription); + WriteToLog(string.Format(CultureInfo.CurrentCulture, RuleRetrievedFormat, rule.Name, subscriptionDescription.Name, subscriptionDescription.TopicPath), false); + } + if (rulesNodeWasExpanded) + rulesNode.Expand(); + if (subscriptionNodeWasExpanded) + subscriptionNode.Expand(); + } + + private void RefreshIndividualTopic(TreeNode selectedNode) + { + var wasTopicNodeExpanded = selectedNode.IsExpanded; + + var topicDescription = selectedNode.Tag as TopicDescription; + + var subscriptions = serviceBusHelper.GetSubscriptions(topicDescription, null); + var subscriptionDescriptions = subscriptions as IList ?? subscriptions.ToList(); + + if (!subscriptionDescriptions.Any()) + { + selectedNode.Nodes.Clear(); + return; + } + + selectedNode.Nodes.Clear(); + var subscriptionsNode = selectedNode.Nodes.Add(SubscriptionEntities, SubscriptionEntities, SubscriptionListIconIndex, SubscriptionListIconIndex); + subscriptionsNode.Text = string.IsNullOrWhiteSpace(FilterExpressionHelper.SubscriptionFilterExpression) ? SubscriptionEntities : FilteredSubscriptionEntities; + subscriptionsNode.ContextMenuStrip = subscriptionsContextMenuStrip; + subscriptionsNode.Tag = new SubscriptionWrapper(null, topicDescription, FilterExpressionHelper.SubscriptionFilterExpression); + foreach (var subscriptionDescription in subscriptionDescriptions) + { + var subscriptionNode = subscriptionsNode.Nodes.Add(subscriptionDescription.Name, + GetNameAndMessageCountText(subscriptionDescription.Name, subscriptionDescription.MessageCountDetails), + subscriptionDescription.Status == EntityStatus.Active ? SubscriptionIconIndex : GreySubscriptionIconIndex, + subscriptionDescription.Status == EntityStatus.Active ? SubscriptionIconIndex : GreySubscriptionIconIndex); + subscriptionNode.ContextMenuStrip = subscriptionContextMenuStrip; + subscriptionNode.Tag = new SubscriptionWrapper(subscriptionDescription, topicDescription); + if (topicDescription != null) + { + WriteToLog(string.Format(CultureInfo.CurrentCulture, SubscriptionRetrievedFormat, subscriptionDescription.Name, topicDescription.Path), false); + } + + RefreshIndividualSubscription(subscriptionDescription, subscriptionNode); + } + + if (wasTopicNodeExpanded) + selectedNode.Expand(); + } + + private void createEntity_Click(object sender, EventArgs e) { try { - serviceBusTreeView.SuspendDrawing(); - serviceBusTreeView.SuspendLayout(); - serviceBusTreeView.BeginUpdate(); - var queueListNode = FindNode(Constants.QueueEntities, rootNode); - var topicListNode = FindNode(Constants.TopicEntities, rootNode); - var eventHubListNode = FindNode(Constants.EventHubEntities, rootNode); - var notificationHubListNode = FindNode(Constants.NotificationHubEntities, rootNode); - var relayServiceListNode = FindNode(Constants.RelayEntities, rootNode); if (serviceBusTreeView.SelectedNode != null) { - // Queues - if (serviceBusTreeView.SelectedNode == queueListNode) - { - GetEntities(EntityType.Queue); - return; - } - // Topics - if (serviceBusTreeView.SelectedNode == topicListNode) - { - GetEntities(EntityType.Topic); - return; - } - // Event Hubs - if (serviceBusTreeView.SelectedNode == eventHubListNode) + // Queues Node (Create New QueueDescription) + if (serviceBusTreeView.SelectedNode.Text == Constants.QueueEntities) { - GetEntities(EntityType.EventHub); + panelMain.HeaderText = CreateQueue; + ShowQueue(null, null); return; } - // Notification Hubs - if (serviceBusTreeView.SelectedNode == notificationHubListNode) + // Topics Node (Create New TopicDescription) + if (serviceBusTreeView.SelectedNode.Text == Constants.TopicEntities) { - GetEntities(EntityType.NotificationHub); + panelMain.HeaderText = CreateTopic; + ShowTopic(null, null); return; } - // Relays - if (serviceBusTreeView.SelectedNode == relayServiceListNode) + // Relays Node (Create New RelayDescription) + if (serviceBusTreeView.SelectedNode.Text == Constants.RelayEntities) { - GetEntities(EntityType.Relay); + panelMain.HeaderText = CreateRelay; + ShowRelay(null, null); return; } - if (serviceBusTreeView.SelectedNode.Tag == null) + // EventHubs Node (Create New EventHubDescription) + if (serviceBusTreeView.SelectedNode.Text == Constants.EventHubEntities) { + panelMain.HeaderText = CreateEventHub; + ShowEventHub(null); return; } - // Queue Node - var tag = serviceBusTreeView.SelectedNode.Tag as QueueDescription; - if (tag != null) + // ConsumerGroup Node (Create New ConsumerGroupDescription) + if (serviceBusTreeView.SelectedNode.Text == ConsumerGroupEntities) { - var queueDescription = serviceBusHelper.GetQueue(tag.Path); - if (queueDescription.Status == EntityStatus.Active) - { - serviceBusTreeView.SelectedNode.ImageIndex = QueueIconIndex; - serviceBusTreeView.SelectedNode.SelectedImageIndex = QueueIconIndex; - } - else - { - serviceBusTreeView.SelectedNode.ImageIndex = GreyQueueIconIndex; - serviceBusTreeView.SelectedNode.SelectedImageIndex = GreyQueueIconIndex; - } - serviceBusTreeView.SelectedNode.Tag = queueDescription; - var control = panelMain.Controls[0] as HandleQueueControl; - if (control != null) + var parent = serviceBusTreeView.SelectedNode.Parent; + if (parent?.Tag is EventHubDescription eventHubDescription) { - control.RefreshData(queueDescription); - WriteToLog(string.Format(QueueRetrievedFormat, queueDescription.Path), false); + panelMain.HeaderText = CreateConsumerGroup; + ShowConsumerGroup(null, eventHubDescription.Path); } - serviceBusTreeView.SelectedNode.Text = GetNameAndMessageCountText(serviceBusTreeView.SelectedNode.Name, queueDescription.MessageCountDetails); return; } - // Individual Topic Node - var selectedNodeTag = serviceBusTreeView.SelectedNode.Tag as TopicDescription; - if (selectedNodeTag != null) - { - var topicDescription = serviceBusHelper.GetTopic(selectedNodeTag.Path); - if (topicDescription.Status == EntityStatus.Active) - { - serviceBusTreeView.SelectedNode.ImageIndex = TopicIconIndex; - serviceBusTreeView.SelectedNode.SelectedImageIndex = TopicIconIndex; - } - else - { - serviceBusTreeView.SelectedNode.ImageIndex = GreyTopicIconIndex; - serviceBusTreeView.SelectedNode.SelectedImageIndex = GreyTopicIconIndex; - } - serviceBusTreeView.SelectedNode.Tag = topicDescription; - var control = panelMain.Controls[0] as HandleTopicControl; - if (control != null) - { - control.RefreshData(topicDescription); - WriteToLog(string.Format(TopicRetrievedFormat, topicDescription.Path), false); - } - RefreshIndividualTopic(serviceBusTreeView.SelectedNode); + // NotificationHubs Node (Create New NotificationHubDescription) + if (serviceBusTreeView.SelectedNode.Text == Constants.NotificationHubEntities) + { + panelMain.HeaderText = CreateNotificationHub; + ShowNotificationHub(null); return; } - // Relay Node - var nodeTag = serviceBusTreeView.SelectedNode.Tag as RelayDescription; - if (nodeTag != null) + if (serviceBusTreeView.SelectedNode.Tag != null) { - var description = nodeTag; - if (description.IsDynamic) + // UrlSegment Node + if (serviceBusTreeView.SelectedNode.Tag is UrlSegmentWrapper urlSegmentWrapper) { - var relayCollection = serviceBusHelper.GetRelays(MainForm.SingletonMainForm.ServerTimeout); - var relayDescriptions = relayCollection as IList ?? relayCollection.ToList(); - if (relayDescriptions.Any()) + if (urlSegmentWrapper.EntityType == EntityType.Queue) { - var relayDescription = relayDescriptions.First(r => string.Compare(r.Path, - description.Path, - StringComparison.InvariantCultureIgnoreCase) == 0); - if (relayDescription != null) - { - var control = panelMain.Controls[0] as HandleRelayControl; - if (control != null) - { - control.RefreshData(relayDescription); - WriteToLog(string.Format(RelayRetrievedFormat, relayDescription.Path), false); - } - } + panelMain.HeaderText = CreateQueue; + ShowQueue(null, FormatAbsolutePathForEdit(urlSegmentWrapper.Uri)); } - } - else - { - var relayDescription = serviceBusHelper.GetRelay(description.Path); - serviceBusTreeView.SelectedNode.ImageIndex = RelayLeafIconIndex; - serviceBusTreeView.SelectedNode.SelectedImageIndex = RelayLeafIconIndex; - serviceBusTreeView.SelectedNode.Tag = relayDescription; - var control = panelMain.Controls[0] as HandleRelayControl; - if (control != null) + else if (urlSegmentWrapper.EntityType == EntityType.Topic) { - control.RefreshData(relayDescription); - WriteToLog(string.Format(RelayRetrievedFormat, relayDescription.Path), false); + panelMain.HeaderText = CreateTopic; + ShowTopic(null, FormatAbsolutePathForEdit(urlSegmentWrapper.Uri)); + } + else + { + panelMain.HeaderText = CreateRelay; + ShowRelay(null, FormatAbsolutePathForEdit(urlSegmentWrapper.Uri)); } + return; } - return; - } - // Partitions Node - if (serviceBusTreeView.SelectedNode.Text == PartitionEntities) - { - var isExpanded = serviceBusTreeView.SelectedNode.IsExpanded; - var eventHubDescription = serviceBusTreeView.SelectedNode.Tag as EventHubDescription; - if (eventHubDescription == null) + + // TopicDescription Node (Create New SubscriptionDescription) + if (serviceBusTreeView.SelectedNode.Tag is TopicDescription) { + panelMain.HeaderText = CreateSubscription; + ShowSubscription(new SubscriptionWrapper(null, serviceBusTreeView.SelectedNode.Tag as TopicDescription)); return; } - serviceBusTreeView.SelectedNode.Nodes.Clear(); - var parent = serviceBusTreeView.SelectedNode.Parent; - CreateEventHubPartitions(eventHubDescription, parent); - var partitionsNode = parent.Nodes.Cast().First(n => n.Name == PartitionEntities); - if (partitionsNode == null) + + // EventHub Node (Create New ConsumerGroupDescription) + if (serviceBusTreeView.SelectedNode.Tag is EventHubDescription) { + panelMain.HeaderText = CreateConsumerGroup; + ShowConsumerGroup(null, (serviceBusTreeView.SelectedNode.Tag as EventHubDescription).Path); return; } - serviceBusTreeView.SelectedNode = partitionsNode; - if (isExpanded) + + // Subscriptions Node (Create New SubscriptionDescription) + if (serviceBusTreeView.SelectedNode.Text == SubscriptionEntities || + serviceBusTreeView.SelectedNode.Text == FilteredSubscriptionEntities) { - partitionsNode.Expand(); + panelMain.HeaderText = CreateSubscription; + if( serviceBusTreeView.SelectedNode.Tag is SubscriptionWrapper subscriptionNewWrapper) + { + ShowSubscription(new SubscriptionWrapper(null, subscriptionNewWrapper.TopicDescription)); + } + return; } - return; - } - // Consumer Groups Node - if (serviceBusTreeView.SelectedNode.Text == ConsumerGroupEntities) - { - var isExpanded = serviceBusTreeView.SelectedNode.IsExpanded; - var eventHubDescription = serviceBusTreeView.SelectedNode.Tag as EventHubDescription; - if (eventHubDescription == null) - { - return; - } - serviceBusTreeView.SelectedNode.Nodes.Clear(); - var parent = serviceBusTreeView.SelectedNode.Parent; - var partitions = GetPartitionsFromPartitionIds(eventHubDescription); - var partitionDescriptions = partitions as IList ?? partitions.ToList(); - CreateEventHubConsumerGroups(eventHubDescription, parent, partitionDescriptions); - var consumerGroupsNode = parent.Nodes.Cast().First(n => n.Name == ConsumerGroupEntities); - if (consumerGroupsNode == null) + + // SubscriptionDescription Node (Create New RuleDescription) + if (serviceBusTreeView.SelectedNode.Tag is SubscriptionWrapper subscriptionRuleWrapper) { + panelMain.HeaderText = AddRule; + ShowRule(new RuleWrapper(null, subscriptionRuleWrapper.SubscriptionDescription), !serviceBusTreeView.SelectedNode.Nodes.ContainsKey(RuleEntities)); return; } - serviceBusTreeView.SelectedNode = consumerGroupsNode; - if (isExpanded) + + // Rules Node (Create New RuleDescription) + if (serviceBusTreeView.SelectedNode.Text == RuleEntities) { - consumerGroupsNode.Expand(); + panelMain.HeaderText = AddRule; + if (serviceBusTreeView.SelectedNode.Tag is RuleWrapper ruleWrapper) + { + ShowRule(new RuleWrapper(null, ruleWrapper.SubscriptionDescription), false); + } } - return; } - // Event Hub Node - if (serviceBusTreeView.SelectedNode.Tag is EventHubDescription) + } + } + catch (Exception ex) + { + HandleException(ex); + } + } + + private void serviceBusTreeView_KeyDown(object sender, KeyEventArgs keyEventArgs) + { + switch (keyEventArgs.KeyCode) + { + case Keys.Delete: // purge entity + if (keyEventArgs.Modifiers == Keys.Shift) { - var eventHubDescription = serviceBusHelper.GetEventHub(((EventHubDescription)serviceBusTreeView.SelectedNode.Tag).Path); - if (eventHubDescription.Status == EntityStatus.Active) - { - serviceBusTreeView.SelectedNode.ImageIndex = EventHubIconIndex; - serviceBusTreeView.SelectedNode.SelectedImageIndex = EventHubIconIndex; - } - else - { - serviceBusTreeView.SelectedNode.ImageIndex = GreyEventHubIconIndex; - serviceBusTreeView.SelectedNode.SelectedImageIndex = GreyEventHubIconIndex; - } - serviceBusTreeView.SelectedNode.Tag = eventHubDescription; - var control = panelMain.Controls[0] as HandleEventHubControl; - if (control != null) + receiveMessages_Click(sender, keyEventArgs); + } + else // delete entity + { + deleteEntity_Click(sender, keyEventArgs); + } + break; + + case Keys.Enter: // select entity + HandleNodeMouseClick(serviceBusTreeView.SelectedNode); + break; + } + } + + private async void deleteEntity_Click(object sender, EventArgs e) + { + try + { + Cursor.Current = Cursors.WaitCursor; + if (serviceBusTreeView.SelectedNode != null) + { + var queueListNode = FindNode(Constants.QueueEntities, rootNode); + var topicListNode = FindNode(Constants.TopicEntities, rootNode); + var relayServiceListNode = FindNode(Constants.RelayEntities, rootNode); + var eventHubListNode = FindNode(Constants.EventHubEntities, rootNode); + var notificationHubListNode = FindNode(Constants.NotificationHubEntities, rootNode); + + string serviceBusNamespaceLocalName = GetServiceBusNamespaceLocalName(rootNode.Text); + + var configuration = TwoFilesConfiguration.Create(configFileUse, WriteToLog); + + // Root Node + if (serviceBusTreeView.SelectedNode == rootNode) + { + using (var deleteForm = new DeleteForm(DeleteAllEntities)) { - control.RefreshData(eventHubDescription); - WriteToLog(string.Format(EventHubRetrievedFormat, eventHubDescription.Path), false); + deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "Everything in " + serviceBusNamespaceLocalName); + + if (deleteForm.ShowDialog() == DialogResult.OK) + { + var queueList = new List(); + var topicList = new List(); + GetQueueList(queueList, queueListNode); + GetTopicList(topicList, topicListNode); + await serviceBusHelper.DeleteQueues(queueList); + await serviceBusHelper.DeleteTopics(topicList); + ShowEntities(EntityType.All); + } } return; } - // Partition Node - if (serviceBusTreeView.SelectedNode.Tag is PartitionDescription) + + // Queues Node + if (serviceBusTreeView.SelectedNode == queueListNode) { - var partitionDescription = (PartitionDescription)serviceBusTreeView.SelectedNode.Tag; - var consumerGroup = serviceBusTreeView.SelectedNode.Parent.Parent.Tag as ConsumerGroupDescription; - var consumerGroupName = consumerGroup != null ? consumerGroup.Name : null; - var partition = serviceBusHelper.GetPartition(partitionDescription.EventHubPath, consumerGroupName, partitionDescription.PartitionId); - if (partition != null) + using (var deleteForm = new DeleteForm(DeleteAllQueues)) { - serviceBusTreeView.SelectedNode.Tag = partitionDescription; - var control = panelMain.Controls[0] as HandlePartitionControl; - if (control != null) + deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "All queues in " + serviceBusNamespaceLocalName); + + if (deleteForm.ShowDialog() == DialogResult.OK) { - control.RefreshData(partition); - WriteToLog(string.Format(PartitionRetrievedFormat, partitionDescription.PartitionId, partitionDescription.EventHubPath), false); + var queueList = new List(); + GetQueueList(queueList, queueListNode); + await serviceBusHelper.DeleteQueues(queueList); + ShowEntities(EntityType.Queue); } } return; } - // Consumer Group Node - if (serviceBusTreeView.SelectedNode.Tag is ConsumerGroupDescription) + + // Topics Node + if (serviceBusTreeView.SelectedNode == topicListNode) { - var consumerGroupDescription = serviceBusTreeView.SelectedNode.Tag as ConsumerGroupDescription; - consumerGroupDescription = serviceBusHelper.GetConsumerGroup(consumerGroupDescription.EventHubPath, consumerGroupDescription.Name); - serviceBusTreeView.SelectedNode.Tag = consumerGroupDescription; - var control = panelMain.Controls[0] as HandleConsumerGroupControl; - if (control != null) + using (var deleteForm = new DeleteForm(DeleteAllTopics)) { - control.RefreshData(consumerGroupDescription); - WriteToLog(string.Format(ConsumerGroupRetrievedFormat, consumerGroupDescription.Name, consumerGroupDescription.EventHubPath), false); + deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "All topics in " + serviceBusNamespaceLocalName); + + if (deleteForm.ShowDialog() == DialogResult.OK) + { + var topicList = new List(); + GetTopicList(topicList, topicListNode); + await serviceBusHelper.DeleteTopics(topicList); + ShowEntities(EntityType.Topic); + } } return; } - // Notification Hub Node - if (serviceBusTreeView.SelectedNode.Tag is NotificationHubDescription) + + // Relays Node + if (serviceBusTreeView.SelectedNode == relayServiceListNode) { - var notificationHubDescription = serviceBusHelper.GetNotificationHub(((NotificationHubDescription)serviceBusTreeView.SelectedNode.Tag).Path); - serviceBusTreeView.SelectedNode.ImageIndex = NotificationHubIconIndex; - serviceBusTreeView.SelectedNode.SelectedImageIndex = NotificationHubIconIndex; - serviceBusTreeView.SelectedNode.Tag = notificationHubDescription; - var control = panelMain.Controls[0] as HandleNotificationHubControl; - if (control != null) + using (var deleteForm = new DeleteForm(DeleteAllRelays)) { - control.RefreshData(notificationHubDescription); - WriteToLog(string.Format(NotificationHubRetrievedFormat, notificationHubDescription.Path), false); + deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "All relays in " + serviceBusNamespaceLocalName); + + if (deleteForm.ShowDialog() == DialogResult.OK) + { + var relayServiceList = new List(); + GetRelayList(relayServiceList, relayServiceListNode); + await serviceBusHelper.DeleteRelays(relayServiceList); + ShowEntities(EntityType.Relay); + } } return; } - // Subscriptions Node - if (serviceBusTreeView.SelectedNode.Text == SubscriptionEntities || - serviceBusTreeView.SelectedNode.Text == FilteredSubscriptionEntities) + + // EventHubs Node + if (serviceBusTreeView.SelectedNode == eventHubListNode) { - var wrapper = serviceBusTreeView.SelectedNode.Tag as SubscriptionWrapper; - if (wrapper == null) - { - return; - } - var subscriptions = serviceBusHelper.GetSubscriptions(wrapper.TopicDescription, wrapper.Filter); - var subscriptionDescriptions = subscriptions as IList ?? subscriptions.ToList(); - if ((subscriptionDescriptions.Any()) || - !string.IsNullOrWhiteSpace(wrapper.Filter)) + using (var deleteForm = new DeleteForm(DeleteAllEventHubs)) { - var subscriptionsNode = serviceBusTreeView.SelectedNode; - subscriptionsNode.Text = string.IsNullOrWhiteSpace(wrapper.Filter) ? - SubscriptionEntities : - FilteredSubscriptionEntities; - subscriptionsNode.Nodes.Clear(); - foreach (var subscription in subscriptionDescriptions) + deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "All event hubs in " + serviceBusNamespaceLocalName); + + if (deleteForm.ShowDialog() == DialogResult.OK) { - var subscriptionNode = subscriptionsNode.Nodes.Add(subscription.Name, - GetNameAndMessageCountText(subscription.Name, subscription.MessageCountDetails), - subscription.Status == EntityStatus.Active ? SubscriptionIconIndex : GreySubscriptionIconIndex, - subscription.Status == EntityStatus.Active ? SubscriptionIconIndex : GreySubscriptionIconIndex); - subscriptionNode.ContextMenuStrip = subscriptionContextMenuStrip; - subscriptionNode.Tag = new SubscriptionWrapper(subscription, wrapper.TopicDescription); - WriteToLog(string.Format(CultureInfo.CurrentCulture, SubscriptionRetrievedFormat, subscription.Name, wrapper.TopicDescription.Path), false); - var rules = serviceBusHelper.GetRules(subscription); - var ruleDescriptions = rules as RuleDescription[] ?? rules.ToArray(); - if (ruleDescriptions.Any()) - { - subscriptionNode.Nodes.Clear(); - var rulesNode = subscriptionNode.Nodes.Add(RuleEntities, RuleEntities, RuleListIconIndex, RuleListIconIndex); - rulesNode.ContextMenuStrip = rulesContextMenuStrip; - rulesNode.Tag = new RuleWrapper(null, subscription); - foreach (var rule in ruleDescriptions) - { - var ruleNode = rulesNode.Nodes.Add(rule.Name, rule.Name, RuleIconIndex, RuleIconIndex); - ruleNode.ContextMenuStrip = ruleContextMenuStrip; - ruleNode.Tag = new RuleWrapper(rule, subscription); - WriteToLog(string.Format(CultureInfo.CurrentCulture, RuleRetrievedFormat, rule.Name, subscription.Name, wrapper.TopicDescription.Path), false); - } - } + var eventHubList = new List(); + GetEventHubList(eventHubList, eventHubListNode); + serviceBusHelper.DeleteEventHubs(eventHubList); + ShowEntities(EntityType.EventHub); } } return; } - // Rules Node - if (serviceBusTreeView.SelectedNode.Text == RuleEntities) + + // ConsumerGroups Node + if (serviceBusTreeView.SelectedNode.Text == ConsumerGroupEntities) { - var wrapper = serviceBusTreeView.SelectedNode.Tag as RuleWrapper; - if (wrapper == null) - { - return; - } - var rules = serviceBusHelper.GetRules(wrapper.SubscriptionDescription); - var ruleDescriptions = rules as RuleDescription[] ?? rules.ToArray(); - if (ruleDescriptions.Any()) + var parent = serviceBusTreeView.SelectedNode.Parent; + if (parent?.Tag is EventHubDescription eventHubConsumerDescription) { - var rulesNode = serviceBusTreeView.SelectedNode; - rulesNode.Nodes.Clear(); - foreach (var rule in ruleDescriptions) + using (var deleteForm = new DeleteForm(string.Format(DeleteAllConsumerGroups, eventHubConsumerDescription.Path))) { - var ruleNode = rulesNode.Nodes.Add(rule.Name, rule.Name, RuleIconIndex, RuleIconIndex); - ruleNode.ContextMenuStrip = ruleContextMenuStrip; - ruleNode.Tag = new RuleWrapper(rule, wrapper.SubscriptionDescription); - WriteToLog(string.Format(CultureInfo.CurrentCulture, RuleRetrievedFormat, rule.Name, wrapper.SubscriptionDescription.Name, wrapper.SubscriptionDescription.TopicPath), false); + deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "All consumer groups in " + serviceBusNamespaceLocalName); + + if (deleteForm.ShowDialog() == DialogResult.OK) + { + var notificationHubList = new List(); + GetConsumerGroupList(notificationHubList, serviceBusTreeView.SelectedNode); + notificationHubList.Remove(DefaultConsumerGroupName); + serviceBusHelper.DeleteConsumerGroups(eventHubConsumerDescription.Path, notificationHubList); + RefreshSelectedEntity(); + } } } return; } - // Individual Subscription Node - var subscriptionWrapper = serviceBusTreeView.SelectedNode.Tag as SubscriptionWrapper; - if (subscriptionWrapper != null) + + // NotificationHubs Node + if (serviceBusTreeView.SelectedNode == notificationHubListNode) { - var wrapper = subscriptionWrapper; - var subscriptionDescription = serviceBusHelper.GetSubscription(wrapper.SubscriptionDescription.TopicPath, wrapper.SubscriptionDescription.Name); - wrapper = new SubscriptionWrapper(subscriptionDescription, wrapper.TopicDescription); - if (subscriptionDescription.Status == EntityStatus.Active) + using (var deleteForm = new DeleteForm(DeleteAllNotificationHubs)) { - serviceBusTreeView.SelectedNode.ImageIndex = SubscriptionIconIndex; - serviceBusTreeView.SelectedNode.SelectedImageIndex = SubscriptionIconIndex; + deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "All notification hubs in " + serviceBusNamespaceLocalName); + + if (deleteForm.ShowDialog() == DialogResult.OK) + { + var notificationHubList = new List(); + GetNotificationHubList(notificationHubList, notificationHubListNode); + await serviceBusHelper.DeleteNotificationHubs(notificationHubList); + ShowEntities(EntityType.NotificationHub); + } } - else + return; + } + // Check that serviceBusTreeView.SelectedNode.Tag is not null + if (serviceBusTreeView.SelectedNode.Tag == null) + { + return; + } + + // Url Segment Node + if (serviceBusTreeView.SelectedNode.Tag is UrlSegmentWrapper urlSegmentWrapper) + { + if (urlSegmentWrapper.EntityType == EntityType.Queue) { - serviceBusTreeView.SelectedNode.ImageIndex = GreySubscriptionIconIndex; - serviceBusTreeView.SelectedNode.SelectedImageIndex = GreySubscriptionIconIndex; + using (var deleteForm = new DeleteForm(string.Format(DeleteAllQueuesInPath, FormatAbsolutePathForEdit(urlSegmentWrapper.Uri)))) + { + deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "Queues in subpath of " + serviceBusNamespaceLocalName); + + if (deleteForm.ShowDialog() == DialogResult.OK) + { + var queueList = new List(); + GetQueueList(queueList, serviceBusTreeView.SelectedNode); + await serviceBusHelper.DeleteQueues(queueList); + } + } } - serviceBusTreeView.SelectedNode.Tag = wrapper; - var control = panelMain.Controls[0] as HandleSubscriptionControl; - if (control != null) + else if (urlSegmentWrapper.EntityType == EntityType.Topic) { - control.RefreshData(wrapper); - WriteToLog(string.Format(SubscriptionRetrievedFormat, - wrapper.SubscriptionDescription.Name, - wrapper.SubscriptionDescription.TopicPath), - false); + using (var deleteForm = new DeleteForm(string.Format(DeleteAllTopicsInPath, FormatAbsolutePathForEdit(urlSegmentWrapper.Uri)))) + { + deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "Topics in subpath of " + serviceBusNamespaceLocalName); + + if (deleteForm.ShowDialog() == DialogResult.OK) + { + var topicList = new List(); + GetTopicList(topicList, serviceBusTreeView.SelectedNode); + await serviceBusHelper.DeleteTopics(topicList); + } + } } - serviceBusTreeView.SelectedNode.Text = GetNameAndMessageCountText(serviceBusTreeView.SelectedNode.Name, subscriptionDescription.MessageCountDetails); + else + { + using (var deleteForm = new DeleteForm(string.Format(DeleteAllRelaysInPath, FormatAbsolutePathForEdit(urlSegmentWrapper.Uri)))) + { + deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "Relays in subpath of " + serviceBusNamespaceLocalName); - RefreshIndividualSubscription(subscriptionDescription, serviceBusTreeView.SelectedNode); + if (deleteForm.ShowDialog() == DialogResult.OK) + { + var relayServiceList = new List(); + GetRelayList(relayServiceList, serviceBusTreeView.SelectedNode); + await serviceBusHelper.DeleteRelays(relayServiceList); + } + } + } + return; } - } - } - catch (Exception ex) - { - HandleException(ex); - } - finally - { - serviceBusTreeView.ResumeDrawing(); - serviceBusTreeView.ResumeLayout(); - serviceBusTreeView.EndUpdate(); - } - } - - private void RefreshIndividualSubscription(SubscriptionDescription subscriptionDescription, TreeNode subscriptionNode) - { - var rules = serviceBusHelper.GetRules(subscriptionDescription); - var ruleDescriptions = rules as RuleDescription[] ?? rules.ToArray(); - if (!ruleDescriptions.Any()) - { - subscriptionNode.Nodes.Clear(); - return; - } - var subscriptionNodeWasExpanded = subscriptionNode.IsExpanded; - var rulesNodeWasExpanded = subscriptionNode.Nodes.Count > 0 && subscriptionNode.Nodes[0].IsExpanded; - subscriptionNode.Nodes.Clear(); - var rulesNode = subscriptionNode.Nodes.Add(RuleEntities, RuleEntities, RuleListIconIndex, RuleListIconIndex); - rulesNode.ContextMenuStrip = rulesContextMenuStrip; - rulesNode.Tag = new RuleWrapper(null, subscriptionDescription); - foreach (var rule in ruleDescriptions) - { - var ruleNode = rulesNode.Nodes.Add(rule.Name, rule.Name, RuleIconIndex, RuleIconIndex); - ruleNode.ContextMenuStrip = ruleContextMenuStrip; - ruleNode.Tag = new RuleWrapper(rule, subscriptionDescription); - WriteToLog(string.Format(CultureInfo.CurrentCulture, RuleRetrievedFormat, rule.Name, subscriptionDescription.Name, subscriptionDescription.TopicPath), false); - } - if (rulesNodeWasExpanded) - rulesNode.Expand(); - if (subscriptionNodeWasExpanded) - subscriptionNode.Expand(); - } - - private void RefreshIndividualTopic(TreeNode selectedNode) - { - var wasTopicNodeExpanded = selectedNode.IsExpanded; - - var topicDescription = selectedNode.Tag as TopicDescription; - - var subscriptions = serviceBusHelper.GetSubscriptions(topicDescription, null); - var subscriptionDescriptions = subscriptions as IList ?? subscriptions.ToList(); - - if (!subscriptionDescriptions.Any()) - { - selectedNode.Nodes.Clear(); - return; - } - - selectedNode.Nodes.Clear(); - var subscriptionsNode = selectedNode.Nodes.Add(SubscriptionEntities, SubscriptionEntities, SubscriptionListIconIndex, SubscriptionListIconIndex); - subscriptionsNode.Text = string.IsNullOrWhiteSpace(FilterExpressionHelper.SubscriptionFilterExpression) ? SubscriptionEntities : FilteredSubscriptionEntities; - subscriptionsNode.ContextMenuStrip = subscriptionsContextMenuStrip; - subscriptionsNode.Tag = new SubscriptionWrapper(null, topicDescription, FilterExpressionHelper.SubscriptionFilterExpression); - foreach (var subscriptionDescription in subscriptionDescriptions) - { - var subscriptionNode = subscriptionsNode.Nodes.Add(subscriptionDescription.Name, - GetNameAndMessageCountText(subscriptionDescription.Name, subscriptionDescription.MessageCountDetails), - subscriptionDescription.Status == EntityStatus.Active ? SubscriptionIconIndex : GreySubscriptionIconIndex, - subscriptionDescription.Status == EntityStatus.Active ? SubscriptionIconIndex : GreySubscriptionIconIndex); - subscriptionNode.ContextMenuStrip = subscriptionContextMenuStrip; - subscriptionNode.Tag = new SubscriptionWrapper(subscriptionDescription, topicDescription); - if (topicDescription != null) - { - WriteToLog(string.Format(CultureInfo.CurrentCulture, SubscriptionRetrievedFormat, subscriptionDescription.Name, topicDescription.Path), false); - } - - RefreshIndividualSubscription(subscriptionDescription, subscriptionNode); - } - - if (wasTopicNodeExpanded) - selectedNode.Expand(); - } - private void createEntity_Click(object sender, EventArgs e) - { - try - { - if (serviceBusTreeView.SelectedNode != null) - { - // Queues Node (Create New QueueDescription) - if (serviceBusTreeView.SelectedNode.Text == Constants.QueueEntities) + // Queue Node + if (serviceBusTreeView.SelectedNode.Tag is QueueDescription queueDescription) { - panelMain.HeaderText = CreateQueue; - ShowQueue(null, null); + using (var deleteForm = new DeleteForm(queueDescription.Path, QueueEntity.ToLower())) + { + if (deleteForm.ShowDialog() == DialogResult.OK) + { + await serviceBusHelper.DeleteQueue(queueDescription); + } + } return; } - // Topics Node (Create New TopicDescription) - if (serviceBusTreeView.SelectedNode.Text == Constants.TopicEntities) + + // Subscriptions Node + if (sender == deleteTopicSubscriptionsMenuItem) { - panelMain.HeaderText = CreateTopic; - ShowTopic(null, null); + if (serviceBusTreeView.SelectedNode.Nodes.Count == 0) + { + return; + } + var subscriptionsNode = serviceBusTreeView.SelectedNode.Nodes[0]; + var subscriptionDescriptions = subscriptionsNode. + Nodes. + Cast(). + Select(n => ((SubscriptionWrapper)n.Tag).SubscriptionDescription). + ToList(); + if (subscriptionDescriptions.Count > 0) + { + using (var deleteForm = new DeleteForm(DeleteAllSubscriptions)) + { + if (deleteForm.ShowDialog() == DialogResult.OK) + { + await serviceBusHelper.DeleteSubscriptions(subscriptionDescriptions); + } + } + } return; } - // Relays Node (Create New RelayDescription) - if (serviceBusTreeView.SelectedNode.Text == Constants.RelayEntities) + + // Topic Node + if (serviceBusTreeView.SelectedNode.Tag is TopicDescription topicDescription) { - panelMain.HeaderText = CreateRelay; - ShowRelay(null, null); + using (var deleteForm = new DeleteForm(topicDescription.Path, TopicEntity.ToLower())) + { + if (deleteForm.ShowDialog() == DialogResult.OK) + { + await serviceBusHelper.DeleteTopic(topicDescription); + } + } return; } - // EventHubs Node (Create New EventHubDescription) - if (serviceBusTreeView.SelectedNode.Text == Constants.EventHubEntities) + + // Relay Node + if (serviceBusTreeView.SelectedNode.Tag is RelayDescription relayDescription) { - panelMain.HeaderText = CreateEventHub; - ShowEventHub(null); + using (var deleteForm = new DeleteForm(relayDescription.Path, RelayEntity.ToLower())) + { + if (deleteForm.ShowDialog() == DialogResult.OK) + { + await serviceBusHelper.DeleteRelay(relayDescription.Path); + } + } return; } - // ConsumerGroup Node (Create New ConsumerGroupDescription) - if (serviceBusTreeView.SelectedNode.Text == ConsumerGroupEntities) + + // EventHub Node: Delete Consumer Groups + if (sender == deleteConsumerGroupsMenuItem) { - var parent = serviceBusTreeView.SelectedNode.Parent; - if (parent?.Tag is EventHubDescription) + if (serviceBusTreeView.SelectedNode.Nodes.Count == 0) { - panelMain.HeaderText = CreateConsumerGroup; - ShowConsumerGroup(null, ((EventHubDescription)parent.Tag).Path); + return; + } + + if (serviceBusTreeView.SelectedNode.Tag is EventHubDescription eventHubDeleteDescription) + { + using (var deleteForm = new DeleteForm(string.Format(DeleteAllConsumerGroups, eventHubDeleteDescription.Path))) + { + if (deleteForm.ShowDialog() == DialogResult.OK) + { + var consumerGroups = new List(); + GetConsumerGroupList(consumerGroups, serviceBusTreeView.SelectedNode); + consumerGroups.Remove(DefaultConsumerGroupName); + serviceBusHelper.DeleteConsumerGroups(eventHubDeleteDescription.Path, consumerGroups); + RefreshSelectedEntity(); + } + } } return; } - // NotificationHubs Node (Create New NotificationHubDescription) - if (serviceBusTreeView.SelectedNode.Text == Constants.NotificationHubEntities) + + // EventHub Node + if (serviceBusTreeView.SelectedNode.Tag is EventHubDescription eventHubDescription) { - panelMain.HeaderText = CreateNotificationHub; - ShowNotificationHub(null); + using (var deleteForm = new DeleteForm(eventHubDescription.Path, EventHubEntity.ToLower())) + { + if (deleteForm.ShowDialog() == DialogResult.OK) + { + serviceBusHelper.DeleteEventHub(eventHubDescription); + } + } return; } - if (serviceBusTreeView.SelectedNode.Tag != null) + + // ConsumerGroup Node + if (serviceBusTreeView.SelectedNode.Tag is ConsumerGroupDescription consumerGroupDescription) { - // UrlSegment Node - if (serviceBusTreeView.SelectedNode.Tag is UrlSegmentWrapper) + using (var deleteForm = new DeleteForm(consumerGroupDescription.Name, ConsumerGroupEntity.ToLower())) { - var urlSegmentWrapper = serviceBusTreeView.SelectedNode.Tag as UrlSegmentWrapper; - if (urlSegmentWrapper.EntityType == EntityType.Queue) + if (deleteForm.ShowDialog() == DialogResult.OK) { - panelMain.HeaderText = CreateQueue; - ShowQueue(null, FormatAbsolutePathForEdit(urlSegmentWrapper.Uri)); + serviceBusHelper.DeleteConsumerGroup(consumerGroupDescription); } - else if (urlSegmentWrapper.EntityType == EntityType.Topic) - { - panelMain.HeaderText = CreateTopic; - ShowTopic(null, FormatAbsolutePathForEdit(urlSegmentWrapper.Uri)); - } - else - { - panelMain.HeaderText = CreateRelay; - ShowRelay(null, FormatAbsolutePathForEdit(urlSegmentWrapper.Uri)); - } - return; } + return; + } - // TopicDescription Node (Create New SubscriptionDescription) - if (serviceBusTreeView.SelectedNode.Tag is TopicDescription) + // NotificationHub Node + if (serviceBusTreeView.SelectedNode.Tag is NotificationHubDescription notificationHubDescription) + { + using (var deleteForm = new DeleteForm(notificationHubDescription.Path, NotificationHubEntity.ToLower())) { - panelMain.HeaderText = CreateSubscription; - ShowSubscription(new SubscriptionWrapper(null, serviceBusTreeView.SelectedNode.Tag as TopicDescription)); - return; + if (deleteForm.ShowDialog() == DialogResult.OK) + { + await serviceBusHelper.DeleteNotificationHub(notificationHubDescription); + } } + return; + } - // EventHub Node (Create New ConsumerGroupDescription) - if (serviceBusTreeView.SelectedNode.Tag is EventHubDescription) + // Subscriptions Node + if (serviceBusTreeView.SelectedNode.Text == SubscriptionEntities || + serviceBusTreeView.SelectedNode.Text == FilteredSubscriptionEntities) + { + var subscriptionDescriptions = serviceBusTreeView.SelectedNode. + Nodes. + Cast(). + Select(n => ((SubscriptionWrapper)n.Tag).SubscriptionDescription). + ToList(); + if (subscriptionDescriptions.Count > 0) { - panelMain.HeaderText = CreateConsumerGroup; - ShowConsumerGroup(null, (serviceBusTreeView.SelectedNode.Tag as EventHubDescription).Path); - return; + using (var deleteForm = new DeleteForm(DeleteAllSubscriptions)) + { + if (deleteForm.ShowDialog() == DialogResult.OK) + { + await serviceBusHelper.DeleteSubscriptions(subscriptionDescriptions); + } + } } - // Subscriptions Node (Create New SubscriptionDescription) - if (serviceBusTreeView.SelectedNode.Text == SubscriptionEntities || - serviceBusTreeView.SelectedNode.Text == FilteredSubscriptionEntities) + return; + } + + // Subscription Node + if (serviceBusTreeView.SelectedNode.Tag is SubscriptionWrapper subscriptionWrapper) + { + if (subscriptionWrapper.TopicDescription != null && + subscriptionWrapper.SubscriptionDescription != null) { - panelMain.HeaderText = CreateSubscription; - var subscriptionWrapper = serviceBusTreeView.SelectedNode.Tag as SubscriptionWrapper; - if (subscriptionWrapper != null) + using (var deleteForm = new DeleteForm(subscriptionWrapper.SubscriptionDescription.Name, SubscriptionEntity.ToLower())) { - ShowSubscription(new SubscriptionWrapper(null, subscriptionWrapper.TopicDescription)); + if (deleteForm.ShowDialog() == DialogResult.OK) + { + await serviceBusHelper.DeleteSubscription(subscriptionWrapper.SubscriptionDescription); + } } - return; } - // SubscriptionDescription Node (Create New RuleDescription) - if (serviceBusTreeView.SelectedNode.Tag is SubscriptionWrapper) + return; + } + + // Rules Node + if (serviceBusTreeView.SelectedNode.Text == RuleEntities) + { + var ruleWrappers = serviceBusTreeView.SelectedNode. + Nodes. + Cast(). + Select(n => (RuleWrapper)n.Tag). + ToList(); + if (ruleWrappers.Count > 0) { - var wrapper = serviceBusTreeView.SelectedNode.Tag as SubscriptionWrapper; - panelMain.HeaderText = AddRule; - ShowRule(new RuleWrapper(null, wrapper.SubscriptionDescription), !serviceBusTreeView.SelectedNode.Nodes.ContainsKey(RuleEntities)); - return; + using (var deleteForm = new DeleteForm(DeleteAllRules)) + { + deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "All rules in " + serviceBusNamespaceLocalName); + + if (deleteForm.ShowDialog() == DialogResult.OK) + { + serviceBusHelper.RemoveRules(ruleWrappers); + } + } } - // Rules Node (Create New RuleDescription) - if (serviceBusTreeView.SelectedNode.Text == RuleEntities) + return; + } + + // Rule Node + if (serviceBusTreeView.SelectedNode.Tag is RuleWrapper ruleWrapper) + { + if (ruleWrapper.SubscriptionDescription != null && + ruleWrapper.RuleDescription != null) { - panelMain.HeaderText = AddRule; - var ruleWrapper = serviceBusTreeView.SelectedNode.Tag as RuleWrapper; - if (ruleWrapper != null) + using (var deleteForm = new DeleteForm(ruleWrapper.RuleDescription.Name, RuleEntity.ToLower())) { - ShowRule(new RuleWrapper(null, ruleWrapper.SubscriptionDescription), false); + if (deleteForm.ShowDialog() == DialogResult.OK) + { + serviceBusHelper.RemoveRule(ruleWrapper.SubscriptionDescription, ruleWrapper.RuleDescription); + } } } } @@ -2271,430 +2336,314 @@ private void createEntity_Click(object sender, EventArgs e) { HandleException(ex); } + finally + { + Cursor.Current = Cursors.Default; + } } - private void serviceBusTreeView_KeyDown(object sender, KeyEventArgs keyEventArgs) + private void changeStatusQueueMenuItem_DropDownOpening(object sender, EventArgs e) { - switch (keyEventArgs.KeyCode) + try { - case Keys.Delete: // purge entity - if (keyEventArgs.Modifiers == Keys.Shift) - { - receiveMessages_Click(sender, keyEventArgs); - } - else // delete entity + var tag = serviceBusTreeView.SelectedNode.Tag as QueueDescription; + if (tag != null) + { + // Put a check against the item that reflects the current status of the queue + var queueDescription = serviceBusHelper.GetQueue(tag.Path); + var status = queueDescription.Status; + foreach (var dropDownItem in changeStatusQueueMenuItem.DropDownItems) { - deleteEntity_Click(sender, keyEventArgs); + var dropDownMenuItem = dropDownItem as ToolStripMenuItem; + dropDownMenuItem.Checked = (EntityStatus)dropDownMenuItem.Tag == status; } - break; - - case Keys.Enter: // select entity - HandleNodeMouseClick(serviceBusTreeView.SelectedNode); - break; + } + else + { + throw new NotSupportedException("Not supported for entity types other than queues."); + } + } + catch (Exception ex) + { + HandleException(ex); } } - private async void deleteEntity_Click(object sender, EventArgs e) + private void changeStatusQueue_Click(object sender, ToolStripItemClickedEventArgs e) { try { Cursor.Current = Cursors.WaitCursor; - if (serviceBusTreeView.SelectedNode != null) + if (serviceBusHelper != null && + serviceBusTreeView.SelectedNode != null) { - var queueListNode = FindNode(Constants.QueueEntities, rootNode); - var topicListNode = FindNode(Constants.TopicEntities, rootNode); - var relayServiceListNode = FindNode(Constants.RelayEntities, rootNode); - var eventHubListNode = FindNode(Constants.EventHubEntities, rootNode); - var notificationHubListNode = FindNode(Constants.NotificationHubEntities, rootNode); - - string serviceBusNamespaceLocalName = GetServiceBusNamespaceLocalName(rootNode.Text); - - var configuration = TwoFilesConfiguration.Create(configFileUse, WriteToLog); - - // Root Node - if (serviceBusTreeView.SelectedNode == rootNode) + if (serviceBusTreeView.SelectedNode.Tag is QueueDescription queueDescription) { - using (var deleteForm = new DeleteForm(DeleteAllEntities)) + var desiredStatus = (EntityStatus)e.ClickedItem.Tag; + using (var changeStatusForm = new ChangeStatusForm(queueDescription.Path, QueueEntity.ToLower(), desiredStatus)) { - deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "Everything in " + serviceBusNamespaceLocalName); - - if (deleteForm.ShowDialog() == DialogResult.OK) + if (changeStatusForm.ShowDialog() == DialogResult.OK) { - var queueList = new List(); - var topicList = new List(); - GetQueueList(queueList, queueListNode); - GetTopicList(topicList, topicListNode); - await serviceBusHelper.DeleteQueues(queueList); - await serviceBusHelper.DeleteTopics(topicList); - GetEntities(EntityType.All); + queueDescription.Status = (EntityStatus)e.ClickedItem.Tag; + serviceBusHelper.NamespaceManager.UpdateQueue(queueDescription); + RefreshSelectedEntity(); } } - return; } - // Queues Node - if (serviceBusTreeView.SelectedNode == queueListNode) + else { - using (var deleteForm = new DeleteForm(DeleteAllQueues)) - { - deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "All queues in " + serviceBusNamespaceLocalName); + throw new NotSupportedException("Not supported for entity types other than queues."); + } + } + } + catch (Exception ex) + { + HandleException(ex); + } + finally + { + Cursor.Current = Cursors.Default; + } + } - if (deleteForm.ShowDialog() == DialogResult.OK) + private async void changeStatusEntity_Click(object sender, EventArgs e) + { + try + { + Cursor.Current = Cursors.WaitCursor; + if (serviceBusHelper != null && + serviceBusTreeView.SelectedNode != null) + { + // Queue Node + if (serviceBusTreeView.SelectedNode.Tag is QueueDescription queueDescription) + { + using (var changeQueueStatusForm = new ChangeQueueStatusForm(queueDescription.Status)) + { + if (changeQueueStatusForm.ShowDialog() == DialogResult.OK) { - var queueList = new List(); - GetQueueList(queueList, queueListNode); - await serviceBusHelper.DeleteQueues(queueList); - GetEntities(EntityType.Queue); + queueDescription.Status = changeQueueStatusForm.EntityStatus; + await serviceBusHelper.NamespaceManager.UpdateQueueAsync(queueDescription); + RefreshSelectedEntity(); } } return; } - // Topics Node - if (serviceBusTreeView.SelectedNode == topicListNode) + // Topic Node + if (serviceBusTreeView.SelectedNode.Tag is TopicDescription topicDescription) { - using (var deleteForm = new DeleteForm(DeleteAllTopics)) + var desiredStatus = topicDescription.Status == EntityStatus.Active + ? EntityStatus.Disabled + : EntityStatus.Active; + using (var changeStatusForm = new ChangeStatusForm(topicDescription.Path, TopicEntity.ToLower(), desiredStatus)) { - deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "All topics in " + serviceBusNamespaceLocalName); - - if (deleteForm.ShowDialog() == DialogResult.OK) + if (changeStatusForm.ShowDialog() == DialogResult.OK) { - var topicList = new List(); - GetTopicList(topicList, topicListNode); - await serviceBusHelper.DeleteTopics(topicList); - GetEntities(EntityType.Topic); + topicDescription.Status = desiredStatus; + await serviceBusHelper.NamespaceManager.UpdateTopicAsync(topicDescription); + RefreshSelectedEntity(); + changeStatusTopicMenuItem.Text = topicDescription.Status == EntityStatus.Active + ? DisableTopic + : EnableTopic; + var item = actionsToolStripMenuItem.DropDownItems[ChangeStatusTopicMenuItem]; + if (item != null) + { + item.Text = changeStatusTopicMenuItem.Text; + } } } return; } - // Relays Node - if (serviceBusTreeView.SelectedNode == relayServiceListNode) + + // Subscription Node + if (serviceBusTreeView.SelectedNode.Tag is SubscriptionWrapper subscriptionWrapper) { - using (var deleteForm = new DeleteForm(DeleteAllRelays)) + if (subscriptionWrapper.TopicDescription != null && + subscriptionWrapper.SubscriptionDescription != null) { - deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "All relays in " + serviceBusNamespaceLocalName); - - if (deleteForm.ShowDialog() == DialogResult.OK) + var desiredStatus = subscriptionWrapper.SubscriptionDescription.Status = subscriptionWrapper.SubscriptionDescription.Status == EntityStatus.Active + ? EntityStatus.Disabled + : EntityStatus.Active; + using (var changeStatusForm = new ChangeStatusForm(subscriptionWrapper.SubscriptionDescription.Name, SubscriptionEntity.ToLower(), desiredStatus)) { - var relayServiceList = new List(); - GetRelayList(relayServiceList, relayServiceListNode); - await serviceBusHelper.DeleteRelays(relayServiceList); - GetEntities(EntityType.Relay); + if (changeStatusForm.ShowDialog() == DialogResult.OK) + { + subscriptionWrapper.SubscriptionDescription.Status = desiredStatus; + await serviceBusHelper.NamespaceManager.UpdateSubscriptionAsync(subscriptionWrapper.SubscriptionDescription); + RefreshSelectedEntity(); + changeStatusSubscriptionMenuItem.Text = subscriptionWrapper.SubscriptionDescription.Status == EntityStatus.Active + ? DisableSubscription + : EnableSubscription; + var item = actionsToolStripMenuItem.DropDownItems[ChangeStatusSubscriptionMenuItem]; + if (item != null) + { + item.Text = changeStatusSubscriptionMenuItem.Text; + } + } } } - return; } - // EventHubs Node - if (serviceBusTreeView.SelectedNode == eventHubListNode) - { - using (var deleteForm = new DeleteForm(DeleteAllEventHubs)) - { - deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "All event hubs in " + serviceBusNamespaceLocalName); - if (deleteForm.ShowDialog() == DialogResult.OK) - { - var eventHubList = new List(); - GetEventHubList(eventHubList, eventHubListNode); - serviceBusHelper.DeleteEventHubs(eventHubList); - GetEntities(EntityType.EventHub); - } - } - return; - } - // ConsumerGroups Node - if (serviceBusTreeView.SelectedNode.Text == ConsumerGroupEntities) + // Event Hub + if (serviceBusTreeView.SelectedNode.Tag is EventHubDescription eventHubDescription) { - var parent = serviceBusTreeView.SelectedNode.Parent; - if (parent != null && parent.Tag is EventHubDescription) + var desiredStatus = eventHubDescription.Status = eventHubDescription.Status == EntityStatus.Active + ? EntityStatus.Disabled + : EntityStatus.Active; + using (var changeStatusForm = new ChangeStatusForm(eventHubDescription.Path, EventHubEntity.ToLower(), desiredStatus)) { - var eventHubDescription = parent.Tag as EventHubDescription; - using (var deleteForm = new DeleteForm(string.Format(DeleteAllConsumerGroups, eventHubDescription.Path))) + if (changeStatusForm.ShowDialog() == DialogResult.OK) { - deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "All consumer groups in " + serviceBusNamespaceLocalName); - - if (deleteForm.ShowDialog() == DialogResult.OK) + eventHubDescription.Status = desiredStatus; + await serviceBusHelper.NamespaceManager.UpdateEventHubAsync(eventHubDescription); + RefreshSelectedEntity(); + changeStatusEventHubMenuItem.Text = eventHubDescription.Status == EntityStatus.Active + ? DisableEventHub + : EnableEventHub; + var item = actionsToolStripMenuItem.DropDownItems[ChangeStatusEventHubMenuItem]; + if (item != null) { - var notificationHubList = new List(); - GetConsumerGroupList(notificationHubList, serviceBusTreeView.SelectedNode); - notificationHubList.Remove(DefaultConsumerGroupName); - serviceBusHelper.DeleteConsumerGroups(eventHubDescription.Path, notificationHubList); - refreshEntity_Click(null, null); + item.Text = changeStatusEventHubMenuItem.Text; } } } - return; } - // NotificationHubs Node - if (serviceBusTreeView.SelectedNode == notificationHubListNode) - { - using (var deleteForm = new DeleteForm(DeleteAllNotificationHubs)) - { - deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "All notification hubs in " + serviceBusNamespaceLocalName); + } + } + catch (Exception ex) + { + HandleException(ex); + } + finally + { + Cursor.Current = Cursors.Default; + } + } - if (deleteForm.ShowDialog() == DialogResult.OK) - { - var notificationHubList = new List(); - GetNotificationHubList(notificationHubList, notificationHubListNode); - await serviceBusHelper.DeleteNotificationHubs(notificationHubList); - GetEntities(EntityType.NotificationHub); - } - } - return; - } - // Check that serviceBusTreeView.SelectedNode.Tag is not null - if (serviceBusTreeView.SelectedNode.Tag == null) - { - return; - } - // Url Segment Node - if (serviceBusTreeView.SelectedNode.Tag is UrlSegmentWrapper) + private void testEntityInSDIMode_Click(object sender, EventArgs e) + { + try + { + if (serviceBusTreeView.SelectedNode == null) + { + return; + } + if (serviceBusTreeView.SelectedNode.Tag == null) + { + return; + } + // QueueDescription Node + if (serviceBusTreeView.SelectedNode.Tag is QueueDescription) + { + var queue = serviceBusTreeView.SelectedNode.Tag as QueueDescription; + panelMain.HeaderText = string.Format(TestQueueFormat, queue.Path); + TestQueue(queue, true); + return; + } + // TopicDescription Node + if (serviceBusTreeView.SelectedNode.Tag is TopicDescription) + { + var topic = serviceBusTreeView.SelectedNode.Tag as TopicDescription; + var subscriptionList = new List(); + if (serviceBusTreeView.SelectedNode.Nodes.ContainsKey(SubscriptionEntities)) { - var urlSegmentWrapper = serviceBusTreeView.SelectedNode.Tag as UrlSegmentWrapper; - if (urlSegmentWrapper.EntityType == EntityType.Queue) + var subscriptionsNode = serviceBusTreeView.SelectedNode.Nodes[SubscriptionEntities]; + if (subscriptionsNode != null && + subscriptionsNode.Nodes.Count > 0) { - using (var deleteForm = new DeleteForm(string.Format(DeleteAllQueuesInPath, FormatAbsolutePathForEdit(urlSegmentWrapper.Uri)))) + for (var i = 0; i < subscriptionsNode.Nodes.Count; i++) { - deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "Queues in subpath of " + serviceBusNamespaceLocalName); - - if (deleteForm.ShowDialog() == DialogResult.OK) + var wrapper = subscriptionsNode.Nodes[i].Tag as SubscriptionWrapper; + if (wrapper != null && + wrapper.SubscriptionDescription != null) { - var queueList = new List(); - GetQueueList(queueList, serviceBusTreeView.SelectedNode); - await serviceBusHelper.DeleteQueues(queueList); + subscriptionList.Add(wrapper.SubscriptionDescription); } } } - else if (urlSegmentWrapper.EntityType == EntityType.Topic) - { - using (var deleteForm = new DeleteForm(string.Format(DeleteAllTopicsInPath, FormatAbsolutePathForEdit(urlSegmentWrapper.Uri)))) - { - deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "Topics in subpath of " + serviceBusNamespaceLocalName); + } - if (deleteForm.ShowDialog() == DialogResult.OK) - { - var topicList = new List(); - GetTopicList(topicList, serviceBusTreeView.SelectedNode); - await serviceBusHelper.DeleteTopics(topicList); - } - } - } - else - { - using (var deleteForm = new DeleteForm(string.Format(DeleteAllRelaysInPath, FormatAbsolutePathForEdit(urlSegmentWrapper.Uri)))) - { - deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "Relays in subpath of " + serviceBusNamespaceLocalName); + panelMain.HeaderText = string.Format(TestTopicFormat, topic.Path); + TestTopic(topic, subscriptionList, true); + return; + } - if (deleteForm.ShowDialog() == DialogResult.OK) - { - var relayServiceList = new List(); - GetRelayList(relayServiceList, serviceBusTreeView.SelectedNode); - await serviceBusHelper.DeleteRelays(relayServiceList); - } - } - } + // SubscriptionDescription Node + if (serviceBusTreeView.SelectedNode.Tag is SubscriptionWrapper) + { + var subscriptionWrapper = serviceBusTreeView.SelectedNode.Tag as SubscriptionWrapper; + panelMain.HeaderText = string.Format(TestSubscriptionFormat, subscriptionWrapper.SubscriptionDescription.Name); + TestSubscription(subscriptionWrapper, true); + } + + // RelayDescription Node + if (serviceBusTreeView.SelectedNode.Tag is RelayDescription) + { + var relay = serviceBusTreeView.SelectedNode.Tag as RelayDescription; + panelMain.HeaderText = string.Format(TestRelayFormat, relay.Path); + TestRelay(relay, true); + } + } + catch (Exception ex) + { + HandleException(ex); + } + } + + private void testEntityInMDIMode_Click(object sender, EventArgs e) + { + try + { + if (serviceBusTreeView.SelectedNode != null) + { + if (serviceBusTreeView.SelectedNode.Tag == null) + { return; } - // Queue Node + // QueueDescription Node if (serviceBusTreeView.SelectedNode.Tag is QueueDescription) { - var queueDescription = serviceBusTreeView.SelectedNode.Tag as QueueDescription; - using (var deleteForm = new DeleteForm(queueDescription.Path, QueueEntity.ToLower())) - { - if (deleteForm.ShowDialog() == DialogResult.OK) - { - await serviceBusHelper.DeleteQueue(queueDescription); - } - } + var queue = serviceBusTreeView.SelectedNode.Tag as QueueDescription; + TestQueue(queue, false); return; } - // Subscriptions Node - if (sender == deleteTopicSubscriptionsMenuItem) + // TopicDescription Node + if (serviceBusTreeView.SelectedNode.Tag is TopicDescription) { - if (serviceBusTreeView.SelectedNode.Nodes.Count == 0) - { - return; - } - var subscriptionsNode = serviceBusTreeView.SelectedNode.Nodes[0]; - var subscriptionDescriptions = subscriptionsNode. - Nodes. - Cast(). - Select(n => ((SubscriptionWrapper)n.Tag).SubscriptionDescription). - ToList(); - if (subscriptionDescriptions.Count > 0) + var topic = serviceBusTreeView.SelectedNode.Tag as TopicDescription; + var subscriptionList = new List(); + if (serviceBusTreeView.SelectedNode.Nodes.ContainsKey(SubscriptionEntities)) { - using (var deleteForm = new DeleteForm(DeleteAllSubscriptions)) + var subscriptionsNode = serviceBusTreeView.SelectedNode.Nodes[SubscriptionEntities]; + if (subscriptionsNode != null && + subscriptionsNode.Nodes.Count > 0) { - if (deleteForm.ShowDialog() == DialogResult.OK) + for (var i = 0; i < subscriptionsNode.Nodes.Count; i++) { - await serviceBusHelper.DeleteSubscriptions(subscriptionDescriptions); + var wrapper = subscriptionsNode.Nodes[i].Tag as SubscriptionWrapper; + if (wrapper != null && + wrapper.SubscriptionDescription != null) + { + subscriptionList.Add(wrapper.SubscriptionDescription); + } } } } + TestTopic(topic, subscriptionList, false); return; } - // Topic Node - if (serviceBusTreeView.SelectedNode.Tag is TopicDescription) + + // SubscriptionDescription Node + if (serviceBusTreeView.SelectedNode.Tag is SubscriptionWrapper) { - var topicDescription = serviceBusTreeView.SelectedNode.Tag as TopicDescription; - using (var deleteForm = new DeleteForm(topicDescription.Path, TopicEntity.ToLower())) - { - if (deleteForm.ShowDialog() == DialogResult.OK) - { - await serviceBusHelper.DeleteTopic(topicDescription); - } - } - return; + var subscriptionWrapper = serviceBusTreeView.SelectedNode.Tag as SubscriptionWrapper; + TestSubscription(subscriptionWrapper, false); } - // Relay Node + + // RelayDescription Node if (serviceBusTreeView.SelectedNode.Tag is RelayDescription) { - var relayDescription = serviceBusTreeView.SelectedNode.Tag as RelayDescription; - using (var deleteForm = new DeleteForm(relayDescription.Path, RelayEntity.ToLower())) - { - if (deleteForm.ShowDialog() == DialogResult.OK) - { - await serviceBusHelper.DeleteRelay(relayDescription.Path); - } - } - return; - } - // EventHub Node: Delete Consumer Groups - if (sender == deleteConsumerGroupsMenuItem) - { - if (serviceBusTreeView.SelectedNode.Nodes.Count == 0) - { - return; - } - var eventHubDescription = serviceBusTreeView.SelectedNode.Tag as EventHubDescription; - if (eventHubDescription == null) - { - return; - } - using (var deleteForm = new DeleteForm(string.Format(DeleteAllConsumerGroups, eventHubDescription.Path))) - { - if (deleteForm.ShowDialog() == DialogResult.OK) - { - var notificationHubList = new List(); - GetConsumerGroupList(notificationHubList, serviceBusTreeView.SelectedNode); - notificationHubList.Remove(DefaultConsumerGroupName); - serviceBusHelper.DeleteConsumerGroups(eventHubDescription.Path, notificationHubList); - refreshEntity_Click(null, null); - } - } - return; - } - // EventHub Node - if (serviceBusTreeView.SelectedNode.Tag is EventHubDescription) - { - var eventHubDescription = serviceBusTreeView.SelectedNode.Tag as EventHubDescription; - using (var deleteForm = new DeleteForm(eventHubDescription.Path, EventHubEntity.ToLower())) - { - if (deleteForm.ShowDialog() == DialogResult.OK) - { - serviceBusHelper.DeleteEventHub(eventHubDescription); - } - } - return; - } - // ConsumerGroup Node - if (serviceBusTreeView.SelectedNode.Tag is ConsumerGroupDescription) - { - var notificationHubDescription = serviceBusTreeView.SelectedNode.Tag as ConsumerGroupDescription; - using (var deleteForm = new DeleteForm(notificationHubDescription.Name, ConsumerGroupEntity.ToLower())) - { - if (deleteForm.ShowDialog() == DialogResult.OK) - { - serviceBusHelper.DeleteConsumerGroup(notificationHubDescription); - } - } - return; - } - // NotificationHub Node - if (serviceBusTreeView.SelectedNode.Tag is NotificationHubDescription) - { - var notificationHubDescription = serviceBusTreeView.SelectedNode.Tag as NotificationHubDescription; - using (var deleteForm = new DeleteForm(notificationHubDescription.Path, NotificationHubEntity.ToLower())) - { - if (deleteForm.ShowDialog() == DialogResult.OK) - { - await serviceBusHelper.DeleteNotificationHub(notificationHubDescription); - } - } - return; - } - // Subscriptions Node - if (serviceBusTreeView.SelectedNode.Text == SubscriptionEntities || - serviceBusTreeView.SelectedNode.Text == FilteredSubscriptionEntities) - { - var subscriptionDescriptions = serviceBusTreeView.SelectedNode. - Nodes. - Cast(). - Select(n => ((SubscriptionWrapper)n.Tag).SubscriptionDescription). - ToList(); - if (subscriptionDescriptions.Count > 0) - { - using (var deleteForm = new DeleteForm(DeleteAllSubscriptions)) - { - if (deleteForm.ShowDialog() == DialogResult.OK) - { - await serviceBusHelper.DeleteSubscriptions(subscriptionDescriptions); - } - } - } - return; - } - // Subscription Node - if (serviceBusTreeView.SelectedNode.Tag is SubscriptionWrapper) - { - var wrapper = serviceBusTreeView.SelectedNode.Tag as SubscriptionWrapper; - if (wrapper.TopicDescription != null && - wrapper.SubscriptionDescription != null) - { - using (var deleteForm = new DeleteForm(wrapper.SubscriptionDescription.Name, SubscriptionEntity.ToLower())) - { - if (deleteForm.ShowDialog() == DialogResult.OK) - { - await serviceBusHelper.DeleteSubscription(wrapper.SubscriptionDescription); - } - } - } - return; - } - // Rules Node - if (serviceBusTreeView.SelectedNode.Text == RuleEntities) - { - var ruleWrappers = serviceBusTreeView.SelectedNode. - Nodes. - Cast(). - Select(n => (RuleWrapper)n.Tag). - ToList(); - if (ruleWrappers.Count > 0) - { - using (var deleteForm = new DeleteForm(DeleteAllRules)) - { - deleteForm.ShowAccidentalDeletionPreventionCheck(configuration, "All rules in " + serviceBusNamespaceLocalName); - - if (deleteForm.ShowDialog() == DialogResult.OK) - { - serviceBusHelper.RemoveRules(ruleWrappers); - } - } - } - return; - } - // Rule Node - if (serviceBusTreeView.SelectedNode.Tag is RuleWrapper) - { - var wrapper = serviceBusTreeView.SelectedNode.Tag as RuleWrapper; - if (wrapper.SubscriptionDescription != null && - wrapper.RuleDescription != null) - { - using (var deleteForm = new DeleteForm(wrapper.RuleDescription.Name, RuleEntity.ToLower())) - { - if (deleteForm.ShowDialog() == DialogResult.OK) - { - serviceBusHelper.RemoveRule(wrapper.SubscriptionDescription, wrapper.RuleDescription); - } - } - } + var queue = serviceBusTreeView.SelectedNode.Tag as RelayDescription; + TestRelay(queue, false); } } } @@ -2702,31 +2651,49 @@ private async void deleteEntity_Click(object sender, EventArgs e) { HandleException(ex); } - finally - { - Cursor.Current = Cursors.Default; - } } - private void changeStatusQueueMenuItem_DropDownOpening(object sender, System.EventArgs e) + private void createEntityListenerMenuItem_Click(object sender, EventArgs e) { try { - var tag = serviceBusTreeView.SelectedNode.Tag as QueueDescription; - if (tag != null) + if (serviceBusTreeView.SelectedNode == null || ServiceBusTreeView.SelectedNode.Tag == null) { - // Put a check against the item that reflects the current status of the queue - var queueDescription = serviceBusHelper.GetQueue(tag.Path); - var status = queueDescription.Status; - foreach (var dropDownItem in changeStatusQueueMenuItem.DropDownItems) - { - var dropDownMenuItem = dropDownItem as ToolStripMenuItem; - dropDownMenuItem.Checked = (EntityStatus)dropDownMenuItem.Tag == status; - } + return; } - else + + // QueueDescription Node + if (serviceBusTreeView.SelectedNode.Tag is QueueDescription) { - throw new NotSupportedException("Not supported for entity types other than queues."); + var queueDescription = serviceBusTreeView.SelectedNode.Tag as QueueDescription; + var form = new ContainerForm(serviceBusHelper, this, FormTypeEnum.Listener, queueDescription); + form.Show(); + return; + } + + // SubscriptionDescription Node + if (serviceBusTreeView.SelectedNode.Tag is SubscriptionWrapper) + { + var subscriptionWrapper = serviceBusTreeView.SelectedNode.Tag as SubscriptionWrapper; + var form = new ContainerForm(serviceBusHelper, this, FormTypeEnum.Listener, subscriptionWrapper); + form.Show(); + } + + // ConsumerGroup Node + if (serviceBusTreeView.SelectedNode.Tag is ConsumerGroupDescription) + { + var consumerGroupPartition = serviceBusTreeView.SelectedNode.Tag as ConsumerGroupDescription; + var form = new ContainerForm(serviceBusHelper, this, consumerGroupPartition, GetPartitionsFromConsumerGroup(serviceBusTreeView.SelectedNode)); + form.Show(); + } + + // PartitionDescription Node + if (serviceBusTreeView.SelectedNode.Tag is PartitionDescription) + { + var consumerGroupPartition = serviceBusTreeView.SelectedNode.Parent.Parent.Tag as ConsumerGroupDescription; + var partitionDescription = serviceBusTreeView.SelectedNode.Tag as PartitionDescription; + var form = new ContainerForm(serviceBusHelper, this, consumerGroupPartition, new[] { partitionDescription }); + form.Show(); } } catch (Exception ex) @@ -2735,286 +2702,380 @@ private void changeStatusQueueMenuItem_DropDownOpening(object sender, System.Eve } } - private void changeStatusQueue_Click(object sender, ToolStripItemClickedEventArgs e) + private void serviceBusTreeView_BeforeExpand(object sender, TreeViewCancelEventArgs e) { - try - { - Cursor.Current = Cursors.WaitCursor; - if (serviceBusHelper != null && - serviceBusTreeView.SelectedNode != null) - { - if (serviceBusTreeView.SelectedNode.Tag is QueueDescription) - { - var queueDescription = serviceBusTreeView.SelectedNode.Tag as QueueDescription; + EnsureNodeHasBeenLazyLoaded(e.Node); + } + #endregion - var desiredStatus = (EntityStatus)e.ClickedItem.Tag; - using (var changeStatusForm = new ChangeStatusForm(queueDescription.Path, QueueEntity.ToLower(), desiredStatus)) - { - if (changeStatusForm.ShowDialog() == DialogResult.OK) - { - queueDescription.Status = (EntityStatus)e.ClickedItem.Tag; - serviceBusHelper.NamespaceManager.UpdateQueue(queueDescription); - refreshEntity_Click(null, null); - } - } - } - else - { - throw new NotSupportedException("Not supported for entity types other than queues."); - } - } - } - catch (Exception ex) + #region Public Methods + public void HandleException(Exception ex) + { + if (string.IsNullOrWhiteSpace(ex?.Message)) { - HandleException(ex); + return; } - finally + WriteToLog(string.Format(CultureInfo.CurrentCulture, ExceptionFormat, ex.Message)); + if (!string.IsNullOrWhiteSpace(ex.InnerException?.Message)) { - Cursor.Current = Cursors.Default; + WriteToLog(string.Format(CultureInfo.CurrentCulture, InnerExceptionFormat, ex.InnerException.Message)); } } - private async void changeStatusEntity_Click(object sender, EventArgs e) + public void RefreshSelectedEntity() { try { - Cursor.Current = Cursors.WaitCursor; - if (serviceBusHelper != null && - serviceBusTreeView.SelectedNode != null) + serviceBusTreeView.SuspendDrawing(); + serviceBusTreeView.SuspendLayout(); + serviceBusTreeView.BeginUpdate(); + var queueListNode = FindNode(Constants.QueueEntities, rootNode); + var topicListNode = FindNode(Constants.TopicEntities, rootNode); + var eventHubListNode = FindNode(Constants.EventHubEntities, rootNode); + var notificationHubListNode = FindNode(Constants.NotificationHubEntities, rootNode); + var relayServiceListNode = FindNode(Constants.RelayEntities, rootNode); + if (serviceBusTreeView.SelectedNode != null) { - // Queue Node - if (serviceBusTreeView.SelectedNode.Tag is QueueDescription) + // Queues + if (serviceBusTreeView.SelectedNode == queueListNode) { - var queueDescription = serviceBusTreeView.SelectedNode.Tag as QueueDescription; - using (var changeQueueStatusForm = new ChangeQueueStatusForm(queueDescription.Status)) - { - if (changeQueueStatusForm.ShowDialog() == DialogResult.OK) - { - queueDescription.Status = changeQueueStatusForm.EntityStatus; - serviceBusHelper.NamespaceManager.UpdateQueue(queueDescription); - refreshEntity_Click(null, null); - } - } + ShowEntities(EntityType.Queue); return; } - // Topic Node - if (serviceBusTreeView.SelectedNode.Tag is TopicDescription) + + // Topics + if (serviceBusTreeView.SelectedNode == topicListNode) { - var topicDescription = serviceBusTreeView.SelectedNode.Tag as TopicDescription; - var desiredStatus = topicDescription.Status == EntityStatus.Active - ? EntityStatus.Disabled - : EntityStatus.Active; - using (var changeStatusForm = new ChangeStatusForm(topicDescription.Path, TopicEntity.ToLower(), desiredStatus)) - { - if (changeStatusForm.ShowDialog() == DialogResult.OK) - { - topicDescription.Status = desiredStatus; - serviceBusHelper.NamespaceManager.UpdateTopic(topicDescription); - refreshEntity_Click(null, null); - changeStatusTopicMenuItem.Text = topicDescription.Status == EntityStatus.Active - ? DisableTopic - : EnableTopic; - var item = actionsToolStripMenuItem.DropDownItems[ChangeStatusTopicMenuItem]; - if (item != null) - { - item.Text = changeStatusTopicMenuItem.Text; - } - } - } + ShowEntities(EntityType.Topic); return; } - // Subscription Node - if (serviceBusTreeView.SelectedNode.Tag is SubscriptionWrapper) - { - var wrapper = serviceBusTreeView.SelectedNode.Tag as SubscriptionWrapper; - if (wrapper.TopicDescription != null && - wrapper.SubscriptionDescription != null) + // Event Hubs + if (serviceBusTreeView.SelectedNode == eventHubListNode) + { + ShowEntities(EntityType.EventHub); + return; + } + + // Notification Hubs + if (serviceBusTreeView.SelectedNode == notificationHubListNode) + { + ShowEntities(EntityType.NotificationHub); + return; + } + + // Relays + if (serviceBusTreeView.SelectedNode == relayServiceListNode) + { + ShowEntities(EntityType.Relay); + return; + } + + if (serviceBusTreeView.SelectedNode.Tag == null) + { + return; + } + + // Queue Node + var tag = serviceBusTreeView.SelectedNode.Tag as QueueDescription; + if (tag != null) + { + var queueDescription = serviceBusHelper.GetQueue(tag.Path); + RefreshQueueNode(serviceBusTreeView.SelectedNode, queueDescription); + + // Update the right view + var control = panelMain.Controls[0] as HandleQueueControl; + if (control != null) { - var desiredStatus = wrapper.SubscriptionDescription.Status = wrapper.SubscriptionDescription.Status == EntityStatus.Active - ? EntityStatus.Disabled - : EntityStatus.Active; - using (var changeStatusForm = new ChangeStatusForm(wrapper.SubscriptionDescription.Name, SubscriptionEntity.ToLower(), desiredStatus)) + control.RefreshData(queueDescription); + WriteToLog(string.Format(QueueRetrievedFormat, queueDescription.Path), false); + } + + return; + } + + // Individual Topic Node + var selectedNodeTag = serviceBusTreeView.SelectedNode.Tag as TopicDescription; + if (selectedNodeTag != null) + { + var topicDescription = serviceBusHelper.GetTopic(selectedNodeTag.Path); + RefreshTopicNode(serviceBusTreeView.SelectedNode, topicDescription); + + var control = panelMain.Controls[0] as HandleTopicControl; + if (control != null) + { + control.RefreshData(topicDescription); + WriteToLog(string.Format(TopicRetrievedFormat, topicDescription.Path), false); + } + + return; + } + + // Relay Node + var nodeTag = serviceBusTreeView.SelectedNode.Tag as RelayDescription; + if (nodeTag != null) + { + var description = nodeTag; + if (description.IsDynamic) + { + var relayCollection = serviceBusHelper.GetRelays(MainForm.SingletonMainForm.ServerTimeout); + var relayDescriptions = relayCollection as IList ?? relayCollection.ToList(); + if (relayDescriptions.Any()) { - if (changeStatusForm.ShowDialog() == DialogResult.OK) + var relayDescription = relayDescriptions.First(r => string.Compare(r.Path, + description.Path, + StringComparison.InvariantCultureIgnoreCase) == 0); + if (relayDescription != null) { - wrapper.SubscriptionDescription.Status = desiredStatus; - serviceBusHelper.NamespaceManager.UpdateSubscription(wrapper.SubscriptionDescription); - refreshEntity_Click(null, null); - changeStatusSubscriptionMenuItem.Text = wrapper.SubscriptionDescription.Status == EntityStatus.Active - ? DisableSubscription - : EnableSubscription; - var item = actionsToolStripMenuItem.DropDownItems[ChangeStatusSubscriptionMenuItem]; - if (item != null) + var control = panelMain.Controls[0] as HandleRelayControl; + if (control != null) { - item.Text = changeStatusSubscriptionMenuItem.Text; + control.RefreshData(relayDescription); + WriteToLog(string.Format(RelayRetrievedFormat, relayDescription.Path), false); } } } } + else + { + var relayDescription = serviceBusHelper.GetRelay(description.Path); + serviceBusTreeView.SelectedNode.ImageIndex = RelayLeafIconIndex; + serviceBusTreeView.SelectedNode.SelectedImageIndex = RelayLeafIconIndex; + serviceBusTreeView.SelectedNode.Tag = relayDescription; + var control = panelMain.Controls[0] as HandleRelayControl; + if (control != null) + { + control.RefreshData(relayDescription); + WriteToLog(string.Format(RelayRetrievedFormat, relayDescription.Path), false); + } + } + return; } - // Event Hub - if (serviceBusTreeView.SelectedNode.Tag is EventHubDescription) + + // Partitions Node + if (serviceBusTreeView.SelectedNode.Text == PartitionEntities) { + var isExpanded = serviceBusTreeView.SelectedNode.IsExpanded; var eventHubDescription = serviceBusTreeView.SelectedNode.Tag as EventHubDescription; - var desiredStatus = eventHubDescription.Status = eventHubDescription.Status == EntityStatus.Active - ? EntityStatus.Disabled - : EntityStatus.Active; - using (var changeStatusForm = new ChangeStatusForm(eventHubDescription.Path, EventHubEntity.ToLower(), desiredStatus)) + if (eventHubDescription == null) { - if (changeStatusForm.ShowDialog() == DialogResult.OK) - { - eventHubDescription.Status = desiredStatus; - await serviceBusHelper.NamespaceManager.UpdateEventHubAsync(eventHubDescription); - refreshEntity_Click(null, null); - changeStatusEventHubMenuItem.Text = eventHubDescription.Status == EntityStatus.Active - ? DisableEventHub - : EnableEventHub; - var item = actionsToolStripMenuItem.DropDownItems[ChangeStatusEventHubMenuItem]; - if (item != null) - { - item.Text = changeStatusEventHubMenuItem.Text; - } - } + return; + } + serviceBusTreeView.SelectedNode.Nodes.Clear(); + var parent = serviceBusTreeView.SelectedNode.Parent; + CreateEventHubPartitions(eventHubDescription, parent); + var partitionsNode = parent.Nodes.Cast().First(n => n.Name == PartitionEntities); + if (partitionsNode == null) + { + return; } + serviceBusTreeView.SelectedNode = partitionsNode; + if (isExpanded) + { + partitionsNode.Expand(); + } + return; + } + // Consumer Groups Node + if (serviceBusTreeView.SelectedNode.Text == ConsumerGroupEntities) + { + var isExpanded = serviceBusTreeView.SelectedNode.IsExpanded; + var eventHubDescription = serviceBusTreeView.SelectedNode.Tag as EventHubDescription; + if (eventHubDescription == null) + { + return; + } + serviceBusTreeView.SelectedNode.Nodes.Clear(); + var parent = serviceBusTreeView.SelectedNode.Parent; + var partitions = GetPartitionsFromPartitionIds(eventHubDescription); + var partitionDescriptions = partitions as IList ?? partitions.ToList(); + CreateEventHubConsumerGroups(eventHubDescription, parent, partitionDescriptions); + var consumerGroupsNode = parent.Nodes.Cast().First(n => n.Name == ConsumerGroupEntities); + if (consumerGroupsNode == null) + { + return; + } + serviceBusTreeView.SelectedNode = consumerGroupsNode; + if (isExpanded) + { + consumerGroupsNode.Expand(); + } + return; } - } - } - catch (Exception ex) - { - HandleException(ex); - } - finally - { - Cursor.Current = Cursors.Default; - } - } - private void testEntityInSDIMode_Click(object sender, EventArgs e) - { - try - { - if (serviceBusTreeView.SelectedNode == null) - { - return; - } - if (serviceBusTreeView.SelectedNode.Tag == null) - { - return; - } - // QueueDescription Node - if (serviceBusTreeView.SelectedNode.Tag is QueueDescription) - { - var queue = serviceBusTreeView.SelectedNode.Tag as QueueDescription; - panelMain.HeaderText = string.Format(TestQueueFormat, queue.Path); - TestQueue(queue, true); - return; - } - // TopicDescription Node - if (serviceBusTreeView.SelectedNode.Tag is TopicDescription) - { - var topic = serviceBusTreeView.SelectedNode.Tag as TopicDescription; - var subscriptionList = new List(); - if (serviceBusTreeView.SelectedNode.Nodes.ContainsKey(SubscriptionEntities)) + // Event Hub Node + if (serviceBusTreeView.SelectedNode.Tag is EventHubDescription) { - var subscriptionsNode = serviceBusTreeView.SelectedNode.Nodes[SubscriptionEntities]; - if (subscriptionsNode != null && - subscriptionsNode.Nodes.Count > 0) + var eventHubDescription = serviceBusHelper.GetEventHub(((EventHubDescription)serviceBusTreeView.SelectedNode.Tag).Path); + if (eventHubDescription.Status == EntityStatus.Active) { - for (var i = 0; i < subscriptionsNode.Nodes.Count; i++) + serviceBusTreeView.SelectedNode.ImageIndex = EventHubIconIndex; + serviceBusTreeView.SelectedNode.SelectedImageIndex = EventHubIconIndex; + } + else + { + serviceBusTreeView.SelectedNode.ImageIndex = GreyEventHubIconIndex; + serviceBusTreeView.SelectedNode.SelectedImageIndex = GreyEventHubIconIndex; + } + serviceBusTreeView.SelectedNode.Tag = eventHubDescription; + var control = panelMain.Controls[0] as HandleEventHubControl; + if (control != null) + { + control.RefreshData(eventHubDescription); + WriteToLog(string.Format(EventHubRetrievedFormat, eventHubDescription.Path), false); + } + return; + } + + // Partition Node + if (serviceBusTreeView.SelectedNode.Tag is PartitionDescription) + { + var partitionDescription = (PartitionDescription)serviceBusTreeView.SelectedNode.Tag; + var consumerGroup = serviceBusTreeView.SelectedNode.Parent.Parent.Tag as ConsumerGroupDescription; + var consumerGroupName = consumerGroup != null ? consumerGroup.Name : null; + var partition = serviceBusHelper.GetPartition(partitionDescription.EventHubPath, consumerGroupName, partitionDescription.PartitionId); + if (partition != null) + { + serviceBusTreeView.SelectedNode.Tag = partitionDescription; + var control = panelMain.Controls[0] as HandlePartitionControl; + if (control != null) { - var wrapper = subscriptionsNode.Nodes[i].Tag as SubscriptionWrapper; - if (wrapper != null && - wrapper.SubscriptionDescription != null) - { - subscriptionList.Add(wrapper.SubscriptionDescription); - } + control.RefreshData(partition); + WriteToLog(string.Format(PartitionRetrievedFormat, partitionDescription.PartitionId, partitionDescription.EventHubPath), false); } } + return; + } + // Consumer Group Node + if (serviceBusTreeView.SelectedNode.Tag is ConsumerGroupDescription consumerGroupDescription) + { + consumerGroupDescription = serviceBusHelper.GetConsumerGroup(consumerGroupDescription.EventHubPath, consumerGroupDescription.Name); + serviceBusTreeView.SelectedNode.Tag = consumerGroupDescription; + var control = panelMain.Controls[0] as HandleConsumerGroupControl; + if (control != null) + { + control.RefreshData(consumerGroupDescription); + WriteToLog(string.Format(ConsumerGroupRetrievedFormat, consumerGroupDescription.Name, consumerGroupDescription.EventHubPath), false); + } + return; } - panelMain.HeaderText = string.Format(TestTopicFormat, topic.Path); - TestTopic(topic, subscriptionList, true); - return; - } - - // SubscriptionDescription Node - if (serviceBusTreeView.SelectedNode.Tag is SubscriptionWrapper) - { - var subscriptionWrapper = serviceBusTreeView.SelectedNode.Tag as SubscriptionWrapper; - panelMain.HeaderText = string.Format(TestSubscriptionFormat, subscriptionWrapper.SubscriptionDescription.Name); - TestSubscription(subscriptionWrapper, true); - } - - // RelayDescription Node - if (serviceBusTreeView.SelectedNode.Tag is RelayDescription) - { - var relay = serviceBusTreeView.SelectedNode.Tag as RelayDescription; - panelMain.HeaderText = string.Format(TestRelayFormat, relay.Path); - TestRelay(relay, true); - } - } - catch (Exception ex) - { - HandleException(ex); - } - } - - private void testEntityInMDIMode_Click(object sender, EventArgs e) - { - try - { - if (serviceBusTreeView.SelectedNode != null) - { - if (serviceBusTreeView.SelectedNode.Tag == null) + // Notification Hub Node + if (serviceBusTreeView.SelectedNode.Tag is NotificationHubDescription) { + var notificationHubDescription = serviceBusHelper.GetNotificationHub(((NotificationHubDescription)serviceBusTreeView.SelectedNode.Tag).Path); + serviceBusTreeView.SelectedNode.ImageIndex = NotificationHubIconIndex; + serviceBusTreeView.SelectedNode.SelectedImageIndex = NotificationHubIconIndex; + serviceBusTreeView.SelectedNode.Tag = notificationHubDescription; + var control = panelMain.Controls[0] as HandleNotificationHubControl; + if (control != null) + { + control.RefreshData(notificationHubDescription); + WriteToLog(string.Format(NotificationHubRetrievedFormat, notificationHubDescription.Path), false); + } return; } - // QueueDescription Node - if (serviceBusTreeView.SelectedNode.Tag is QueueDescription) + // Subscriptions Node + if (serviceBusTreeView.SelectedNode.Text == SubscriptionEntities || + serviceBusTreeView.SelectedNode.Text == FilteredSubscriptionEntities) { - var queue = serviceBusTreeView.SelectedNode.Tag as QueueDescription; - TestQueue(queue, false); + var wrapper = serviceBusTreeView.SelectedNode.Tag as SubscriptionWrapper; + if (wrapper == null) + { + return; + } + var subscriptions = serviceBusHelper.GetSubscriptions(wrapper.TopicDescription, wrapper.Filter); + var subscriptionDescriptions = subscriptions as IList ?? subscriptions.ToList(); + if ((subscriptionDescriptions.Any()) || + !string.IsNullOrWhiteSpace(wrapper.Filter)) + { + var subscriptionsNode = serviceBusTreeView.SelectedNode; + subscriptionsNode.Text = string.IsNullOrWhiteSpace(wrapper.Filter) ? + SubscriptionEntities : + FilteredSubscriptionEntities; + subscriptionsNode.Nodes.Clear(); + foreach (var subscription in subscriptionDescriptions) + { + var subscriptionNode = subscriptionsNode.Nodes.Add(subscription.Name, + GetNameAndMessageCountText(subscription.Name, subscription.MessageCountDetails), + subscription.Status == EntityStatus.Active ? SubscriptionIconIndex : GreySubscriptionIconIndex, + subscription.Status == EntityStatus.Active ? SubscriptionIconIndex : GreySubscriptionIconIndex); + subscriptionNode.ContextMenuStrip = subscriptionContextMenuStrip; + subscriptionNode.Tag = new SubscriptionWrapper(subscription, wrapper.TopicDescription); + WriteToLog(string.Format(CultureInfo.CurrentCulture, SubscriptionRetrievedFormat, subscription.Name, wrapper.TopicDescription.Path), false); + var rules = serviceBusHelper.GetRules(subscription); + var ruleDescriptions = rules as RuleDescription[] ?? rules.ToArray(); + if (ruleDescriptions.Any()) + { + subscriptionNode.Nodes.Clear(); + var rulesNode = subscriptionNode.Nodes.Add(RuleEntities, RuleEntities, RuleListIconIndex, RuleListIconIndex); + rulesNode.ContextMenuStrip = rulesContextMenuStrip; + rulesNode.Tag = new RuleWrapper(null, subscription); + foreach (var rule in ruleDescriptions) + { + var ruleNode = rulesNode.Nodes.Add(rule.Name, rule.Name, RuleIconIndex, RuleIconIndex); + ruleNode.ContextMenuStrip = ruleContextMenuStrip; + ruleNode.Tag = new RuleWrapper(rule, subscription); + WriteToLog(string.Format(CultureInfo.CurrentCulture, RuleRetrievedFormat, rule.Name, subscription.Name, wrapper.TopicDescription.Path), false); + } + } + } + } return; } - // TopicDescription Node - if (serviceBusTreeView.SelectedNode.Tag is TopicDescription) + // Rules Node + if (serviceBusTreeView.SelectedNode.Text == RuleEntities) { - var topic = serviceBusTreeView.SelectedNode.Tag as TopicDescription; - var subscriptionList = new List(); - if (serviceBusTreeView.SelectedNode.Nodes.ContainsKey(SubscriptionEntities)) + var wrapper = serviceBusTreeView.SelectedNode.Tag as RuleWrapper; + if (wrapper == null) { - var subscriptionsNode = serviceBusTreeView.SelectedNode.Nodes[SubscriptionEntities]; - if (subscriptionsNode != null && - subscriptionsNode.Nodes.Count > 0) + return; + } + var rules = serviceBusHelper.GetRules(wrapper.SubscriptionDescription); + var ruleDescriptions = rules as RuleDescription[] ?? rules.ToArray(); + if (ruleDescriptions.Any()) + { + var rulesNode = serviceBusTreeView.SelectedNode; + rulesNode.Nodes.Clear(); + foreach (var rule in ruleDescriptions) { - for (var i = 0; i < subscriptionsNode.Nodes.Count; i++) - { - var wrapper = subscriptionsNode.Nodes[i].Tag as SubscriptionWrapper; - if (wrapper != null && - wrapper.SubscriptionDescription != null) - { - subscriptionList.Add(wrapper.SubscriptionDescription); - } - } + var ruleNode = rulesNode.Nodes.Add(rule.Name, rule.Name, RuleIconIndex, RuleIconIndex); + ruleNode.ContextMenuStrip = ruleContextMenuStrip; + ruleNode.Tag = new RuleWrapper(rule, wrapper.SubscriptionDescription); + WriteToLog(string.Format(CultureInfo.CurrentCulture, RuleRetrievedFormat, rule.Name, wrapper.SubscriptionDescription.Name, wrapper.SubscriptionDescription.TopicPath), false); } } - TestTopic(topic, subscriptionList, false); return; } - // SubscriptionDescription Node - if (serviceBusTreeView.SelectedNode.Tag is SubscriptionWrapper) + // Individual Subscription Node + if (serviceBusTreeView.SelectedNode.Tag is SubscriptionWrapper subWrapper) { - var subscriptionWrapper = serviceBusTreeView.SelectedNode.Tag as SubscriptionWrapper; - TestSubscription(subscriptionWrapper, false); - } + var subscriptionDescription = serviceBusHelper.GetSubscription(subWrapper.SubscriptionDescription.TopicPath, subWrapper.SubscriptionDescription.Name); + subWrapper = new SubscriptionWrapper(subscriptionDescription, subWrapper.TopicDescription); + if (subscriptionDescription.Status == EntityStatus.Active) + { + serviceBusTreeView.SelectedNode.ImageIndex = SubscriptionIconIndex; + serviceBusTreeView.SelectedNode.SelectedImageIndex = SubscriptionIconIndex; + } + else + { + serviceBusTreeView.SelectedNode.ImageIndex = GreySubscriptionIconIndex; + serviceBusTreeView.SelectedNode.SelectedImageIndex = GreySubscriptionIconIndex; + } + serviceBusTreeView.SelectedNode.Tag = subWrapper; - // RelayDescription Node - if (serviceBusTreeView.SelectedNode.Tag is RelayDescription) - { - var queue = serviceBusTreeView.SelectedNode.Tag as RelayDescription; - TestRelay(queue, false); + if (panelMain.Controls[0] is HandleSubscriptionControl control ) + { + control.RefreshData(subWrapper); + WriteToLog(string.Format(SubscriptionRetrievedFormat, + subWrapper.SubscriptionDescription.Name, + subWrapper.SubscriptionDescription.TopicPath), + false); + } + serviceBusTreeView.SelectedNode.Text = GetNameAndMessageCountText(serviceBusTreeView.SelectedNode.Name, subscriptionDescription.MessageCountDetails); + + RefreshIndividualSubscription(subscriptionDescription, serviceBusTreeView.SelectedNode); } } } @@ -3022,85 +3083,49 @@ private void testEntityInMDIMode_Click(object sender, EventArgs e) { HandleException(ex); } + finally + { + serviceBusTreeView.ResumeDrawing(); + serviceBusTreeView.ResumeLayout(); + serviceBusTreeView.EndUpdate(); + } } - private void createEntityListenerMenuItem_Click(object sender, EventArgs e) + public void RefreshQueues() { - try - { - if (serviceBusTreeView.SelectedNode == null || ServiceBusTreeView.SelectedNode.Tag == null) - { - return; - } - - // QueueDescription Node - if (serviceBusTreeView.SelectedNode.Tag is QueueDescription) - { - var queueDescription = serviceBusTreeView.SelectedNode.Tag as QueueDescription; - var form = new ContainerForm(serviceBusHelper, this, FormTypeEnum.Listener, queueDescription); - form.Show(); - return; - } - - // SubscriptionDescription Node - if (serviceBusTreeView.SelectedNode.Tag is SubscriptionWrapper) - { - var subscriptionWrapper = serviceBusTreeView.SelectedNode.Tag as SubscriptionWrapper; - var form = new ContainerForm(serviceBusHelper, this, FormTypeEnum.Listener, subscriptionWrapper); - form.Show(); - } - - // ConsumerGroup Node - if (serviceBusTreeView.SelectedNode.Tag is ConsumerGroupDescription) - { - var consumerGroupPartition = serviceBusTreeView.SelectedNode.Tag as ConsumerGroupDescription; - var form = new ContainerForm(serviceBusHelper, this, consumerGroupPartition, GetPartitionsFromConsumerGroup(serviceBusTreeView.SelectedNode)); - form.Show(); - } - - // PartitionDescription Node - if (serviceBusTreeView.SelectedNode.Tag is PartitionDescription) - { - var consumerGroupPartition = serviceBusTreeView.SelectedNode.Parent.Parent.Tag as ConsumerGroupDescription; - var partitionDescription = serviceBusTreeView.SelectedNode.Tag as PartitionDescription; - var form = new ContainerForm(serviceBusHelper, this, consumerGroupPartition, new[] { partitionDescription }); - form.Show(); - } - } - catch (Exception ex) - { - HandleException(ex); - } + ShowEntities(EntityType.Queue); } - private void serviceBusTreeView_BeforeExpand(object sender, TreeViewCancelEventArgs e) + public void RefreshTopics() { - EnsureNodeHasBeenLazyLoaded(e.Node); + ShowEntities(EntityType.Topic); } - #endregion - #region Public Methods - public void HandleException(Exception ex) + public async Task RefreshServiceBusEntityNode(string path) { - if (string.IsNullOrWhiteSpace(ex?.Message)) + var serviceBusHelper2 = serviceBusHelper.GetServiceBusHelper2(); + + if (await serviceBusHelper2.IsQueue(path)) { + var queueDescription = serviceBusHelper.GetQueue(path); + var queueListNode = FindNode(Constants.QueueEntities, rootNode); + var queueNode = FindNode(path, queueListNode); + + RefreshQueueNode(queueNode, queueDescription); return; } - WriteToLog(string.Format(CultureInfo.CurrentCulture, ExceptionFormat, ex.Message)); - if (!string.IsNullOrWhiteSpace(ex.InnerException?.Message)) + + if (await serviceBusHelper2.IsTopic(path)) { - WriteToLog(string.Format(CultureInfo.CurrentCulture, InnerExceptionFormat, ex.InnerException.Message)); - } - } + var topicDescription = serviceBusHelper.GetTopic(path); + var topicListNode = FindNode(Constants.TopicEntities, rootNode); + var topicNode = FindNode(path, topicListNode); - public void RefreshQueues() - { - GetEntities(EntityType.Queue); - } + RefreshTopicNode(topicNode, topicDescription); + return; + } - public void RefreshTopics() - { - GetEntities(EntityType.Topic); + WriteToLog($"{path} is neither a queue nor a topic so there was no update in the tree view."); } #endregion @@ -3148,7 +3173,7 @@ private async void AsyncWriteToLog() } if (InvokeRequired) { - Invoke(new Action(InternalWriteToLog), new object[] { message }); + Invoke(new Action(InternalWriteToLog), message); } else { @@ -3240,6 +3265,7 @@ private void HandleNodeMouseClick(TreeNode node) // Ensure that the node has loaded its children EnsureNodeHasBeenLazyLoaded(node); + // Root Node if (node == rootNode) { @@ -3320,14 +3346,15 @@ private void HandleNodeMouseClick(TreeNode node) actionsToolStripMenuItem.DropDownItems.AddRange(list.ToArray()); return; } + if (node.Tag == null) { return; } + // Url Segment Node - if (node.Tag is UrlSegmentWrapper) + if (node.Tag is UrlSegmentWrapper urlSegmentWrapper) { - var urlSegmentWrapper = node.Tag as UrlSegmentWrapper; if (urlSegmentWrapper.EntityType == EntityType.Queue) { var list = CloneItems(queueFolderContextMenuStrip.Items); @@ -3342,10 +3369,10 @@ private void HandleNodeMouseClick(TreeNode node) } return; } + // Queue Node - if (node.Tag is QueueDescription) + if (node.Tag is QueueDescription queueDescription) { - var queueDescription = node.Tag as QueueDescription; getQueueMessageSessionsMenuItem.Visible = queueDescription.RequiresSession; getQueueMessageSessionsSeparator.Visible = queueDescription.RequiresSession; queueReceiveMessagesMenuItem.Visible = string.IsNullOrWhiteSpace(queueDescription.ForwardTo); @@ -3357,10 +3384,10 @@ private void HandleNodeMouseClick(TreeNode node) ShowQueue(queueDescription, null); return; } + // Topic Node - if (node.Tag is TopicDescription) + if (node.Tag is TopicDescription topicDescription) { - var topicDescription = node.Tag as TopicDescription; changeStatusTopicMenuItem.Text = topicDescription.Status == EntityStatus.Active ? DisableTopic : EnableTopic; var list = CloneItems(topicContextMenuStrip.Items); AddImportAndSeparatorMenuItems(list); @@ -3369,10 +3396,10 @@ private void HandleNodeMouseClick(TreeNode node) ShowTopic(topicDescription, null); return; } + // Relay Node - if (node.Tag is RelayDescription) + if (node.Tag is RelayDescription relayDescription) { - var relayDescription = node.Tag as RelayDescription; deleteRelayMenuItem.Visible = !relayDescription.IsDynamic; exportRelayMenuItem.Visible = !relayDescription.IsDynamic; relayToolStripSeparator1.Visible = !relayDescription.IsDynamic; @@ -3384,10 +3411,10 @@ private void HandleNodeMouseClick(TreeNode node) ShowRelay(relayDescription, null); return; } + // EventHub Node - if (node.Tag is EventHubDescription) + if (node.Tag is EventHubDescription eventHubDescription) { - var eventHubDescription = node.Tag as EventHubDescription; changeStatusEventHubMenuItem.Text = eventHubDescription.Status == EntityStatus.Active ? DisableEventHub : EnableEventHub; var list = CloneItems(eventHubContextMenuStrip.Items); AddImportAndSeparatorMenuItems(list); @@ -3396,10 +3423,10 @@ private void HandleNodeMouseClick(TreeNode node) ShowEventHub(eventHubDescription); return; } + // Partition Node - if (node.Tag is PartitionDescription) + if (node.Tag is PartitionDescription partitionDescription) { - var partitionDescription = node.Tag as PartitionDescription; var list = CloneItems(partitionContextMenuStrip.Items); AddImportAndSeparatorMenuItems(list); actionsToolStripMenuItem.DropDownItems.AddRange(list.ToArray()); @@ -3412,21 +3439,21 @@ private void HandleNodeMouseClick(TreeNode node) ShowPartition(partitionDescription); return; } + // Consumer Group - if (node.Tag is ConsumerGroupDescription) + if (node.Tag is ConsumerGroupDescription consumerGroupDescription) { - var notificationHubDescription = node.Tag as ConsumerGroupDescription; var list = CloneItems(notificationHubContextMenuStrip.Items); AddImportAndSeparatorMenuItems(list); actionsToolStripMenuItem.DropDownItems.AddRange(list.ToArray()); - panelMain.HeaderText = string.Format(ViewConsumerGroupFormat, notificationHubDescription.Name); - ShowConsumerGroup(notificationHubDescription, notificationHubDescription.EventHubPath); + panelMain.HeaderText = string.Format(ViewConsumerGroupFormat, consumerGroupDescription.Name); + ShowConsumerGroup(consumerGroupDescription, consumerGroupDescription.EventHubPath); return; } + // NotificationHub Node - if (node.Tag is NotificationHubDescription) + if (node.Tag is NotificationHubDescription notificationHubDescription) { - var notificationHubDescription = node.Tag as NotificationHubDescription; var list = CloneItems(notificationHubContextMenuStrip.Items); AddImportAndSeparatorMenuItems(list); actionsToolStripMenuItem.DropDownItems.AddRange(list.ToArray()); @@ -3434,32 +3461,31 @@ private void HandleNodeMouseClick(TreeNode node) ShowNotificationHub(notificationHubDescription); return; } + // Subscription Node - if (node.Tag is SubscriptionWrapper) - { - var wrapper = node.Tag as SubscriptionWrapper; - changeStatusSubscriptionMenuItem.Text = wrapper.SubscriptionDescription.Status == EntityStatus.Active ? DisableSubscription : EnableSubscription; - getSubscriptionMessageSessionsMenuItem.Visible = wrapper.SubscriptionDescription.RequiresSession; - getSubscriptionMessageSessionsSeparator.Visible = wrapper.SubscriptionDescription.RequiresSession; - subReceiveMessagesMenuItem.Visible = string.IsNullOrWhiteSpace(wrapper.SubscriptionDescription.ForwardTo); - subReceiveToolStripSeparator.Visible = string.IsNullOrWhiteSpace(wrapper.SubscriptionDescription.ForwardTo); + if (node.Tag is SubscriptionWrapper subscriptionWrapper) + { + changeStatusSubscriptionMenuItem.Text = subscriptionWrapper.SubscriptionDescription.Status == EntityStatus.Active ? DisableSubscription : EnableSubscription; + getSubscriptionMessageSessionsMenuItem.Visible = subscriptionWrapper.SubscriptionDescription.RequiresSession; + getSubscriptionMessageSessionsSeparator.Visible = subscriptionWrapper.SubscriptionDescription.RequiresSession; + subReceiveMessagesMenuItem.Visible = string.IsNullOrWhiteSpace(subscriptionWrapper.SubscriptionDescription.ForwardTo); + subReceiveToolStripSeparator.Visible = string.IsNullOrWhiteSpace(subscriptionWrapper.SubscriptionDescription.ForwardTo); var list = CloneItems(subscriptionContextMenuStrip.Items); AddImportAndSeparatorMenuItems(list); actionsToolStripMenuItem.DropDownItems.AddRange(list.ToArray()); - panelMain.HeaderText = string.Format(ViewSubscriptionFormat, wrapper.SubscriptionDescription.Name); - ShowSubscription(wrapper); + panelMain.HeaderText = string.Format(ViewSubscriptionFormat, subscriptionWrapper.SubscriptionDescription.Name); + ShowSubscription(subscriptionWrapper); return; } // RuleDescription Node - if (node.Tag is RuleWrapper) + if (node.Tag is RuleWrapper ruleWrapper) { - var wrapper = node.Tag as RuleWrapper; var list = CloneItems(ruleContextMenuStrip.Items); AddImportAndSeparatorMenuItems(list); actionsToolStripMenuItem.DropDownItems.AddRange(list.ToArray()); - panelMain.HeaderText = string.Format(ViewRuleFormat, wrapper.RuleDescription.Name); - ShowRule(wrapper, null); + panelMain.HeaderText = string.Format(ViewRuleFormat, ruleWrapper.RuleDescription.Name); + ShowRule(ruleWrapper, null); } } catch (Exception ex) @@ -3899,6 +3925,40 @@ private void ReadEventHubPartitionCheckpointFile() } } + private void RefreshQueueNode(TreeNode node, QueueDescription queueDescription) + { + if (queueDescription.Status == EntityStatus.Active) + { + node.ImageIndex = QueueIconIndex; + node.SelectedImageIndex = QueueIconIndex; + } + else + { + node.ImageIndex = GreyQueueIconIndex; + node.SelectedImageIndex = GreyQueueIconIndex; + } + + node.Tag = queueDescription; + node.Text = GetNameAndMessageCountText(node.Name, queueDescription.MessageCountDetails); + } + + private void RefreshTopicNode(TreeNode node, TopicDescription topicDescription) + { + if (topicDescription.Status == EntityStatus.Active) + { + node.ImageIndex = TopicIconIndex; + node.SelectedImageIndex = TopicIconIndex; + } + else + { + node.ImageIndex = GreyTopicIconIndex; + node.SelectedImageIndex = GreyTopicIconIndex; + } + + node.Tag = topicDescription; + RefreshIndividualTopic(node); + } + private void SetControlSize(Control control) { var ok = false; @@ -3945,9 +4005,11 @@ private static string GetServiceBusNamespaceLocalName(string text) int separator = hostNameQualified.IndexOf('.'); if (separator < 0) + { return hostNameQualified; - else - return hostNameQualified.Substring(0, separator); + } + + return hostNameQualified.Substring(0, separator); } return text; @@ -4001,7 +4063,7 @@ public TreeView ServiceBusTreeView public string ProxyUserName { get; set; } public string ProxyPassword { get; set; } - public List NodesColors { get; set;} = new List(); + public List NodesColors { get; set; } = new List(); public BodyType MessageBodyType { @@ -4083,168 +4145,8 @@ private string LoadEntityFromFile(out string fileName) return null; } - /* - private void DeleteVoidRelaySubTree(TreeNode node) - { - var list = new List(); - InternalDeleteVoidRelaySubTree(node, list); - foreach(var item in list) - { - if (item != node) - { - serviceBusTreeView.Nodes.Remove(item); - } - } - } - - private static bool InternalDeleteVoidRelaySubTree(TreeNode node, ICollection list) - { - if (node == null || - node.Tag is RelayWrapper) - { - return false; - } - if (node.Nodes.Count == 0) - { - list.Add(node); - return true; - } - var ok = node.Nodes.Cast().Aggregate(true, (current, child) => InternalDeleteVoidRelaySubTree(child, list) && current); - if (ok) - { - list.Add(node); - return true; - } - return false; - } - - private void DeleteVoidNotificationHubSubTree(TreeNode node) - { - var list = new List(); - InternalDeleteVoidNotificationHubSubTree(node, list); - foreach (var item in list) - { - if (item != node) - { - serviceBusTreeView.Nodes.Remove(item); - } - } - } - - private static bool InternalDeleteVoidNotificationHubSubTree(TreeNode node, ICollection list) - { - if (node == null || - node.Tag is NotificationHubDescription) - { - return false; - } - if (node.Nodes.Count == 0) - { - list.Add(node); - return true; - } - var ok = node.Nodes.Cast().Aggregate(true, (current, child) => InternalDeleteVoidNotificationHubSubTree(child, list) && current); - if (ok) - { - list.Add(node); - return true; - } - return false; - } - - - private void CreateLeafNode(Uri uri, TreeNode parentNode, string parentTitle) - { - var newNode = parentNode.Nodes.Add(uri.AbsoluteUri, uri.AbsoluteUri); - WriteToLog(string.Format(LinkUriFormat, uri.AbsoluteUri), false); - newNode.ImageIndex = RelayUriIconIndex; - newNode.SelectedImageIndex = RelayUriIconIndex; - newNode.Tag = new RelayWrapper(parentTitle, uri); - newNode.ContextMenuStrip = relayServiceContextMenuStrip; - } - - private bool BuildRelaySubTree(Uri uri, TreeNode parentNode, string parentTitle) - { - XmlReader reader = null; - try - { - if (string.Compare(uri.Scheme, "http", StringComparison.OrdinalIgnoreCase) != 0 && - string.Compare(uri.Scheme, "https", StringComparison.OrdinalIgnoreCase) != 0) - { - CreateLeafNode(uri, parentNode, parentTitle); - return true; - } - try - { - reader = XmlReader.Create(uri.AbsoluteUri); - } - catch (WebException) - { - CreateLeafNode(uri, parentNode, parentTitle); - return true; - } - SyndicationFeed feed; - try - { - feed = SyndicationFeed.Load(reader); - } - catch (Exception) - { - if (reader.LocalName == FaultNode) - { - CreateLeafNode(uri, parentNode, parentTitle); - } - return true; - } - - if (feed == null || - !feed.Items.Any()) - { - return false; - } - - var ok = true; - foreach (var item in feed.Items) - { - if (item.Title == null || - string.IsNullOrWhiteSpace(item.Title.Text)) - { - continue; - } - var newNode = parentNode.Nodes.ContainsKey(item.Title.Text) ? - parentNode.Nodes[item.Title.Text] : - parentNode.Nodes.Add(item.Title.Text, item.Title.Text); - WriteToLog(string.Format(SyndicateItemFormat, item.Title.Text), false); - ok = item.Links.Aggregate(ok, (current, link) => BuildRelaySubTree(link.Uri, newNode, item.Title.Text) && current); - newNode.ImageIndex = ok ? RelayLeafIconIndex : RelayNonLeafIconIndex; - newNode.SelectedImageIndex = newNode.ImageIndex; - newNode.Tag = UrlEntity; - newNode.ContextMenuStrip = relayFolderContextMenuStrip; - } - return false; - } - catch (WebException) - { - } - catch (NotSupportedException) - { - } - catch (Exception ex) - { - HandleException(ex); - } - finally - { - if (reader != null) - { - reader.Close(); - } - } - return true; - } */ - // ReSharper disable once FunctionComplexityOverflow - private void GetEntities(EntityType entityType) + private void ShowEntities(EntityType entityType) { var updating = false; @@ -4506,7 +4408,7 @@ private void GetEntities(EntityType entityType) { if (ex is AggregateException) { - ex = ((AggregateException) ex).InnerExceptions.First(); + ex = ((AggregateException)ex).InnerExceptions.First(); } WriteToLog($"Failed to retrieve Service Bus topics. Exception: {ex}"); serviceBusTreeView.Nodes.Remove(topicListNode); @@ -5790,7 +5692,7 @@ private string GetNameAndMessageCountText(string name, MessageCountDetails detai } return sb.ToString(); } - + private void ReapplyColors(TreeNode parentNode) { if (parentNode == null) @@ -6279,7 +6181,7 @@ private void filterEntity_Click(object sender, EventArgs e) if (previousFilter != form.FilterExpression) { FilterExpressionHelper.QueueFilterExpression = form.FilterExpression; - GetEntities(EntityType.Queue); + ShowEntities(EntityType.Queue); } } } @@ -6296,7 +6198,7 @@ private void filterEntity_Click(object sender, EventArgs e) if (previousFilter != form.FilterExpression) { FilterExpressionHelper.TopicFilterExpression = form.FilterExpression; - GetEntities(EntityType.Topic); + ShowEntities(EntityType.Topic); } } } @@ -6318,7 +6220,7 @@ private void filterEntity_Click(object sender, EventArgs e) { wrapper.Filter = form.FilterExpression; } - refreshEntity_Click(null, null); + RefreshSelectedEntity(); } } } @@ -6538,7 +6440,7 @@ private void MainForm_Shown(object sender, EventArgs e) } panelMain.Controls.Clear(); panelMain.BackColor = SystemColors.Window; - GetEntities(EntityType.All); + ShowEntities(EntityType.All); } catch (Exception ex) { @@ -6649,7 +6551,6 @@ private void createEventHubListenerMenuItem_Click(object sender, EventArgs e) } } - private async void purgeMessages_Click(object sender, EventArgs e) { try diff --git a/src/ServiceBusExplorer/Forms/MessageForm.cs b/src/ServiceBusExplorer/Forms/MessageForm.cs index f162e0e7..78effd8c 100644 --- a/src/ServiceBusExplorer/Forms/MessageForm.cs +++ b/src/ServiceBusExplorer/Forms/MessageForm.cs @@ -459,9 +459,11 @@ private async void btnSubmit_Click(object sender, EventArgs e) { return; } + var sent = outboundMessages.Count; var stopwatch = new Stopwatch(); stopwatch.Start(); + if (chkRemove.Checked) { var messageHandler = CreateDeadLetterMessageHandler(); @@ -484,13 +486,25 @@ private async void btnSubmit_Click(object sender, EventArgs e) writeToLog(string.Format(MessageMovedMessage, result.DeletedSequenceNumbers.Count, messageSender.Path, stopwatch.ElapsedMilliseconds)); } + + if (null != queueDescription) + { + if (!messageSender.Path.Equals(queueDescription.Path, StringComparison.InvariantCultureIgnoreCase)) + { + await MainForm.SingletonMainForm.RefreshServiceBusEntityNode(queueDescription.Path); + } + } + else if (null != subscriptionWrapper?.SubscriptionDescription?.TopicPath) + { + await MainForm.SingletonMainForm.RefreshServiceBusEntityNode(subscriptionWrapper.SubscriptionDescription.TopicPath); + } } else { var messageIndex = 0; try { - while(messageIndex < outboundMessages.Count) + while (messageIndex < outboundMessages.Count) { await messageSender.SendAsync(outboundMessages[messageIndex++]); } @@ -508,6 +522,8 @@ private async void btnSubmit_Click(object sender, EventArgs e) writeToLog(string.Format(MessageSentMessage, sent, messageSender.Path, stopwatch.ElapsedMilliseconds)); } + await MainForm.SingletonMainForm.RefreshServiceBusEntityNode(messageSender.Path); + if (brokeredMessages != null) { Close();