From be6f762c406dd843acfdafa66cae3bd8c8d476e8 Mon Sep 17 00:00:00 2001 From: cartiof Date: Thu, 11 Apr 2024 03:40:32 +0200 Subject: [PATCH] - Fixed issue related to the method 'GetObjects()' (the parameter 'levels' was not properly handled) - Enhanced methods 'ReadProperty()' and 'ReadPropertyMultiple()' - Enhanced the TestClient app in order to support the latest changes. --- CHANGELOG.md | 8 +- .../MetasysServices.Tests.csproj | 2 +- MetasysServices/Interfaces/IMetasysClient.cs | 15 +- MetasysServices/MetasysClient.cs | 44 +- MetasysServices/MetasysServices.csproj | 6 +- MetasysServices/Models/Variant.cs | 46 +- .../Properties/AssemblyInfo.cs | 4 +- .../Interfaces/IComAlarmFilterV4Plus.cs | 18 +- .../Interfaces/ILegacyMetasysClient.cs | 18 +- MetasysServicesCom/LegacyMetasysClient.cs | 19 +- MetasysServicesCom/MetasysServicesCom.csproj | 2 +- .../Properties/AssemblyInfo.cs | 4 +- .../MetasysServicesExampleApp.csproj | 2 +- TestClient/Forms/Objects.Designer.cs | 710 +++++++++--------- TestClient/Forms/Objects.cs | 18 +- TestClient/Forms/Objects.resx | 27 - TestClient/Properties/AssemblyInfo.cs | 4 +- 17 files changed, 488 insertions(+), 459 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29a6db3..574add5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [6.0.3] - 2024-04-11 +### Changed +- Fixed issue related to the method 'GetObjects()' (the parameter 'levels' was not properly handled) +- Enhanced methods 'ReadProperty()' and 'ReadPropertyMultiple()' +- Enhanced the TestClient app in order to support the latest changes. ## [6.0.2] - 2024-03-20 ### Changed - Fixed issue related to the method that is retrieving the list of Activities when API v4 was selected. @@ -268,7 +273,8 @@ First Release. - LegacyMetasysClient for compatibility with COM services. - Automatic enumeration translations for supported languages. -[Unreleased]: https://github.com/metasys-server/basic-services-dotnet/compare/v6.0.1...HEAD +[Unreleased]: https://github.com/metasys-server/basic-services-dotnet/compare/v6.0.3...HEAD +[6.0.3]: https://github.com/metasys-server/basic-services-dotnet/compare/v6.0.2...v6.0.3 [6.0.2]: https://github.com/metasys-server/basic-services-dotnet/compare/v6.0.1...v6.0.2 [6.0.1]: https://github.com/metasys-server/basic-services-dotnet/compare/v6.0.0...v6.0.1 [6.0.0]: https://github.com/metasys-server/basic-services-dotnet/compare/v5.0.3...v6.0.0 diff --git a/MetasysServices.Tests/MetasysServices.Tests.csproj b/MetasysServices.Tests/MetasysServices.Tests.csproj index 6497b93..07facc0 100644 --- a/MetasysServices.Tests/MetasysServices.Tests.csproj +++ b/MetasysServices.Tests/MetasysServices.Tests.csproj @@ -5,7 +5,7 @@ false - 6.0.2 + 6.0.3 © 2020-2024 Johnson Controls diff --git a/MetasysServices/Interfaces/IMetasysClient.cs b/MetasysServices/Interfaces/IMetasysClient.cs index 3102436..9d3a58f 100644 --- a/MetasysServices/Interfaces/IMetasysClient.cs +++ b/MetasysServices/Interfaces/IMetasysClient.cs @@ -1,17 +1,17 @@ -using System; +using JohnsonControls.Metasys.BasicServices; +using System; using System.Collections.Generic; using System.Globalization; using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using JohnsonControls.Metasys.BasicServices; namespace JohnsonControls.Metasys.BasicServices { /// /// An HTTP client for consuming the most commonly used endpoints of the Metasys API. /// - public interface IMetasysClient :IBasicService + public interface IMetasysClient : IBasicService { /// /// The hostname of Metasys API server. @@ -239,7 +239,7 @@ public interface IMetasysClient :IBasicService /// Task WritePropertyMultipleAsync(IEnumerable ids, IEnumerable<(string Attribute, object Value)> attributeValues); /// - Task WritePropertyMultipleAsync(IEnumerable ids, Dictionary attributeValues); + Task WritePropertyMultipleAsync(IEnumerable ids, Dictionary attributeValues); /// @@ -306,15 +306,16 @@ public interface IMetasysClient :IBasicService /// /// A level of 1 only retrieves immediate children of the parent object. /// - /// + /// The ID of the parent object. /// The depth of the children to retrieve. /// Set it to true to see also internal objects that are not displayed in the Metasys tree. + /// Set it to true to get also the extensions of the object. /// The flag includeInternalObjects applies since Metasys API v3. /// /// - IEnumerable GetObjects(Guid id, int levels = 1, bool includeInternalObjects = false); + IEnumerable GetObjects(Guid id, int levels = 1, bool includeInternalObjects = false, bool includeExtensions = false); /// - Task> GetObjectsAsync(Guid id, int levels = 1, bool includeInternalObjects = false); + Task> GetObjectsAsync(Guid id, int levels = 1, bool includeInternalObjects = false, bool includeExtensions = false); /// /// Gets all child objects given a parent Guid and object type. diff --git a/MetasysServices/MetasysClient.cs b/MetasysServices/MetasysClient.cs index 9937b8c..77e1d60 100644 --- a/MetasysServices/MetasysClient.cs +++ b/MetasysServices/MetasysClient.cs @@ -1,17 +1,17 @@ +using Flurl; +using Flurl.Http; +using JohnsonControls.Metasys.BasicServices.Utils; +using Newtonsoft.Json.Linq; using System; -using System.Linq; -using System.Threading.Tasks; using System.Collections.Generic; using System.Globalization; +using System.IdentityModel.Tokens.Jwt; +using System.Linq; using System.Net; -using Flurl; -using Flurl.Http; -using Newtonsoft.Json.Linq; using System.Net.Http; -using JohnsonControls.Metasys.BasicServices.Utils; -using System.IdentityModel.Tokens.Jwt; -using System.Timers; using System.Threading; +using System.Threading.Tasks; +using System.Timers; namespace JohnsonControls.Metasys.BasicServices @@ -69,7 +69,7 @@ public string Hostname { // No need to init base url on first call (already done on Version set) if (hostname != null && hostname != value) // it's the same hostname: no changes - { + { // reset the base client according to settings InitFlurlClient(value); } @@ -240,7 +240,7 @@ public MetasysClient(string hostname, bool ignoreCertificateErrors = false, ApiV Spaces = new SpaceServiceProvider(Client, version, logClientErrors); Trends = new TrendServiceProvider(Client, version, logClientErrors); if (Version > ApiVersion.v3) Streams = new StreamServiceProvider(Client, version, logClientErrors); - + base.Version = version; } @@ -342,12 +342,12 @@ public async Task RefreshAsync() } // Refresh2 ------------------------------------------------------------------------------------------------------------------ - + private AccessToken Refresh2() { return Refresh2Async().GetAwaiter().GetResult(); } - + private async Task Refresh2Async() { try @@ -490,12 +490,12 @@ public async Task> GetNetworkDeviceTypesAsync() #region "OBJECTS" // ======================================================================================================== // GetObjects --------------------------------------------------------------------------------------------------------------- /// - public IEnumerable GetObjects(Guid id, int levels = 1, bool includeInternalObjects = false) + public IEnumerable GetObjects(Guid id, int levels = 1, bool includeInternalObjects = false, bool includeExtensions = false) { - return GetObjectsAsync(id, levels, includeInternalObjects).GetAwaiter().GetResult(); + return GetObjectsAsync(id, levels, includeInternalObjects, includeExtensions).GetAwaiter().GetResult(); } /// - public async Task> GetObjectsAsync(Guid id, int levels, bool includeInternalObjects = false) + public async Task> GetObjectsAsync(Guid id, int levels, bool includeInternalObjects = false, bool includeExtensions = false) { Dictionary parameters = null; if (Version == ApiVersion.v3) @@ -511,10 +511,10 @@ public async Task> GetObjectsAsync(Guid id, int level // Since API v3 we could use the includeInternalObjects parameter parameters = new Dictionary { - { "includeInternal", includeInternalObjects.ToString() }, //This param has different name when version > v3 + { "depth", levels.ToString() }, { "flatten", "true".ToString() }, //This parameter is needed to get the data in a 'flat' way and keep consistency in the logic to retrieve the objects - { "includeExtensions", "true".ToString() }, - { "depth", "2".ToString() } + { "includeExtensions", includeExtensions.ToString() }, + { "includeInternal", includeInternalObjects.ToString() } //This param has different name when version > v3 }; } @@ -549,7 +549,7 @@ public async Task> GetObjectsAsync(Guid objectId, str } var objects = await GetObjectChildrenAsync(objectId, parameters).ConfigureAwait(false); - + return ToMetasysObject(objects, Version); } @@ -827,7 +827,7 @@ public IEnumerable GetSpaces(SpaceTypeEnum? type = null) } /// public async Task> GetSpacesAsync(SpaceTypeEnum? type = null) - { + { return await Spaces.GetAsync(type); } @@ -940,7 +940,7 @@ private void ScheduleRefresh() Enabled = true }; - _timer.Elapsed += (object sender, ElapsedEventArgs e) => + _timer.Elapsed += (object sender, ElapsedEventArgs e) => { DateTime now = DateTime.UtcNow; if (now > this.RefreshDateTime) @@ -1231,7 +1231,7 @@ private Url GetUrlFromHttpRequest(HttpRequestMessage requestMessage) throw new UriFormatException("HTTP request can not be made. Scheme or Host is invalid."); } return new Url(requestUri); - } + } else { return new Url(Url.Combine(baseUri.GetLeftPart(UriPartial.Authority), "/api/", requestUri)); diff --git a/MetasysServices/MetasysServices.csproj b/MetasysServices/MetasysServices.csproj index b385f18..0ecfbd5 100644 --- a/MetasysServices/MetasysServices.csproj +++ b/MetasysServices/MetasysServices.csproj @@ -13,11 +13,11 @@ JohnsonControls.Metasys.BasicServices https://github.com/metasys-server/basic-services-dotnet Johnson Controls, Metasys, API, .NET, Services - - Fixed issue related to the method 'Activities.Get()' -- Enhanced method 'Alarms.Get()' to support params for v4+ + - Fixed issue related to the method 'GetObjects()' +- Enhanced methods 'ReadProperty()' and 'ReadPropertyMultiple()' LICENSE README.md - 6.0.2 + 6.0.3 diff --git a/MetasysServices/Models/Variant.cs b/MetasysServices/Models/Variant.cs index 9300803..de31798 100644 --- a/MetasysServices/Models/Variant.cs +++ b/MetasysServices/Models/Variant.cs @@ -1,8 +1,8 @@ -using System; -using System.Globalization; +using JohnsonControls.Metasys.BasicServices.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using JohnsonControls.Metasys.BasicServices.Utils; +using System; +using System.Globalization; namespace JohnsonControls.Metasys.BasicServices { @@ -22,6 +22,12 @@ public class Variant private const string Array = "dataTypeEnumSet.arrayDataType"; + /// The string representation of the item type. + /// + /// Type of the item (e.g. 'string', 'numeric', 'boolean', 'object'). + /// + public string ItemType { private set; get; } + /// The string representation of the value. /// /// String value as specified in the MSSDA Bulletin stringValue or a translated string if @@ -50,6 +56,12 @@ public class Variant /// public bool BooleanValue { private set; get; } + /// The object representation of the value. + /// + /// Object value specified as Json. + /// + public object ObjectValue { private set; get; } + /// An array of Variant values. /// Null unless value is an array. public Variant[] ArrayValue { private set; get; } @@ -99,7 +111,8 @@ public class Variant private CultureInfo _CultureInfo; - internal Variant() { + internal Variant() + { } internal Variant(Guid id, JToken token, string attribute, CultureInfo cultureInfo, ApiVersion apiVersion) @@ -114,7 +127,7 @@ internal Variant(Guid id, JToken token, string attribute, CultureInfo cultureInf PriorityEnumerationKey = null; StringValueEnumerationKey = null; StringValue = null; - NumericValue = 1; + NumericValue = 0; ArrayValue = null; BooleanValue = false; ProcessToken(token); @@ -130,30 +143,34 @@ internal Variant(Guid id, JToken token, string attribute, CultureInfo cultureInf /// private void ProcessToken(JToken token) { - if (token == null || token["item"]== null || token ["item"][Attribute] == null) + if (token == null || token["item"] == null || token["item"][Attribute] == null) { // return unsupported attribute result - NumericValue = 1; + ItemType = "unsupported"; + NumericValue = 0; StringValueEnumerationKey = Unsupported; StringValue = ResourceManager.Localize(StringValueEnumerationKey, _CultureInfo); return; } - JToken attributeToken=token["item"][Attribute]; + JToken attributeToken = token["item"][Attribute]; // switch on attributeToken type and set the fields appropriately switch (attributeToken.Type) { case JTokenType.Integer: + ItemType = "numeric"; NumericValue = attributeToken.Value(); StringValue = NumericValue.ToString(_CultureInfo); BooleanValue = Convert.ToBoolean(NumericValue); ArrayValue = null; break; case JTokenType.Float: + ItemType = "numeric"; NumericValue = attributeToken.Value(); StringValue = NumericValue.ToString(_CultureInfo); BooleanValue = Convert.ToBoolean(NumericValue); break; case JTokenType.String: + ItemType = "string"; NumericValue = 0; StringValueEnumerationKey = attributeToken.Value(); StringValue = ResourceManager.Localize(StringValueEnumerationKey, _CultureInfo); @@ -162,6 +179,7 @@ private void ProcessToken(JToken token) ProcessArray(attributeToken); break; case JTokenType.Boolean: + ItemType = "boolean"; if ((bool)(attributeToken) == true) { NumericValue = 1; @@ -182,13 +200,19 @@ private void ProcessToken(JToken token) // From v3 onwards presentValue is threated like other attributes and additional information are moved in Condition property. ProcessPresentValue(attributeToken); } + else + { + ItemType = "object"; + ObjectValue = attributeToken; + } break; default: - NumericValue = 1; + NumericValue = 0; StringValueEnumerationKey = Unsupported; StringValue = ResourceManager.Localize(StringValueEnumerationKey, _CultureInfo); + ObjectValue = null; break; - } + } } /// Parses a JArray and adds each item as a Variant. @@ -265,7 +289,7 @@ internal void ProcessCondition(JToken token) { PriorityEnumerationKey = priorityToken.ToString(); Priority = ResourceManager.Localize(PriorityEnumerationKey, _CultureInfo); - } + } } /// diff --git a/MetasysServicesCom.Tests/Properties/AssemblyInfo.cs b/MetasysServicesCom.Tests/Properties/AssemblyInfo.cs index 9ce752f..ceb7353 100644 --- a/MetasysServicesCom.Tests/Properties/AssemblyInfo.cs +++ b/MetasysServicesCom.Tests/Properties/AssemblyInfo.cs @@ -16,5 +16,5 @@ [assembly: Guid("c6ad9c27-b7dd-4520-9c03-a0efca68fb51")] // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("6.0.2.0")] -[assembly: AssemblyFileVersion("6.0.2.0")] +[assembly: AssemblyVersion("6.0.3.0")] +[assembly: AssemblyFileVersion("6.0.3.0")] diff --git a/MetasysServicesCom/Interfaces/IComAlarmFilterV4Plus.cs b/MetasysServicesCom/Interfaces/IComAlarmFilterV4Plus.cs index 01f4034..d65266f 100644 --- a/MetasysServicesCom/Interfaces/IComAlarmFilterV4Plus.cs +++ b/MetasysServicesCom/Interfaces/IComAlarmFilterV4Plus.cs @@ -31,42 +31,42 @@ public interface IComAlarmFilterV4Plus /// /// Possible values from 'alarmValueEnumSet' Metasys enum set. Example: 'alarmValueEnumSet.avHighLimit'. /// - string[] Type { get; set; } + string Type { get; set; } /// /// Determines whether acknowledged alarms will be included in the results. Default: (missing). /// - bool? IncludeAcknowledged { get; set; } + bool IncludeAcknowledged { get; set; } /// /// The flag to include discarded alarms. Default: (missing). /// - bool? IncludeDiscarded { get; set; } + bool IncludeDiscarded { get; set; } /// /// Determines whether activities which can be acknowledged are included in the results. Default: true. /// - bool? IncludeAcknowledgementRequired { get; set; } + bool IncludeAcknowledgementRequired { get; set; } /// /// Determines whether activities which can not be acknowledged are included in the results. Default: true. /// - bool? IncludeAcknowledgementNotRequired { get; set; } + bool IncludeAcknowledgementNotRequired { get; set; } /// /// Filter by list of equipment identifiers. /// - string[] Equipment { get; set; } + string Equipment { get; set; } /// /// Filter by list of object identifiers. /// - string[] Object { get; set; } + string Object { get; set; } /// /// Filter by list of space identifiers. /// - string[] Space { get; set; } + string Space { get; set; } /// /// The authorization category of the requested alarms. @@ -74,7 +74,7 @@ public interface IComAlarmFilterV4Plus /// /// Possible values from 'objectCategoryEnumSet' Metasys enum set. Example: 'objectCategoryEnumSet.hvacCategory'. /// - string[] Category { get; set; } + string Category { get; set; } } } diff --git a/MetasysServicesCom/Interfaces/ILegacyMetasysClient.cs b/MetasysServicesCom/Interfaces/ILegacyMetasysClient.cs index a46abf1..c2ca581 100644 --- a/MetasysServicesCom/Interfaces/ILegacyMetasysClient.cs +++ b/MetasysServicesCom/Interfaces/ILegacyMetasysClient.cs @@ -1,8 +1,6 @@ -using System; -using System.Collections.Generic; +using JohnsonControls.Metasys.BasicServices; +using System; using System.Runtime.InteropServices; -using System.Threading.Tasks; -using JohnsonControls.Metasys.BasicServices; namespace JohnsonControls.Metasys.ComServices { @@ -282,7 +280,7 @@ public interface ILegacyMetasysClient /// /// /// - object GetEquipment(int? page = null, int? pageSize = null); + object GetEquipment(int page = 1, int pageSize = 100); /// /// Retrieves the collection of equipment instances that are hosted by the specified network device or its children. @@ -387,9 +385,11 @@ public interface ILegacyMetasysClient /// /// /// The depth of the children to retrieve. + /// Set it to true to see also internal objects that are not displayed in the Metasys tree. + /// Set it to true to get also the extensions of the object. /// /// - object GetObjects(string id, int levels = 1); + object GetObjects(string id, int levels = 1, bool includeInternalObjects = false, bool includeExtensions = false); /// /// Gets all child objects given a parent Guid and object type. @@ -520,7 +520,7 @@ public interface ILegacyMetasysClient /// Optional, the criteria to use when sorting results (default = name). /// /// - object GetSpaces(string type = null, int? page = null, int? pageSize = null, string sort = null); + object GetSpaces(string type = null, int page = 1, int pageSize = 100, string sort = null); /// /// Gets children spaces of the given space. @@ -637,7 +637,7 @@ public interface ILegacyMetasysClient ///// Event fired when a COV value changes ///// //event EventHandler StreamCOVValueChanged; - + /// @@ -688,7 +688,7 @@ public interface ILegacyMetasysClient /// Call the related API to keep the Stream Alive /// void KeepStreamAlive(); - + #endregion diff --git a/MetasysServicesCom/LegacyMetasysClient.cs b/MetasysServicesCom/LegacyMetasysClient.cs index 4c10e91..1f27876 100644 --- a/MetasysServicesCom/LegacyMetasysClient.cs +++ b/MetasysServicesCom/LegacyMetasysClient.cs @@ -1,13 +1,11 @@ using AutoMapper; using JohnsonControls.Metasys.BasicServices; -using JohnsonControls.Metasys.BasicServices.Utils; using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Runtime.InteropServices; using MetasysAttribute = JohnsonControls.Metasys.BasicServices.MetasysAttribute; -using System.Globalization; -using System.Net.Security; namespace JohnsonControls.Metasys.ComServices { @@ -55,6 +53,7 @@ internal LegacyMetasysClient(IMetasysClient client) cfg.CreateMap(); cfg.CreateMap(); cfg.CreateMap(); + cfg.CreateMap(); cfg.CreateMap(); cfg.CreateMap(); cfg.CreateMap(); @@ -94,7 +93,7 @@ public IComAccessToken TryLogin(string username, string password, bool refresh = /// public string TryLogin2(string username, string password, bool refresh = true) { - string res ; + string res; try { AccessToken accToken = Client.TryLogin(username, password, refresh); @@ -244,7 +243,7 @@ public object GetAlarmAnnotations(string alarmId) public void AcknowledgeAlarm(string alarmId, string annotationText = null) { Guid guid = Guid.Parse(alarmId); - Client.Alarms.Acknowledge(guid, annotationText); + Client.Alarms.Acknowledge(guid, annotationText); } //DiscardAlarm ----------------------------------------------------------------------------------------------------------------- /// @@ -420,7 +419,7 @@ public void DeleteCustomEnumeration(string id) #region "Equipments" // ===================================================================================================== //GetEquipment -------------------------------------------------------------------------------------------------------------- /// - public object GetEquipment(int? page = null, int? pageSize = null) + public object GetEquipment(int page = 1, int pageSize = 100) { // Note: need a generic object as return type in order to map correctly to VBA type array var res = Client.Equipments.Get(page, pageSize); @@ -464,7 +463,7 @@ public object GetEquipmentsServingASpace(string spaceId) } /// public object GetSpaceEquipment(string spaceId) //This method is deprecated and you should use 'GetEquipmentServingASpace()' - { + { return GetEquipmentsServingASpace(spaceId); } @@ -547,10 +546,10 @@ public object GetNetworkDevicesServingASpace(string spaceId) #region "Objects" // ======================================================================================================== //GetObjects ---------------------------------------------------------------------------------------------------------------- /// - public object GetObjects(string id, int levels = 1) + public object GetObjects(string id, int levels = 1, bool includeInternalObjects = false, bool includeExtensions = false) { Guid guid = new Guid(id); - var res = Client.GetObjects(guid, levels).ToList(); + var res = Client.GetObjects(guid, levels, includeInternalObjects, includeExtensions).ToList(); return Mapper.Map(res); } @@ -676,7 +675,7 @@ public void SendCommand(string id, string command, [In, MarshalAs(UnmanagedType. #region "Spaces" // ========================================================================================================= //GetSpaces ----------------------------------------------------------------------------------------------------------------- /// - public object GetSpaces(string type = null, int? page = null, int? pageSize = null, string sort = null) + public object GetSpaces(string type = null, int page = 1, int pageSize = 100, string sort = null) { SpaceTypeEnum? spaceType = null; if (type != null) diff --git a/MetasysServicesCom/MetasysServicesCom.csproj b/MetasysServicesCom/MetasysServicesCom.csproj index 356ddb9..c70514d 100644 --- a/MetasysServicesCom/MetasysServicesCom.csproj +++ b/MetasysServicesCom/MetasysServicesCom.csproj @@ -23,7 +23,7 @@ Johnson Controls Metasys Services Object Library - 6.0.2 + 6.0.3 diff --git a/MetasysServicesComExampleApp/Properties/AssemblyInfo.cs b/MetasysServicesComExampleApp/Properties/AssemblyInfo.cs index 10e5dcf..fcab342 100644 --- a/MetasysServicesComExampleApp/Properties/AssemblyInfo.cs +++ b/MetasysServicesComExampleApp/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("6.0.2.0")] -[assembly: AssemblyFileVersion("6.0.2.0")] +[assembly: AssemblyVersion("6.0.3.0")] +[assembly: AssemblyFileVersion("6.0.3.0")] diff --git a/MetasysServicesExampleApp/MetasysServicesExampleApp.csproj b/MetasysServicesExampleApp/MetasysServicesExampleApp.csproj index af97308..f6bdd83 100644 --- a/MetasysServicesExampleApp/MetasysServicesExampleApp.csproj +++ b/MetasysServicesExampleApp/MetasysServicesExampleApp.csproj @@ -4,7 +4,7 @@ Exe net6.0 7.3 - 6.0.2 + 6.0.3 © 2020-2024 Johnson Controls diff --git a/TestClient/Forms/Objects.Designer.cs b/TestClient/Forms/Objects.Designer.cs index 75aba49..0fc226a 100644 --- a/TestClient/Forms/Objects.Designer.cs +++ b/TestClient/Forms/Objects.Designer.cs @@ -78,27 +78,15 @@ private void InitializeComponent() this.TpgReadPropertyMultiple = new System.Windows.Forms.TabPage(); this.TlpReadPropertyMultiple = new System.Windows.Forms.TableLayoutPanel(); this.LblReadPropertyMultiple_Params = new System.Windows.Forms.Label(); - this.TpgWriteProperty = new System.Windows.Forms.TabPage(); - this.TlpWriteProperty = new System.Windows.Forms.TableLayoutPanel(); - this.TpgWritePropertyMultiple = new System.Windows.Forms.TabPage(); - this.TlpWritePropertyMultiple = new System.Windows.Forms.TableLayoutPanel(); - this.TpgSendCommand = new System.Windows.Forms.TabPage(); - this.TlpSendCommand = new System.Windows.Forms.TableLayoutPanel(); - this.LblSendCommand_ObjectId = new System.Windows.Forms.Label(); - this.TxtSendCommand_ObjectId = new System.Windows.Forms.TextBox(); - this.LblSendCommand_Command = new System.Windows.Forms.Label(); - this.TxtSendCommand_Command = new System.Windows.Forms.TextBox(); - this.LblSendCommand_Values = new System.Windows.Forms.Label(); - this.TxtSendCommand_Values = new System.Windows.Forms.TextBox(); - this.BtnSendCommand = new System.Windows.Forms.Button(); - this.LblSendCommand_Result = new System.Windows.Forms.Label(); - this.TxtSendCommand_Result = new System.Windows.Forms.TextBox(); - this.DgvReadPropertyMultiple_Ids = new System.Windows.Forms.DataGridView(); this.BtnReadPropertyMultiple = new System.Windows.Forms.Button(); this.DgvReadPropertyMultiple_Result = new System.Windows.Forms.DataGridView(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.DgvReadPropertyMultiple_Ids = new System.Windows.Forms.DataGridView(); this.DgvReadPropertyMultiple_Ids_Id = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.DgvReadPropertyMultiple_Attrs = new System.Windows.Forms.DataGridView(); + this.DgvReadPropertyMultiple_Attrs_Attribute = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.TpgWriteProperty = new System.Windows.Forms.TabPage(); + this.TlpWriteProperty = new System.Windows.Forms.TableLayoutPanel(); this.LblWriteProperty_ObjectId = new System.Windows.Forms.Label(); this.TxtWriteProperty_ObjectId = new System.Windows.Forms.TextBox(); this.LblWriteProperty_AttributeName = new System.Windows.Forms.Label(); @@ -107,18 +95,32 @@ private void InitializeComponent() this.TxtWriteProperty_NewValue = new System.Windows.Forms.TextBox(); this.BtnWriteProperty = new System.Windows.Forms.Button(); this.LblWriteProperty_Result = new System.Windows.Forms.Label(); - this.DgvReadPropertyMultiple_Attrs_Attribute = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.TxtWriteProperty_Result = new System.Windows.Forms.TextBox(); + this.TpgWritePropertyMultiple = new System.Windows.Forms.TabPage(); + this.TlpWritePropertyMultiple = new System.Windows.Forms.TableLayoutPanel(); this.LblWritePropertyMultiple_Params = new System.Windows.Forms.Label(); this.TlpWritepropertyMultiple_Params = new System.Windows.Forms.TableLayoutPanel(); this.DgvWritePropertyMultiple_Ids = new System.Windows.Forms.DataGridView(); - this.DgvWritePropertyMultiple_Attrs = new System.Windows.Forms.DataGridView(); this.DgvWritePropertyMultiple_Ids_Id = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.DgvWritePropertyMultiple_Attrs = new System.Windows.Forms.DataGridView(); this.DgvWritePropertyMultiple_Attrs_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.DgvWritePropertyMultiple_Attrs_Value = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.BtnWritePropertyMultiple = new System.Windows.Forms.Button(); this.LblWritePropertMultiple_Result = new System.Windows.Forms.Label(); this.TxtWritePropertyMultiple_Result = new System.Windows.Forms.TextBox(); + this.TpgSendCommand = new System.Windows.Forms.TabPage(); + this.TlpSendCommand = new System.Windows.Forms.TableLayoutPanel(); + this.LblSendCommand_ObjectId = new System.Windows.Forms.Label(); + this.TxtSendCommand_ObjectId = new System.Windows.Forms.TextBox(); + this.LblSendCommand_Command = new System.Windows.Forms.Label(); + this.TxtSendCommand_Command = new System.Windows.Forms.TextBox(); + this.LblSendCommand_Values = new System.Windows.Forms.Label(); + this.TxtSendCommand_Values = new System.Windows.Forms.TextBox(); + this.BtnSendCommand = new System.Windows.Forms.Button(); + this.LblSendCommand_Result = new System.Windows.Forms.Label(); + this.TxtSendCommand_Result = new System.Windows.Forms.TextBox(); + this.LblGetObjects_IncludeExtensions = new System.Windows.Forms.Label(); + this.ChkGetObjects_IncludeExtensions = new System.Windows.Forms.CheckBox(); this.TabMain.SuspendLayout(); this.TpgGetObjectIdentifier.SuspendLayout(); this.TlpGetObjectIdentifier.SuspendLayout(); @@ -136,19 +138,19 @@ private void InitializeComponent() this.TlpReadProperty.SuspendLayout(); this.TpgReadPropertyMultiple.SuspendLayout(); this.TlpReadPropertyMultiple.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DgvReadPropertyMultiple_Result)).BeginInit(); + this.tableLayoutPanel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DgvReadPropertyMultiple_Ids)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.DgvReadPropertyMultiple_Attrs)).BeginInit(); this.TpgWriteProperty.SuspendLayout(); this.TlpWriteProperty.SuspendLayout(); this.TpgWritePropertyMultiple.SuspendLayout(); this.TlpWritePropertyMultiple.SuspendLayout(); - this.TpgSendCommand.SuspendLayout(); - this.TlpSendCommand.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.DgvReadPropertyMultiple_Ids)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.DgvReadPropertyMultiple_Result)).BeginInit(); - this.tableLayoutPanel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.DgvReadPropertyMultiple_Attrs)).BeginInit(); this.TlpWritepropertyMultiple_Params.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DgvWritePropertyMultiple_Ids)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.DgvWritePropertyMultiple_Attrs)).BeginInit(); + this.TpgSendCommand.SuspendLayout(); + this.TlpSendCommand.SuspendLayout(); this.SuspendLayout(); // // TabMain @@ -280,21 +282,24 @@ private void InitializeComponent() this.TlpGetObjects.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.TlpGetObjects.Controls.Add(this.LblGetObjects_ParentID, 1, 1); this.TlpGetObjects.Controls.Add(this.TxtGetObjects_ParentID, 2, 1); - this.TlpGetObjects.Controls.Add(this.BtnGetObjects, 2, 4); - this.TlpGetObjects.Controls.Add(this.DgvGetObjects, 2, 5); - this.TlpGetObjects.Controls.Add(this.LblGetObjects_IncludeInternalObjects, 1, 3); - this.TlpGetObjects.Controls.Add(this.ChkGetObjects_IncludeInternalObjects, 2, 3); + this.TlpGetObjects.Controls.Add(this.BtnGetObjects, 2, 5); + this.TlpGetObjects.Controls.Add(this.DgvGetObjects, 2, 6); + this.TlpGetObjects.Controls.Add(this.LblGetObjects_IncludeInternalObjects, 1, 4); + this.TlpGetObjects.Controls.Add(this.ChkGetObjects_IncludeInternalObjects, 2, 4); this.TlpGetObjects.Controls.Add(this.LblGetObjects_Levels, 1, 2); this.TlpGetObjects.Controls.Add(this.NupGetObject_Levels, 2, 2); + this.TlpGetObjects.Controls.Add(this.LblGetObjects_IncludeExtensions, 1, 3); + this.TlpGetObjects.Controls.Add(this.ChkGetObjects_IncludeExtensions, 2, 3); this.TlpGetObjects.Dock = System.Windows.Forms.DockStyle.Fill; this.TlpGetObjects.Location = new System.Drawing.Point(3, 3); this.TlpGetObjects.Name = "TlpGetObjects"; - this.TlpGetObjects.RowCount = 6; + this.TlpGetObjects.RowCount = 7; this.TlpGetObjects.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.TlpGetObjects.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.TlpGetObjects.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.TlpGetObjects.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.TlpGetObjects.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.TlpGetObjects.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.TlpGetObjects.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.TlpGetObjects.Size = new System.Drawing.Size(923, 551); this.TlpGetObjects.TabIndex = 0; @@ -323,7 +328,7 @@ private void InitializeComponent() // BtnGetObjects // this.BtnGetObjects.Dock = System.Windows.Forms.DockStyle.Fill; - this.BtnGetObjects.Location = new System.Drawing.Point(169, 101); + this.BtnGetObjects.Location = new System.Drawing.Point(169, 127); this.BtnGetObjects.MinimumSize = new System.Drawing.Size(130, 0); this.BtnGetObjects.Name = "BtnGetObjects"; this.BtnGetObjects.Size = new System.Drawing.Size(731, 23); @@ -336,16 +341,16 @@ private void InitializeComponent() // this.DgvGetObjects.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.DgvGetObjects.Dock = System.Windows.Forms.DockStyle.Fill; - this.DgvGetObjects.Location = new System.Drawing.Point(169, 130); + this.DgvGetObjects.Location = new System.Drawing.Point(169, 156); this.DgvGetObjects.Name = "DgvGetObjects"; - this.DgvGetObjects.Size = new System.Drawing.Size(731, 418); + this.DgvGetObjects.Size = new System.Drawing.Size(731, 392); this.DgvGetObjects.TabIndex = 3; // // LblGetObjects_IncludeInternalObjects // this.LblGetObjects_IncludeInternalObjects.AutoSize = true; this.LblGetObjects_IncludeInternalObjects.Dock = System.Windows.Forms.DockStyle.Fill; - this.LblGetObjects_IncludeInternalObjects.Location = new System.Drawing.Point(23, 75); + this.LblGetObjects_IncludeInternalObjects.Location = new System.Drawing.Point(23, 101); this.LblGetObjects_IncludeInternalObjects.Margin = new System.Windows.Forms.Padding(3); this.LblGetObjects_IncludeInternalObjects.Name = "LblGetObjects_IncludeInternalObjects"; this.LblGetObjects_IncludeInternalObjects.Size = new System.Drawing.Size(140, 20); @@ -357,7 +362,7 @@ private void InitializeComponent() // this.ChkGetObjects_IncludeInternalObjects.AutoSize = true; this.ChkGetObjects_IncludeInternalObjects.Dock = System.Windows.Forms.DockStyle.Fill; - this.ChkGetObjects_IncludeInternalObjects.Location = new System.Drawing.Point(169, 75); + this.ChkGetObjects_IncludeInternalObjects.Location = new System.Drawing.Point(169, 101); this.ChkGetObjects_IncludeInternalObjects.MinimumSize = new System.Drawing.Size(0, 20); this.ChkGetObjects_IncludeInternalObjects.Name = "ChkGetObjects_IncludeInternalObjects"; this.ChkGetObjects_IncludeInternalObjects.Size = new System.Drawing.Size(731, 20); @@ -389,7 +394,7 @@ private void InitializeComponent() 1, 0, 0, - 0}); + -2147483648}); this.NupGetObject_Levels.Name = "NupGetObject_Levels"; this.NupGetObject_Levels.Size = new System.Drawing.Size(731, 20); this.NupGetObject_Levels.TabIndex = 7; @@ -790,6 +795,77 @@ private void InitializeComponent() this.LblReadPropertyMultiple_Params.Text = "Parameters:"; this.LblReadPropertyMultiple_Params.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // BtnReadPropertyMultiple + // + this.BtnReadPropertyMultiple.Dock = System.Windows.Forms.DockStyle.Fill; + this.BtnReadPropertyMultiple.Location = new System.Drawing.Point(169, 123); + this.BtnReadPropertyMultiple.Name = "BtnReadPropertyMultiple"; + this.BtnReadPropertyMultiple.Size = new System.Drawing.Size(731, 23); + this.BtnReadPropertyMultiple.TabIndex = 2; + this.BtnReadPropertyMultiple.Text = "ReadPropertyMultiple"; + this.BtnReadPropertyMultiple.UseVisualStyleBackColor = true; + this.BtnReadPropertyMultiple.Click += new System.EventHandler(this.BtnReadPropertyMultiple_Click); + // + // DgvReadPropertyMultiple_Result + // + this.DgvReadPropertyMultiple_Result.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DgvReadPropertyMultiple_Result.Dock = System.Windows.Forms.DockStyle.Fill; + this.DgvReadPropertyMultiple_Result.Location = new System.Drawing.Point(169, 152); + this.DgvReadPropertyMultiple_Result.Name = "DgvReadPropertyMultiple_Result"; + this.DgvReadPropertyMultiple_Result.Size = new System.Drawing.Size(731, 396); + this.DgvReadPropertyMultiple_Result.TabIndex = 3; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 2; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Controls.Add(this.DgvReadPropertyMultiple_Ids, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.DgvReadPropertyMultiple_Attrs, 1, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(169, 23); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 1; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 94F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(731, 94); + this.tableLayoutPanel1.TabIndex = 4; + // + // DgvReadPropertyMultiple_Ids + // + this.DgvReadPropertyMultiple_Ids.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DgvReadPropertyMultiple_Ids.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.DgvReadPropertyMultiple_Ids_Id}); + this.DgvReadPropertyMultiple_Ids.Dock = System.Windows.Forms.DockStyle.Fill; + this.DgvReadPropertyMultiple_Ids.Location = new System.Drawing.Point(3, 3); + this.DgvReadPropertyMultiple_Ids.Name = "DgvReadPropertyMultiple_Ids"; + this.DgvReadPropertyMultiple_Ids.Size = new System.Drawing.Size(359, 88); + this.DgvReadPropertyMultiple_Ids.TabIndex = 1; + // + // DgvReadPropertyMultiple_Ids_Id + // + this.DgvReadPropertyMultiple_Ids_Id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.DgvReadPropertyMultiple_Ids_Id.HeaderText = "Object ID (GUID)"; + this.DgvReadPropertyMultiple_Ids_Id.MinimumWidth = 140; + this.DgvReadPropertyMultiple_Ids_Id.Name = "DgvReadPropertyMultiple_Ids_Id"; + // + // DgvReadPropertyMultiple_Attrs + // + this.DgvReadPropertyMultiple_Attrs.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DgvReadPropertyMultiple_Attrs.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.DgvReadPropertyMultiple_Attrs_Attribute}); + this.DgvReadPropertyMultiple_Attrs.Dock = System.Windows.Forms.DockStyle.Fill; + this.DgvReadPropertyMultiple_Attrs.Location = new System.Drawing.Point(368, 3); + this.DgvReadPropertyMultiple_Attrs.Name = "DgvReadPropertyMultiple_Attrs"; + this.DgvReadPropertyMultiple_Attrs.Size = new System.Drawing.Size(360, 88); + this.DgvReadPropertyMultiple_Attrs.TabIndex = 2; + // + // DgvReadPropertyMultiple_Attrs_Attribute + // + this.DgvReadPropertyMultiple_Attrs_Attribute.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.DgvReadPropertyMultiple_Attrs_Attribute.HeaderText = "Object Property"; + this.DgvReadPropertyMultiple_Attrs_Attribute.Name = "DgvReadPropertyMultiple_Attrs_Attribute"; + // // TpgWriteProperty // this.TpgWriteProperty.Controls.Add(this.TlpWriteProperty); @@ -831,6 +907,99 @@ private void InitializeComponent() this.TlpWriteProperty.Size = new System.Drawing.Size(923, 551); this.TlpWriteProperty.TabIndex = 0; // + // LblWriteProperty_ObjectId + // + this.LblWriteProperty_ObjectId.AutoSize = true; + this.LblWriteProperty_ObjectId.Dock = System.Windows.Forms.DockStyle.Fill; + this.LblWriteProperty_ObjectId.Location = new System.Drawing.Point(23, 23); + this.LblWriteProperty_ObjectId.Margin = new System.Windows.Forms.Padding(3); + this.LblWriteProperty_ObjectId.MinimumSize = new System.Drawing.Size(140, 0); + this.LblWriteProperty_ObjectId.Name = "LblWriteProperty_ObjectId"; + this.LblWriteProperty_ObjectId.Size = new System.Drawing.Size(140, 20); + this.LblWriteProperty_ObjectId.TabIndex = 0; + this.LblWriteProperty_ObjectId.Text = "Object ID (GUID):"; + this.LblWriteProperty_ObjectId.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // TxtWriteProperty_ObjectId + // + this.TxtWriteProperty_ObjectId.Dock = System.Windows.Forms.DockStyle.Fill; + this.TxtWriteProperty_ObjectId.Location = new System.Drawing.Point(169, 23); + this.TxtWriteProperty_ObjectId.Name = "TxtWriteProperty_ObjectId"; + this.TxtWriteProperty_ObjectId.Size = new System.Drawing.Size(731, 20); + this.TxtWriteProperty_ObjectId.TabIndex = 1; + // + // LblWriteProperty_AttributeName + // + this.LblWriteProperty_AttributeName.AutoSize = true; + this.LblWriteProperty_AttributeName.Dock = System.Windows.Forms.DockStyle.Fill; + this.LblWriteProperty_AttributeName.Location = new System.Drawing.Point(23, 49); + this.LblWriteProperty_AttributeName.Margin = new System.Windows.Forms.Padding(3); + this.LblWriteProperty_AttributeName.Name = "LblWriteProperty_AttributeName"; + this.LblWriteProperty_AttributeName.Size = new System.Drawing.Size(140, 20); + this.LblWriteProperty_AttributeName.TabIndex = 2; + this.LblWriteProperty_AttributeName.Text = "Property Name:"; + this.LblWriteProperty_AttributeName.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // TxtWriteProperty_AttributeName + // + this.TxtWriteProperty_AttributeName.Dock = System.Windows.Forms.DockStyle.Fill; + this.TxtWriteProperty_AttributeName.Location = new System.Drawing.Point(169, 49); + this.TxtWriteProperty_AttributeName.Name = "TxtWriteProperty_AttributeName"; + this.TxtWriteProperty_AttributeName.Size = new System.Drawing.Size(731, 20); + this.TxtWriteProperty_AttributeName.TabIndex = 3; + // + // LblWriteProperty_NewValue + // + this.LblWriteProperty_NewValue.AutoSize = true; + this.LblWriteProperty_NewValue.Dock = System.Windows.Forms.DockStyle.Fill; + this.LblWriteProperty_NewValue.Location = new System.Drawing.Point(23, 75); + this.LblWriteProperty_NewValue.Margin = new System.Windows.Forms.Padding(3); + this.LblWriteProperty_NewValue.Name = "LblWriteProperty_NewValue"; + this.LblWriteProperty_NewValue.Size = new System.Drawing.Size(140, 20); + this.LblWriteProperty_NewValue.TabIndex = 4; + this.LblWriteProperty_NewValue.Text = "New Value:"; + this.LblWriteProperty_NewValue.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // TxtWriteProperty_NewValue + // + this.TxtWriteProperty_NewValue.Dock = System.Windows.Forms.DockStyle.Fill; + this.TxtWriteProperty_NewValue.Location = new System.Drawing.Point(169, 75); + this.TxtWriteProperty_NewValue.Name = "TxtWriteProperty_NewValue"; + this.TxtWriteProperty_NewValue.Size = new System.Drawing.Size(731, 20); + this.TxtWriteProperty_NewValue.TabIndex = 5; + // + // BtnWriteProperty + // + this.BtnWriteProperty.Dock = System.Windows.Forms.DockStyle.Fill; + this.BtnWriteProperty.Location = new System.Drawing.Point(169, 101); + this.BtnWriteProperty.Name = "BtnWriteProperty"; + this.BtnWriteProperty.Size = new System.Drawing.Size(731, 23); + this.BtnWriteProperty.TabIndex = 6; + this.BtnWriteProperty.Text = "WriteProperty"; + this.BtnWriteProperty.UseVisualStyleBackColor = true; + this.BtnWriteProperty.Click += new System.EventHandler(this.BtnWriteProperty_Click); + // + // LblWriteProperty_Result + // + this.LblWriteProperty_Result.AutoSize = true; + this.LblWriteProperty_Result.Dock = System.Windows.Forms.DockStyle.Fill; + this.LblWriteProperty_Result.Location = new System.Drawing.Point(23, 130); + this.LblWriteProperty_Result.Margin = new System.Windows.Forms.Padding(3); + this.LblWriteProperty_Result.Name = "LblWriteProperty_Result"; + this.LblWriteProperty_Result.Size = new System.Drawing.Size(140, 20); + this.LblWriteProperty_Result.TabIndex = 7; + this.LblWriteProperty_Result.Text = "Result:"; + this.LblWriteProperty_Result.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // TxtWriteProperty_Result + // + this.TxtWriteProperty_Result.Dock = System.Windows.Forms.DockStyle.Fill; + this.TxtWriteProperty_Result.Location = new System.Drawing.Point(169, 130); + this.TxtWriteProperty_Result.Name = "TxtWriteProperty_Result"; + this.TxtWriteProperty_Result.ReadOnly = true; + this.TxtWriteProperty_Result.Size = new System.Drawing.Size(731, 20); + this.TxtWriteProperty_Result.TabIndex = 8; + // // TpgWritePropertyMultiple // this.TpgWritePropertyMultiple.Controls.Add(this.TlpWritePropertyMultiple); @@ -866,40 +1035,144 @@ private void InitializeComponent() this.TlpWritePropertyMultiple.Size = new System.Drawing.Size(923, 551); this.TlpWritePropertyMultiple.TabIndex = 0; // - // TpgSendCommand + // LblWritePropertyMultiple_Params // - this.TpgSendCommand.Controls.Add(this.TlpSendCommand); - this.TpgSendCommand.Location = new System.Drawing.Point(4, 29); - this.TpgSendCommand.Name = "TpgSendCommand"; - this.TpgSendCommand.Padding = new System.Windows.Forms.Padding(3); - this.TpgSendCommand.Size = new System.Drawing.Size(929, 557); - this.TpgSendCommand.TabIndex = 5; - this.TpgSendCommand.Text = "SendCommand"; - this.TpgSendCommand.UseVisualStyleBackColor = true; + this.LblWritePropertyMultiple_Params.AutoSize = true; + this.LblWritePropertyMultiple_Params.Dock = System.Windows.Forms.DockStyle.Fill; + this.LblWritePropertyMultiple_Params.Location = new System.Drawing.Point(23, 23); + this.LblWritePropertyMultiple_Params.Margin = new System.Windows.Forms.Padding(3); + this.LblWritePropertyMultiple_Params.MinimumSize = new System.Drawing.Size(140, 0); + this.LblWritePropertyMultiple_Params.Name = "LblWritePropertyMultiple_Params"; + this.LblWritePropertyMultiple_Params.Size = new System.Drawing.Size(140, 94); + this.LblWritePropertyMultiple_Params.TabIndex = 0; + this.LblWritePropertyMultiple_Params.Text = "Parameters:"; + this.LblWritePropertyMultiple_Params.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // TlpSendCommand + // TlpWritepropertyMultiple_Params // - this.TlpSendCommand.ColumnCount = 4; - this.TlpSendCommand.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.TlpSendCommand.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.TlpSendCommand.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.TlpSendCommand.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.TlpSendCommand.Controls.Add(this.LblSendCommand_ObjectId, 1, 1); - this.TlpSendCommand.Controls.Add(this.TxtSendCommand_ObjectId, 2, 1); - this.TlpSendCommand.Controls.Add(this.LblSendCommand_Command, 1, 2); - this.TlpSendCommand.Controls.Add(this.TxtSendCommand_Command, 2, 2); - this.TlpSendCommand.Controls.Add(this.LblSendCommand_Values, 1, 3); - this.TlpSendCommand.Controls.Add(this.TxtSendCommand_Values, 2, 3); - this.TlpSendCommand.Controls.Add(this.BtnSendCommand, 2, 4); - this.TlpSendCommand.Controls.Add(this.LblSendCommand_Result, 1, 5); - this.TlpSendCommand.Controls.Add(this.TxtSendCommand_Result, 2, 5); - this.TlpSendCommand.Dock = System.Windows.Forms.DockStyle.Fill; - this.TlpSendCommand.Location = new System.Drawing.Point(3, 3); - this.TlpSendCommand.Name = "TlpSendCommand"; - this.TlpSendCommand.RowCount = 7; - this.TlpSendCommand.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.TlpSendCommand.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.TlpSendCommand.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.TlpWritepropertyMultiple_Params.ColumnCount = 2; + this.TlpWritepropertyMultiple_Params.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.TlpWritepropertyMultiple_Params.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.TlpWritepropertyMultiple_Params.Controls.Add(this.DgvWritePropertyMultiple_Ids, 0, 0); + this.TlpWritepropertyMultiple_Params.Controls.Add(this.DgvWritePropertyMultiple_Attrs, 1, 0); + this.TlpWritepropertyMultiple_Params.Dock = System.Windows.Forms.DockStyle.Fill; + this.TlpWritepropertyMultiple_Params.Location = new System.Drawing.Point(169, 23); + this.TlpWritepropertyMultiple_Params.Name = "TlpWritepropertyMultiple_Params"; + this.TlpWritepropertyMultiple_Params.RowCount = 1; + this.TlpWritepropertyMultiple_Params.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.TlpWritepropertyMultiple_Params.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 94F)); + this.TlpWritepropertyMultiple_Params.Size = new System.Drawing.Size(731, 94); + this.TlpWritepropertyMultiple_Params.TabIndex = 1; + // + // DgvWritePropertyMultiple_Ids + // + this.DgvWritePropertyMultiple_Ids.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DgvWritePropertyMultiple_Ids.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.DgvWritePropertyMultiple_Ids_Id}); + this.DgvWritePropertyMultiple_Ids.Dock = System.Windows.Forms.DockStyle.Fill; + this.DgvWritePropertyMultiple_Ids.Location = new System.Drawing.Point(3, 3); + this.DgvWritePropertyMultiple_Ids.Name = "DgvWritePropertyMultiple_Ids"; + this.DgvWritePropertyMultiple_Ids.Size = new System.Drawing.Size(359, 88); + this.DgvWritePropertyMultiple_Ids.TabIndex = 0; + // + // DgvWritePropertyMultiple_Ids_Id + // + this.DgvWritePropertyMultiple_Ids_Id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.DgvWritePropertyMultiple_Ids_Id.HeaderText = "Object ID (GUID)"; + this.DgvWritePropertyMultiple_Ids_Id.Name = "DgvWritePropertyMultiple_Ids_Id"; + // + // DgvWritePropertyMultiple_Attrs + // + this.DgvWritePropertyMultiple_Attrs.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DgvWritePropertyMultiple_Attrs.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.DgvWritePropertyMultiple_Attrs_Name, + this.DgvWritePropertyMultiple_Attrs_Value}); + this.DgvWritePropertyMultiple_Attrs.Dock = System.Windows.Forms.DockStyle.Fill; + this.DgvWritePropertyMultiple_Attrs.Location = new System.Drawing.Point(368, 3); + this.DgvWritePropertyMultiple_Attrs.Name = "DgvWritePropertyMultiple_Attrs"; + this.DgvWritePropertyMultiple_Attrs.Size = new System.Drawing.Size(360, 88); + this.DgvWritePropertyMultiple_Attrs.TabIndex = 1; + // + // DgvWritePropertyMultiple_Attrs_Name + // + this.DgvWritePropertyMultiple_Attrs_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.DgvWritePropertyMultiple_Attrs_Name.HeaderText = "Property Name"; + this.DgvWritePropertyMultiple_Attrs_Name.MinimumWidth = 140; + this.DgvWritePropertyMultiple_Attrs_Name.Name = "DgvWritePropertyMultiple_Attrs_Name"; + this.DgvWritePropertyMultiple_Attrs_Name.Width = 140; + // + // DgvWritePropertyMultiple_Attrs_Value + // + this.DgvWritePropertyMultiple_Attrs_Value.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.DgvWritePropertyMultiple_Attrs_Value.HeaderText = "Property New Value"; + this.DgvWritePropertyMultiple_Attrs_Value.Name = "DgvWritePropertyMultiple_Attrs_Value"; + // + // BtnWritePropertyMultiple + // + this.BtnWritePropertyMultiple.Dock = System.Windows.Forms.DockStyle.Fill; + this.BtnWritePropertyMultiple.Location = new System.Drawing.Point(169, 123); + this.BtnWritePropertyMultiple.Name = "BtnWritePropertyMultiple"; + this.BtnWritePropertyMultiple.Size = new System.Drawing.Size(731, 23); + this.BtnWritePropertyMultiple.TabIndex = 2; + this.BtnWritePropertyMultiple.Text = "WritePropertyMultiple"; + this.BtnWritePropertyMultiple.UseVisualStyleBackColor = true; + this.BtnWritePropertyMultiple.Click += new System.EventHandler(this.BtnWritePropertyMultiple_Click); + // + // LblWritePropertMultiple_Result + // + this.LblWritePropertMultiple_Result.AutoSize = true; + this.LblWritePropertMultiple_Result.Dock = System.Windows.Forms.DockStyle.Fill; + this.LblWritePropertMultiple_Result.Location = new System.Drawing.Point(23, 152); + this.LblWritePropertMultiple_Result.Margin = new System.Windows.Forms.Padding(3); + this.LblWritePropertMultiple_Result.Name = "LblWritePropertMultiple_Result"; + this.LblWritePropertMultiple_Result.Size = new System.Drawing.Size(140, 20); + this.LblWritePropertMultiple_Result.TabIndex = 3; + this.LblWritePropertMultiple_Result.Text = "Result:"; + this.LblWritePropertMultiple_Result.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // TxtWritePropertyMultiple_Result + // + this.TxtWritePropertyMultiple_Result.Dock = System.Windows.Forms.DockStyle.Fill; + this.TxtWritePropertyMultiple_Result.Location = new System.Drawing.Point(169, 152); + this.TxtWritePropertyMultiple_Result.Name = "TxtWritePropertyMultiple_Result"; + this.TxtWritePropertyMultiple_Result.ReadOnly = true; + this.TxtWritePropertyMultiple_Result.Size = new System.Drawing.Size(731, 20); + this.TxtWritePropertyMultiple_Result.TabIndex = 4; + // + // TpgSendCommand + // + this.TpgSendCommand.Controls.Add(this.TlpSendCommand); + this.TpgSendCommand.Location = new System.Drawing.Point(4, 29); + this.TpgSendCommand.Name = "TpgSendCommand"; + this.TpgSendCommand.Padding = new System.Windows.Forms.Padding(3); + this.TpgSendCommand.Size = new System.Drawing.Size(929, 557); + this.TpgSendCommand.TabIndex = 5; + this.TpgSendCommand.Text = "SendCommand"; + this.TpgSendCommand.UseVisualStyleBackColor = true; + // + // TlpSendCommand + // + this.TlpSendCommand.ColumnCount = 4; + this.TlpSendCommand.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.TlpSendCommand.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.TlpSendCommand.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.TlpSendCommand.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.TlpSendCommand.Controls.Add(this.LblSendCommand_ObjectId, 1, 1); + this.TlpSendCommand.Controls.Add(this.TxtSendCommand_ObjectId, 2, 1); + this.TlpSendCommand.Controls.Add(this.LblSendCommand_Command, 1, 2); + this.TlpSendCommand.Controls.Add(this.TxtSendCommand_Command, 2, 2); + this.TlpSendCommand.Controls.Add(this.LblSendCommand_Values, 1, 3); + this.TlpSendCommand.Controls.Add(this.TxtSendCommand_Values, 2, 3); + this.TlpSendCommand.Controls.Add(this.BtnSendCommand, 2, 4); + this.TlpSendCommand.Controls.Add(this.LblSendCommand_Result, 1, 5); + this.TlpSendCommand.Controls.Add(this.TxtSendCommand_Result, 2, 5); + this.TlpSendCommand.Dock = System.Windows.Forms.DockStyle.Fill; + this.TlpSendCommand.Location = new System.Drawing.Point(3, 3); + this.TlpSendCommand.Name = "TlpSendCommand"; + this.TlpSendCommand.RowCount = 7; + this.TlpSendCommand.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.TlpSendCommand.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.TlpSendCommand.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.TlpSendCommand.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.TlpSendCommand.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.TlpSendCommand.RowStyles.Add(new System.Windows.Forms.RowStyle()); @@ -1003,273 +1276,28 @@ private void InitializeComponent() this.TxtSendCommand_Result.Size = new System.Drawing.Size(731, 20); this.TxtSendCommand_Result.TabIndex = 8; // - // DgvReadPropertyMultiple_Ids - // - this.DgvReadPropertyMultiple_Ids.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.DgvReadPropertyMultiple_Ids.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.DgvReadPropertyMultiple_Ids_Id}); - this.DgvReadPropertyMultiple_Ids.Dock = System.Windows.Forms.DockStyle.Fill; - this.DgvReadPropertyMultiple_Ids.Location = new System.Drawing.Point(3, 3); - this.DgvReadPropertyMultiple_Ids.Name = "DgvReadPropertyMultiple_Ids"; - this.DgvReadPropertyMultiple_Ids.Size = new System.Drawing.Size(359, 88); - this.DgvReadPropertyMultiple_Ids.TabIndex = 1; - // - // BtnReadPropertyMultiple - // - this.BtnReadPropertyMultiple.Dock = System.Windows.Forms.DockStyle.Fill; - this.BtnReadPropertyMultiple.Location = new System.Drawing.Point(169, 123); - this.BtnReadPropertyMultiple.Name = "BtnReadPropertyMultiple"; - this.BtnReadPropertyMultiple.Size = new System.Drawing.Size(731, 23); - this.BtnReadPropertyMultiple.TabIndex = 2; - this.BtnReadPropertyMultiple.Text = "ReadPropertyMultiple"; - this.BtnReadPropertyMultiple.UseVisualStyleBackColor = true; - this.BtnReadPropertyMultiple.Click += new System.EventHandler(this.BtnReadPropertyMultiple_Click); - // - // DgvReadPropertyMultiple_Result - // - this.DgvReadPropertyMultiple_Result.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.DgvReadPropertyMultiple_Result.Dock = System.Windows.Forms.DockStyle.Fill; - this.DgvReadPropertyMultiple_Result.Location = new System.Drawing.Point(169, 152); - this.DgvReadPropertyMultiple_Result.Name = "DgvReadPropertyMultiple_Result"; - this.DgvReadPropertyMultiple_Result.Size = new System.Drawing.Size(731, 396); - this.DgvReadPropertyMultiple_Result.TabIndex = 3; - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.Controls.Add(this.DgvReadPropertyMultiple_Ids, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.DgvReadPropertyMultiple_Attrs, 1, 0); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(169, 23); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 1; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(731, 94); - this.tableLayoutPanel1.TabIndex = 4; - // - // DgvReadPropertyMultiple_Ids_Id - // - this.DgvReadPropertyMultiple_Ids_Id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.DgvReadPropertyMultiple_Ids_Id.HeaderText = "Object ID (GUID)"; - this.DgvReadPropertyMultiple_Ids_Id.MinimumWidth = 140; - this.DgvReadPropertyMultiple_Ids_Id.Name = "DgvReadPropertyMultiple_Ids_Id"; - // - // DgvReadPropertyMultiple_Attrs - // - this.DgvReadPropertyMultiple_Attrs.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.DgvReadPropertyMultiple_Attrs.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.DgvReadPropertyMultiple_Attrs_Attribute}); - this.DgvReadPropertyMultiple_Attrs.Dock = System.Windows.Forms.DockStyle.Fill; - this.DgvReadPropertyMultiple_Attrs.Location = new System.Drawing.Point(368, 3); - this.DgvReadPropertyMultiple_Attrs.Name = "DgvReadPropertyMultiple_Attrs"; - this.DgvReadPropertyMultiple_Attrs.Size = new System.Drawing.Size(360, 88); - this.DgvReadPropertyMultiple_Attrs.TabIndex = 2; - // - // LblWriteProperty_ObjectId - // - this.LblWriteProperty_ObjectId.AutoSize = true; - this.LblWriteProperty_ObjectId.Dock = System.Windows.Forms.DockStyle.Fill; - this.LblWriteProperty_ObjectId.Location = new System.Drawing.Point(23, 23); - this.LblWriteProperty_ObjectId.Margin = new System.Windows.Forms.Padding(3); - this.LblWriteProperty_ObjectId.MinimumSize = new System.Drawing.Size(140, 0); - this.LblWriteProperty_ObjectId.Name = "LblWriteProperty_ObjectId"; - this.LblWriteProperty_ObjectId.Size = new System.Drawing.Size(140, 20); - this.LblWriteProperty_ObjectId.TabIndex = 0; - this.LblWriteProperty_ObjectId.Text = "Object ID (GUID):"; - this.LblWriteProperty_ObjectId.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // TxtWriteProperty_ObjectId - // - this.TxtWriteProperty_ObjectId.Dock = System.Windows.Forms.DockStyle.Fill; - this.TxtWriteProperty_ObjectId.Location = new System.Drawing.Point(169, 23); - this.TxtWriteProperty_ObjectId.Name = "TxtWriteProperty_ObjectId"; - this.TxtWriteProperty_ObjectId.Size = new System.Drawing.Size(731, 20); - this.TxtWriteProperty_ObjectId.TabIndex = 1; - // - // LblWriteProperty_AttributeName - // - this.LblWriteProperty_AttributeName.AutoSize = true; - this.LblWriteProperty_AttributeName.Dock = System.Windows.Forms.DockStyle.Fill; - this.LblWriteProperty_AttributeName.Location = new System.Drawing.Point(23, 49); - this.LblWriteProperty_AttributeName.Margin = new System.Windows.Forms.Padding(3); - this.LblWriteProperty_AttributeName.Name = "LblWriteProperty_AttributeName"; - this.LblWriteProperty_AttributeName.Size = new System.Drawing.Size(140, 20); - this.LblWriteProperty_AttributeName.TabIndex = 2; - this.LblWriteProperty_AttributeName.Text = "Property Name:"; - this.LblWriteProperty_AttributeName.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // TxtWriteProperty_AttributeName - // - this.TxtWriteProperty_AttributeName.Dock = System.Windows.Forms.DockStyle.Fill; - this.TxtWriteProperty_AttributeName.Location = new System.Drawing.Point(169, 49); - this.TxtWriteProperty_AttributeName.Name = "TxtWriteProperty_AttributeName"; - this.TxtWriteProperty_AttributeName.Size = new System.Drawing.Size(731, 20); - this.TxtWriteProperty_AttributeName.TabIndex = 3; - // - // LblWriteProperty_NewValue - // - this.LblWriteProperty_NewValue.AutoSize = true; - this.LblWriteProperty_NewValue.Dock = System.Windows.Forms.DockStyle.Fill; - this.LblWriteProperty_NewValue.Location = new System.Drawing.Point(23, 75); - this.LblWriteProperty_NewValue.Margin = new System.Windows.Forms.Padding(3); - this.LblWriteProperty_NewValue.Name = "LblWriteProperty_NewValue"; - this.LblWriteProperty_NewValue.Size = new System.Drawing.Size(140, 20); - this.LblWriteProperty_NewValue.TabIndex = 4; - this.LblWriteProperty_NewValue.Text = "New Value:"; - this.LblWriteProperty_NewValue.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // TxtWriteProperty_NewValue - // - this.TxtWriteProperty_NewValue.Dock = System.Windows.Forms.DockStyle.Fill; - this.TxtWriteProperty_NewValue.Location = new System.Drawing.Point(169, 75); - this.TxtWriteProperty_NewValue.Name = "TxtWriteProperty_NewValue"; - this.TxtWriteProperty_NewValue.Size = new System.Drawing.Size(731, 20); - this.TxtWriteProperty_NewValue.TabIndex = 5; - // - // BtnWriteProperty - // - this.BtnWriteProperty.Dock = System.Windows.Forms.DockStyle.Fill; - this.BtnWriteProperty.Location = new System.Drawing.Point(169, 101); - this.BtnWriteProperty.Name = "BtnWriteProperty"; - this.BtnWriteProperty.Size = new System.Drawing.Size(731, 23); - this.BtnWriteProperty.TabIndex = 6; - this.BtnWriteProperty.Text = "WriteProperty"; - this.BtnWriteProperty.UseVisualStyleBackColor = true; - this.BtnWriteProperty.Click += new System.EventHandler(this.BtnWriteProperty_Click); - // - // LblWriteProperty_Result - // - this.LblWriteProperty_Result.AutoSize = true; - this.LblWriteProperty_Result.Dock = System.Windows.Forms.DockStyle.Fill; - this.LblWriteProperty_Result.Location = new System.Drawing.Point(23, 130); - this.LblWriteProperty_Result.Margin = new System.Windows.Forms.Padding(3); - this.LblWriteProperty_Result.Name = "LblWriteProperty_Result"; - this.LblWriteProperty_Result.Size = new System.Drawing.Size(140, 20); - this.LblWriteProperty_Result.TabIndex = 7; - this.LblWriteProperty_Result.Text = "Result:"; - this.LblWriteProperty_Result.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // DgvReadPropertyMultiple_Attrs_Attribute - // - this.DgvReadPropertyMultiple_Attrs_Attribute.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.DgvReadPropertyMultiple_Attrs_Attribute.HeaderText = "Object Property"; - this.DgvReadPropertyMultiple_Attrs_Attribute.Name = "DgvReadPropertyMultiple_Attrs_Attribute"; - // - // TxtWriteProperty_Result - // - this.TxtWriteProperty_Result.Dock = System.Windows.Forms.DockStyle.Fill; - this.TxtWriteProperty_Result.Location = new System.Drawing.Point(169, 130); - this.TxtWriteProperty_Result.Name = "TxtWriteProperty_Result"; - this.TxtWriteProperty_Result.ReadOnly = true; - this.TxtWriteProperty_Result.Size = new System.Drawing.Size(731, 20); - this.TxtWriteProperty_Result.TabIndex = 8; - // - // LblWritePropertyMultiple_Params - // - this.LblWritePropertyMultiple_Params.AutoSize = true; - this.LblWritePropertyMultiple_Params.Dock = System.Windows.Forms.DockStyle.Fill; - this.LblWritePropertyMultiple_Params.Location = new System.Drawing.Point(23, 23); - this.LblWritePropertyMultiple_Params.Margin = new System.Windows.Forms.Padding(3); - this.LblWritePropertyMultiple_Params.MinimumSize = new System.Drawing.Size(140, 0); - this.LblWritePropertyMultiple_Params.Name = "LblWritePropertyMultiple_Params"; - this.LblWritePropertyMultiple_Params.Size = new System.Drawing.Size(140, 94); - this.LblWritePropertyMultiple_Params.TabIndex = 0; - this.LblWritePropertyMultiple_Params.Text = "Parameters:"; - this.LblWritePropertyMultiple_Params.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // TlpWritepropertyMultiple_Params - // - this.TlpWritepropertyMultiple_Params.ColumnCount = 2; - this.TlpWritepropertyMultiple_Params.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.TlpWritepropertyMultiple_Params.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.TlpWritepropertyMultiple_Params.Controls.Add(this.DgvWritePropertyMultiple_Ids, 0, 0); - this.TlpWritepropertyMultiple_Params.Controls.Add(this.DgvWritePropertyMultiple_Attrs, 1, 0); - this.TlpWritepropertyMultiple_Params.Dock = System.Windows.Forms.DockStyle.Fill; - this.TlpWritepropertyMultiple_Params.Location = new System.Drawing.Point(169, 23); - this.TlpWritepropertyMultiple_Params.Name = "TlpWritepropertyMultiple_Params"; - this.TlpWritepropertyMultiple_Params.RowCount = 1; - this.TlpWritepropertyMultiple_Params.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.TlpWritepropertyMultiple_Params.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.TlpWritepropertyMultiple_Params.Size = new System.Drawing.Size(731, 94); - this.TlpWritepropertyMultiple_Params.TabIndex = 1; - // - // DgvWritePropertyMultiple_Ids - // - this.DgvWritePropertyMultiple_Ids.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.DgvWritePropertyMultiple_Ids.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.DgvWritePropertyMultiple_Ids_Id}); - this.DgvWritePropertyMultiple_Ids.Dock = System.Windows.Forms.DockStyle.Fill; - this.DgvWritePropertyMultiple_Ids.Location = new System.Drawing.Point(3, 3); - this.DgvWritePropertyMultiple_Ids.Name = "DgvWritePropertyMultiple_Ids"; - this.DgvWritePropertyMultiple_Ids.Size = new System.Drawing.Size(359, 88); - this.DgvWritePropertyMultiple_Ids.TabIndex = 0; - // - // DgvWritePropertyMultiple_Attrs - // - this.DgvWritePropertyMultiple_Attrs.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.DgvWritePropertyMultiple_Attrs.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.DgvWritePropertyMultiple_Attrs_Name, - this.DgvWritePropertyMultiple_Attrs_Value}); - this.DgvWritePropertyMultiple_Attrs.Dock = System.Windows.Forms.DockStyle.Fill; - this.DgvWritePropertyMultiple_Attrs.Location = new System.Drawing.Point(368, 3); - this.DgvWritePropertyMultiple_Attrs.Name = "DgvWritePropertyMultiple_Attrs"; - this.DgvWritePropertyMultiple_Attrs.Size = new System.Drawing.Size(360, 88); - this.DgvWritePropertyMultiple_Attrs.TabIndex = 1; - // - // DgvWritePropertyMultiple_Ids_Id - // - this.DgvWritePropertyMultiple_Ids_Id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.DgvWritePropertyMultiple_Ids_Id.HeaderText = "Object ID (GUID)"; - this.DgvWritePropertyMultiple_Ids_Id.Name = "DgvWritePropertyMultiple_Ids_Id"; - // - // DgvWritePropertyMultiple_Attrs_Name - // - this.DgvWritePropertyMultiple_Attrs_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.DgvWritePropertyMultiple_Attrs_Name.HeaderText = "Property Name"; - this.DgvWritePropertyMultiple_Attrs_Name.MinimumWidth = 140; - this.DgvWritePropertyMultiple_Attrs_Name.Name = "DgvWritePropertyMultiple_Attrs_Name"; - this.DgvWritePropertyMultiple_Attrs_Name.Width = 140; - // - // DgvWritePropertyMultiple_Attrs_Value - // - this.DgvWritePropertyMultiple_Attrs_Value.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.DgvWritePropertyMultiple_Attrs_Value.HeaderText = "Property New Value"; - this.DgvWritePropertyMultiple_Attrs_Value.Name = "DgvWritePropertyMultiple_Attrs_Value"; - // - // BtnWritePropertyMultiple - // - this.BtnWritePropertyMultiple.Dock = System.Windows.Forms.DockStyle.Fill; - this.BtnWritePropertyMultiple.Location = new System.Drawing.Point(169, 123); - this.BtnWritePropertyMultiple.Name = "BtnWritePropertyMultiple"; - this.BtnWritePropertyMultiple.Size = new System.Drawing.Size(731, 23); - this.BtnWritePropertyMultiple.TabIndex = 2; - this.BtnWritePropertyMultiple.Text = "WritePropertyMultiple"; - this.BtnWritePropertyMultiple.UseVisualStyleBackColor = true; - this.BtnWritePropertyMultiple.Click += new System.EventHandler(this.BtnWritePropertyMultiple_Click); - // - // LblWritePropertMultiple_Result - // - this.LblWritePropertMultiple_Result.AutoSize = true; - this.LblWritePropertMultiple_Result.Dock = System.Windows.Forms.DockStyle.Fill; - this.LblWritePropertMultiple_Result.Location = new System.Drawing.Point(23, 152); - this.LblWritePropertMultiple_Result.Margin = new System.Windows.Forms.Padding(3); - this.LblWritePropertMultiple_Result.Name = "LblWritePropertMultiple_Result"; - this.LblWritePropertMultiple_Result.Size = new System.Drawing.Size(140, 20); - this.LblWritePropertMultiple_Result.TabIndex = 3; - this.LblWritePropertMultiple_Result.Text = "Result:"; - this.LblWritePropertMultiple_Result.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // TxtWritePropertyMultiple_Result - // - this.TxtWritePropertyMultiple_Result.Dock = System.Windows.Forms.DockStyle.Fill; - this.TxtWritePropertyMultiple_Result.Location = new System.Drawing.Point(169, 152); - this.TxtWritePropertyMultiple_Result.Name = "TxtWritePropertyMultiple_Result"; - this.TxtWritePropertyMultiple_Result.ReadOnly = true; - this.TxtWritePropertyMultiple_Result.Size = new System.Drawing.Size(731, 20); - this.TxtWritePropertyMultiple_Result.TabIndex = 4; + // LblGetObjects_IncludeExtensions + // + this.LblGetObjects_IncludeExtensions.AutoSize = true; + this.LblGetObjects_IncludeExtensions.Dock = System.Windows.Forms.DockStyle.Fill; + this.LblGetObjects_IncludeExtensions.Location = new System.Drawing.Point(23, 75); + this.LblGetObjects_IncludeExtensions.Margin = new System.Windows.Forms.Padding(3); + this.LblGetObjects_IncludeExtensions.Name = "LblGetObjects_IncludeExtensions"; + this.LblGetObjects_IncludeExtensions.Size = new System.Drawing.Size(140, 20); + this.LblGetObjects_IncludeExtensions.TabIndex = 8; + this.LblGetObjects_IncludeExtensions.Text = "Include Extensions"; + this.LblGetObjects_IncludeExtensions.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // ChkGetObjects_IncludeExtensions + // + this.ChkGetObjects_IncludeExtensions.AutoSize = true; + this.ChkGetObjects_IncludeExtensions.Dock = System.Windows.Forms.DockStyle.Fill; + this.ChkGetObjects_IncludeExtensions.Location = new System.Drawing.Point(169, 75); + this.ChkGetObjects_IncludeExtensions.MinimumSize = new System.Drawing.Size(0, 20); + this.ChkGetObjects_IncludeExtensions.Name = "ChkGetObjects_IncludeExtensions"; + this.ChkGetObjects_IncludeExtensions.Size = new System.Drawing.Size(731, 20); + this.ChkGetObjects_IncludeExtensions.TabIndex = 9; + this.ChkGetObjects_IncludeExtensions.UseVisualStyleBackColor = true; // // Objects // @@ -1302,22 +1330,22 @@ private void InitializeComponent() this.TpgReadPropertyMultiple.ResumeLayout(false); this.TlpReadPropertyMultiple.ResumeLayout(false); this.TlpReadPropertyMultiple.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DgvReadPropertyMultiple_Result)).EndInit(); + this.tableLayoutPanel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.DgvReadPropertyMultiple_Ids)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.DgvReadPropertyMultiple_Attrs)).EndInit(); this.TpgWriteProperty.ResumeLayout(false); this.TlpWriteProperty.ResumeLayout(false); this.TlpWriteProperty.PerformLayout(); this.TpgWritePropertyMultiple.ResumeLayout(false); this.TlpWritePropertyMultiple.ResumeLayout(false); this.TlpWritePropertyMultiple.PerformLayout(); - this.TpgSendCommand.ResumeLayout(false); - this.TlpSendCommand.ResumeLayout(false); - this.TlpSendCommand.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.DgvReadPropertyMultiple_Ids)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.DgvReadPropertyMultiple_Result)).EndInit(); - this.tableLayoutPanel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.DgvReadPropertyMultiple_Attrs)).EndInit(); this.TlpWritepropertyMultiple_Params.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.DgvWritePropertyMultiple_Ids)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.DgvWritePropertyMultiple_Attrs)).EndInit(); + this.TpgSendCommand.ResumeLayout(false); + this.TlpSendCommand.ResumeLayout(false); + this.TlpSendCommand.PerformLayout(); this.ResumeLayout(false); } @@ -1414,5 +1442,7 @@ private void InitializeComponent() private System.Windows.Forms.Button BtnWritePropertyMultiple; private System.Windows.Forms.Label LblWritePropertMultiple_Result; private System.Windows.Forms.TextBox TxtWritePropertyMultiple_Result; + private System.Windows.Forms.Label LblGetObjects_IncludeExtensions; + private System.Windows.Forms.CheckBox ChkGetObjects_IncludeExtensions; } } \ No newline at end of file diff --git a/TestClient/Forms/Objects.cs b/TestClient/Forms/Objects.cs index ee7ca89..110969d 100644 --- a/TestClient/Forms/Objects.cs +++ b/TestClient/Forms/Objects.cs @@ -1,13 +1,8 @@ -using System; +using JohnsonControls.Metasys.BasicServices; +using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; -using JohnsonControls.Metasys.BasicServices; namespace MetasysServices_TestClient.Forms { @@ -50,11 +45,12 @@ private void BtnGetObjects_Click(object sender, EventArgs e) DgvGetObjects.DataSource = null; string guid = TxtGetObjects_ParentID.Text; int levels = (int)NupGetObject_Levels.Value; + bool includeExtensions = ChkGetObjects_IncludeExtensions.Checked; bool includeInternalObjects = ChkGetObjects_IncludeInternalObjects.Checked; if (guid.Length > 0) { Guid parentId = new Guid(guid); - var result = _client.GetObjects(parentId, levels, includeInternalObjects); + var result = _client.GetObjects(parentId, levels, includeInternalObjects, includeExtensions); DgvGetObjects.DataSource = result; } } @@ -154,7 +150,7 @@ private void BtnSendCommand_Click(object sender, EventArgs e) } else { - List objValues = new List(); + List objValues = new List(); if (double.TryParse(values, out double numericValue)) { objValues.Add(numericValue); @@ -212,7 +208,7 @@ private void BtnReadPropertyMultiple_Click(object sender, EventArgs e) foreach (var i in result) { - foreach(Variant v in i.Values) + foreach (Variant v in i.Values) { values.Add(v); } @@ -242,7 +238,7 @@ private void BtnWriteProperty_Click(object sender, EventArgs e) _client.WriteProperty(id, attributeName, newValue); TxtWriteProperty_Result.Text = "OK"; } - catch(Exception ex) + catch (Exception ex) { TxtSendCommand_Result.Text = "Error: " + ex.Message; } diff --git a/TestClient/Forms/Objects.resx b/TestClient/Forms/Objects.resx index c1eaad3..20459b1 100644 --- a/TestClient/Forms/Objects.resx +++ b/TestClient/Forms/Objects.resx @@ -126,30 +126,12 @@ True - - True - - - True - - - True - - - True - True True - - True - - - True - True @@ -162,13 +144,4 @@ True - - True - - - True - - - True - \ No newline at end of file diff --git a/TestClient/Properties/AssemblyInfo.cs b/TestClient/Properties/AssemblyInfo.cs index ea90976..625b747 100644 --- a/TestClient/Properties/AssemblyInfo.cs +++ b/TestClient/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("6.0.2.0")] -[assembly: AssemblyFileVersion("6.0.2.0")] +[assembly: AssemblyVersion("6.0.3.0")] +[assembly: AssemblyFileVersion("6.0.3.0")]