GTB: FrmSetup: General, Offline Passwords and Slots assignments corrected
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Xylem.Common.CommonCore.Exceptions.Db
|
|||||||
|
|
||||||
sb.AppendLine("1. Retry your request.");
|
sb.AppendLine("1. Retry your request.");
|
||||||
sb.AppendLine("2. Check if your pcb was produced by LAA Operations.");
|
sb.AppendLine("2. Check if your pcb was produced by LAA Operations.");
|
||||||
sb.AppendLine("3. Ask the source of your pcb for the password and the pcbid and let it regiuser at LAA Operations.");
|
sb.AppendLine("3. Ask the source of your pcb for the password and the pcbid and let it register at LAA Operations.");
|
||||||
|
|
||||||
if (_lCode.HasValue)
|
if (_lCode.HasValue)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,11 +15,9 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public String PortName
|
public String PortName
|
||||||
{
|
{
|
||||||
get
|
get =>
|
||||||
{
|
|
||||||
//if the serial port object does not exists
|
//if the serial port object does not exists
|
||||||
return GetSerialPort() == null ? "NA" : _portName;
|
GetSerialPort() == null ? "NA" : _portName;
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == null) return;
|
if (value == null) return;
|
||||||
|
|||||||
@@ -21,13 +21,18 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig
|
|||||||
ProductionMode = true;
|
ProductionMode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <summary>
|
||||||
|
/// Load configuration file from AppRoaming or working directory
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="file"></param>
|
||||||
public ProcessConfig(String file)
|
public ProcessConfig(String file)
|
||||||
{
|
{
|
||||||
|
// chack for AppRoaming
|
||||||
var configFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), nameof(Genesis), file);
|
var configFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), nameof(Genesis), file);
|
||||||
|
|
||||||
if (!File.Exists(configFile))
|
if (!File.Exists(configFile))
|
||||||
{
|
{
|
||||||
|
// take actual working directory
|
||||||
configFile = Path.Combine(file);
|
configFile = Path.Combine(file);
|
||||||
if (!File.Exists(configFile))
|
if (!File.Exists(configFile))
|
||||||
{
|
{
|
||||||
@@ -54,15 +59,15 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Write file to AppRoaming and backup it to actual working directory
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="file"></param>
|
||||||
public void Update(String file)
|
public void Update(String file)
|
||||||
{
|
{
|
||||||
var configFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), nameof(Genesis), file);
|
var configFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), nameof(Genesis), file);
|
||||||
|
|
||||||
if (!File.Exists(configFile))
|
File.WriteAllText(configFile, JsonConvert.SerializeObject(this));
|
||||||
{
|
|
||||||
configFile = Path.Combine(file);
|
|
||||||
}
|
|
||||||
|
|
||||||
File.WriteAllText(file, JsonConvert.SerializeObject(this));
|
File.WriteAllText(file, JsonConvert.SerializeObject(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,11 +109,11 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool AutoUpdateFiles { get; set; }
|
public Boolean AutoUpdateFiles { get; set; }
|
||||||
|
|
||||||
[DefaultValue(true)]
|
[DefaultValue(true)]
|
||||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
|
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
|
||||||
|
|
||||||
public bool ProductionMode { get; set; } = true;
|
public Boolean ProductionMode { get; set; } = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-12
@@ -34,7 +34,6 @@
|
|||||||
this.btnStore = new System.Windows.Forms.Button();
|
this.btnStore = new System.Windows.Forms.Button();
|
||||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||||
this.btnCheckAll = new System.Windows.Forms.Button();
|
|
||||||
this.btnAddRow = new System.Windows.Forms.Button();
|
this.btnAddRow = new System.Windows.Forms.Button();
|
||||||
this.dgvConfig = new System.Windows.Forms.DataGridView();
|
this.dgvConfig = new System.Windows.Forms.DataGridView();
|
||||||
this.tbcSlot = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.tbcSlot = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
@@ -115,7 +114,6 @@
|
|||||||
//
|
//
|
||||||
// tabPage1
|
// tabPage1
|
||||||
//
|
//
|
||||||
this.tabPage1.Controls.Add(this.btnCheckAll);
|
|
||||||
this.tabPage1.Controls.Add(this.btnAddRow);
|
this.tabPage1.Controls.Add(this.btnAddRow);
|
||||||
this.tabPage1.Controls.Add(this.dgvConfig);
|
this.tabPage1.Controls.Add(this.dgvConfig);
|
||||||
this.tabPage1.Location = new System.Drawing.Point(4, 22);
|
this.tabPage1.Location = new System.Drawing.Point(4, 22);
|
||||||
@@ -126,15 +124,6 @@
|
|||||||
this.tabPage1.Text = "Slots";
|
this.tabPage1.Text = "Slots";
|
||||||
this.tabPage1.UseVisualStyleBackColor = true;
|
this.tabPage1.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// btnCheckAll
|
|
||||||
//
|
|
||||||
this.btnCheckAll.Location = new System.Drawing.Point(599, 255);
|
|
||||||
this.btnCheckAll.Name = "btnCheckAll";
|
|
||||||
this.btnCheckAll.Size = new System.Drawing.Size(140, 29);
|
|
||||||
this.btnCheckAll.TabIndex = 7;
|
|
||||||
this.btnCheckAll.Text = "Detect All";
|
|
||||||
this.btnCheckAll.UseVisualStyleBackColor = true;
|
|
||||||
//
|
|
||||||
// btnAddRow
|
// btnAddRow
|
||||||
//
|
//
|
||||||
this.btnAddRow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.btnAddRow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
@@ -242,6 +231,7 @@
|
|||||||
this.cbUpdateFiles.TabIndex = 21;
|
this.cbUpdateFiles.TabIndex = 21;
|
||||||
this.cbUpdateFiles.Text = "Auto Update files (configuration.json)";
|
this.cbUpdateFiles.Text = "Auto Update files (configuration.json)";
|
||||||
this.cbUpdateFiles.UseVisualStyleBackColor = true;
|
this.cbUpdateFiles.UseVisualStyleBackColor = true;
|
||||||
|
this.cbUpdateFiles.CheckedChanged += new System.EventHandler(this.cbUpdateFiles_CheckedChanged);
|
||||||
//
|
//
|
||||||
// cbUseMinMaxCheck
|
// cbUseMinMaxCheck
|
||||||
//
|
//
|
||||||
@@ -255,6 +245,7 @@
|
|||||||
this.cbUseMinMaxCheck.TabIndex = 20;
|
this.cbUseMinMaxCheck.TabIndex = 20;
|
||||||
this.cbUseMinMaxCheck.Text = "UseMinMaxCheck";
|
this.cbUseMinMaxCheck.Text = "UseMinMaxCheck";
|
||||||
this.cbUseMinMaxCheck.UseVisualStyleBackColor = true;
|
this.cbUseMinMaxCheck.UseVisualStyleBackColor = true;
|
||||||
|
this.cbUseMinMaxCheck.CheckedChanged += new System.EventHandler(this.cbUseMinMaxCheck_CheckedChanged);
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
@@ -277,6 +268,7 @@
|
|||||||
this.txtWachSeriveUrl.Name = "txtWachSeriveUrl";
|
this.txtWachSeriveUrl.Name = "txtWachSeriveUrl";
|
||||||
this.txtWachSeriveUrl.Size = new System.Drawing.Size(439, 20);
|
this.txtWachSeriveUrl.Size = new System.Drawing.Size(439, 20);
|
||||||
this.txtWachSeriveUrl.TabIndex = 18;
|
this.txtWachSeriveUrl.TabIndex = 18;
|
||||||
|
this.txtWachSeriveUrl.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
|
||||||
//
|
//
|
||||||
// cbUseRegisterWatch
|
// cbUseRegisterWatch
|
||||||
//
|
//
|
||||||
@@ -290,6 +282,7 @@
|
|||||||
this.cbUseRegisterWatch.TabIndex = 17;
|
this.cbUseRegisterWatch.TabIndex = 17;
|
||||||
this.cbUseRegisterWatch.Text = "UseRegisterWatch";
|
this.cbUseRegisterWatch.Text = "UseRegisterWatch";
|
||||||
this.cbUseRegisterWatch.UseVisualStyleBackColor = true;
|
this.cbUseRegisterWatch.UseVisualStyleBackColor = true;
|
||||||
|
this.cbUseRegisterWatch.CheckedChanged += new System.EventHandler(this.cbUseRegisterWatch_CheckedChanged);
|
||||||
//
|
//
|
||||||
// tabPage3
|
// tabPage3
|
||||||
//
|
//
|
||||||
@@ -311,6 +304,7 @@
|
|||||||
this.cmdAddOffline.TabIndex = 17;
|
this.cmdAddOffline.TabIndex = 17;
|
||||||
this.cmdAddOffline.Text = "Add Item";
|
this.cmdAddOffline.Text = "Add Item";
|
||||||
this.cmdAddOffline.UseVisualStyleBackColor = true;
|
this.cmdAddOffline.UseVisualStyleBackColor = true;
|
||||||
|
this.cmdAddOffline.Click += new System.EventHandler(this.cmdAddOffline_Click);
|
||||||
//
|
//
|
||||||
// dgvofflinePw
|
// dgvofflinePw
|
||||||
//
|
//
|
||||||
@@ -521,7 +515,6 @@
|
|||||||
private System.Windows.Forms.BindingSource offlinePaswordItemBindingSource;
|
private System.Windows.Forms.BindingSource offlinePaswordItemBindingSource;
|
||||||
private System.Windows.Forms.TabControl tabControl1;
|
private System.Windows.Forms.TabControl tabControl1;
|
||||||
private System.Windows.Forms.TabPage tabPage1;
|
private System.Windows.Forms.TabPage tabPage1;
|
||||||
private System.Windows.Forms.Button btnCheckAll;
|
|
||||||
private System.Windows.Forms.Button btnAddRow;
|
private System.Windows.Forms.Button btnAddRow;
|
||||||
private System.Windows.Forms.DataGridView dgvConfig;
|
private System.Windows.Forms.DataGridView dgvConfig;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn tbcSlot;
|
private System.Windows.Forms.DataGridViewTextBoxColumn tbcSlot;
|
||||||
|
|||||||
@@ -7,9 +7,7 @@ using System.Drawing;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Ports;
|
using System.IO.Ports;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
using Xylem.Common.CommonCore.Consts;
|
using Xylem.Common.CommonCore.Consts;
|
||||||
@@ -25,7 +23,6 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
public partial class FrmSetup : Form
|
public partial class FrmSetup : Form
|
||||||
{
|
{
|
||||||
private const String RequestPortString = "RequestPort";
|
private const String RequestPortString = "RequestPort";
|
||||||
private const String RequestBaudRateString = "RequestBaudRate";
|
|
||||||
private const String RequestTypeString = "RequestType";
|
private const String RequestTypeString = "RequestType";
|
||||||
private const String StreamingPortString = "StreamingPort";
|
private const String StreamingPortString = "StreamingPort";
|
||||||
private const String SlotTypeString = "RefTemperature";
|
private const String SlotTypeString = "RefTemperature";
|
||||||
@@ -36,7 +33,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
private const String TextString = "Text";
|
private const String TextString = "Text";
|
||||||
private String _fileString;
|
private String _fileString;
|
||||||
private readonly String _serialConfigFile;
|
private readonly String _serialConfigFile;
|
||||||
private readonly DataTable _dataTable = new DataTable();
|
private readonly DataTable _slotConfigDataTable = new DataTable();
|
||||||
|
|
||||||
|
|
||||||
private readonly ProcessConfig _configuration;
|
private readonly ProcessConfig _configuration;
|
||||||
@@ -47,11 +44,11 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
"Genesis", ProgramConfig.SerialConfigFileName);
|
"Genesis", ProgramConfig.SerialConfigFileName);
|
||||||
|
|
||||||
//build header of data table for reference by name
|
//build header of data table for reference by name
|
||||||
_dataTable.Columns.Add(SlotString, typeof(String));
|
_slotConfigDataTable.Columns.Add(SlotString, typeof(String));
|
||||||
_dataTable.Columns.Add(StreamingPortString, typeof(String));
|
_slotConfigDataTable.Columns.Add(StreamingPortString, typeof(String));
|
||||||
_dataTable.Columns.Add(RequestPortString, typeof(String));
|
_slotConfigDataTable.Columns.Add(RequestPortString, typeof(String));
|
||||||
_dataTable.Columns.Add(RequestTypeString, typeof(String));
|
_slotConfigDataTable.Columns.Add(RequestTypeString, typeof(String));
|
||||||
_dataTable.Columns.Add(SlotTypeString, typeof(String));
|
_slotConfigDataTable.Columns.Add(SlotTypeString, typeof(String));
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
tbcSlot.Name = SlotString;
|
tbcSlot.Name = SlotString;
|
||||||
@@ -71,7 +68,6 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
btcDetectStreaming.HeaderText = StreamingDetectString;
|
btcDetectStreaming.HeaderText = StreamingDetectString;
|
||||||
cbcSlotType.HeaderText = SlotTypeString;
|
cbcSlotType.HeaderText = SlotTypeString;
|
||||||
|
|
||||||
|
|
||||||
LoadFromFile();
|
LoadFromFile();
|
||||||
_configuration = new ProcessConfig(ProgramConfig.ConfigFileName);
|
_configuration = new ProcessConfig(ProgramConfig.ConfigFileName);
|
||||||
cbUseMinMaxCheck.Checked = _configuration.UseMinMaxCheck;
|
cbUseMinMaxCheck.Checked = _configuration.UseMinMaxCheck;
|
||||||
@@ -79,18 +75,18 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
txtWachSeriveUrl.Text = _configuration.RegisterWatchServiceUrl;
|
txtWachSeriveUrl.Text = _configuration.RegisterWatchServiceUrl;
|
||||||
cbUpdateFiles.Checked = _configuration.AutoUpdateFiles;
|
cbUpdateFiles.Checked = _configuration.AutoUpdateFiles;
|
||||||
cbxProductionMode.Checked = _configuration.ProductionMode;
|
cbxProductionMode.Checked = _configuration.ProductionMode;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnReload_Click(Object sender, EventArgs e)
|
private void BtnReload_Click(Object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
LoadFromFile();
|
LoadFromFile();
|
||||||
|
LoadOfflineFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnStore_Click(Object sender, EventArgs e)
|
private void BtnStore_Click(Object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
StoreToPc();
|
StoreToPc();
|
||||||
|
StoreOfflineFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StoreToPc()
|
private void StoreToPc()
|
||||||
@@ -99,31 +95,29 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
|
|
||||||
for (var row = 0; row < dgvConfig.Rows.Count; row++)
|
for (var row = 0; row < dgvConfig.Rows.Count; row++)
|
||||||
{
|
{
|
||||||
Int32 slot;
|
var slotStr = (String)dgvConfig.Rows[row].Cells[SlotString].Value;
|
||||||
int.TryParse((String)dgvConfig.Rows[row].Cells[SlotString].Value, out slot);
|
int.TryParse(slotStr, out var slot);
|
||||||
|
|
||||||
|
|
||||||
//dgvConfig.Rows[row].Cells[_streamingPortString].Value
|
|
||||||
//dgvConfig.Rows[row].Cells[_requestPortString].Value,
|
|
||||||
var irdaType = typeof(IrdaSerialPort).FullName;
|
var irdaType = typeof(IrdaSerialPort).FullName;
|
||||||
if (dgvConfig.Rows[row].Cells[RequestTypeString].Value != null)
|
if (dgvConfig.Rows[row].Cells[RequestTypeString].Value != null)
|
||||||
{
|
{
|
||||||
irdaType = (String)dgvConfig.Rows[row].Cells[RequestTypeString].Value;
|
irdaType = (String)dgvConfig.Rows[row].Cells[RequestTypeString].Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
var requestPort = new Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig.PortConfig()
|
var requestPort = new PortConfig()
|
||||||
{
|
{
|
||||||
PortName = (String)dgvConfig.Rows[row].Cells[RequestPortString].Value,
|
PortName = (String)dgvConfig.Rows[row].Cells[RequestPortString].Value,
|
||||||
Type = irdaType
|
Type = irdaType
|
||||||
};
|
};
|
||||||
|
|
||||||
var streamingPort = new Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig.PortConfig()
|
var streamingPort = new PortConfig()
|
||||||
{
|
{
|
||||||
PortName = (String)dgvConfig.Rows[row].Cells[StreamingPortString].Value,
|
PortName = (String)dgvConfig.Rows[row].Cells[StreamingPortString].Value,
|
||||||
Type = typeof(UartSerialPort).FullName
|
Type = typeof(UartSerialPort).FullName
|
||||||
};
|
};
|
||||||
|
|
||||||
SlotType slotType = SlotType.DutMeter;
|
var slotType = SlotType.DutMeter;
|
||||||
|
|
||||||
if (dgvConfig.Rows[row].Cells[SlotTypeString].Value != null)
|
if (dgvConfig.Rows[row].Cells[SlotTypeString].Value != null)
|
||||||
{
|
{
|
||||||
@@ -134,12 +128,18 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
newFileContent.Add(new SlotConfig() { Slot = slot, Request = requestPort, Streaming = streamingPort, Type = slotType });
|
if (!string.IsNullOrEmpty(slotStr))
|
||||||
|
{
|
||||||
|
newFileContent.Add(new SlotConfig()
|
||||||
|
{ Slot = slot, Request = requestPort, Streaming = streamingPort, Type = slotType });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var text = JsonConvert.SerializeObject(newFileContent);
|
var text = JsonConvert.SerializeObject(newFileContent);
|
||||||
|
// Overwrite only on changed content
|
||||||
if (text == _fileString)
|
if (text == _fileString)
|
||||||
{
|
{
|
||||||
|
LoadFromFile();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,11 +153,12 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
|
|
||||||
File.WriteAllText(_serialConfigFile, text);
|
File.WriteAllText(_serialConfigFile, text);
|
||||||
LoadFromFile();
|
LoadFromFile();
|
||||||
|
LoadOfflineFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadFromFile()
|
private void LoadFromFile()
|
||||||
{
|
{
|
||||||
_dataTable.Clear();
|
_slotConfigDataTable.Clear();
|
||||||
dgvConfig.Rows.Clear();
|
dgvConfig.Rows.Clear();
|
||||||
|
|
||||||
if (!File.Exists(_serialConfigFile))
|
if (!File.Exists(_serialConfigFile))
|
||||||
@@ -174,16 +175,16 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
|
|
||||||
foreach (var item in meterConfigList)
|
foreach (var item in meterConfigList)
|
||||||
{
|
{
|
||||||
var row = _dataTable.NewRow();
|
var row = _slotConfigDataTable.NewRow();
|
||||||
row[SlotString] = item.Slot;
|
row[SlotString] = item.Slot;
|
||||||
row[RequestPortString] = item.Request.PortName;
|
row[RequestPortString] = item.Request.PortName;
|
||||||
row[RequestTypeString] = item.Request.Type;
|
row[RequestTypeString] = item.Request.Type;
|
||||||
row[StreamingPortString] = item.Streaming.PortName;
|
row[StreamingPortString] = item.Streaming.PortName;
|
||||||
row[SlotTypeString] = item.Type == SlotType.TemperatureMeter;
|
row[SlotTypeString] = item.Type == SlotType.TemperatureMeter;
|
||||||
_dataTable.Rows.Add(row);
|
_slotConfigDataTable.Rows.Add(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (DataRow row in _dataTable.Rows)
|
foreach (DataRow row in _slotConfigDataTable.Rows)
|
||||||
{
|
{
|
||||||
dgvConfig.Rows.Add(AddRowToGrid(row));
|
dgvConfig.Rows.Add(AddRowToGrid(row));
|
||||||
}
|
}
|
||||||
@@ -239,26 +240,17 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
{
|
{
|
||||||
requestTypeCell.Value = row[RequestTypeString];
|
requestTypeCell.Value = row[RequestTypeString];
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
slotTypeCell.Value = row[SlotTypeString];// Enum.Parse(typeof(SlotType), row[_slotTypeString].ToString()).GetHashCode();
|
|
||||||
}
|
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
throw;
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
|
slotTypeCell.Value = row[SlotTypeString];// Enum.Parse(typeof(SlotType), row[_slotTypeString].ToString()).GetHashCode();
|
||||||
newRow.Cells.Add(slotTypeCell);
|
newRow.Cells.Add(slotTypeCell);
|
||||||
|
|
||||||
|
|
||||||
return newRow;
|
return newRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ReSharper disable once UnusedMember.Local
|
||||||
private DataTable GetSlotTypes()
|
private DataTable GetSlotTypes()
|
||||||
{
|
{
|
||||||
var ret = new DataTable();
|
var ret = new DataTable();
|
||||||
@@ -284,7 +276,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
ret.Rows.Add(item, item);
|
ret.Rows.Add(item, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (DataRow row in _dataTable.Rows)
|
foreach (DataRow row in _slotConfigDataTable.Rows)
|
||||||
{
|
{
|
||||||
if (portList.All(pl => pl != (String)row[StreamingPortString]))
|
if (portList.All(pl => pl != (String)row[StreamingPortString]))
|
||||||
{
|
{
|
||||||
@@ -306,14 +298,14 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
ret.Columns.Add(ValueString);
|
ret.Columns.Add(ValueString);
|
||||||
ret.Columns.Add(TextString);
|
ret.Columns.Add(TextString);
|
||||||
|
|
||||||
ret.Rows.Add(typeof(UartSerialPort).FullName, typeof(UartSerialPort).Name);
|
ret.Rows.Add(typeof(UartSerialPort).FullName, nameof(UartSerialPort));
|
||||||
ret.Rows.Add(typeof(RfidSerialPort).FullName, typeof(RfidSerialPort).Name);
|
ret.Rows.Add(typeof(RfidSerialPort).FullName, nameof(RfidSerialPort));
|
||||||
ret.Rows.Add(typeof(IrdaSerialPort).FullName, typeof(IrdaSerialPort).Name);
|
ret.Rows.Add(typeof(IrdaSerialPort).FullName, nameof(IrdaSerialPort));
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -330,8 +322,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
StoreToPc();
|
StoreToPc();
|
||||||
|
|
||||||
var slotString = (String)dgvConfig.Rows[e.RowIndex].Cells[SlotString].Value;
|
var slotString = (String)dgvConfig.Rows[e.RowIndex].Cells[SlotString].Value;
|
||||||
Int32 slot;
|
int.TryParse(slotString, out var slot);
|
||||||
int.TryParse(slotString, out slot);
|
|
||||||
|
|
||||||
using (var mb = new MeterBatch())
|
using (var mb = new MeterBatch())
|
||||||
{
|
{
|
||||||
@@ -391,170 +382,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//private void btnAutoDetect_Click(object sender, EventArgs e)
|
|
||||||
//{
|
|
||||||
// var allPorts = SerialPort.GetPortNames();
|
|
||||||
// if (allPorts.Length < 2)
|
|
||||||
// {
|
|
||||||
// throw new ApplicationException("Comports NOT found");
|
|
||||||
// }
|
|
||||||
// allPorts = new string[] { "COM107", "COM108", "COM109" };
|
|
||||||
// int hitCount = 0;
|
|
||||||
// PortConfig? hitRequestPort = null;
|
|
||||||
// foreach (var PortName in allPorts)
|
|
||||||
// {
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// var altPort = hitCount + 1;
|
|
||||||
// if (altPort >= allPorts.Length)
|
|
||||||
// {
|
|
||||||
// altPort = 0;
|
|
||||||
// }
|
|
||||||
// var tmpPortRequest = new PortConfig() { PortName = allPorts[hitCount], BaudRate = 9600,
|
|
||||||
// Type = "Xylem.Common.Hardware.Interfaces.Ports.SerialPorts.RfidSerialPort" };
|
|
||||||
// var tmpPortStreaming = new PortConfig() { PortName = allPorts[altPort], BaudRate = 115200,
|
|
||||||
// Type = "Xylem.Common.Hardware.Interfaces.Ports.SerialPorts.UartSerialPort" };
|
|
||||||
|
|
||||||
// var tmpMeter = new GenesisMeter(0, tmpPortRequest, null, false);
|
|
||||||
// var mb = new MeterBatch();
|
|
||||||
// mb.AddMeter(tmpMeter);
|
|
||||||
// if (tmpMeter.Login())
|
|
||||||
// {
|
|
||||||
// //hit
|
|
||||||
// Byte[] flowTestAndCalibData = {0x00, 0x00, 0x00, (Byte)LedMode.FlowTestAndCalibData};
|
|
||||||
// tmpMeter.WriteRegisterSafe(Register.Genesisflow.LedMode, (Byte)LedMode.FlowTestAndCalibData, checkRegister: true);
|
|
||||||
// hitRequestPort = tmpPortRequest;
|
|
||||||
// MessageBox.Show($"Found request port {tmpPortRequest.SerialPort.PortName}");
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// mb.RemoveAllMeters();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// catch (Exception exception)
|
|
||||||
// {
|
|
||||||
// Console.WriteLine(exception);
|
|
||||||
// }
|
|
||||||
// hitCount = hitCount + 1;
|
|
||||||
// }
|
|
||||||
// var hitStreamingPort = "";
|
|
||||||
// if (hitRequestPort != null)
|
|
||||||
// {
|
|
||||||
// foreach (var streaming in allPorts)
|
|
||||||
// {
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// if (hitRequestPort.Value.PortName != streaming)
|
|
||||||
// {
|
|
||||||
// var tmpSerialPort = new SerialPort(streaming, 115200);
|
|
||||||
// tmpSerialPort.Open();
|
|
||||||
// var result = tmpSerialPort.ReadLine();
|
|
||||||
// if (result.Contains("@"))
|
|
||||||
// {
|
|
||||||
// hitStreamingPort = streaming;
|
|
||||||
// MessageBox.Show($"Found streaming port {hitStreamingPort}");
|
|
||||||
// tmpSerialPort.Close();
|
|
||||||
// //var tmpPortStreaming = new PortConfig() { SerialPort = tmpSerialPort, SerialPortType = typeof(SerialPort) };
|
|
||||||
|
|
||||||
// //var tmpMeter = new GenesisMeter(0, null, tmpPortStreaming, false);
|
|
||||||
// //var mb = new MeterBatch();
|
|
||||||
// //mb.AddMeter(tmpMeter);
|
|
||||||
// //tmpMeter.
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// catch (Exception exception)
|
|
||||||
// {
|
|
||||||
// Console.WriteLine(exception);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (hitRequestPort == null)
|
|
||||||
// {
|
|
||||||
// MessageBox.Show($"Request port NOT found");
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (String.IsNullOrEmpty(hitStreamingPort))
|
|
||||||
// {
|
|
||||||
// MessageBox.Show($"Streaming port NOT found");
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
private void BtnCheckAll_Click(Object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
StoreToPc();
|
|
||||||
using (var meterBatch = new MeterBatch())
|
|
||||||
{
|
|
||||||
for (var row = 0; row < dgvConfig.Rows.Count; row++)
|
|
||||||
{
|
|
||||||
var slotString = (String)dgvConfig.Rows[row].Cells[SlotString].Value;
|
|
||||||
|
|
||||||
Int32 slot;
|
|
||||||
int.TryParse(slotString, out slot);
|
|
||||||
var meter = new GenesisMeter();
|
|
||||||
meter.SetupFromConfigFile(slot, false);
|
|
||||||
meterBatch.AddMeter(meter);
|
|
||||||
}
|
|
||||||
var taskResultList = new List<Task<Tuple<Int32, Boolean, Int32>>>();
|
|
||||||
|
|
||||||
foreach (var meter in meterBatch.ListOfMeters)
|
|
||||||
{
|
|
||||||
if (!(meter is GenesisMeter))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
taskResultList.Add(new Task<Tuple<Int32, Boolean, Int32>>(() =>
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var genMeter = ((GenesisMeter)meter);
|
|
||||||
genMeter.Login();
|
|
||||||
var id = genMeter.GetPcbId();
|
|
||||||
if (string.IsNullOrEmpty(id))
|
|
||||||
{
|
|
||||||
id = genMeter.GetPcbId();
|
|
||||||
if (string.IsNullOrEmpty(id))
|
|
||||||
{
|
|
||||||
return new Tuple<Int32, Boolean, Int32>(genMeter.Slot, false, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
genMeter.InitMeasurement();
|
|
||||||
genMeter.SyncStreamingBuffer(SyncMarkRecord.DecodeEveryPackage);
|
|
||||||
_countRawData = new ConcurrentBag<String>();
|
|
||||||
genMeter.StreamingPort.OnRawRecordReceived += delegate (Object o, BasePortDataEventArgs rawMsg)
|
|
||||||
{
|
|
||||||
_countRawData.Add((String)rawMsg.GetData());
|
|
||||||
};
|
|
||||||
Thread.Sleep(500);
|
|
||||||
|
|
||||||
|
|
||||||
return _countRawData.Count <= 10 ? new Tuple<Int32, Boolean, Int32>(genMeter.Slot, true, 0)
|
|
||||||
: new Tuple<Int32, Boolean, Int32>(genMeter.Slot, true, _countRawData.Count);
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
return new Tuple<Int32, Boolean, Int32>(-1, false, 0);
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
taskResultList.ForEach(t => t.Start());
|
|
||||||
Task.WaitAll(taskResultList.ToArray(), 50000);
|
|
||||||
|
|
||||||
var sb = new StringBuilder();
|
|
||||||
foreach (var result in taskResultList)
|
|
||||||
{
|
|
||||||
var r = result.Result;
|
|
||||||
sb.AppendLine($"Slot{r.Item1} | Request={r.Item2} | Streaming={r.Item3}");
|
|
||||||
}
|
|
||||||
|
|
||||||
MessageBox.Show(sb.ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void dgvConfig_DataError(Object sender, DataGridViewDataErrorEventArgs e)
|
private void dgvConfig_DataError(Object sender, DataGridViewDataErrorEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -589,13 +417,13 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
StoreToPc();
|
StoreToPc();
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<OfflinePaswordItem> listOfOfflinePassowrds = new List<OfflinePaswordItem>();
|
private List<OfflinePaswordItem> _listOfOfflinePasswords = new List<OfflinePaswordItem>();
|
||||||
|
|
||||||
|
|
||||||
private void FrmSetup_Load(Object sender, EventArgs e)
|
private void FrmSetup_Load(Object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
LoadOfflineFile();
|
LoadOfflineFile();
|
||||||
this.cbxProductionMode.CheckedChanged += new System.EventHandler(this.cbxProductionMode_CheckedChanged);
|
cbxProductionMode.CheckedChanged += cbxProductionMode_CheckedChanged;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -605,93 +433,68 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
File.WriteAllText(ProgramConfig.OfflineInfoFile, JsonConvert.SerializeObject(listOfOfflinePassowrds));
|
// remove empty cells
|
||||||
|
var listToRemove = _listOfOfflinePasswords.Where(offlinePwd => string.IsNullOrEmpty(offlinePwd.PcbID)).ToList();
|
||||||
|
foreach (var itemToRemove in listToRemove)
|
||||||
|
{
|
||||||
|
_listOfOfflinePasswords.Remove(itemToRemove);
|
||||||
|
}
|
||||||
|
File.WriteAllText(ProgramConfig.OfflineInfoFile, JsonConvert.SerializeObject(_listOfOfflinePasswords));
|
||||||
dgvofflinePw.CellValidated -= dgvofflinePw_CellValidated;
|
dgvofflinePw.CellValidated -= dgvofflinePw_CellValidated;
|
||||||
dgvofflinePw.DataSource = null;
|
dgvofflinePw.DataSource = null;
|
||||||
dgvofflinePw.DataSource = listOfOfflinePassowrds;
|
dgvofflinePw.DataSource = _listOfOfflinePasswords;
|
||||||
dgvofflinePw.CellValidated += dgvofflinePw_CellValidated;
|
dgvofflinePw.CellValidated += dgvofflinePw_CellValidated;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
// ignored
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadOfflineFile()
|
private void LoadOfflineFile()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
listOfOfflinePassowrds = JsonConvert.DeserializeObject<List<OfflinePaswordItem>>(File.ReadAllText(ProgramConfig.OfflineInfoFile));
|
_listOfOfflinePasswords = JsonConvert.DeserializeObject<List<OfflinePaswordItem>>(File.ReadAllText(ProgramConfig.OfflineInfoFile));
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
listOfOfflinePassowrds = new List<OfflinePaswordItem>();
|
_listOfOfflinePasswords = new List<OfflinePaswordItem>();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
||||||
dgvofflinePw.CellValidated -= dgvofflinePw_CellValidated;
|
dgvofflinePw.CellValidated -= dgvofflinePw_CellValidated;
|
||||||
dgvofflinePw.DataSource = null;
|
dgvofflinePw.DataSource = null;
|
||||||
dgvofflinePw.DataSource = listOfOfflinePassowrds;
|
dgvofflinePw.DataSource = _listOfOfflinePasswords;
|
||||||
dgvofflinePw.CellValidated += dgvofflinePw_CellValidated;
|
dgvofflinePw.CellValidated += dgvofflinePw_CellValidated;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dgvofflinePw_RowsAdded(Object sender, DataGridViewRowsAddedEventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void dgvofflinePw_RowsRemoved(Object sender, DataGridViewRowsRemovedEventArgs e)
|
|
||||||
{
|
|
||||||
StoreOfflineFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void dgvofflinePw_CellValidated(Object sender, DataGridViewCellEventArgs e)
|
private void dgvofflinePw_CellValidated(Object sender, DataGridViewCellEventArgs e)
|
||||||
{
|
{
|
||||||
StoreOfflineFile();
|
StoreOfflineFile();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cmdAddOffline_Click(Object sender, EventArgs e)
|
private void cmdAddOffline_Click(Object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
_listOfOfflinePasswords.Add(new OfflinePaswordItem("", ""));
|
||||||
|
|
||||||
listOfOfflinePassowrds.Add(new OfflinePaswordItem("", ""));
|
|
||||||
|
|
||||||
|
|
||||||
dgvofflinePw.DataSource = null;
|
dgvofflinePw.DataSource = null;
|
||||||
dgvofflinePw.DataSource = listOfOfflinePassowrds;
|
dgvofflinePw.DataSource = _listOfOfflinePasswords;
|
||||||
|
|
||||||
StoreOfflineFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void dgvofflinePw_KeyUp(Object sender, KeyEventArgs e)
|
|
||||||
{
|
|
||||||
if (e.KeyCode == Keys.Delete)
|
|
||||||
{
|
|
||||||
if (dgvofflinePw.SelectedRows.Count == 1)
|
|
||||||
{
|
|
||||||
listOfOfflinePassowrds.RemoveAt(dgvofflinePw.SelectedRows[0].Index);
|
|
||||||
StoreOfflineFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cbxProductionMode_CheckedChanged(Object sender, EventArgs e)
|
private void cbxProductionMode_CheckedChanged(Object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (cbxProductionMode.Checked)
|
if (cbxProductionMode.Checked)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Production mode!Configraution.json muss zwingend dem Aktuellen Release entsprechen! ");
|
MessageBox.Show(@"Production mode!Configraution.json muss zwingend dem Aktuellen Release entsprechen! ");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show("Developer mode!Configraution.json muss nicht zwingend auf aktuellen Release entsprechen. Es wird die letzte gültige Configraution.json anwendet.Dies führt dazu dass Grenzwerte nicht sauber überprüft werden und ggf. Register nicht sichtbar sind die der Zähler unterstützt. ");
|
MessageBox.Show(@"Developer mode!Configraution.json muss nicht zwingend auf aktuellen Release entsprechen. Es wird die letzte gültige Configraution.json anwendet.Dies führt dazu dass Grenzwerte nicht sauber überprüft werden und ggf. Register nicht sichtbar sind die der Zähler unterstützt. ");
|
||||||
}
|
}
|
||||||
|
|
||||||
_configuration.ProductionMode = cbxProductionMode.Checked;
|
_configuration.ProductionMode = cbxProductionMode.Checked;
|
||||||
@@ -700,17 +503,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dgvofflinePw_RowsAdded_1(Object sender, DataGridViewRowsAddedEventArgs e)
|
private void tabPage4_Click(Object sender, EventArgs e)
|
||||||
{
|
|
||||||
// StoreOfflineFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void dgvofflinePw_RowsRemoved_1(Object sender, DataGridViewRowsRemovedEventArgs e)
|
|
||||||
{
|
|
||||||
// StoreOfflineFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void tabPage4_Click(object sender, EventArgs e)
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -720,7 +513,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
lblLocalCurrentPath.Text = ex.Message.ToString();
|
lblLocalCurrentPath.Text = ex.Message;
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -730,14 +523,14 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
lblGlobalCurrentPath.Text = ex.Message.ToString();
|
lblGlobalCurrentPath.Text = ex.Message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void add(string path, string newDest)
|
private static void Add(String path, String newDest)
|
||||||
{
|
{
|
||||||
var a = XElement.Load(path);
|
var a = XElement.Load(path);
|
||||||
if (!a.Elements().First(b => b.Name.LocalName == "variable").Attributes().Any(s => s.Value == "BasePath"))
|
if (a.Elements().First(b => b.Name.LocalName == "variable").Attributes().All(s => s.Value != "BasePath"))
|
||||||
{
|
{
|
||||||
var newElm = new XElement("variable", null);
|
var newElm = new XElement("variable", null);
|
||||||
newElm.SetAttributeValue("name", "BasePath");
|
newElm.SetAttributeValue("name", "BasePath");
|
||||||
@@ -754,48 +547,48 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
|||||||
a.Save(path);
|
a.Save(path);
|
||||||
|
|
||||||
}
|
}
|
||||||
private void btnLocalDefaultLocal_Click(object sender, EventArgs e)
|
private void btnLocalDefaultLocal_Click(Object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
add(NLogHelper.GetCurrentApplicationFolder(), $"C:\\GenesisLog\\");
|
Add(NLogHelper.GetCurrentApplicationFolder(), "C:\\GenesisLog\\");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnLocalDefaultLan_Click(object sender, EventArgs e)
|
private void btnLocalDefaultLan_Click(Object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
add(NLogHelper.GetCurrentApplicationFolder(), $"\\\\sla12buma\\cordonelds$\\${{machinename}}");
|
Add(NLogHelper.GetCurrentApplicationFolder(), "\\\\sla12buma\\cordonelds$\\${machinename}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnGlobalDefaultLocal_Click(object sender, EventArgs e)
|
private void btnGlobalDefaultLocal_Click(Object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
add(NLogHelper.GetApplicationDataPath(), $"C:\\GenesisLog\\");
|
Add(NLogHelper.GetApplicationDataPath(), "C:\\GenesisLog\\");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnGlobalDefaultLan_Click(object sender, EventArgs e)
|
private void btnGlobalDefaultLan_Click(Object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
add(NLogHelper.GetApplicationDataPath(), $"\\\\sla12buma\\cordonelds$\\${{machinename}}");
|
Add(NLogHelper.GetApplicationDataPath(), "\\\\sla12buma\\cordonelds$\\${{machinename}}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnGlobalSearch_Click(object sender, EventArgs e)
|
private void btnGlobalSearch_Click(Object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var dia = new FolderBrowserDialog();
|
var dia = new FolderBrowserDialog();
|
||||||
|
|
||||||
var diaRes = dia.ShowDialog();
|
dia.ShowDialog();
|
||||||
|
|
||||||
|
Add(NLogHelper.GetApplicationDataPath(), dia.SelectedPath);
|
||||||
|
|
||||||
add(NLogHelper.GetApplicationDataPath(), dia.SelectedPath);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnLocalSearch_Click(object sender, EventArgs e)
|
private void btnLocalSearch_Click(Object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var dia = new FolderBrowserDialog();
|
var dia = new FolderBrowserDialog();
|
||||||
|
|
||||||
var diaRes = dia.ShowDialog();
|
dia.ShowDialog();
|
||||||
|
|
||||||
add(NLogHelper.GetCurrentApplicationFolder(), dia.SelectedPath);
|
Add(NLogHelper.GetCurrentApplicationFolder(), dia.SelectedPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnAddRow_Click(object sender, EventArgs e)
|
private void btnAddRow_Click(Object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
dgvConfig.Rows.Add(AddRowToGrid());
|
dgvConfig.Rows.Add(AddRowToGrid());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,30 +138,6 @@
|
|||||||
<metadata name="btcDetectStreaming.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="btcDetectStreaming.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="tbcSlot.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="cbcRequestPort.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="cbcRequestType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="cbcStreamingPort.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="cbcSlotType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="btcDetectRequest.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="btcDetectStreaming.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="offlinePaswordItemBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>17, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="offlinePaswordItemBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="offlinePaswordItemBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|||||||
Reference in New Issue
Block a user