diff --git a/Development/GXDLMSDirector.csproj b/Development/GXDLMSDirector.csproj
index 6c356b3..2268c97 100644
--- a/Development/GXDLMSDirector.csproj
+++ b/Development/GXDLMSDirector.csproj
@@ -135,8 +135,8 @@
packages\Gurux.DLMS.8.5.1801.1202\lib\portable-win+net35\Gurux.DLMS.dll
-
- packages\Gurux.DLMS.UI.8.5.1801.1201\lib\portable-win+net40\Gurux.DLMS.UI.dll
+
+ packages\Gurux.DLMS.UI.8.5.1801.2201\lib\portable-win+net40\Gurux.DLMS.UI.dll
packages\Gurux.Net.8.1.1801.1201\lib\portable-win+net40\Gurux.Net.dll
@@ -168,6 +168,12 @@
GXExternalMediaForm.cs
+
+ Form
+
+
+ GXFindDlg.cs
+
Form
@@ -232,6 +238,9 @@
GXExternalMediaForm.cs
+
+ GXFindDlg.cs
+
GXObisValueItemForm.cs
Designer
diff --git a/Development/GXExternalMediaForm.cs b/Development/GXExternalMediaForm.cs
index e21fbf6..0f59b99 100644
--- a/Development/GXExternalMediaForm.cs
+++ b/Development/GXExternalMediaForm.cs
@@ -32,15 +32,9 @@
//---------------------------------------------------------------------------
using Gurux.Common;
using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
using System.IO;
-using System.Linq;
using System.Net;
using System.Reflection;
-using System.Text;
using System.Windows.Forms;
namespace GXDLMSDirector
diff --git a/Development/GXFindDlg.Designer.cs b/Development/GXFindDlg.Designer.cs
new file mode 100644
index 0000000..7b5bfed
--- /dev/null
+++ b/Development/GXFindDlg.Designer.cs
@@ -0,0 +1,108 @@
+namespace GXDLMSDirector
+{
+ partial class GXFindDlg
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.FindBtn = new System.Windows.Forms.Button();
+ this.FindTb = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.CancelBtn = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // FindBtn
+ //
+ this.FindBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.FindBtn.DialogResult = System.Windows.Forms.DialogResult.OK;
+ this.FindBtn.Location = new System.Drawing.Point(251, 4);
+ this.FindBtn.Name = "FindBtn";
+ this.FindBtn.Size = new System.Drawing.Size(75, 23);
+ this.FindBtn.TabIndex = 1;
+ this.FindBtn.Text = "Find Next";
+ this.FindBtn.Click += new System.EventHandler(this.FindBtn_Click);
+ //
+ // FindTb
+ //
+ this.FindTb.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.FindTb.Location = new System.Drawing.Point(74, 6);
+ this.FindTb.Name = "FindTb";
+ this.FindTb.Size = new System.Drawing.Size(155, 20);
+ this.FindTb.TabIndex = 0;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(12, 9);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(56, 13);
+ this.label1.TabIndex = 27;
+ this.label1.Text = "Find what:";
+ //
+ // CancelBtn
+ //
+ this.CancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.CancelBtn.Location = new System.Drawing.Point(251, 33);
+ this.CancelBtn.Name = "CancelBtn";
+ this.CancelBtn.Size = new System.Drawing.Size(75, 23);
+ this.CancelBtn.TabIndex = 2;
+ this.CancelBtn.Text = "&Cancel";
+ this.CancelBtn.UseVisualStyleBackColor = true;
+ //
+ // GXFindDlg
+ //
+ this.AcceptButton = this.FindBtn;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.CancelBtn;
+ this.ClientSize = new System.Drawing.Size(338, 68);
+ this.Controls.Add(this.CancelBtn);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.FindTb);
+ this.Controls.Add(this.FindBtn);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "GXFindDlg";
+ this.Padding = new System.Windows.Forms.Padding(9);
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Find OBIS code";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button FindBtn;
+ private System.Windows.Forms.TextBox FindTb;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Button CancelBtn;
+ }
+}
diff --git a/Development/GXFindDlg.cs b/Development/GXFindDlg.cs
new file mode 100644
index 0000000..010adc4
--- /dev/null
+++ b/Development/GXFindDlg.cs
@@ -0,0 +1,169 @@
+//
+// --------------------------------------------------------------------------
+// Gurux Ltd
+//
+//
+//
+//
+// Version: $Revision: 9442 $,
+// $Date: 2017-05-23 15:21:03 +0300 (ti, 23 touko 2017) $
+// $Author: gurux01 $
+//
+// Copyright (c) Gurux Ltd
+//
+//---------------------------------------------------------------------------
+//
+// DESCRIPTION
+//
+// This file is a part of Gurux Device Framework.
+//
+// Gurux Device Framework is Open Source software; you can redistribute it
+// and/or modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of the License.
+// Gurux Device Framework is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// More information of Gurux DLMS/COSEM Director: http://www.gurux.org/GXDLMSDirector
+//
+// This code is licensed under the GNU General Public License v2.
+// Full text may be retrieved at http://www.gnu.org/licenses/gpl-2.0.txt
+//---------------------------------------------------------------------------
+
+using Gurux.Common;
+using System;
+using System.Reflection;
+using System.Windows.Forms;
+
+namespace GXDLMSDirector
+{
+ ///
+ /// Search dialog for OBIS code.
+ ///
+ partial class GXFindDlg : Form
+ {
+ public string Target
+ {
+ get;
+ set;
+ }
+
+ ///
+ /// Constructor.
+ ///
+ /// OBIS code to search.
+ public GXFindDlg(string target)
+ {
+ InitializeComponent();
+ FindTb.Text = target;
+ }
+
+ #region Assembly Attribute Accessors
+
+ public string AssemblyTitle
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
+ if (attributes.Length > 0)
+ {
+ AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
+ if (titleAttribute.Title != "")
+ {
+ return titleAttribute.Title;
+ }
+ }
+ return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
+ }
+ }
+
+ public string AssemblyVersion
+ {
+ get
+ {
+ return Assembly.GetExecutingAssembly().GetName().Version.ToString();
+ }
+ }
+
+ public string AssemblyDescription
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
+ if (attributes.Length == 0)
+ {
+ return "";
+ }
+ return ((AssemblyDescriptionAttribute)attributes[0]).Description;
+ }
+ }
+
+ public string AssemblyProduct
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
+ if (attributes.Length == 0)
+ {
+ return "";
+ }
+ return ((AssemblyProductAttribute)attributes[0]).Product;
+ }
+ }
+
+ public string AssemblyCopyright
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
+ if (attributes.Length == 0)
+ {
+ return "";
+ }
+ return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
+ }
+ }
+
+ public string AssemblyCompany
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
+ if (attributes.Length == 0)
+ {
+ return "";
+ }
+ return ((AssemblyCompanyAttribute)attributes[0]).Company;
+ }
+ }
+ #endregion
+
+ private void FindBtn_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ //If OBIS code is given as hex.
+ if (FindTb.Text.IndexOf('.') == -1)
+ {
+ byte[] tmp = GXCommon.HexToBytes(FindTb.Text);
+ if (tmp.Length != 6)
+ {
+ throw new Exception("Invalid OBIS code.");
+ }
+ Target = tmp[5].ToString() + '.' + tmp[4] + '.' + tmp[3] + '.' + tmp[2] + '.' + tmp[1] + '.' + tmp[0] + '.';
+ }
+ else if (FindTb.Text.Split(new char[] { '.' }).Length != 6)
+ {
+ throw new Exception("Invalid OBIS code.");
+ }
+ Target = FindTb.Text.Trim();
+ }
+ catch (Exception Ex)
+ {
+ GXDLMS.Common.Error.ShowError(this, Ex);
+ DialogResult = DialogResult.None;
+ }
+ }
+ }
+}
diff --git a/Development/GXFindDlg.resx b/Development/GXFindDlg.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Development/GXFindDlg.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Development/MainForm.Designer.cs b/Development/MainForm.Designer.cs
index 1d53591..7119666 100644
--- a/Development/MainForm.Designer.cs
+++ b/Development/MainForm.Designer.cs
@@ -5,8 +5,8 @@
//
//
//
-// Version: $Revision: 9749 $,
-// $Date: 2017-12-05 10:01:35 +0200 (ti, 05 joulu 2017) $
+// Version: $Revision: 9818 $,
+// $Date: 2018-01-22 09:05:42 +0200 (ma, 22 tammi 2018) $
// $Author: gurux01 $
//
// Copyright (c) Gurux Ltd
@@ -77,6 +77,11 @@ private void InitializeComponent()
this.RecentFilesMnu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem11 = new System.Windows.Forms.ToolStripSeparator();
this.ExitMnu = new System.Windows.Forms.ToolStripMenuItem();
+ this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.findToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.findNextToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItem16 = new System.Windows.Forms.ToolStripSeparator();
+ this.CloneBtn = new System.Windows.Forms.ToolStripMenuItem();
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ViewToolbarMnu = new System.Windows.Forms.ToolStripMenuItem();
this.ViewStatusbarMnu = new System.Windows.Forms.ToolStripMenuItem();
@@ -90,6 +95,11 @@ private void InitializeComponent()
this.hexToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.xmlToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pDUToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripMenuItem();
+ this.NotificationNone = new System.Windows.Forms.ToolStripMenuItem();
+ this.NotificationHex = new System.Windows.Forms.ToolStripMenuItem();
+ this.NotificationXml = new System.Windows.Forms.ToolStripMenuItem();
+ this.NotificationPdu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.ForceReadMnu = new System.Windows.Forms.ToolStripMenuItem();
this.PropertiesMnu = new System.Windows.Forms.ToolStripMenuItem();
@@ -110,11 +120,11 @@ private void InitializeComponent()
this.OBISCodesMnu = new System.Windows.Forms.ToolStripMenuItem();
this.settingsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.notificationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.AutoReset = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem13 = new System.Windows.Forms.ToolStripSeparator();
this.StartNotifications = new System.Windows.Forms.ToolStripMenuItem();
this.StopNotifications = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem14 = new System.Windows.Forms.ToolStripSeparator();
+ this.AutoReset = new System.Windows.Forms.ToolStripMenuItem();
this.ClearNotifications = new System.Windows.Forms.ToolStripMenuItem();
this.updateManufactureSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -196,11 +206,9 @@ private void InitializeComponent()
this.DeviceList = new System.Windows.Forms.ListView();
this.DeviceNameCH = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ObjectPanelFrame = new System.Windows.Forms.Panel();
- this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripMenuItem();
- this.NotificationNone = new System.Windows.Forms.ToolStripMenuItem();
- this.NotificationHex = new System.Windows.Forms.ToolStripMenuItem();
- this.NotificationXml = new System.Windows.Forms.ToolStripMenuItem();
- this.NotificationPdu = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItem17 = new System.Windows.Forms.ToolStripMenuItem();
+ this.LogHexBtn = new System.Windows.Forms.ToolStripMenuItem();
+ this.LogXmlBtn = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
@@ -217,6 +225,7 @@ private void InitializeComponent()
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
+ this.editToolStripMenuItem,
this.viewToolStripMenuItem,
this.toolsToolStripMenuItem,
this.notificationsToolStripMenuItem,
@@ -320,6 +329,46 @@ private void InitializeComponent()
this.ExitMnu.Text = "&Exit";
this.ExitMnu.Click += new System.EventHandler(this.ExitMnu_Click);
//
+ // editToolStripMenuItem
+ //
+ this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.findToolStripMenuItem,
+ this.findNextToolStripMenuItem,
+ this.toolStripMenuItem16,
+ this.CloneBtn});
+ this.editToolStripMenuItem.Name = "editToolStripMenuItem";
+ this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
+ this.editToolStripMenuItem.Text = "&Edit";
+ //
+ // findToolStripMenuItem
+ //
+ this.findToolStripMenuItem.Name = "findToolStripMenuItem";
+ this.findToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
+ this.findToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.findToolStripMenuItem.Text = "Find...";
+ this.findToolStripMenuItem.Click += new System.EventHandler(this.findToolStripMenuItem_Click);
+ //
+ // findNextToolStripMenuItem
+ //
+ this.findNextToolStripMenuItem.Enabled = false;
+ this.findNextToolStripMenuItem.Name = "findNextToolStripMenuItem";
+ this.findNextToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F3;
+ this.findNextToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.findNextToolStripMenuItem.Text = "Find Next";
+ this.findNextToolStripMenuItem.Click += new System.EventHandler(this.findNextToolStripMenuItem_Click);
+ //
+ // toolStripMenuItem16
+ //
+ this.toolStripMenuItem16.Name = "toolStripMenuItem16";
+ this.toolStripMenuItem16.Size = new System.Drawing.Size(149, 6);
+ //
+ // CloneBtn
+ //
+ this.CloneBtn.Name = "CloneBtn";
+ this.CloneBtn.Size = new System.Drawing.Size(152, 22);
+ this.CloneBtn.Text = "Clone...";
+ this.CloneBtn.Click += new System.EventHandler(this.CloneBtn_Click);
+ //
// viewToolStripMenuItem
//
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -330,6 +379,7 @@ private void InitializeComponent()
this.ObjectListMnu,
this.GroupsMnu,
this.toolStripMenuItem7,
+ this.toolStripMenuItem17,
this.TraceMnu,
this.toolStripMenuItem15,
this.toolStripSeparator4,
@@ -423,6 +473,45 @@ private void InitializeComponent()
this.pDUToolStripMenuItem.Text = "&Pdu";
this.pDUToolStripMenuItem.Click += new System.EventHandler(this.pDUToolStripMenuItem_Click);
//
+ // toolStripMenuItem15
+ //
+ this.toolStripMenuItem15.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.NotificationNone,
+ this.NotificationHex,
+ this.NotificationXml,
+ this.NotificationPdu});
+ this.toolStripMenuItem15.Name = "toolStripMenuItem15";
+ this.toolStripMenuItem15.Size = new System.Drawing.Size(152, 22);
+ this.toolStripMenuItem15.Text = "&Notifications";
+ //
+ // NotificationNone
+ //
+ this.NotificationNone.Name = "NotificationNone";
+ this.NotificationNone.Size = new System.Drawing.Size(152, 22);
+ this.NotificationNone.Text = "&None";
+ this.NotificationNone.Click += new System.EventHandler(this.NotificationNone_Click);
+ //
+ // NotificationHex
+ //
+ this.NotificationHex.Name = "NotificationHex";
+ this.NotificationHex.Size = new System.Drawing.Size(152, 22);
+ this.NotificationHex.Text = "&Hex";
+ this.NotificationHex.Click += new System.EventHandler(this.NotificationHex_Click);
+ //
+ // NotificationXml
+ //
+ this.NotificationXml.Name = "NotificationXml";
+ this.NotificationXml.Size = new System.Drawing.Size(152, 22);
+ this.NotificationXml.Text = "Xml";
+ this.NotificationXml.Click += new System.EventHandler(this.NotificationXml_Click);
+ //
+ // NotificationPdu
+ //
+ this.NotificationPdu.Name = "NotificationPdu";
+ this.NotificationPdu.Size = new System.Drawing.Size(152, 22);
+ this.NotificationPdu.Text = "&Pdu";
+ this.NotificationPdu.Click += new System.EventHandler(this.NotificationPdu_Click);
+ //
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
@@ -579,23 +668,15 @@ private void InitializeComponent()
this.notificationsToolStripMenuItem.Size = new System.Drawing.Size(87, 20);
this.notificationsToolStripMenuItem.Text = "Notifications";
//
- // AutoReset
- //
- this.AutoReset.Name = "AutoReset";
- this.AutoReset.Size = new System.Drawing.Size(152, 22);
- this.AutoReset.Text = "Auto Reset";
- this.AutoReset.ToolTipText = "Clear notifications view after new message is received.";
- this.AutoReset.Click += new System.EventHandler(this.AutoReset_Click);
- //
// toolStripMenuItem13
//
this.toolStripMenuItem13.Name = "toolStripMenuItem13";
- this.toolStripMenuItem13.Size = new System.Drawing.Size(149, 6);
+ this.toolStripMenuItem13.Size = new System.Drawing.Size(128, 6);
//
// StartNotifications
//
this.StartNotifications.Name = "StartNotifications";
- this.StartNotifications.Size = new System.Drawing.Size(152, 22);
+ this.StartNotifications.Size = new System.Drawing.Size(131, 22);
this.StartNotifications.Text = "Start";
this.StartNotifications.ToolTipText = "Start receiving notifications";
this.StartNotifications.Click += new System.EventHandler(this.StartNotifications_Click);
@@ -603,7 +684,7 @@ private void InitializeComponent()
// StopNotifications
//
this.StopNotifications.Name = "StopNotifications";
- this.StopNotifications.Size = new System.Drawing.Size(152, 22);
+ this.StopNotifications.Size = new System.Drawing.Size(131, 22);
this.StopNotifications.Text = "Stop";
this.StopNotifications.ToolTipText = "Stop receiving notifications.";
this.StopNotifications.Visible = false;
@@ -612,12 +693,20 @@ private void InitializeComponent()
// toolStripMenuItem14
//
this.toolStripMenuItem14.Name = "toolStripMenuItem14";
- this.toolStripMenuItem14.Size = new System.Drawing.Size(149, 6);
+ this.toolStripMenuItem14.Size = new System.Drawing.Size(128, 6);
+ //
+ // AutoReset
+ //
+ this.AutoReset.Name = "AutoReset";
+ this.AutoReset.Size = new System.Drawing.Size(131, 22);
+ this.AutoReset.Text = "Auto Reset";
+ this.AutoReset.ToolTipText = "Clear notifications view after new message is received.";
+ this.AutoReset.Click += new System.EventHandler(this.AutoReset_Click);
//
// ClearNotifications
//
this.ClearNotifications.Name = "ClearNotifications";
- this.ClearNotifications.Size = new System.Drawing.Size(152, 22);
+ this.ClearNotifications.Size = new System.Drawing.Size(131, 22);
this.ClearNotifications.Text = "Clear";
this.ClearNotifications.ToolTipText = "Clear received notification.";
this.ClearNotifications.Click += new System.EventHandler(this.ClearNotifications_Click);
@@ -1318,44 +1407,28 @@ private void InitializeComponent()
this.ObjectPanelFrame.Size = new System.Drawing.Size(187, 142);
this.ObjectPanelFrame.TabIndex = 32;
//
- // toolStripMenuItem15
- //
- this.toolStripMenuItem15.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.NotificationNone,
- this.NotificationHex,
- this.NotificationXml,
- this.NotificationPdu});
- this.toolStripMenuItem15.Name = "toolStripMenuItem15";
- this.toolStripMenuItem15.Size = new System.Drawing.Size(152, 22);
- this.toolStripMenuItem15.Text = "&Notifications";
- //
- // NotificationNone
+ // toolStripMenuItem17
//
- this.NotificationNone.Name = "NotificationNone";
- this.NotificationNone.Size = new System.Drawing.Size(152, 22);
- this.NotificationNone.Text = "&None";
- this.NotificationNone.Click += new System.EventHandler(this.NotificationNone_Click);
+ this.toolStripMenuItem17.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.LogHexBtn,
+ this.LogXmlBtn});
+ this.toolStripMenuItem17.Name = "toolStripMenuItem17";
+ this.toolStripMenuItem17.Size = new System.Drawing.Size(152, 22);
+ this.toolStripMenuItem17.Text = "&Log";
//
- // NotificationHex
+ // LogHexBtn
//
- this.NotificationHex.Name = "NotificationHex";
- this.NotificationHex.Size = new System.Drawing.Size(152, 22);
- this.NotificationHex.Text = "&Hex";
- this.NotificationHex.Click += new System.EventHandler(this.NotificationHex_Click);
- //
- // NotificationXml
+ this.LogHexBtn.Name = "LogHexBtn";
+ this.LogHexBtn.Size = new System.Drawing.Size(152, 22);
+ this.LogHexBtn.Text = "&Hex";
+ this.LogHexBtn.Click += new System.EventHandler(this.LogHexBtn_Click);
//
- this.NotificationXml.Name = "NotificationXml";
- this.NotificationXml.Size = new System.Drawing.Size(152, 22);
- this.NotificationXml.Text = "Xml";
- this.NotificationXml.Click += new System.EventHandler(this.NotificationXml_Click);
+ // LogXmlBtn
//
- // NotificationPdu
- //
- this.NotificationPdu.Name = "NotificationPdu";
- this.NotificationPdu.Size = new System.Drawing.Size(152, 22);
- this.NotificationPdu.Text = "&Pdu";
- this.NotificationPdu.Click += new System.EventHandler(this.NotificationPdu_Click);
+ this.LogXmlBtn.Name = "LogXmlBtn";
+ this.LogXmlBtn.Size = new System.Drawing.Size(152, 22);
+ this.LogXmlBtn.Text = "Xml";
+ this.LogXmlBtn.Click += new System.EventHandler(this.LogXmlBtn_Click);
//
// MainForm
//
@@ -1540,6 +1613,14 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem NotificationHex;
private System.Windows.Forms.ToolStripMenuItem NotificationXml;
private System.Windows.Forms.ToolStripMenuItem NotificationPdu;
+ private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem findToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem findNextToolStripMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripMenuItem16;
+ private System.Windows.Forms.ToolStripMenuItem CloneBtn;
+ private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem17;
+ private System.Windows.Forms.ToolStripMenuItem LogHexBtn;
+ private System.Windows.Forms.ToolStripMenuItem LogXmlBtn;
}
}
diff --git a/Development/MainForm.cs b/Development/MainForm.cs
index e98a985..18b72ad 100644
--- a/Development/MainForm.cs
+++ b/Development/MainForm.cs
@@ -5,8 +5,8 @@
//
//
//
-// Version: $Revision: 9796 $,
-// $Date: 2018-01-09 12:23:45 +0200 (ti, 09 tammi 2018) $
+// Version: $Revision: 9821 $,
+// $Date: 2018-01-22 14:36:35 +0200 (ma, 22 tammi 2018) $
// $Author: gurux01 $
//
// Copyright (c) Gurux Ltd
@@ -54,6 +54,7 @@
using Gurux.DLMS.UI;
using Gurux.Net;
using System.Text;
+using System.Runtime.Serialization.Formatters.Binary;
namespace GXDLMSDirector
{
@@ -121,17 +122,10 @@ internal void SetDirty(bool dirty)
public static void InitMain()
{
- //Update previous installed settings.
- if (Properties.Settings.Default.UpdateSettings)
- {
- Properties.Settings.Default.Upgrade();
- Properties.Settings.Default.UpdateSettings = false;
- Properties.Settings.Default.Save();
- }
//Debug traces are written only log file.
- if (!System.Diagnostics.Debugger.IsAttached)
+ if (!Debugger.IsAttached)
{
- System.Diagnostics.Trace.Listeners.Clear();
+ Trace.Listeners.Clear();
}
DirectoryInfo di = new System.IO.DirectoryInfo(System.IO.Path.GetDirectoryName((GXLogWriter.LogPath)));
if (!di.Exists)
@@ -139,9 +133,9 @@ public static void InitMain()
di.Create();
}
GXLogWriter.ClearLog();
- System.Diagnostics.Trace.Listeners.Add(new System.Diagnostics.TextWriterTraceListener(GXLogWriter.LogPath));
- System.Diagnostics.Trace.AutoFlush = true;
- System.Diagnostics.Trace.IndentSize = 4;
+ Trace.Listeners.Add(new TextWriterTraceListener(GXLogWriter.LogPath));
+ Trace.AutoFlush = true;
+ Trace.IndentSize = 4;
if (Environment.OSVersion.Platform != PlatformID.Unix)
{
Application.EnableVisualStyles();
@@ -373,7 +367,7 @@ private void SelectItem(object obj)
ObjectPanelFrame.Controls.Clear();
SelectedView.Target = (GXDLMSObject)obj;
SelectedView.Target.OnChange += new ObjectChangeEventHandler(DLMSItemOnChange);
- UpdateProperties(obj, SelectedView, new List