diff --git a/src/Common/Common.csproj b/src/Common/Common.csproj index 1e16205a..3d6f7237 100644 --- a/src/Common/Common.csproj +++ b/src/Common/Common.csproj @@ -3,7 +3,7 @@ {DE07DBEB-D772-49BA-BCEB-A7CE29308AE3} ServiceBusExplorer.Common ServiceBusExplorer.Common - net472 + net462 latest bin\$(Configuration)\ 1.0.0.1 @@ -49,4 +49,4 @@ - + \ No newline at end of file diff --git a/src/Common/app.config b/src/Common/app.config index 183cb047..2cac6939 100644 --- a/src/Common/app.config +++ b/src/Common/app.config @@ -28,7 +28,7 @@ - + @@ -44,7 +44,7 @@ - + diff --git a/src/NotificationHubs/app.config b/src/NotificationHubs/app.config index 53009c38..e936cc13 100644 --- a/src/NotificationHubs/app.config +++ b/src/NotificationHubs/app.config @@ -4,8 +4,8 @@ - + - + \ No newline at end of file diff --git a/src/ServiceBusExplorer.Tests/app.config b/src/ServiceBusExplorer.Tests/app.config index d49911aa..1ce4fe41 100644 --- a/src/ServiceBusExplorer.Tests/app.config +++ b/src/ServiceBusExplorer.Tests/app.config @@ -49,7 +49,7 @@ - + diff --git a/src/ServiceBusExplorer/App.config b/src/ServiceBusExplorer/App.config index 9eb8cb31..19c74d8b 100644 --- a/src/ServiceBusExplorer/App.config +++ b/src/ServiceBusExplorer/App.config @@ -55,7 +55,6 @@ - diff --git a/src/ServiceBusExplorer/Controls/Grouper.cs b/src/ServiceBusExplorer/Controls/Grouper.cs index eaf7d22a..9176887b 100644 --- a/src/ServiceBusExplorer/Controls/Grouper.cs +++ b/src/ServiceBusExplorer/Controls/Grouper.cs @@ -26,443 +26,443 @@ namespace ServiceBusExplorer.Controls { - /// A special custom rounding GroupBox with many painting features. - [ToolboxBitmap(typeof(Grouper), "CodeVendor.Controls.Grouper.bmp")] - [Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(IDesigner))] - public class Grouper : UserControl - { - #region Enumerations - - /// A special gradient enumeration. - public enum GroupBoxGradientMode - { - /// Specifies no gradient mode. - None = 4, + /// A special custom rounding GroupBox with many painting features. + [ToolboxBitmap(typeof(Grouper), "CodeVendor.Controls.Grouper.bmp")] + [Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(IDesigner))] + public class Grouper : UserControl + { + #region Enumerations - /// Specifies a gradient from upper right to lower left. - BackwardDiagonal = 3, + /// A special gradient enumeration. + public enum GroupBoxGradientMode + { + /// Specifies no gradient mode. + None = 4, - /// Specifies a gradient from upper left to lower right. - ForwardDiagonal = 2, + /// Specifies a gradient from upper right to lower left. + BackwardDiagonal = 3, - /// Specifies a gradient from left to right. - Horizontal = 0, + /// Specifies a gradient from upper left to lower right. + ForwardDiagonal = 2, - /// Specifies a gradient from top to bottom. - Vertical = 1 - } + /// Specifies a gradient from left to right. + Horizontal = 0, + /// Specifies a gradient from top to bottom. + Vertical = 1 + } - #endregion + + #endregion public event Action CustomPaint; - #region Variables - - private Container components = null; - private int V_RoundCorners = 10; - private string V_GroupTitle = "The Grouper"; - private Color V_BorderColor = Color.Black; - private float V_BorderThickness = 1; - private bool V_ShadowControl = false; - private Color V_BackgroundColor = Color.White; - private Color V_BackgroundGradientColor = Color.White; - private GroupBoxGradientMode V_BackgroundGradientMode = GroupBoxGradientMode.None; - private Color V_ShadowColor = Color.DarkGray; - private int V_ShadowThickness = 3; - private Image V_GroupImage = null; - private Color V_CustomGroupBoxColor = Color.White; - private bool V_PaintGroupBox = false; - private Color V_BackColor = Color.Transparent; - - #endregion - - #region Properties - - /// This feature will paint the background color of the control. - [Category("Appearance"), Description("This feature will paint the background color of the control.")] - public override Color BackColor { get { return V_BackColor; } set { V_BackColor = value; this.Refresh(); } } - - /// This feature will paint the group title background to the specified color if PaintGroupBox is set to true. - [Category("Appearance"), Description("This feature will paint the group title background to the specified color if PaintGroupBox is set to true.")] - public Color CustomGroupBoxColor { get { return V_CustomGroupBoxColor; } set { V_CustomGroupBoxColor = value; this.Refresh(); } } - - /// This feature will paint the group title background to the CustomGroupBoxColor. - [Category("Appearance"), Description("This feature will paint the group title background to the CustomGroupBoxColor.")] - public bool PaintGroupBox { get { return V_PaintGroupBox; } set { V_PaintGroupBox = value; this.Refresh(); } } - - /// This feature can add a 16 x 16 image to the group title bar. - [Category("Appearance"), Description("This feature can add a 16 x 16 image to the group title bar.")] - public Image GroupImage { get { return V_GroupImage; } set { V_GroupImage = value; this.Refresh(); } } - - /// This feature will change the control's shadow color. - [Category("Appearance"), Description("This feature will change the control's shadow color.")] - public Color ShadowColor { get { return V_ShadowColor; } set { V_ShadowColor = value; this.Refresh(); } } - - /// This feature will change the size of the shadow border. - [Category("Appearance"), Description("This feature will change the size of the shadow border.")] - public int ShadowThickness - { - get { return V_ShadowThickness; } - set - { - if (value > 10) - { - V_ShadowThickness = 10; - } - else - { - if (value < 1) { V_ShadowThickness = 1; } - else { V_ShadowThickness = value; } - } - - this.Refresh(); - } - } - - - /// This feature will change the group control color. This color can also be used in combination with BackgroundGradientColor for a gradient paint. - [Category("Appearance"), Description("This feature will change the group control color. This color can also be used in combination with BackgroundGradientColor for a gradient paint.")] - public Color BackgroundColor { get { return V_BackgroundColor; } set { V_BackgroundColor = value; this.Refresh(); } } - - /// This feature can be used in combination with BackgroundColor to create a gradient background. - [Category("Appearance"), Description("This feature can be used in combination with BackgroundColor to create a gradient background.")] - public Color BackgroundGradientColor { get { return V_BackgroundGradientColor; } set { V_BackgroundGradientColor = value; this.Refresh(); } } - - /// This feature turns on background gradient painting. - [Category("Appearance"), Description("This feature turns on background gradient painting.")] - public GroupBoxGradientMode BackgroundGradientMode { get { return V_BackgroundGradientMode; } set { V_BackgroundGradientMode = value; this.Refresh(); } } - - /// This feature will round the corners of the control. - [Category("Appearance"), Description("This feature will round the corners of the control.")] - public int RoundCorners - { - get { return V_RoundCorners; } - set - { - if (value > 25) - { - V_RoundCorners = 25; - } - else - { - if (value < 1) { V_RoundCorners = 1; } - else { V_RoundCorners = value; } - } - - this.Refresh(); - } - } - - /// This feature will add a group title to the control. - [Category("Appearance"), Description("This feature will add a group title to the control.")] - public string GroupTitle { get { return V_GroupTitle; } set { V_GroupTitle = value; this.Refresh(); } } - - /// This feature will allow you to change the color of the control's border. - [Category("Appearance"), Description("This feature will allow you to change the color of the control's border.")] - public Color BorderColor { get { return V_BorderColor; } set { V_BorderColor = value; this.Refresh(); } } - - /// This feature will allow you to set the control's border size. - [Category("Appearance"), Description("This feature will allow you to set the control's border size.")] - public float BorderThickness - { - get { return V_BorderThickness; } - set - { - if (value > 3) - { - V_BorderThickness = 3; - } - else - { - if (value < 1) { V_BorderThickness = 1; } - else { V_BorderThickness = value; } - } - this.Refresh(); - } - } - - /// This feature will allow you to turn on control shadowing. - [Category("Appearance"), Description("This feature will allow you to turn on control shadowing.")] - public bool ShadowControl { get { return V_ShadowControl; } set { V_ShadowControl = value; this.Refresh(); } } - - #endregion - - #region Constructor - - /// This method will construct a new GroupBox control. - public Grouper() - { - InitializeStyles(); - InitializeGroupBox(); - } - - - #endregion - - #region DeConstructor - - /// This method will dispose of the GroupBox control. - protected override void Dispose(bool disposing) - { - if (disposing) { if (components != null) { components.Dispose(); } } - base.Dispose(disposing); - } - - - #endregion - - #region Initialization - - /// This method will initialize the controls custom styles. - private void InitializeStyles() - { - //Set the control styles---------------------------------- - this.SetStyle(ControlStyles.DoubleBuffer, true); - this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); - this.SetStyle(ControlStyles.UserPaint, true); - this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); - //-------------------------------------------------------- - } - - - /// This method will initialize the GroupBox control. - private void InitializeGroupBox() - { - components = new Container(); - this.Resize += new EventHandler(GroupBox_Resize); - this.DockPadding.All = 20; - this.Name = "GroupBox"; - this.Size = new Size(368, 288); - } - - - #endregion - - #region Protected Methods - - /// Overrides the OnPaint method to paint control. - /// The paint event arguments. - protected override void OnPaint(PaintEventArgs e) - { - PaintBack(e.Graphics); - PaintGroupText(e.Graphics); + #region Variables + + private Container components = null; + private int V_RoundCorners = 10; + private string V_GroupTitle = "The Grouper"; + private Color V_BorderColor = Color.Black; + private float V_BorderThickness = 1; + private bool V_ShadowControl = false; + private Color V_BackgroundColor = Color.White; + private Color V_BackgroundGradientColor = Color.White; + private GroupBoxGradientMode V_BackgroundGradientMode = GroupBoxGradientMode.None; + private Color V_ShadowColor = Color.DarkGray; + private int V_ShadowThickness = 3; + private Image V_GroupImage = null; + private Color V_CustomGroupBoxColor = Color.White; + private bool V_PaintGroupBox = false; + private Color V_BackColor = Color.Transparent; + + #endregion + + #region Properties + + /// This feature will paint the background color of the control. + [Category("Appearance"), Description("This feature will paint the background color of the control.")] + public override Color BackColor{get{return V_BackColor;} set{V_BackColor=value; this.Refresh();}} + + /// This feature will paint the group title background to the specified color if PaintGroupBox is set to true. + [Category("Appearance"), Description("This feature will paint the group title background to the specified color if PaintGroupBox is set to true.")] + public Color CustomGroupBoxColor{get{return V_CustomGroupBoxColor;} set{V_CustomGroupBoxColor=value; this.Refresh();}} + + /// This feature will paint the group title background to the CustomGroupBoxColor. + [Category("Appearance"), Description("This feature will paint the group title background to the CustomGroupBoxColor.")] + public bool PaintGroupBox{get{return V_PaintGroupBox;} set{V_PaintGroupBox=value; this.Refresh();}} + + /// This feature can add a 16 x 16 image to the group title bar. + [Category("Appearance"), Description("This feature can add a 16 x 16 image to the group title bar.")] + public Image GroupImage{get{return V_GroupImage;} set{V_GroupImage=value; this.Refresh();}} + + /// This feature will change the control's shadow color. + [Category("Appearance"), Description("This feature will change the control's shadow color.")] + public Color ShadowColor{get{return V_ShadowColor;} set{V_ShadowColor=value; this.Refresh();}} + + /// This feature will change the size of the shadow border. + [Category("Appearance"), Description("This feature will change the size of the shadow border.")] + public int ShadowThickness + { + get{return V_ShadowThickness;} + set + { + if(value>10) + { + V_ShadowThickness=10; + } + else + { + if(value<1){V_ShadowThickness=1;} + else{V_ShadowThickness=value; } + } + + this.Refresh(); + } + } + + + /// This feature will change the group control color. This color can also be used in combination with BackgroundGradientColor for a gradient paint. + [Category("Appearance"), Description("This feature will change the group control color. This color can also be used in combination with BackgroundGradientColor for a gradient paint.")] + public Color BackgroundColor{get{return V_BackgroundColor;} set{V_BackgroundColor=value; this.Refresh();}} + + /// This feature can be used in combination with BackgroundColor to create a gradient background. + [Category("Appearance"), Description("This feature can be used in combination with BackgroundColor to create a gradient background.")] + public Color BackgroundGradientColor{get{return V_BackgroundGradientColor;} set{V_BackgroundGradientColor=value; this.Refresh();}} + + /// This feature turns on background gradient painting. + [Category("Appearance"), Description("This feature turns on background gradient painting.")] + public GroupBoxGradientMode BackgroundGradientMode{get{return V_BackgroundGradientMode;} set{V_BackgroundGradientMode=value; this.Refresh();}} + + /// This feature will round the corners of the control. + [Category("Appearance"), Description("This feature will round the corners of the control.")] + public int RoundCorners + { + get{return V_RoundCorners;} + set + { + if(value>25) + { + V_RoundCorners=25; + } + else + { + if(value<1){V_RoundCorners=1;} + else{V_RoundCorners=value; } + } + + this.Refresh(); + } + } + + /// This feature will add a group title to the control. + [Category("Appearance"), Description("This feature will add a group title to the control.")] + public string GroupTitle{get{return V_GroupTitle;} set{V_GroupTitle=value; this.Refresh();}} + + /// This feature will allow you to change the color of the control's border. + [Category("Appearance"), Description("This feature will allow you to change the color of the control's border.")] + public Color BorderColor{get{return V_BorderColor;} set{V_BorderColor=value; this.Refresh();}} + + /// This feature will allow you to set the control's border size. + [Category("Appearance"), Description("This feature will allow you to set the control's border size.")] + public float BorderThickness + { + get{return V_BorderThickness;} + set + { + if(value>3) + { + V_BorderThickness=3; + } + else + { + if(value<1){V_BorderThickness=1;} + else{V_BorderThickness=value;} + } + this.Refresh(); + } + } + + /// This feature will allow you to turn on control shadowing. + [Category("Appearance"), Description("This feature will allow you to turn on control shadowing.")] + public bool ShadowControl{get{return V_ShadowControl;} set{V_ShadowControl=value; this.Refresh();}} + + #endregion + + #region Constructor + + /// This method will construct a new GroupBox control. + public Grouper() + { + InitializeStyles(); + InitializeGroupBox(); + } + + + #endregion + + #region DeConstructor + + /// This method will dispose of the GroupBox control. + protected override void Dispose( bool disposing ) + { + if(disposing){if(components!=null){components.Dispose();}} + base.Dispose(disposing); + } + + + #endregion + + #region Initialization + + /// This method will initialize the controls custom styles. + private void InitializeStyles() + { + //Set the control styles---------------------------------- + this.SetStyle(ControlStyles.DoubleBuffer, true); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); + //-------------------------------------------------------- + } + + + /// This method will initialize the GroupBox control. + private void InitializeGroupBox() + { + components = new Container(); + this.Resize+=new EventHandler(GroupBox_Resize); + this.DockPadding.All = 20; + this.Name = "GroupBox"; + this.Size = new Size(368, 288); + } + + + #endregion + + #region Protected Methods + + /// Overrides the OnPaint method to paint control. + /// The paint event arguments. + protected override void OnPaint(PaintEventArgs e) + { + PaintBack(e.Graphics); + PaintGroupText(e.Graphics); if (CustomPaint != null) { CustomPaint(e); } - } - - #endregion - - #region Private Methods - - /// This method will paint the group title. - /// The paint event graphics object. - private void PaintGroupText(Graphics g) - { - //Check if string has something------------- - if (GroupTitle == string.Empty) { return; } - //------------------------------------------ - - //Set Graphics smoothing mode to Anti-Alias-- - g.SmoothingMode = SmoothingMode.AntiAlias; - //------------------------------------------- - - //Declare Variables------------------ - var StringSize = g.MeasureString(this.GroupTitle, this.Font); - var StringSize2 = StringSize.ToSize(); - if (this.GroupImage != null) { StringSize2.Width += 18; } - var ArcWidth = this.RoundCorners; - var ArcHeight = this.RoundCorners; - var ArcX1 = 20; - var ArcX2 = (StringSize2.Width + 34) - (ArcWidth + 1); - var ArcY1 = 0; - var ArcY2 = LogicalToDeviceUnits(24 - (ArcHeight + 1)); - var path = new GraphicsPath(); - Brush BorderBrush = new SolidBrush(this.BorderColor); - var BorderPen = new Pen(BorderBrush, this.BorderThickness); - LinearGradientBrush BackgroundGradientBrush = null; - Brush BackgroundBrush = (this.PaintGroupBox) ? new SolidBrush(this.CustomGroupBoxColor) : new SolidBrush(this.BackgroundColor); - var TextColorBrush = new SolidBrush(this.ForeColor); - SolidBrush ShadowBrush = null; - GraphicsPath ShadowPath = null; - //----------------------------------- - - //Check if shadow is needed---------- - if (ShadowControl) - { - ShadowBrush = new SolidBrush(this.ShadowColor); - ShadowPath = new GraphicsPath(); - ShadowPath.AddArc(ArcX1 + (this.ShadowThickness - 1), ArcY1 + (this.ShadowThickness - 1), ArcWidth, ArcHeight, 180, GroupBoxConstants.SweepAngle); // TopCount Left - ShadowPath.AddArc(ArcX2 + (this.ShadowThickness - 1), ArcY1 + (this.ShadowThickness - 1), ArcWidth, ArcHeight, 270, GroupBoxConstants.SweepAngle); //TopCount Right - ShadowPath.AddArc(ArcX2 + (this.ShadowThickness - 1), ArcY2 + (this.ShadowThickness - 1), ArcWidth, ArcHeight, 360, GroupBoxConstants.SweepAngle); //Bottom Right - ShadowPath.AddArc(ArcX1 + (this.ShadowThickness - 1), ArcY2 + (this.ShadowThickness - 1), ArcWidth, ArcHeight, 90, GroupBoxConstants.SweepAngle); //Bottom Left - ShadowPath.CloseAllFigures(); - - //Paint Rounded Rectangle------------ - g.FillPath(ShadowBrush, ShadowPath); - //----------------------------------- - } - //----------------------------------- - - //Create Rounded Rectangle Path------ - path.AddArc(ArcX1, ArcY1, ArcWidth, ArcHeight, 180, GroupBoxConstants.SweepAngle); // TopCount Left - path.AddArc(ArcX2, ArcY1, ArcWidth, ArcHeight, 270, GroupBoxConstants.SweepAngle); //TopCount Right - path.AddArc(ArcX2, ArcY2, ArcWidth, ArcHeight, 360, GroupBoxConstants.SweepAngle); //Bottom Right - path.AddArc(ArcX1, ArcY2, ArcWidth, ArcHeight, 90, GroupBoxConstants.SweepAngle); //Bottom Left - path.CloseAllFigures(); - //----------------------------------- - - //Check if Gradient Mode is enabled-- - if (this.PaintGroupBox) - { - //Paint Rounded Rectangle------------ - g.FillPath(BackgroundBrush, path); - //----------------------------------- - } - else - { - if (this.BackgroundGradientMode == GroupBoxGradientMode.None) - { - //Paint Rounded Rectangle------------ - g.FillPath(BackgroundBrush, path); - //----------------------------------- - } - else - { - BackgroundGradientBrush = new LinearGradientBrush(new Rectangle(0, 0, this.Width, this.Height), this.BackgroundColor, this.BackgroundGradientColor, (LinearGradientMode)this.BackgroundGradientMode); - - //Paint Rounded Rectangle------------ - g.FillPath(BackgroundGradientBrush, path); - //----------------------------------- - } - } - //----------------------------------- - - //Paint Border----------------------- - g.DrawPath(BorderPen, path); - //----------------------------------- - - //Paint Text------------------------- - var CustomStringWidth = (this.GroupImage != null) ? 44 : 28; - g.DrawString(this.GroupTitle, this.Font, TextColorBrush, CustomStringWidth, 5); - //----------------------------------- - - //Draw GroupImage if there is one---- - if (this.GroupImage != null) - { - g.DrawImage(this.GroupImage, 28, 4, 16, 16); - } - //----------------------------------- - - //Destroy Graphic Objects------------ - path?.Dispose(); - BorderBrush?.Dispose(); - BorderPen?.Dispose(); - BackgroundGradientBrush?.Dispose(); - BackgroundBrush?.Dispose(); - TextColorBrush?.Dispose(); - ShadowBrush?.Dispose(); - ShadowPath?.Dispose(); - - //----------------------------------- - } - - - /// This method will paint the control. - /// The paint event graphics object. - private void PaintBack(Graphics g) - { - //Set Graphics smoothing mode to Anti-Alias-- - g.SmoothingMode = SmoothingMode.AntiAlias; - //------------------------------------------- - - //Declare Variables------------------ - var ArcWidth = this.RoundCorners * 2; - var ArcHeight = this.RoundCorners * 2; - var ArcX1 = 0; - var ArcX2 = (this.ShadowControl) ? (this.Width - (ArcWidth + 1)) - this.ShadowThickness : this.Width - (ArcWidth + 1); - var ArcY1 = 10; - var ArcY2 = (this.ShadowControl) ? (this.Height - (ArcHeight + 1)) - this.ShadowThickness : this.Height - (ArcHeight + 1); - var path = new GraphicsPath(); - Brush BorderBrush = new SolidBrush(this.BorderColor); - var BorderPen = new Pen(BorderBrush, this.BorderThickness); - LinearGradientBrush BackgroundGradientBrush = null; - Brush BackgroundBrush = new SolidBrush(this.BackgroundColor); - SolidBrush ShadowBrush = null; - GraphicsPath ShadowPath = null; - //----------------------------------- - - //Check if shadow is needed---------- - if (this.ShadowControl) - { - ShadowBrush = new SolidBrush(this.ShadowColor); - ShadowPath = new GraphicsPath(); - ShadowPath.AddArc(ArcX1 + this.ShadowThickness, ArcY1 + this.ShadowThickness, ArcWidth, ArcHeight, 180, GroupBoxConstants.SweepAngle); // TopCount Left - ShadowPath.AddArc(ArcX2 + this.ShadowThickness, ArcY1 + this.ShadowThickness, ArcWidth, ArcHeight, 270, GroupBoxConstants.SweepAngle); //TopCount Right - ShadowPath.AddArc(ArcX2 + this.ShadowThickness, ArcY2 + this.ShadowThickness, ArcWidth, ArcHeight, 360, GroupBoxConstants.SweepAngle); //Bottom Right - ShadowPath.AddArc(ArcX1 + this.ShadowThickness, ArcY2 + this.ShadowThickness, ArcWidth, ArcHeight, 90, GroupBoxConstants.SweepAngle); //Bottom Left - ShadowPath.CloseAllFigures(); - - //Paint Rounded Rectangle------------ - g.FillPath(ShadowBrush, ShadowPath); - //----------------------------------- - } - //----------------------------------- - - //Create Rounded Rectangle Path------ - path.AddArc(ArcX1, ArcY1, ArcWidth, ArcHeight, 180, GroupBoxConstants.SweepAngle); // TopCount Left - path.AddArc(ArcX2, ArcY1, ArcWidth, ArcHeight, 270, GroupBoxConstants.SweepAngle); //TopCount Right - path.AddArc(ArcX2, ArcY2, ArcWidth, ArcHeight, 360, GroupBoxConstants.SweepAngle); //Bottom Right - path.AddArc(ArcX1, ArcY2, ArcWidth, ArcHeight, 90, GroupBoxConstants.SweepAngle); //Bottom Left - path.CloseAllFigures(); - //----------------------------------- - - //Check if Gradient Mode is enabled-- - if (this.BackgroundGradientMode == GroupBoxGradientMode.None) - { - //Paint Rounded Rectangle------------ - g.FillPath(BackgroundBrush, path); - //----------------------------------- - } - else - { - BackgroundGradientBrush = new LinearGradientBrush(new Rectangle(0, 0, this.Width, this.Height), this.BackgroundColor, this.BackgroundGradientColor, (LinearGradientMode)this.BackgroundGradientMode); - - //Paint Rounded Rectangle------------ - g.FillPath(BackgroundGradientBrush, path); - //----------------------------------- - } - //----------------------------------- - - //Paint Border----------------------- - g.DrawPath(BorderPen, path); - //----------------------------------- - - //Destroy Graphic Objects------------ - path?.Dispose(); - BorderBrush?.Dispose(); - BorderPen?.Dispose(); - BackgroundGradientBrush?.Dispose(); - BackgroundBrush?.Dispose(); - ShadowBrush?.Dispose(); - ShadowPath?.Dispose(); - //----------------------------------- - } - - - /// This method fires when the GroupBox resize event occurs. - /// The object the sent the event. - /// The event arguments. - private void GroupBox_Resize(object sender, EventArgs e) - { - this.Refresh(); - } - - - #endregion - } + } + + #endregion + + #region Private Methods + + /// This method will paint the group title. + /// The paint event graphics object. + private void PaintGroupText(Graphics g) + { + //Check if string has something------------- + if(GroupTitle==string.Empty){return;} + //------------------------------------------ + + //Set Graphics smoothing mode to Anit-Alias-- + g.SmoothingMode = SmoothingMode.AntiAlias; + //------------------------------------------- + + //Declare Variables------------------ + var StringSize = g.MeasureString(this.GroupTitle, this.Font); + var StringSize2 = StringSize.ToSize(); + if(this.GroupImage!=null){StringSize2.Width+=18;} + var ArcWidth = this.RoundCorners; + var ArcHeight = this.RoundCorners; + var ArcX1 = 20; + var ArcX2 = (StringSize2.Width+34) - (ArcWidth + 1); + var ArcY1 = 0; + var ArcY2 = 24 - (ArcHeight + 1); + var path = new GraphicsPath(); + Brush BorderBrush = new SolidBrush(this.BorderColor); + var BorderPen = new Pen(BorderBrush, this.BorderThickness); + LinearGradientBrush BackgroundGradientBrush = null; + Brush BackgroundBrush = (this.PaintGroupBox) ? new SolidBrush(this.CustomGroupBoxColor) : new SolidBrush(this.BackgroundColor); + var TextColorBrush = new SolidBrush(this.ForeColor); + SolidBrush ShadowBrush = null; + GraphicsPath ShadowPath = null; + //----------------------------------- + + //Check if shadow is needed---------- + if(ShadowControl) + { + ShadowBrush = new SolidBrush(this.ShadowColor); + ShadowPath = new GraphicsPath(); + ShadowPath.AddArc(ArcX1+(this.ShadowThickness-1), ArcY1+(this.ShadowThickness-1), ArcWidth, ArcHeight, 180, GroupBoxConstants.SweepAngle); // TopCount Left + ShadowPath.AddArc(ArcX2+(this.ShadowThickness-1), ArcY1+(this.ShadowThickness-1), ArcWidth, ArcHeight, 270, GroupBoxConstants.SweepAngle); //TopCount Right + ShadowPath.AddArc(ArcX2+(this.ShadowThickness-1), ArcY2+(this.ShadowThickness-1), ArcWidth, ArcHeight, 360, GroupBoxConstants.SweepAngle); //Bottom Right + ShadowPath.AddArc(ArcX1+(this.ShadowThickness-1), ArcY2+(this.ShadowThickness-1), ArcWidth, ArcHeight, 90, GroupBoxConstants.SweepAngle); //Bottom Left + ShadowPath.CloseAllFigures(); + + //Paint Rounded Rectangle------------ + g.FillPath(ShadowBrush, ShadowPath); + //----------------------------------- + } + //----------------------------------- + + //Create Rounded Rectangle Path------ + path.AddArc(ArcX1, ArcY1, ArcWidth, ArcHeight, 180, GroupBoxConstants.SweepAngle); // TopCount Left + path.AddArc(ArcX2, ArcY1, ArcWidth, ArcHeight, 270, GroupBoxConstants.SweepAngle); //TopCount Right + path.AddArc(ArcX2, ArcY2, ArcWidth, ArcHeight, 360, GroupBoxConstants.SweepAngle); //Bottom Right + path.AddArc(ArcX1, ArcY2, ArcWidth, ArcHeight, 90, GroupBoxConstants.SweepAngle); //Bottom Left + path.CloseAllFigures(); + //----------------------------------- + + //Check if Gradient Mode is enabled-- + if(this.PaintGroupBox) + { + //Paint Rounded Rectangle------------ + g.FillPath(BackgroundBrush, path); + //----------------------------------- + } + else + { + if(this.BackgroundGradientMode==GroupBoxGradientMode.None) + { + //Paint Rounded Rectangle------------ + g.FillPath(BackgroundBrush, path); + //----------------------------------- + } + else + { + BackgroundGradientBrush = new LinearGradientBrush(new Rectangle(0,0,this.Width,this.Height), this.BackgroundColor, this.BackgroundGradientColor, (LinearGradientMode)this.BackgroundGradientMode); + + //Paint Rounded Rectangle------------ + g.FillPath(BackgroundGradientBrush, path); + //----------------------------------- + } + } + //----------------------------------- + + //Paint Borded----------------------- + g.DrawPath(BorderPen, path); + //----------------------------------- + + //Paint Text------------------------- + var CustomStringWidth = (this.GroupImage!=null) ? 44 : 28; + g.DrawString(this.GroupTitle, this.Font, TextColorBrush, CustomStringWidth, 5); + //----------------------------------- + + //Draw GroupImage if there is one---- + if(this.GroupImage!=null) + { + g.DrawImage(this.GroupImage, 28,4, 16, 16); + } + //----------------------------------- + + //Destroy Graphic Objects------------ + path?.Dispose(); + BorderBrush?.Dispose(); + BorderPen?.Dispose(); + BackgroundGradientBrush?.Dispose(); + BackgroundBrush?.Dispose(); + TextColorBrush?.Dispose(); + ShadowBrush?.Dispose(); + ShadowPath?.Dispose(); + + //----------------------------------- + } + + + /// This method will paint the control. + /// The paint event graphics object. + private void PaintBack(Graphics g) + { + //Set Graphics smoothing mode to Anit-Alias-- + g.SmoothingMode = SmoothingMode.AntiAlias; + //------------------------------------------- + + //Declare Variables------------------ + var ArcWidth = this.RoundCorners * 2; + var ArcHeight = this.RoundCorners * 2; + var ArcX1 = 0; + var ArcX2 = (this.ShadowControl) ? (this.Width - (ArcWidth + 1))-this.ShadowThickness : this.Width - (ArcWidth + 1); + var ArcY1 = 10; + var ArcY2 = (this.ShadowControl) ? (this.Height - (ArcHeight + 1))-this.ShadowThickness : this.Height - (ArcHeight + 1); + var path = new GraphicsPath(); + Brush BorderBrush = new SolidBrush(this.BorderColor); + var BorderPen = new Pen(BorderBrush, this.BorderThickness); + LinearGradientBrush BackgroundGradientBrush = null; + Brush BackgroundBrush = new SolidBrush(this.BackgroundColor); + SolidBrush ShadowBrush = null; + GraphicsPath ShadowPath = null; + //----------------------------------- + + //Check if shadow is needed---------- + if(this.ShadowControl) + { + ShadowBrush = new SolidBrush(this.ShadowColor); + ShadowPath = new GraphicsPath(); + ShadowPath.AddArc(ArcX1+this.ShadowThickness, ArcY1+this.ShadowThickness, ArcWidth, ArcHeight, 180, GroupBoxConstants.SweepAngle); // TopCount Left + ShadowPath.AddArc(ArcX2+this.ShadowThickness, ArcY1+this.ShadowThickness, ArcWidth, ArcHeight, 270, GroupBoxConstants.SweepAngle); //TopCount Right + ShadowPath.AddArc(ArcX2+this.ShadowThickness, ArcY2+this.ShadowThickness, ArcWidth, ArcHeight, 360, GroupBoxConstants.SweepAngle); //Bottom Right + ShadowPath.AddArc(ArcX1+this.ShadowThickness, ArcY2+this.ShadowThickness, ArcWidth, ArcHeight, 90, GroupBoxConstants.SweepAngle); //Bottom Left + ShadowPath.CloseAllFigures(); + + //Paint Rounded Rectangle------------ + g.FillPath(ShadowBrush, ShadowPath); + //----------------------------------- + } + //----------------------------------- + + //Create Rounded Rectangle Path------ + path.AddArc(ArcX1, ArcY1, ArcWidth, ArcHeight, 180, GroupBoxConstants.SweepAngle); // TopCount Left + path.AddArc(ArcX2, ArcY1, ArcWidth, ArcHeight, 270, GroupBoxConstants.SweepAngle); //TopCount Right + path.AddArc(ArcX2, ArcY2, ArcWidth, ArcHeight, 360, GroupBoxConstants.SweepAngle); //Bottom Right + path.AddArc(ArcX1, ArcY2, ArcWidth, ArcHeight, 90, GroupBoxConstants.SweepAngle); //Bottom Left + path.CloseAllFigures(); + //----------------------------------- + + //Check if Gradient Mode is enabled-- + if(this.BackgroundGradientMode==GroupBoxGradientMode.None) + { + //Paint Rounded Rectangle------------ + g.FillPath(BackgroundBrush, path); + //----------------------------------- + } + else + { + BackgroundGradientBrush = new LinearGradientBrush(new Rectangle(0,0,this.Width,this.Height), this.BackgroundColor, this.BackgroundGradientColor, (LinearGradientMode)this.BackgroundGradientMode); + + //Paint Rounded Rectangle------------ + g.FillPath(BackgroundGradientBrush, path); + //----------------------------------- + } + //----------------------------------- + + //Paint Borded----------------------- + g.DrawPath(BorderPen, path); + //----------------------------------- + + //Destroy Graphic Objects------------ + path?.Dispose(); + BorderBrush?.Dispose(); + BorderPen?.Dispose(); + BackgroundGradientBrush?.Dispose(); + BackgroundBrush?.Dispose(); + ShadowBrush?.Dispose(); + ShadowPath?.Dispose(); + //----------------------------------- + } + + + /// This method fires when the GroupBox resize event occurs. + /// The object the sent the event. + /// The event arguments. + private void GroupBox_Resize(object sender, EventArgs e) + { + this.Refresh(); + } + + + #endregion + } public class GroupBoxConstants { diff --git a/src/ServiceBusExplorer/Controls/HandleTopicControl.cs b/src/ServiceBusExplorer/Controls/HandleTopicControl.cs index a44c0a44..9ebc8052 100644 --- a/src/ServiceBusExplorer/Controls/HandleTopicControl.cs +++ b/src/ServiceBusExplorer/Controls/HandleTopicControl.cs @@ -979,7 +979,7 @@ private void DrawTabControlTabs(TabControl tabControl, DrawItemEventArgs e, Imag // If we have images, process them. if (images != null) { - // Get size and image. + // Get sice and image. var size = images.ImageSize; Image icon = null; if (page.ImageIndex > -1) diff --git a/src/ServiceBusExplorer/Controls/HeaderPanel.cs b/src/ServiceBusExplorer/Controls/HeaderPanel.cs index d2d40957..a59d03ee 100644 --- a/src/ServiceBusExplorer/Controls/HeaderPanel.cs +++ b/src/ServiceBusExplorer/Controls/HeaderPanel.cs @@ -40,7 +40,6 @@ public partial class HeaderPanel : Panel private Color headerColor2 = SystemColors.ActiveCaption; private Color iconTransparentColor = Color.White; private Image icon = null; - private Bitmap iconBitmap = null; #endregion #region Public Properties @@ -143,58 +142,63 @@ private void OutlookPanelEx_Paint(object sender, PaintEventArgs e) // Draw border; DrawBorder(e.Graphics); - // Draw header + // Draw heaeder DrawHeader(e.Graphics); - // Draw Icon - DrawIcon(e.Graphics); - // Draw text DrawText(e.Graphics); + + // Draw Icon + DrawIcon(e.Graphics); } } private void DrawBorder(Graphics graphics) { - using var pen = new Pen(this.headerColor2); - graphics.DrawRectangle(pen, 0, 0, this.Width - 1, this.Height - 1); + using (var pen = new Pen(this.headerColor2)) + { + graphics.DrawRectangle(pen, 0, 0, this.Width - 1, this.Height - 1); + } } private void DrawHeader(Graphics graphics) { - var headerRect = new Rectangle(1, 1, this.Width - 2, LogicalToDeviceUnits(this.headerHeight)); - using Brush brush = new LinearGradientBrush(headerRect, headerColor1, headerColor2, LinearGradientMode.Vertical); - graphics.FillRectangle(brush, headerRect); + var headerRect = new Rectangle(1, 1, this.Width - 2, this.headerHeight); + using (Brush brush = new LinearGradientBrush(headerRect, headerColor1, headerColor2, LinearGradientMode.Vertical)) + { + graphics.FillRectangle(brush, headerRect); + } } private void DrawText(Graphics graphics) { if (string.IsNullOrWhiteSpace(this.headerText)) return; var size = graphics.MeasureString(this.headerText, this.headerFont); - using Brush brush = new SolidBrush(ForeColor); - float x; - if (this.iconBitmap != null) - { - x = this.iconBitmap.Width + 6; - } - else + using (Brush brush = new SolidBrush(ForeColor)) { - x = 4; + float x; + if (this.icon != null) + { + x = this.icon.Width + 6; + } + else + { + x = 4; + } + graphics.DrawString(this.headerText, this.headerFont, brush, x, (headerHeight - size.Height) / 2); } - graphics.DrawString(this.headerText, this.headerFont, brush, x, (LogicalToDeviceUnits(this.headerHeight) - size.Height) / 2); } private void DrawIcon(Graphics graphics) { if (icon != null) { - iconBitmap = new Bitmap(icon); - iconBitmap.MakeTransparent(iconTransparentColor); - ScaleBitmapLogicalToDevice(ref iconBitmap); - var point = new Point(4, (LogicalToDeviceUnits(this.headerHeight) - iconBitmap.Height) / 2); - graphics.DrawImage(iconBitmap, point); + var point = new Point(4, (headerHeight - icon.Height) / 2); + var bitmap = new Bitmap(icon); + bitmap.MakeTransparent(iconTransparentColor); + graphics.DrawImage(bitmap, point); } } #endregion } -} +} \ No newline at end of file diff --git a/src/ServiceBusExplorer/Forms/ChangeStatusForm.cs b/src/ServiceBusExplorer/Forms/ChangeStatusForm.cs index c54b5abf..f12e3116 100644 --- a/src/ServiceBusExplorer/Forms/ChangeStatusForm.cs +++ b/src/ServiceBusExplorer/Forms/ChangeStatusForm.cs @@ -40,7 +40,6 @@ public partial class ChangeStatusForm : Form private const string DisableFormat = "This operation will disable the {0} {1}. Do you want to continue?"; private const string SetStatusFormat = "This operation will set the status of the {0} {1} to {2}. Do you want to continue?"; private const string Unknown = "Unknown"; - private const int widthPadding = 88; #endregion #region Public Constructor @@ -61,7 +60,7 @@ public ChangeStatusForm(string entityName, string entityType, EntityStatus desir lblMessage.Text = string.Format(SetStatusFormat, entityType ?? Unknown, entityName ?? Unknown, desiredStatus.ToString()); } - Width = lblMessage.Width + LogicalToDeviceUnits(widthPadding); + Width = lblMessage.Width + 72; } #endregion diff --git a/src/ServiceBusExplorer/Forms/ClipboardForm.cs b/src/ServiceBusExplorer/Forms/ClipboardForm.cs index e769d10e..8b1b29cd 100644 --- a/src/ServiceBusExplorer/Forms/ClipboardForm.cs +++ b/src/ServiceBusExplorer/Forms/ClipboardForm.cs @@ -31,14 +31,12 @@ namespace ServiceBusExplorer.Forms { public partial class ClipboardForm : Form { - private const int widthPadding = 88; - #region Public Constructor public ClipboardForm(string url) { InitializeComponent(); lblUrl.Text = string.Format(url); - Width = lblUrl.Width + LogicalToDeviceUnits(widthPadding); + Width = lblUrl.Width + 80; } #endregion diff --git a/src/ServiceBusExplorer/Forms/ConnectForm.cs b/src/ServiceBusExplorer/Forms/ConnectForm.cs index 58fd5e74..6d141e37 100644 --- a/src/ServiceBusExplorer/Forms/ConnectForm.cs +++ b/src/ServiceBusExplorer/Forms/ConnectForm.cs @@ -23,15 +23,15 @@ #region Using Directives -using Microsoft.ServiceBus; -using Microsoft.ServiceBus.Messaging; -using ServiceBusExplorer.Helpers; using System; using System.Collections.Generic; using System.Drawing; using System.Globalization; using System.Linq; using System.Windows.Forms; +using ServiceBusExplorer.Helpers; +using Microsoft.ServiceBus; +using Microsoft.ServiceBus.Messaging; #endregion @@ -377,11 +377,9 @@ private void cboServiceBusNamespace_SelectedIndexChanged(object sender, EventArg if (cboServiceBusNamespace.Text == EnterConnectionString || connectionStringType == ServiceBusNamespaceType.OnPremises || containsStsEndpoint) { - var newHeight = txtIssuerSecret.Location.Y + txtIssuerSecret.Size.Height - txtUri.Location.Y; - lblUri.Text = ConnectionStringLabel; txtUri.Multiline = true; - txtUri.Size = new Size(txtUri.Size.Width, newHeight); + txtUri.Size = new Size(336, 220); txtUri.Text = string.Empty; toolTip.SetToolTip(txtUri, ConnectionStringTooltip); } @@ -389,7 +387,7 @@ private void cboServiceBusNamespace_SelectedIndexChanged(object sender, EventArg { lblUri.Text = UriLabel; txtUri.Multiline = false; - txtUri.Size = new Size(txtUri.Size.Width, 20); + txtUri.Size = new Size(336, 20); toolTip.SetToolTip(txtUri, UriTooltip); } if (cboServiceBusNamespace.SelectedIndex <= 1) diff --git a/src/ServiceBusExplorer/Forms/ConnectForm.designer.cs b/src/ServiceBusExplorer/Forms/ConnectForm.designer.cs index f356b375..3d4c0086 100644 --- a/src/ServiceBusExplorer/Forms/ConnectForm.designer.cs +++ b/src/ServiceBusExplorer/Forms/ConnectForm.designer.cs @@ -59,6 +59,19 @@ private void InitializeComponent() this.btnOk = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); + this.btnClearSubscriptionFilterExpression = new System.Windows.Forms.Button(); + this.btnClearTopicFilterExpression = new System.Windows.Forms.Button(); + this.btnClearQueueFilterExpression = new System.Windows.Forms.Button(); + this.btnOpenSubscriptionFilterForm = new System.Windows.Forms.Button(); + this.txtSubscriptionFilterExpression = new System.Windows.Forms.TextBox(); + this.btnOpenTopicFilterForm = new System.Windows.Forms.Button(); + this.btnOpenQueueFilterForm = new System.Windows.Forms.Button(); + this.txtQueueFilterExpression = new System.Windows.Forms.TextBox(); + this.txtTopicFilterExpression = new System.Windows.Forms.TextBox(); + this.txtIssuerSecret = new System.Windows.Forms.TextBox(); + this.txtIssuerName = new System.Windows.Forms.TextBox(); + this.txtNamespace = new System.Windows.Forms.TextBox(); + this.txtEntityPath = new System.Windows.Forms.TextBox(); this.logoPictureBox = new System.Windows.Forms.PictureBox(); this.btnSave = new System.Windows.Forms.Button(); this.btnRename = new System.Windows.Forms.Button(); @@ -68,33 +81,21 @@ private void InitializeComponent() this.grouperFilters = new ServiceBusExplorer.Controls.Grouper(); this.lblSelectedEntities = new System.Windows.Forms.Label(); this.cboSelectedEntities = new ServiceBusExplorer.Controls.CheckBoxComboBox(); - this.btnClearSubscriptionFilterExpression = new System.Windows.Forms.Button(); - this.btnClearTopicFilterExpression = new System.Windows.Forms.Button(); - this.btnClearQueueFilterExpression = new System.Windows.Forms.Button(); - this.btnOpenSubscriptionFilterForm = new System.Windows.Forms.Button(); - this.txtSubscriptionFilterExpression = new System.Windows.Forms.TextBox(); this.lblSubscriptionFilterExpression = new System.Windows.Forms.Label(); - this.btnOpenTopicFilterForm = new System.Windows.Forms.Button(); - this.btnOpenQueueFilterForm = new System.Windows.Forms.Button(); - this.txtQueueFilterExpression = new System.Windows.Forms.TextBox(); this.lblQueueFilterExpression = new System.Windows.Forms.Label(); - this.txtTopicFilterExpression = new System.Windows.Forms.TextBox(); this.lblTopicFilterExpression = new System.Windows.Forms.Label(); this.grouperServiceBusNamespaceSettings = new ServiceBusExplorer.Controls.Grouper(); this.useAmqpWebSocketsCheckBox = new System.Windows.Forms.CheckBox(); + this.lblNewSdkTransportType = new System.Windows.Forms.Label(); this.cboTransportType = new System.Windows.Forms.ComboBox(); this.lblTransportType = new System.Windows.Forms.Label(); this.cboConnectivityMode = new System.Windows.Forms.ComboBox(); this.lblConnectivityMode = new System.Windows.Forms.Label(); this.txtUri = new System.Windows.Forms.TextBox(); this.lblUri = new System.Windows.Forms.Label(); - this.txtIssuerSecret = new System.Windows.Forms.TextBox(); this.lblIssuerSecret = new System.Windows.Forms.Label(); - this.txtIssuerName = new System.Windows.Forms.TextBox(); this.lblIssuerName = new System.Windows.Forms.Label(); - this.txtNamespace = new System.Windows.Forms.TextBox(); this.lblNamespace = new System.Windows.Forms.Label(); - this.txtEntityPath = new System.Windows.Forms.TextBox(); this.lblEntityPath = new System.Windows.Forms.Label(); this.grouperServiceBusNamespaces = new ServiceBusExplorer.Controls.Grouper(); this.cboServiceBusNamespace = new System.Windows.Forms.ComboBox(); @@ -113,7 +114,7 @@ private void InitializeComponent() this.btnOk.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnOk.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOk.Location = new System.Drawing.Point(676, 443); + this.btnOk.Location = new System.Drawing.Point(616, 443); this.btnOk.Name = "btnOk"; this.btnOk.Size = new System.Drawing.Size(72, 24); this.btnOk.TabIndex = 7; @@ -131,7 +132,7 @@ private void InitializeComponent() this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnCancel.Location = new System.Drawing.Point(756, 443); + this.btnCancel.Location = new System.Drawing.Point(696, 443); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(72, 24); this.btnCancel.TabIndex = 8; @@ -141,13 +142,227 @@ private void InitializeComponent() this.btnCancel.MouseEnter += new System.EventHandler(this.button_MouseEnter); this.btnCancel.MouseLeave += new System.EventHandler(this.button_MouseLeave); // + // btnClearSubscriptionFilterExpression + // + this.btnClearSubscriptionFilterExpression.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnClearSubscriptionFilterExpression.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.btnClearSubscriptionFilterExpression.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.btnClearSubscriptionFilterExpression.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnClearSubscriptionFilterExpression.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnClearSubscriptionFilterExpression.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnClearSubscriptionFilterExpression.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnClearSubscriptionFilterExpression.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold); + this.btnClearSubscriptionFilterExpression.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(92)))), ((int)(((byte)(125)))), ((int)(((byte)(150))))); + this.btnClearSubscriptionFilterExpression.Location = new System.Drawing.Point(328, 190); + this.btnClearSubscriptionFilterExpression.Name = "btnClearSubscriptionFilterExpression"; + this.btnClearSubscriptionFilterExpression.Size = new System.Drawing.Size(24, 21); + this.btnClearSubscriptionFilterExpression.TabIndex = 13; + this.btnClearSubscriptionFilterExpression.Text = "X"; + this.btnClearSubscriptionFilterExpression.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.toolTip.SetToolTip(this.btnClearSubscriptionFilterExpression, "Click to cancel the filter expression for subscriptions."); + this.btnClearSubscriptionFilterExpression.UseVisualStyleBackColor = false; + this.btnClearSubscriptionFilterExpression.Click += new System.EventHandler(this.btnClearSubscriptionFilterExpression_Click); + this.btnClearSubscriptionFilterExpression.MouseEnter += new System.EventHandler(this.button_MouseEnter); + this.btnClearSubscriptionFilterExpression.MouseLeave += new System.EventHandler(this.clearButton_MouseLeave); + // + // btnClearTopicFilterExpression + // + this.btnClearTopicFilterExpression.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnClearTopicFilterExpression.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.btnClearTopicFilterExpression.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.btnClearTopicFilterExpression.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnClearTopicFilterExpression.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnClearTopicFilterExpression.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnClearTopicFilterExpression.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnClearTopicFilterExpression.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold); + this.btnClearTopicFilterExpression.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(92)))), ((int)(((byte)(125)))), ((int)(((byte)(150))))); + this.btnClearTopicFilterExpression.Location = new System.Drawing.Point(328, 142); + this.btnClearTopicFilterExpression.Name = "btnClearTopicFilterExpression"; + this.btnClearTopicFilterExpression.Size = new System.Drawing.Size(24, 21); + this.btnClearTopicFilterExpression.TabIndex = 9; + this.btnClearTopicFilterExpression.Text = "X"; + this.btnClearTopicFilterExpression.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.toolTip.SetToolTip(this.btnClearTopicFilterExpression, "Click to cancel the filter expression for topics."); + this.btnClearTopicFilterExpression.UseVisualStyleBackColor = false; + this.btnClearTopicFilterExpression.Click += new System.EventHandler(this.btnClearTopicFilterExpression_Click); + this.btnClearTopicFilterExpression.MouseEnter += new System.EventHandler(this.button_MouseEnter); + this.btnClearTopicFilterExpression.MouseLeave += new System.EventHandler(this.clearButton_MouseLeave); + // + // btnClearQueueFilterExpression + // + this.btnClearQueueFilterExpression.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnClearQueueFilterExpression.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.btnClearQueueFilterExpression.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.btnClearQueueFilterExpression.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnClearQueueFilterExpression.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnClearQueueFilterExpression.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnClearQueueFilterExpression.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnClearQueueFilterExpression.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold); + this.btnClearQueueFilterExpression.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(92)))), ((int)(((byte)(125)))), ((int)(((byte)(150))))); + this.btnClearQueueFilterExpression.Location = new System.Drawing.Point(328, 94); + this.btnClearQueueFilterExpression.Name = "btnClearQueueFilterExpression"; + this.btnClearQueueFilterExpression.Size = new System.Drawing.Size(24, 21); + this.btnClearQueueFilterExpression.TabIndex = 5; + this.btnClearQueueFilterExpression.Text = "X"; + this.btnClearQueueFilterExpression.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.toolTip.SetToolTip(this.btnClearQueueFilterExpression, "Click to cancel the filter expression for queues."); + this.btnClearQueueFilterExpression.UseVisualStyleBackColor = false; + this.btnClearQueueFilterExpression.Click += new System.EventHandler(this.btnClearQueueFilterExpression_Click); + this.btnClearQueueFilterExpression.MouseEnter += new System.EventHandler(this.button_MouseEnter); + this.btnClearQueueFilterExpression.MouseLeave += new System.EventHandler(this.clearButton_MouseLeave); + // + // btnOpenSubscriptionFilterForm + // + this.btnOpenSubscriptionFilterForm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnOpenSubscriptionFilterForm.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.btnOpenSubscriptionFilterForm.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnOpenSubscriptionFilterForm.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnOpenSubscriptionFilterForm.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnOpenSubscriptionFilterForm.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnOpenSubscriptionFilterForm.ForeColor = System.Drawing.SystemColors.ControlText; + this.btnOpenSubscriptionFilterForm.Location = new System.Drawing.Point(296, 190); + this.btnOpenSubscriptionFilterForm.Name = "btnOpenSubscriptionFilterForm"; + this.btnOpenSubscriptionFilterForm.Size = new System.Drawing.Size(24, 21); + this.btnOpenSubscriptionFilterForm.TabIndex = 12; + this.btnOpenSubscriptionFilterForm.Text = "..."; + this.btnOpenSubscriptionFilterForm.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.toolTip.SetToolTip(this.btnOpenSubscriptionFilterForm, "Click to open the filter expression dialog for subscriptions."); + this.btnOpenSubscriptionFilterForm.UseVisualStyleBackColor = false; + this.btnOpenSubscriptionFilterForm.Click += new System.EventHandler(this.btnOpenSubscriptionFilterForm_Click); + this.btnOpenSubscriptionFilterForm.MouseEnter += new System.EventHandler(this.button_MouseEnter); + this.btnOpenSubscriptionFilterForm.MouseLeave += new System.EventHandler(this.button_MouseLeave); + // + // txtSubscriptionFilterExpression + // + this.txtSubscriptionFilterExpression.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtSubscriptionFilterExpression.ForeColor = System.Drawing.SystemColors.ControlText; + this.txtSubscriptionFilterExpression.Location = new System.Drawing.Point(16, 190); + this.txtSubscriptionFilterExpression.Name = "txtSubscriptionFilterExpression"; + this.txtSubscriptionFilterExpression.Size = new System.Drawing.Size(272, 20); + this.txtSubscriptionFilterExpression.TabIndex = 11; + this.toolTip.SetToolTip(this.txtSubscriptionFilterExpression, "Gets or sets the OData filter for topics."); + // + // btnOpenTopicFilterForm + // + this.btnOpenTopicFilterForm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnOpenTopicFilterForm.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.btnOpenTopicFilterForm.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnOpenTopicFilterForm.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnOpenTopicFilterForm.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnOpenTopicFilterForm.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnOpenTopicFilterForm.ForeColor = System.Drawing.SystemColors.ControlText; + this.btnOpenTopicFilterForm.Location = new System.Drawing.Point(296, 142); + this.btnOpenTopicFilterForm.Name = "btnOpenTopicFilterForm"; + this.btnOpenTopicFilterForm.Size = new System.Drawing.Size(24, 21); + this.btnOpenTopicFilterForm.TabIndex = 8; + this.btnOpenTopicFilterForm.Text = "..."; + this.btnOpenTopicFilterForm.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.toolTip.SetToolTip(this.btnOpenTopicFilterForm, "Click to open the filter expression dialog for topics."); + this.btnOpenTopicFilterForm.UseVisualStyleBackColor = false; + this.btnOpenTopicFilterForm.Click += new System.EventHandler(this.btnOpenTopicFilterForm_Click); + this.btnOpenTopicFilterForm.MouseEnter += new System.EventHandler(this.button_MouseEnter); + this.btnOpenTopicFilterForm.MouseLeave += new System.EventHandler(this.button_MouseLeave); + // + // btnOpenQueueFilterForm + // + this.btnOpenQueueFilterForm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnOpenQueueFilterForm.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); + this.btnOpenQueueFilterForm.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnOpenQueueFilterForm.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnOpenQueueFilterForm.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); + this.btnOpenQueueFilterForm.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnOpenQueueFilterForm.ForeColor = System.Drawing.SystemColors.ControlText; + this.btnOpenQueueFilterForm.Location = new System.Drawing.Point(296, 94); + this.btnOpenQueueFilterForm.Name = "btnOpenQueueFilterForm"; + this.btnOpenQueueFilterForm.Size = new System.Drawing.Size(24, 21); + this.btnOpenQueueFilterForm.TabIndex = 4; + this.btnOpenQueueFilterForm.Text = "..."; + this.btnOpenQueueFilterForm.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.toolTip.SetToolTip(this.btnOpenQueueFilterForm, "Click to open the filter expression dialog for queues."); + this.btnOpenQueueFilterForm.UseVisualStyleBackColor = false; + this.btnOpenQueueFilterForm.Click += new System.EventHandler(this.btnOpenQueueFilterForm_Click); + this.btnOpenQueueFilterForm.MouseEnter += new System.EventHandler(this.button_MouseEnter); + this.btnOpenQueueFilterForm.MouseLeave += new System.EventHandler(this.button_MouseLeave); + // + // txtQueueFilterExpression + // + this.txtQueueFilterExpression.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtQueueFilterExpression.ForeColor = System.Drawing.SystemColors.ControlText; + this.txtQueueFilterExpression.Location = new System.Drawing.Point(16, 94); + this.txtQueueFilterExpression.Multiline = true; + this.txtQueueFilterExpression.Name = "txtQueueFilterExpression"; + this.txtQueueFilterExpression.Size = new System.Drawing.Size(272, 20); + this.txtQueueFilterExpression.TabIndex = 3; + this.toolTip.SetToolTip(this.txtQueueFilterExpression, "Gets or sets the OData filter for queues."); + // + // txtTopicFilterExpression + // + this.txtTopicFilterExpression.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtTopicFilterExpression.ForeColor = System.Drawing.SystemColors.ControlText; + this.txtTopicFilterExpression.Location = new System.Drawing.Point(16, 142); + this.txtTopicFilterExpression.Name = "txtTopicFilterExpression"; + this.txtTopicFilterExpression.Size = new System.Drawing.Size(272, 20); + this.txtTopicFilterExpression.TabIndex = 7; + this.toolTip.SetToolTip(this.txtTopicFilterExpression, "Gets or sets the OData filter for topics."); + // + // txtIssuerSecret + // + this.txtIssuerSecret.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtIssuerSecret.ForeColor = System.Drawing.SystemColors.ControlText; + this.txtIssuerSecret.Location = new System.Drawing.Point(16, 240); + this.txtIssuerSecret.Name = "txtIssuerSecret"; + this.txtIssuerSecret.PasswordChar = '*'; + this.txtIssuerSecret.Size = new System.Drawing.Size(336, 20); + this.txtIssuerSecret.TabIndex = 9; + this.toolTip.SetToolTip(this.txtIssuerSecret, "Gets or sets the shared secret issuer secret."); + this.txtIssuerSecret.TextChanged += new System.EventHandler(this.validation_TextChanged); + // + // txtIssuerName + // + this.txtIssuerName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtIssuerName.ForeColor = System.Drawing.SystemColors.ControlText; + this.txtIssuerName.Location = new System.Drawing.Point(16, 192); + this.txtIssuerName.Name = "txtIssuerName"; + this.txtIssuerName.Size = new System.Drawing.Size(336, 20); + this.txtIssuerName.TabIndex = 7; + this.toolTip.SetToolTip(this.txtIssuerName, "Gets or sets the shared secret issuer name."); + this.txtIssuerName.TextChanged += new System.EventHandler(this.validation_TextChanged); + // + // txtNamespace + // + this.txtNamespace.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtNamespace.ForeColor = System.Drawing.SystemColors.ControlText; + this.txtNamespace.Location = new System.Drawing.Point(16, 96); + this.txtNamespace.Name = "txtNamespace"; + this.txtNamespace.Size = new System.Drawing.Size(336, 20); + this.txtNamespace.TabIndex = 3; + this.toolTip.SetToolTip(this.txtNamespace, "Gets or sets the name of the Service Bus namespace."); + this.txtNamespace.TextChanged += new System.EventHandler(this.validation_TextChanged); + // + // txtEntityPath + // + this.txtEntityPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtEntityPath.ForeColor = System.Drawing.SystemColors.ControlText; + this.txtEntityPath.Location = new System.Drawing.Point(16, 144); + this.txtEntityPath.Name = "txtEntityPath"; + this.txtEntityPath.Size = new System.Drawing.Size(336, 20); + this.txtEntityPath.TabIndex = 5; + this.toolTip.SetToolTip(this.txtEntityPath, "Gets or sets the name of the Service Bus namespace."); + // // logoPictureBox // this.logoPictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.logoPictureBox.BackgroundImage = global::ServiceBusExplorer.Properties.Resources.MicrosoftAzureWhiteLogo; this.logoPictureBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.logoPictureBox.ErrorImage = null; - this.logoPictureBox.Location = new System.Drawing.Point(717, 8); + this.logoPictureBox.Location = new System.Drawing.Point(657, 8); this.logoPictureBox.Name = "logoPictureBox"; this.logoPictureBox.Size = new System.Drawing.Size(110, 14); this.logoPictureBox.TabIndex = 34; @@ -161,7 +376,7 @@ private void InitializeComponent() this.btnSave.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnSave.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnSave.Location = new System.Drawing.Point(596, 443); + this.btnSave.Location = new System.Drawing.Point(536, 443); this.btnSave.Name = "btnSave"; this.btnSave.Size = new System.Drawing.Size(72, 24); this.btnSave.TabIndex = 6; @@ -174,7 +389,7 @@ private void InitializeComponent() // // btnRename // - this.btnRename.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnRename.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnRename.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.btnRename.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnRename.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); @@ -191,7 +406,7 @@ private void InitializeComponent() // // btnDelete // - this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnDelete.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); this.btnDelete.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.btnDelete.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); @@ -227,7 +442,7 @@ private void InitializeComponent() this.grouperConfigFileUse.ShadowColor = System.Drawing.Color.DarkGray; this.grouperConfigFileUse.ShadowControl = false; this.grouperConfigFileUse.ShadowThickness = 1; - this.grouperConfigFileUse.Size = new System.Drawing.Size(384, 88); + this.grouperConfigFileUse.Size = new System.Drawing.Size(368, 88); this.grouperConfigFileUse.TabIndex = 2; // // lblConfigFileUse @@ -275,7 +490,7 @@ private void InitializeComponent() this.grouperFilters.ShadowColor = System.Drawing.Color.DarkGray; this.grouperFilters.ShadowControl = false; this.grouperFilters.ShadowThickness = 1; - this.grouperFilters.Size = new System.Drawing.Size(384, 228); + this.grouperFilters.Size = new System.Drawing.Size(368, 228); this.grouperFilters.TabIndex = 1; this.grouperFilters.CustomPaint += new System.Action(this.grouperFilters_CustomPaint); // @@ -291,8 +506,6 @@ private void InitializeComponent() // // cboSelectedEntities // - this.cboSelectedEntities.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); checkBoxProperties1.ForeColor = System.Drawing.SystemColors.ControlText; this.cboSelectedEntities.CheckBoxProperties = checkBoxProperties1; this.cboSelectedEntities.DisplayMemberSingleItem = ""; @@ -301,110 +514,9 @@ private void InitializeComponent() this.cboSelectedEntities.FormattingEnabled = true; this.cboSelectedEntities.Location = new System.Drawing.Point(16, 46); this.cboSelectedEntities.Name = "cboSelectedEntities"; - this.cboSelectedEntities.Size = new System.Drawing.Size(352, 21); + this.cboSelectedEntities.Size = new System.Drawing.Size(336, 21); this.cboSelectedEntities.TabIndex = 1; // - // btnClearSubscriptionFilterExpression - // - this.btnClearSubscriptionFilterExpression.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnClearSubscriptionFilterExpression.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - this.btnClearSubscriptionFilterExpression.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; - this.btnClearSubscriptionFilterExpression.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnClearSubscriptionFilterExpression.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnClearSubscriptionFilterExpression.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnClearSubscriptionFilterExpression.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnClearSubscriptionFilterExpression.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold); - this.btnClearSubscriptionFilterExpression.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(92)))), ((int)(((byte)(125)))), ((int)(((byte)(150))))); - this.btnClearSubscriptionFilterExpression.Location = new System.Drawing.Point(344, 190); - this.btnClearSubscriptionFilterExpression.Name = "btnClearSubscriptionFilterExpression"; - this.btnClearSubscriptionFilterExpression.Size = new System.Drawing.Size(24, 21); - this.btnClearSubscriptionFilterExpression.TabIndex = 13; - this.btnClearSubscriptionFilterExpression.Text = "X"; - this.btnClearSubscriptionFilterExpression.TextAlign = System.Drawing.ContentAlignment.TopCenter; - this.toolTip.SetToolTip(this.btnClearSubscriptionFilterExpression, "Click to cancel the filter expression for subscriptions."); - this.btnClearSubscriptionFilterExpression.UseVisualStyleBackColor = false; - this.btnClearSubscriptionFilterExpression.Click += new System.EventHandler(this.btnClearSubscriptionFilterExpression_Click); - this.btnClearSubscriptionFilterExpression.MouseEnter += new System.EventHandler(this.button_MouseEnter); - this.btnClearSubscriptionFilterExpression.MouseLeave += new System.EventHandler(this.clearButton_MouseLeave); - // - // btnClearTopicFilterExpression - // - this.btnClearTopicFilterExpression.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnClearTopicFilterExpression.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - this.btnClearTopicFilterExpression.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; - this.btnClearTopicFilterExpression.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnClearTopicFilterExpression.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnClearTopicFilterExpression.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnClearTopicFilterExpression.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnClearTopicFilterExpression.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold); - this.btnClearTopicFilterExpression.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(92)))), ((int)(((byte)(125)))), ((int)(((byte)(150))))); - this.btnClearTopicFilterExpression.Location = new System.Drawing.Point(344, 142); - this.btnClearTopicFilterExpression.Name = "btnClearTopicFilterExpression"; - this.btnClearTopicFilterExpression.Size = new System.Drawing.Size(24, 21); - this.btnClearTopicFilterExpression.TabIndex = 9; - this.btnClearTopicFilterExpression.Text = "X"; - this.btnClearTopicFilterExpression.TextAlign = System.Drawing.ContentAlignment.TopCenter; - this.toolTip.SetToolTip(this.btnClearTopicFilterExpression, "Click to cancel the filter expression for topics."); - this.btnClearTopicFilterExpression.UseVisualStyleBackColor = false; - this.btnClearTopicFilterExpression.Click += new System.EventHandler(this.btnClearTopicFilterExpression_Click); - this.btnClearTopicFilterExpression.MouseEnter += new System.EventHandler(this.button_MouseEnter); - this.btnClearTopicFilterExpression.MouseLeave += new System.EventHandler(this.clearButton_MouseLeave); - // - // btnClearQueueFilterExpression - // - this.btnClearQueueFilterExpression.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnClearQueueFilterExpression.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - this.btnClearQueueFilterExpression.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; - this.btnClearQueueFilterExpression.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnClearQueueFilterExpression.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnClearQueueFilterExpression.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnClearQueueFilterExpression.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnClearQueueFilterExpression.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold); - this.btnClearQueueFilterExpression.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(92)))), ((int)(((byte)(125)))), ((int)(((byte)(150))))); - this.btnClearQueueFilterExpression.Location = new System.Drawing.Point(344, 94); - this.btnClearQueueFilterExpression.Name = "btnClearQueueFilterExpression"; - this.btnClearQueueFilterExpression.Size = new System.Drawing.Size(24, 21); - this.btnClearQueueFilterExpression.TabIndex = 5; - this.btnClearQueueFilterExpression.Text = "X"; - this.btnClearQueueFilterExpression.TextAlign = System.Drawing.ContentAlignment.TopCenter; - this.toolTip.SetToolTip(this.btnClearQueueFilterExpression, "Click to cancel the filter expression for queues."); - this.btnClearQueueFilterExpression.UseVisualStyleBackColor = false; - this.btnClearQueueFilterExpression.Click += new System.EventHandler(this.btnClearQueueFilterExpression_Click); - this.btnClearQueueFilterExpression.MouseEnter += new System.EventHandler(this.button_MouseEnter); - this.btnClearQueueFilterExpression.MouseLeave += new System.EventHandler(this.clearButton_MouseLeave); - // - // btnOpenSubscriptionFilterForm - // - this.btnOpenSubscriptionFilterForm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnOpenSubscriptionFilterForm.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - this.btnOpenSubscriptionFilterForm.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnOpenSubscriptionFilterForm.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnOpenSubscriptionFilterForm.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnOpenSubscriptionFilterForm.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOpenSubscriptionFilterForm.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnOpenSubscriptionFilterForm.Location = new System.Drawing.Point(312, 190); - this.btnOpenSubscriptionFilterForm.Name = "btnOpenSubscriptionFilterForm"; - this.btnOpenSubscriptionFilterForm.Size = new System.Drawing.Size(24, 21); - this.btnOpenSubscriptionFilterForm.TabIndex = 12; - this.btnOpenSubscriptionFilterForm.Text = "..."; - this.btnOpenSubscriptionFilterForm.TextAlign = System.Drawing.ContentAlignment.TopCenter; - this.toolTip.SetToolTip(this.btnOpenSubscriptionFilterForm, "Click to open the filter expression dialog for subscriptions."); - this.btnOpenSubscriptionFilterForm.UseVisualStyleBackColor = false; - this.btnOpenSubscriptionFilterForm.Click += new System.EventHandler(this.btnOpenSubscriptionFilterForm_Click); - this.btnOpenSubscriptionFilterForm.MouseEnter += new System.EventHandler(this.button_MouseEnter); - this.btnOpenSubscriptionFilterForm.MouseLeave += new System.EventHandler(this.button_MouseLeave); - // - // txtSubscriptionFilterExpression - // - this.txtSubscriptionFilterExpression.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtSubscriptionFilterExpression.ForeColor = System.Drawing.SystemColors.ControlText; - this.txtSubscriptionFilterExpression.Location = new System.Drawing.Point(16, 190); - this.txtSubscriptionFilterExpression.Name = "txtSubscriptionFilterExpression"; - this.txtSubscriptionFilterExpression.Size = new System.Drawing.Size(288, 20); - this.txtSubscriptionFilterExpression.TabIndex = 11; - this.toolTip.SetToolTip(this.txtSubscriptionFilterExpression, "Gets or sets the OData filter for topics."); - // // lblSubscriptionFilterExpression // this.lblSubscriptionFilterExpression.AutoSize = true; @@ -415,60 +527,6 @@ private void InitializeComponent() this.lblSubscriptionFilterExpression.TabIndex = 10; this.lblSubscriptionFilterExpression.Text = "Subscription Filter Expression:"; // - // btnOpenTopicFilterForm - // - this.btnOpenTopicFilterForm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnOpenTopicFilterForm.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - this.btnOpenTopicFilterForm.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnOpenTopicFilterForm.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnOpenTopicFilterForm.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnOpenTopicFilterForm.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOpenTopicFilterForm.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnOpenTopicFilterForm.Location = new System.Drawing.Point(312, 142); - this.btnOpenTopicFilterForm.Name = "btnOpenTopicFilterForm"; - this.btnOpenTopicFilterForm.Size = new System.Drawing.Size(24, 21); - this.btnOpenTopicFilterForm.TabIndex = 8; - this.btnOpenTopicFilterForm.Text = "..."; - this.btnOpenTopicFilterForm.TextAlign = System.Drawing.ContentAlignment.TopCenter; - this.toolTip.SetToolTip(this.btnOpenTopicFilterForm, "Click to open the filter expression dialog for topics."); - this.btnOpenTopicFilterForm.UseVisualStyleBackColor = false; - this.btnOpenTopicFilterForm.Click += new System.EventHandler(this.btnOpenTopicFilterForm_Click); - this.btnOpenTopicFilterForm.MouseEnter += new System.EventHandler(this.button_MouseEnter); - this.btnOpenTopicFilterForm.MouseLeave += new System.EventHandler(this.button_MouseLeave); - // - // btnOpenQueueFilterForm - // - this.btnOpenQueueFilterForm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnOpenQueueFilterForm.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(228)))), ((int)(((byte)(242))))); - this.btnOpenQueueFilterForm.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnOpenQueueFilterForm.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnOpenQueueFilterForm.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); - this.btnOpenQueueFilterForm.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOpenQueueFilterForm.ForeColor = System.Drawing.SystemColors.ControlText; - this.btnOpenQueueFilterForm.Location = new System.Drawing.Point(312, 94); - this.btnOpenQueueFilterForm.Name = "btnOpenQueueFilterForm"; - this.btnOpenQueueFilterForm.Size = new System.Drawing.Size(24, 21); - this.btnOpenQueueFilterForm.TabIndex = 4; - this.btnOpenQueueFilterForm.Text = "..."; - this.btnOpenQueueFilterForm.TextAlign = System.Drawing.ContentAlignment.TopCenter; - this.toolTip.SetToolTip(this.btnOpenQueueFilterForm, "Click to open the filter expression dialog for queues."); - this.btnOpenQueueFilterForm.UseVisualStyleBackColor = false; - this.btnOpenQueueFilterForm.Click += new System.EventHandler(this.btnOpenQueueFilterForm_Click); - this.btnOpenQueueFilterForm.MouseEnter += new System.EventHandler(this.button_MouseEnter); - this.btnOpenQueueFilterForm.MouseLeave += new System.EventHandler(this.button_MouseLeave); - // - // txtQueueFilterExpression - // - this.txtQueueFilterExpression.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtQueueFilterExpression.ForeColor = System.Drawing.SystemColors.ControlText; - this.txtQueueFilterExpression.Location = new System.Drawing.Point(16, 94); - this.txtQueueFilterExpression.Multiline = true; - this.txtQueueFilterExpression.Name = "txtQueueFilterExpression"; - this.txtQueueFilterExpression.Size = new System.Drawing.Size(288, 20); - this.txtQueueFilterExpression.TabIndex = 3; - this.toolTip.SetToolTip(this.txtQueueFilterExpression, "Gets or sets the OData filter for queues."); - // // lblQueueFilterExpression // this.lblQueueFilterExpression.AutoSize = true; @@ -479,17 +537,6 @@ private void InitializeComponent() this.lblQueueFilterExpression.TabIndex = 2; this.lblQueueFilterExpression.Text = "Queue Filter Expression:"; // - // txtTopicFilterExpression - // - this.txtTopicFilterExpression.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtTopicFilterExpression.ForeColor = System.Drawing.SystemColors.ControlText; - this.txtTopicFilterExpression.Location = new System.Drawing.Point(16, 142); - this.txtTopicFilterExpression.Name = "txtTopicFilterExpression"; - this.txtTopicFilterExpression.Size = new System.Drawing.Size(288, 20); - this.txtTopicFilterExpression.TabIndex = 7; - this.toolTip.SetToolTip(this.txtTopicFilterExpression, "Gets or sets the OData filter for topics."); - // // lblTopicFilterExpression // this.lblTopicFilterExpression.AutoSize = true; @@ -508,6 +555,7 @@ private void InitializeComponent() this.grouperServiceBusNamespaceSettings.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209))))); this.grouperServiceBusNamespaceSettings.BorderThickness = 1F; this.grouperServiceBusNamespaceSettings.Controls.Add(this.useAmqpWebSocketsCheckBox); + this.grouperServiceBusNamespaceSettings.Controls.Add(this.lblNewSdkTransportType); this.grouperServiceBusNamespaceSettings.Controls.Add(this.cboTransportType); this.grouperServiceBusNamespaceSettings.Controls.Add(this.lblTransportType); this.grouperServiceBusNamespaceSettings.Controls.Add(this.cboConnectivityMode); @@ -527,7 +575,7 @@ private void InitializeComponent() this.grouperServiceBusNamespaceSettings.ForeColor = System.Drawing.Color.White; this.grouperServiceBusNamespaceSettings.GroupImage = null; this.grouperServiceBusNamespaceSettings.GroupTitle = "Connection Settings"; - this.grouperServiceBusNamespaceSettings.Location = new System.Drawing.Point(418, 24); + this.grouperServiceBusNamespaceSettings.Location = new System.Drawing.Point(400, 24); this.grouperServiceBusNamespaceSettings.Name = "grouperServiceBusNamespaceSettings"; this.grouperServiceBusNamespaceSettings.Padding = new System.Windows.Forms.Padding(20); this.grouperServiceBusNamespaceSettings.PaintGroupBox = true; @@ -535,7 +583,7 @@ private void InitializeComponent() this.grouperServiceBusNamespaceSettings.ShadowColor = System.Drawing.Color.DarkGray; this.grouperServiceBusNamespaceSettings.ShadowControl = false; this.grouperServiceBusNamespaceSettings.ShadowThickness = 1; - this.grouperServiceBusNamespaceSettings.Size = new System.Drawing.Size(410, 408); + this.grouperServiceBusNamespaceSettings.Size = new System.Drawing.Size(368, 408); this.grouperServiceBusNamespaceSettings.TabIndex = 3; this.grouperServiceBusNamespaceSettings.CustomPaint += new System.Action(this.grouperServiceBusNamespaceSettings_CustomPaint); // @@ -543,23 +591,30 @@ private void InitializeComponent() // this.useAmqpWebSocketsCheckBox.AutoSize = true; this.useAmqpWebSocketsCheckBox.ForeColor = System.Drawing.SystemColors.ControlText; - this.useAmqpWebSocketsCheckBox.Location = new System.Drawing.Point(16, 371); + this.useAmqpWebSocketsCheckBox.Location = new System.Drawing.Point(337, 384); this.useAmqpWebSocketsCheckBox.Name = "useAmqpWebSocketsCheckBox"; - this.useAmqpWebSocketsCheckBox.Size = new System.Drawing.Size(365, 17); + this.useAmqpWebSocketsCheckBox.Size = new System.Drawing.Size(15, 14); this.useAmqpWebSocketsCheckBox.TabIndex = 15; - this.useAmqpWebSocketsCheckBox.Text = "Use AMQP Web Sockets for Microsoft.Azure.ServiceBus.dll (new client)"; this.useAmqpWebSocketsCheckBox.UseVisualStyleBackColor = true; // + // lblNewSdkTransportType + // + this.lblNewSdkTransportType.AutoSize = true; + this.lblNewSdkTransportType.ForeColor = System.Drawing.SystemColors.ControlText; + this.lblNewSdkTransportType.Location = new System.Drawing.Point(16, 368); + this.lblNewSdkTransportType.Name = "lblNewSdkTransportType"; + this.lblNewSdkTransportType.Size = new System.Drawing.Size(346, 13); + this.lblNewSdkTransportType.TabIndex = 14; + this.lblNewSdkTransportType.Text = "Use AMQP Web Sockets for Microsoft.Azure.ServiceBus.dll (new client)"; + // // cboTransportType // - this.cboTransportType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); this.cboTransportType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cboTransportType.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cboTransportType.FormattingEnabled = true; this.cboTransportType.Location = new System.Drawing.Point(16, 336); this.cboTransportType.Name = "cboTransportType"; - this.cboTransportType.Size = new System.Drawing.Size(372, 21); + this.cboTransportType.Size = new System.Drawing.Size(336, 21); this.cboTransportType.TabIndex = 13; this.cboTransportType.SelectedIndexChanged += new System.EventHandler(this.cboTransportType_SelectedIndexChanged); // @@ -575,14 +630,12 @@ private void InitializeComponent() // // cboConnectivityMode // - this.cboConnectivityMode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); this.cboConnectivityMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cboConnectivityMode.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cboConnectivityMode.FormattingEnabled = true; this.cboConnectivityMode.Location = new System.Drawing.Point(16, 288); this.cboConnectivityMode.Name = "cboConnectivityMode"; - this.cboConnectivityMode.Size = new System.Drawing.Size(372, 21); + this.cboConnectivityMode.Size = new System.Drawing.Size(336, 21); this.cboConnectivityMode.TabIndex = 11; // // lblConnectivityMode @@ -603,7 +656,7 @@ private void InitializeComponent() this.txtUri.Location = new System.Drawing.Point(16, 48); this.txtUri.Multiline = true; this.txtUri.Name = "txtUri"; - this.txtUri.Size = new System.Drawing.Size(372, 20); + this.txtUri.Size = new System.Drawing.Size(336, 20); this.txtUri.TabIndex = 1; this.txtUri.TextChanged += new System.EventHandler(this.validation_TextChanged); // @@ -617,19 +670,6 @@ private void InitializeComponent() this.lblUri.TabIndex = 0; this.lblUri.Text = "Endpoint URI:"; // - // txtIssuerSecret - // - this.txtIssuerSecret.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtIssuerSecret.ForeColor = System.Drawing.SystemColors.ControlText; - this.txtIssuerSecret.Location = new System.Drawing.Point(16, 240); - this.txtIssuerSecret.Name = "txtIssuerSecret"; - this.txtIssuerSecret.PasswordChar = '*'; - this.txtIssuerSecret.Size = new System.Drawing.Size(372, 20); - this.txtIssuerSecret.TabIndex = 9; - this.toolTip.SetToolTip(this.txtIssuerSecret, "Gets or sets the shared secret issuer secret."); - this.txtIssuerSecret.TextChanged += new System.EventHandler(this.validation_TextChanged); - // // lblIssuerSecret // this.lblIssuerSecret.AutoSize = true; @@ -640,18 +680,6 @@ private void InitializeComponent() this.lblIssuerSecret.TabIndex = 8; this.lblIssuerSecret.Text = "Shared Access Key:"; // - // txtIssuerName - // - this.txtIssuerName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtIssuerName.ForeColor = System.Drawing.SystemColors.ControlText; - this.txtIssuerName.Location = new System.Drawing.Point(16, 192); - this.txtIssuerName.Name = "txtIssuerName"; - this.txtIssuerName.Size = new System.Drawing.Size(372, 20); - this.txtIssuerName.TabIndex = 7; - this.toolTip.SetToolTip(this.txtIssuerName, "Gets or sets the shared secret issuer name."); - this.txtIssuerName.TextChanged += new System.EventHandler(this.validation_TextChanged); - // // lblIssuerName // this.lblIssuerName.AutoSize = true; @@ -662,18 +690,6 @@ private void InitializeComponent() this.lblIssuerName.TabIndex = 6; this.lblIssuerName.Text = "Shared Access Key Name:"; // - // txtNamespace - // - this.txtNamespace.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtNamespace.ForeColor = System.Drawing.SystemColors.ControlText; - this.txtNamespace.Location = new System.Drawing.Point(16, 96); - this.txtNamespace.Name = "txtNamespace"; - this.txtNamespace.Size = new System.Drawing.Size(372, 20); - this.txtNamespace.TabIndex = 3; - this.toolTip.SetToolTip(this.txtNamespace, "Gets or sets the name of the Service Bus namespace."); - this.txtNamespace.TextChanged += new System.EventHandler(this.validation_TextChanged); - // // lblNamespace // this.lblNamespace.AutoSize = true; @@ -684,17 +700,6 @@ private void InitializeComponent() this.lblNamespace.TabIndex = 2; this.lblNamespace.Text = "Namespace:"; // - // txtEntityPath - // - this.txtEntityPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtEntityPath.ForeColor = System.Drawing.SystemColors.ControlText; - this.txtEntityPath.Location = new System.Drawing.Point(16, 144); - this.txtEntityPath.Name = "txtEntityPath"; - this.txtEntityPath.Size = new System.Drawing.Size(372, 20); - this.txtEntityPath.TabIndex = 5; - this.toolTip.SetToolTip(this.txtEntityPath, "Gets or sets the name of the Service Bus namespace."); - // // lblEntityPath // this.lblEntityPath.AutoSize = true; @@ -726,7 +731,7 @@ private void InitializeComponent() this.grouperServiceBusNamespaces.ShadowColor = System.Drawing.Color.DarkGray; this.grouperServiceBusNamespaces.ShadowControl = false; this.grouperServiceBusNamespaces.ShadowThickness = 1; - this.grouperServiceBusNamespaces.Size = new System.Drawing.Size(384, 72); + this.grouperServiceBusNamespaces.Size = new System.Drawing.Size(368, 72); this.grouperServiceBusNamespaces.TabIndex = 0; this.grouperServiceBusNamespaces.CustomPaint += new System.Action(this.grouperServiceBusNamespaces_CustomPaint); // @@ -738,9 +743,9 @@ private void InitializeComponent() this.cboServiceBusNamespace.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cboServiceBusNamespace.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cboServiceBusNamespace.FormattingEnabled = true; - this.cboServiceBusNamespace.Location = new System.Drawing.Point(19, 32); + this.cboServiceBusNamespace.Location = new System.Drawing.Point(16, 32); this.cboServiceBusNamespace.Name = "cboServiceBusNamespace"; - this.cboServiceBusNamespace.Size = new System.Drawing.Size(352, 21); + this.cboServiceBusNamespace.Size = new System.Drawing.Size(336, 21); this.cboServiceBusNamespace.TabIndex = 0; this.cboServiceBusNamespace.SelectedIndexChanged += new System.EventHandler(this.cboServiceBusNamespace_SelectedIndexChanged); // @@ -749,7 +754,7 @@ private void InitializeComponent() 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.ClientSize = new System.Drawing.Size(844, 477); + this.ClientSize = new System.Drawing.Size(784, 477); this.Controls.Add(this.grouperConfigFileUse); this.Controls.Add(this.btnDelete); this.Controls.Add(this.btnRename); @@ -824,6 +829,7 @@ private void InitializeComponent() private System.Windows.Forms.Button btnDelete; private Grouper grouperConfigFileUse; private System.Windows.Forms.Label lblConfigFileUse; + private System.Windows.Forms.Label lblNewSdkTransportType; private System.Windows.Forms.CheckBox useAmqpWebSocketsCheckBox; } } diff --git a/src/ServiceBusExplorer/Forms/DeleteForm.Designer.cs b/src/ServiceBusExplorer/Forms/DeleteForm.Designer.cs index cf669824..81b47a15 100644 --- a/src/ServiceBusExplorer/Forms/DeleteForm.Designer.cs +++ b/src/ServiceBusExplorer/Forms/DeleteForm.Designer.cs @@ -115,7 +115,7 @@ private void InitializeComponent() // lblMessage // this.lblMessage.AutoSize = true; - this.lblMessage.Location = new System.Drawing.Point(56, 24); + this.lblMessage.Location = new System.Drawing.Point(60, 24); this.lblMessage.Name = "lblMessage"; this.lblMessage.Size = new System.Drawing.Size(33, 13); this.lblMessage.TabIndex = 0; diff --git a/src/ServiceBusExplorer/Forms/DeleteForm.cs b/src/ServiceBusExplorer/Forms/DeleteForm.cs index a1d25493..0fa4bd7d 100644 --- a/src/ServiceBusExplorer/Forms/DeleteForm.cs +++ b/src/ServiceBusExplorer/Forms/DeleteForm.cs @@ -38,7 +38,6 @@ public partial class DeleteForm : Form //*************************** private const string MessageFormat = "The {0} {1} will be permanently deleted."; private const string Unknown = "Unknown"; - private const int widthPadding = 88; #endregion #region Private Fields @@ -51,7 +50,7 @@ public DeleteForm(string message) { InitializeComponent(); lblMessage.Text = string.Format(message); - Width = lblMessage.Width + LogicalToDeviceUnits(widthPadding); + Width = lblMessage.Width + 88; } public DeleteForm(string entityName, string entityType) @@ -60,7 +59,7 @@ public DeleteForm(string entityName, string entityType) lblMessage.Text = string.Format(MessageFormat, entityType ?? Unknown, entityName ?? Unknown); - Width = lblMessage.Width + LogicalToDeviceUnits(widthPadding); + Width = lblMessage.Width + 88; } #endregion diff --git a/src/ServiceBusExplorer/Forms/FilterForm.cs b/src/ServiceBusExplorer/Forms/FilterForm.cs index 53a7642f..26bdc783 100644 --- a/src/ServiceBusExplorer/Forms/FilterForm.cs +++ b/src/ServiceBusExplorer/Forms/FilterForm.cs @@ -24,11 +24,13 @@ using System; using System.Collections.Generic; using System.Drawing; +using System.Globalization; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Windows.Forms; using ServiceBusExplorer.Controls; +using ServiceBusExplorer.Helpers; using ServiceBusExplorer.Utilities.Helpers; #endregion @@ -46,7 +48,7 @@ public partial class FilterForm : Form private const string StartsWithFormat = "Startswith({0}, '{1}') Eq true"; private const string MessageCountFormat = "MessageCount {0} {1}"; private const string TimeFilterFormat = "{0} {1} '{2}'"; - + //*************************** // Constants //*************************** @@ -63,7 +65,7 @@ public partial class FilterForm : Form private const string TimeFilterOperator = "Operator"; private const string TimeFilterValue = "Value"; - //*************************** + //*************************** // RegeEx Patterns & Groups //*************************** private const string AndPattern = @"\s+and\s+"; @@ -79,7 +81,7 @@ public partial class FilterForm : Form #endregion #region Private Static Fields - private static readonly List properties = new List { "CreatedAt", "AccessedAt", "UpdatedAt" }; + 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 timeFilters = new List(); #endregion @@ -345,7 +347,7 @@ private void ReadFilterExpression() // Initialize control values txtStartsWith.Text = string.Empty; - txtMessageCount.Text = string.Empty; + txtMessageCount.Text = string.Empty; cboMessageCountOperator.SelectedIndex = 0; //timeFilterDataGridView.Rows.Clear(); timeFilters.Clear(); @@ -408,11 +410,11 @@ private void ReadFilterExpression() !string.IsNullOrWhiteSpace(timeFilterValue)) { timeFilters.Add(new TimeFilterInfo - { - Property = timeFilterProperty, - Operator = timeFilterOperator, - Value = DateTime.Parse(timeFilterValue) - }); + { + Property = timeFilterProperty, + Operator = timeFilterOperator, + Value = DateTime.Parse(timeFilterValue) + }); } } } diff --git a/src/ServiceBusExplorer/Forms/MainForm.cs b/src/ServiceBusExplorer/Forms/MainForm.cs index be82609e..989e54b5 100644 --- a/src/ServiceBusExplorer/Forms/MainForm.cs +++ b/src/ServiceBusExplorer/Forms/MainForm.cs @@ -561,7 +561,6 @@ private async void optionsToolStripMenuItem_Click(object sender, EventArgs e) lstLog.Font = new Font(lstLog.Font.FontFamily, (float)optionForm.MainSettings.LogFontSize); serviceBusTreeView.Font = new Font(serviceBusTreeView.Font.FontFamily, (float)optionForm.MainSettings.TreeViewFontSize); - serviceBusTreeView.ItemHeight = serviceBusTreeView.Font.Height; RetryHelper.RetryCount = optionForm.MainSettings.RetryCount; RetryHelper.RetryTimeout = optionForm.MainSettings.RetryTimeout; ReceiveTimeout = optionForm.MainSettings.ReceiveTimeout; @@ -4044,7 +4043,6 @@ void GetServiceBusNamespaceSettingsFromConfiguration() { treeViewFontSize = tempTreeViewFontSize; serviceBusTreeView.Font = new Font(serviceBusTreeView.Font.FontFamily, (float)treeViewFontSize); - serviceBusTreeView.ItemHeight = serviceBusTreeView.Font.Height; } RetryHelper.RetryCount = readSettings.RetryCount; @@ -4232,7 +4230,7 @@ private void SetControlSize(Control control) ok = true; } var width = panelMain.Width - 4; - var height = panelMain.Height - (LogicalToDeviceUnits(panelMain.HeaderHeight) + 6); + var height = panelMain.Height - 26; control.Width = width < ControlMinWidth ? ControlMinWidth : width; control.Height = height < ControlMinHeight ? ControlMinHeight : height; } @@ -5259,7 +5257,7 @@ private void ShowQueue(QueueDescription queue, string path, bool duplicateQueue panelMain.BackColor = SystemColors.GradientInactiveCaption; queueControl = new HandleQueueControl(WriteToLog, serviceBusHelper, queue, path, duplicateQueue); queueControl.SuspendDrawing(); - queueControl.Location = new Point(1, LogicalToDeviceUnits(panelLog.HeaderHeight) + 1); + queueControl.Location = new Point(1, panelLog.HeaderHeight + 1); panelMain.Controls.Add(queueControl); SetControlSize(queueControl); queueControl.OnCancel += MainForm_OnCancel; @@ -5295,7 +5293,7 @@ private void ShowTopic(TopicDescription topic, string path) panelMain.BackColor = SystemColors.GradientInactiveCaption; topicControl = new HandleTopicControl(WriteToLog, serviceBusHelper, topic, path); topicControl.SuspendDrawing(); - topicControl.Location = new Point(1, LogicalToDeviceUnits(panelLog.HeaderHeight) + 1); + topicControl.Location = new Point(1, panelLog.HeaderHeight + 1); panelMain.Controls.Add(topicControl); SetControlSize(topicControl); topicControl.OnCancel += MainForm_OnCancel; @@ -5349,7 +5347,7 @@ private void ShowEventGridTopic(NamespaceTopicResource topic, string path) /// /// Wrapper to /// If set the rendered subscription panel will be a "Duplicate" form. - private void ShowSubscription(SubscriptionWrapper wrapper, bool duplicateCurrentSubscription = false) + private void ShowSubscription(SubscriptionWrapper wrapper, bool duplicateCurrentSubscription = false) { HandleSubscriptionControl subscriptionControl = null; @@ -5364,7 +5362,7 @@ private void ShowSubscription(SubscriptionWrapper wrapper, bool duplicateCurrent panelMain.BackColor = SystemColors.GradientInactiveCaption; subscriptionControl = new HandleSubscriptionControl(WriteToLog, serviceBusHelper, wrapper, duplicateCurrentSubscription); subscriptionControl.SuspendDrawing(); - subscriptionControl.Location = new Point(1, LogicalToDeviceUnits(panelLog.HeaderHeight) + 1); + subscriptionControl.Location = new Point(1, panelLog.HeaderHeight + 1); panelMain.Controls.Add(subscriptionControl); SetControlSize(subscriptionControl); subscriptionControl.OnCancel += MainForm_OnCancel; @@ -5433,7 +5431,7 @@ private void ShowRelay(RelayDescription relayService, string path) panelMain.BackColor = SystemColors.GradientInactiveCaption; relayServiceControl = new HandleRelayControl(WriteToLog, serviceBusHelper, relayService, path); relayServiceControl.SuspendDrawing(); - relayServiceControl.Location = new Point(1, LogicalToDeviceUnits(panelLog.HeaderHeight) + 1); + relayServiceControl.Location = new Point(1, panelLog.HeaderHeight + 1); panelMain.Controls.Add(relayServiceControl); SetControlSize(relayServiceControl); relayServiceControl.OnCancel += MainForm_OnCancel; @@ -5468,7 +5466,7 @@ private void ShowRule(RuleWrapper wrapper, bool? isFirstRule) panelMain.BackColor = SystemColors.GradientInactiveCaption; ruleControl = new HandleRuleControl(WriteToLog, serviceBusHelper, wrapper, isFirstRule); ruleControl.SuspendDrawing(); - ruleControl.Location = new Point(1, LogicalToDeviceUnits(panelLog.HeaderHeight) + 1); + ruleControl.Location = new Point(1, panelLog.HeaderHeight + 1); panelMain.Controls.Add(ruleControl); SetControlSize(ruleControl); ruleControl.OnCancel += MainForm_OnCancel; @@ -5502,7 +5500,7 @@ private void ShowEventHub(EventHubDescription eventHub) panelMain.BackColor = SystemColors.GradientInactiveCaption; eventHubControl = new HandleEventHubControl(WriteToLog, serviceBusHelper, eventHub); eventHubControl.SuspendDrawing(); - eventHubControl.Location = new Point(1, LogicalToDeviceUnits(panelLog.HeaderHeight) + 1); + eventHubControl.Location = new Point(1, panelLog.HeaderHeight + 1); panelMain.Controls.Add(eventHubControl); SetControlSize(eventHubControl); eventHubControl.OnCancel += MainForm_OnCancel; @@ -5547,7 +5545,7 @@ private void ShowPartition(PartitionDescription partition) } partitionControl = new HandlePartitionControl(WriteToLog, serviceBusHelper, partition); partitionControl.SuspendDrawing(); - partitionControl.Location = new Point(1, LogicalToDeviceUnits(panelLog.HeaderHeight) + 1); + partitionControl.Location = new Point(1, panelLog.HeaderHeight + 1); panelMain.Controls.Add(partitionControl); partitionControl.OnRefresh += MainForm_OnRefresh; SetControlSize(partitionControl); @@ -5581,7 +5579,7 @@ private void ShowConsumerGroup(ConsumerGroupDescription notificationHub, string panelMain.BackColor = SystemColors.GradientInactiveCaption; notificationHubControl = new HandleConsumerGroupControl(WriteToLog, serviceBusHelper, notificationHub, eventHubname); notificationHubControl.SuspendDrawing(); - notificationHubControl.Location = new Point(1, LogicalToDeviceUnits(panelLog.HeaderHeight) + 1); + notificationHubControl.Location = new Point(1, panelLog.HeaderHeight + 1); panelMain.Controls.Add(notificationHubControl); SetControlSize(notificationHubControl); notificationHubControl.OnCancel += MainForm_OnCancel; @@ -5616,7 +5614,7 @@ private void ShowNotificationHub(NotificationHubDescription notificationHub) panelMain.BackColor = SystemColors.GradientInactiveCaption; notificationHubControl = new HandleNotificationHubControl(WriteToLog, serviceBusHelper, notificationHub); notificationHubControl.SuspendDrawing(); - notificationHubControl.Location = new Point(1, LogicalToDeviceUnits(panelLog.HeaderHeight) + 1); + notificationHubControl.Location = new Point(1, panelLog.HeaderHeight + 1); panelMain.Controls.Add(notificationHubControl); SetControlSize(notificationHubControl); notificationHubControl.OnCancel += MainForm_OnCancel; @@ -5658,7 +5656,7 @@ private void TestQueue(QueueDescription queueDescription, bool sdi) serviceBusHelper, queueDescription); queueControl.SuspendDrawing(); - queueControl.Location = new Point(1, LogicalToDeviceUnits(panelLog.HeaderHeight) + 1); + queueControl.Location = new Point(1, panelLog.HeaderHeight + 1); panelMain.Controls.Add(queueControl); SetControlSize(queueControl); queueControl.OnCancel += MainForm_OnCancel; @@ -5706,7 +5704,7 @@ private void TestTopic(TopicDescription topicDescription, List topicTreeNodes = new List(); this.FindTopicsNodesRecursive(topicTreeNodes, treeNode); subscriptions.AddRange(topicTreeNodes.SelectMany(subscriptionsExtractor)); } - else if (treeNode == FindNode(Constants.QueueEntities, rootNode) + else if (treeNode == FindNode(Constants.QueueEntities, rootNode) || (treeNode.Tag is UrlSegmentWrapper && (treeNode.Tag as UrlSegmentWrapper).EntityType == EntityType.Queue)) { deleteConfirmation = $"Are you sure you want to purge {strategyDescription} from all queues{(treeNode.Tag is UrlSegmentWrapper ? " in this folder" : string.Empty)}?"; diff --git a/src/ServiceBusExplorer/Forms/NewVersionAvailableForm.Designer.cs b/src/ServiceBusExplorer/Forms/NewVersionAvailableForm.Designer.cs index ee2ac2b4..4f50f84c 100644 --- a/src/ServiceBusExplorer/Forms/NewVersionAvailableForm.Designer.cs +++ b/src/ServiceBusExplorer/Forms/NewVersionAvailableForm.Designer.cs @@ -54,59 +54,33 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewVersionAvailableForm)); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.labelReleaseInfo = new System.Windows.Forms.Label(); - this.linkLabelnewVersion = new System.Windows.Forms.LinkLabel(); - this.labelLatestVersion = new System.Windows.Forms.Label(); this.lblExeVersion = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.tableLayoutPanel1.SuspendLayout(); + this.labelLatestVersion = new System.Windows.Forms.Label(); + this.linkLabelnewVersion = new System.Windows.Forms.LinkLabel(); + this.labelReleaseInfo = new System.Windows.Forms.Label(); this.SuspendLayout(); // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent; - this.tableLayoutPanel1.ColumnCount = 1; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.Controls.Add(this.labelReleaseInfo, 0, 4); - this.tableLayoutPanel1.Controls.Add(this.linkLabelnewVersion, 0, 3); - this.tableLayoutPanel1.Controls.Add(this.labelLatestVersion, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.lblExeVersion, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.label2, 0, 0); - this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 44); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 5; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(560, 343); - this.tableLayoutPanel1.TabIndex = 6; - // - // labelReleaseInfo + // lblExeVersion // - this.labelReleaseInfo.AutoSize = true; - this.labelReleaseInfo.BackColor = System.Drawing.Color.Transparent; - this.labelReleaseInfo.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelReleaseInfo.Location = new System.Drawing.Point(3, 100); - this.labelReleaseInfo.Name = "labelReleaseInfo"; - this.labelReleaseInfo.Size = new System.Drawing.Size(554, 243); - this.labelReleaseInfo.TabIndex = 6; - this.labelReleaseInfo.Text = "releaseInfo"; + this.lblExeVersion.AutoSize = true; + this.lblExeVersion.BackColor = System.Drawing.Color.Transparent; + this.lblExeVersion.Location = new System.Drawing.Point(16, 81); + this.lblExeVersion.Name = "lblExeVersion"; + this.lblExeVersion.Size = new System.Drawing.Size(81, 13); + this.lblExeVersion.TabIndex = 1; + this.lblExeVersion.Text = "Version: 1.0.0.0"; // - // linkLabelnewVersion + // label2 // - this.linkLabelnewVersion.AutoSize = true; - this.linkLabelnewVersion.BackColor = System.Drawing.Color.Transparent; - this.linkLabelnewVersion.ForeColor = System.Drawing.Color.Navy; - this.linkLabelnewVersion.Location = new System.Drawing.Point(3, 75); - this.linkLabelnewVersion.Name = "linkLabelnewVersion"; - this.linkLabelnewVersion.Size = new System.Drawing.Size(220, 13); - this.linkLabelnewVersion.TabIndex = 5; - this.linkLabelnewVersion.TabStop = true; - this.linkLabelnewVersion.Text = "https://github.com/xxxxxxxxxxxxxxxx/xxxxxxx"; - this.linkLabelnewVersion.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelnewVersion_LinkClicked); + this.label2.AutoSize = true; + this.label2.BackColor = System.Drawing.Color.Transparent; + this.label2.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(16, 54); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(158, 16); + this.label2.TabIndex = 0; + this.label2.Text = "Service Bus Explorer"; // // labelLatestVersion // @@ -114,32 +88,36 @@ private void InitializeComponent() this.labelLatestVersion.BackColor = System.Drawing.Color.Transparent; this.labelLatestVersion.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold); this.labelLatestVersion.ForeColor = System.Drawing.Color.Red; - this.labelLatestVersion.Location = new System.Drawing.Point(3, 50); + this.labelLatestVersion.Location = new System.Drawing.Point(16, 106); this.labelLatestVersion.Name = "labelLatestVersion"; - this.labelLatestVersion.Size = new System.Drawing.Size(184, 16); - this.labelLatestVersion.TabIndex = 4; + this.labelLatestVersion.Size = new System.Drawing.Size(185, 16); + this.labelLatestVersion.TabIndex = 2; this.labelLatestVersion.Text = "New Version is Available"; // - // lblExeVersion + // linkLabelnewVersion // - this.lblExeVersion.AutoSize = true; - this.lblExeVersion.BackColor = System.Drawing.Color.Transparent; - this.lblExeVersion.Location = new System.Drawing.Point(3, 25); - this.lblExeVersion.Name = "lblExeVersion"; - this.lblExeVersion.Size = new System.Drawing.Size(81, 13); - this.lblExeVersion.TabIndex = 3; - this.lblExeVersion.Text = "Version: 1.0.0.0"; + this.linkLabelnewVersion.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.linkLabelnewVersion.AutoSize = true; + this.linkLabelnewVersion.BackColor = System.Drawing.Color.Transparent; + this.linkLabelnewVersion.ForeColor = System.Drawing.Color.Navy; + this.linkLabelnewVersion.Location = new System.Drawing.Point(16, 134); + this.linkLabelnewVersion.Name = "linkLabelnewVersion"; + this.linkLabelnewVersion.Size = new System.Drawing.Size(220, 13); + this.linkLabelnewVersion.TabIndex = 3; + this.linkLabelnewVersion.TabStop = true; + this.linkLabelnewVersion.Text = "https://github.com/xxxxxxxxxxxxxxxx/xxxxxxx"; + this.linkLabelnewVersion.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelnewVersion_LinkClicked); // - // label2 + // labelReleaseInfo // - this.label2.AutoSize = true; - this.label2.BackColor = System.Drawing.Color.Transparent; - this.label2.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.Location = new System.Drawing.Point(3, 0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(157, 16); - this.label2.TabIndex = 1; - this.label2.Text = "Service Bus Explorer"; + this.labelReleaseInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.labelReleaseInfo.AutoSize = true; + this.labelReleaseInfo.BackColor = System.Drawing.Color.Transparent; + this.labelReleaseInfo.Location = new System.Drawing.Point(16, 159); + this.labelReleaseInfo.Name = "labelReleaseInfo"; + this.labelReleaseInfo.Size = new System.Drawing.Size(59, 13); + this.labelReleaseInfo.TabIndex = 4; + this.labelReleaseInfo.Text = "releaseInfo"; // // NewVersionAvailableForm // @@ -149,7 +127,11 @@ private void InitializeComponent() this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.ClientSize = new System.Drawing.Size(584, 441); - this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.labelReleaseInfo); + this.Controls.Add(this.labelLatestVersion); + this.Controls.Add(this.linkLabelnewVersion); + this.Controls.Add(this.lblExeVersion); + this.Controls.Add(this.label2); this.DoubleBuffered = true; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); @@ -160,19 +142,16 @@ private void InitializeComponent() this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Version Checker"; this.Load += new System.EventHandler(this.NewVersionAvailableForm_Load); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); this.ResumeLayout(false); + this.PerformLayout(); } #endregion - - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.Label labelReleaseInfo; - private System.Windows.Forms.LinkLabel linkLabelnewVersion; - private System.Windows.Forms.Label labelLatestVersion; private System.Windows.Forms.Label lblExeVersion; private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label labelLatestVersion; + private System.Windows.Forms.LinkLabel linkLabelnewVersion; + private System.Windows.Forms.Label labelReleaseInfo; } } diff --git a/src/ServiceBusExplorer/Forms/NewVersionAvailableForm.cs b/src/ServiceBusExplorer/Forms/NewVersionAvailableForm.cs index 2846cde6..8db19c6c 100644 --- a/src/ServiceBusExplorer/Forms/NewVersionAvailableForm.cs +++ b/src/ServiceBusExplorer/Forms/NewVersionAvailableForm.cs @@ -21,11 +21,15 @@ #region Using Directives -using ServiceBusExplorer.Helpers; -using ServiceBusExplorer.UIHelpers; using System; +using System.Collections; +using System.ComponentModel; using System.Diagnostics; +using System.Drawing; +using System.Drawing.Drawing2D; using System.Windows.Forms; +using ServiceBusExplorer.Helpers; +using ServiceBusExplorer.Properties; #endregion @@ -45,17 +49,36 @@ public NewVersionAvailableForm() ControlStyles.ResizeRedraw | ControlStyles.UserPaint, true); + } #endregion #region Event Handlers - private void NewVersionAvailableForm_Load(object sender, EventArgs e) + + private void siteLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - this.SuspendDrawing(); - this.SuspendLayout(); + Process.Start("https://github.com/paolosalvatori/ServiceBusExplorer"); + } - lblExeVersion.Text = VersionProvider.GetExeVersion(); + private void mailLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + Process.Start("mailto:paolos@microsoft.com?subject=Service%20Bus%20Explorer%20Feedback"); + } + + private void blogLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + Process.Start("http://blogs.msdn.com/paolos"); + } + + private void twitterLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + Process.Start("https://twitter.com/babosbird"); + } + private void NewVersionAvailableForm_Load(object sender, EventArgs e) + { + lblExeVersion.Text = VersionProvider.GetExeVersion(); + if (!VersionProvider.IsLatestVersion(out var releaseInfo)) { labelLatestVersion.Text = $"New Release {releaseInfo.Version} Available"; @@ -71,9 +94,6 @@ private void NewVersionAvailableForm_Load(object sender, EventArgs e) linkLabelnewVersion.Visible = false; labelReleaseInfo.Visible = false; } - - this.ResumeDrawing(); - this.ResumeLayout(); } #endregion diff --git a/src/ServiceBusExplorer/Forms/ParameterForm.cs b/src/ServiceBusExplorer/Forms/ParameterForm.cs index bfda6abc..ba2eeec7 100644 --- a/src/ServiceBusExplorer/Forms/ParameterForm.cs +++ b/src/ServiceBusExplorer/Forms/ParameterForm.cs @@ -34,8 +34,8 @@ namespace ServiceBusExplorer.Forms public partial class ParameterForm : Form { #region Private Fields - private readonly IList canBeNullList; - private readonly IList textBoxList; + private IList canBeNullList; + private readonly IList textBoxList; #endregion #region Public Constructor @@ -51,56 +51,45 @@ public ParameterForm(string title, IList parameterNameList, IList().Where(c => c is TextBox).ToList(); - var delta = parameterNameList.Count * labelYStep; + var delta = parameterNameList.Count*48; Size = new Size(Size.Width, Size.Height + delta); textBox_TextChanged(null, null); } diff --git a/src/ServiceBusExplorer/ServiceBusExplorer.csproj b/src/ServiceBusExplorer/ServiceBusExplorer.csproj index 8b3c4de0..eff8c9c6 100644 --- a/src/ServiceBusExplorer/ServiceBusExplorer.csproj +++ b/src/ServiceBusExplorer/ServiceBusExplorer.csproj @@ -70,7 +70,6 @@ NewServiceBusExplorerLogo.jpg https://github.com/paolosalvatori/ServiceBusExplorer LICENSE.txt - app.manifest diff --git a/src/ServiceBusExplorer/UIHelpers/ControlHelper.cs b/src/ServiceBusExplorer/UIHelpers/ControlHelper.cs index 92c8c19b..23a8a88c 100644 --- a/src/ServiceBusExplorer/UIHelpers/ControlHelper.cs +++ b/src/ServiceBusExplorer/UIHelpers/ControlHelper.cs @@ -21,34 +21,36 @@ #region Using Directives +using System; +using System.Runtime.InteropServices; using System.Windows.Forms; #endregion namespace ServiceBusExplorer.UIHelpers { - public static class ControlHelper - { + public static class ControlHelper + { #region Redraw Suspend/Resume - private const int WmSetredraw = 0xB; - public static void SuspendDrawing(this Control target) + private const int WmSetredraw = 0xB; + public static void SuspendDrawing(this Control target) { - NativeMethods.SendMessage(target.Handle, WmSetredraw, 0, 0); - } + NativeMethods.SendMessage(target.Handle, WmSetredraw, 0, 0); + } + + public static void ResumeDrawing(this Control target) + { + ResumeDrawing(target, true); + } - public static void ResumeDrawing(this Control target) - { - ResumeDrawing(target, true); - } - - public static void ResumeDrawing(this Control target, bool redraw) - { - NativeMethods.SendMessage(target.Handle, WmSetredraw, 1, 0); - if (redraw) - { - target.Refresh(); - } - } - #endregion - } + public static void ResumeDrawing(this Control target, bool redraw) + { + NativeMethods.SendMessage(target.Handle, WmSetredraw, 1, 0); + if (redraw) + { + target.Refresh(); + } + } + #endregion + } } diff --git a/src/ServiceBusExplorer/app.manifest b/src/ServiceBusExplorer/app.manifest deleted file mode 100644 index 5e4823e3..00000000 --- a/src/ServiceBusExplorer/app.manifest +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - system - - - - - - - - - - diff --git a/src/Utilities/Helpers/GitHubReleaseProvider.cs b/src/Utilities/Helpers/GitHubReleaseProvider.cs index 9bce6413..4b5bee6b 100644 --- a/src/Utilities/Helpers/GitHubReleaseProvider.cs +++ b/src/Utilities/Helpers/GitHubReleaseProvider.cs @@ -21,12 +21,12 @@ namespace ServiceBusExplorer.Utilities.Helpers { - using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Threading.Tasks; + using Newtonsoft.Json; public class ReleaseInfo { @@ -47,8 +47,6 @@ public ReleaseInfo(Uri releaseUri, Version version, string body, Uri zipPackageU public static class GitHubReleaseProvider { - private static readonly HttpClient client = new HttpClient(); - public class Release { [JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)] @@ -91,40 +89,16 @@ public class Asset public static async Task GetServiceBusClientLatestVersion(WriteToLogDelegate writeToLog = null) { var nextReleaseInfo = ReleaseInfo.Null; - var responseBody = string.Empty; - try - { - client.DefaultRequestHeaders.Add("User-Agent", "ASBE"); - responseBody = await client.GetStringAsync("https://api.github.com/repos/paolosalvatori/ServiceBusExplorer/releases/latest") - .ConfigureAwait(false); - } - catch (HttpRequestException e) - { - if (writeToLog != null) - { - writeToLog($"GitHubReleaseProvider::{e.Message} " + e?.InnerException); - } - else - { - Console.WriteLine(e.Message); - } - } - - if (!string.IsNullOrWhiteSpace(responseBody)) + using (var client = new HttpClient()) { + var responseBody = string.Empty; try { - var latestReleaseInfo = JsonConvert.DeserializeObject(responseBody); - if (latestReleaseInfo != null && !string.IsNullOrWhiteSpace(latestReleaseInfo.Name)) - { - var version = new Version(latestReleaseInfo.Name); - var uri = latestReleaseInfo.HtmlUrl; - var zipUrl = latestReleaseInfo.Assets.FirstOrDefault(x => x.Name.EndsWith(".zip"))?.BrowserDownloadUrl; - nextReleaseInfo = new ReleaseInfo(uri, version, - latestReleaseInfo.Body, zipUrl); - } + client.DefaultRequestHeaders.Add("User-Agent", "ASBE"); + responseBody = await client.GetStringAsync("https://api.github.com/repos/paolosalvatori/ServiceBusExplorer/releases/latest") + .ConfigureAwait(false); } - catch (Exception e) + catch (HttpRequestException e) { if (writeToLog != null) { @@ -135,7 +109,33 @@ public static async Task GetServiceBusClientLatestVersion(WriteToLo Console.WriteLine(e.Message); } } + + if (!string.IsNullOrWhiteSpace(responseBody)) + try + { + var latestReleaseInfo = JsonConvert.DeserializeObject(responseBody); + if (latestReleaseInfo != null && !string.IsNullOrWhiteSpace(latestReleaseInfo.Name)) + { + var version = new Version(latestReleaseInfo.Name); + var uri = latestReleaseInfo.HtmlUrl; + var zipUrl = latestReleaseInfo.Assets.FirstOrDefault(x => x.Name.EndsWith(".zip"))?.BrowserDownloadUrl; + nextReleaseInfo = new ReleaseInfo(uri, version, + latestReleaseInfo.Body, zipUrl); + } + } + catch (Exception e) + { + if (writeToLog != null) + { + writeToLog($"GitHubReleaseProvider::{e.Message} " + e?.InnerException); + } + else + { + Console.WriteLine(e.Message); + } + } } + return nextReleaseInfo; } }