基线 SVN r240

SVN-Revision: r240
This commit is contained in:
cyf
2025-02-06 06:46:06 +00:00
commit ab56a9bcf7
5317 changed files with 902274 additions and 0 deletions
@@ -0,0 +1,49 @@
namespace RFIDManagement
{
partial class FrmBrower
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// FrmBrower
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(879, 569);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "FrmBrower";
this.Text = "FrmBrower";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.ResumeLayout(false);
}
#endregion
}
}
@@ -0,0 +1,48 @@
using Lskj.Control;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace RFIDManagement
{
public partial class FrmBrower : Form
{
public int OutTime = 10;
public FrmWebBrowser WebBrowser;
public SynchronizationContext SyncContext;
public FrmBrower()
{
InitializeComponent();
SyncContext = SynchronizationContext.Current;
WebBrowser = new FrmWebBrowser();
WebBrowser.Dock = DockStyle.Fill;
this.Controls.Add(WebBrowser);
this.Load += OnFrmBrowerLoad;
}
private void OnFrmBrowerLoad(object sender, EventArgs e)
{
Task task = new Task(async () =>
{
await Task.Delay(OutTime);
SyncContext.Post(CloseWindow, null);
});
task.Start();
}
public void LoadUrl(string url)
{
WebBrowser.FrmLoad(url);
}
public void CloseWindow(object state)
{
this.Close();
this.Dispose();
}
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,276 @@
namespace RFIDManagement
{
partial class FrmDataWrite
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
DevExpress.XtraGrid.GridLevelNode gridLevelNode1 = new DevExpress.XtraGrid.GridLevelNode();
this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
this.com_Ant = new DevExpress.XtraEditors.ComboBoxEdit();
this.label7 = new System.Windows.Forms.Label();
this.writeBtn = new System.Windows.Forms.Button();
this.label5 = new System.Windows.Forms.Label();
this.txt_Power = new DevExpress.XtraEditors.TextEdit();
this.label4 = new System.Windows.Forms.Label();
this.txt_Password = new DevExpress.XtraEditors.TextEdit();
this.label3 = new System.Windows.Forms.Label();
this.txt_Data = new DevExpress.XtraEditors.TextEdit();
this.label2 = new System.Windows.Forms.Label();
this.gcMain = new DevExpress.XtraGrid.GridControl();
this.gridView = new DevExpress.XtraGrid.Views.Grid.GridView();
this.EpcColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.ResultColumn = new DevExpress.XtraGrid.Columns.GridColumn();
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
this.panelControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.com_Ant.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_Power.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_Password.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_Data.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gcMain)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridView)).BeginInit();
this.SuspendLayout();
//
// panelControl1
//
this.panelControl1.Controls.Add(this.com_Ant);
this.panelControl1.Controls.Add(this.label7);
this.panelControl1.Controls.Add(this.writeBtn);
this.panelControl1.Controls.Add(this.label5);
this.panelControl1.Controls.Add(this.txt_Power);
this.panelControl1.Controls.Add(this.label4);
this.panelControl1.Controls.Add(this.txt_Password);
this.panelControl1.Controls.Add(this.label3);
this.panelControl1.Controls.Add(this.txt_Data);
this.panelControl1.Controls.Add(this.label2);
this.panelControl1.Dock = System.Windows.Forms.DockStyle.Top;
this.panelControl1.Location = new System.Drawing.Point(0, 0);
this.panelControl1.Name = "panelControl1";
this.panelControl1.Size = new System.Drawing.Size(497, 118);
this.panelControl1.TabIndex = 12;
//
// com_Ant
//
this.com_Ant.Location = new System.Drawing.Point(73, 7);
this.com_Ant.Name = "com_Ant";
this.com_Ant.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.com_Ant.Properties.DropDownRows = 8;
this.com_Ant.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
this.com_Ant.Size = new System.Drawing.Size(327, 20);
this.com_Ant.TabIndex = 16;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(5, 10);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(67, 14);
this.label7.TabIndex = 14;
this.label7.Text = "写入天线:";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// writeBtn
//
this.writeBtn.Location = new System.Drawing.Point(435, 84);
this.writeBtn.Name = "writeBtn";
this.writeBtn.Size = new System.Drawing.Size(57, 23);
this.writeBtn.TabIndex = 13;
this.writeBtn.Text = "写入";
this.writeBtn.UseVisualStyleBackColor = true;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(406, 39);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(23, 14);
this.label5.TabIndex = 8;
this.label5.Text = "dbi";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// txt_Power
//
this.txt_Power.EditValue = "15";
this.txt_Power.Location = new System.Drawing.Point(73, 33);
this.txt_Power.Name = "txt_Power";
this.txt_Power.Size = new System.Drawing.Size(327, 20);
this.txt_Power.TabIndex = 7;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(5, 36);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(67, 14);
this.label4.TabIndex = 6;
this.label4.Text = "写入功率:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// txt_Password
//
this.txt_Password.EditValue = "00000000";
this.txt_Password.Location = new System.Drawing.Point(73, 59);
this.txt_Password.Name = "txt_Password";
this.txt_Password.Size = new System.Drawing.Size(327, 20);
this.txt_Password.TabIndex = 5;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(5, 62);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(67, 14);
this.label3.TabIndex = 4;
this.label3.Text = "写入密码:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// txt_Data
//
this.txt_Data.Location = new System.Drawing.Point(73, 85);
this.txt_Data.Name = "txt_Data";
this.txt_Data.Size = new System.Drawing.Size(356, 20);
this.txt_Data.TabIndex = 3;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(5, 88);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(67, 14);
this.label2.TabIndex = 0;
this.label2.Text = "写入数据:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// gcMain
//
this.gcMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.gcMain.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(4);
gridLevelNode1.RelationName = "Level1";
this.gcMain.LevelTree.Nodes.AddRange(new DevExpress.XtraGrid.GridLevelNode[] {
gridLevelNode1});
this.gcMain.Location = new System.Drawing.Point(0, 118);
this.gcMain.MainView = this.gridView;
this.gcMain.Margin = new System.Windows.Forms.Padding(4);
this.gcMain.Name = "gcMain";
this.gcMain.Size = new System.Drawing.Size(497, 157);
this.gcMain.TabIndex = 13;
this.gcMain.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView});
//
// gridView
//
this.gridView.Appearance.HeaderPanel.Font = new System.Drawing.Font("宋体", 9F);
this.gridView.Appearance.HeaderPanel.Options.UseFont = true;
this.gridView.Appearance.HeaderPanel.Options.UseTextOptions = true;
this.gridView.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.gridView.Appearance.HeaderPanel.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap;
this.gridView.Appearance.Preview.Font = new System.Drawing.Font("宋体", 9F);
this.gridView.Appearance.Preview.Options.UseFont = true;
this.gridView.Appearance.Row.Font = new System.Drawing.Font("宋体", 9F);
this.gridView.Appearance.Row.Options.UseBackColor = true;
this.gridView.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Flat;
this.gridView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.EpcColumn,
this.ResultColumn});
this.gridView.GridControl = this.gcMain;
this.gridView.IndicatorWidth = 40;
this.gridView.Name = "gridView";
this.gridView.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.True;
this.gridView.OptionsClipboard.CopyColumnHeaders = DevExpress.Utils.DefaultBoolean.False;
this.gridView.OptionsFilter.ShowAllTableValuesInCheckedFilterPopup = false;
this.gridView.OptionsFilter.ShowAllTableValuesInFilterPopup = true;
this.gridView.OptionsFind.FindNullPrompt = "";
this.gridView.OptionsSelection.MultiSelect = true;
this.gridView.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CellSelect;
this.gridView.OptionsView.AllowHtmlDrawHeaders = true;
this.gridView.OptionsView.ColumnAutoWidth = false;
this.gridView.OptionsView.ColumnHeaderAutoHeight = DevExpress.Utils.DefaultBoolean.True;
this.gridView.OptionsView.RowAutoHeight = true;
this.gridView.OptionsView.ShowGroupPanel = false;
this.gridView.PaintStyleName = "Skin";
//
// EpcColumn
//
this.EpcColumn.Caption = "EPC数据";
this.EpcColumn.FieldName = "EpcColumn";
this.EpcColumn.Name = "EpcColumn";
this.EpcColumn.Visible = true;
this.EpcColumn.VisibleIndex = 0;
this.EpcColumn.Width = 150;
//
// ResultColumn
//
this.ResultColumn.Caption = "操作结果";
this.ResultColumn.FieldName = "ResultColumn";
this.ResultColumn.Name = "ResultColumn";
this.ResultColumn.Visible = true;
this.ResultColumn.VisibleIndex = 1;
this.ResultColumn.Width = 300;
//
// FrmDataWrite
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(497, 275);
this.Controls.Add(this.gcMain);
this.Controls.Add(this.panelControl1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "FrmDataWrite";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "标签数据写入";
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
this.panelControl1.ResumeLayout(false);
this.panelControl1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.com_Ant.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_Power.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_Password.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_Data.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gcMain)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridView)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraEditors.PanelControl panelControl1;
private DevExpress.XtraEditors.TextEdit txt_Power;
private System.Windows.Forms.Label label4;
private DevExpress.XtraEditors.TextEdit txt_Password;
private System.Windows.Forms.Label label3;
private DevExpress.XtraEditors.TextEdit txt_Data;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label5;
public DevExpress.XtraGrid.GridControl gcMain;
private DevExpress.XtraGrid.Views.Grid.GridView gridView;
private DevExpress.XtraGrid.Columns.GridColumn EpcColumn;
private DevExpress.XtraGrid.Columns.GridColumn ResultColumn;
private System.Windows.Forms.Button writeBtn;
private System.Windows.Forms.Label label7;
private DevExpress.XtraEditors.ComboBoxEdit com_Ant;
}
}
@@ -0,0 +1,241 @@
using Lskj.Control;
using ReaderApi;
using ReaderApi.Data;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace RFIDManagement
{
public partial class FrmDataWrite : Form
{
public FrmDataWrite()
{
InitializeComponent();
this.Load += OnFrmDataWriteLoad;
}
/// <summary>
/// 上下文
/// </summary>
public SynchronizationContext SyncContext = null;
/// <summary>
/// 数据源
/// </summary>
public DataTable SourceTable = new DataTable();
/// <summary>
/// 当前的标签
/// </summary>
public Reader SelectReader;
/// <summary>
/// 信息
/// </summary>
public List<Tag> ReadTag = new List<Tag>();
/// <summary>
/// 信息
/// </summary>
public List<Tag> WriteResult = new List<Tag>();
/// <summary>
/// 更新数据Timer
/// </summary>
public System.Windows.Forms.Timer UpdateViewTimer;
private void OnFrmDataWriteLoad(object sender, EventArgs e)
{
UpdateViewTimer = new System.Windows.Forms.Timer();
UpdateViewTimer.Interval = 200;
UpdateViewTimer.Tick += OnUpdateViewTimerTick;
UpdateViewTimer.Enabled = true;
for (int index = 1; index <= 32; index++)
{
com_Ant.Properties.Items.Add("Ant" + index.ToString());
}
string comAnt = IniHelper.Read("ComAnt");
string txtPower = IniHelper.Read("TxtPower");
string txtPassword = IniHelper.Read("TxtPassword");
int selectIndex = com_Ant.Properties.Items.IndexOf(comAnt);
com_Ant.SelectedIndex = 0;
if (selectIndex > 0)
{
com_Ant.SelectedIndex = selectIndex;
}
if (!string.IsNullOrEmpty(txtPower))
{
txt_Power.Text = txtPower;
}
if (!string.IsNullOrEmpty(txtPassword))
{
txt_Password.Text = txtPassword;
}
SyncContext = SynchronizationContext.Current;
this.writeBtn.Click += OnWriteBtnClick;
InitSourceTable();
MatchEpcPara para = new MatchEpcPara();
para.isSelect = false;
var result = SelectReader?.SendSyn(para);
}
/// <summary>
/// 创建数据源
/// </summary>
private void InitSourceTable()
{
SourceTable = new DataTable();
SourceTable.Columns.Add("EpcColumn");
SourceTable.Columns.Add("DataColumn");
SourceTable.Columns.Add("ResultColumn");
this.gcMain.DataSource = SourceTable;
}
/// <summary>
/// 写入按钮点击
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnWriteBtnClick(object sender, EventArgs e)
{
try
{
if (txt_Data.Text.Length == 0)
{
MessageUtil.Show("写入数据不能为空");
return;
}
if (txt_Data.Text.Length % 4 != 0)
{
MessageUtil.Show("写入数据必须为4的倍数");
return;
}
WriteResult.Clear();
SourceTable.Rows.Clear();
CustomRWPara para = new CustomRWPara();
para.operate = 0x01;
para.writeMode = 0x80;//改写pc值
para.ant = byte.Parse(System.Text.RegularExpressions.Regex.Replace(com_Ant.Text, @"[^0-9]+", ""));
para.power = byte.Parse(txt_Power.Text);
para.passWord = txt_Password.Text;
GlobalPara.tagDisplayArea = TagDisplayArea.writeTag;
para.startAdd = 0x01;
para.area = Area.EPC;
para.data = txt_Data.Text;
var result = SelectReader?.SendSyn(para);
if (result != null)
{
SaveInfo();
}
}
catch
{
}
}
/// <summary>
/// 添加数据
/// </summary>
/// <param name="tag"></param>
public void AddTag(Tag tag)
{
if (GlobalPara.tagDisplayArea == TagDisplayArea.writeTag)
{
if (tag.cmd == CmdType.cmd_tag)
{
GlobalMethod.AddTag(tag, WriteResult);
}
else
{
WriteResult.Add(tag);
}
WriteDataAddOne(tag);
}
}
/// <summary>
/// 进制数据
/// </summary>
/// <param name="state"></param>
public void WriteDataAddOne(object state)
{
if ((state as Tag).isSuccess.Contains("成功") || (state as Tag).isSuccess.Contains("success"))
{
//if (radioHexaDecimal.Checked)
//{
// txt_Data.Text = GlobalMethod.AddOneStep(16, txt_Data.Text, 1, 0);
//}
//else if (radioDecimal.Checked)
//{
// txt_Data.Text = GlobalMethod.AddOneStep(10, txt_Data.Text, 1, 0);
//}
}
}
/// <summary>
/// 更新数据
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnUpdateViewTimerTick(object sender, EventArgs e)
{
ShowWriteResult();
}
/// <summary>
/// 保存信息
/// </summary>
private void SaveInfo()
{
IniHelper.Write("ComAnt", com_Ant.Text);
IniHelper.Write("TxtPower", txt_Power.Text);
IniHelper.Write("TxtPassword", txt_Password.Text);
}
/// <summary>
/// 更新数据
/// </summary>
private void ShowWriteResult()
{
try
{
lock (WriteResult)
{
foreach (var tag in WriteResult)
{
var newTag = true;
for (int index = 0; index < SourceTable.Rows.Count; index++)
{
if (tag.epc != null)
{
if (tag.customData != null)
{
if ((SourceTable.Rows[index]["EpcColumn"] + "").Equals(tag.epc) && (SourceTable.Rows[index]["DataColumn"] + "").Equals(tag.customData))
{
newTag = false;
break;
}
}
else
{
if ((SourceTable.Rows[index]["EpcColumn"] + "").Equals(tag.epc))
{
newTag = false;
break;
}
}
}
}
if (newTag)
{
DataRow newRow = SourceTable.NewRow();
newRow["EpcColumn"] = tag.epc;
newRow["DataColumn"] = tag.customData;
newRow["ResultColumn"] = tag.isSuccess;
SourceTable.Rows.Add(newRow);
}
}
}
}
catch (Exception ex)
{
MessageUtil.Show(ex.Message);
}
}
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,437 @@
namespace RFIDManagement
{
partial class FrmMain
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
DevExpress.XtraGrid.GridLevelNode gridLevelNode1 = new DevExpress.XtraGrid.GridLevelNode();
this.pl_Top = new DevExpress.XtraEditors.PanelControl();
this.pl_ToolStrip = new DevExpress.XtraEditors.PanelControl();
this.toolStrip = new System.Windows.Forms.ToolStrip();
this.startLinkBtn = new System.Windows.Forms.ToolStripButton();
this.stopLinkBtn = new System.Windows.Forms.ToolStripButton();
this.startReadBtn = new System.Windows.Forms.ToolStripButton();
this.stopReadBtn = new System.Windows.Forms.ToolStripButton();
this.writeBtn = new System.Windows.Forms.ToolStripButton();
this.pl_LinkTips = new DevExpress.XtraEditors.PanelControl();
this.lb_LinkTips = new System.Windows.Forms.Label();
this.lb_LinkPms = new DevExpress.XtraEditors.PanelControl();
this.com_LinkPms = new DevExpress.XtraEditors.ComboBoxEdit();
this.label1 = new System.Windows.Forms.Label();
this.com_LinkType = new DevExpress.XtraEditors.ComboBoxEdit();
this.lb_LinkType = new System.Windows.Forms.Label();
this.pl_Bottom = new DevExpress.XtraEditors.PanelControl();
this.gcMain = new DevExpress.XtraGrid.GridControl();
this.gridView = new DevExpress.XtraGrid.Views.Grid.GridView();
this.EpcColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.PCColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.AntColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.RSSIColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.CountColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.FrequencyColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.refushBtn = new System.Windows.Forms.ToolStripButton();
((System.ComponentModel.ISupportInitialize)(this.pl_Top)).BeginInit();
this.pl_Top.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_ToolStrip)).BeginInit();
this.pl_ToolStrip.SuspendLayout();
this.toolStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_LinkTips)).BeginInit();
this.pl_LinkTips.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.lb_LinkPms)).BeginInit();
this.lb_LinkPms.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.com_LinkPms.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.com_LinkType.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pl_Bottom)).BeginInit();
this.pl_Bottom.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gcMain)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridView)).BeginInit();
this.SuspendLayout();
//
// pl_Top
//
this.pl_Top.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_Top.Controls.Add(this.pl_ToolStrip);
this.pl_Top.Controls.Add(this.pl_LinkTips);
this.pl_Top.Controls.Add(this.lb_LinkPms);
this.pl_Top.Dock = System.Windows.Forms.DockStyle.Top;
this.pl_Top.Location = new System.Drawing.Point(0, 0);
this.pl_Top.Name = "pl_Top";
this.pl_Top.Size = new System.Drawing.Size(1011, 59);
this.pl_Top.TabIndex = 9;
//
// pl_ToolStrip
//
this.pl_ToolStrip.Controls.Add(this.toolStrip);
this.pl_ToolStrip.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_ToolStrip.Location = new System.Drawing.Point(361, 0);
this.pl_ToolStrip.Name = "pl_ToolStrip";
this.pl_ToolStrip.Size = new System.Drawing.Size(650, 59);
this.pl_ToolStrip.TabIndex = 14;
//
// toolStrip
//
this.toolStrip.BackColor = System.Drawing.Color.Transparent;
this.toolStrip.Dock = System.Windows.Forms.DockStyle.Fill;
this.toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip.ImageScalingSize = new System.Drawing.Size(32, 32);
this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.startLinkBtn,
this.stopLinkBtn,
this.startReadBtn,
this.stopReadBtn,
this.writeBtn,
this.refushBtn});
this.toolStrip.Location = new System.Drawing.Point(2, 2);
this.toolStrip.Name = "toolStrip";
this.toolStrip.ShowItemToolTips = false;
this.toolStrip.Size = new System.Drawing.Size(646, 55);
this.toolStrip.TabIndex = 0;
this.toolStrip.Text = "toolStrip1";
//
// startLinkBtn
//
this.startLinkBtn.Image = global::RFIDManagement.Properties.Resources.LinkStart;
this.startLinkBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
this.startLinkBtn.Name = "startLinkBtn";
this.startLinkBtn.Size = new System.Drawing.Size(60, 52);
this.startLinkBtn.Text = "开始连接";
this.startLinkBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
//
// stopLinkBtn
//
this.stopLinkBtn.BackColor = System.Drawing.Color.Transparent;
this.stopLinkBtn.ForeColor = System.Drawing.SystemColors.ControlText;
this.stopLinkBtn.Image = global::RFIDManagement.Properties.Resources.LinkStop;
this.stopLinkBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
this.stopLinkBtn.Name = "stopLinkBtn";
this.stopLinkBtn.Size = new System.Drawing.Size(60, 52);
this.stopLinkBtn.Text = "停止连接";
this.stopLinkBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.stopLinkBtn.ToolTipText = "停止连接";
//
// startReadBtn
//
this.startReadBtn.BackColor = System.Drawing.Color.Transparent;
this.startReadBtn.ForeColor = System.Drawing.SystemColors.ControlText;
this.startReadBtn.Image = global::RFIDManagement.Properties.Resources.StartRead;
this.startReadBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
this.startReadBtn.Name = "startReadBtn";
this.startReadBtn.Size = new System.Drawing.Size(60, 52);
this.startReadBtn.Text = "开始读卡";
this.startReadBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.startReadBtn.ToolTipText = "开始读卡";
//
// stopReadBtn
//
this.stopReadBtn.BackColor = System.Drawing.Color.Transparent;
this.stopReadBtn.ForeColor = System.Drawing.SystemColors.ControlText;
this.stopReadBtn.Image = global::RFIDManagement.Properties.Resources.StopRead;
this.stopReadBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
this.stopReadBtn.Name = "stopReadBtn";
this.stopReadBtn.Size = new System.Drawing.Size(60, 52);
this.stopReadBtn.Text = "停止读卡";
this.stopReadBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.stopReadBtn.ToolTipText = "停止读卡";
//
// writeBtn
//
this.writeBtn.BackColor = System.Drawing.Color.Transparent;
this.writeBtn.ForeColor = System.Drawing.SystemColors.ControlText;
this.writeBtn.Image = global::RFIDManagement.Properties.Resources.DataWrite;
this.writeBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
this.writeBtn.Name = "writeBtn";
this.writeBtn.Size = new System.Drawing.Size(60, 52);
this.writeBtn.Text = "标签写入";
this.writeBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.writeBtn.ToolTipText = "停止读卡";
//
// pl_LinkTips
//
this.pl_LinkTips.Controls.Add(this.lb_LinkTips);
this.pl_LinkTips.Dock = System.Windows.Forms.DockStyle.Left;
this.pl_LinkTips.Location = new System.Drawing.Point(286, 0);
this.pl_LinkTips.Name = "pl_LinkTips";
this.pl_LinkTips.Size = new System.Drawing.Size(75, 59);
this.pl_LinkTips.TabIndex = 13;
//
// lb_LinkTips
//
this.lb_LinkTips.Dock = System.Windows.Forms.DockStyle.Fill;
this.lb_LinkTips.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lb_LinkTips.Location = new System.Drawing.Point(2, 2);
this.lb_LinkTips.Name = "lb_LinkTips";
this.lb_LinkTips.Size = new System.Drawing.Size(71, 55);
this.lb_LinkTips.TabIndex = 7;
this.lb_LinkTips.Text = "未连接";
this.lb_LinkTips.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lb_LinkPms
//
this.lb_LinkPms.Controls.Add(this.com_LinkPms);
this.lb_LinkPms.Controls.Add(this.label1);
this.lb_LinkPms.Controls.Add(this.com_LinkType);
this.lb_LinkPms.Controls.Add(this.lb_LinkType);
this.lb_LinkPms.Dock = System.Windows.Forms.DockStyle.Left;
this.lb_LinkPms.Location = new System.Drawing.Point(0, 0);
this.lb_LinkPms.Name = "lb_LinkPms";
this.lb_LinkPms.Size = new System.Drawing.Size(286, 59);
this.lb_LinkPms.TabIndex = 10;
//
// com_LinkPms
//
this.com_LinkPms.Location = new System.Drawing.Point(80, 32);
this.com_LinkPms.Name = "com_LinkPms";
this.com_LinkPms.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.com_LinkPms.Properties.DropDownRows = 8;
this.com_LinkPms.Size = new System.Drawing.Size(197, 20);
this.com_LinkPms.TabIndex = 13;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 35);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(67, 14);
this.label1.TabIndex = 12;
this.label1.Text = "连接参数:";
//
// com_LinkType
//
this.com_LinkType.Location = new System.Drawing.Point(80, 6);
this.com_LinkType.Name = "com_LinkType";
this.com_LinkType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.com_LinkType.Properties.DropDownRows = 8;
this.com_LinkType.Properties.Items.AddRange(new object[] {
"RS232",
"UDP"});
this.com_LinkType.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
this.com_LinkType.Size = new System.Drawing.Size(197, 20);
this.com_LinkType.TabIndex = 11;
//
// lb_LinkType
//
this.lb_LinkType.AutoSize = true;
this.lb_LinkType.Location = new System.Drawing.Point(12, 9);
this.lb_LinkType.Name = "lb_LinkType";
this.lb_LinkType.Size = new System.Drawing.Size(67, 14);
this.lb_LinkType.TabIndex = 10;
this.lb_LinkType.Text = "连接方式:";
//
// pl_Bottom
//
this.pl_Bottom.Controls.Add(this.gcMain);
this.pl_Bottom.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_Bottom.Location = new System.Drawing.Point(0, 59);
this.pl_Bottom.Name = "pl_Bottom";
this.pl_Bottom.Size = new System.Drawing.Size(1011, 506);
this.pl_Bottom.TabIndex = 12;
//
// gcMain
//
this.gcMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.gcMain.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(4);
gridLevelNode1.RelationName = "Level1";
this.gcMain.LevelTree.Nodes.AddRange(new DevExpress.XtraGrid.GridLevelNode[] {
gridLevelNode1});
this.gcMain.Location = new System.Drawing.Point(2, 2);
this.gcMain.MainView = this.gridView;
this.gcMain.Margin = new System.Windows.Forms.Padding(4);
this.gcMain.Name = "gcMain";
this.gcMain.Size = new System.Drawing.Size(1007, 502);
this.gcMain.TabIndex = 5;
this.gcMain.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView});
//
// gridView
//
this.gridView.Appearance.HeaderPanel.Font = new System.Drawing.Font("宋体", 9F);
this.gridView.Appearance.HeaderPanel.Options.UseFont = true;
this.gridView.Appearance.HeaderPanel.Options.UseTextOptions = true;
this.gridView.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.gridView.Appearance.HeaderPanel.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap;
this.gridView.Appearance.Preview.Font = new System.Drawing.Font("宋体", 9F);
this.gridView.Appearance.Preview.Options.UseFont = true;
this.gridView.Appearance.Row.Font = new System.Drawing.Font("宋体", 9F);
this.gridView.Appearance.Row.Options.UseBackColor = true;
this.gridView.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Flat;
this.gridView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.EpcColumn,
this.PCColumn,
this.AntColumn,
this.RSSIColumn,
this.CountColumn,
this.FrequencyColumn});
this.gridView.GridControl = this.gcMain;
this.gridView.IndicatorWidth = 40;
this.gridView.Name = "gridView";
this.gridView.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.True;
this.gridView.OptionsClipboard.CopyColumnHeaders = DevExpress.Utils.DefaultBoolean.False;
this.gridView.OptionsFilter.ShowAllTableValuesInCheckedFilterPopup = false;
this.gridView.OptionsFilter.ShowAllTableValuesInFilterPopup = true;
this.gridView.OptionsFind.FindNullPrompt = "";
this.gridView.OptionsSelection.MultiSelect = true;
this.gridView.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CellSelect;
this.gridView.OptionsView.AllowHtmlDrawHeaders = true;
this.gridView.OptionsView.ColumnAutoWidth = false;
this.gridView.OptionsView.ColumnHeaderAutoHeight = DevExpress.Utils.DefaultBoolean.True;
this.gridView.OptionsView.RowAutoHeight = true;
this.gridView.OptionsView.ShowGroupPanel = false;
this.gridView.PaintStyleName = "Skin";
//
// EpcColumn
//
this.EpcColumn.Caption = "EPC数据";
this.EpcColumn.FieldName = "EpcColumn";
this.EpcColumn.Name = "EpcColumn";
this.EpcColumn.Visible = true;
this.EpcColumn.VisibleIndex = 0;
this.EpcColumn.Width = 350;
//
// PCColumn
//
this.PCColumn.Caption = "协议控制字";
this.PCColumn.FieldName = "PCColumn";
this.PCColumn.Name = "PCColumn";
this.PCColumn.Visible = true;
this.PCColumn.VisibleIndex = 1;
this.PCColumn.Width = 100;
//
// AntColumn
//
this.AntColumn.Caption = "天线号";
this.AntColumn.FieldName = "AntColumn";
this.AntColumn.Name = "AntColumn";
this.AntColumn.Visible = true;
this.AntColumn.VisibleIndex = 2;
this.AntColumn.Width = 100;
//
// RSSIColumn
//
this.RSSIColumn.Caption = "信号";
this.RSSIColumn.FieldName = "RSSIColumn";
this.RSSIColumn.Name = "RSSIColumn";
this.RSSIColumn.Visible = true;
this.RSSIColumn.VisibleIndex = 3;
this.RSSIColumn.Width = 100;
//
// CountColumn
//
this.CountColumn.Caption = "读取次数";
this.CountColumn.FieldName = "CountColumn";
this.CountColumn.Name = "CountColumn";
this.CountColumn.Visible = true;
this.CountColumn.VisibleIndex = 4;
this.CountColumn.Width = 100;
//
// FrequencyColumn
//
this.FrequencyColumn.Caption = "频率";
this.FrequencyColumn.FieldName = "FrequencyColumn";
this.FrequencyColumn.Name = "FrequencyColumn";
this.FrequencyColumn.Visible = true;
this.FrequencyColumn.VisibleIndex = 5;
this.FrequencyColumn.Width = 100;
//
// refushBtn
//
this.refushBtn.BackColor = System.Drawing.Color.Transparent;
this.refushBtn.ForeColor = System.Drawing.SystemColors.ControlText;
this.refushBtn.Image = global::RFIDManagement.Properties.Resources.DataWrite;
this.refushBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
this.refushBtn.Name = "refushBtn";
this.refushBtn.Size = new System.Drawing.Size(36, 52);
this.refushBtn.Text = "重置";
this.refushBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.refushBtn.ToolTipText = "重置";
//
// FrmMain
//
this.Appearance.BackColor = System.Drawing.SystemColors.Control;
this.Appearance.Options.UseBackColor = true;
this.Appearance.Options.UseFont = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1011, 565);
this.Controls.Add(this.pl_Bottom);
this.Controls.Add(this.pl_Top);
this.Name = "FrmMain";
this.Text = "RFID设备管理";
((System.ComponentModel.ISupportInitialize)(this.pl_Top)).EndInit();
this.pl_Top.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_ToolStrip)).EndInit();
this.pl_ToolStrip.ResumeLayout(false);
this.pl_ToolStrip.PerformLayout();
this.toolStrip.ResumeLayout(false);
this.toolStrip.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_LinkTips)).EndInit();
this.pl_LinkTips.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.lb_LinkPms)).EndInit();
this.lb_LinkPms.ResumeLayout(false);
this.lb_LinkPms.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.com_LinkPms.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.com_LinkType.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pl_Bottom)).EndInit();
this.pl_Bottom.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gcMain)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridView)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraEditors.PanelControl pl_Top;
private DevExpress.XtraEditors.PanelControl lb_LinkPms;
private DevExpress.XtraEditors.PanelControl pl_LinkTips;
private System.Windows.Forms.Label lb_LinkTips;
private DevExpress.XtraEditors.ComboBoxEdit com_LinkPms;
private System.Windows.Forms.Label label1;
private DevExpress.XtraEditors.ComboBoxEdit com_LinkType;
private System.Windows.Forms.Label lb_LinkType;
private DevExpress.XtraEditors.PanelControl pl_ToolStrip;
private System.Windows.Forms.ToolStrip toolStrip;
private System.Windows.Forms.ToolStripButton startReadBtn;
private System.Windows.Forms.ToolStripButton startLinkBtn;
private System.Windows.Forms.ToolStripButton stopLinkBtn;
private System.Windows.Forms.ToolStripButton stopReadBtn;
private DevExpress.XtraEditors.PanelControl pl_Bottom;
public DevExpress.XtraGrid.GridControl gcMain;
private DevExpress.XtraGrid.Views.Grid.GridView gridView;
private DevExpress.XtraGrid.Columns.GridColumn EpcColumn;
private DevExpress.XtraGrid.Columns.GridColumn PCColumn;
private DevExpress.XtraGrid.Columns.GridColumn AntColumn;
private DevExpress.XtraGrid.Columns.GridColumn RSSIColumn;
private DevExpress.XtraGrid.Columns.GridColumn CountColumn;
private DevExpress.XtraGrid.Columns.GridColumn FrequencyColumn;
private System.Windows.Forms.ToolStripButton writeBtn;
private System.Windows.Forms.ToolStripButton refushBtn;
}
}
@@ -0,0 +1,681 @@
using Lskj.Business.Impl;
using Lskj.Control;
using Lskj.Control.Model;
using Lskj.Core;
using ReaderApi;
using ReaderApi.Data;
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using static ReaderApi.DeviceManagement;
namespace RFIDManagement
{
public partial class FrmMain : BaseForm
{
public FrmMain()
{
InitializeComponent();
this.Load += OnFormLoad;
this.FormClosing += OnFrmMainFormClosing;
}
/// <summary>
/// 连接驱动
/// </summary>
public DeviceManagement Device;
/// <summary>
/// 连接数
/// </summary>
public List<Reader> Readers;
/// <summary>
/// 消息
/// </summary>
public List<Tag> Tags;
/// <summary>
/// 标记
/// </summary>
public bool StartFlag;
/// <summary>
/// 更新数据Timer
/// </summary>
public System.Windows.Forms.Timer UpdateTagTimer;
/// <summary>
/// 展示视频Timer
/// </summary>
public System.Windows.Forms.Timer ShowTimer;
/// <summary>
/// 界面上下文
/// </summary>
public SynchronizationContext SyncContext;
/// <summary>
/// 当前连接
/// </summary>
public Reader SelectReader;
/// <summary>
/// 数据源
/// </summary>
public DataTable SourceTable;
/// <summary>
/// 写入数据窗口
/// </summary>
FrmDataWrite DataWriteForm;
/// <summary>
/// 初始化界面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnFormLoad(object sender, EventArgs e)
{
this.startLinkBtn.Enabled = true;
this.stopLinkBtn.Enabled = true;
this.startReadBtn.Enabled = false;
this.stopReadBtn.Enabled = false;
this.writeBtn.Enabled = false;
if (!DBConfig.Instance.CreateConnection())
{
MessageUtil.Show("网络连接失败");
Close();
}
StringBuilder sqlBuilder = new StringBuilder();
sqlBuilder.AppendLine($"if not exists(select top 1 * from sysObjects where Id = object_id(N'P_RfidInfoTab') and xtype = 'U')");
sqlBuilder.AppendLine($"begin");
sqlBuilder.AppendLine($"create table P_RfidInfoTab(id int IDENTITY(1, 1) NOT NULL,epc varchar(100) NULL,url varchar(200) NULL,fileType int NULL,nextTime int NULL,orderId int NULL,nowCount int NULL,allCount int NULL)");
sqlBuilder.AppendLine($"end");
sqlBuilder.AppendLine($"else begin");
sqlBuilder.AppendLine($"if not exists(select top 1 * from syscolumns where id = object_id(N'P_RfidInfoTab') and name = 'epc')");
sqlBuilder.AppendLine($"begin alter table P_RfidInfoTab add epc varchar(100) end");
sqlBuilder.AppendLine($"if not exists(select top 1 * from syscolumns where id = object_id(N'P_RfidInfoTab') and name = 'url')");
sqlBuilder.AppendLine($"begin alter table P_RfidInfoTab add url varchar(200) end");
sqlBuilder.AppendLine($"if not exists(select top 1 * from syscolumns where id = object_id(N'P_RfidInfoTab') and name = 'fileType')");
sqlBuilder.AppendLine($"begin alter table P_RfidInfoTab add fileType int end");
sqlBuilder.AppendLine($"if not exists(select top 1 * from syscolumns where id = object_id(N'P_RfidInfoTab') and name = 'nextTime')");
sqlBuilder.AppendLine($"begin alter table P_RfidInfoTab add nextTime int end");
sqlBuilder.AppendLine($"if not exists(select top 1 * from syscolumns where id = object_id(N'P_RfidInfoTab') and name = 'orderId')");
sqlBuilder.AppendLine($"begin alter table P_RfidInfoTab add orderId int end");
sqlBuilder.AppendLine($"if not exists(select top 1 * from syscolumns where id = object_id(N'P_RfidInfoTab') and name = 'nowCount')");
sqlBuilder.AppendLine($"begin alter table P_RfidInfoTab add nowCount int end");
sqlBuilder.AppendLine($"if not exists(select top 1 * from syscolumns where id = object_id(N'P_RfidInfoTab') and name = 'allCount')");
sqlBuilder.AppendLine($"begin alter table P_RfidInfoTab add allCount int end");
sqlBuilder.AppendLine($"end");
SqlHelper.ExecuteNonQuery(sqlBuilder.ToString());
SqlHelper.ExecuteNonQuery("update P_RfidInfoTab set nowCount = '0'");
UpdateTagTimer = new System.Windows.Forms.Timer();
UpdateTagTimer.Interval = 200;
UpdateTagTimer.Tick += OnUpdateTagTimerTick;
UpdateTagTimer.Enabled = true;
ShowTimer = new System.Windows.Forms.Timer();
ShowTimer.Interval = 100;
ShowTimer.Tick += OnShowTimerTick;
ShowTimer.Enabled = true;
SyncContext = SynchronizationContext.Current;
Device = new DeviceManagement();
Tags = new List<Tag>();
Readers = new List<Reader>();
Device.OnDeviceState += new DeviceEventHandle(OnDeviceEventHandle);
Device.OnRecvMessage += new MessageReceivedEventHandle(OnRecvMessageEventHandle);
this.startLinkBtn.Click += OnStartLinkBtnClick;
this.stopLinkBtn.Click += OnStopLinkBtnClick;
this.startReadBtn.Click += OnStartReadBtnClick;
this.stopReadBtn.Click += OnStopReadBtnClick;
this.writeBtn.Click += OnWriteBtnClick;
this.refushBtn.Click += OnRefushBtnClick; ;
this.com_LinkType.SelectedIndexChanged += OnComLinkTypeSelectedIndexChanged;
string linkType = IniHelper.Read("LinkType");
int selectIndex = com_LinkType.Properties.Items.IndexOf(linkType);
com_LinkType.SelectedIndex = selectIndex;
InitSourceTable();
}
/// <summary>
/// 开始连接按钮点击时
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnStartLinkBtnClick(object sender, EventArgs e)
{
string connectMode = com_LinkType.Text;
string connectStr = com_LinkPms.Text;
try
{
ConnectDevice(connectMode, connectStr, 1);
}
catch (Exception ex)
{
MessageUtil.Show(ex.Message);
}
}
/// <summary>
/// 断开连接
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnStopLinkBtnClick(object sender, EventArgs e)
{
ConnectClose();
lb_LinkTips.Text = "未连接";
lb_LinkTips.ForeColor = Color.Gray;
startLinkBtn.Enabled = true;
stopLinkBtn.Enabled = true;
startReadBtn.Enabled = false;
stopReadBtn.Enabled = false;
writeBtn.Enabled = false;
}
/// <summary>
/// 开始读取
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnStartReadBtnClick(object sender, EventArgs e)
{
if (lb_LinkTips.Text.Equals("已连接"))
{
Tags.Clear();
var result = SelectReader?.Send(new InventoryPara(InventoryMode.EPC));
if (result != null)
{
GlobalPara.tagDisplayArea = TagDisplayArea.main;
}
startLinkBtn.Enabled = false;
stopLinkBtn.Enabled = true;
startReadBtn.Enabled = false;
stopReadBtn.Enabled = true;
writeBtn.Enabled = false;
}
else
{
MessageUtil.Show("未连接");
}
}
/// <summary>
/// 停止读取
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnStopReadBtnClick(object sender, EventArgs e)
{
SelectReader?.Send(new InventoryStopPara());
startLinkBtn.Enabled = false;
stopLinkBtn.Enabled = true;
startReadBtn.Enabled = true;
stopReadBtn.Enabled = false;
writeBtn.Enabled = true;
}
/// <summary>
/// 标签写入按钮点击
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnWriteBtnClick(object sender, EventArgs e)
{
if (!StartFlag)
{
try
{
DataWriteForm = new FrmDataWrite();
DataWriteForm.SelectReader = SelectReader;
DataWriteForm.ShowDialog();
DataWriteForm.Dispose();
}
catch (Exception ex)
{
MessageUtil.Show(ex.Message);
}
}
else
{
MessageUtil.Show("请先停止读取数据");
}
}
/// <summary>
/// 重置按钮点击
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnRefushBtnClick(object sender, EventArgs e)
{
SqlHelper.ExecuteNonQuery("update P_RfidInfoTab set nowCount = '0'");
}
/// <summary>
/// 切换连接模式
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnComLinkTypeSelectedIndexChanged(object sender, EventArgs e)
{
if (com_LinkType.Text.Equals("RS232"))
{
InitRS232();
}
else if (com_LinkType.Text.Equals("UDP"))
{
InitUDP();
}
}
/// <summary>
/// RFID设备状态改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnDeviceEventHandle(object sender, DeviceEventArgs e)
{
if (e.cmd == ReaderApi.DeviceState.Connected)
{
foreach (Reader re in Readers)
{
var result = re?.Send(new InventoryStopPara());
}
AddReader(e.reader);
SyncContext.Post(AddReaderUI, e.reader);
}
else if (e.cmd == ReaderApi.DeviceState.Disconnected)
{
RemoveReader(e.reader);
SyncContext.Post(RemoveReaderUI, e.reader);
}
else if (e.cmd == ReaderApi.DeviceState.ConnectError)
{
SelectReader = null;
MessageUtil.Show($"连接错误!\r\n{e.reader.connectStr}");
}
}
/// <summary>
/// 接收RFID数据事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnRecvMessageEventHandle(object sender, MessageReceivedEventArgs e)
{
if (e.data != null)
{
if (e.cmd == CmdType.cmd_tag || e.cmd == CmdType.cmd_write_tag || e.cmd == CmdType.cmd_lock_tag || e.cmd == CmdType.cmd_kill_tag) //标签数据
{
if (GlobalPara.tagDisplayArea == TagDisplayArea.main)
{
GlobalMethod.AddTag(e.data as Tag, Tags);
}
else if (GlobalPara.tagDisplayArea == TagDisplayArea.writeTag || GlobalPara.tagDisplayArea == TagDisplayArea.writeTagRead || GlobalPara.tagDisplayArea == TagDisplayArea.writeTagReadListBox2)
{
SyncContext.Post(DataWriteFormAddTag, e.data);
}
}
else
{
if (e.cmd == CmdType.cmd_tag_epc || e.cmd == CmdType.cmd_tag_tid || e.cmd == CmdType.cmd_tag_epc_tid || e.cmd == CmdType.cmd_tag_epc_user) //开始读取标签成功
{
StartFlag = (e.data as Result).isSuccess;
}
else if (e.cmd == CmdType.cmd_inventory_stop)//停止读标签成功
{
if ((e.data as Result).isSuccess)
{
StartFlag = false;
}
}
if (e.cmd == CmdType.cmd_485_address)//485地址设置
{
if ((e.data as Result).isSuccess)
{
MessageUtil.Show("485地址已经改变");
}
}
}
}
}
/// <summary>
/// 创建数据源
/// </summary>
private void InitSourceTable()
{
SourceTable = new DataTable();
SourceTable.Columns.Add("EpcColumn");
SourceTable.Columns.Add("PCColumn");
SourceTable.Columns.Add("AntColumn");
SourceTable.Columns.Add("RSSIColumn");
SourceTable.Columns.Add("CountColumn");
SourceTable.Columns.Add("FrequencyColumn");
this.gcMain.DataSource = SourceTable;
}
/// <summary>
/// 加载串口
/// </summary>
private void InitRS232()
{
string comPort = IniHelper.Read("RS232");
com_LinkPms.Properties.Items.Clear();
string[] ports = SerialPort.GetPortNames();
foreach (string port in ports)
{
com_LinkPms.Properties.Items.Add(port);
}
int selectIndex = com_LinkPms.Properties.Items.IndexOf(comPort);
if (selectIndex > 0)
{
com_LinkPms.SelectedIndex = selectIndex;
}
}
/// <summary>
/// 加载UDP
/// </summary>
private void InitUDP()
{
string udpServer = IniHelper.Read("UDP");
com_LinkPms.Properties.Items.Clear();
if (!string.IsNullOrEmpty(udpServer))
{
com_LinkPms.Text = udpServer;
}
else
{
com_LinkPms.Text = "192.168.0.188:4001";
}
}
/// <summary>
/// 保存连接信息
/// </summary>
private void SaveLink()
{
IniHelper.Write("LinkType", com_LinkType.Text);
if (com_LinkType.Text.Equals("RS232"))
{
IniHelper.Write("RS232", com_LinkPms.Text);
}
else if (com_LinkType.Text.Equals("UDP"))
{
IniHelper.Write("UDP", com_LinkPms.Text);
}
}
/// <summary>
/// 创建连接
/// </summary>
/// <param name="connectMode"></param>
/// <param name="connectStr"></param>
/// <param name="rs485add"></param>
private void ConnectDevice(string connectMode, string connectStr, int rs485add)
{
Device.Open(connectMode, connectStr, rs485add);
}
/// <summary>
/// 添加Readers
/// </summary>
/// <param name="state"></param>
private void AddReaderUI(object state)
{
if (Readers.Count == 1)
{
WaitForm.ShowForm("连接中...");
SelectReader = Readers.First();
InventoryStopPara stopPara = new InventoryStopPara();
var resultStop = SelectReader?.SendSyn(stopPara);
SyncContext.Post(UpdateConnectState, resultStop);
if (resultStop.isSuccess)
{
GetVersionPara para = new GetVersionPara();
var result = SelectReader?.SendSyn(para);
SyncContext.Post(UpdateVersion, result);
}
WaitForm.HideForm();
}
}
/// <summary>
/// 添加Reader
/// </summary>
/// <param name="reader"></param>
public void AddReader(Reader reader)
{
lock (Readers)
{
var newReaderFlag = false;
foreach (var re in Readers)
{
if (re.connectStr == reader.connectStr)
{
newReaderFlag = true;
}
}
if (!newReaderFlag)
{
Readers.Add(reader);
}
}
}
/// <summary>
/// 移除Readers
/// </summary>
/// <param name="state"></param>
private void RemoveReaderUI(object state)
{
if (Readers.Count == 1)
{
SelectReader = Readers.First();
}
}
/// <summary>
/// 移除Readers
/// </summary>
/// <param name="reader"></param>
private void RemoveReader(Reader reader)
{
lock (Readers)
{
foreach (var re in Readers)
{
if (re.connectStr == reader.connectStr)
{
Readers.Remove(reader);
break;
}
}
}
}
/// <summary>
/// 更新连接信息
/// </summary>
/// <param name="state"></param>
private void UpdateConnectState(object state)
{
var result = state as Result;
if (!result.isSuccess)
{
MessageUtil.Show(result.errorMsg);
lb_LinkTips.Text = "连接失败";
lb_LinkTips.ForeColor = Color.Red;
ConnectClose();
}
}
private void UpdateVersion(object state)
{
var result = state as Result;
if (result.isSuccess)
{
lb_LinkTips.Text = "已连接";
lb_LinkTips.ForeColor = Color.Green;
startLinkBtn.Enabled = false;
stopLinkBtn.Enabled = true;
startReadBtn.Enabled = true;
stopReadBtn.Enabled = false;
writeBtn.Enabled = true;
SaveLink();
}
else
{
lb_LinkTips.Text = "连接失败";
lb_LinkTips.ForeColor = Color.Red;
ConnectClose();
startLinkBtn.Enabled = true;
stopLinkBtn.Enabled = true;
startReadBtn.Enabled = false;
stopReadBtn.Enabled = false;
writeBtn.Enabled = false;
}
}
/// <summary>
/// 关闭连接
/// </summary>
private void ConnectClose()
{
Device?.Close();
Readers?.Clear();
Tags?.Clear();
gridView?.BeginUpdate();
SourceTable?.Rows.Clear();
gridView?.EndUpdate();
SelectReader = null;
}
/// <summary>
/// 更新数据事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnUpdateTagTimerTick(object sender, EventArgs e)
{
gridView.BeginUpdate();
lock (Tags)
{
foreach (Tag tag in Tags)
{
DataRow row = SourceTable.AsEnumerable().Where(n => (n["EpcColumn"] + "").Equals(tag.epc)).FirstOrDefault();
if (row != null)
{
row["PCColumn"] = tag.pc.ToString();
row["AntColumn"] = tag.ant.ToString();
row["RSSIColumn"] = tag.rssi.ToString();
row["CountColumn"] = tag.count.ToString();
if (tag.frequency >= 0xC9)
{
row["FrequencyColumn"] = tag.frequency.ToString("X2");
}
else
{
if (Frequency.frequency.ContainsKey(tag.frequency))
{
row["FrequencyColumn"] = Frequency.frequency[tag.frequency];
}
else
{
row["FrequencyColumn"] = tag.frequency.ToString("X2");
}
}
}
else
{
DataRow newRow = SourceTable.NewRow();
newRow["EpcColumn"] = tag.epc.ToString();
newRow["PCColumn"] = tag.pc.ToString();
newRow["AntColumn"] = tag.ant.ToString();
newRow["RSSIColumn"] = tag.rssi.ToString();
newRow["CountColumn"] = tag.count.ToString();
newRow["FrequencyColumn"] = tag.frequency.ToString();
SourceTable.Rows.Add(newRow);
}
}
List<DataRow> deleteRows = new List<DataRow>();
foreach (DataRow row in SourceTable.Rows)
{
Tag tag = Tags.Where(n => n.epc.Equals(row["EpcColumn"] + "")).FirstOrDefault();
if (tag == null)
{
deleteRows.Add(row);
}
}
foreach (DataRow deleteRow in deleteRows)
{
SourceTable.Rows.Remove(deleteRow);
}
}
gridView.EndUpdate();
Tags.Clear();
}
/// <summary>
/// 更新数据事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnShowTimerTick(object sender, EventArgs e)
{
ShowTimer.Enabled = false;
try
{
List<DataRow> dataRowsList = SourceTable.AsEnumerable().OrderByDescending(n => Convert.ToDecimal(n["RSSIColumn"])).ToList();
if (dataRowsList != null)
{
foreach (DataRow dataRow in dataRowsList)
{
string epcValue = dataRow["EpcColumn"] + "";
DataTable selectTable = BaseImpl.GetDataTableResult($"select * from P_RfidInfoTab where epc = '{epcValue}' order by orderId");
foreach (DataRow selectRow in selectTable.Rows)
{
try
{
int.TryParse(selectRow["id"] + "", out int id);
int.TryParse(selectRow["nextTime"] + "", out int nextTime);
string url = selectRow["url"] + "";
int.TryParse(selectRow["fileType"] + "", out int fileType);
int.TryParse(selectRow["nowCount"] + "", out int nowCount);
int.TryParse(selectRow["allCount"] + "", out int allCount);
int intervalTime = nextTime != 0 ? nextTime * 1000 : 1000;
if (nowCount < allCount)
{
using (FrmVlcPlayer frmVlcPlayer = new FrmVlcPlayer())
{
frmVlcPlayer.PlayVideo(url);
if (fileType.Equals(0))
{
frmVlcPlayer.Opacity = 1;
frmVlcPlayer.WindowState = FormWindowState.Maximized;
}
else
{
frmVlcPlayer.Opacity = 0;
frmVlcPlayer.WindowState = FormWindowState.Minimized;
}
frmVlcPlayer.TopMost = true;
frmVlcPlayer.ShowDialog();
}
SqlHelper.ExecuteNonQuery($"update P_RfidInfoTab set nowCount = '{nowCount + 1}' where id = '{id}'");
Thread.Sleep(intervalTime);
}
}
catch (Exception)
{
}
}
break;
}
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
ShowTimer.Enabled = true;
}
/// <summary>
/// 写入数据
/// </summary>
private void DataWriteFormAddTag(object state)
{
DataWriteForm?.AddTag(state as Tag);
}
/// <summary>
/// 窗体关闭时
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnFrmMainFormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
{
if (stopReadBtn.Enabled)
{
OnStopReadBtnClick(null, null);
}
if (stopLinkBtn.Enabled)
{
OnStopLinkBtnClick(null, null);
}
}
}
}
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
@@ -0,0 +1,48 @@
namespace RFIDManagement
{
partial class FrmVlcPlayer
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// FrmVlcPlayer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(885, 567);
this.Name = "FrmVlcPlayer";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.ResumeLayout(false);
}
#endregion
}
}
@@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Vlc.DotNet.Forms;
namespace RFIDManagement
{
public partial class FrmVlcPlayer : Form
{
public SynchronizationContext SyncContext;
public VlcControl VlcPlayer;
public FrmVlcPlayer()
{
InitializeComponent();
SyncContext = SynchronizationContext.Current;
var currentAssembly = Assembly.GetEntryAssembly();
var currentDirectory = new FileInfo(currentAssembly.Location).DirectoryName;
var libDirectory = new DirectoryInfo(Path.Combine(currentDirectory, "libvlc", IntPtr.Size == 4 ? "win-x86" : "win-x64"));
VlcPlayer = new VlcControl();
VlcPlayer.BeginInit();
VlcPlayer.VlcLibDirectory = libDirectory;
VlcPlayer.Dock = DockStyle.Fill;
VlcPlayer.EndInit();
VlcPlayer.EndReached += OnVlcPlayerEndReached;
this.Controls.Add(VlcPlayer);
this.FormClosed += OnFrmVlcPlayerFormClosed;
}
public void PlayVideo(string url)
{
VlcPlayer.SetMedia(new Uri(url));
VlcPlayer.Play();
}
public void CloseWindow(object state)
{
this.Close();
}
/// <summary>
/// 播放完成后
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnVlcPlayerEndReached(object sender, Vlc.DotNet.Core.VlcMediaPlayerEndReachedEventArgs e)
{
SyncContext.Post(CloseWindow, null);
}
/// <summary>
/// 程序关闭后
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnFrmVlcPlayerFormClosed(object sender, FormClosedEventArgs e)
{
VlcPlayer?.Stop();
VlcPlayer?.Dispose();
}
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,129 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ReaderApi.Data;
namespace RFIDManagement
{
public class GlobalMethod
{
public static string AddOneStep(int type, string str, int step, int startValue)
{
string strResult = "";
byte[] byteArray = new byte[str.Length / 2];
if (type == 16)
{
for (int i = 0; i < str.Length / 2; i++)
{
byteArray[i] = Convert.ToByte(str.Substring(2 * i, 2), 16);
}
if ((byteArray[(byteArray.Length - startValue) - 1] + step) > 0xFF)
{
byteArray[(byteArray.Length - startValue) - 1] = (byte)(byteArray[(byteArray.Length - startValue) - 1] + step);
for (int j = (byteArray.Length - startValue) - 2; j >= 0; j--)
{
if ((byteArray[j] + 1) > 0xFF)
{
byteArray[j] = (byte)(byteArray[j] + 1);
continue;
}
else
{
byteArray[j] = (byte)(byteArray[j] + 1);
break;
}
}
}
else
{
byteArray[(byteArray.Length - startValue) - 1] = (byte)(byteArray[(byteArray.Length - startValue) - 1] + step);
}
for (int i = 0; i < byteArray.Length; i++)
{
strResult += string.Format("{0:X2}", byteArray[i]);
}
}
else if (type == 10)
{
for (int i = 0; i < str.Length / 2; i++)
{
byteArray[i] = Convert.ToByte(str.Substring(2 * i, 2));
}
if ((byteArray[(byteArray.Length - startValue) - 1] + step) > 99)
{
byteArray[(byteArray.Length - startValue) - 1] = 0;
for (int j = (byteArray.Length - startValue) - 2; j >= 0; j--)
{
if ((byteArray[j] + 1) > 99)
{
byteArray[j] = 0;
continue;
}
else
{
byteArray[j] = (byte)(byteArray[j] + 1);
break;
}
}
}
else
{
byteArray[(byteArray.Length - startValue) - 1] = (byte)(byteArray[(byteArray.Length - startValue) - 1] + step);
}
for (int i = 0; i < byteArray.Length; i++)
{
strResult += byteArray[i].ToString("00");
}
}
return strResult;
}
public static bool AddTag(Tag tag, List<Tag> tags)
{
var isNewTag = true;
lock (tags)
{
if (tag.tid != null && tag.tid != "")
{
for (int index = 0; index < tags.Count; index++)
{
if (tags[index].tid == tag.tid)
{
tags[index].count++;
tags[index].rssi = tag.rssi;
tags[index].ant = tag.ant;
tags[index].frequency = tag.frequency;
isNewTag = false;
break;
}
}
if (isNewTag)
{
tags.Add(tag);
}
}
else if (tag.epc != null)
{
for (int index = 0; index < tags.Count; index++)
{
if (tags[index].epc == tag.epc)
{
tags[index].count++;
tags[index].rssi = tag.rssi;
tags[index].ant = tag.ant;
tags[index].frequency = tag.frequency;
isNewTag = false;
break;
}
}
if (isNewTag)
{
tags.Add(tag);
}
}
}
return isNewTag;
}
}
}
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RFIDManagement
{
public class GlobalPara
{
public static TagDisplayArea tagDisplayArea = TagDisplayArea.main;
}
public enum TagDisplayArea
{
main,
writeTag,
writeTagRead,
writeTagReadListBox2
}
}
@@ -0,0 +1,247 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace RFIDManagement
{
/// <summary>
/// Ini 文件操作类
/// </summary>
public static class IniHelper
{
public static string AbsolutelyPath
{
get { return Application.StartupPath + "\\"; }
}
public static string MainMenuConfigPath
{
get { return AbsolutelyPath + "MenuConfig.ini"; }
}
/// <summary>
/// 写入INI文件
/// </summary>
/// <param name="section">节点名称[如[TypeName]]</param>
/// <param name="key">键</param>
/// <param name="val">值</param>
/// <param name="filepath">文件路径</param>
/// <returns></returns>
[DllImport("kernel32")]
private static extern long WritePrivateProfileString(string section, string key, string val, string filepath);
/// <summary>
/// 读取INI文件
/// </summary>
/// <param name="section">节点名称</param>
/// <param name="key">键</param>
/// <param name="def">值</param>
/// <param name="retval">stringbulider对象</param>
/// <param name="size">字节大小</param>
/// <param name="filePath">文件路径</param>
/// <returns></returns>
[DllImport("kernel32")]
private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retval, int size, string filePath);
/// <summary>
/// 获取某个指定节点(Section)中所有KEY和Value
/// </summary>
/// <param name="lpAppName">节点名称</param>
/// <param name="lpReturnedString">返回值的内存地址,每个之间用\0分隔</param>
/// <param name="nSize">内存大小(characters)</param>
/// <param name="lpFileName">Ini文件</param>
/// <returns>内容的实际长度,为0表示没有内容,为nSize-2表示内存大小不够</returns>
[DllImport("kernel32")]
private static extern int GetPrivateProfileSection(string lpAppName, byte[] lpszReturnBuffer, int nSize, string lpFileName);
/// <summary>
/// <para>说明:写入Ini文件(以键值对的形式存放)</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-07-22</para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="key">键</param>
/// <param name="value">值</param>
/// <returns></returns>
public static void Write(string key, string value)
{
try
{
//根据INI文件名设置要写入INI文件的节点名称
//此处的节点名称完全可以根据实际需要进行配置
string filePath = MainMenuConfigPath;
if (!File.Exists(filePath))
{
File.Create(filePath);
}
string fileName = Path.GetFileNameWithoutExtension(filePath);
WritePrivateProfileString(fileName, key, value, filePath);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
/// <summary>
/// <para>说明:通过Key获取Value值</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-07-22</para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="key">键</param>
/// <returns>值</returns>
public static string Read(string key)
{
string value = string.Empty;
try
{
//判读INI文件是否存在
string filePath = MainMenuConfigPath;
if (File.Exists(filePath))
{
StringBuilder temp = new StringBuilder(1024);
string fileName = Path.GetFileNameWithoutExtension(filePath);
GetPrivateProfileString(fileName, key, "", temp, 1024, filePath);
return temp + "";
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return value;
}
/// <summary>
/// <para>说明:写入Ini文件(以键值对的形式存放)</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-07-22</para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="key">键</param>
/// <param name="value">值</param>
/// <returns></returns>
public static void Write(string iniName, string key, string value)
{
try
{
//根据INI文件名设置要写入INI文件的节点名称
//此处的节点名称完全可以根据实际需要进行配置
string filePath = Path.Combine(new string[] { AbsolutelyPath + iniName });
if (!File.Exists(filePath))
{
File.Create(filePath);
}
string fileName = Path.GetFileNameWithoutExtension(filePath);
WritePrivateProfileString(fileName, key, value, filePath);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
/// <summary>
/// <para>说明:通过Key获取Value值</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-07-22</para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="key">键</param>
/// <returns>值</returns>
public static string Read(string iniName, string key)
{
string value = string.Empty;
try
{
//判读INI文件是否存在
string filePath = Path.Combine(new string[] { AbsolutelyPath + iniName });
if (File.Exists(filePath))
{
StringBuilder temp = new StringBuilder(1024);
string fileName = Path.GetFileNameWithoutExtension(filePath);
GetPrivateProfileString(fileName, key, "", temp, 1024, filePath);
return temp + "";
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return value;
}
/// <summary>
/// <para>说明:通过Key获取Value值</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-07-22</para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="key">键</param>
/// <returns>值</returns>
public static string Read(string iniName, string mainKey, string listKey)
{
string value = string.Empty;
try
{
//判读INI文件是否存在
string filePath = Path.Combine(new string[] { AbsolutelyPath + iniName });
if (File.Exists(filePath))
{
StringBuilder temp = new StringBuilder(1024);
string fileName = Path.GetFileNameWithoutExtension(filePath);
GetPrivateProfileString(mainKey, listKey, "", temp, 1024, filePath);
return temp + "";
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return value;
}
/// <summary>
/// 获取INI文件中指定节点(Section)中的所有条目(key=value形式)
/// </summary>
/// <param name="iniFile">Ini文件</param>
/// <param name="section">节点名称</param>
/// <returns>指定节点中的所有项目,没有内容返回string[0]</returns>
public static Dictionary<string, string> GetSectionKeys(string iniFile, string category)
{
Dictionary<string, string> result = new Dictionary<string, string>();
try
{
string filePath = Path.Combine(new string[] { AbsolutelyPath + iniFile });
if (File.Exists(filePath))
{
byte[] buffer = new byte[2048];
GetPrivateProfileSection(category, buffer, 2048, filePath);
String[] tmp = Encoding.Default.GetString(buffer).Trim('\0').Split('\0');
foreach (String entry in tmp)
{
string[] v = entry.Split('=');
result.Add(v[0], v[1]);
}
return result;
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return result;
}
}
}
@@ -0,0 +1,23 @@
using Lskj.Control.BrowserSetting;
using System;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using Xilium.CefGlue;
namespace RFIDManagement
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmMain());
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("RFIDManagement")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RFIDManagement")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("3e6d4f12-5bce-4cee-87c8-8a21dada7222")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,113 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace RFIDManagement.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RFIDManagement.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap DataWrite {
get {
object obj = ResourceManager.GetObject("DataWrite", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap LinkStart {
get {
object obj = ResourceManager.GetObject("LinkStart", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap LinkStop {
get {
object obj = ResourceManager.GetObject("LinkStop", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap StartRead {
get {
object obj = ResourceManager.GetObject("StartRead", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap StopRead {
get {
object obj = ResourceManager.GetObject("StopRead", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}
@@ -0,0 +1,136 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="StartRead" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\StartRead.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="LinkStart" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LinkStart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="LinkStop" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LinkStop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="StopRead" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\StopRead.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DataWrite" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DataWrite.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace RFIDManagement.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
@@ -0,0 +1,168 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3E6D4F12-5BCE-4CEE-87C8-8A21DADA7222}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>RFIDManagement</RootNamespace>
<AssemblyName>RFIDManagement</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>a.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.Data.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Printing.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Utils.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="Lskj.Business, Version=1.0.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Debug\Lskj.Business.dll</HintPath>
</Reference>
<Reference Include="Lskj.Control">
<HintPath>..\..\..\Debug\Lskj.Control.dll</HintPath>
</Reference>
<Reference Include="Lskj.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Users\糖炒栗子\source\repos\Lskj.GetFilesInDirectory\Lskj.GetFilesInDirectory\Dll\Lskj.Core.dll</HintPath>
</Reference>
<Reference Include="Lskj.Util">
<HintPath>..\..\..\Debug\Lskj.Util.dll</HintPath>
</Reference>
<Reference Include="ReaderApi">
<HintPath>dll\ReaderApi.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Vlc.DotNet.Core, Version=3.1.0.0, Culture=neutral, PublicKeyToken=84529da31f4eb963, processorArchitecture=MSIL">
<HintPath>..\packages\Vlc.DotNet.Core.3.1.0\lib\net45\Vlc.DotNet.Core.dll</HintPath>
</Reference>
<Reference Include="Vlc.DotNet.Core.Interops, Version=3.1.0.0, Culture=neutral, PublicKeyToken=84529da31f4eb963, processorArchitecture=MSIL">
<HintPath>..\packages\Vlc.DotNet.Core.Interops.3.1.0\lib\net45\Vlc.DotNet.Core.Interops.dll</HintPath>
</Reference>
<Reference Include="Vlc.DotNet.Forms, Version=3.1.0.0, Culture=neutral, PublicKeyToken=84529da31f4eb963, processorArchitecture=MSIL">
<HintPath>..\packages\Vlc.DotNet.Forms.3.1.0\lib\net45\Vlc.DotNet.Forms.dll</HintPath>
</Reference>
<Reference Include="Xilium.CefGlue, Version=87.1.1.0, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\引用DLL\Xilium.CefGlue.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="FrmDataWrite.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmDataWrite.Designer.cs">
<DependentUpon>FrmDataWrite.cs</DependentUpon>
</Compile>
<Compile Include="FrmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon>
</Compile>
<Compile Include="FrmVlcPlayer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmVlcPlayer.Designer.cs">
<DependentUpon>FrmVlcPlayer.cs</DependentUpon>
</Compile>
<Compile Include="GlobalMethod.cs" />
<Compile Include="GlobalPara.cs" />
<Compile Include="IniHelper.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="FrmDataWrite.resx">
<DependentUpon>FrmDataWrite.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmVlcPlayer.resx">
<DependentUpon>FrmVlcPlayer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Resources\LinkStart.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\LinkStop.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\StartRead.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\StopRead.png" />
</ItemGroup>
<ItemGroup>
<Content Include="a.ico" />
<Content Include="Resources\DataWrite.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\VideoLAN.LibVLC.Windows.3.0.21\build\VideoLAN.LibVLC.Windows.targets" Condition="Exists('..\packages\VideoLAN.LibVLC.Windows.3.0.21\build\VideoLAN.LibVLC.Windows.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\VideoLAN.LibVLC.Windows.3.0.21\build\VideoLAN.LibVLC.Windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\VideoLAN.LibVLC.Windows.3.0.21\build\VideoLAN.LibVLC.Windows.targets'))" />
</Target>
</Project>
Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="VideoLAN.LibVLC.Windows" version="3.0.21" targetFramework="net45" />
<package id="Vlc.DotNet.Core" version="3.1.0" targetFramework="net45" />
<package id="Vlc.DotNet.Core.Interops" version="3.1.0" targetFramework="net45" />
<package id="Vlc.DotNet.Forms" version="3.1.0" targetFramework="net45" />
</packages>