diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..511e45d --- /dev/null +++ b/.gitignore @@ -0,0 +1,50 @@ +################################################################################ +# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。 +################################################################################ + +/.vs +/SocketHelper/obj/Debug +/SocketHelper/obj/Release +/SimpleServer/obj/x86 +/PLCCommunication/obj/Debug +/JY.Control/obj +/JY.Utility/obj +/PLCCommunication/obj/Release +/SimpleServer/obj +/JY.Model/obj/Release +/JY.MES/obj/Release +/JY.MES/obj/Debug +/JY.DAL/bin/Debug +/JY.DAL/obj/Debug +/JY.Inspection/bin/Debug +/JY.Control/bin/Debug +/JY.MES/bin/Debug +/JY.Model/bin/Debug +/JY.Utility/bin/Debug +/packages/BouncyCastle.Cryptography.2.4.0 +/packages +/PLCCommunication/bin/Debug +/SimpleServer/bin/Debug +/SocketHelper/bin/Debug +/JY.Model/obj/Debug +/JY.Inspection/obj/Debug +/JY.Inspection/obj/Release +/JY.Inspection/bin/Debug.rar + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ +/JY.DAL/obj/Release/JY.DAL.csproj.AssemblyReference.cache +/JY.Inspection/obj/Debug/JY.Inspection.csproj.AssemblyReference.cache diff --git a/HC.md b/HC.md new file mode 100644 index 0000000..e9d0cb5 --- /dev/null +++ b/HC.md @@ -0,0 +1,5 @@ + +# 数据读取流程 +ReceiveEvent += OmronRegEvent_Job1 + +(81, 282) \ No newline at end of file diff --git a/JY.Control/Base/ButtonRenderer.cs b/JY.Control/Base/ButtonRenderer.cs new file mode 100644 index 0000000..8668c7c --- /dev/null +++ b/JY.Control/Base/ButtonRenderer.cs @@ -0,0 +1,260 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JYControl +{ + /// + /// Base class for the button renderers + /// + public class LBButtonRenderer : LBRendererBase + { + #region (* Variables *) + protected RectangleF rectCtrl; + protected RectangleF rectBody; + protected RectangleF rectText; + protected float drawRatio = 1.0F; + #endregion + + #region (* Constructor *) + public LBButtonRenderer() + { + this.rectCtrl = new RectangleF(0, 0, 0, 0); + } + #endregion + + #region (* Overrided methods *) + /// + /// Update the rectangles for drawing + /// + /// + public override bool Update() + { + // Check Button object + if (this.Button == null) + throw new NullReferenceException("Invalid 'Button' object"); + + // Control rectangle + this.rectCtrl.X = 0; + this.rectCtrl.Y = 0; + this.rectCtrl.Width = this.Button.Width; + this.rectCtrl.Height = this.Button.Height; + + if (this.Button.Style == LBButton.ButtonStyle.Circular) + { + if (rectCtrl.Width < rectCtrl.Height) + rectCtrl.Height = rectCtrl.Width; + else if (rectCtrl.Width > rectCtrl.Height) + rectCtrl.Width = rectCtrl.Height; + + if (rectCtrl.Width < 10) + rectCtrl.Width = 10; + if (rectCtrl.Height < 10) + rectCtrl.Height = 10; + } + + this.rectBody = this.rectCtrl; + this.rectBody.Width -= 1; + this.rectBody.Height -= 1; + + this.rectText = this.rectCtrl; + this.rectText.Width -= 2; + this.rectText.Height -= 2; + + // Calculate ratio + drawRatio = (Math.Min(rectCtrl.Width, rectCtrl.Height)) / 200; + if (drawRatio == 0.0) + drawRatio = 1; + + return true; + } + + /// + /// Draw the button object + /// + /// + public override void Draw(Graphics Gr) + { + if (Gr == null) + throw new ArgumentNullException("Gr", "Invalid Graphics object"); + + if (this.Button == null) + throw new NullReferenceException("Invalid 'Button' object"); + + this.DrawBackground(Gr, this.rectCtrl); + this.DrawBody(Gr, this.rectBody); + this.DrawText(Gr, this.rectText); + } + #endregion + + #region (* Properies *) + /// + /// Get the associated button object + /// + public LBButton Button + { + get { return this.Control as LBButton; } + } + #endregion + + #region (* Virtual method *) + /// + /// Draw the background of the control + /// + /// + /// + /// + public virtual bool DrawBackground(Graphics Gr, RectangleF rc) + { + if (this.Button == null) + return false; + + Color c = this.Button.BackColor; + SolidBrush br = new SolidBrush(c); + Pen pen = new Pen(c); + + Rectangle _rcTmp = new Rectangle(0, 0, this.Button.Width, this.Button.Height); + Gr.DrawRectangle(pen, _rcTmp); + Gr.FillRectangle(br, rc); + + br.Dispose(); + pen.Dispose(); + + return true; + } + + /// + /// Draw the body of the control + /// + /// + /// + /// + public virtual bool DrawBody(Graphics Gr, RectangleF rc) + { + if (this.Button == null) + return false; + + Color bodyColor = this.Button.ButtonColor; + Color cDark = LBColorManager.StepColor(bodyColor, 20); + + LinearGradientBrush br1 = new LinearGradientBrush(rc, + bodyColor, + cDark, + 45); + + if ((this.Button.Style == LBButton.ButtonStyle.Circular) || + (this.Button.Style == LBButton.ButtonStyle.Elliptical)) + { + Gr.FillEllipse(br1, rc); + } + else + { + GraphicsPath path = this.RoundedRect(rc, 15F); + Gr.FillPath(br1, path); + path.Dispose(); + } + + if (this.Button.State == LBButton.ButtonState.Pressed) + { + RectangleF _rc = rc; + _rc.Inflate(-15F * this.drawRatio, -15F * drawRatio); + LinearGradientBrush br2 = new LinearGradientBrush(_rc, + cDark, + bodyColor, + 45); + if ((this.Button.Style == LBButton.ButtonStyle.Circular) || + (this.Button.Style == LBButton.ButtonStyle.Elliptical)) + { + Gr.FillEllipse(br2, _rc); + } + else + { + GraphicsPath path = this.RoundedRect(_rc, 10F); + Gr.FillPath(br2, path); + path.Dispose(); + } + + br2.Dispose(); + } + + br1.Dispose(); + return true; + } + + /// + /// Draw the text of the control + /// + /// + /// + /// + public virtual bool DrawText(Graphics Gr, RectangleF rc) + { + if (this.Button == null) + return false; + + //Draw Strings + Font font = new Font(this.Button.Font.FontFamily, + this.Button.Font.Size * this.drawRatio, + this.Button.Font.Style); + + String str = this.Button.Label; + + Color bodyColor = this.Button.ButtonColor; + Color cDark = LBColorManager.StepColor(bodyColor, 20); + + SizeF size = Gr.MeasureString(str, font); + + SolidBrush br1 = new SolidBrush(bodyColor); + SolidBrush br2 = new SolidBrush(cDark); + + Gr.DrawString(str, + font, + br1, + rc.Left + ((rc.Width * 0.5F) - (float)(size.Width * 0.5F)) + (float)(1 * this.drawRatio), + rc.Top + ((rc.Height * 0.5F) - (float)(size.Height * 0.5)) + (float)(1 * this.drawRatio)); + + Gr.DrawString(str, + font, + br2, + rc.Left + ((rc.Width * 0.5F) - (float)(size.Width * 0.5F)), + rc.Top + ((rc.Height * 0.5F) - (float)(size.Height * 0.5))); + + br1.Dispose(); + br2.Dispose(); + font.Dispose(); + + return false; + } + #endregion + + #region (* Protected Methods *) + protected GraphicsPath RoundedRect(RectangleF rect, float radius) + { + RectangleF baseRect = rect; + float diameter = (radius * this.drawRatio) * 2.0f; + SizeF sizeF = new SizeF(diameter, diameter); + RectangleF arc = new RectangleF(baseRect.Location, sizeF); + GraphicsPath path = new GraphicsPath(); + + // top left arc + path.AddArc(arc, 180, 90); + // top right arc + arc.X = baseRect.Right - diameter; + path.AddArc(arc, 270, 90); + // bottom right arc + arc.Y = baseRect.Bottom - diameter; + path.AddArc(arc, 0, 90); + // bottom left arc + arc.X = baseRect.Left; + path.AddArc(arc, 90, 90); + + path.CloseFigure(); + return path; + } + #endregion + } +} diff --git a/JY.Control/Base/ColorMng.cs b/JY.Control/Base/ColorMng.cs new file mode 100644 index 0000000..ac2c07c --- /dev/null +++ b/JY.Control/Base/ColorMng.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JYControl +{ + /// + /// Manager for color + /// + public class LBColorManager : Object + { + public static double BlendColour(double fg, double bg, double alpha) + { + double result = bg + (alpha * (fg - bg)); + if (result < 0.0) + result = 0.0; + if (result > 255) + result = 255; + return result; + } + + public static Color StepColor(Color clr, int alpha) + { + if (alpha == 100) + return clr; + + byte a = clr.A; + byte r = clr.R; + byte g = clr.G; + byte b = clr.B; + float bg = 0; + + int _alpha = Math.Min(alpha, 200); + _alpha = Math.Max(alpha, 0); + double ialpha = ((double)(_alpha - 100.0)) / 100.0; + + if (ialpha > 100) + { + // blend with white + bg = 255.0F; + ialpha = 1.0F - ialpha; // 0 = transparent fg; 1 = opaque fg + } + else + { + // blend with black + bg = 0.0F; + ialpha = 1.0F + ialpha; // 0 = transparent fg; 1 = opaque fg + } + + r = (byte)(LBColorManager.BlendColour(r, bg, ialpha)); + g = (byte)(LBColorManager.BlendColour(g, bg, ialpha)); + b = (byte)(LBColorManager.BlendColour(b, bg, ialpha)); + + return Color.FromArgb(a, r, g, b); + } + }; +} diff --git a/JY.Control/Base/ControlHelper.cs b/JY.Control/Base/ControlHelper.cs new file mode 100644 index 0000000..744ba64 --- /dev/null +++ b/JY.Control/Base/ControlHelper.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JYControl +{ + public static class ControlHelper + { + /// + /// The m LST freeze control + /// + static Dictionary m_lstFreezeControl = new Dictionary(); + + public static void FreezeControl(Control control, bool blnToFreeze) + { + if (blnToFreeze && control.IsHandleCreated && control.Visible && !control.IsDisposed && (!m_lstFreezeControl.ContainsKey(control) || (m_lstFreezeControl.ContainsKey(control) && m_lstFreezeControl[control] == false))) + { + m_lstFreezeControl[control] = true; + control.Disposed += control_Disposed; + NativeMethods.SendMessage(control.Handle, 11, 0, 0); + } + else if (!blnToFreeze && !control.IsDisposed && m_lstFreezeControl.ContainsKey(control) && m_lstFreezeControl[control] == true) + { + m_lstFreezeControl.Remove(control); + NativeMethods.SendMessage(control.Handle, 11, 1, 0); + control.Invalidate(true); + } + } + + /// + /// Handles the Disposed event of the control control. + /// + /// The source of the event. + /// The instance containing the event data. + static void control_Disposed(object sender, EventArgs e) + { + try + { + if (m_lstFreezeControl.ContainsKey((Control)sender)) + m_lstFreezeControl.Remove((Control)sender); + } + catch { } + } + + /// + /// 设置GDI高质量模式抗锯齿 + /// + /// The g. + public static void SetGDIHigh(this Graphics g) + { + g.SmoothingMode = SmoothingMode.AntiAlias; //使绘图质量最高,即消除锯齿 + g.InterpolationMode = InterpolationMode.HighQualityBicubic; + g.CompositingQuality = CompositingQuality.HighQuality; + } + + /// + /// 根据矩形和圆得到一个圆角矩形Path + /// + /// The rect. + /// The corner radius. + /// GraphicsPath. + public static GraphicsPath CreateRoundedRectanglePath(this Rectangle rect, int cornerRadius) + { + GraphicsPath roundedRect = new GraphicsPath(); + roundedRect.AddArc(rect.X, rect.Y, cornerRadius * 2, cornerRadius * 2, 180, 90); + roundedRect.AddLine(rect.X + cornerRadius, rect.Y, rect.Right - cornerRadius * 2, rect.Y); + roundedRect.AddArc(rect.X + rect.Width - cornerRadius * 2, rect.Y, cornerRadius * 2, cornerRadius * 2, 270, 90); + roundedRect.AddLine(rect.Right, rect.Y + cornerRadius * 2, rect.Right, rect.Y + rect.Height - cornerRadius * 2); + roundedRect.AddArc(rect.X + rect.Width - cornerRadius * 2, rect.Y + rect.Height - cornerRadius * 2, cornerRadius * 2, cornerRadius * 2, 0, 90); + roundedRect.AddLine(rect.Right - cornerRadius * 2, rect.Bottom, rect.X + cornerRadius * 2, rect.Bottom); + roundedRect.AddArc(rect.X, rect.Bottom - cornerRadius * 2, cornerRadius * 2, cornerRadius * 2, 90, 90); + roundedRect.AddLine(rect.X, rect.Bottom - cornerRadius * 2, rect.X, rect.Y + cornerRadius * 2); + roundedRect.CloseFigure(); + return roundedRect; + } + } +} diff --git a/JY.Control/Base/LBIndustrialCtrlBase.Designer.cs b/JY.Control/Base/LBIndustrialCtrlBase.Designer.cs new file mode 100644 index 0000000..95752e4 --- /dev/null +++ b/JY.Control/Base/LBIndustrialCtrlBase.Designer.cs @@ -0,0 +1,37 @@ +namespace JYControl +{ + partial class LBIndustrialCtrlBase + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + } + + #endregion + } +} diff --git a/JY.Control/Base/LBIndustrialCtrlBase.cs b/JY.Control/Base/LBIndustrialCtrlBase.cs new file mode 100644 index 0000000..44616e9 --- /dev/null +++ b/JY.Control/Base/LBIndustrialCtrlBase.cs @@ -0,0 +1,249 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JYControl +{ + /// + /// Base class for the IndustrialCtrls + /// + public partial class LBIndustrialCtrlBase : UserControl + { + #region (* Constructor *) + public LBIndustrialCtrlBase() + { + InitializeComponent(); + + // Set the styles for drawing + SetStyle(ControlStyles.AllPaintingInWmPaint | + ControlStyles.ResizeRedraw | + ControlStyles.DoubleBuffer | + ControlStyles.SupportsTransparentBackColor, + true); + + // Transparent background + this.BackColor = Color.Transparent; + + // Creation of the default renderer + this._defaultRenderer = CreateDefaultRenderer(); + if (this._defaultRenderer != null) + this._defaultRenderer.Control = this; + } + #endregion + + #region (* Properties *) + /// + /// Default renderer of the control + /// + private ILBRenderer _defaultRenderer = null; + [Browsable(false)] + public ILBRenderer DefaultRenderer + { + get { return this._defaultRenderer; } + } + + /// + /// User defined renderer + /// + private ILBRenderer _renderer = null; + [Browsable(false)] + public ILBRenderer Renderer + { + set + { + // set the renderer + this._renderer = value; + if (this._renderer != null) + { + // Set the control tu the renderer + this._renderer.Control = this; + // Update the renderer + this._renderer.Update(); + } + + // Redraw the renderer + Invalidate(); + } + get { return this._renderer; } + } + #endregion + + #region (* Events delegates *) + /// + /// Font change event + /// + /// + [System.ComponentModel.EditorBrowsableAttribute()] + protected override void OnFontChanged(EventArgs e) + { + // Calculate dimensions + this.CalculateDimensions(); + } + /// + /// SizeChanged event + /// + /// + [System.ComponentModel.EditorBrowsableAttribute()] + protected override void OnSizeChanged(EventArgs e) + { + // Default + base.OnSizeChanged(e); + // Calculate al the data for + // drawing the control + this.CalculateDimensions(); + // Redraw + this.Invalidate(); + } + + /// + /// Resize event + /// + /// + protected override void OnResize(EventArgs e) + { + base.OnResize(e); + // Calculate al the data for + // drawing the control + this.CalculateDimensions(); + // Redraw + this.Invalidate(); + } + /// + /// Paint event + /// + /// + [System.ComponentModel.EditorBrowsableAttribute()] + protected override void OnPaint(PaintEventArgs e) + { + // Rectangle of the control + RectangleF _rc = new RectangleF(0, 0, this.Width, this.Height); + e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; + + // Call the default renderer if the user + // rendere is null + if (this.Renderer == null) + { + this.DefaultRenderer.Draw(e.Graphics); + return; + } + + // Draw with the user renderer + this.Renderer.Draw(e.Graphics); + } + #endregion + + #region (* Virtual method *) + /// + /// Call from the constructor to create the default renderer + /// + /// + protected virtual ILBRenderer CreateDefaultRenderer() + { + return new LBRendererBase(); + } + + /// + /// Calculate the dimensions of the control + /// + protected virtual void CalculateDimensions() + { + this.DefaultRenderer.Update(); + + // Update the data in the renderer + if (this.Renderer != null) + this.Renderer.Update(); + + this.Invalidate(); + } + #endregion + } + + /// + /// Base class for the controls renderer + /// + public class LBRendererBase : ILBRenderer + { + #region (* Constructor *) + public LBRendererBase() + { + } + #endregion + + #region (* IDisposable implementation *) + public void Dispose() + { + this.OnDispose(); + } + #endregion + + #region (* Properties *) + /// + /// Associated control + /// + protected object _control = null; + public object Control + { + set { this._control = value; } + get { return this._control; } + } + #endregion + + #region (* Virtual methods *) + /// + /// Dispose the resource of the object + /// + public virtual void OnDispose() + { + } + + /// + /// Update the renderer + /// + /// + public virtual bool Update() + { + return false; + } + + /// + /// Drawing method + /// + /// + public virtual void Draw(Graphics Gr) + { + // Check the graphics + if (Gr == null) + throw new ArgumentNullException("Gr"); + + // Check the control + Control ctrl = this.Control as Control; + if (ctrl == null) + throw new NullReferenceException("Associated control is not valid"); + + // Default drawing + Rectangle rc = ctrl.Bounds; + + Gr.FillRectangle(Brushes.White, ctrl.Bounds); + Gr.DrawRectangle(Pens.Black, ctrl.Bounds); + + Gr.DrawLine(Pens.Red, + ctrl.Left, + ctrl.Top, + ctrl.Right, + ctrl.Bottom); + + Gr.DrawLine(Pens.Red, + ctrl.Right, + ctrl.Top, + ctrl.Left, + ctrl.Bottom); + } + #endregion + } +} diff --git a/JY.Control/Base/LedRenderer.cs b/JY.Control/Base/LedRenderer.cs new file mode 100644 index 0000000..3199d60 --- /dev/null +++ b/JY.Control/Base/LedRenderer.cs @@ -0,0 +1,271 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JYControl +{ + /// + /// Base class for the led renderers + /// + public class LBLedRenderer : LBRendererBase + { + #region (* Variables *) + private RectangleF drawRect; + private RectangleF rectLed; + private RectangleF rectLabel; + #endregion + + #region (* Properies *) + /// + /// Get the associated led object + /// + public LBLed Led + { + get { return this.Control as LBLed; } + } + #endregion + + #region (* Overrided method *) + /// + /// Update the rectangles for drawing + /// + /// + public override bool Update() + { + // Check Led object + if (this.Led == null) + throw new NullReferenceException("Invalid 'Led' object"); + + // Dati del rettangolo + float x, y, w, h; + x = 0; + y = 0; + w = this.Led.Size.Width; + h = this.Led.Size.Height; + + // Rettangolo di disegno + drawRect.X = x; + drawRect.Y = y; + drawRect.Width = w - 2; + drawRect.Height = h - 2; + if (drawRect.Width <= 0) + drawRect.Width = 20; + if (drawRect.Height <= 0) + drawRect.Height = 20; + + this.rectLed = drawRect; + this.rectLabel = drawRect; + + if (this.Led.LabelPosition == LBLed.LedLabelPosition.Bottom) + { + this.rectLed.X = (this.rectLed.Width * 0.5F) - (this.Led.LedSize.Width * 0.5F); + this.rectLed.Width = this.Led.LedSize.Width; + this.rectLed.Height = this.Led.LedSize.Height; + + this.rectLabel.Y = this.rectLed.Bottom; + } + + else if (this.Led.LabelPosition == LBLed.LedLabelPosition.Top) + { + this.rectLed.X = (this.rectLed.Width * 0.5F) - (this.Led.LedSize.Width * 0.5F); + this.rectLed.Y = this.rectLed.Height - this.Led.LedSize.Height; + this.rectLed.Width = this.Led.LedSize.Width; + this.rectLed.Height = this.Led.LedSize.Height; + + this.rectLabel.Height = this.rectLed.Top; + } + + else if (this.Led.LabelPosition == LBLed.LedLabelPosition.Left) + { + this.rectLed.X = this.rectLed.Width - this.Led.LedSize.Width; + this.rectLed.Width = this.Led.LedSize.Width; + this.rectLed.Height = this.Led.LedSize.Height; + + this.rectLabel.Width = this.rectLabel.Width - this.rectLed.Width; + } + + else if (this.Led.LabelPosition == LBLed.LedLabelPosition.Right) + { + this.rectLed.Width = this.Led.LedSize.Width; + this.rectLed.Height = this.Led.LedSize.Height; + + this.rectLabel.X = this.rectLed.Right; + } + + return true; + } + + /// + /// Draw the led object + /// + /// + public override void Draw(Graphics Gr) + { + if (Gr == null) + throw new ArgumentNullException("Gr"); + + LBLed ctrl = this.Led; + if (ctrl == null) + throw new NullReferenceException("Associated control is not valid"); + + Rectangle rc = ctrl.Bounds; + + this.DrawBackground(Gr, rc); + + if (this.rectLed.Width <= 0) + this.rectLed.Width = rectLabel.Width; + if (this.rectLed.Height <= 0) + this.rectLed.Height = ctrl.LedSize.Height; + + this.DrawLed(Gr, this.rectLed); + + this.DrawLabel(Gr, this.rectLabel); + } + #endregion + + #region (* Virtual method *) + /// + /// Draw the background of the control + /// + /// + /// + /// + public virtual bool DrawBackground(Graphics Gr, RectangleF rc) + { + if (this.Led == null) + return false; + + Color c = this.Led.BackColor; + SolidBrush br = new SolidBrush(c); + Pen pen = new Pen(c); + + Rectangle _rcTmp = new Rectangle(0, 0, this.Led.Width, this.Led.Height); + Gr.DrawRectangle(pen, _rcTmp); + Gr.FillRectangle(br, rc); + + br.Dispose(); + pen.Dispose(); + + return true; + } + + /// + /// Draw the body of the control + /// + /// + /// + /// + public virtual bool DrawLed(Graphics Gr, RectangleF rc) + { + if (this.Led == null) + return false; + + Color cDarkOff = LBColorManager.StepColor(Color.LightGray, 20); + Color cDarkOn = LBColorManager.StepColor(this.Led.LedColor, 60); + + LinearGradientBrush brOff = new LinearGradientBrush(rc, + Color.Gray, + cDarkOff, + 45); + + LinearGradientBrush brOn = new LinearGradientBrush(rc, + this.Led.LedColor, + cDarkOn, + 45); + if (this.Led.State == LBLed.LedState.Blink) + { + if (this.Led.BlinkIsOn == false) + { + if (this.Led.Style == LBLed.LedStyle.Circular) + Gr.FillEllipse(brOff, rc); + else if (this.Led.Style == LBLed.LedStyle.Rectangular) + Gr.FillRectangle(brOff, rc); + } + else + { + if (this.Led.Style == LBLed.LedStyle.Circular) + Gr.FillEllipse(brOn, rc); + else if (this.Led.Style == LBLed.LedStyle.Rectangular) + Gr.FillRectangle(brOn, rc); + } + } + else + { + if (this.Led.State == LBLed.LedState.Off) + { + if (this.Led.Style == LBLed.LedStyle.Circular) + Gr.FillEllipse(brOff, rc); + else if (this.Led.Style == LBLed.LedStyle.Rectangular) + Gr.FillRectangle(brOff, rc); + } + else + { + if (this.Led.Style == LBLed.LedStyle.Circular) + Gr.FillEllipse(brOn, rc); + else if (this.Led.Style == LBLed.LedStyle.Rectangular) + Gr.FillRectangle(brOn, rc); + } + } + + brOff.Dispose(); + brOn.Dispose(); + + return true; + } + + /// + /// Draw the text of the control + /// + /// + /// + /// + public virtual bool DrawLabel(Graphics Gr, RectangleF rc) + { + if (this.Led == null) + return false; + + if (this.Led.Label == String.Empty) + return false; + + SizeF size = Gr.MeasureString(this.Led.Label, this.Led.Font); + + SolidBrush br1 = new SolidBrush(this.Led.ForeColor); + + float hPos = 0; + float vPos = 0; + switch (this.Led.LabelPosition) + { + case LBLed.LedLabelPosition.Top: + hPos = (float)(rc.Width * 0.5F) - (float)(size.Width * 0.5F); + vPos = rc.Bottom - size.Height; + break; + + case LBLed.LedLabelPosition.Bottom: + hPos = (float)(rc.Width * 0.5F) - (float)(size.Width * 0.5F); + break; + + case LBLed.LedLabelPosition.Left: + hPos = rc.Width - size.Width; + vPos = (float)(rc.Height * 0.5F) - (float)(size.Height * 0.5F); + break; + + case LBLed.LedLabelPosition.Right: + vPos = (float)(rc.Height * 0.5F) - (float)(size.Height * 0.5F); + break; + } + + Gr.DrawString(this.Led.Label, + this.Led.Font, + br1, + rc.Left + hPos, + rc.Top + vPos); + + return true; + } + #endregion + } +} diff --git a/JY.Control/Base/NativeMethods.cs b/JY.Control/Base/NativeMethods.cs new file mode 100644 index 0000000..bbe027e --- /dev/null +++ b/JY.Control/Base/NativeMethods.cs @@ -0,0 +1,310 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace JYControl +{ + internal class NativeMethods + { + /// + /// Enum ComboBoxButtonState + /// + public enum ComboBoxButtonState + { + /// + /// The state system none + /// + STATE_SYSTEM_NONE, + /// + /// The state system invisible + /// + STATE_SYSTEM_INVISIBLE = 32768, + /// + /// The state system pressed + /// + STATE_SYSTEM_PRESSED = 8 + } + + /// + /// Struct RECT + /// + public struct RECT + { + /// + /// The left + /// + public int Left; + + /// + /// The top + /// + public int Top; + + /// + /// The right + /// + public int Right; + + /// + /// The bottom + /// + public int Bottom; + + /// + /// Gets the rect. + /// + /// The rect. + public Rectangle Rect + { + get + { + return new Rectangle(this.Left, this.Top, this.Right - this.Left, this.Bottom - this.Top); + } + } + + /// + /// Gets the size. + /// + /// The size. + public Size Size + { + get + { + return new Size(this.Right - this.Left, this.Bottom - this.Top); + } + } + + /// + /// Initializes a new instance of the struct. + /// + /// The left. + /// The top. + /// The right. + /// The bottom. + public RECT(int left, int top, int right, int bottom) + { + this.Left = left; + this.Top = top; + this.Right = right; + this.Bottom = bottom; + } + + /// + /// Initializes a new instance of the struct. + /// + /// The rect. + public RECT(Rectangle rect) + { + this.Left = rect.Left; + this.Top = rect.Top; + this.Right = rect.Right; + this.Bottom = rect.Bottom; + } + + /// + /// Froms the xywh. + /// + /// The x. + /// The y. + /// The width. + /// The height. + /// NativeMethods.RECT. + public static NativeMethods.RECT FromXYWH(int x, int y, int width, int height) + { + return new NativeMethods.RECT(x, y, x + width, y + height); + } + + /// + /// Froms the rectangle. + /// + /// The rect. + /// NativeMethods.RECT. + public static NativeMethods.RECT FromRectangle(Rectangle rect) + { + return new NativeMethods.RECT(rect.Left, rect.Top, rect.Right, rect.Bottom); + } + } + + /// + /// Struct PAINTSTRUCT + /// + public struct PAINTSTRUCT + { + /// + /// The HDC + /// + public IntPtr hdc; + + /// + /// The f erase + /// + public int fErase; + + /// + /// The rc paint + /// + public NativeMethods.RECT rcPaint; + + /// + /// The f restore + /// + public int fRestore; + + /// + /// The f inc update + /// + public int fIncUpdate; + + /// + /// The reserved1 + /// + public int Reserved1; + + /// + /// The reserved2 + /// + public int Reserved2; + + /// + /// The reserved3 + /// + public int Reserved3; + + /// + /// The reserved4 + /// + public int Reserved4; + + /// + /// The reserved5 + /// + public int Reserved5; + + /// + /// The reserved6 + /// + public int Reserved6; + + /// + /// The reserved7 + /// + public int Reserved7; + + /// + /// The reserved8 + /// + public int Reserved8; + } + + /// + /// Struct ComboBoxInfo + /// + public struct ComboBoxInfo + { + /// + /// The cb size + /// + public int cbSize; + + /// + /// The rc item + /// + public NativeMethods.RECT rcItem; + + /// + /// The rc button + /// + public NativeMethods.RECT rcButton; + + /// + /// The state button + /// + public NativeMethods.ComboBoxButtonState stateButton; + + /// + /// The HWND combo + /// + public IntPtr hwndCombo; + + /// + /// The HWND edit + /// + public IntPtr hwndEdit; + + /// + /// The HWND list + /// + public IntPtr hwndList; + } + + /// + /// The wm paint + /// + public const int WM_PAINT = 15; + + /// + /// The wm setredraw + /// + public const int WM_SETREDRAW = 11; + + /// + /// The false + /// + public static readonly IntPtr FALSE = IntPtr.Zero; + + /// + /// The true + /// + public static readonly IntPtr TRUE = new IntPtr(1); + + /// + /// Gets the ComboBox information. + /// + /// The HWND combo. + /// The information. + /// true if XXXX, false otherwise. + [DllImport("user32.dll")] + public static extern bool GetComboBoxInfo(IntPtr hwndCombo, ref NativeMethods.ComboBoxInfo info); + + /// + /// Gets the window rect. + /// + /// The HWND. + /// The lp rect. + /// System.Int32. + [DllImport("user32.dll")] + public static extern int GetWindowRect(IntPtr hwnd, ref NativeMethods.RECT lpRect); + + /// + /// Begins the paint. + /// + /// The h WND. + /// The ps. + /// IntPtr. + [DllImport("user32.dll")] + public static extern IntPtr BeginPaint(IntPtr hWnd, ref NativeMethods.PAINTSTRUCT ps); + + /// + /// Ends the paint. + /// + /// The h WND. + /// The ps. + /// true if XXXX, false otherwise. + [DllImport("user32.dll")] + public static extern bool EndPaint(IntPtr hWnd, ref NativeMethods.PAINTSTRUCT ps); + + /// + /// Sends the message. + /// + /// The h WND. + /// The MSG. + /// The w parameter. + /// The l parameter. + [DllImport("user32.dll")] + public static extern void SendMessage(IntPtr hWnd, int msg, int wParam, int lParam); + } +} diff --git a/JY.Control/Base/Renderer.cs b/JY.Control/Base/Renderer.cs new file mode 100644 index 0000000..7f473ec --- /dev/null +++ b/JY.Control/Base/Renderer.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JYControl +{ + /// + /// Renderer interface for all + /// LBSoft.IndustrialCtrls renderer + /// + public interface ILBRenderer : IDisposable + { + object Control + { + set; + get; + } + bool Update(); + void Draw(Graphics Gr); + } +} diff --git a/JY.Control/Blower.cs b/JY.Control/Blower.cs new file mode 100644 index 0000000..fef35e5 --- /dev/null +++ b/JY.Control/Blower.cs @@ -0,0 +1,402 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.ComponentModel; + +namespace JYControl +{ + /// + /// Class UCBlower. + /// Implements the + /// + /// + public class Blower : UserControl + { + /// + /// The entrance direction + /// + private BlowerEntranceDirection entranceDirection = BlowerEntranceDirection.None; + + /// + /// Gets or sets the entrance direction. + /// + /// The entrance direction. + [Description("入口方向"), Category("自定义")] + public BlowerEntranceDirection EntranceDirection + { + get { return entranceDirection; } + set + { + entranceDirection = value; + Refresh(); + } + } + + /// + /// The exit direction + /// + private BlowerExitDirection exitDirection = BlowerExitDirection.Right; + + /// + /// Gets or sets the exit direction. + /// + /// The exit direction. + [Description("出口方向"), Category("自定义")] + public BlowerExitDirection ExitDirection + { + get { return exitDirection; } + set + { + exitDirection = value; + Refresh(); + } + } + + /// + /// The blower color + /// + private Color blowerColor = Color.FromArgb(255, 77, 59); + + /// + /// Gets or sets the color of the blower. + /// + /// The color of the blower. + [Description("风机颜色"), Category("自定义")] + public Color BlowerColor + { + get { return blowerColor; } + set + { + blowerColor = value; + Refresh(); + } + } + + /// + /// The fan color + /// + private Color fanColor = Color.FromArgb(3, 169, 243); + + /// + /// Gets or sets the color of the fan. + /// + /// The color of the fan. + [Description("风叶颜色"), Category("自定义")] + public Color FanColor + { + get { return fanColor; } + set + { + fanColor = value; + Refresh(); + } + } + TurnAround turnAround = JYControl.TurnAround.None; + [Description("风叶旋转方向,None表示不旋转"), Category("自定义")] + public TurnAround TurnAround + { + get { return turnAround; } + set + { + turnAround = value; + if (value == JYControl.TurnAround.None) + { + timer1.Enabled = false; + jiaodu = 0; + Refresh(); + } + else + timer1.Enabled = true; + } + } + + private int turnSpeed = 100; + private int jiaodu = 0; + private Timer timer1; + private IContainer components; + + [Description("风叶旋转速度,100-1000,值越小 速度越快"), Category("自定义")] + public int TurnSpeed + { + get { return turnSpeed; } + set + { + if (value < 0 || value > 1000) + return; + turnSpeed = value; + timer1.Interval = value; + } + } + + /// + /// 是否显示底座 + /// + private bool isDZ = false; + + /// + /// 是否显示底座 + /// + /// 是否显示底座 + [Description("是否显示底座"), Category("自定义")] + public bool IsDZ + { + get { return isDZ; } + set + { + isDZ = value; + Refresh(); + } + } + + /// + /// The m rect working + /// + Rectangle m_rectWorking; + + /// + /// Initializes a new instance of the class. + /// + public Blower() + { + InitializeComponent(); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.DoubleBuffer, true); + this.SetStyle(ControlStyles.ResizeRedraw, true); + this.SetStyle(ControlStyles.Selectable, true); + this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); + this.SetStyle(ControlStyles.UserPaint, true); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.SizeChanged += UCBlower_SizeChanged; + this.Size = new Size(120, 120); + + } + + /// + /// Handles the SizeChanged event of the UCBlower control. + /// + /// The source of the event. + /// The instance containing the event data. + void UCBlower_SizeChanged(object sender, EventArgs e) + { + int intMin = Math.Min(this.Width, this.Height); + m_rectWorking = new Rectangle((this.Width - (intMin / 2 * 2)) / 2, (this.Height - (intMin / 2 * 2)) / 2, (intMin / 2 * 2), (intMin / 2 * 2)); + } + + /// + /// 引发 事件。 + /// + /// 包含事件数据的 。 + protected override void OnPaint(PaintEventArgs e) + { + base.OnPaint(e); + var g = e.Graphics; + g.SetGDIHigh(); + GraphicsPath pathLineIn = new GraphicsPath(); + GraphicsPath pathLineOut = new GraphicsPath(); + int intLinePenWidth = 0; + + switch (exitDirection) + { + case BlowerExitDirection.Left: + g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(0, m_rectWorking.Top, this.Width / 2, m_rectWorking.Height / 2 - 5)); + intLinePenWidth = m_rectWorking.Height / 2 - 5; + pathLineOut.AddLine(new Point(-10, m_rectWorking.Top + (m_rectWorking.Height / 2 - 5) / 2), new Point(m_rectWorking.Left + m_rectWorking.Width / 2, m_rectWorking.Top + (m_rectWorking.Height / 2 - 5) / 2)); + g.DrawLine(new Pen(new SolidBrush(blowerColor), 3), new Point(1, m_rectWorking.Top - 2), new Point(1, m_rectWorking.Top + (m_rectWorking.Height / 2 - 5) + 2)); + break; + case BlowerExitDirection.Right: + g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(this.Width / 2, m_rectWorking.Top, this.Width / 2, m_rectWorking.Height / 2 - 5)); + intLinePenWidth = m_rectWorking.Height / 2 - 5; + pathLineOut.AddLine(new Point(this.Width + 10, m_rectWorking.Top + (m_rectWorking.Height / 2 - 5) / 2), new Point(m_rectWorking.Left + m_rectWorking.Width / 2, m_rectWorking.Top + (m_rectWorking.Height / 2 - 5) / 2)); + g.DrawLine(new Pen(new SolidBrush(blowerColor), 3), new Point(this.Width - 2, m_rectWorking.Top - 2), new Point(this.Width - 2, m_rectWorking.Top + (m_rectWorking.Height / 2 - 5) + 2)); + break; + case BlowerExitDirection.Up: + g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(m_rectWorking.Right - (m_rectWorking.Width / 2 - 5), 0, m_rectWorking.Width / 2 - 5, this.Height / 2)); + intLinePenWidth = m_rectWorking.Width / 2 - 5; + pathLineOut.AddLine(new Point(m_rectWorking.Right - (m_rectWorking.Width / 2 - 5) / 2, -10), new Point(m_rectWorking.Right - (m_rectWorking.Width / 2 - 5) / 2, m_rectWorking.Top + m_rectWorking.Height / 2)); + g.DrawLine(new Pen(new SolidBrush(blowerColor), 3), new Point(m_rectWorking.Right + 2, 1), new Point(m_rectWorking.Right - (m_rectWorking.Width / 2 - 5) - 2, 1)); + break; + } + + switch (entranceDirection) + { + case BlowerEntranceDirection.Left: + g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(0, m_rectWorking.Bottom - m_rectWorking.Height / 2 + 5, this.Width / 2, m_rectWorking.Height / 2 - 5)); + pathLineIn.AddLine(new Point(-10, m_rectWorking.Bottom - m_rectWorking.Height / 2 + 5 + (m_rectWorking.Height / 2 - 5) / 2), new Point(m_rectWorking.Left + m_rectWorking.Width / 2, m_rectWorking.Bottom - m_rectWorking.Height / 2 + 5 + (m_rectWorking.Height / 2 - 5) / 2)); + g.DrawLine(new Pen(new SolidBrush(blowerColor), 3), new Point(1, m_rectWorking.Bottom - m_rectWorking.Height / 2 + 5 - 2), new Point(1, m_rectWorking.Bottom - m_rectWorking.Height / 2 + 5 + (m_rectWorking.Height / 2 - 5) + 2)); + break; + case BlowerEntranceDirection.Right: + g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(this.Width / 2, m_rectWorking.Bottom - m_rectWorking.Height / 2 + 5, this.Width / 2, m_rectWorking.Height / 2 - 5)); + pathLineIn.AddLine(new Point(this.Width + 10, m_rectWorking.Bottom - m_rectWorking.Height / 2 + 5 + (m_rectWorking.Height / 2 - 5) / 2), new Point(m_rectWorking.Left + m_rectWorking.Width / 2, m_rectWorking.Bottom - m_rectWorking.Height / 2 + 5 + (m_rectWorking.Height / 2 - 5) / 2)); + g.DrawLine(new Pen(new SolidBrush(blowerColor), 3), new Point(this.Width - 2, m_rectWorking.Bottom - m_rectWorking.Height / 2 + 5 - 2), new Point(this.Width - 2, m_rectWorking.Bottom - m_rectWorking.Height / 2 + 5 + (m_rectWorking.Height / 2 - 5) + 2)); + break; + case BlowerEntranceDirection.Up: + g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(m_rectWorking.Left, 0, m_rectWorking.Width / 2 - 5, this.Height / 2)); + pathLineIn.AddLine(new Point(m_rectWorking.Left + (m_rectWorking.Width / 2 - 5) / 2, -10), new Point(m_rectWorking.Left + (m_rectWorking.Width / 2 - 5) / 2, m_rectWorking.Top + m_rectWorking.Height / 2)); + g.DrawLine(new Pen(new SolidBrush(blowerColor), 3), new Point(m_rectWorking.Left - 2, 1), new Point(m_rectWorking.Left + (m_rectWorking.Width / 2 - 5) + 2, 1)); + break; + } + + //渐变色 + int _intPenWidth = intLinePenWidth; + int intCount = _intPenWidth / 2 / 4; + for (int i = 0; i < intCount; i++) + { + int _penWidth = _intPenWidth / 2 - 4 * i; + if (_penWidth <= 0) + _penWidth = 1; + if (entranceDirection != BlowerEntranceDirection.None) + g.DrawPath(new Pen(new SolidBrush(Color.FromArgb(40, Color.White.R, Color.White.G, Color.White.B)), _penWidth), pathLineIn); + g.DrawPath(new Pen(new SolidBrush(Color.FromArgb(40, Color.White.R, Color.White.G, Color.White.B)), _penWidth), pathLineOut); + if (_penWidth == 1) + break; + } + + //底座 + if (isDZ) + { + GraphicsPath gpDZ = new GraphicsPath(); + gpDZ.AddLines(new Point[] + { + new Point( m_rectWorking.Left+m_rectWorking.Width/2,m_rectWorking.Top+m_rectWorking.Height/2), + new Point(m_rectWorking.Left+2,this.Height), + new Point(m_rectWorking.Right-2,this.Height) + }); + gpDZ.CloseAllFigures(); + g.FillPath(new SolidBrush(blowerColor), gpDZ); + g.FillPath(new SolidBrush(Color.FromArgb(50, Color.White)), gpDZ); + g.DrawLine(new Pen(new SolidBrush(blowerColor), 3), new Point(m_rectWorking.Left, this.Height - 2), new Point(m_rectWorking.Right, this.Height - 2)); + } + + + //中心 + g.FillEllipse(new SolidBrush(blowerColor), m_rectWorking); + g.FillEllipse(new SolidBrush(Color.FromArgb(20, Color.White)), m_rectWorking); + + + //扇叶 + Rectangle _rect = new Rectangle(m_rectWorking.Left + (m_rectWorking.Width - (m_rectWorking.Width / 3 * 2)) / 2, m_rectWorking.Top + (m_rectWorking.Height - (m_rectWorking.Width / 3 * 2)) / 2, (m_rectWorking.Width / 3 * 2), (m_rectWorking.Width / 3 * 2)); + + int _splitCount = 8; + float fltSplitValue = 360F / (float)_splitCount; + for (int i = 0; i <= _splitCount; i++) + { + float fltAngle = (fltSplitValue * i - 180) % 360 + jiaodu; + float fltY1 = (float)(_rect.Top + _rect.Width / 2 - ((_rect.Width / 2) * Math.Sin(Math.PI * (fltAngle / 180.00F)))); + float fltX1 = (float)(_rect.Left + (_rect.Width / 2 - ((_rect.Width / 2) * Math.Cos(Math.PI * (fltAngle / 180.00F))))); + float fltY2 = 0; + float fltX2 = 0; + + fltY2 = (float)(_rect.Top + _rect.Width / 2 - ((_rect.Width / 4) * Math.Sin(Math.PI * (fltAngle / 180.00F)))); + fltX2 = (float)(_rect.Left + (_rect.Width / 2 - ((_rect.Width / 4) * Math.Cos(Math.PI * (fltAngle / 180.00F))))); + + g.DrawLine(new Pen(new SolidBrush(fanColor), 2), new PointF(fltX1, fltY1), new PointF(fltX2, fltY2)); + } + + g.FillEllipse(new SolidBrush(fanColor), new Rectangle(_rect.Left + _rect.Width / 2 - _rect.Width / 4 + 2, _rect.Top + _rect.Width / 2 - _rect.Width / 4 + 2, _rect.Width / 2 - 4, _rect.Width / 2 - 4)); + g.FillEllipse(new SolidBrush(Color.FromArgb(50, Color.White)), new Rectangle(_rect.Left - 5, _rect.Top - 5, _rect.Width + 10, _rect.Height + 10)); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.SuspendLayout(); + // + // timer1 + // + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // UCBlower + // + this.Name = "Blower"; + this.ResumeLayout(false); + + } + + private void timer1_Tick(object sender, EventArgs e) + { + if (turnAround == JYControl.TurnAround.Clockwise) + { + jiaodu += 15; + if (jiaodu == 45) + jiaodu = 0; + } + else if (turnAround == JYControl.TurnAround.Counterclockwise) + { + jiaodu -= 15; + if (jiaodu == -45) + jiaodu = 0; + } + + Refresh(); + } + } + /// + /// Enum BlowerEntranceDirection + /// + public enum BlowerEntranceDirection + { + /// + /// The none + /// + None, + /// + /// The left + /// + Left, + /// + /// The right + /// + Right, + /// + /// Up + /// + Up + } + + /// + /// Enum BlowerExitDirection + /// + public enum BlowerExitDirection + { + /// + /// The none + /// + None, + /// + /// The left + /// + Left, + /// + /// The right + /// + Right, + /// + /// Up + /// + Up + } + /// + /// 旋转方向 + /// + public enum TurnAround + { + /// + /// 不旋转 + /// + None, + /// + /// 顺时针 + /// + Clockwise, + /// + /// 逆时针 + /// + Counterclockwise + } +} diff --git a/JY.Control/Blower.resx b/JY.Control/Blower.resx new file mode 100644 index 0000000..1f666f2 --- /dev/null +++ b/JY.Control/Blower.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/JY.Control/CircleCountValue.Designer.cs b/JY.Control/CircleCountValue.Designer.cs new file mode 100644 index 0000000..4aac48f --- /dev/null +++ b/JY.Control/CircleCountValue.Designer.cs @@ -0,0 +1,37 @@ + +namespace JYControl +{ + partial class CircleCountValue + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/JY.Control/CircleCountValue.cs b/JY.Control/CircleCountValue.cs new file mode 100644 index 0000000..f722c61 --- /dev/null +++ b/JY.Control/CircleCountValue.cs @@ -0,0 +1,144 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace JYControl +{ + public partial class CircleCountValue : Control + { + //这个写最上面是因为我自己也不懂是啥意思,只知道界面控件重绘容易产生闪烁的问题,这个加了就不会有 + //解决控件批量更新时带来的闪烁 + protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.ExStyle |= 0x02000000; return cp; } } + + //-------------------颜色 + private Color bgColor = Color.FromArgb(224, 224, 224); //背景边框颜色 + private Color sectorColor = Color.FromArgb(109, 179, 63); //扇形颜色 + [Category("控件属性")] + [Description("背景边框颜色")] + public Color BgColor + { + get { return this.bgColor; } + set + { + this.bgColor = value; + this.Invalidate(); + } + } + + [Category("控件属性")] + [Description("扇形颜色")] + public Color SectorColor + { + get { return this.sectorColor; } + set + { + this.sectorColor = value; + this.Invalidate(); + } + } + + private int borderWidth = 2;//边框宽度 + [Category("控件属性")] + [Description("边框宽度")] + public int BorderWidth + { + get { return this.borderWidth; } + set + { + this.borderWidth = value; + this.Invalidate(); + } + } + + /// + /// 圆形进度条实心 + /// + public CircleCountValue() + { + InitControl(); + this.SizeChanged += delegate + { + this.Invalidate(); //重绘控件 + }; + } + + int maxValue = 500000; //进度最大值 + private int countValue = 0; + /// + /// 进度值 + /// + /// + [Category("控件属性")] + [Description("进度值,最大值500000")] + public int CountValue + { + get { return this.countValue; } + set + { + if (value > this.maxValue) + { + return; + } + this.countValue = value; + this.Invalidate(); + } + } + + /// + /// 初始化控件参数 + /// + private void InitControl() + { + this.Width = 200; + this.Height = 200; + } + + //对Control进行绘制 + protected override void OnPaint(PaintEventArgs e) + { + DrawShape(e.Graphics); //绘制控件样式 + } + + /// + /// 画图 + /// + /// 画图工具类 + private void DrawShape(Graphics g) + { + if (this.Width < borderWidth * 4 || this.Height < borderWidth * 4) + { + return; + } + g.SmoothingMode = SmoothingMode.AntiAlias; //消除锯齿,也就是抗锯齿什么鬼东西 + g.InterpolationMode = InterpolationMode.HighQualityBicubic; + g.CompositingQuality = CompositingQuality.HighQuality; + + + RectangleF bg_rectangle = new RectangleF(0 + borderWidth, 0 + borderWidth, Width - borderWidth * 2, Height - borderWidth * 2); //控件整体坐标 + + g.DrawEllipse(new Pen(bgColor, borderWidth), bg_rectangle); //画背景圆 + + + + Rectangle rl = new Rectangle(0 + borderWidth * 2, 0 + borderWidth * 2, this.Width - borderWidth * 4, this.Height - borderWidth * 4); + + decimal topAngle = (this.countValue * 1.0M / this.maxValue) * 360M;//计算进度条划过的度数 + g.FillPie(new SolidBrush(sectorColor), rl, 0, (float)topAngle); //填充扇形 + + //SizeF proValSize = g.MeasureString(this.progress.ToString() + "%", this.Font);//计算文字的范围 + SizeF proValSize = g.MeasureString(this.countValue.ToString(), this.Font);//计算文字的范围 + + //g.DrawString(this.progress.ToString() + "%", this.Font, new SolidBrush(this.ForeColor), + g.DrawString(this.countValue.ToString(), this.Font, new SolidBrush(this.ForeColor), + bg_rectangle.X + bg_rectangle.Width / 2 - proValSize.Width / 2, bg_rectangle.Y + bg_rectangle.Height / 2 - proValSize.Height / 2); + } + + + } +} + diff --git a/JY.Control/CircleProgramBar.cs b/JY.Control/CircleProgramBar.cs new file mode 100644 index 0000000..9a17658 --- /dev/null +++ b/JY.Control/CircleProgramBar.cs @@ -0,0 +1,141 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace JYControl +{ + public class CircleProgramBar : Control + { + //这个写最上面是因为我自己也不懂是啥意思,只知道界面控件重绘容易产生闪烁的问题,这个加了就不会有 + //解决控件批量更新时带来的闪烁 + protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.ExStyle |= 0x02000000; return cp; } } + + //-------------------颜色 + private Color bgColor = Color.FromArgb(224, 224, 224); //背景边框颜色 + private Color sectorColor = Color.FromArgb(109, 179, 63); //扇形颜色 + [Category("控件属性")] + [Description("背景边框颜色")] + public Color BgColor + { + get { return this.bgColor; } + set + { + this.bgColor = value; + this.Invalidate(); + } + } + + [Category("控件属性")] + [Description("扇形颜色")] + public Color SectorColor + { + get { return this.sectorColor; } + set + { + this.sectorColor = value; + this.Invalidate(); + } + } + + private int borderWidth = 2;//边框宽度 + [Category("控件属性")] + [Description("边框宽度")] + public int BorderWidth { + get { return this.borderWidth; } + set { + this.borderWidth = value; + this.Invalidate(); + } + } + + /// + /// 圆形进度条实心 + /// + public CircleProgramBar() + { + InitControl(); + this.SizeChanged += delegate + { + this.Invalidate(); //重绘控件 + }; + } + + int maxValue = 1000; //进度最大值 + private int progress = 0; + /// + /// 进度值 + /// + /// + [Category("控件属性")] + [Description("进度值,最大值1000")] + public int Progress + { + get { return this.progress; } + set + { + if (value > this.maxValue) + { + return; + } + this.progress = value; + this.Invalidate(); + } + } + + /// + /// 初始化控件参数 + /// + private void InitControl() + { + this.Width = 200; + this.Height = 200; + } + + //对Control进行绘制 + protected override void OnPaint(PaintEventArgs e) + { + DrawShape(e.Graphics); //绘制控件样式 + } + + /// + /// 画图 + /// + /// 画图工具类 + private void DrawShape(Graphics g) + { + if (this.Width < borderWidth*4 || this.Height < borderWidth*4) + { + return; + } + g.SmoothingMode = SmoothingMode.AntiAlias; //消除锯齿,也就是抗锯齿什么鬼东西 + g.InterpolationMode = InterpolationMode.HighQualityBicubic; + g.CompositingQuality = CompositingQuality.HighQuality; + + + RectangleF bg_rectangle = new RectangleF(0+ borderWidth, 0+ borderWidth, Width- borderWidth*2, Height- borderWidth*2); //控件整体坐标 + + g.DrawEllipse(new Pen(bgColor,borderWidth), bg_rectangle); //画背景圆 + + + + Rectangle rl = new Rectangle(0+ borderWidth*2, 0 + borderWidth*2, this.Width- borderWidth*4, this.Height- borderWidth*4); + + decimal topAngle = (this.progress * 1.0M / this.maxValue) * 360M;//计算进度条划过的度数 + g.FillPie(new SolidBrush(sectorColor), rl, 0, (float)topAngle); //填充扇形 + + //SizeF proValSize = g.MeasureString(this.progress.ToString() + "%", this.Font);//计算文字的范围 + SizeF proValSize = g.MeasureString(this.progress.ToString(), this.Font);//计算文字的范围 + + //g.DrawString(this.progress.ToString() + "%", this.Font, new SolidBrush(this.ForeColor), + g.DrawString(this.progress.ToString(), this.Font, new SolidBrush(this.ForeColor), + bg_rectangle.X + bg_rectangle.Width / 2 - proValSize.Width / 2, bg_rectangle.Y + bg_rectangle.Height / 2 - proValSize.Height / 2); + } + + + } +} diff --git a/JY.Control/IO_Instructions.Designer.cs b/JY.Control/IO_Instructions.Designer.cs new file mode 100644 index 0000000..92434a0 --- /dev/null +++ b/JY.Control/IO_Instructions.Designer.cs @@ -0,0 +1,83 @@ +namespace JYControl +{ + partial class IO_Instructions + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.ledControl = new JYControl.LedControl(); + this.LabelX = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // ledControl + // + this.ledControl.BorderWidth = 5; + this.ledControl.CenterColor = System.Drawing.Color.White; + this.ledControl.FlashInterval = 500; + this.ledControl.GapWidth = 5; + this.ledControl.IsBorder = false; + this.ledControl.IsFlash = false; + this.ledControl.IsHighLight = false; + this.ledControl.LampColor = new System.Drawing.Color[] { + System.Drawing.Color.Green, + System.Drawing.Color.Yellow}; + this.ledControl.LedColor = System.Drawing.Color.Green; + this.ledControl.LedFalseColor = System.Drawing.Color.Red; + this.ledControl.LedStatus = true; + this.ledControl.LedTrueColor = System.Drawing.Color.Green; + this.ledControl.Location = new System.Drawing.Point(0, 0); + this.ledControl.Name = "ledControl"; + this.ledControl.Size = new System.Drawing.Size(16, 16); + this.ledControl.TabIndex = 0; + // + // LabelX + // + this.LabelX.AutoSize = true; + this.LabelX.Location = new System.Drawing.Point(29, 3); + this.LabelX.Name = "LabelX"; + this.LabelX.Size = new System.Drawing.Size(29, 12); + this.LabelX.TabIndex = 2; + this.LabelX.Text = "描述"; + // + // IO_Instructions + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.LabelX); + this.Controls.Add(this.ledControl); + this.Name = "IO_Instructions"; + this.Size = new System.Drawing.Size(72, 18); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private LedControl ledControl; + private System.Windows.Forms.Label LabelX; + } +} diff --git a/JY.Control/IO_Instructions.cs b/JY.Control/IO_Instructions.cs new file mode 100644 index 0000000..2487389 --- /dev/null +++ b/JY.Control/IO_Instructions.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JYControl +{ + public partial class IO_Instructions : UserControl + { + public IO_Instructions() + { + InitializeComponent(); + + } + + public int IO_Value; + public string mstrCaption = ""; + public string mstrText = "输入描述"; + public bool Reversal, GreenOrRed; + + + + [Category("jason控件属性")] + [Description("是否开启反转")] + public bool AAReversal + { + get + { + return Reversal; + } + set + { + Reversal = value; + } + } + + [Category("jason控件属性")] + [Description("颜色变更绿色或者红色")] + public bool AAGreenOrRed + { + get + { + return GreenOrRed; + } + set + { + GreenOrRed = value; + } + } + + [Category("jason控件属性")] + [Description("控件名称")] + public string AAName + { + get + { + return mstrCaption; + } + set + { + mstrCaption = value; + } + } + + [Category("jason控件属性")] + [Description("控件描述")] + public string AAText + { + get + { + return mstrText; + } + set + { + mstrText = value; + LabelX.Text = AAText; + } + } + + [Category("jason控件属性")] + [Description("控件IO值")] + public int AAValue + { + get + { + return IO_Value; + } + set + { + IO_Value = value; + if (value == 1) + { + if (Reversal) + { + if (GreenOrRed) + { ledControl.LedTrueColor = Color.Red; } + else + { ledControl.LedTrueColor = Color.Green; } + } + else + { + if (GreenOrRed) + { ledControl.LedTrueColor = Color.Transparent; } + else + { ledControl.LedTrueColor = Color.Lime; } + } + + + } + else + { + if (Reversal) + { + if (GreenOrRed) + { ledControl.LedTrueColor = Color.Lime; } + else + { ledControl.LedTrueColor = Color.Red; } + } + else + { + if (GreenOrRed) + { ledControl.LedTrueColor = Color.Red; } + else + { ledControl.LedTrueColor = Color.Transparent; } + } + } + + } + } + } +} diff --git a/JY.Control/IO_Instructions.resx b/JY.Control/IO_Instructions.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/JY.Control/IO_Instructions.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/JY.Control/Image/list_add.png b/JY.Control/Image/list_add.png new file mode 100644 index 0000000..24d6534 Binary files /dev/null and b/JY.Control/Image/list_add.png differ diff --git a/JY.Control/Image/list_subtract.png b/JY.Control/Image/list_subtract.png new file mode 100644 index 0000000..ad178da Binary files /dev/null and b/JY.Control/Image/list_subtract.png differ diff --git a/JY.Control/Image/tips.png b/JY.Control/Image/tips.png new file mode 100644 index 0000000..bb8b8c5 Binary files /dev/null and b/JY.Control/Image/tips.png differ diff --git a/JY.Control/Image/下载.png b/JY.Control/Image/下载.png new file mode 100644 index 0000000..4b1f906 Binary files /dev/null and b/JY.Control/Image/下载.png differ diff --git a/JY.Control/Image/增加.png b/JY.Control/Image/增加.png new file mode 100644 index 0000000..1dcc8b4 Binary files /dev/null and b/JY.Control/Image/增加.png differ diff --git a/JY.Control/Image/查询.png b/JY.Control/Image/查询.png new file mode 100644 index 0000000..2a5d785 Binary files /dev/null and b/JY.Control/Image/查询.png differ diff --git a/JY.Control/Image/设置.png b/JY.Control/Image/设置.png new file mode 100644 index 0000000..cbe57d1 Binary files /dev/null and b/JY.Control/Image/设置.png differ diff --git a/JY.Control/Image/运行中.png b/JY.Control/Image/运行中.png new file mode 100644 index 0000000..84b49fa Binary files /dev/null and b/JY.Control/Image/运行中.png differ diff --git a/JY.Control/JY.Control.csproj b/JY.Control/JY.Control.csproj new file mode 100644 index 0000000..cfee48d --- /dev/null +++ b/JY.Control/JY.Control.csproj @@ -0,0 +1,167 @@ + + + + + Debug + AnyCPU + {01A2AA2C-9B80-41AA-9F47-3CB67E60AF24} + Library + Properties + JYControl + JY.Control + v4.8 + 512 + true + + + + true + full + false + ..\..\..\..\JY.Inspection\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + UserControl + + + LBIndustrialCtrlBase.cs + + + + + + UserControl + + + Component + + + Component + + + CircleCountValue.cs + + + UserControl + + + IO_Instructions.cs + + + UserControl + + + LBButton.cs + + + UserControl + + + LBLed.cs + + + UserControl + + + LedControl.cs + + + UserControl + + + LogManagerControl.cs + + + + True + True + Resources.resx + + + Component + + + PulseButton.cs + + + Component + + + Component + + + RoundButton.cs + + + Component + + + Component + + + TreeViewEx.cs + + + + + Blower.cs + + + IO_Instructions.cs + + + LBLed.cs + + + LedControl.cs + + + LogManagerControl.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + + + TreeViewEx.cs + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JY.Control/JY.Control.csproj.user b/JY.Control/JY.Control.csproj.user new file mode 100644 index 0000000..0b24643 --- /dev/null +++ b/JY.Control/JY.Control.csproj.user @@ -0,0 +1,6 @@ + + + + ProjectFiles + + \ No newline at end of file diff --git a/JY.Control/LBButton.Designer.cs b/JY.Control/LBButton.Designer.cs new file mode 100644 index 0000000..74f35c4 --- /dev/null +++ b/JY.Control/LBButton.Designer.cs @@ -0,0 +1,37 @@ +namespace JYControl +{ + partial class LBButton + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + } + + #endregion + } +} diff --git a/JY.Control/LBButton.cs b/JY.Control/LBButton.cs new file mode 100644 index 0000000..e6de017 --- /dev/null +++ b/JY.Control/LBButton.cs @@ -0,0 +1,294 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JYControl +{ + /// + /// Description of LBButton. + /// + public partial class LBButton : LBIndustrialCtrlBase + { + #region (* Enumeratives *) + /// + /// Button styles + /// + public enum ButtonStyle + { + Circular = 0, + Rectangular = 1, + Elliptical = 2, + } + + /// + /// Button states + /// + public enum ButtonState + { + Normal = 0, + Pressed, + } + #endregion + + #region (* Properties variables *) + private ButtonStyle buttonStyle = ButtonStyle.Circular; + private ButtonState buttonState = ButtonState.Normal; + private Color buttonColor = Color.Red; + private string label = String.Empty; + private bool enableRepeatState = false; + private int startRepeatInterval = 500; + private int repeatInterval = 100; + #endregion + + #region (* Variables *) + private Timer tmrRepeat = null; + #endregion + + #region (* Constructor *) + public LBButton() + { + // Initialization + InitializeComponent(); + + // Properties initialization + this.buttonColor = Color.Red; + this.Size = new Size(50, 50); + + // Timer + this.tmrRepeat = new Timer(); + this.tmrRepeat.Enabled = false; + this.tmrRepeat.Interval = this.startRepeatInterval; + this.tmrRepeat.Tick += this.Timer_Tick; + } + #endregion + + #region (* Overrided methods *) + protected override ILBRenderer CreateDefaultRenderer() + { + return new LBButtonRenderer(); + } + #endregion + + #region (* Properties *) + [ + Category("Button"), + Description("Style of the button") + ] + public ButtonStyle Style + { + set + { + this.buttonStyle = value; + this.CalculateDimensions(); + } + get { return this.buttonStyle; } + } + + [ + Category("Button"), + Description("Color of the body of the button") + ] + public Color ButtonColor + { + get { return buttonColor; } + set + { + buttonColor = value; + Invalidate(); + } + } + + [ + Category("Button"), + Description("Label of the button"), + ] + public string Label + { + get { return this.label; } + set + { + this.label = value; + Invalidate(); + } + } + + [ + Category("Button"), + Description("State of the button") + ] + public ButtonState State + { + set + { + this.buttonState = value; + this.Invalidate(); + } + get { return this.buttonState; } + } + + [ + Category("Button"), + Description("Enable/Disable the repetition of the event if the button is pressed") + ] + public bool RepeatState + { + set { this.enableRepeatState = value; } + get { return this.enableRepeatState; } + } + + [ + Category("Button"), + Description("Interval to wait in ms for start the repetition") + ] + public int StartRepeatInterval + { + set { this.startRepeatInterval = value; } + get { return this.startRepeatInterval; } + } + + [ + Category("Button"), + Description("Interva in ms for the repetition") + ] + public int RepeatInterval + { + set { this.repeatInterval = value; } + get { return this.repeatInterval; } + } + #endregion + + #region (* Events delegates *) + /// + /// Timer event + /// + /// + /// + void Timer_Tick(object sender, EventArgs e) + { + this.tmrRepeat.Enabled = false; + + // Update the interval + if (tmrRepeat.Interval == this.startRepeatInterval) + this.tmrRepeat.Interval = this.repeatInterval; + + // Call the delagate + LBButtonEventArgs ev = new LBButtonEventArgs(); + ev.State = this.State; + this.OnButtonRepeatState(ev); + + this.tmrRepeat.Enabled = true; + } + + /// + /// Mouse down event + /// + /// + /// + void OnMouseDown(object sender, MouseEventArgs e) + { + // Change the state + this.State = ButtonState.Pressed; + this.Invalidate(); + + // Call the delagates + LBButtonEventArgs ev = new LBButtonEventArgs(); + ev.State = this.State; + this.OnButtonChangeState(ev); + + // Enable the repeat timer + if (this.RepeatState != false) + { + this.tmrRepeat.Interval = this.StartRepeatInterval; + this.tmrRepeat.Enabled = true; + } + } + + /// + /// Mouse up event + /// + /// + /// + void OnMuoseUp(object sender, MouseEventArgs e) + { + // Change the state + this.State = ButtonState.Normal; + this.Invalidate(); + + // Call the delagates + LBButtonEventArgs ev = new LBButtonEventArgs(); + ev.State = this.State; + this.OnButtonChangeState(ev); + + // Disable the timer + this.tmrRepeat.Enabled = false; + } + #endregion + + #region (* Fire events *) + /// + /// Event for the state changed + /// + public event ButtonChangeState ButtonChangeState; + + /// + /// Method for call the delagetes + /// + /// + protected virtual void OnButtonChangeState(LBButtonEventArgs e) + { + if (this.ButtonChangeState != null) + this.ButtonChangeState(this, e); + } + + /// + /// Event for the repetition of state + /// + public event ButtonRepeatState ButtonRepeatState; + + /// + /// Method for call the delagetes + /// + /// + protected virtual void OnButtonRepeatState(LBButtonEventArgs e) + { + if (this.ButtonRepeatState != null) + this.ButtonRepeatState(this, e); + } + #endregion + } + + #region (* Classes for event and event delagates args *) + + #region (* Event args class *) + /// + /// Class for events delegates + /// + public class LBButtonEventArgs : EventArgs + { + private LBButton.ButtonState state; + + public LBButtonEventArgs() + { + } + + public LBButton.ButtonState State + { + get { return this.state; } + set { this.state = value; } + } + } + #endregion + + #region (* Delegates *) + public delegate void ButtonChangeState(object sender, LBButtonEventArgs e); + public delegate void ButtonRepeatState(object sender, LBButtonEventArgs e); + #endregion + + #endregion +} diff --git a/JY.Control/LBLed.Designer.cs b/JY.Control/LBLed.Designer.cs new file mode 100644 index 0000000..9b0ff6c --- /dev/null +++ b/JY.Control/LBLed.Designer.cs @@ -0,0 +1,53 @@ +namespace JYControl +{ + partial class LBLed + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.tmrBlink = new System.Windows.Forms.Timer(this.components); + this.SuspendLayout(); + // + // tmrBlink + // + this.tmrBlink.Interval = 500; + this.tmrBlink.Tick += new System.EventHandler(this.OnBlink); + // + // LBLed + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Name = "LBLed"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Timer tmrBlink; + } +} diff --git a/JY.Control/LBLed.cs b/JY.Control/LBLed.cs new file mode 100644 index 0000000..88b6fd1 --- /dev/null +++ b/JY.Control/LBLed.cs @@ -0,0 +1,214 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JYControl +{ + /// + /// Class for the Led control. + /// + public partial class LBLed : LBIndustrialCtrlBase + { + #region (* Enumeratives *) + public enum LedState + { + Off = 0, + On, + Blink, + } + + public enum LedLabelPosition + { + Left = 0, + Top, + Right, + Bottom, + } + + public enum LedStyle + { + Circular = 0, + Rectangular, + } + + #endregion + + #region (* Properties variables *) + private Color ledColor; + private LedState state; + private LedStyle style; + private LedLabelPosition labelPosition; + private String label = "Led"; + private SizeF ledSize; + private int blinkInterval = 500; + #endregion + + #region (* Class variables *) + //private Timer tmrBlink; + private bool blinkIsOn = false; + #endregion + + #region (* Constructor *) + public LBLed() + { + InitializeComponent(); + + this.Size = new Size(20, 20); + this.ledColor = Color.Red; + this.state = LBLed.LedState.Off; + this.style = LBLed.LedStyle.Circular; + this.blinkIsOn = false; + this.ledSize = new SizeF(10F, 10F); + this.labelPosition = LedLabelPosition.Top; + } + #endregion + + #region (* Properties *) + [ + Category("Led"), + Description("改变LED灯样式") + ] + public LedStyle Style + { + get { return style; } + set + { + style = value; + this.CalculateDimensions(); + } + } + [ + Category("Led"), + Description("改变LED灯颜色") + ] + public Color LedColor + { + get { return ledColor; } + set + { + ledColor = value; + Invalidate(); + } + } + + + [ + Category("Led"), + Description("改变LED灯状态") + ] + public LedState State + { + get { return state; } + set + { + state = value; + if (state == LedState.Blink) + { + this.blinkIsOn = true; + this.tmrBlink.Interval = this.BlinkInterval; + this.tmrBlink.Start(); + } + else + { + this.blinkIsOn = true; + this.tmrBlink.Stop(); + } + + Invalidate(); + } + } + + + [ + Category("Led"), + Description("Size of the led") + ] + public SizeF LedSize + { + get { return this.ledSize; } + set + { + this.ledSize = value; + this.CalculateDimensions(); + Invalidate(); + } + } + + + [ + Category("Led"), + Description("Label of the led") + ] + public String Label + { + get { return this.label; } + set + { + this.label = value; + Invalidate(); + } + } + + + [ + Category("Led"), + Description("Position of the label of the led") + ] + public LedLabelPosition LabelPosition + { + get { return this.labelPosition; } + set + { + this.labelPosition = value; + this.CalculateDimensions(); + Invalidate(); + } + } + + + [ + Category("Led"), + Description("Interval for the blink state of the led") + ] + public int BlinkInterval + { + get { return this.blinkInterval; } + set { this.blinkInterval = value; } + } + + [Browsable(false)] + public bool BlinkIsOn + { + get { return this.blinkIsOn; } + } + #endregion + + #region (* Events delegates *) + void OnBlink(object sender, EventArgs e) + { + if (this.State == LedState.Blink) + { + if (this.blinkIsOn == false) + this.blinkIsOn = true; + else + this.blinkIsOn = false; + + this.Invalidate(); + } + } + #endregion + + #region (* Overrided methods *) + protected override ILBRenderer CreateDefaultRenderer() + { + return new LBLedRenderer(); + } + #endregion + } +} diff --git a/JY.Control/LBLed.resx b/JY.Control/LBLed.resx new file mode 100644 index 0000000..5b87100 --- /dev/null +++ b/JY.Control/LBLed.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/JY.Control/LedControl.Designer.cs b/JY.Control/LedControl.Designer.cs new file mode 100644 index 0000000..48d61d8 --- /dev/null +++ b/JY.Control/LedControl.Designer.cs @@ -0,0 +1,44 @@ +namespace JYControl +{ + partial class LedControl + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // LedControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Name = "LedControl"; + this.ResumeLayout(false); + + } + + #endregion + } +} diff --git a/JY.Control/LedControl.cs b/JY.Control/LedControl.cs new file mode 100644 index 0000000..9afcfeb --- /dev/null +++ b/JY.Control/LedControl.cs @@ -0,0 +1,426 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JYControl +{ + public partial class LedControl : UserControl + { + public LedControl() + { + InitializeComponent(); + #region 【1】设置双缓冲等属性 + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.DoubleBuffer, true); + this.SetStyle(ControlStyles.ResizeRedraw, true); + this.SetStyle(ControlStyles.Selectable, true); + this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); + this.SetStyle(ControlStyles.UserPaint, true); + timer.Enabled = true; + timer.Tick += Timer_Tick; + #endregion + } + + private void Timer_Tick(object sender, EventArgs e) + { + intColorIndex++; + + if (intColorIndex >= lampColor.Length) + { + intColorIndex = 0; + } + this.Invalidate(); + } + + #region 【2】定义三个字段 + + private Graphics g; + + private Pen p; + + private SolidBrush sb; + + Timer timer = new Timer(); + + private int intColorIndex = 0; + + #endregion + + #region 【3】添加一个设置Graphics的方法 + private void SetGraphics(Graphics g) + { + //设置画布的属性 + g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; + g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; + g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit; + g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; + } + + #endregion + + + #region 【4】根据实际控件分析的结果,创建属性 + + private Color ledTrueColor = Color.Green; + + [Category("jason控件属性")] + + [Description("TRUE的时候LED指示灯颜色")] + + public Color LedTrueColor + { + get { return ledTrueColor; } + set + { + ledTrueColor = value; + this.Invalidate(); + } + } + #endregion + + private Color ledFalseColor = Color.Red; + + [Category("jason控件属性")] + + [Description("False的时候LED指示灯颜色")] + + public Color LedFalseColor + + { + get { return ledFalseColor; } + set + + { + ledFalseColor = value; + this.Invalidate(); + } + + } + + private bool ledStatus = true; + [Category("jason控件属性")] + [Description("当前的状态")] + public bool LedStatus + { + get { return ledStatus; } + + set + + { + ledStatus = value; + this.Invalidate(); + } + } + + private Color ledColor = Color.Green; + [Category("jason控件属性")] + [Description("LED指示灯演示")] + public Color LedColor + { + get { return ledColor; } + set + + { + ledColor = value; + this.Invalidate(); + } + } + private bool isBorder = true; + + [Category("jason控件属性")] + + [Description("是否有边框")] + + public bool IsBorder + + { + + get { return isBorder; } + + set + + { + + isBorder = value; + + this.Invalidate(); + + } + + } + + private int borderWidth = 5; + + [Category("jason控件属性")] + + [Description("圆环的宽度")] + + public int BorderWidth + + { + + get { return borderWidth; } + + set + + { + + borderWidth = value; + + this.Invalidate(); + + } + + } + + private int gapWidth = 5; + + [Category("jason控件属性")] + + [Description("间隙的宽度")] + + public int GapWidth + + { + + get { return gapWidth; } + + set + + { + + gapWidth = value; + + this.Invalidate(); + + } + + } + + private bool isHighLight = true; + + [Category("jason控件属性")] + + [Description("是否高亮")] + + public bool IsHighLight + + { + + get { return isHighLight; } + + set + + { + + isHighLight = value; + + this.Invalidate(); + + } + + } + + private Color centerColor = Color.White; + + [Category("jason控件属性")] + + [Description("渐变中心的颜色")] + + public Color CenterColor + + { + + get { return centerColor; } + + set + + { + + centerColor = value; + + this.Invalidate(); + + } + + } + + private bool isFlash = true; + + [Category("jason控件属性")] + + [Description("是否闪烁")] + + public bool IsFlash + + { + + get { return isFlash; } + + set + + { + + isFlash = value; + + this.Invalidate(); + + } + + } + + private int flashInterval = 500; + + [Category("jason控件属性")] + + [Description("闪烁的频率")] + + public int FlashInterval + + { + + get { return flashInterval; } + + set + + { + + flashInterval = value; + + timer.Interval = flashInterval;//timer的时间间隔要放在这里 + + this.Invalidate(); + + } + + } + + private Color[] lampColor = new Color[] { }; + + [Category("jason控件属性")] + + [Description("闪烁灯的几种颜色,当需要闪烁时,至少需要2个及以上颜色,不需要闪烁则至少需要1个颜色")] + + public Color[] LampColor + + { + + get { return lampColor; } + + set + + { + + if (value == null || value.Length <= 0) + + return; + + lampColor = value; + + this.Invalidate(); + + } + + } + + #region 【5】创建重绘的事件 + + protected override void OnPaint(PaintEventArgs e) + { + base.OnPaint(e); + + g = e.Graphics;//获取画布 + + SetGraphics(g);//设置画布 + + #region 1,画一个圆 + + int LEDWidth = Math.Min(this.Width, this.Height); + + Color color = ledStatus ? ledTrueColor : ledFalseColor; + + if (isFlash) + + { + + lampColor = new Color[] { color, Color.Yellow }; + + color = lampColor[intColorIndex]; + + } + + sb = new SolidBrush(color); + + RectangleF rec = new RectangleF(1, 1, LEDWidth - 2, LEDWidth - 2);//创建矩形 + + g.FillEllipse(sb, rec);//画圆 + + #endregion + + #region 2,在圆里面画一个圆环 + + //如果有边框,那就画一个圆环 + + if (isBorder)//参数这里用字段或属性都可以,如果用属性,程序要都走一些判断的代码 + + { + + p = new Pen(this.BackColor, borderWidth);//使用背景色 + + //p = new Pen(Color.Red, borderWidth); + + float x = 1 + gapWidth + borderWidth * 0.5f; + + rec = new RectangleF(x, x, LEDWidth - 2 * x, LEDWidth - 2 * x); + + g.DrawEllipse(p, rec);//画圆环 + + } + + #endregion + + #region 3,渐变色绘制,是否高亮 + + if (isHighLight) + + { + + GraphicsPath gp = new GraphicsPath(); + + float x = isBorder ? 1 + gapWidth + borderWidth : 1;//使用三元运算来判断,优化代码 + + rec = new RectangleF(x, x, LEDWidth - 2 * x, LEDWidth - 2 * x); + + gp.AddEllipse(rec);//把矩形添加到路径 + + //渐变色画刷,高亮 + + PathGradientBrush pgb = new PathGradientBrush(gp);//把路径传入 + + Color[] surroundColor = new Color[] { color }; + + pgb.CenterColor = this.centerColor; + + //设置有多少组颜色来渐变 + + pgb.SurroundColors = surroundColor; + + g.FillPath(pgb, gp); + + } + + #endregion + + } + + #endregion + + } +} diff --git a/JY.Control/LedControl.resx b/JY.Control/LedControl.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/JY.Control/LedControl.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/JY.Control/LogManagerControl.Designer.cs b/JY.Control/LogManagerControl.Designer.cs new file mode 100644 index 0000000..1d8c960 --- /dev/null +++ b/JY.Control/LogManagerControl.Designer.cs @@ -0,0 +1,78 @@ +namespace JYControl +{ + partial class LogManagerControl + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.listView1 = new System.Windows.Forms.ListView(); + this.time = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.message = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.SuspendLayout(); + // + // listView1 + // + this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.time, + this.message}); + this.listView1.Dock = System.Windows.Forms.DockStyle.Fill; + this.listView1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.listView1.HideSelection = false; + this.listView1.Location = new System.Drawing.Point(0, 0); + this.listView1.Name = "listView1"; + this.listView1.Size = new System.Drawing.Size(1103, 235); + this.listView1.TabIndex = 0; + this.listView1.UseCompatibleStateImageBehavior = false; + this.listView1.View = System.Windows.Forms.View.Details; + // + // time + // + this.time.Text = "时间"; + this.time.Width = 120; + // + // message + // + this.message.Text = "信息"; + this.message.Width = 2000; + // + // LogManagerControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.listView1); + this.Name = "LogManagerControl"; + this.Size = new System.Drawing.Size(1103, 235); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListView listView1; + private System.Windows.Forms.ColumnHeader time; + private System.Windows.Forms.ColumnHeader message; + } +} diff --git a/JY.Control/LogManagerControl.cs b/JY.Control/LogManagerControl.cs new file mode 100644 index 0000000..d3593b8 --- /dev/null +++ b/JY.Control/LogManagerControl.cs @@ -0,0 +1,182 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.IO; + +namespace JYControl +{ + public enum Logtype//枚举类型 + { + Message, + Warning, + Error + } + + public enum LogAddtype//枚举类型 + { + MES, + local, + } + + public partial class LogManagerControl : UserControl + { + static bool _newErrorInfo = false; + static int _ErrorCount = 0; + public LogManagerControl() + { + InitializeComponent(); + this.DoubleBuffered = true; + this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint | + ControlStyles.AllPaintingInWmPaint, + true); + this.UpdateStyles(); + } + + private static readonly string logMesPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logs", "MESLogs"); + private static readonly string loglocalPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logs", "localLogs"); + private static LogManagerControl _manager = new LogManagerControl(); + + delegate void DoAddMessage(string message, LogAddtype logAddtype, Logtype logType = Logtype.Message); + //delegate void DoDelete(); + public static void AddLog(string strLog, LogAddtype logAddtype, Logtype logType = Logtype.Message) + { + if (_manager.listView1.InvokeRequired) + { + DoAddMessage dam = new DoAddMessage(AddLog); + _manager.listView1.Invoke(dam, strLog,logAddtype, logType); + } + else + { + string strDate = DateTime.Now.ToString("HH:mm:ss:ff"); + ListViewItem item = new ListViewItem(); + switch (logType) + { + case Logtype.Message: + if (strLog.Contains("接收到客户端连接") || strLog.Contains("TCP服务器启动监听成功")) + { + item.ForeColor = Color.White; + item.BackColor = Color.SeaGreen; + } + break; + case Logtype.Warning: + item.BackColor = Color.Yellow; + strLog = "警告:" + strLog; + break; + case Logtype.Error: + item.BackColor = Color.Red; + item.ForeColor = Color.White; + strLog = "错误:" + strLog; + _newErrorInfo = true; + _ErrorCount++; + + break; + default: + break; + } + item.Text = strDate; + item.SubItems.Add(strLog); + _manager.listView1.BeginUpdate(); + + + _manager.listView1.Items.Insert(0, item);//添加在第一行 + //_manager.listView1.Items.Add(item);//添加在最后一行 + int ff = _manager.listView1.Items.Count - 1; + if (_manager.listView1.Items.Count > 150) + { + _manager.listView1.Items.RemoveAt(ff); + } + //_manager.listView1.Items[_manager.listView1.Items.Count - 1].EnsureVisible(); + + _manager.listView1.EndUpdate(); + + switch (logAddtype) + { + case LogAddtype.MES: + if (!Directory.Exists(logMesPath)) + { + Directory.CreateDirectory(logMesPath); + } + using (StreamWriter sw = new StreamWriter(logMesPath+DateTime.Now.ToString("yyyyMMdd") + ".txt", true)) + { + sw.WriteLine(strDate + " " + logType.ToString() + " " + strLog); + } + break; + case LogAddtype.local: + if (!Directory.Exists(loglocalPath)) + { + Directory.CreateDirectory(loglocalPath); + } + using (StreamWriter sw = new StreamWriter(loglocalPath+DateTime.Now.ToString("yyyyMMdd") + ".txt", true)) + { + sw.WriteLine(strDate + " " + logType.ToString() + " " + strLog); + } + break; + default: + break; + } + //添加日志到log文件中 + } + } + + public static void ClearLog() + { + //if (_manager.listView1.InvokeRequired) + //{ + // DoDelete dam = new DoDelete(ClearLog); + // _manager.listView1.Invoke(dam); + //} + //else + //{ + //if (_manager.listView1.Items.Count > 200) + //{ + // _manager.listView1.Items.RemoveAt(item); + //} + _manager.listView1.Items.Clear(); + //} + } + + /// + /// 双缓冲ListView ,解决闪烁 + /// + public class DoubleBufferListView : System.Windows.Forms.ListView + { + public DoubleBufferListView() + { + SetStyle(ControlStyles.DoubleBuffer | + ControlStyles.OptimizedDoubleBuffer | + ControlStyles.AllPaintingInWmPaint, true); + UpdateStyles(); + } + } + + protected override void WndProc(ref Message m) + { + if (m.Msg == 0x0014) // 禁掉清除背景消息 + return; + base.WndProc(ref m); + } + + public static bool HasNewErrorInfo + { + get { return _newErrorInfo; } + set { _newErrorInfo = value; } + } + public static int ErrorInfoCount + { + get { return _ErrorCount; } + set { _ErrorCount = 0; } + } + + public static LogManagerControl Manager + { + get { return LogManagerControl._manager; } + set { LogManagerControl._manager = value; } + } + } +} diff --git a/JY.Control/LogManagerControl.resx b/JY.Control/LogManagerControl.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/JY.Control/LogManagerControl.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/JY.Control/Properties/AssemblyInfo.cs b/JY.Control/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..12e2396 --- /dev/null +++ b/JY.Control/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("JY.Control")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("JY.Control")] +[assembly: AssemblyCopyright("Copyright © 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("01a2aa2c-9b80-41aa-9f47-3cb67e60af24")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/JY.Control/Properties/Resources.Designer.cs b/JY.Control/Properties/Resources.Designer.cs new file mode 100644 index 0000000..44a8341 --- /dev/null +++ b/JY.Control/Properties/Resources.Designer.cs @@ -0,0 +1,143 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace JYControl.Properties { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.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() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [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("JYControl.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap list_add { + get { + object obj = ResourceManager.GetObject("list_add", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap list_subtract { + get { + object obj = ResourceManager.GetObject("list_subtract", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap tips { + get { + object obj = ResourceManager.GetObject("tips", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 下载 { + get { + object obj = ResourceManager.GetObject("下载", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 增加 { + get { + object obj = ResourceManager.GetObject("增加", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 查询 { + get { + object obj = ResourceManager.GetObject("查询", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 设置 { + get { + object obj = ResourceManager.GetObject("设置", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 运行中 { + get { + object obj = ResourceManager.GetObject("运行中", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/JY.Control/Properties/Resources.resx b/JY.Control/Properties/Resources.resx new file mode 100644 index 0000000..9948e75 --- /dev/null +++ b/JY.Control/Properties/Resources.resx @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Image\list_add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Image\list_subtract.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Image\tips.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Image\下载.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Image\增加.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Image\查询.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Image\设置.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Image\运行中.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/JY.Control/PulseButton.Designer.cs b/JY.Control/PulseButton.Designer.cs new file mode 100644 index 0000000..5063f66 --- /dev/null +++ b/JY.Control/PulseButton.Designer.cs @@ -0,0 +1,36 @@ +namespace JYControl +{ + partial class PulseButton + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/JY.Control/PulseButton.cs b/JY.Control/PulseButton.cs new file mode 100644 index 0000000..f870d12 --- /dev/null +++ b/JY.Control/PulseButton.cs @@ -0,0 +1,554 @@ +using System; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Drawing.Text; +using System.Windows.Forms; + +namespace JYControl +{ + public partial class PulseButton : Button + { + #region -- Members -- + private readonly Timer pulseTimer; + private RectangleF[] pulses; + private RectangleF centerRect; + private Color[] pulseColors; + private int pulseWidth; + private bool mouseOver; + private bool pressed; + private float pulseSpeed; + + public enum Shape + { + Round, + Rectangle + } + #endregion + + #region -- Properties -- + + /// + /// Gets or sets the top button color. + /// + /// The top button color. + [Browsable(true), DefaultValue(typeof(Color), "CornflowerBlue")] + [Category("Appearance")] + public Color ButtonColorTop { get; set; } + + /// + /// Gets or sets the bottom button color. + /// + /// The bottom button color. + [Browsable(true), DefaultValue(typeof(Color), "DodgerBlue")] + [Category("Appearance")] + public Color ButtonColorBottom { get; set; } + + /// + /// Gets or sets the color of the pulse. + /// + /// The color of the pulse. + [Browsable(true), DefaultValue(typeof(Color), "Black")] + [Category("Appearance")] + public Color PulseColor { get; set; } + + /// + /// Gets or sets the type of the shape. + /// + /// The type of the shape. + [Browsable(true), DefaultValue(typeof(Shape), "Round")] + [Category("Appearance")] + public Shape ShapeType { get; set; } + + /// + /// Gets or sets the corner radius. + /// + /// The corner radius. + [Browsable(true), DefaultValue(10)] + [Category("Appearance")] + public int CornerRadius { get; set; } + + /// + /// Gets or sets the color of the focus. + /// + /// The color of the focus. + [Browsable(true), DefaultValue(typeof(Color), "Orange")] + [Category("Appearance")] + public Color FocusColor { get; set; } + + /// + /// Gets or sets the foreground color of the control. + /// + /// + /// + /// The foreground of the control. The default is the value of the property. + /// + /// + /// + /// + [Browsable(true), DefaultValue(typeof(Color), "White")] + [Category("Appearance")] + public new Color ForeColor + { + get { return base.ForeColor; } + set { base.ForeColor = value; } + } + + /// + /// Gets or sets the number of pulses. + /// + /// The number of pulses. + [Browsable(true), DefaultValue(3)] + [Category("Appearance")] + public int NumberOfPulses + { + get { return pulses.Length; } + set + { + if (value <= 0) return; + pulses = new RectangleF[value]; + pulseColors = new Color[value]; + ArrangePulses(); + } + } + + /// + /// Gets or sets the width of the pulse. + /// + /// The width of the pulse. + [Browsable(true), DefaultValue(10)] + [Category("Appearance")] + public int PulseWidth + { + get { return pulseWidth; } + set { pulseWidth = value; ArrangePulses(); } + } + + /// + /// Gets or sets the wave speed. + /// + /// The speed of the pulses. + [Browsable(true), DefaultValue(typeof(float), "0.3f")] + [Category("Appearance")] + public float PulseSpeed + { + get { return pulseSpeed; } + set + { + if (value <= 0) return; + pulseSpeed = value; + } + } + + /// + /// Gets or sets the interval. + /// + /// The interval. + [Browsable(false), DefaultValue(50)] + public int Interval + { + get { return pulseTimer.Interval; } + set { pulseTimer.Interval = value; } + } + + #endregion + + #region -- Constructor -- + /// + /// Initializes a new instance of the class. + /// + public PulseButton() + { + // Control styles + SetStyle(ControlStyles.SupportsTransparentBackColor, true); + SetStyle(ControlStyles.OptimizedDoubleBuffer, true); + SetStyle(ControlStyles.AllPaintingInWmPaint, true); + SetStyle(ControlStyles.ResizeRedraw, true); + SetStyle(ControlStyles.UserPaint, true); + InitializeComponent(); + // Layout & initialization + SuspendLayout(); + pulseWidth = 10; + PulseSpeed = .3f; + ButtonColorTop = Color.CornflowerBlue; + ButtonColorBottom = Color.DodgerBlue; + FocusColor = Color.Orange; + PulseColor = Color.Black; + ShapeType = Shape.Round; + CornerRadius = 10; + Image = null; + base.TextAlign = ContentAlignment.MiddleCenter; + Size = new Size(40, 40); + // Timer + pulseTimer = new Timer { Interval = 50 }; + pulseTimer.Tick += PulseTimerTick; + pulses = new RectangleF[3]; + pulseColors = new Color[3]; + ArrangePulses(); + pulseTimer.Enabled = true; + ResumeLayout(true); + } + + #endregion + + #region -- EventHandlers -- + + /// + /// Handles the pulse timer tick. + /// + /// The sender. + /// The instance containing the event data. + private void PulseTimerTick(object sender, EventArgs e) + { + pulseTimer.Enabled = false; + InflatePulses(); + Invalidate(); + pulseTimer.Enabled = true; + } + + #endregion + + #region -- Protected overrides -- + + #region - Mouse - + + /// + /// Raises the event. + /// + /// A that contains the event data. + protected override void OnMouseUp(MouseEventArgs e) + { + base.OnMouseUp(e); + if (e.Button != MouseButtons.Left) return; + pressed = false; + } + + /// + /// Raises the event. + /// + /// A that contains the event data. + protected override void OnMouseDown(MouseEventArgs e) + { + base.OnMouseDown(e); + if (e.Button != MouseButtons.Left) return; + pressed = true; + } + + /// + /// Raises the event. + /// + /// A that contains the event data. + protected override void OnMouseMove(MouseEventArgs mevent) + { + base.OnMouseMove(mevent); + mouseOver = centerRect.Contains(mevent.Location); + } + + /// + /// Raises the event. + /// + /// A that contains the event data. + protected override void OnMouseLeave(EventArgs e) + { + base.OnMouseLeave(e); + mouseOver = false; + pressed = false; + } + + #endregion + + /// + /// Raises the event. + /// + /// An that contains the event data. + protected override void OnEnabledChanged(EventArgs e) + { + base.OnEnabledChanged(e); + pulseTimer.Enabled = Enabled; + } + + /// + /// Raises the event. + /// + /// An that contains the event data. + protected override void OnResize(EventArgs e) + { + base.OnResize(e); + if (pulses == null || pulses.Length == 0) return; + ArrangePulses(); + } + + /// + /// Raises the event. + /// + /// A that contains the event data. + protected override void OnPaint(PaintEventArgs e) + { + //base.OnPaint(e); + base.OnPaintBackground(e); + // Set Graphics interpolation and smoothing + Graphics g = e.Graphics; + g.InterpolationMode = InterpolationMode.HighQualityBicubic; + g.SmoothingMode = SmoothingMode.AntiAlias; + + // Draw pulses + DrawPulses(g); + + if (centerRect.IsEmpty) return; + // Draw center + DrawCenter(g); + + // Draw border + DrawBorder(g); + // Image + if (Image != null) + g.DrawImage(Image, centerRect); + + // Draw highlight + if (mouseOver) + DrawHighLight(g); + // Reflex + if (!pressed) DrawReflex(g); + // Text + DrawText(g); + } + + #endregion + + #region -- Protected virtual methods -- + + /// + /// Draws the border. + /// + /// The graphics object + protected virtual void DrawBorder(Graphics g) + { + using (var pen = new Pen(!Focused ? Color.FromArgb(60, Color.Black) : FocusColor, 2)) + PaintShape(g, pen, centerRect); + } + + /// + /// Draws the center. + /// + /// The graphics object + protected virtual void DrawCenter(Graphics g) + { + if (Enabled) + { + using (var lgb = new LinearGradientBrush(centerRect, ButtonColorTop, ButtonColorBottom, + LinearGradientMode.Vertical)) + { + PaintShape(g, lgb, centerRect); + } + } + else + { + using (var lgb = new SolidBrush(Color.Gray)) + PaintShape(g, lgb, centerRect); + + } + } + + /// + /// Draws the pulses. + /// + /// The graphics object + protected virtual void DrawPulses(Graphics g) + { + if (!Enabled) return; + for (var i = 0; i < pulses.Length; i++) + { + using (var sb = new SolidBrush(pulseColors[i])) + { + PaintShape(g, sb, pulses[i]); + } + } + } + + /// + /// Draws the text. + /// + /// The graphics object + protected virtual void DrawText(Graphics g) + { + var format = new StringFormat(StringFormat.GenericDefault) { Trimming = StringTrimming.EllipsisCharacter }; + format.FormatFlags |= StringFormatFlags.MeasureTrailingSpaces; + format.FormatFlags ^= StringFormatFlags.LineLimit; + format.HotkeyPrefix = HotkeyPrefix.Show; + SizeF size = g.MeasureString(Text, Font, new SizeF(centerRect.Width, centerRect.Height), format); + RectangleF textRect = GetAlignPlacement(TextAlign, centerRect, size); + using (var sb = new SolidBrush(ForeColor)) + g.DrawString(Text, Font, sb, textRect, format); + } + + /// + /// Draws the reflex. + /// + /// The graphics object + protected virtual void DrawReflex(Graphics g) + { + using (var path = new GraphicsPath()) + { + RectangleF rect = centerRect; + rect.Height = rect.Height / 2; + if (ShapeType == Shape.Round) + { + path.AddArc(centerRect, -180, 180); + RectangleF reflexRectangle = rect; + reflexRectangle.Offset(0, rect.Height); + reflexRectangle.Height /= 6; + path.AddArc(reflexRectangle, 0, 180); + path.CloseFigure(); + } + else + { + rect.Height += rect.Height / 6; + path.AddRectangle(rect); + } + RectangleF area = path.GetBounds(); + using (var lgb = new LinearGradientBrush(area, Color.FromArgb(30, Color.White), + Color.FromArgb(60, Color.White), -90)) + { + g.FillPath(lgb, path); + } + } + } + + /// + /// Draws the high light. + /// + /// The graphics object + protected virtual void DrawHighLight(Graphics g) + { + RectangleF highlightRect = centerRect; + highlightRect.Inflate(-2, -2); + using (var pen = new Pen(Color.FromArgb(60, Color.White), 4)) + { + if (ShapeType == Shape.Round) + g.DrawEllipse(pen, highlightRect); + else + g.DrawPath(pen, GetRoundRect(g, highlightRect, CornerRadius)); + } + } + + /// + /// Paints the shape. + /// + /// The graphics object + /// The pen + /// The rectangle. + protected virtual void PaintShape(Graphics g, Pen p, RectangleF rectangle) + { + if (ShapeType == Shape.Round) + g.DrawEllipse(p, rectangle); + else + using (var path = GetRoundRect(g, rectangle, CornerRadius)) + g.DrawPath(p, path); + } + + /// + /// Paints the shape. + /// + /// The graphics object + /// The brush + /// The rectangle. + protected virtual void PaintShape(Graphics g, Brush b, RectangleF rectangle) + { + if (ShapeType == Shape.Round) + g.FillEllipse(b, rectangle); + else + using (var path = GetRoundRect(g, rectangle, CornerRadius)) + g.FillPath(b, path); + } + + #endregion + + #region -- Public static methods -- + + /// + /// Gets a path of a rectangle with round corners. + /// + /// The graphics object + /// The rectangle + /// The corner radius + /// + public static GraphicsPath GetRoundRect(Graphics g, RectangleF rect, float radius) + { + var gp = new GraphicsPath(); + var diameter = radius * 2; + gp.AddArc(rect.X + rect.Width - diameter, rect.Y, diameter, diameter, 270, 90); + gp.AddArc(rect.X + rect.Width - diameter, rect.Y + rect.Height - diameter, diameter, diameter, 0, 90); + gp.AddArc(rect.X, rect.Y + rect.Height - diameter, diameter, diameter, 90, 90); + gp.AddArc(rect.X, rect.Y, diameter, diameter, 180, 90); + gp.CloseFigure(); + return gp; + } + + /// + /// Gets the placement. + /// + /// The alignment of the element + /// A retangle + /// The element to be placed + /// + public static RectangleF GetAlignPlacement(ContentAlignment align, RectangleF rect, SizeF element) + { + // Left & Top (default) + float lft = rect.Left; + float top = rect.Y; + // Right + if ((align & (ContentAlignment.BottomRight | ContentAlignment.MiddleRight | ContentAlignment.TopRight)) != 0) + lft = rect.Right - element.Width; + // Center + else if ((align & (ContentAlignment.BottomCenter | ContentAlignment.MiddleCenter | ContentAlignment.TopCenter)) != 0) + lft = (rect.Width / 2) - (element.Width / 2) + rect.Left; + // Bottom + if ((align & (ContentAlignment.BottomCenter | ContentAlignment.BottomLeft | ContentAlignment.BottomRight)) != 0) + top = rect.Bottom - element.Height; + // Middle + else if ((align & (ContentAlignment.MiddleCenter | ContentAlignment.MiddleLeft | ContentAlignment.MiddleRight)) != 0) + top = (rect.Height / 2) - (element.Height / 2) + rect.Y; + + return new RectangleF(lft, top, element.Width, element.Height); + } + + #endregion + + #region -- Private methods -- + + /// + /// Arranges the pulses. + /// + private void ArrangePulses() + { + centerRect = new RectangleF(pulseWidth, pulseWidth, Width - 2 * pulseWidth, Height - 2 * pulseWidth); + for (var i = 1; i <= pulses.Length; i++) + { + pulses[i - 1] = new RectangleF( + pulseWidth * i / (float)pulses.Length, + pulseWidth * i / (float)pulses.Length, + Width - 2 * pulseWidth * i / pulses.Length, + Height - 2 * pulseWidth * i / pulses.Length + ); + pulseColors[i - 1] = Color.FromArgb((int)(Math.Min(pulses[i - 1].X * 255 / pulseWidth, 255)), Color.White); + } + } + + /// + /// Inflates the pulses. + /// + private void InflatePulses() + { + for (var i = 0; i < pulses.Length; i++) + { + pulses[i].Inflate(PulseSpeed, PulseSpeed); + if (pulses[i].Width > Width || pulses[i].Height > Height || pulses[i].X < 0 || pulses[i].Y < 0) + pulses[i] = new RectangleF(pulseWidth, pulseWidth, Width - 2 * pulseWidth, Height - 2 * pulseWidth); + pulseColors[i] = Color.FromArgb((int)(Math.Min(pulses[i].X * 255 / pulseWidth, 255)), PulseColor); + } + } + + #endregion + + } +} diff --git a/JY.Control/RingProgramBar.cs b/JY.Control/RingProgramBar.cs new file mode 100644 index 0000000..dde63df --- /dev/null +++ b/JY.Control/RingProgramBar.cs @@ -0,0 +1,141 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace JYControl +{ + public class RingProgramBar : Control + { + //这个写最上面是因为我自己也不懂是啥意思,只知道界面控件高速的重绘容易产生闪烁的问题,这个加了就不会有 + protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.ExStyle |= 0x02000000; return cp; } } + + //-------------------颜色 + private Color bgColor = Color.FromArgb(224, 224, 224); //背景边框颜色 + private Color sectorColor = Color.FromArgb(109, 179, 63); //扇形颜色 + + [Category("控件属性")] + [Description("背景边框颜色")] + public Color BgColor + { + get { return this.bgColor; } + set + { + this.bgColor = value; + this.Invalidate(); + } + } + + [Category("控件属性")] + [Description("扇形颜色")] + public Color SectorColor + { + get { return this.sectorColor; } + set + { + this.sectorColor = value; + this.Invalidate(); + } + } + + private int borderWidth = 2; //边框宽度 + + [Category("控件属性")] + [Description("边框宽度")] + public int BorderWidth + { + get { return this.borderWidth; } + set + { + this.borderWidth = value; + this.Invalidate(); + } + } + + /// + /// 圆形进度条实心 + /// + public RingProgramBar() + { + InitControl(); + this.SizeChanged += delegate + { + this.Invalidate(); //重绘控件 + }; + } + + int maxValue = 100; //进度最大值 + private int progress = 0; + /// + /// 进度值 + /// + [Category("控件属性")] + [Description("进度值,最大值100")] + public int Progress + { + get { return this.progress; } + set + { + if (value > this.maxValue) + { + return; + } + this.progress = value; + this.Invalidate(); + } + } + + /// + /// 初始化控件参数 + /// + private void InitControl() + { + this.Width = 200; + this.Height = 200; + } + + //对Control进行绘制 + protected override void OnPaint(PaintEventArgs e) + { + DrawShape(e.Graphics); //绘制控件样式 + } + + /// + /// 画图 + /// + /// 画图工具类 + private void DrawShape(Graphics g) + { + if (this.Width < borderWidth*4 || this.Height < borderWidth*4) + { + return; + } + g.SmoothingMode = SmoothingMode.AntiAlias; //消除锯齿,也就是抗锯齿什么鬼东西 + g.InterpolationMode = InterpolationMode.HighQualityBicubic; + g.CompositingQuality = CompositingQuality.HighQuality; + + RectangleF bg_rectangle = new RectangleF(0+ borderWidth, 0+ borderWidth, Width - borderWidth * 2, Height - borderWidth * 2); //控件整体坐标 + + g.DrawEllipse(new Pen(bgColor, borderWidth), bg_rectangle); //画背景圆 + + Rectangle rl = new Rectangle(0 + borderWidth , 0 + borderWidth , this.Width - borderWidth * 2, this.Height - borderWidth * 2); + + decimal topAngle = (this.progress * 1.0M / this.maxValue) * 360M;//计算进度条划过的度数 + g.DrawArc(new Pen(sectorColor,borderWidth), rl, 0, (float)topAngle); //填充环形 + + + SizeF fs = g.MeasureString(this.progress.ToString() + "%", this.Font);//计算文字的范围 + //SizeF fs = g.MeasureString(this.progress.ToString(), this.Font);//计算文字的范围 + + g.DrawString(this.progress.ToString() + "%", this.Font, new SolidBrush(this.ForeColor), + //g.DrawString(this.progress.ToString(), this.Font, new SolidBrush(this.ForeColor), + bg_rectangle.X + bg_rectangle.Width / 2 - fs.Width / 2, bg_rectangle.Y + bg_rectangle.Height / 2 - fs.Height / 2); + } + + + } +} diff --git a/JY.Control/RoundButton.Designer.cs b/JY.Control/RoundButton.Designer.cs new file mode 100644 index 0000000..aadb0ce --- /dev/null +++ b/JY.Control/RoundButton.Designer.cs @@ -0,0 +1,36 @@ +namespace JYControl +{ + partial class RoundButton + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/JY.Control/RoundButton.cs b/JY.Control/RoundButton.cs new file mode 100644 index 0000000..87aff66 --- /dev/null +++ b/JY.Control/RoundButton.cs @@ -0,0 +1,383 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JYControl +{ + //public partial class RoundButton : Button + //{ + // public RoundButton() + // { + // InitializeComponent(); + // } + + // protected override void OnPaint(PaintEventArgs pe) + // { + // base.OnPaint(pe); + // } + //} + public partial class RoundButton : Button + { + #region --成员变量-- + + RectangleF rect = new RectangleF();//控件矩形 + bool mouseEnter;//鼠标是否进入控件区域的标志 + bool buttonPressed;//按钮是否按下 + bool buttonClicked;//按钮是否被点击 + #endregion + + #region --属性-- + + #region 形状 + + /// + /// 设置或获取圆形按钮的圆的边距离方框边的距离 + /// + [Browsable(true), DefaultValue(2)] + [Category("Appearance")] + public int DistanceToBorder { get; set; } + + #endregion + + #region 填充色 + + /// + /// 获取或设置按钮主体颜色 + /// + /// The color of the focus. + [Browsable(true), DefaultValue(typeof(Color), "DodgerBlue"), Description("按钮主体渐变起始颜色")] + [Category("Appearance")] + public Color ButtonCenterColorEnd { get; set; } + + /// + /// 获取或设置按钮主体颜色 + /// + [Browsable(true), DefaultValue(typeof(Color), "CornflowerBlue"), Description("按钮主体渐变终点颜色")] + [Category("Appearance")] + public Color ButtonCenterColorStart { get; set; } + + /// + /// 获取或设置按钮主体颜色渐变方向 + /// + [Browsable(true), DefaultValue(90), Description("按钮主体颜色渐变方向,X轴顺时针开始")] + [Category("Appearance")] + public int GradientAngle { get; set; } + + /// + /// 是否显示中间标志 + /// + [Browsable(true), DefaultValue(typeof(bool), "true"), Description("是否显示中间标志")] + [Category("Appearance")] + public bool IsShowIcon { get; set; } + + /// + /// 按钮中间标志填充色 + /// + [Browsable(true), DefaultValue(typeof(Color), "Black"), Description("按钮中间标志填充色")] + [Category("Appearance")] + public Color IconColor { get; set; } + + + #endregion + + #region 边框 + + /// + /// 获取或设置边框大小 + /// + [Browsable(true), DefaultValue(4), Description("按钮边框大小")] + [Category("Appearance")] + public int BorderWidth { get; set; } + + /// + /// 获取或设置按钮边框颜色 + /// + /// The color of the focus. + [Browsable(true), DefaultValue(typeof(Color), "Black"), Description("按钮边框颜色")] + [Category("Appearance")] + public Color BorderColor { get; set; } + + /// + /// 获取或设置边框透明度 + /// + [Browsable(true), DefaultValue(200), Description("设置边框透明度:0-255")] + [Category("Appearance")] + public int BorderTransparent { get; set; } + + /// + /// 获取或设置按钮获取焦点后边框颜色 + /// + /// The color of the focus. + [Browsable(true), DefaultValue(typeof(Color), "Orange"), Description("按钮获得焦点后的边框颜色")] + [Category("Appearance")] + public Color FocusBorderColor { get; set; } + + #endregion + + #endregion + + #region --构造函数-- + /// + /// 构造函数 + /// + public RoundButton() + { + // 控件风格 + SetStyle(ControlStyles.SupportsTransparentBackColor, true); + SetStyle(ControlStyles.OptimizedDoubleBuffer, true); + SetStyle(ControlStyles.AllPaintingInWmPaint, true); + SetStyle(ControlStyles.ResizeRedraw, true); + SetStyle(ControlStyles.UserPaint, true); + //初始值设定 + this.Height = this.Width = 80; + + DistanceToBorder = 4; + ButtonCenterColorStart = Color.CornflowerBlue; + ButtonCenterColorEnd = Color.DodgerBlue; + BorderColor = Color.Black; + FocusBorderColor = Color.Orange; + IconColor = Color.Black; + BorderWidth = 4; + BorderTransparent = 200; + GradientAngle = 90; + + mouseEnter = false; + buttonPressed = false; + buttonClicked = false; + IsShowIcon = true; + + InitializeComponent(); + } + #endregion + + #region --重写部分事件-- + + #region OnPaint事件 + + /// + /// 控件绘制 + /// + /// + protected override void OnPaint(PaintEventArgs pevent) + { + //base.OnPaint(pevent); + base.OnPaintBackground(pevent); + + Graphics g = pevent.Graphics; + g.InterpolationMode = InterpolationMode.HighQualityBicubic; + g.SmoothingMode = SmoothingMode.AntiAlias;//抗锯齿 + + myResize();//调整圆形区域 + + var brush = new LinearGradientBrush(rect, ButtonCenterColorStart, ButtonCenterColorEnd, GradientAngle); + + PaintShape(g, brush, rect);//绘制按钮中心区域 + + DrawBorder(g);//绘制边框 + + DrawStateIcon(g);//绘制按钮功能标志 + + if (mouseEnter) + { + DrawHighLight(g);//绘制高亮区域 + DrawStateIcon(g);//绘制按钮功能标志 + } + } + + #endregion + + #region 鼠标 + + /// + /// 鼠标点击事件 + /// + /// + protected override void OnMouseClick(MouseEventArgs e) + { + base.OnMouseClick(e); + buttonClicked = !buttonClicked; + } + /// + /// Raises the event. + /// + /// A that contains the event data. + protected override void OnMouseUp(MouseEventArgs e) + { + base.OnMouseUp(e); + if (e.Button != MouseButtons.Left) return; + buttonPressed = false; + base.Invalidate(); + } + + /// + /// Raises the event. + /// + /// A that contains the event data. + protected override void OnMouseDown(MouseEventArgs e) + { + base.OnMouseDown(e); + if (e.Button != MouseButtons.Left) return; + buttonPressed = true; + } + + /// + /// 鼠标进入按钮 + /// + /// + protected override void OnMouseEnter(EventArgs e) + { + base.OnMouseEnter(e); + mouseEnter = true; + } + + /// + /// 鼠标离开控件 + /// + /// + protected override void OnMouseLeave(EventArgs e) + { + base.OnMouseLeave(e); + mouseEnter = false; + } + + #endregion + #endregion + + #region --自定义函数-- + + /// + /// 绘制中心区域标志 + /// + /// + private void DrawStateIcon(Graphics g) + { + if (IsShowIcon) + { + if (buttonClicked) + { + GraphicsPath startIconPath = new GraphicsPath(); + int W = base.Width / 3; + Point p1 = new Point(W, W); + Point p2 = new Point(2 * W, W); + Point p3 = new Point(2 * W, 2 * W); + Point p4 = new Point(W, 2 * W); + Point[] pts = { p1, p2, p3, p4 }; + startIconPath.AddLines(pts); + Brush brush = new SolidBrush(IconColor); + g.FillPath(brush, startIconPath); + } + else + { + GraphicsPath stopIconPath = new GraphicsPath(); + int W = base.Width / 4; + Point p1 = new Point(3 * W / 2, W); + Point p2 = new Point(3 * W / 2, 3 * W); + Point p3 = new Point(3 * W, 2 * W); + Point[] pts = { p1, p2, p3, }; + stopIconPath.AddLines(pts); + Brush brush = new SolidBrush(IconColor); + g.FillPath(brush, stopIconPath); + } + } + } + + /// + /// 重新确定控件大小 + /// + protected void myResize() + { + int x = DistanceToBorder; + int y = DistanceToBorder; + int width = this.Width - 2 * DistanceToBorder; + int height = this.Height - 2 * DistanceToBorder; + rect = new RectangleF(x, y, width, height); + } + + /// + /// 绘制高亮效果 + /// + /// Graphic对象 + protected virtual void DrawHighLight(Graphics g) + { + RectangleF highlightRect = rect; + highlightRect.Inflate(-BorderWidth / 2, -BorderWidth / 2); + Brush brush = Brushes.DodgerBlue; + if (buttonPressed) + { + brush = new LinearGradientBrush(rect, ButtonCenterColorStart, ButtonCenterColorEnd, GradientAngle); + } + + else + { + brush = new LinearGradientBrush(rect, Color.FromArgb(60, Color.White), + Color.FromArgb(60, Color.White), GradientAngle); + } + PaintShape(g, brush, highlightRect); + } + + /// + /// 绘制边框 + /// + /// Graphics对象 + protected virtual void DrawBorder(Graphics g) + { + Pen p = new Pen(BorderColor); + if (Focused) + { + p.Color = FocusBorderColor;//外圈获取焦点后的颜色 + p.Width = BorderWidth; + PaintShape(g, p, rect); + } + else + { + p.Width = BorderWidth; + PaintShape(g, p, rect); + } + + } + + /// + /// + /// + /// Graphic对象 + protected virtual void DrawPressState(Graphics g) + { + RectangleF pressedRect = rect; + pressedRect.Inflate(-2, -2); + Brush brush = new LinearGradientBrush(rect, Color.FromArgb(60, Color.White), + Color.FromArgb(60, Color.White), GradientAngle); + PaintShape(g, brush, pressedRect); + } + + /// + /// 绘制图形 + /// + /// Graphics对象 + /// Pen对象 + /// RectangleF对象 + protected virtual void PaintShape(Graphics g, Pen pen, RectangleF rect) + { + g.DrawEllipse(pen, rect); + } + + /// + /// 绘制图形 + /// + /// Graphics对象 + /// Brush对象 + /// Rectangle对象 + protected virtual void PaintShape(Graphics g, Brush brush, RectangleF rect) + { + g.FillEllipse(brush, rect); + } + + #endregion + } +} diff --git a/JY.Control/TextBoxWatermark.cs b/JY.Control/TextBoxWatermark.cs new file mode 100644 index 0000000..861a905 --- /dev/null +++ b/JY.Control/TextBoxWatermark.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JYControl +{ + /// + /// TextBox添加水印文字 + /// + [ToolboxBitmap(typeof(TextBox))] + + public class WatermarkTextBox : TextBox + { + private string _watermark; + private Color _watermarkColor = Color.DarkGray; + private const int WM_PAINT = 0xF; + + public WatermarkTextBox() + : base() + { + } + /// + /// 输入需要显示水印文字 + /// + /// + [Category("控件属性")] + [Description("输入需要显示水印文字")] + [DefaultValue("")] + public string Watermark + { + get { return _watermark; } + set + { + _watermark = value; + base.Invalidate(); + } + } + + /// + /// 改变水印文字的颜色 + /// + /// + [Category("控件属性")] + [Description("改变水印文字的颜色")] + [DefaultValue(typeof(Color), "DarkGray")] + public Color WatermarkColor + { + get { return _watermarkColor; } + set + { + _watermarkColor = value; + base.Invalidate(); + } + } + + protected override void WndProc(ref Message m) + { + base.WndProc(ref m); + if (m.Msg == WM_PAINT) + { + WmPaint(ref m); + } + } + + private void WmPaint(ref Message m) + { + using (Graphics graphics = Graphics.FromHwnd(base.Handle)) + { + if (Text.Length == 0 + && !string.IsNullOrEmpty(_watermark) + && !Focused) + { + TextFormatFlags format = + TextFormatFlags.EndEllipsis | + TextFormatFlags.VerticalCenter; + + if (RightToLeft == RightToLeft.Yes) + { + format |= TextFormatFlags.RightToLeft | TextFormatFlags.Right; + } + + TextRenderer.DrawText( + graphics, + _watermark, + Font, + base.ClientRectangle, + _watermarkColor, + format); + } + } + } + } +} diff --git a/JY.Control/TreeViewEx.Designer.cs b/JY.Control/TreeViewEx.Designer.cs new file mode 100644 index 0000000..e163d88 --- /dev/null +++ b/JY.Control/TreeViewEx.Designer.cs @@ -0,0 +1,43 @@ +namespace JYControl +{ + partial class TreeViewEx + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // TreeViewEx + // + this.Name = "NaviButton"; + this.Size = new System.Drawing.Size(133, 57); + this.ResumeLayout(false); + + } + + #endregion + } +} diff --git a/JY.Control/TreeViewEx.cs b/JY.Control/TreeViewEx.cs new file mode 100644 index 0000000..841017d --- /dev/null +++ b/JY.Control/TreeViewEx.cs @@ -0,0 +1,649 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Windows.Forms; +using JYControl.Properties; + +namespace JYControl +{ + /// + /// Class TreeViewEx. + /// Implements the + /// + /// + public partial class TreeViewEx : TreeView + { + + /// + /// The ws vscroll + /// + private const int WS_VSCROLL = 2097152; + + /// + /// The GWL style + /// + private const int GWL_STYLE = -16; + + /// + /// The LST tips + /// + private Dictionary _lstTips = new Dictionary(); + + /// + /// The tip font + /// + private Font _tipFont = new Font("Arial Unicode MS", 12f); + + /// + /// The tip image + /// + private Image _tipImage = JYControl.Properties.Resources.tips; + + /// + /// The is show tip + /// + private bool _isShowTip = false; + + /// + /// The is show by custom model + /// + private bool _isShowByCustomModel = true; + + /// + /// The node height + /// + private int _nodeHeight = 50; + + /// + /// The node down pic + /// + private Image _nodeDownPic = JYControl.Properties.Resources.list_add; + + /// + /// The node up pic + /// + private Image _nodeUpPic = JYControl.Properties.Resources.list_subtract; + + /// + /// The node background color + /// + private Color _nodeBackgroundColor = Color.White; + + /// + /// The node fore color + /// + private Color _nodeForeColor = Color.FromArgb(62, 62, 62); + + /// + /// The node is show split line + /// + private bool _nodeIsShowSplitLine = false; + + /// + /// The node split line color + /// + private Color _nodeSplitLineColor = Color.FromArgb(232, 232, 232); + + /// + /// The m node selected color + /// + private Color m_nodeSelectedColor = Color.FromArgb(255, 77, 59); + + /// + /// The m node selected fore color + /// + private Color m_nodeSelectedForeColor = Color.White; + + /// + /// The parent node can select + /// + private bool _parentNodeCanSelect = true; + + /// + /// The tree font size + /// + private SizeF treeFontSize = SizeF.Empty; + + /// + /// The BLN has v bar + /// + private bool blnHasVBar = false; + + /// + /// Gets or sets the LST tips. + /// + /// The LST tips. + public Dictionary LstTips + { + get + { + return this._lstTips; + } + set + { + this._lstTips = value; + } + } + + /// + /// Gets or sets the tip font. + /// + /// The tip font. + [Category("自定义属性"), Description("角标文字字体")] + public Font TipFont + { + get + { + return this._tipFont; + } + set + { + this._tipFont = value; + } + } + + /// + /// Gets or sets the tip image. + /// + /// The tip image. + [Category("自定义属性"), Description("是否显示角标")] + public Image TipImage + { + get + { + return this._tipImage; + } + set + { + this._tipImage = value; + } + } + + /// + /// Gets or sets a value indicating whether this instance is show tip. + /// + /// true if this instance is show tip; otherwise, false. + [Category("自定义属性"), Description("是否显示角标")] + public bool IsShowTip + { + get + { + return this._isShowTip; + } + set + { + this._isShowTip = value; + } + } + + /// + /// Gets or sets a value indicating whether this instance is show by custom model. + /// + /// true if this instance is show by custom model; otherwise, false. + [Category("自定义属性"), Description("使用自定义模式")] + public bool IsShowByCustomModel + { + get + { + return this._isShowByCustomModel; + } + set + { + this._isShowByCustomModel = value; + } + } + + /// + /// Gets or sets the height of the node. + /// + /// The height of the node. + [Category("自定义属性"), Description("节点高度(IsShowByCustomModel=true时生效)")] + public int NodeHeight + { + get + { + return this._nodeHeight; + } + set + { + this._nodeHeight = value; + base.ItemHeight = value; + } + } + + /// + /// Gets or sets the node down pic. + /// + /// The node down pic. + [Category("自定义属性"), Description("下翻图标(IsShowByCustomModel=true时生效)")] + public Image NodeDownPic + { + get + { + return this._nodeDownPic; + } + set + { + this._nodeDownPic = value; + } + } + + /// + /// Gets or sets the node up pic. + /// + /// The node up pic. + [Category("自定义属性"), Description("上翻图标(IsShowByCustomModel=true时生效)")] + public Image NodeUpPic + { + get + { + return this._nodeUpPic; + } + set + { + this._nodeUpPic = value; + } + } + + /// + /// Gets or sets the color of the node background. + /// + /// The color of the node background. + [Category("自定义属性"), Description("节点背景颜色(IsShowByCustomModel=true时生效)")] + public Color NodeBackgroundColor + { + get + { + return this._nodeBackgroundColor; + } + set + { + this._nodeBackgroundColor = value; + } + } + + /// + /// Gets or sets the color of the node fore. + /// + /// The color of the node fore. + [Category("自定义属性"), Description("节点字体颜色(IsShowByCustomModel=true时生效)")] + public Color NodeForeColor + { + get + { + return this._nodeForeColor; + } + set + { + this._nodeForeColor = value; + } + } + + /// + /// Gets or sets a value indicating whether [node is show split line]. + /// + /// true if [node is show split line]; otherwise, false. + [Category("自定义属性"), Description("节点是否显示分割线(IsShowByCustomModel=true时生效)")] + public bool NodeIsShowSplitLine + { + get + { + return this._nodeIsShowSplitLine; + } + set + { + this._nodeIsShowSplitLine = value; + } + } + + /// + /// Gets or sets the color of the node split line. + /// + /// The color of the node split line. + [Category("自定义属性"), Description("节点分割线颜色(IsShowByCustomModel=true时生效)")] + public Color NodeSplitLineColor + { + get + { + return this._nodeSplitLineColor; + } + set + { + this._nodeSplitLineColor = value; + } + } + + /// + /// Gets or sets the color of the node selected. + /// + /// The color of the node selected. + [Category("自定义属性"), Description("选中节点背景颜色(IsShowByCustomModel=true时生效)")] + public Color NodeSelectedColor + { + get + { + return this.m_nodeSelectedColor; + } + set + { + this.m_nodeSelectedColor = value; + } + } + + /// + /// Gets or sets the color of the node selected fore. + /// + /// The color of the node selected fore. + [Category("自定义属性"), Description("选中节点字体颜色(IsShowByCustomModel=true时生效)")] + public Color NodeSelectedForeColor + { + get + { + return this.m_nodeSelectedForeColor; + } + set + { + this.m_nodeSelectedForeColor = value; + } + } + + /// + /// Gets or sets a value indicating whether [parent node can select]. + /// + /// true if [parent node can select]; otherwise, false. + [Category("自定义属性"), Description("父节点是否可选中")] + public bool ParentNodeCanSelect + { + get + { + return this._parentNodeCanSelect; + } + set + { + this._parentNodeCanSelect = value; + } + } + /// + /// Initializes a new instance of the class. + /// + public TreeViewEx() + { + base.HideSelection = false; + base.DrawMode = TreeViewDrawMode.OwnerDrawAll; + base.DrawNode += new DrawTreeNodeEventHandler(this.treeview_DrawNode); + base.NodeMouseClick += new TreeNodeMouseClickEventHandler(this.TreeViewEx_NodeMouseClick); + base.SizeChanged += new EventHandler(this.TreeViewEx_SizeChanged); + base.AfterSelect += new TreeViewEventHandler(this.TreeViewEx_AfterSelect); + base.FullRowSelect = true; + base.ShowLines = false; + base.ShowPlusMinus = false; + base.ShowRootLines = false; + this.BackColor = Color.White; + this.BorderStyle = System.Windows.Forms.BorderStyle.None; + DoubleBuffered = true; + } + /// + /// 重写 。 + /// + /// 要处理的 Windows。 + protected override void WndProc(ref Message m) + { + + if (m.Msg == 0x0014) // 禁掉清除背景消息WM_ERASEBKGND + + return; + + base.WndProc(ref m); + + } + /// + /// Handles the AfterSelect event of the TreeViewEx control. + /// + /// The source of the event. + /// The instance containing the event data. + private void TreeViewEx_AfterSelect(object sender, TreeViewEventArgs e) + { + try + { + if (e.Node != null) + { + if (!this._parentNodeCanSelect) + { + if (e.Node.Nodes.Count > 0) + { + e.Node.Expand(); + base.SelectedNode = e.Node.Nodes[0]; + } + } + } + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// Handles the SizeChanged event of the TreeViewEx control. + /// + /// The source of the event. + /// The instance containing the event data. + private void TreeViewEx_SizeChanged(object sender, EventArgs e) + { + this.Refresh(); + } + + /// + /// Handles the NodeMouseClick event of the TreeViewEx control. + /// + /// The source of the event. + /// The instance containing the event data. + private void TreeViewEx_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) + { + try + { + if (e.Node != null) + { + if (e.Node.Nodes.Count > 0) + { + if (e.Node.IsExpanded) + { + e.Node.Collapse(); + } + else + { + e.Node.Expand(); + } + } + if (base.SelectedNode != null) + { + if (base.SelectedNode == e.Node && e.Node.IsExpanded) + { + if (!this._parentNodeCanSelect) + { + if (e.Node.Nodes.Count > 0) + { + base.SelectedNode = e.Node.Nodes[0]; + } + } + } + } + } + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// Handles the DrawNode event of the treeview control. + /// + /// The source of the event. + /// The instance containing the event data. + private void treeview_DrawNode(object sender, DrawTreeNodeEventArgs e) + { + try + { + + if (e.Node == null || !this._isShowByCustomModel || (e.Node.Bounds.Width <= 0 && e.Node.Bounds.Height <= 0 && e.Node.Bounds.X <= 0 && e.Node.Bounds.Y <= 0)) + { + e.DrawDefault = true; + } + else + { + e.Graphics.SetGDIHigh(); + if (base.Nodes.IndexOf(e.Node) == 0) + { + this.blnHasVBar = this.IsVerticalScrollBarVisible(); + } + Font font = e.Node.NodeFont; + if (font == null) + { + font = ((TreeView)sender).Font; + } + if (this.treeFontSize == SizeF.Empty) + { + this.treeFontSize = this.GetFontSize(font, e.Graphics); + } + bool flag = false; + int intLeft = 0; + if (CheckBoxes) + { + intLeft = 20; + } + int num = 0; + if (base.ImageList != null && base.ImageList.Images.Count > 0 && e.Node.ImageIndex >= 0 && e.Node.ImageIndex < base.ImageList.Images.Count) + { + flag = true; + num = (e.Bounds.Height - base.ImageList.ImageSize.Height) / 2; + intLeft += base.ImageList.ImageSize.Width; + } + + intLeft += e.Node.Level * Indent; + + if ((e.State == TreeNodeStates.Selected || e.State == TreeNodeStates.Focused || e.State == (TreeNodeStates.Focused | TreeNodeStates.Selected)) && (this._parentNodeCanSelect || e.Node.Nodes.Count <= 0)) + { + e.Graphics.FillRectangle(new SolidBrush(this.m_nodeSelectedColor), new Rectangle(new Point(0, e.Node.Bounds.Y), new Size(base.Width, e.Node.Bounds.Height))); + e.Graphics.DrawString(e.Node.Text, font, new SolidBrush(this.m_nodeSelectedForeColor), (float)e.Bounds.X + intLeft, (float)e.Bounds.Y + ((float)this._nodeHeight - this.treeFontSize.Height) / 2f); + } + else + { + e.Graphics.FillRectangle(new SolidBrush(this._nodeBackgroundColor), new Rectangle(new Point(0, e.Node.Bounds.Y), new Size(base.Width, e.Node.Bounds.Height))); + e.Graphics.DrawString(e.Node.Text, font, new SolidBrush(this._nodeForeColor), (float)e.Bounds.X + intLeft, (float)e.Bounds.Y + ((float)this._nodeHeight - this.treeFontSize.Height) / 2f); + } + if (CheckBoxes) + { + Rectangle rectCheck = new Rectangle(e.Bounds.X + 3 + e.Node.Level * Indent, e.Bounds.Y + (e.Bounds.Height - 16) / 2, 16, 16); + GraphicsPath pathCheck = rectCheck.CreateRoundedRectanglePath(3); + e.Graphics.FillPath(new SolidBrush(Color.FromArgb(247, 247, 247)), pathCheck); + if (e.Node.Checked) + { + e.Graphics.DrawLines(new Pen(new SolidBrush(m_nodeSelectedColor), 2), new Point[] + { + new Point(rectCheck.Left+2,rectCheck.Top+8), + new Point(rectCheck.Left+6,rectCheck.Top+12), + new Point(rectCheck.Right-4,rectCheck.Top+4) + }); + } + + e.Graphics.DrawPath(new Pen(new SolidBrush(Color.FromArgb(200, 200, 200))), pathCheck); + } + if (flag) + { + int num2 = e.Bounds.X - num - base.ImageList.ImageSize.Width; + if (num2 < 0) + { + num2 = 3; + } + e.Graphics.DrawImage(base.ImageList.Images[e.Node.ImageIndex], new Rectangle(new Point(num2 + intLeft - base.ImageList.ImageSize.Width, e.Bounds.Y + num), base.ImageList.ImageSize)); + } + if (this._nodeIsShowSplitLine) + { + e.Graphics.DrawLine(new Pen(this._nodeSplitLineColor, 1f), new Point(0, e.Bounds.Y + this._nodeHeight - 1), new Point(base.Width, e.Bounds.Y + this._nodeHeight - 1)); + } + bool flag2 = false; + if (e.Node.Nodes.Count > 0) + { + if (e.Node.IsExpanded && this._nodeUpPic != null) + { + e.Graphics.DrawImage(this._nodeUpPic, new Rectangle(base.Width - (this.blnHasVBar ? 50 : 30), e.Bounds.Y + (this._nodeHeight - 20) / 2, 20, 20)); + } + else if (this._nodeDownPic != null) + { + e.Graphics.DrawImage(this._nodeDownPic, new Rectangle(base.Width - (this.blnHasVBar ? 50 : 30), e.Bounds.Y + (this._nodeHeight - 20) / 2, 20, 20)); + } + flag2 = true; + } + if (this._isShowTip && this._lstTips.ContainsKey(e.Node.Name) && !string.IsNullOrWhiteSpace(this._lstTips[e.Node.Name])) + { + int num3 = base.Width - (this.blnHasVBar ? 50 : 30) - (flag2 ? 20 : 0); + int num4 = e.Bounds.Y + (this._nodeHeight - 20) / 2; + e.Graphics.DrawImage(this._tipImage, new Rectangle(num3, num4, 20, 20)); + SizeF sizeF = e.Graphics.MeasureString(this._lstTips[e.Node.Name], this._tipFont, 100, StringFormat.GenericTypographic); + e.Graphics.DrawString(this._lstTips[e.Node.Name], this._tipFont, new SolidBrush(Color.White), (float)(num3 + 10) - sizeF.Width / 2f - 3f, (float)(num4 + 10) - sizeF.Height / 2f); + } + } + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// Gets the size of the font. + /// + /// The font. + /// The g. + /// SizeF. + private SizeF GetFontSize(Font font, Graphics g = null) + { + SizeF result; + try + { + bool flag = false; + if (g == null) + { + g = base.CreateGraphics(); + flag = true; + } + SizeF sizeF = g.MeasureString("a", font, 100, StringFormat.GenericTypographic); + if (flag) + { + g.Dispose(); + } + result = sizeF; + } + catch (Exception ex) + { + throw ex; + } + return result; + } + + /// + /// Gets the window long. + /// + /// The HWND. + /// Index of the n. + /// System.Int32. + [DllImport("user32", CharSet = CharSet.Auto)] + private static extern int GetWindowLong(IntPtr hwnd, int nIndex); + + /// + /// Determines whether [is vertical scroll bar visible]. + /// + /// true if [is vertical scroll bar visible]; otherwise, false. + private bool IsVerticalScrollBarVisible() + { + return base.IsHandleCreated && (TreeViewEx.GetWindowLong(base.Handle, -16) & 2097152) != 0; + } + } +} diff --git a/JY.Control/TreeViewEx.resx b/JY.Control/TreeViewEx.resx new file mode 100644 index 0000000..e5858cc --- /dev/null +++ b/JY.Control/TreeViewEx.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/JY.DAL/IDbHelper.cs b/JY.DAL/IDbHelper.cs new file mode 100644 index 0000000..06ef540 --- /dev/null +++ b/JY.DAL/IDbHelper.cs @@ -0,0 +1,213 @@ +using JY.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.DAL +{ + public interface IDbHelper + { + /// + /// 保存报警数据 + /// + /// + /// + int AddAlarmData(AlarmData m); + /// + /// 缓存报警数据 + /// + /// + /// + /// + int AddAlarmCacheData(string tablename, List m); + + /// + /// 查询缓存表报警信息 + /// + /// 开始时间 + /// 结束时间 + /// + List GetAlarmCacheData(); + /// + /// 删除未更新数据 + /// + /// + int DeleteAlarmCacheData(); + /// + /// 查询报警信息 + /// + /// 开始时间 + /// 结束时间 + /// + List GetAlarmData(string strDate1, string strDate2); + /// + /// 查询进站信息 + /// + /// + /// + List GetFeedingData(string strCode); + /// + /// 新增产品型号 + /// + /// 机型信息 + /// + int AddProductModel(ProductModel entity); + + /// + /// 删除本地型号 + /// + /// 型号 + /// + void DelProductModel(string modeltype); + + /// + /// 获取产品型号列表 + /// + /// 产品型号 + /// + List GetProductModelList(string strProdType = ""); + + /// + /// 保存产品类型配置参数 + /// + /// + bool AddProductParaList(List list); + + /// + /// 获取产品参数通过产品型号 + /// + /// 产品型号 + /// + List GetProductParaByProdModel(string strModelType); + + /// + /// 标准轴参数保存 + /// + /// + /// + /// + /// + bool InsertPLCConfigBase(List list); + + /// + /// 获取换型操作的基本参数 + /// + /// + List GetPLCConfigBases(); + + /// + /// 获取PLC换型参数绑定值 + /// + /// 产品型号 + /// + List GetPLCConfigPara(string modelName); + + /// + /// 具体型号轴参数保存 + /// + /// + /// + /// + /// + bool InsertPLCConfigParam(List list); + + /// + /// 查询历史数据 + /// + /// + /// + /// + /// + DataTable GetTestData(int type,string strBarCode, string strDate1, string strDate2, string flag); + /// + /// 查询历史数据 + /// + /// + /// + /// + /// + /// + DataTable GetTestData2(int type,int resultType, string strBarCode, string strDate1, string strDate2, string flag); + /// + /// 查询CCD历史数据 + /// + /// + /// + /// + /// + DataTable GetCCDData(string strWorkerNum, string strDate1, string strDate2); + + /// + /// 查询CCD历史数据 + /// + /// + /// + /// + /// + DataTable GetBarInTime(string strBar); + + /// + /// 更新获取进站时间状态 + /// + /// + /// + int UparInTime(string strBar); + /// + /// 按日期查询和时间查询投入产出信息 + /// + /// + /// + /// + List GetProdTotal(string strDate, int Hour); + + /// + /// 更新指定时间的小时产出 + /// + /// 小时产出数据 + /// + int UpdateHourprodData(HourprodEntity enity); + + /// + /// 保存进托盘数据 + /// + /// + /// + /// + int AddInPutTrayID(TrayTestEntry m, ref string strErr); + + /// + /// 保存空托盘排出数据 + /// + /// + /// + /// + int AddOutTrayID(TrayTestEntry m, ref string strErr); + + /// + /// 保存上料数据 + /// + /// + /// + /// + int AddFeedingData(FeedingData m, ref string strErr); + + /// + /// 保存下料数据 + /// + /// + /// + /// + int AddBlankingData(BlankingData m, ref string strErr); + int AddCamInforData(CamInfor m, ref string strErr); + /// + /// 根据工位编码获取异常播报内容 + /// + /// + /// 如果没有找到记录,是否需要插入 + /// + string GetAbnormalVoice(string code, bool needInsert = false); + } +} diff --git a/JY.DAL/IocConfig.cs b/JY.DAL/IocConfig.cs new file mode 100644 index 0000000..0c9d026 --- /dev/null +++ b/JY.DAL/IocConfig.cs @@ -0,0 +1,32 @@ +using JY.DAL.Repository; +using JY.DAL.Service; +using JY.Model; +using Microsoft.Extensions.DependencyInjection; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.DAL +{ + public static class IocConfig + { + public static ServiceProvider Provider { get; private set; } + + public static void Initialize() + { + var services = new ServiceCollection(); + //services.AddScoped(typeof(IRepository<>), typeof(Repository<>)); + services.AddScoped(typeof(IRepository<>), typeof(Repository<>)); + services.AddScoped, Repository>(); + + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + Provider = services.BuildServiceProvider(); + } + } +} diff --git a/JY.DAL/JY.DAL.csproj b/JY.DAL/JY.DAL.csproj new file mode 100644 index 0000000..9dbd8fb --- /dev/null +++ b/JY.DAL/JY.DAL.csproj @@ -0,0 +1,192 @@ + + + + + + Debug + AnyCPU + {D5889580-58F9-467E-87D3-EFA37A300E67} + Library + Properties + JY.DAL + JY.DAL + v4.8 + 512 + true + + + + + + true + full + false + ..\..\..\..\JY.Inspection\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\BouncyCastle.Cryptography.2.4.0\lib\net461\BouncyCastle.Cryptography.dll + + + ..\packages\CsvHelper.30.0.1\lib\net45\CsvHelper.dll + + + ..\packages\Dapper.1.60.6\lib\net451\Dapper.dll + + + ..\packages\Enums.NET.5.0.0\lib\net461\Enums.NET.dll + + + ..\packages\EPPlus.8.0.8\lib\net462\EPPlus.dll + + + ..\packages\EPPlus.Interfaces.8.0.0\lib\net462\EPPlus.Interfaces.dll + + + ..\packages\ExtendedNumerics.BigDecimal.2025.1001.2.129\lib\net48\ExtendedNumerics.BigDecimal.dll + + + ..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll + + + ..\packages\MathNet.Numerics.Signed.5.0.0\lib\net48\MathNet.Numerics.dll + + + ..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.9\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll + + + ..\packages\Microsoft.Extensions.DependencyInjection.10.0.9\lib\net462\Microsoft.Extensions.DependencyInjection.dll + + + ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.10.0.9\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll + + + ..\packages\Microsoft.IO.RecyclableMemoryStream.3.0.1\lib\netstandard2.0\Microsoft.IO.RecyclableMemoryStream.dll + + + ..\packages\Microsoft.Owin.4.2.3\lib\net45\Microsoft.Owin.dll + + + ..\packages\MySql.Data.6.10.9\lib\net452\MySql.Data.dll + + + ..\packages\NPOI.2.7.4\lib\net472\NPOI.Core.dll + + + ..\packages\NPOI.2.7.4\lib\net472\NPOI.OOXML.dll + + + ..\packages\NPOI.2.7.4\lib\net472\NPOI.OpenXml4Net.dll + + + ..\packages\NPOI.2.7.4\lib\net472\NPOI.OpenXmlFormats.dll + + + ..\packages\Owin.1.0\lib\net40\Owin.dll + + + + ..\packages\SixLabors.Fonts.1.0.1\lib\netstandard2.0\SixLabors.Fonts.dll + + + ..\packages\SqlSugar.5.1.4.207\lib\SqlSugar.dll + + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + + ..\packages\System.ComponentModel.Annotations.5.0.0\lib\net461\System.ComponentModel.Annotations.dll + + + + + + + + + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll + + + + ..\packages\System.Security.Cryptography.Xml.8.0.2\lib\net462\System.Security.Cryptography.Xml.dll + + + ..\packages\System.Text.Encoding.CodePages.9.0.7\lib\net462\System.Text.Encoding.CodePages.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll + + + + ..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll + + + + + + + + + + ..\packages\ZString.2.6.0\lib\netstandard2.0\ZString.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + {f7db3a93-fca2-479b-8b2e-380116aae9fc} + JY.Model + + + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + + \ No newline at end of file diff --git a/JY.DAL/JY.DAL.csproj.user b/JY.DAL/JY.DAL.csproj.user new file mode 100644 index 0000000..0b24643 --- /dev/null +++ b/JY.DAL/JY.DAL.csproj.user @@ -0,0 +1,6 @@ + + + + ProjectFiles + + \ No newline at end of file diff --git a/JY.DAL/Mapper/AlarmDataMapping.cs b/JY.DAL/Mapper/AlarmDataMapping.cs new file mode 100644 index 0000000..2b3e4ea --- /dev/null +++ b/JY.DAL/Mapper/AlarmDataMapping.cs @@ -0,0 +1,22 @@ +using DapperExtensions.Mapper; +using JY.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.DAL.Mapper +{ + /// + /// ProdModel表映射,实体名和表名不一样实现映射 + /// + public class AlarmDataMapping : ClassMapper + { + public AlarmDataMapping() + { + Table("tb_alarm"); + AutoMap(); + } + } +} diff --git a/JY.DAL/Mapper/ProductModelMapping.cs b/JY.DAL/Mapper/ProductModelMapping.cs new file mode 100644 index 0000000..5609f8e --- /dev/null +++ b/JY.DAL/Mapper/ProductModelMapping.cs @@ -0,0 +1,22 @@ +using DapperExtensions.Mapper; +using JY.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.DAL.Mapper +{ + /// + /// ProdModel表映射,实体名和表名不一样实现映射 + /// + public class ProductModelMapping : ClassMapper + { + public ProductModelMapping() + { + Table("tb_ProdModel"); + AutoMap(); + } + } +} diff --git a/JY.DAL/MySQLHelper.cs b/JY.DAL/MySQLHelper.cs new file mode 100644 index 0000000..7b78cb2 --- /dev/null +++ b/JY.DAL/MySQLHelper.cs @@ -0,0 +1,271 @@ +using Dapper; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using MySql.Data.MySqlClient; +using System.Linq; + +namespace JY.DAL +{ + public class MySqlHelper where T : class + { + /// + /// 数据库连接字符串 + /// + private static readonly string connectionString = ConfigurationManager.ConnectionStrings["MysqlConn"].ConnectionString; + + /// + /// 查询列表 + /// + /// 查询的sql + /// 替换参数 + /// + public static List Query(string sql, object param = null) + { + using (MySqlConnection con = new MySqlConnection(connectionString)) + { + return con.Query(sql, param).ToList(); + } + } + + /// + /// 查询第一个数据 + /// + /// + /// + /// + public static T QueryFirst(string sql, object param = null) + { + using (MySqlConnection con = new MySqlConnection(connectionString)) + { + return con.QueryFirst(sql, param); + } + } + + /// + /// 查询第一个数据没有返回默认值 + /// + /// + /// + /// + public static T QueryFirstOrDefault(string sql, object param = null) + { + using (MySqlConnection con = new MySqlConnection(connectionString)) + { + return con.QueryFirstOrDefault(sql, param); + } + } + + /// + /// 查询单条数据 + /// + /// + /// + /// + public static T QuerySingle(string sql, object param = null) + { + using (MySqlConnection con = new MySqlConnection(connectionString)) + { + return con.QuerySingle(sql, param); + } + } + + /// + /// 查询单条数据没有返回默认值 + /// + /// + /// + /// + public static T QuerySingleOrDefault(string sql, object param = null) + { + using (MySqlConnection con = new MySqlConnection(connectionString)) + { + return con.QuerySingleOrDefault(sql, param); + } + } + + /// + /// 增删改 + /// + /// + /// + /// Number of rows affected + public static int Execute(string sql, object param = null) + { + using (MySqlConnection con = new MySqlConnection(connectionString)) + { + return con.Execute(sql, param); + } + } + + /// + /// Reader获取数据 + /// + /// + /// + /// + public static IDataReader ExecuteReader(string sql, object param) + { + using (MySqlConnection con = new MySqlConnection(connectionString)) + { + return con.ExecuteReader(sql, param); + } + } + + /// + /// 获取数据返回DataTable + /// + /// + /// + /// + public static DataTable QueryTable(string sql, object param = null) + { + using (MySqlConnection con = new MySqlConnection(connectionString)) + { + DataTable table = new DataTable(); + var reader = con.ExecuteReader(sql, param); + table.Load(reader); + return table; + } + } + + /// + /// Scalar获取数据 + /// + /// + /// + /// + public static object ExecuteScalar(string sql, object param = null) + { + using (MySqlConnection con = new MySqlConnection(connectionString)) + { + return con.ExecuteScalar(sql, param); + } + } + + /// + /// Scalar获取数据 + /// + /// + /// + /// + public static T ExecuteScalarForT(string sql, object param = null) + { + using (MySqlConnection con = new MySqlConnection(connectionString)) + { + return con.ExecuteScalar(sql, param); + } + } + + /// + /// 带参数的存储过程 + /// + /// + /// + /// + public static List ExecutePro(string proc, object param = null) + { + using (MySqlConnection con = new MySqlConnection(connectionString)) + { + List list = con.Query(proc, + param, + null, + true, + null, + CommandType.StoredProcedure).ToList(); + return list; + } + } + /// + /// 批量插入T数据,返回影响行数 + /// + /// 对象集合 + /// 影响行数 + public static int Insert(string strsql, List list) + { + using (IDbConnection connection = new MySqlConnection(connectionString)) + { + //return connection.Execute("insert into Person(Name,Remark) values(@Name,@Remark)", list); + return connection.Execute(strsql, list); + } + } + + /// + /// 事务1 - 全SQL + /// + /// 多条SQL + /// param + /// + public static int ExecuteTransaction(string[] sqlarr) + { + using (MySqlConnection con = new MySqlConnection(connectionString)) + { + con.Open(); + using (var transaction = con.BeginTransaction()) + { + try + { + int result = 0; + foreach (var sql in sqlarr) + { + result += con.Execute(sql, null, transaction); + } + + transaction.Commit(); + return result; + } + catch (Exception ex) + { + transaction.Rollback(); + throw ex; + } + finally + { + con.Close(); + } + } + } + } + + /// + /// 事务2 - 声明参数 + ///demo: + ///dic.Add("Insert into Users values (@UserName, @Email, @Address)", + /// new { UserName = "jack", Email = "380234234@qq.com", Address = "上海" }); + /// + /// 多条SQL + /// param + /// + public static int ExecuteTransaction(Dictionary dic) + { + using (MySqlConnection con = new MySqlConnection(connectionString)) + { + con.Open(); + using (var transaction = con.BeginTransaction()) + { + try + { + int result = 0; + foreach (var sql in dic) + { + result += con.Execute(sql.Key, sql.Value, transaction); + } + + transaction.Commit(); + return result; + } + catch (Exception ex) + { + transaction.Rollback(); + throw ex; + } + finally + { + con.Close(); + } + } + } + } + } +} \ No newline at end of file diff --git a/JY.DAL/OpMysqlDataBase.cs b/JY.DAL/OpMysqlDataBase.cs new file mode 100644 index 0000000..35078e6 --- /dev/null +++ b/JY.DAL/OpMysqlDataBase.cs @@ -0,0 +1,525 @@ +using JY.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; +using System.Threading.Tasks; + +namespace JY.DAL +{ + /// + /// + /// + public class OpMysqlDataBase : IDbHelper + { + /// + /// 保存报警数据 + /// + /// + /// + public int AddAlarmData(AlarmData m) + { + + string strSql = string.Format(@"INSERT INTO tb_alarm (AlarmGuid,PLCAdress,AlarmCode,AlarmContent + ,AlarmType,AlarmDesc,AlarmState,StartTime,EndTime,Flag) + values('{0}','{1}','{2}','{3}','{4}',{5},'{6}','{7}','{8}',{9})" + , m.AlarmGuid, m.PLCAdress, m.AlarmCode, m.AlarmContent, m.AlarmType, m.AlarmDesc, m.AlarmState + , m.StartTime, m.EndTime, m.Flag); + int result = MySqlHelper.Execute(strSql); + return result; + } + + + /// + /// 删除未更新数据 + /// + /// 开始时间 + /// 结束时间 + /// + public int DeleteAlarmCacheData() + { + string strSql = $@"DELETE FROM tb_alarm WHERE Flag=0"; + int result = MySqlHelper.Execute(strSql); + return result; + } + /// + /// 查询报警信息 + /// + /// 开始时间 + /// 结束时间 + /// + public List GetAlarmData(string strDate1, string strDate2) + { + string strSql = $@" SELECT PLCAdress ,AlarmContent,AlarmCode,AlarmTime,StartUpTime ,BurningTime + FROM tb_alarm where AlarmTime >= '{ strDate1 }' and AlarmTime <= '{ strDate2 }' "; + var list = MySqlHelper.Query(strSql); + return list; + + } + + /// + /// 查询进站信息 + /// + /// + /// + public List GetFeedingData(string strCode) + { + string strSql = $@" SELECT * FROM FeedingData where BarCode = '{strCode}' ORDER BY CreateTime"; + var list = SqlHelper.Query(strSql); + return list; + + } + + /// + /// 新增产品型号 + /// + /// 机型信息 + /// + public int AddProductModel(ProductModel entity) + { + string strSql = $@"INSERT INTO `tb_productmodel`(`ModelName`, `Remark`) + VALUES ('{entity.ModelName}', '{entity.Remark}')"; + int result = MySqlHelper.Execute(strSql); + return result; + } + + /// + /// 删除本地型号 + /// + /// 型号 + /// + public void DelProductModel(string modeltype) + { + string strSql = $"delete from tb_productmodel where ModelName='{modeltype}'"; + MySqlHelper.Execute(strSql); + } + + /// + /// 获取产品型号列表 + /// + /// 产品型号 + /// + public List GetProductModelList(string strProdType = "") + { + try + { + string strSql = @"SELECT * FROM `tb_productmodel` "; + if (strProdType != "") + { + strSql += string.Format(" where ModelName='{0}'", strProdType); + } + strSql += " order by ModelName"; + var list = MySqlHelper.Query(strSql); + return list; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 保存产品类型配置参数 + /// + /// + public bool AddProductParaList(List list) + { + List listSql = new List(); + listSql.Add($@"delete from tb_paralist where ModelName='{list[0].ModelName}'"); + foreach (var item in list) + { + listSql.Add($@"INSERT INTO `tb_paralist`(`ModelName`, `ParaName`, `ParaValue`, `Remark`, `UpdateTime`) + VALUES ('{item.ModelName}', '{item.ParaName}', '{item.ParaValue}', '{item.Remark}', '{item.UpdateTime}')"); + } + var result = MySqlHelper.ExecuteTransaction(listSql.ToArray()); + + if (result > 0) + return true; + else + return false; + } + + /// + /// 获取产品参数通过产品型号 + /// + /// 产品型号 + /// + public List GetProductParaByProdModel(string strModelType) + { + string strSql = $@"SELECT pb.ParaName, '{strModelType}' ModelName,pl.ParaValue,pl.Remark,pl.UpdateTime + FROM tb_parabase pb + left join (select * from tb_paralist where ModelName = '{strModelType}' ) as pl + on pb.ParaName = pl.ParaName; "; + + var list = MySqlHelper.Query(strSql); + return list; + } + + /// + /// 标准轴参数保存 + /// + /// + /// + /// + /// + public bool InsertPLCConfigBase(List list) + { + List listSql = new List(); + listSql.Add("delete from tb_plcconfigbase;"); + foreach (var item in list) + { + listSql.Add($@"Insert into tb_plcconfigbase (PLCAddress,PLCRemark,OrderNum) + Values ('{item.PLCAddress}','{item.PLCRemark}',{item.OrderNum});"); + } + var result = MySqlHelper.ExecuteTransaction(listSql.ToArray()); + if (result > 0) + return true; + else + return false; + } + + /// + /// 获取换型操作的基本参数 + /// + /// + public List GetPLCConfigBases() + { + string strSql = string.Format(@"SELECT * FROM `tb_plcconfigbase` + ORDER BY OrderNum"); + var list = MySqlHelper.Query(strSql); + return list; + } + /// + /// 获取PLC换型参数绑定值 + /// + /// 产品型号 + /// + public List GetPLCConfigPara(string modelName) + { + string strSql = $@"SELECT '{modelName}' ModelName,pb.PLCAddress,pc.PLCValue,pc.UpdateTime,pb.PLCRemark,pb.OrderNum + FROM tb_plcconfigbase pb + left join (select * from tb_plcconfig where ModelName='{modelName}') pc + on pb.PLCAddress = pc.PLCAddress + order by pb.OrderNum;"; + var list = MySqlHelper.Query(strSql); + return list; + } + + /// + /// 具体型号轴参数保存 + /// + /// + /// + /// + /// + public bool InsertPLCConfigParam(List list) + { + List listSql = new List(); + listSql.Add($"delete from tb_plcconfig where ModelName='{list[0].ModelName}';"); + foreach (var item in list) + { + listSql.Add($@"INSERT INTO `tb_plcconfig`(`ModelName`, `PLCAddress`, `PLCValue`, `UpdateDate`) + Values ('{item.ModelName}','{item.PLCAddress}',{item.PLCValue}),'{item.UpdateData}';"); + } + var result = MySqlHelper.ExecuteTransaction(listSql.ToArray()); + if (result > 0) + return true; + else + return false; + } + + /// + /// 查询历史数据 + /// + /// + /// + /// + /// + public DataTable GetTestData(int type, string strBarCode, string strDate1, string strDate2, string flag) + { + string strSql = @" SELECT + tb_testvr.TD 通道, + tb_testvr.BarCode 条码, + tb_testvr.Vol 电压, + tb_testvr.IMP 内阻, + tb_testvr.K K值, + tb_testvr.T 温度, + tb_testvr.Length 长度, + tb_testvr.Wide 宽度, + tb_testvr.LMDistance 极边距, + tb_testvr.Thickness 厚度, + tb_testvr.LCDistance 中心距, + DATE_FORMAT(tb_testvr.TestTime,'%Y-%m-%d %H:%i:%s') 测试时间, + tb_testvr.Result 结果, + tb_testvr.Remark 备注, + case when tb_testvr.Flag=1 then '已上传' else '未上传' end 上传状态, + tb_testvr.ProdType 测试型号, + tb_testvr.OCVType 测试类别, + tb_testvr.EquNo 设备编号, + tb_testvr.TaskCode 任务号 + FROM + tb_testvr + where tb_testvr.TestTime >= '" + strDate1 + "' and tb_testvr.TestTime <= '" + strDate2 + "' "; + if (strBarCode != "") + { + strSql += " and tb_testvr.BarCode like '" + strBarCode + "%' "; + } + DataTable dt = MySqlHelper.QueryTable(strSql); + return dt; + } + /// + /// 查询历史数据 + /// + /// + /// + /// + /// + public DataTable GetTestData2(int type,int resultType, string strBarCode, string strDate1, string strDate2, string flag) + { + string strSql = @" SELECT + tb_testvr.TD 通道, + tb_testvr.BarCode 条码, + tb_testvr.Vol 电压, + tb_testvr.IMP 内阻, + tb_testvr.K K值, + tb_testvr.T 温度, + tb_testvr.Length 长度, + tb_testvr.Wide 宽度, + tb_testvr.LMDistance 极边距, + tb_testvr.Thickness 厚度, + tb_testvr.LCDistance 中心距, + DATE_FORMAT(tb_testvr.TestTime,'%Y-%m-%d %H:%i:%s') 测试时间, + tb_testvr.Result 结果, + tb_testvr.Remark 备注, + case when tb_testvr.Flag=1 then '已上传' else '未上传' end 上传状态, + tb_testvr.ProdType 测试型号, + tb_testvr.OCVType 测试类别, + tb_testvr.EquNo 设备编号, + tb_testvr.TaskCode 任务号 + FROM + tb_testvr + where tb_testvr.TestTime >= '" + strDate1 + "' and tb_testvr.TestTime <= '" + strDate2 + "' "; + if (strBarCode != "") + { + strSql += " and tb_testvr.BarCode like '" + strBarCode + "%' "; + } + DataTable dt = MySqlHelper.QueryTable(strSql); + return dt; + } + + + /// + /// 查询CCD数据 + /// + /// + /// + /// + /// + public DataTable GetCCDData(string strWorkerNum, string strDate1, string strDate2) + { + + + string strSql = string.Format(@"SELECT + date_format(data_run.Date, '%m-%d' ) 日期 + ,data_run.Class 班次 + ,data_run.Classtype 班别 + ,data_run.OrderNum 工单号 + ,data_run.Customer 客户名称 + ,sum(IFNULL(data_run.TotalNum,0)) 投入总数 + ,sum(IFNULL(data_run.OK,0)) 良品总数 + ,sum(IFNULL(data_run.NG,0)) 不良总数 + ,CAST(IFNULL(CONVERT(((CONVERT((sum(IFNULL(data_run.NG,0))),FLOAT)/CONVERT((sum(IFNULL(data_run.TotalNum,0))),FLOAT))*100),DOUBLE),0) as CHAR(10))+'%' 不良率 + ,sum(IFNULL(data_run.CanRepaired,0)) 质量缺陷 + ,sum(IFNULL(data_run.NotRepaired,0)) 非质量缺陷 + ,sum(IFNULL(data_run.OtherNG,0)) 其他不良 + ,sum(IFNULL(data_run.SideNG,0)) 侧面不良 + ,sum(IFNULL(data_run.PositiveNG,0)) 正极不良 + ,sum(IFNULL(data_run.NegativeNG,0)) 负极不良 + ,sum(IFNULL(data_run.ChongheNG,0)) 重合不良 + ,sum(IFNULL(data_run.CodeNG,0)) 喷码不良 + ,sum(IFNULL(data_run.SideDrumpack,0)) 侧面凹坑鼓包、变形 + ,sum(IFNULL(data_run.SideDirty,0)) 侧面脏污漏液 + ,sum(IFNULL(data_run.SideScratches,0)) 侧面凸点、划痕、破皮、膜内异物 + ,sum(IFNULL(data_run.DPNG,0)) 正极面垫不良多放、漏放 + ,sum(IFNULL(data_run.PositiveDamage,0)) 正极套膜不良含热缩不良、破损、褶皱、面垫翘起 + ,sum(IFNULL(data_run.PositiveDirty,0)) 正极套膜脏污 + ,sum(IFNULL(data_run.PositiveScratches,0)) 盖帽不良含漏液、盖帽脏污氧化生锈,划痕,变形 + ,sum(IFNULL(data_run.SizeNG,0)) 负极套膜尺寸不良 + ,sum(IFNULL(data_run.NegativeDamage,0)) 负极套膜不良含套膜褶皱变形、破损、褶皱 + ,sum(IFNULL(data_run.NegativeDirty,0)) 负极套膜脏污 + ,sum(IFNULL(data_run.NegativeScratches,0)) 底部不良含漏液、脏污、氧化生锈、划痕、变形 + ,data_run.Operator 操作员 + from data_run where data_run.OrderNum='{0}'", strWorkerNum); + //if (strWorkerNum != "") + //{ + // strSql += string.Format(@" and data_run.OrderNum='{0}'", strWorkerNum); + //} + //strSql += " GROUP BY data_run.Class"; + DataTable dt = SqlHelper.QueryTable(strSql); + return dt; + + } + /// + /// 按日期查询和时间查询投入产出信息 + /// + /// + /// + /// + public List GetProdTotal(string strDate, int Hour) + { + string strSql = string.Format(@"SELECT + FDate + ,FHour + ,ProdIn + ,ProdOut + ,TestTime + FROM Tb_HourProd where FDate = '{0}'", strDate); + if (Hour > 0) + { + strSql += string.Format(" and FHour={0}", Hour); + } + var list = MySqlHelper.Query(strSql); + return list; + } + + /// + /// 更新指定时间的小时产出 + /// + /// 小时产出数据 + /// + public int UpdateHourprodData(HourprodEntity enity) + { + try + { + string strSql = $@"select 1 from tb_hourprod where FDate='{enity.FDate}' and FHour={enity.FHour}"; + var obj = MySqlHelper.ExecuteScalar(strSql, null); + if (obj != null && obj.ToString().Trim() != "") + { + + strSql = $@"update tb_hourprod set ProdIn='{enity.ProdIn}',ProdOut='{enity.ProdOut}', TestTime='{DateTime.Now}' + where FDate='{enity.FDate}' and FHour={enity.FHour}"; + } + else + { + strSql = $@"Insert into tb_hourprod(FDate, FHour, ProdIn, ProdOut, TestTime) + values ('{enity.FDate}', '{enity.FHour}', '{enity.ProdIn}', '{enity.ProdOut}', '{DateTime.Now}')"; + } + int iresult = MySqlHelper.Execute(strSql); + return iresult; + } + catch (Exception ex) + { + throw ex; + } + } + + + /// + /// 保存进托盘数据 + /// + /// + /// + /// + //public int AddInPutTrayID(TrayTestEntry m, ref string strErr) + //{ + // string strSql = "INSERT INTO tb_InPutTrayID (TrayID,TestTime,Result,Remark)"; + // strSql += string.Format(" values('{0}','{1}','{2}','{3}')", m.TrayID, m.TrayDate, m.TrayResult, m.TrayRemark); + // int list = MySqlHelper.Execute(strSql); + // return list; + //} + + /// + /// 保存空托盘排出数据 + /// + /// + /// + /// + //public int AddOutTrayID(TrayTestEntry m, ref string strErr) + //{ + // string strSql = "INSERT INTO tb_OutTrayID (TrayID,TestTime,Result,Remark)"; + // strSql += string.Format(" values('{0}','{1}','{2}','{3}')", m.TrayID, m.TrayDate, m.TrayResult, m.TrayRemark); + // int list = MySqlHelper.Execute(strSql); + // return list; + + //} + + /// + /// 上料数据保存 + /// + /// + /// + /// + //public int AddTestCode(AbnormalCellEntity m, ref string strErr) + //{ + // string strSql = "INSERT INTO tb_savebarcode(TD,BarCode,TestTime,NGPosition, NGType,Remark, Flag)"; + // strSql += string.Format(" values({0},'{1}','{2}','{3}','{4}','{5}',{6})", m.TD, m.BarCode, m.strDate,m.NGPosition,m.NGType, m.Remark, m.Flag); + // int list = MySqlHelper.Execute(strSql); + // return list; + //} + + /// + /// 滚槽数据保存 + /// + /// + /// + /// + //public int AddGroovingData(GroovingData m, ref string strErr) + //{ + // string strSql = "INSERT INTO tb_grooving(TD,BarCode,Gear,IsRetest, TestTime, Result, Remark,Worker, Flag)"; + // strSql += string.Format(" values({0},'{1}','{2}','{3}','{4}','{5}','{6}','{7}',{8})", m.GradingTD, m.GradingBarCode, m.Gear, + // m.IsRetest, m.GradingstrDate, m.GradingResult, m.GradingRemark, m.StrWorker, m.Flag); + // int list = MySqlHelper.Execute(strSql); + // return list; + //} + + public int AddFeedingData(FeedingData m, ref string strErr) + { + throw new NotImplementedException(); + } + + public int AddBlankingData(BlankingData m, ref string strErr) + { + throw new NotImplementedException(); + } + + public int AddInPutTrayID(TrayTestEntry m, ref string strErr) + { + throw new NotImplementedException(); + } + + public int AddOutTrayID(TrayTestEntry m, ref string strErr) + { + throw new NotImplementedException(); + } + public int AddCamInforData(CamInfor m, ref string strErr) + { + throw new NotImplementedException(); + } + + public int AddAlarmCacheData(string tablename, List m) + { + throw new NotImplementedException(); + } + + public List GetAlarmCacheData() + { + throw new NotImplementedException(); + } + + public DataTable GetBarInTime(string strBar) + { + throw new NotImplementedException(); + } + + public int UparInTime(string strBar) + { + throw new NotImplementedException(); + } + + public string GetAbnormalVoice(string code, bool needInsert = false) + { + throw new NotImplementedException(); + } + } +} + diff --git a/JY.DAL/OpSqlDataBase.cs b/JY.DAL/OpSqlDataBase.cs new file mode 100644 index 0000000..82074c6 --- /dev/null +++ b/JY.DAL/OpSqlDataBase.cs @@ -0,0 +1,712 @@ +using JY.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; +using System.Threading.Tasks; + +namespace JY.DAL +{ + /// + /// + /// + public class OpSqlDataBase : IDbHelper + { + #region SQLServer + /// + /// 保存报警数据 + /// + /// + /// + public int AddAlarmData(AlarmData m) + { + string strSql = string.Format(@"INSERT INTO [tb_alarm] ([AlarmGuid],[PLCAdress],[AlarmCode],[AlarmContent] + ,[AlarmType],[AlarmDesc],[AlarmState],[StartTime],[EndTime],[Flag]) + values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}',{9})" + , m.AlarmGuid, m.PLCAdress, m.AlarmCode, m.AlarmContent, m.AlarmType, m.AlarmDesc, m.AlarmState + , m.StartTime, m.EndTime, m.Flag); + int result = SqlHelper.Execute(strSql); + return result; + } + + /// + /// 保存报警数据至缓存表 + /// + /// + /// + public int AddAlarmCacheData(string tablename, List m) + { + try + { + int list = SqlHelper.BulkToDB(tablename, m); + return list; + } + catch (Exception ex) + { + + throw ex; + } + + } + + /// + /// 查询缓存表报警信息 + /// + /// 开始时间 + /// 结束时间 + /// + /// + public List GetAlarmCacheData() + { + string strSql = $@" SELECT [AlarmGuid] + ,[PLCAdress] + ,[AlarmCode] + ,[AlarmContent] + ,[AlarmType] + ,[AlarmDesc] + ,[AlarmState] + ,[StartTime] + ,[EndTime] + ,[Flag] + FROM tb_alarm where Flag =0"; + var list = SqlHelper.Query(strSql); + return list; + + } + + /// + /// 删除未更新数据 + /// + /// 开始时间 + /// 结束时间 + /// + public int DeleteAlarmCacheData() + { + string strSql = $@"DELETE FROM[dbo].[tb_alarm] WHERE [Flag]=0"; + int result = SqlHelper.Execute(strSql); + return result; + } + + /// + /// 查询报警信息 + /// + /// 开始时间 + /// 结束时间 + /// + public List GetAlarmData(string strDate1, string strDate2) + { + string strSql = $@" SELECT AlarmGuid,PLCAdress ,AlarmContent,AlarmCode,AlarmType,StartTime ,EndTime + FROM tb_alarm where StartTime >= '{ strDate1 }' and StartTime <= '{ strDate2 }' "; + var list = SqlHelper.Query(strSql); + return list; + + } + + /// + /// 查询进站信息 + /// + /// + /// + public List GetFeedingData(string strCode) + { + string strSql = $@" SELECT * FROM FeedingData where BarCode = '{strCode}' ORDER BY CreateTime desc"; + var list = SqlHelper.Query(strSql); + return list; + + } + + /// + /// 新增产品型号 + /// + /// 机型信息 + /// + public int AddProductModel(ProductModel entity) + { + string strSql = $@"INSERT INTO tb_productmodel (ModelName, Remark) + VALUES ('{entity.ModelName}', '{entity.Remark}')"; + int result = SqlHelper.Execute(strSql); + return result; + } + + /// + /// 删除本地型号 + /// + /// 型号 + /// + public void DelProductModel(string modeltype) + { + string strSql = $"delete from tb_productmodel where ModelName='{modeltype}'"; + SqlHelper.Execute(strSql); + } + + /// + /// 获取产品型号列表 + /// + /// 产品型号 + /// + public List GetProductModelList(string strProdType = "") + { + try + { + string strSql = @"SELECT * FROM tb_productmodel "; + if (strProdType != "") + { + strSql += string.Format(" where ModelName='{0}'", strProdType); + } + strSql += " order by ModelName"; + var list = SqlHelper.Query(strSql); + return list; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 保存产品类型配置参数 + /// + /// + public bool AddProductParaList(List list) + { + List listSql = new List(); + listSql.Add($@"delete from tb_paralist where ModelName='{list[0].ModelName}'"); + foreach (var item in list) + { + listSql.Add($@"INSERT INTO tb_paralist (ModelName, ParaName, ParaValue, Remark, UpdateTime) + VALUES ('{item.ModelName}', '{item.ParaName}', '{item.ParaValue}', '{item.Remark}', '{item.UpdateTime}')"); + } + var result = SqlHelper.ExecuteTransaction(listSql.ToArray()); + + if (result > 0) + return true; + else + return false; + } + + /// + /// 获取产品参数通过产品型号 + /// + /// 产品型号 + /// + public List GetProductParaByProdModel(string strModelType) + { + string strSql = $@"SELECT pb.ParaName, '{strModelType}' ModelName,pl.ParaValue,pl.Remark,pl.UpdateTime + FROM tb_parabase pb + left join (select * from tb_paralist where ModelName = '{strModelType}' ) as pl + on pb.ParaName = pl.ParaName; "; + + var list = SqlHelper.Query(strSql); + return list; + } + + /// + /// 标准轴参数保存 + /// + /// + /// + /// + /// + public bool InsertPLCConfigBase(List list) + { + List listSql = new List(); + listSql.Add("delete from tb_plcconfigbase;"); + foreach (var item in list) + { + listSql.Add($@"Insert into tb_plcconfigbase (PLCAddress,PLCRemark,OrderNum) + Values ('{item.PLCAddress}','{item.PLCRemark}',{item.OrderNum});"); + } + var result = SqlHelper.ExecuteTransaction(listSql.ToArray()); + if (result > 0) + return true; + else + return false; + } + + /// + /// 获取换型操作的基本参数 + /// + /// + public List GetPLCConfigBases() + { + string strSql = string.Format(@"SELECT * FROM tb_plcconfigbase + ORDER BY OrderNum"); + var list = SqlHelper.Query(strSql); + return list; + } + /// + /// 获取PLC换型参数绑定值 + /// + /// 产品型号 + /// + public List GetPLCConfigPara(string modelName) + { + string strSql = $@"SELECT '{modelName}' ModelName,pb.PLCAddress,pc.PLCValue,pc.UpdateDate,pb.PLCRemark,pb.OrderNum + FROM tb_plcconfigbase pb + left join (select * from tb_plcconfig where ModelName='{modelName}') pc + on pb.PLCAddress = pc.PLCAddress + order by pb.OrderNum;"; + var list = SqlHelper.Query(strSql); + return list; + } + + /// + /// 具体型号轴参数保存 + /// + /// + /// + /// + /// + public bool InsertPLCConfigParam(List list) + { + List listSql = new List(); + listSql.Add($"delete from tb_plcconfig where ModelName='{list[0].ModelName}';"); + foreach (var item in list) + { + listSql.Add($@"INSERT INTO tb_plcconfig (ModelName, PLCAddress, PLCValue, UpdateDate) + Values ('{item.ModelName}','{item.PLCAddress}',{item.PLCValue},'{item.UpdateData}');"); + } + var result = SqlHelper.ExecuteTransaction(listSql.ToArray()); + if (result > 0) + return true; + else + return false; + } + + /// + /// 查询历史数据 + /// + /// + /// + /// + /// + public DataTable GetTestData(int type, string strBarCode, string strDate1, string strDate2, string flag) + { + string strSql = ""; + switch (type) + { + case 0: + strSql = @"SELECT [ID] ID + ,[TD] 通道 + ,[BarCode] 入站条码 + ,CONVERT(varchar, [CreateTime], 120) 进站时间 + ,[Result] 结果 + ,[Remark] 备注 + ,[Flag] 状态 + FROM [dbo].[FeedingData] + where CreateTime >= '" + strDate1 + "' and CreateTime <= '" + strDate2 + "' "; + if (strBarCode != "") + { + strSql += " and BarCode like '%" + strBarCode + "%' "; + } + break; + case 1: + strSql = @" SELECT [ID] ID + ,[TD] 序号 + ,[WorkShift] 班次 + ,[ArrivalBarCode] 入站条码 + ,[DepartureBarCode] 出站条码 + ,[TMDB] 条码对比 + ,CONVERT(varchar, [OutTime], 120) 出站时间 + ,[CCD1] '正面(2D/3D)' + ,[CCD2] '反面(2D/3D)' + ,[CCD3] '左侧面(2D/3D)' + ,[CCD4] '右侧面(2D/3D)' + ,[CCD5] '顶面(2D/3D)' + ,[CCD6] '底面(2D/3D)' + ,[CCD7] 底WE1 + ,[CCD8] 底WE2 + ,[CCD9] 底WE3 + ,[CCD10] 底WE4 + ,[CCD11] 中ME1 + ,[CCD12] 中ME2 + ,[CCD13] 中ME3 + ,[CCD14] 中ME4 + ,[CCD15] '极柱(POS/NEG)' + ,[CCD16] '防爆阀(PRO)' + ,[Result] 综合结果 + ,[Remark] 备注 + ,[Flag] 状态 + FROM [dbo].[BlankingData] where OutTime >= '" + strDate1 + "' and OutTime <= '" + strDate2 + "' "; + if (strBarCode != "") + { + strSql += " and DepartureBarCode like '%" + strBarCode + "' "; + } + break; + } + + + DataTable dt = SqlHelper.QueryTable(strSql); + return dt; + } + /// + /// 查询历史数据 + /// + /// + /// + /// + /// + public DataTable GetTestData2(int type,int resultType, string strBarCode, string strDate1, string strDate2, string flag) + { + string strSql = ""; + switch (type) + { + case 0: + strSql = @"SELECT [ID] ID + ,[TD] 通道 + ,[TDGroup] 主道 + ,[BarCode] 入站条码 + ,CONVERT(varchar, [CreateTime], 120) 进站时间 + ,[Result] 结果 + ,[Remark] 备注 + ,[Flag] 状态 + FROM [dbo].[FeedingData] + where CreateTime >= '" + strDate1 + "' and CreateTime <= '" + strDate2 + "' "; + if (strBarCode != "") + { + strSql += " and BarCode like '%" + strBarCode + "%' "; + } + if (resultType == 1) + { + strSql += " and Result ='OK' "; + } + else if (resultType == 2) + { + strSql += " and Result = 'NG' "; + } + break; + case 1: + strSql = @" SELECT [ID] ID + ,[TD] 序号 + ,[WorkShift] 班次 + ,[TDGroup] 主道 + ,[ArrivalBarCode] 入站条码 + ,[DepartureBarCode] 出站条码 + ,[TMDB] 条码对比 + ,CONVERT(varchar, [OutTime], 120) 出站时间 + ,[CCD1] '正面(2D/3D)' + ,[CCD2] '反面(2D/3D)' + ,[CCD3] '左侧面(2D/3D)' + ,[CCD4] '右侧面(2D/3D)' + ,[CCD5] '顶面(2D/3D)' + ,[CCD6] '底面(2D/3D)' + ,[CCD7] 底WE1 + ,[CCD8] 底WE2 + ,[CCD9] 底WE3 + ,[CCD10] 底WE4 + ,[CCD11] 中ME1 + ,[CCD12] 中ME2 + ,[CCD13] 中ME3 + ,[CCD14] 中ME4 + ,[CCD15] '极柱(POS/NEG)' + ,[CCD16] '防爆阀(PRO)' + ,[Result] 综合结果 + ,[Remark] 备注 + ,[Flag] 状态 + FROM [dbo].[BlankingData] where OutTime >= '" + strDate1 + "' and OutTime <= '" + strDate2 + "' "; + if (strBarCode != "") + { + strSql += " and DepartureBarCode like '%" + strBarCode + "' "; + } + if(resultType == 1) + { + strSql += " and Result ='OK' "; + } + else if (resultType == 2) + { + strSql += " and Result like '%NG%' "; + } + + break; + } + + + DataTable dt = SqlHelper.QueryTable(strSql); + return dt; + } + + /// + /// 查询CCD数据 + /// + /// + /// + /// + /// + public DataTable GetCCDData(string strWorkerNum, string strDate1, string strDate2) + { + + + string strSql = string.Format(@"SELECT + + data_run.OrderNum 工单号 + ,data_run.Customer 客户名称 + ,sum(IFNULL(data_run.TotalNum,0)) 投入总数 + ,sum(IFNULL(data_run.OK,0)) 良品总数 + ,sum(IFNULL(data_run.NG,0)) 不良总数 + ,CAST(IFNULL(CONVERT(((CONVERT((sum(IFNULL(data_run.NG,0))),FLOAT)/CONVERT((sum(IFNULL(data_run.TotalNum,0))),FLOAT))*100),DOUBLE),0) as CHAR(10))+'%' 不良率 + ,sum(IFNULL(data_run.CanRepaired,0)) 质量缺陷 + ,sum(IFNULL(data_run.NotRepaired,0)) 非质量缺陷 + ,sum(IFNULL(data_run.OtherNG,0)) 其他不良 + ,sum(IFNULL(data_run.SideNG,0)) 侧面不良 + ,sum(IFNULL(data_run.PositiveNG,0)) 正极不良 + ,sum(IFNULL(data_run.NegativeNG,0)) 负极不良 + ,sum(IFNULL(data_run.ChongheNG,0)) 重合不良 + ,sum(IFNULL(data_run.CodeNG,0)) 喷码不良 + ,sum(IFNULL(data_run.SideDrumpack,0)) 侧面凹坑鼓包、变形 + ,sum(IFNULL(data_run.SideDirty,0)) 侧面脏污漏液 + ,sum(IFNULL(data_run.SideScratches,0)) 侧面凸点、划痕、破皮、膜内异物 + ,sum(IFNULL(data_run.DPNG,0)) 正极面垫不良多放、漏放 + ,sum(IFNULL(data_run.PositiveDamage,0)) 正极套膜不良含热缩不良、破损、褶皱、面垫翘起 + ,sum(IFNULL(data_run.PositiveDirty,0)) 正极套膜脏污 + ,sum(IFNULL(data_run.PositiveScratches,0)) 盖帽不良含漏液、盖帽脏污氧化生锈,划痕,变形 + ,sum(IFNULL(data_run.SizeNG,0)) 负极套膜尺寸不良 + ,sum(IFNULL(data_run.NegativeDamage,0)) 负极套膜不良含套膜褶皱变形、破损、褶皱 + ,sum(IFNULL(data_run.NegativeDirty,0)) 负极套膜脏污 + ,sum(IFNULL(data_run.NegativeScratches,0)) 底部不良含漏液、脏污、氧化生锈、划痕、变形 + ,data_run.Operator 操作员 + from data_run where data_run.OrderNum='{0}'", strWorkerNum); + //from data_run where data_run.Date>='{0}' and data_run.Date<='{1}'", strDate1, strDate2); + //if (strWorkerNum != "") + //{ + // strSql += string.Format(@" and data_run.OrderNum='{0}'", strWorkerNum); + //} + //strSql += " GROUP BY data_run.Class"; + //date_format(data_run.Date, '%m-%d') 日期 + // ,data_run.Class 班次 + // , data_run.Classtype 班别 + DataTable dt = MySqlHelper.QueryTable(strSql); + return dt; + } + + /// + /// 按日期查询和时间查询投入产出信息 + /// + /// + /// + /// + public List GetProdTotal(string strDate, int Hour) + { + string strSql = string.Format(@"SELECT + FDate + ,FHour + ,ProdIn + ,ProdOut + ,TestTime + FROM Tb_HourProd where FDate = '{0}'", strDate); + if (Hour > 0) + { + strSql += string.Format(" and FHour={0}", Hour); + } + var list = SqlHelper.Query(strSql); + return list; + } + + /// + /// 更新指定时间的小时产出 + /// + /// 小时产出数据 + /// + public int UpdateHourprodData(HourprodEntity enity) + { + try + { + string strSql = $@"select 1 from tb_hourprod where FDate='{enity.FDate}' and FHour={enity.FHour}"; + var obj = SqlHelper.ExecuteScalar(strSql, null); + if (obj != null && obj.ToString().Trim() != "") + { + + strSql = $@"update tb_hourprod set ProdIn='{enity.ProdIn}',ProdOut='{enity.ProdOut}', TestTime='{DateTime.Now}' + where FDate='{enity.FDate}' and FHour={enity.FHour}"; + } + else + { + strSql = $@"Insert into tb_hourprod(FDate, FHour, ProdIn, ProdOut, TestTime) + values ('{enity.FDate}', '{enity.FHour}', '{enity.ProdIn}', '{enity.ProdOut}', '{DateTime.Now}')"; + } + int iresult = SqlHelper.Execute(strSql); + return iresult; + } + catch (Exception ex) + { + throw ex; + } + } + + + /// + /// 保存进托盘数据 + /// + /// + /// + /// + public int AddInPutTrayID(TrayTestEntry m, ref string strErr) + { + throw new NotImplementedException(); + } + + /// + /// 保存空托盘排出数据 + /// + /// + /// + /// + public int AddOutTrayID(TrayTestEntry m, ref string strErr) + { + throw new NotImplementedException(); + + } + + + /// + /// 获取电芯进站时间 + /// + /// + /// + public DataTable GetBarInTime(string strBar) + { + DataTable dt = null; + try + { + string strsql = string.Format(@"SELECT Top(1) [BarCode] 条码 + ,CONVERT(varchar, [CreateTime], 120) 进站时间 + FROM [dbo].[FeedingData] + where BarCode='{0}' order by ID DESC", strBar); + dt = SqlHelper.QueryTable(strsql); + + } + catch (Exception ex) + { + + throw ex; + } + return dt; + } + + /// + /// 更新获取时间 + /// + /// + /// + public int UparInTime(string strBar) + { + + try + { + string strsql = string.Format(@"UPDATE [dbo].[FeedingData] SET [Flag] = 1 WHERE [BarCode]='{0}' and Flag=0", strBar); + int iresult = SqlHelper.Execute(strsql); + return iresult; + + } + catch (Exception ex) + { + + throw ex; + } + + } + /// + /// 出站外观数据保存 + /// + /// + /// + /// + public int AddBlankingData(BlankingData m, ref string strErr) + { + string strSql = string.Format(@"INSERT INTO [dbo].[BlankingData] + ([TD] + ,[WorkShift] + ,[ArrivalBarCode] + ,[DepartureBarCode] + ,[TMDB] + ,[OutTime] + ,[CCD1] + ,[CCD2] + ,[CCD3] + ,[CCD4] + ,[CCD5] + ,[CCD6] + ,[CCD7] + ,[CCD8] + ,[CCD9] + ,[CCD10] + ,[CCD11] + ,[CCD12] + ,[CCD13] + ,[CCD14] + ,[CCD15] + ,[CCD16] + ,[Result] + ,[Remark] + ,[Flag] +,[TDGroup]) + VALUES"); + strSql += string.Format("({0},'{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}','{15}','{16}','{17}','{18}','{19}','{20}','{21}','{22}','{23}',{24},{25})", + m.TD, m.WorkShift, m.ArrivalBarCode, m.DepartureBarCode, m.TMDB, m.OutTime, m.CCD1, m.CCD2, m.CCD3, m.CCD4, m.CCD5, m.CCD6, m.CCD7, m.CCD8, m.CCD9, m.CCD10, m.CCD11, m.CCD12, m.CCD13, m.CCD14, m.CCD15, m.CCD16 + , m.Result, m.Remark, m.Flag,m.TDGroup); + int list = SqlHelper.Execute(strSql); + return list; + } + + /// + /// 电芯分档数据保存 + /// + /// + /// + /// + public int AddFeedingData(FeedingData m, ref string strErr) + { + string strSql = string.Format(@"INSERT INTO [dbo].[FeedingData] ([TD],[BarCode],[CreateTime],[Result],[Remark],[Flag],[TDGroup])"); + strSql += string.Format(@" values({0},'{1}','{2}','{3}','{4}',{5},{6})", m.TD, m.BarCode, m.CreateTime, m.Result, m.Remark, m.Flag,m.TDGroup); + int list = SqlHelper.Execute(strSql); + return list; + + } + + #endregion + + public int AddCamInforData(CamInfor m, ref string strErr) + { + string strSql = string.Format(@"INSERT INTO [dbo].[CamInforData] ([TD],[BarCode],[CreateTime], + [CCD15],[CCD16],[CCD17],[CCD18],,[CCD19],[CCD20],[CCD21],[CCD22],[CCD23],[CCD24],[CCD25],[CCD26],[CCD27],[CCD28],[CCD29,[CCD30],[CCD31],[CCD32],[CCD33],[CCD34],[CCD35],[CCD36],[CCD37],[CCD38],[Result],[Remark],[Flag])"); + strSql += string.Format(@" values({0},''{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}','{15}','{16}','{17}','{18}','{19}','{20}','{21}','{22}','{23}','{24}','{25}','{26}','{27}',{28})" + , m.TD, m.BarCode, m.CreateTime, m.CCD15, m.CCD16, m.CCD17, m.CCD18, m.CCD19, m.CCD20, m.CCD21, m.CCD22, m.CCD23, m.CCD24, m.CCD25, m.CCD26, m.CCD27, m.CCD28, m.CCD29, m.CCD30, m.CCD31, m.CCD32, m.CCD33, m.CCD34, m.CCD35, m.CCD36, m.CCD37, m.CCD38 + , m.Result, m.Remark, m.Flag); + int list = SqlHelper.Execute(strSql); + return list; + + } + /// + /// 根据工位编码获取异常播报内容 + /// + /// + /// + public string GetAbnormalVoice(string code, bool needInsert = false) + { + string remark = ""; + try + { + string strSql = $"select Remark from tb_AbnormalVoice where code='{code}' order by ID desc"; + DataTable dt = SqlHelper.QueryTable(strSql); + if (dt != null && dt.Rows.Count > 0) + { + remark = Convert.ToString(dt.Rows[0][0]); + } + else if (needInsert) + { + strSql = $"insert tb_AbnormalVoice(Code,Remark) values('{code}','')"; + SqlHelper.Execute(strSql); + } + } + catch (Exception ex) + { + throw ex; + } + if (string.IsNullOrEmpty(remark)) + { + remark = "没有播报内容,编码" + code; + } + return remark; + } + } +} + diff --git a/JY.DAL/Properties/AssemblyInfo.cs b/JY.DAL/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..aa8b86a --- /dev/null +++ b/JY.DAL/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("JY.DAL")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("JY.DAL")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("d5889580-58f9-467e-87d3-efa37a300e67")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/JY.DAL/Repository/DataContext.cs b/JY.DAL/Repository/DataContext.cs new file mode 100644 index 0000000..ab12057 --- /dev/null +++ b/JY.DAL/Repository/DataContext.cs @@ -0,0 +1,31 @@ +using SqlSugar; +using System; +using System.Configuration; + +namespace JY.DAL.Repository +{ + public static class DataContext + { + private static readonly Lazy _instance = new Lazy(() => + { + string connectionString = ConfigurationManager.ConnectionStrings["CurDB"].ConnectionString; + return new SqlSugarScope(new ConnectionConfig + { + ConnectionString = connectionString, + DbType = DbType.SqlServer, + IsAutoCloseConnection = true, + InitKeyType = InitKeyType.Attribute + }, db => + { + db.Aop.OnLogExecuting = (sql, pars) => + { +#if DEBUG + Console.WriteLine($"SqlSugar SQL: {sql}"); +#endif + }; + }); + }); + + public static SqlSugarScope Instance => _instance.Value; + } +} \ No newline at end of file diff --git a/JY.DAL/Repository/IRepository.cs b/JY.DAL/Repository/IRepository.cs new file mode 100644 index 0000000..26af07b --- /dev/null +++ b/JY.DAL/Repository/IRepository.cs @@ -0,0 +1,42 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; + +namespace JY.DAL.Repository +{ + public interface IRepository where T : class, new() + { + ISqlSugarClient Db { get; } + + T GetById(object id); + + T GetSingle(Expression> predicate); + + List GetList(); + + List GetList(Expression> predicate); + + List GetListPaged(int pageIndex, int pageSize, out int totalCount, Expression> predicate = null, string orderBy = null); + + int Insert(T entity); + + int Insert(List entities); + + int Update(T entity); + + int Update(T entity, Expression> whereExpression); + + int Update(Expression> columns, Expression> whereExpression); + + int Delete(object id); + + int Delete(Expression> predicate); + + int Delete(List entities); + + bool Any(Expression> predicate); + + int Count(Expression> predicate = null); + } +} \ No newline at end of file diff --git a/JY.DAL/Repository/Repository.cs b/JY.DAL/Repository/Repository.cs new file mode 100644 index 0000000..3f19d78 --- /dev/null +++ b/JY.DAL/Repository/Repository.cs @@ -0,0 +1,102 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; + +namespace JY.DAL.Repository +{ + public class Repository : IRepository where T : class, new() + { + public ISqlSugarClient Db => DataContext.Instance; + + public T GetById(object id) + { + return Db.Queryable().InSingle(id); + } + + public T GetSingle(Expression> predicate) + { + return Db.Queryable().Where(predicate).Single(); + } + + public List GetList() + { + return Db.Queryable().ToList(); + } + + public List GetList(Expression> predicate) + { + return Db.Queryable().Where(predicate).ToList(); + } + + public List GetListPaged(int pageIndex, int pageSize, out int totalCount, Expression> predicate = null, string orderBy = null) + { + totalCount = 0; + var query = Db.Queryable(); + if (predicate != null) + { + query = query.Where(predicate); + } + if (!string.IsNullOrEmpty(orderBy)) + { + query = query.OrderBy(orderBy); + } + return query.ToPageList(pageIndex, pageSize, ref totalCount); + } + + public int Insert(T entity) + { + return Db.Insertable(entity).ExecuteReturnIdentity(); + } + + public int Insert(List entities) + { + return Db.Insertable(entities).ExecuteCommand(); + } + + public int Update(T entity) + { + return Db.Updateable(entity).ExecuteCommand(); + } + + public int Update(T entity, Expression> whereExpression) + { + return Db.Updateable(entity).Where(whereExpression).ExecuteCommand(); + } + + public int Update(Expression> columns, Expression> whereExpression) + { + return Db.Updateable().SetColumns(columns).Where(whereExpression).ExecuteCommand(); + } + + public int Delete(object id) + { + return Db.Deleteable().In(id).ExecuteCommand(); + } + + public int Delete(Expression> predicate) + { + return Db.Deleteable().Where(predicate).ExecuteCommand(); + } + + public int Delete(List entities) + { + return Db.Deleteable(entities).ExecuteCommand(); + } + + public bool Any(Expression> predicate) + { + return Db.Queryable().Where(predicate).Any(); + } + + public int Count(Expression> predicate = null) + { + var query = Db.Queryable(); + if (predicate != null) + { + query = query.Where(predicate); + } + return query.Count(); + } + } +} \ No newline at end of file diff --git a/JY.DAL/Service/AlarmDataService.cs b/JY.DAL/Service/AlarmDataService.cs new file mode 100644 index 0000000..db6af89 --- /dev/null +++ b/JY.DAL/Service/AlarmDataService.cs @@ -0,0 +1,39 @@ +using JY.DAL.Repository; +using JY.Model; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; + +namespace JY.DAL.Service +{ + public interface IAlarmDataService : IService + { + List GetAlarmDataByTime(string startTime, string endTime); + + List GetAlarmCacheData(); + + int DeleteAlarmCacheData(); + } + + public class AlarmDataService : Service, IAlarmDataService + { + public AlarmDataService(IRepository repository) : base(repository) + { + } + + public List GetAlarmDataByTime(string startTime, string endTime) + { + return _repository.GetList(x => x.StartTime >= Convert.ToDateTime(startTime) && x.StartTime <= Convert.ToDateTime(endTime)); + } + + public List GetAlarmCacheData() + { + return _repository.GetList(x => x.Flag == 0); + } + + public int DeleteAlarmCacheData() + { + return _repository.Delete(x => x.Flag == 0); + } + } +} \ No newline at end of file diff --git a/JY.DAL/Service/BlankingDataService.cs b/JY.DAL/Service/BlankingDataService.cs new file mode 100644 index 0000000..73cb549 --- /dev/null +++ b/JY.DAL/Service/BlankingDataService.cs @@ -0,0 +1,26 @@ +using JY.DAL.Repository; +using JY.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.DAL.Service +{ + public interface IBlankingDataService : IService + { + int AddBlankData(BlankingData data); + } + public class BlankingDataService : Service, IBlankingDataService + { + public BlankingDataService(IRepository repository) : base(repository) + { + } + + public int AddBlankData(BlankingData data) + { + return _repository.Insert(data); + } + } +} diff --git a/JY.DAL/Service/FeedingDataService.cs b/JY.DAL/Service/FeedingDataService.cs new file mode 100644 index 0000000..8e45abe --- /dev/null +++ b/JY.DAL/Service/FeedingDataService.cs @@ -0,0 +1,30 @@ +using JY.DAL.Repository; +using JY.Model; +using System.Collections.Generic; + +namespace JY.DAL.Service +{ + public interface IFeedingDataService : IService + { + List GetFeedingData(string barCode); + + int AddFeedingData(FeedingData data); + } + + public class FeedingDataService : Service, IFeedingDataService + { + public FeedingDataService(IRepository repository) : base(repository) + { + } + + public List GetFeedingData(string barCode) + { + return _repository.GetList(x => x.BarCode == barCode); + } + + public int AddFeedingData(FeedingData data) + { + return _repository.Insert(data); + } + } +} \ No newline at end of file diff --git a/JY.DAL/Service/IService.cs b/JY.DAL/Service/IService.cs new file mode 100644 index 0000000..d35d4e3 --- /dev/null +++ b/JY.DAL/Service/IService.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq.Expressions; + +namespace JY.DAL.Service +{ + public interface IService where T : class, new() + { + T GetById(object id); + + T GetSingle(Expression> predicate); + + List GetList(); + + List GetList(Expression> predicate); + + List GetListPaged(int pageIndex, int pageSize, out int totalCount, Expression> predicate = null, string orderBy = null); + + int Insert(T entity); + + int Insert(List entities); + + int Update(T entity); + + int Update(T entity, Expression> whereExpression); + + int Update(Expression> columns, Expression> whereExpression); + + int Delete(object id); + + int Delete(Expression> predicate); + + int Delete(List entities); + + bool Any(Expression> predicate); + + int Count(Expression> predicate = null); + } +} \ No newline at end of file diff --git a/JY.DAL/Service/Service.cs b/JY.DAL/Service/Service.cs new file mode 100644 index 0000000..6e83124 --- /dev/null +++ b/JY.DAL/Service/Service.cs @@ -0,0 +1,92 @@ +using JY.DAL.Repository; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; + +namespace JY.DAL.Service +{ + public class Service : IService where T : class, new() + { + protected readonly IRepository _repository; + + public Service(IRepository repository) + { + _repository = repository; + } + + public T GetById(object id) + { + return _repository.GetById(id); + } + + public T GetSingle(Expression> predicate) + { + return _repository.GetSingle(predicate); + } + + public List GetList() + { + return _repository.GetList(); + } + + public List GetList(Expression> predicate) + { + return _repository.GetList(predicate); + } + + public List GetListPaged(int pageIndex, int pageSize, out int totalCount, Expression> predicate = null, string orderBy = null) + { + return _repository.GetListPaged(pageIndex, pageSize, out totalCount, predicate, orderBy); + } + + public int Insert(T entity) + { + return _repository.Insert(entity); + } + + public int Insert(List entities) + { + return _repository.Insert(entities); + } + + public int Update(T entity) + { + return _repository.Update(entity); + } + + public int Update(T entity, Expression> whereExpression) + { + return _repository.Update(entity, whereExpression); + } + + public int Update(Expression> columns, Expression> whereExpression) + { + return _repository.Update(columns, whereExpression); + } + + public int Delete(object id) + { + return _repository.Delete(id); + } + + public int Delete(Expression> predicate) + { + return _repository.Delete(predicate); + } + + public int Delete(List entities) + { + return _repository.Delete(entities); + } + + public bool Any(Expression> predicate) + { + return _repository.Any(predicate); + } + + public int Count(Expression> predicate = null) + { + return _repository.Count(predicate); + } + } +} \ No newline at end of file diff --git a/JY.DAL/ServiceLocator.cs b/JY.DAL/ServiceLocator.cs new file mode 100644 index 0000000..5ee09dd --- /dev/null +++ b/JY.DAL/ServiceLocator.cs @@ -0,0 +1,109 @@ +using JY.DAL.Repository; +using JY.DAL.Service; +using System; +using System.Collections.Generic; +using System.Reflection; + +namespace JY.DAL +{ + public static class ServiceLocator + { + private static readonly Dictionary _services = new Dictionary(); + private static readonly Dictionary> _serviceFactories = new Dictionary>(); + private static bool _isInitialized = false; + + public static void Initialize() + { + if (_isInitialized) return; + + RegisterRepositoryAndService(); + + _isInitialized = true; + } + + private static void RegisterRepositoryAndService() + { + var assembly = Assembly.GetExecutingAssembly(); + + foreach (var type in assembly.GetTypes()) + { + if (type.IsClass && !type.IsAbstract) + { + foreach (var iface in type.GetInterfaces()) + { + if (iface.IsGenericType) + { + var genericDef = iface.GetGenericTypeDefinition(); + if (genericDef == typeof(IRepository<>)) + { + _serviceFactories[iface] = () => Activator.CreateInstance(type); + } + else if (genericDef == typeof(IService<>)) + { + _serviceFactories[iface] = () => + { + var repoType = typeof(IRepository<>).MakeGenericType(type.GetGenericArguments()[0]); + var repo = Get(repoType); + return Activator.CreateInstance(type, repo); + }; + } + } + else + { + if (!iface.FullName.StartsWith("System.")) + { + _serviceFactories[iface] = () => CreateInstanceWithDependencies(type); + } + } + } + } + } + } + + private static object CreateInstanceWithDependencies(Type type) + { + var constructor = type.GetConstructors()[0]; + var parameters = constructor.GetParameters(); + var paramValues = new object[parameters.Length]; + + for (int i = 0; i < parameters.Length; i++) + { + paramValues[i] = Get(parameters[i].ParameterType); + } + + return Activator.CreateInstance(type, paramValues); + } + + public static void Register(T instance) + { + _services[typeof(T)] = instance; + } + + public static void Register(Func factory) + { + _serviceFactories[typeof(T)] = () => factory(); + } + + public static T Get() + { + return (T)Get(typeof(T)); + } + + public static object Get(Type serviceType) + { + if (_services.TryGetValue(serviceType, out object instance)) + { + return instance; + } + + if (_serviceFactories.TryGetValue(serviceType, out Func factory)) + { + instance = factory(); + _services[serviceType] = instance; + return instance; + } + + throw new InvalidOperationException($"服务 {serviceType.Name} 未注册"); + } + } +} \ No newline at end of file diff --git a/JY.DAL/SqlHelper.cs b/JY.DAL/SqlHelper.cs new file mode 100644 index 0000000..5ad9cbc --- /dev/null +++ b/JY.DAL/SqlHelper.cs @@ -0,0 +1,345 @@ +using Dapper; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using MySql.Data.MySqlClient; +using System.Linq; +using System.Data.SqlClient; +using System.Collections; +using System.Reflection; + +namespace JY.DAL +{ + public class SqlHelper where T : class + { + /// + /// 数据库连接字符串 + /// + private static readonly string connectionString = ConfigurationManager.ConnectionStrings["SqlConn"].ConnectionString; + + /// + /// 查询列表 + /// + /// 查询的sql + /// 替换参数 + /// + public static List Query(string sql, object param = null) + { + using (SqlConnection con = new SqlConnection(connectionString)) + { + return con.Query(sql, param).ToList(); + } + } + + /// + /// 查询第一个数据 + /// + /// + /// + /// + public static T QueryFirst(string sql, object param = null) + { + using (SqlConnection con = new SqlConnection(connectionString)) + { + return con.QueryFirst(sql, param); + } + } + + /// + /// 查询第一个数据没有返回默认值 + /// + /// + /// + /// + public static T QueryFirstOrDefault(string sql, object param = null) + { + using (SqlConnection con = new SqlConnection(connectionString)) + { + return con.QueryFirstOrDefault(sql, param); + } + } + + /// + /// 查询单条数据 + /// + /// + /// + /// + public static T QuerySingle(string sql, object param = null) + { + using (SqlConnection con = new SqlConnection(connectionString)) + { + return con.QuerySingle(sql, param); + } + } + + /// + /// 查询单条数据没有返回默认值 + /// + /// + /// + /// + public static T QuerySingleOrDefault(string sql, object param = null) + { + using (SqlConnection con = new SqlConnection(connectionString)) + { + return con.QuerySingleOrDefault(sql, param); + } + } + + /// + /// 增删改 + /// + /// + /// + /// Number of rows affected + public static int Execute(string sql, object param = null) + { + using (SqlConnection con = new SqlConnection(connectionString)) + { + return con.Execute(sql, param); + } + } + + /// + /// Reader获取数据 + /// + /// + /// + /// + public static IDataReader ExecuteReader(string sql, object param) + { + using (SqlConnection con = new SqlConnection(connectionString)) + { + return con.ExecuteReader(sql, param); + } + } + + /// + /// 获取数据返回DataTable + /// + /// + /// + /// + public static DataTable QueryTable(string sql, object param = null) + { + using (SqlConnection con = new SqlConnection(connectionString)) + { + DataTable table = new DataTable(); + var reader = con.ExecuteReader(sql, param); + table.Load(reader); + return table; + } + } + + /// + /// Scalar获取数据 + /// + /// + /// + /// + public static object ExecuteScalar(string sql, object param = null) + { + using (SqlConnection con = new SqlConnection(connectionString)) + { + return con.ExecuteScalar(sql, param); + } + } + + /// + /// Scalar获取数据 + /// + /// + /// + /// + public static T ExecuteScalarForT(string sql, object param = null) + { + using (SqlConnection con = new SqlConnection(connectionString)) + { + return con.ExecuteScalar(sql, param); + } + } + + /// + /// 带参数的存储过程 + /// + /// + /// + /// + public static List ExecutePro(string proc, object param = null) + { + using (SqlConnection con = new SqlConnection(connectionString)) + { + List list = con.Query(proc, + param, + null, + true, + null, + CommandType.StoredProcedure).ToList(); + return list; + } + } + /// + /// 批量插入T数据,返回影响行数 + /// + /// 对象集合 + /// 影响行数 + public static int Insert(string strsql, List list) + { + using (IDbConnection connection = new SqlConnection(connectionString)) + { + //return connection.Execute("insert into Person(Name,Remark) values(@Name,@Remark)", list); + return connection.Execute(strsql, list); + } + } + + + + /// + /// list to datatable + /// + /// + /// + /// + public static DataTable ListToDt(IEnumerable collection) + { + var props = typeof(T).GetProperties(); + var dt = new DataTable(); + dt.Columns.AddRange(props.Select(p => new + DataColumn(p.Name, p.PropertyType)).ToArray()); + if (collection.Count() > 0) + { + for (int i = 0; i < collection.Count(); i++) + { + ArrayList tempList = new ArrayList(); + foreach (PropertyInfo pi in props) + { + object obj = pi.GetValue(collection.ElementAt(i), null); + tempList.Add(obj); + } + object[] array = tempList.ToArray(); + dt.LoadDataRow(array, true); + } + } + return dt; + } + + /// + /// 批量插入SqlBulkCopy + /// + /// + /// 表名 + public static void BatchInsertBySqlBulkCopy(DataTable dt, string tableName) + { + using (SqlBulkCopy sbc = new SqlBulkCopy(connectionString)) + { + sbc.BatchSize = dt.Rows.Count; + sbc.BulkCopyTimeout = 10; + sbc.DestinationTableName = tableName; + + sbc.ColumnMappings.Clear(); + //sbc.ColumnMappings.Add("CustomerID", "CustomerID"); + //sbc.ColumnMappings.Add("FirstName", "FirstName"); + //sbc.ColumnMappings.Add("LastName", "LastName"); + //sbc.ColumnMappings.Add("Address1", "Address1"); + //sbc.ColumnMappings.Add("Address2", "Address2"); + for (int i = 0; i < dt.Columns.Count; i++) + { + sbc.ColumnMappings.Add(dt.Columns[i].ColumnName, dt.Columns[i].ColumnName); + } + //全部写入数据库 + sbc.WriteToServer(dt); + } + } + + /// + /// 批量插入数据 + /// + /// + public static int BulkToDB(string tableName, List list) + { + //int result = 0; + DataTable dt = ListToDt(list); + BatchInsertBySqlBulkCopy(dt, tableName); + return 1; + } + + /// + /// 事务1 - 全SQL + /// + /// 多条SQL + /// param + /// + public static int ExecuteTransaction(string[] sqlarr) + { + using (SqlConnection con = new SqlConnection(connectionString)) + { + con.Open(); + using (var transaction = con.BeginTransaction()) + { + try + { + int result = 0; + foreach (var sql in sqlarr) + { + result += con.Execute(sql, null, transaction); + } + + transaction.Commit(); + return result; + } + catch (Exception ex) + { + transaction.Rollback(); + throw ex; + } + finally + { + con.Close(); + } + } + } + } + + /// + /// 事务2 - 声明参数 + ///demo: + ///dic.Add("Insert into Users values (@UserName, @Email, @Address)", + /// new { UserName = "jack", Email = "380234234@qq.com", Address = "上海" }); + /// + /// 多条SQL + /// param + /// + public static int ExecuteTransaction(Dictionary dic) + { + using (SqlConnection con = new SqlConnection(connectionString)) + { + con.Open(); + using (var transaction = con.BeginTransaction()) + { + try + { + int result = 0; + foreach (var sql in dic) + { + result += con.Execute(sql.Key, sql.Value, transaction); + } + + transaction.Commit(); + return result; + } + catch (Exception ex) + { + transaction.Rollback(); + throw ex; + } + finally + { + con.Close(); + } + } + } + } + } +} \ No newline at end of file diff --git a/JY.DAL/app.config b/JY.DAL/app.config new file mode 100644 index 0000000..12b9553 --- /dev/null +++ b/JY.DAL/app.config @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JY.DAL/packages.config b/JY.DAL/packages.config new file mode 100644 index 0000000..bc3cd95 --- /dev/null +++ b/JY.DAL/packages.config @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JY.Inspection/App.config b/JY.Inspection/App.config new file mode 100644 index 0000000..9fd7879 --- /dev/null +++ b/JY.Inspection/App.config @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JY.Inspection/Common/AlarmForm.cs b/JY.Inspection/Common/AlarmForm.cs new file mode 100644 index 0000000..780786d --- /dev/null +++ b/JY.Inspection/Common/AlarmForm.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CsvHelper.Configuration.Attributes; + +namespace JY.Inspection.Common +{ + /// + /// 报警表单数据 + /// + public class AlarmForm + { + /// + /// 报警地址 + /// + [Name("寄存器地址")] + public string PLCAdress { get; set; } + /// + /// 报警内容 + /// + [Name("报警信息")] + public string AlarmContent { get; set; } + /// + /// 报警代码 + /// + [Name("故障代码")] + public string AlarmCode { get; set; } + } +} diff --git a/JY.Inspection/Common/ByteUtil.cs b/JY.Inspection/Common/ByteUtil.cs new file mode 100644 index 0000000..b0ff902 --- /dev/null +++ b/JY.Inspection/Common/ByteUtil.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Inspection.Common +{ + public static class ByteUtil + { + public static byte[] ByteReverse(this byte[] Arrbyte) + { + byte[] ArrByte = Arrbyte.Select((x, i) => new { x, i }).GroupBy(x => x.i / 2).SelectMany(x => new byte[] { x.Last().x, x.First().x }).ToArray(); + return ArrByte; + } + } +} diff --git a/JY.Inspection/Common/CSVHelper.cs b/JY.Inspection/Common/CSVHelper.cs new file mode 100644 index 0000000..008bfdc --- /dev/null +++ b/JY.Inspection/Common/CSVHelper.cs @@ -0,0 +1,100 @@ +using CsvHelper; +using JY.Utility; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JY.Inspection +{ + public class CSVHelper + { + /// + /// 读取CSV文件 + /// + /// csv文件名 + /// + public static List ReadCSV(string fileName, string strSeparator = "\t") + { + if (!File.Exists(fileName)) return null; + //Nuget获取CsvHelper + using (var reader = new StreamReader(fileName)) + { + var cfg = new CsvHelper.Configuration.CsvConfiguration(CultureInfo.InvariantCulture) + { + Mode = CsvMode.Escape, + Escape = '\\', + Delimiter = strSeparator//设置分隔符号 + }; + using (var csv = new CsvReader(reader, cfg)) + { + var list = csv.GetRecords().ToList(); + return list; + } + } + } + + /// + /// 写入数据到csv文件 + /// + /// 所需存储文件夹路径(取系统所设定值,不带日期文件夹) + /// 数据源 + /// 1进站,2出站,3智能电表.csv,4预警 + /// + public static bool WriteCSV(string filePath, List data, int flag) + { + if (string.IsNullOrEmpty(filePath)) + { + filePath = Application.StartupPath + "\\localData\\" + DateTime.Now.ToString("yyyyMMdd"); + } + else + { + filePath = filePath + "\\" + DateTime.Now.ToString("yyyyMMdd"); + } + if (!Directory.Exists(filePath)) + { + Directory.CreateDirectory(filePath); + } + switch (flag) + { + case 1: + filePath = filePath + "\\" + DateTime.Now.ToString("yyyyMMdd") + "进站.csv"; + break; + case 2: + filePath = filePath + "\\" + DateTime.Now.ToString("yyyyMMdd") + "出站.csv"; + break; + case 3: + filePath = filePath + "\\" + DateTime.Now.ToString("yyyyMMdd") + "智能电表.csv"; + break; + default: + filePath = filePath + "\\" + DateTime.Now.ToString("yyyyMMdd") + "报警.csv"; + break; + } + try + { + var cfg = new CsvHelper.Configuration.CsvConfiguration(CultureInfo.InvariantCulture); + if (File.Exists(filePath)) + { + cfg.HasHeaderRecord = false;//是否将第一行作为标题 + } + using (var writer = new StreamWriter(filePath, true, Encoding.GetEncoding("GB2312"))) + { + using (var csv = new CsvWriter(writer, cfg)) + { + csv.WriteRecords(data); + } + } + return true; + } + catch (Exception ex) + { + LogHelper.Error(ex.ToString()); + return false; + } + } + } +} diff --git a/JY.Inspection/Common/CollectionUtil.cs b/JY.Inspection/Common/CollectionUtil.cs new file mode 100644 index 0000000..0713077 --- /dev/null +++ b/JY.Inspection/Common/CollectionUtil.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Inspection.Common +{ + public class CollectionUtil + { + /// + /// 生成ushort List集合 + /// + /// + /// + public static List GetListUShort(int Num) + { + List list = new List(); + for (int i = 0; i < Num; i++) + { + list.Add(1); + } + return list; + } + } +} diff --git a/JY.Inspection/Common/ConnectionClient.cs b/JY.Inspection/Common/ConnectionClient.cs new file mode 100644 index 0000000..8a3e9dd --- /dev/null +++ b/JY.Inspection/Common/ConnectionClient.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net.Sockets; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace JY.Inspection +{ + /// + /// 与客户端的 连接通信类(包含了一个 与客户端 通信的 套接字,和线程) + /// + public class ConnectionClient + { + Socket sokMsg; + DGShowMsg dgShowMsg;//负责 向主窗体文本框显示消息的方法委托 + DGShowMsg dgRemoveConnection;// 负责 从主窗体 中移除 当前连接 + Thread threadMsg; + + #region 构造函数 + /// + /// + /// + /// 通信套接字 + /// 向主窗体文本框显示消息的方法委托 + public ConnectionClient(Socket sokMsg, DGShowMsg dgShowMsg, DGShowMsg dgRemoveConnection) + { + this.sokMsg = sokMsg; + this.dgShowMsg = dgShowMsg; + this.dgRemoveConnection = dgRemoveConnection; + + this.threadMsg = new Thread(RecMsg); + this.threadMsg.IsBackground = true; + this.threadMsg.Start(); + } + #endregion + + bool isRec = true; + #region 02负责监听客户端发送来的消息 + void RecMsg() + { + while (isRec) + { + try + { + byte[] arrMsg = new byte[1024 * 1024 * 2]; + //接收 对应 客户端发来的消息 + int length = sokMsg.Receive(arrMsg); + //将接收到的消息数组里真实消息转成字符串 + string strMsg = System.Text.Encoding.UTF8.GetString(arrMsg, 0, length); + //通过委托 显示消息到 窗体的文本框 + dgShowMsg(strMsg); + } + catch (Exception ex) + { + isRec = false; + //从主窗体中 移除 下拉框中对应的客户端选择项,同时 移除 集合中对应的 ConnectionClient对象 + dgRemoveConnection(sokMsg.RemoteEndPoint.ToString()); + } + } + } + #endregion + + #region 03向客户端发送消息 + /// + /// 向客户端发送消息 + /// + /// + public void Send(string strMsg) + { + byte[] arrMsg = System.Text.Encoding.UTF8.GetBytes(strMsg); + byte[] arrMsgFinal = new byte[arrMsg.Length + 1]; + + arrMsgFinal[0] = 0;//设置 数据标识位等于0,代表 发送的是 文字 + arrMsg.CopyTo(arrMsgFinal, 0); + + sokMsg.Send(arrMsgFinal); + } + #endregion + + #region 04向客户端发送文件数据 +void SendFile(string strPath) + /// + /// 04向客户端发送文件数据 + /// + /// 文件路径 + public void SendFile(string strPath) + { + //通过文件流 读取文件内容 + using (FileStream fs = new FileStream(strPath, FileMode.OpenOrCreate)) + { + byte[] arrFile = new byte[1024 * 1024 * 2]; + //读取文件内容到字节数组,并 获得 实际文件大小 + int length = fs.Read(arrFile, 0, arrFile.Length); + //定义一个 新数组,长度为文件实际长度 +1 + byte[] arrFileFina = new byte[length + 1]; + arrFileFina[0] = 1;//设置 数据标识位等于1,代表 发送的是文件 + //将 文件数据数组 复制到 新数组中,下标从1开始 + //arrFile.CopyTo(arrFileFina, 1); + Buffer.BlockCopy(arrFile, 0, arrFileFina, 1, length); + //发送文件数据 + sokMsg.Send(arrFileFina);//, 0, length + 1, SocketFlags.None); + } + } + #endregion + + #region 05向客户端发送闪屏 + /// + /// 向客户端发送闪屏 + /// + /// + public void SendShake() + { + byte[] arrMsgFinal = new byte[1]; + arrMsgFinal[0] = 2; + sokMsg.Send(arrMsgFinal); + } + #endregion + + #region 06关闭与客户端连接 + /// + /// 关闭与客户端连接 + /// + public void CloseConnection() + { + isRec = false; + } + #endregion + } +} diff --git a/JY.Inspection/Common/DGShowMsg.cs b/JY.Inspection/Common/DGShowMsg.cs new file mode 100644 index 0000000..608cec6 --- /dev/null +++ b/JY.Inspection/Common/DGShowMsg.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Inspection +{ + public delegate void DGShowMsg(string strMsg); +} diff --git a/JY.Inspection/Common/DateTimeSynchronization.cs b/JY.Inspection/Common/DateTimeSynchronization.cs new file mode 100644 index 0000000..c29afab --- /dev/null +++ b/JY.Inspection/Common/DateTimeSynchronization.cs @@ -0,0 +1,127 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Inspection +{ + /// + /// 设置电脑时间 + /// + public class DateTimeSynchronization + { + [StructLayout(LayoutKind.Sequential)] + private struct Systemtime + { + public short year; + public short month; + public short dayOfWeek; + public short day; + public short hour; + public short minute; + public short second; + public short milliseconds; + } + + [DllImport("kernel32.dll")] + private static extern bool SetLocalTime(ref Systemtime time); + + private static uint swapEndian(ulong x) + { + return (uint)(((x & 0x000000ff) << 24) + + ((x & 0x0000ff00) << 8) + + ((x & 0x00ff0000) >> 8) + + ((x & 0xff000000) >> 24)); + } + + /// + /// 手动设置系统时间 + /// + /// 需要设置的时间 + /// 返回系统时间设置状态,true为成功,false为失败 + public static bool SetLocalDateTime(DateTime dt) + { + Systemtime st; + st.year = (short)dt.Year; + st.month = (short)dt.Month; + st.dayOfWeek = (short)dt.DayOfWeek; + st.day = (short)dt.Day; + st.hour = (short)dt.Hour; + st.minute = (short)dt.Minute; + st.second = (short)dt.Second; + st.milliseconds = (short)dt.Millisecond; + bool rt = SetLocalTime(ref st); + return rt; + } + + + private static IPAddress iPAddress = null; + /// + /// 从NTP获取时间更新本地时间 + /// + /// + /// + /// + /// + public static bool Synchronization(string host, out DateTime syncDateTime, out string message) + { + syncDateTime = DateTime.Now; + try + { + message = ""; + if (iPAddress == null) + { + var iphostinfo = Dns.GetHostEntry(host); + var ntpServer = iphostinfo.AddressList[0]; + iPAddress = ntpServer; + } + DateTime dtStart = DateTime.Now; + //NTP消息大小摘要是16字节 (RFC 2030) + byte[] ntpData = new byte[48]; + //设置跳跃指示器、版本号和模式值 + // LI = 0 (no warning), VN = 3 (IPv4 only), Mode = 3 (Client Mode) + ntpData[0] = 0x1B; + IPAddress ip = iPAddress; + // NTP服务给UDP分配的端口号是123 + IPEndPoint ipEndPoint = new IPEndPoint(ip, 123); + // 使用UTP进行通讯 + Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); + socket.Connect(ipEndPoint); + socket.ReceiveTimeout = 3000; + socket.Send(ntpData); + socket.Receive(ntpData); + socket?.Close(); + socket?.Dispose(); + DateTime dtEnd = DateTime.Now; + //传输时间戳字段偏移量,以64位时间戳格式,应答离开客户端服务器的时间 + const byte serverReplyTime = 40; + // 获得秒的部分 + ulong intPart = BitConverter.ToUInt32(ntpData, serverReplyTime); + //获取秒的部分 + ulong fractPart = BitConverter.ToUInt32(ntpData, serverReplyTime + 4); + //由big-endian 到 little-endian的转换 + intPart = swapEndian(intPart); + fractPart = swapEndian(fractPart); + ulong milliseconds = (intPart * 1000) + ((fractPart * 1000) / 0x100000000UL); + // UTC时间 + DateTime webTime = (new DateTime(1900, 1, 1, 0, 0, 0, DateTimeKind.Utc)).AddMilliseconds(milliseconds); + //本地时间 + DateTime dt = webTime.ToLocalTime(); + bool isSuccess = SetLocalDateTime(dt); + syncDateTime = dt; + + } + catch (Exception ex) + { + message = ex.Message; + return false; + } + return true; + + } + } +} diff --git a/JY.Inspection/Common/DeleteLog.cs b/JY.Inspection/Common/DeleteLog.cs new file mode 100644 index 0000000..a651084 --- /dev/null +++ b/JY.Inspection/Common/DeleteLog.cs @@ -0,0 +1,120 @@ +using System; +using System.IO; +using System.Text; +using System.Threading; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace JY.Inspection +{ + public class ServiceLog + { + public void Start() + { + Thread thread = new Thread(Init); + thread.IsBackground = true; + thread.Start(); + } + + private void Init() + { + while (true) + { + try + { + DeleteFile(System.Environment.CurrentDirectory + @"\Logs\", 30); //删除该目录下 超过 30天的文件 + } + catch (Exception err) + { + Console.WriteLine(err.Message, err.StackTrace); + } + finally + { + Thread.Sleep(100000); + } + } + } + private void DeleteFile(string fileDirect, int saveDay) + { + try + { + DateTime nowTime = DateTime.Now; + string[] files = Directory.GetFiles(fileDirect, "*.txt", SearchOption.AllDirectories); //获取该目录下所有 .txt文件 + foreach (string file in files) + { + FileInfo fileInfo = new FileInfo(file); + TimeSpan t = DateTime.Now - fileInfo.CreationTime; //当前时间 减去 文件创建时间 + int day = t.Days; + if (day > saveDay) //保存的时间,单位:天 + { + if (IsOccupy(fileInfo.FullName)) //判断文件是否被占用 + { + System.IO.File.Delete(fileInfo.FullName); //删除文件 + } + else + { + + Log4Helper.WriteLog("文件被占用,无法操作!","错误提示"); + + } + } + } + } + catch (Exception err) + { + Log4Helper.WriteLog("文件被占用,无法操作!",err); + } + + } + + [DllImport("kernel32.dll")] + public static extern IntPtr _lopen(string lpPathName, int iReadWrite); + + [DllImport("kernel32.dll")] + public static extern bool CloseHandle(IntPtr hObject); + + public const int OF_READWRITE = 2; + public const int OF_SHARE_DENY_NONE = 0x40; + public readonly IntPtr HFILE_ERROR = new IntPtr(-1); + + /// + /// 判断文件是否被占用 + /// + /// + /// + private bool IsOccupy(string file) + { + bool result = true; //默认状态此文件未被占用 + try + { + //string vFileName = @"c:\temp\temp.bmp"; + string vFileName = file; + if (!System.IO.File.Exists(vFileName)) + { + //Logger.Info("文件都不存在!"); + result = false; + } + IntPtr vHandle = _lopen(vFileName, OF_READWRITE | OF_SHARE_DENY_NONE); + if (vHandle == HFILE_ERROR) + { + + Log4Helper.WriteLog("文件被占用!", "错误提示"); + result = false; + } + CloseHandle(vHandle); + Log4Helper.WriteLog("没有被占用!", "错误提示"); + + + } + catch (Exception err) + { + result = false; + Log4Helper.WriteLog("判断文件是否被占用", err); + + + } + return result; + } + + } +} \ No newline at end of file diff --git a/JY.Inspection/Common/ExcelToSQL.cs b/JY.Inspection/Common/ExcelToSQL.cs new file mode 100644 index 0000000..c109a3f --- /dev/null +++ b/JY.Inspection/Common/ExcelToSQL.cs @@ -0,0 +1,157 @@ +using System; +using System.Data; +using System.Data.OleDb; +using System.Windows.Forms; + +namespace JY.Infrastructure.Common +{ + public class ExcelToSQL + { + //DBUnti _db = new DBUnti(); + + + public bool ExcelToSql(ref string strErr) + { + try + { + OpenFileDialog fd = new OpenFileDialog(); + fd.Filter = "导入SQL数据库|*.xlsx;*.xls";//打开文件对话框筛选器 + if (fd.ShowDialog() == DialogResult.OK) + { + bool b= TransferData(fd.FileName, "tb_hxconfigbase", ref strErr); //数据库表中名称 + if (b) + { + return true; + } + } + } + catch (Exception ex) + { + strErr = ex.Message; + } + return false; + } + + + /// + /// Excel导入到Mysql + /// + /// + /// + public bool ExcelToStandardSQL(ref string strErr) + { + try + { + strErr = ""; + OpenFileDialog fd = new OpenFileDialog(); + fd.Filter = "导入SQL数据库|*.xlsx;*.xls";//打开文件对话框筛选器 + if (fd.ShowDialog() == DialogResult.OK) + { + DataTable dt = GetExcelDatatable(fd.FileName, "mapTable"); + bool b = OpDataBase.InsetMySqlData(dt,ref strErr); + if (strErr=="") + { + return true; + } + //TransferData(fd.FileName, "tb_hxconfigbase", _db.connstr,ref strErr); //数据库表中名称 + } + strErr = "取消导入"; + } + catch (Exception ex) + { + strErr = ex.Message; + } + return false; + } + + + /// + /// Excel导入到SQLSERVER + /// + /// + /// + /// + /// + public bool TransferData(string excelFile, string sheetName, ref string strErr) + { + strErr = ""; + DataSet ds = new DataSet(); + try + { + string strConn = ""; + strConn = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source=" + excelFile + ";Extended Properties='Excel 8.0;HDR=Yes;IMEX=1'"; + strConn = "Provider = Microsoft.ACE.OLEDB.12.0;Data Source=" + excelFile + ";Extended Properties='Excel 12.0;HDR=Yes;IMEX=1'"; + OleDbConnection conn = new OleDbConnection(strConn); + conn.Open(); + string strExcel = ""; + OleDbDataAdapter myCommand; + strExcel = string.Format("select * from [{0}$]", sheetName); + myCommand = new OleDbDataAdapter(strExcel, strConn); + myCommand.Fill(ds, sheetName); + bool b= OpDataBase.InsetSqlData(ds, sheetName,ref strErr); + if (strErr=="") + { + return true; + } + #region 屏蔽 + ////列出ds内存表内所有数据,通过For循环把ModelType项数据添加到List集合 + //List Mlist = new List(); + //for (int i=0;i typeSet = new HashSet(Mlist);//去除List集合重复项 + //foreach(var item in typeSet) + //{ + // _sqldb.AddModelType(item, ref strErr); + //} + #endregion + + //如果目标表不存在则创建,excel文件的第一行为列标题,从第二行开始全部都是数据记录 + } + catch (Exception ex) + { + strErr = ex.Message; + } + return false; + } + + public DataTable GetExcelDatatable(string fileUrl, string table) + { + //office2007之前 仅支持.xls + //const string cmdText = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties='Excel 8.0;IMEX=1';"; + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + const string cmdText = "Provider=Microsoft.Ace.OleDb.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + DataTable dt = null; + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, fileUrl)); + try + { + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } + System.Data.DataTable schemaTable = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + //获取Excel的第一个Sheet名称 + string sheetName = schemaTable.Rows[0]["TABLE_NAME"].ToString().Trim(); + //查询sheet中的数据 + string strSql = "select * from [" + sheetName + "]"; + OleDbDataAdapter da = new OleDbDataAdapter(strSql, conn); + DataSet ds = new DataSet(); + da.Fill(ds, table); + dt = ds.Tables[0]; + return dt; + } + catch (Exception exc) + { + throw exc; + } + finally + { + conn.Close(); + conn.Dispose(); + } + } + } +} diff --git a/JY.Inspection/Common/ExportXls.cs b/JY.Inspection/Common/ExportXls.cs new file mode 100644 index 0000000..75aa6cc --- /dev/null +++ b/JY.Inspection/Common/ExportXls.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NPOI; +using NPOI.HPSF; +using NPOI.HSSF; +using NPOI.HSSF.UserModel; +using NPOI.SS.UserModel; +using NPOI.POIFS; +using NPOI.Util; +using System.IO; +using System.Data; +using System.Threading.Tasks; + +namespace JY.Infrastructure.Common +{ + class ExportXls + { + /// + /// 由DataTable导出Excel + /// + /// 要导出数据的DataTable + /// Excel工作表 + public void ExportDataTableToExcel(DataTable sourceTable, string sheetName, string filepath) + { + + FileStream file = new FileStream(filepath, FileMode.Create); + HSSFWorkbook workbook = new HSSFWorkbook(); + // MemoryStream ms = new MemoryStream(); + ISheet sheet = workbook.CreateSheet(sheetName); + IRow headerRow = sheet.CreateRow(0); + // handling header. + foreach (DataColumn column in sourceTable.Columns) + + headerRow.CreateCell(column.Ordinal).SetCellValue(column.ColumnName); + // handling value. + int rowIndex = 1; + + foreach (DataRow row in sourceTable.Rows) + { + IRow dataRow = sheet.CreateRow(rowIndex); + foreach (DataColumn column in sourceTable.Columns) + { + dataRow.CreateCell(column.Ordinal).SetCellValue(row[column].ToString()); + } + rowIndex++; + } + + workbook.Write(file); + file.Close(); + sheet = null; + headerRow = null; + workbook = null; + } + + } +} diff --git a/JY.Inspection/Common/Global.cs b/JY.Inspection/Common/Global.cs new file mode 100644 index 0000000..83f5087 --- /dev/null +++ b/JY.Inspection/Common/Global.cs @@ -0,0 +1,40 @@ +using JY.Model; +using System.Collections.Generic; +using System.IO; + +namespace JY.Inspection +{ + public class Global + { + /// + /// 错误日志路径 + /// + public static string strErrorLogspath = System.Windows.Forms.Application.StartupPath + "\\Logs\\ErrorLogs"; + + public static string strSystemLogspath = System.Windows.Forms.Application.StartupPath + "\\Logs\\SystemLogs"; + /// + /// MES路径日志 + /// + public static string strMesLogspath = System.Windows.Forms.Application.StartupPath + "\\Logs\\MesLogs"; + /// + /// PLC读取寄存器配置文件路径 + /// + public static string ConfigPath = Path.Combine(System.Windows.Forms.Application.StartupPath, "ini\\PlcConfig.ini"); + /// + /// 系统程序配置文件路径 + /// + public static string iniFilePath = Path.Combine(System.Windows.Forms.Application.StartupPath, "ini\\Configure.ini"); + + public static string CollectItemCfgPath = Path.Combine(System.Windows.Forms.Application.StartupPath, @"Config/采集项参照表.xlsx"); + + + public static SystemConfig systemConfig = new SystemConfig(); + + + public static List Instructions = new List(); + + + + + } +} diff --git a/JY.Inspection/Common/Log4Helper.cs b/JY.Inspection/Common/Log4Helper.cs new file mode 100644 index 0000000..63374fd --- /dev/null +++ b/JY.Inspection/Common/Log4Helper.cs @@ -0,0 +1,32 @@ +using log4net; +using System; + +namespace JY.Inspection +{ + internal class Log4Helper + { + public static void WriteLog(Type t, Exception ex) + { + ILog log = LogManager.GetLogger(t); + log.Error(ex); + } + + public static void WriteLog(Type t, string msg) + { + ILog log = LogManager.GetLogger(t); + log.Info(msg); + } + + public static void WriteLog(string className, Exception ex) + { + ILog log = LogManager.GetLogger(className); + log.Error(ex); + } + + public static void WriteLog(string className, string msg) + { + ILog log = LogManager.GetLogger(className); + log.Info(msg); + } + } +} diff --git a/JY.Inspection/Common/MessageBoxTimeOut.cs b/JY.Inspection/Common/MessageBoxTimeOut.cs new file mode 100644 index 0000000..be3c3dd --- /dev/null +++ b/JY.Inspection/Common/MessageBoxTimeOut.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JY.Inspection +{ + public class MessageBoxTimeOut + { + private string _caption; + //public void Alert(string msg, FrmAlert.enmType type) + //{ + // FrmAlert frm = new FrmAlert(); + // frm.ShowAlert(msg, type); + //} + public void Show(string text, FrmAlert.enmType type) + { + this._caption = "信息提示"; + StartTimer(3000); + //Alert(text, type); + + MessageBox.Show(text,"信息提示"); + } + private void StartTimer(int interval) + { + Timer timer = new Timer(); + timer.Interval = interval; + timer.Tick += new EventHandler(Timer_Tick); + timer.Enabled = true; + } + private void Timer_Tick(object sender, EventArgs e) + { + KillMessageBox(); + //停止计时器 + ((Timer)sender).Enabled = false; + } + [DllImport("User32.dll", EntryPoint = "FindWindow", CharSet = CharSet.Auto)] + private extern static IntPtr FindWindow(string lpClassName, string lpWindowName); + [DllImport("User32.dll", CharSet = CharSet.Auto)] + public static extern int PostMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); + public const int WM_CLOSE = 0x10; + private void KillMessageBox() + { + //查找MessageBox的弹出窗口,注意对应标题 + IntPtr ptr = FindWindow(null, this._caption); + if (ptr != IntPtr.Zero) + { + //查找到窗口则关闭 + PostMessage(ptr, WM_CLOSE, IntPtr.Zero, IntPtr.Zero); + } + } + } +} diff --git a/JY.Inspection/Common/MessageTip.cs b/JY.Inspection/Common/MessageTip.cs new file mode 100644 index 0000000..f4dbf30 --- /dev/null +++ b/JY.Inspection/Common/MessageTip.cs @@ -0,0 +1,443 @@ +using System; +using System.ComponentModel; +using System.Drawing; +using System.IO; +using System.Threading; +using System.Windows.Forms; + +namespace JY.Inspection +{ + + public enum Logstype//枚举类型 + { + Message, + Warning, + Error + } + + + /// + /// 轻快型消息提示类 + /// + public static class MessageTip + { + static readonly Image _iconOk; + static readonly Image _iconWarning; + static readonly Image _iconError; + + /// + /// 全局停留时长(毫秒),影响后续弹出的tip。默认500 + /// + public static int DefaultDelay { get; set; } + + /// + /// 是否允许上浮动画。默认true + /// + public static bool AllowFloating { get; set; } + + static MessageTip() + { + DefaultDelay = 500; + AllowFloating = true; + + Bitmap spriteImage; + using (var ms = new MemoryStream(Convert.FromBase64String(DefaultIconData))) + { + //不能直接用Img.FromMs得到的对象,怀疑因该方法得到的对象与源ms有瓜葛 + //ms释放后会导致莫名问题,比如下面的Clone会引发内存不足异常 + //而new Bitmap(Image)相当于基于Image重造了一个全新的bmp + spriteImage = new Bitmap(Image.FromStream(ms)); + } + + _iconOk = spriteImage.Clone(new Rectangle(0, 0, 32, 32), spriteImage.PixelFormat); + _iconWarning = spriteImage.Clone(new RectangleF(32, 0, 32, 32), spriteImage.PixelFormat); + _iconError = spriteImage.Clone(new RectangleF(64, 0, 32, 32), spriteImage.PixelFormat); + } + + /// + /// 显示良好消息,图标为绿勾 √ + /// + /// 消息文本 + /// 消息停留时长(毫秒)。指定负数则使用 DefaultDelay + public static void ShowOk(string text = null, int delay = -1) + { + Show(text, _iconOk, Color.SeaGreen, Color.White, delay); + } + + /// + /// 显示警告消息,图标为黄色感叹号 ! + /// + /// 消息文本 + /// 消息停留时长(毫秒)。指定负数则使用 DefaultDelay + public static void ShowWarning(string text = null, int delay = -1) + { + Show(text, _iconWarning, Color.DarkOrange, Color.Black, delay); + } + + /// + /// 显示出错消息,图标为红叉 X + /// + /// 消息文本 + /// 消息停留时长(毫秒)。指定负数则使用 DefaultDelay + public static void ShowError(string text = null, int delay = -1) + { + Show(text, _iconError, Color.Red, Color.White, delay); + } + + /// + /// 显示消息 + /// + /// 消息文本 + /// 图标。不会进行缩放 + /// 消息停留时长(毫秒)。指定负数则使用 DefaultDelay + public static void Show(string text, Image icon, Color bkColor, Color textColor, int delay = -1) + { + ThreadPool.QueueUserWorkItem(obj => new TipForm + { + TipText = text, + TipIcon = icon, + Delay = delay < 0 ? DefaultDelay : delay, + Floating = AllowFloating, + BkColor = bkColor, + TextColor= textColor, + BasePoint = Control.MousePosition //在鼠标点击的附近弹出 + }.ShowDialog()); ;//要让创建浮动窗体的线程具有消息循环,所以要用ShowDialog + } + + /// + /// 内置图标数据:√ ! X + /// + const string DefaultIconData = @"R0lGODlhYAAgANUAAOrcJ9LORebm5tJKShPLJLczM/z3s/XrkNfSOhS2JKaYMezeaMoREfhwcNS3 +t7IREVSkWpWQZjCpPfz8+zS4RN3PZdTU1EjLWG9uaO/w7/Dke1HVYfHsx5UzM8Q8PLjYuqmmn8bl +yeO3txsbD+fck9DAUeDaVV1cHuHXMDGTOO3iSeHy4+BYWDvGTPn25O/hN5PIl8K1Pbfhu/z78nW/ +fPb39lbeZ5/WpIAzM2HpcqITExGiIjV/N8S9luLbqf///yH5BAAAAAAALAAAAABgACAAAAb/wJ9w +SCwaj8ikcslsOp/QKFNUEEGpVqm2OQtUZlJqo+oUk7fHFUWmJWk0pKi4Mc4qxaw6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sKrTc +MgIxmKivyKGC3PHAOf8wQQ0ZZCAACObyYIEAQWdQw9ITNH2EDwzLLPXUFWc8xM37fnwE1h73/APQ +AlggNgg88NCD2EcLgLTSThtB6wsqvCD33HIDwDLLVDsc678dZO11EZl2jcTPQattuNpJK11D020T +MUEPCkQu+eSUV255DwrrS65Kum4eyRJNAy304aSXXrriTk8wOgg4gIB22okbjjbrICC9E/jnuEcR ++uiHB73076KT7rvTQQAAOw=="; + + /// + /// 浮动消息层 + /// + private class TipForm : Form + { + /// + /// 图标和文本之间的间距(像素) + /// + const int IconTextSpacing = 3; + + /// + /// 基准点。用于指导本窗体显示位置 + /// + public Point BasePoint { get; set; } + /// + /// 显示文字 + /// + string _tipText; + /// + /// 背景色 + /// + Color _bkColor = Color.SeaGreen; + /// + /// 文字颜色 + /// + Color _textColor=Color.Black; + /// + /// 提示图标 + /// + public Image TipIcon { get; set; } + + /// + /// 提示文本 + /// + public string TipText + { + get { return _tipText ?? string.Empty; } + set { _tipText = value; } + } + + /// + /// 文字显示颜色 + /// + //[DefaultValue(500)] + public Color TextColor + { + get { return _textColor; } + set + { + _textColor = value; + this.ForeColor = _textColor; + } + } + + /// + /// 停留时长(毫秒) + /// + [DefaultValue(500)] + public int Delay { get; set; } + + /// + /// 停留时长(毫秒) + /// + //[DefaultValue(Color.White)] + public Color BkColor + { + get { return _bkColor; } + set + { + _bkColor = value; + this.BackColor = _bkColor; + } + } + /// + /// 是否允许浮动 + /// + [DefaultValue(true)] + public bool Floating { get; set; } + + //显示后不激活,即不抢焦点 + protected override bool ShowWithoutActivation + { + get { return true; } + } + + public TipForm() + { + //双缓冲。有必要 + SetStyle(ControlStyles.UserPaint, true); + DoubleBuffered = true; + + InitializeComponent(); + + Delay = 500; + Floating = true; + BkColor = Color.White; + this._timer.Tick += timer_Tick; + this.Load += TipForm_Load; + this.Shown += TipForm_Shown; + this.FormClosing += TipForm_FormClosing; + } + + /// + /// 根据图标和文字处理窗体尺寸 + /// + private void ProcessClientSize() + { + Size size = Size.Empty; + if (TipIcon != null) + { + size += TipIcon.Size; + } + if (TipText.Length != 0) + { + if (TipIcon != null) + { + size.Width += IconTextSpacing;//图标与文字的间距 + } + var textSize = TextRenderer.MeasureText(TipText, this.Font); + size.Width += textSize.Width; + if (size.Height < textSize.Height) { size.Height = textSize.Height; } + } + this.ClientSize = size + Padding.Size; + } + private int x, y; //显示的坐标变量 + /// + /// 根据基准点处理窗体显示位置 + /// + private void ProcessLocation() + { + + #region 弹窗显示在屏幕中间 + this.y = (Screen.PrimaryScreen.Bounds.Height - 30 - this.Height) / 2; + this.x = (Screen.PrimaryScreen.Bounds.Width - 10 - this.Width) / 2; + this.Location = new Point(this.x, this.y); + #endregion + + #region 弹窗显示在屏幕右下角 + //this.x = Screen.PrimaryScreen.WorkingArea.Width - this.Width + 15; + //this.y = Screen.PrimaryScreen.WorkingArea.Height - this.Height * i - 5 * i; + //this.Location = new Point(this.x, this.y); + #endregion + + #region 弹窗跟随鼠标位置 + //var p = BasePoint; + //p.X -= Screen.PrimaryScreen.WorkingArea.Width - this.Width - 1000;//Screen.PrimaryScreen.WorkingArea.Width-this.Width / 2; + + ////横向处理。距离屏幕左右两边太近时的处理 + //int screenWidth; + //if (p.X < 10) + //{ + // p.X = 10; + //} + //else if (p.X + this.Width > (screenWidth = Screen.PrimaryScreen.Bounds.Width) - 10) + //{ + // p.X = screenWidth - 10 - this.Width; + //} + + ////纵向处理。在鼠标上方显示 + //p.Y -= this.Height + 20; + + //this.Location = p; + #endregion + } + + void TipForm_Load(object sender, EventArgs e) + { + ProcessClientSize(); + ProcessLocation(); + + //上浮窗体动画。采用异步,以不阻塞透明渐变动画的进行 + if (Floating) + { + ThreadPool.QueueUserWorkItem(obj => + { + while (this.IsHandleCreated) + { + this.BeginInvoke(new Action(arg => + { + this.Top--; + Application.DoEvents(); + }), (object)null); + + Thread.Sleep(30); + } + }); + } + + //透明渐入动画。之所以不用异步是为了在完全显示后再开始Delay的计时 + //不然如果Delay设置过低,还没等看清就渐隐了 + this.Opacity = 0; + while (this.Opacity < 1) + { + this.Opacity += 0.1; + Application.DoEvents(); + Thread.Sleep(10); + } + } + + void TipForm_Shown(object sender, EventArgs e) + { + //因为timer.Interval不能为0 + if (Delay > 0) + { + _timer.Interval = Delay; + _timer.Start(); + } + else + { + this.Close(); + } + } + + void timer_Tick(object sender, EventArgs e) + { + _timer.Stop(); + this.Close(); + } + + void TipForm_FormClosing(object sender, FormClosingEventArgs e) + { + //透明渐隐动画 + while (this.Opacity > 0) + { + this.Opacity -= 0.1; + Application.DoEvents(); + Thread.Sleep(20); + } + } + + protected override void OnPaint(PaintEventArgs e) + { + base.OnPaint(e); + + var clip = GetPaddedRectangle();//得到作图区域 + var g = e.Graphics; + //g.DrawRectangle(Pens.Red, clip);//debug + + //画图标 + if (TipIcon != null) + { + g.DrawImageUnscaled(TipIcon, clip.Location); + } + //画文本 + if (TipText.Length != 0) + { + if (TipIcon != null) + { + clip.X += TipIcon.Width + IconTextSpacing; + } + TextRenderer.DrawText(g, TipText, this.Font, clip, this.ForeColor, TextFormatFlags.VerticalCenter); + } + } + + protected override void OnPaintBackground(PaintEventArgs e) + { + base.OnPaintBackground(e); + + //画边框 + ControlPaint.DrawBorder(e.Graphics, this.ClientRectangle, SystemColors.ControlDark, ButtonBorderStyle.Solid); + } + + /// + /// 获取刨去Padding的内容区 + /// + private Rectangle GetPaddedRectangle() + { + Rectangle r = this.ClientRectangle; + r.X += this.Padding.Left; + r.Y += this.Padding.Top; + r.Width -= this.Padding.Horizontal; + r.Height -= this.Padding.Vertical; + return r; + } + + #region 设计器内容 + + protected override void Dispose(bool disposing) + { + if (disposing) + { + _timer.Dispose();//这货必须显示释放 + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this._timer = new System.Windows.Forms.Timer(); + this.SuspendLayout(); + + this.AutoScaleMode = AutoScaleMode.None; + //this.ClientSize = new System.Drawing.Size(100, 100); + this.BackColor = Color.White; + this.Font = new Font(SystemFonts.MessageBoxFont.FontFamily, 12); + this.FormBorderStyle = FormBorderStyle.None; + this.Padding = new Padding(20, 10, 20, 10); + this.Name = "TipForm"; + this.ShowInTaskbar = false; + + this.ResumeLayout(false); + } + + private System.Windows.Forms.Timer _timer; + + #endregion + } + + } +} diff --git a/JY.Inspection/Common/PLCAlarmParse.cs b/JY.Inspection/Common/PLCAlarmParse.cs new file mode 100644 index 0000000..1572f78 --- /dev/null +++ b/JY.Inspection/Common/PLCAlarmParse.cs @@ -0,0 +1,193 @@ +using JY.Inspection.Entity; +using System.Collections.Generic; +using System.Linq; + +namespace JY.Inspection.Common +{ + public static class PLCAlarmParse + { + + /// + /// 三菱将报警地址值转成报警List + /// + /// PLC地址值,如100 + /// PLC读取出来的值 + /// PLC地址类型,默认值R + /// + public static List MelsecByte2Status(int plcAddrSuffix, byte[] byteData, char plcAddrPrefix = 'R') + { + var listAlarmStatus = new List(); + // byte[]转为二进制字符串表示 + string strResult = ""; + for (int i = 0; i < byteData.Length; i++) + { + string strTemp = System.Convert.ToString(byteData[i], 2); + strTemp = strTemp.PadLeft(8, '0').StrReverse(); + strResult += strTemp; + } + + for (int i = 0; i < strResult.Length; i++) + { + var plcByte = i % 16; + //如果是16的倍数地址+1 + if (plcByte % 16 == 0 && i != 0) + { + plcAddrSuffix++; + } + //将地址和状态添加到结果集 + listAlarmStatus.Add(new AlarmStatus() + { + PLCAdress = $"{plcAddrPrefix}{plcAddrSuffix}.{plcByte.ToString("X")}", + Status = strResult[i] == '1' + }); + //if (strResult[i] == '1') + // Console.WriteLine($"{plcAddrPrefix}{plcAddrSuffix}.{plcByte.ToString("X")}:{strResult[i]}"); + } + + return listAlarmStatus; + } + + + /// + /// 欧姆龙NX系列Ethernet/IP通讯时将报警地址值转成报警List {直接读取标签地址/无需高低位互换} + /// + /// PLC地址值,如100 + /// PLC读取出来的值 + /// PLC地址类型,默认值R + /// + public static List OmronEIPByte2Status(int plcAddrSuffix, List byteData, char plcAddrPrefix = 'W') + { + var listAlarmStatus = new List(); + // byte[]转为二进制字符串表示 + string strResult = ""; + for (int i = 0; i < byteData.Count; i++) + { + string strTemp = System.Convert.ToString(byteData[i], 2); + strTemp = strTemp.PadLeft(8, '0').StrReverse(); + strResult += strTemp; + } + + for (int i = 0; i < strResult.Length; i++) + { + var plcByte = i % 16; + //如果是16的倍数地址+1 + if (plcByte % 16 == 0 && i != 0) + { + plcAddrSuffix++; + } + //将地址和状态添加到结果集 + listAlarmStatus.Add(new AlarmStatus() + { + PLCAdress = $"{plcAddrPrefix}6100[{plcAddrSuffix}].B[{plcByte.ToString()}]", + Status = strResult[i] == '1' + }); + + //if (strResult[i] == '1') + // Console.WriteLine($"{plcAddrPrefix}{plcAddrSuffix}.{plcByte.ToString("X")}:{strResult[i]}"); + } + + return listAlarmStatus; + } + + + /// + /// 欧姆龙FINS通讯读取EM数据寄存器是时将报警地址值转成报警List + /// + /// PLC地址值,如100 + /// PLC读取出来的值 + /// PLC地址类型,默认值W + /// + public static List OmronFinsByte2Status(int plcAddrSuffix, byte[] byteData, char plcAddrPrefix = 'E') + { + var listAlarmStatus = new List(); + // byte[]转为二进制字符串表示 + byte[] revBytes = SWAPbyte(byteData); //字节高低位互换 + string strResult = ""; + for (int i = 0; i < revBytes.Length; i++) + { + string strTemp = System.Convert.ToString(revBytes[i], 2); + strTemp = strTemp.PadLeft(8, '0').StrReverse(); + strResult += strTemp; + } + + for (int i = 0; i < strResult.Length; i++) + { + var plcByte = i % 16; + //如果是16的倍数地址+1 + if (plcByte % 16 == 0 && i != 0) + { + plcAddrSuffix++; + } + //将地址和状态添加到结果集 + listAlarmStatus.Add(new AlarmStatus() + { + PLCAdress = $"{plcAddrPrefix}{plcAddrSuffix}.{plcByte.ToString("X")}", + Status = strResult[i] == '1' + }); + //if (strResult[i] == '1') + // Console.WriteLine($"{plcAddrPrefix}{plcAddrSuffix}.{plcByte.ToString("X")}:{strResult[i]}"); + } + + return listAlarmStatus; + + } + /// + /// 欧姆龙FINS通讯读取W数据寄存器是时将报警地址值转成报警List + /// + /// PLC地址值,如100 + /// PLC读取出来的值 + /// PLC地址类型,默认值W + /// + //public static List OmronByte2Status(int plcAddrSuffix, byte[] byteData, char plcAddrPrefix = 'W') + //{ + // var listAlarmStatus = new List(); + + // var addrCount = byteData.Length / 2; + // // byte[]每个地址保存的都是bool值,只取双数index位 + // for (int i = 0; i < addrCount; i++) + // { + // //将地址和状态添加到结果集 + // listAlarmStatus.Add(new AlarmStatus() + // { + // PLCAdress = $"{plcAddrPrefix}{plcAddrSuffix + i}", + // Status = byteData[i * 2 + 1] == 1 + + // }); + // //if (byteData[i * 2 + 1] == 1) + // // Console.WriteLine($"原始数据 PLC地址:{plcAddrPrefix}{plcAddrSuffix + i} 报警值:{byteData[i * 2 + 1]}"); + // } + + // return listAlarmStatus; + //} + + + + + /// + /// 字符串反转 + /// + /// 需要反转字符串.Reverse() + /// + public static string StrReverse(this string str) + { + return new string(str.Reverse().ToArray()); + } + + + /// + ///byte字节高低位互换 + /// + /// + /// + public static byte[] SWAPbyte(byte[] data) + { + byte[] data2 = new byte[data.Length]; + for (int i = 0; i < data.Length; i += 2) + { + data2[i] = data[i + 1]; + data2[i + 1] = data[i]; + } + return data2; + } + } +} diff --git a/JY.Inspection/Common/StrUtil.cs b/JY.Inspection/Common/StrUtil.cs new file mode 100644 index 0000000..b024faa --- /dev/null +++ b/JY.Inspection/Common/StrUtil.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Inspection.Common +{ + public class StrUtil + { + /// + /// 前端字节补0 + /// + /// + /// + /// + public static string GetStartString(string str, int count) + { + string strRes = str; + int strCount = str.Length; + + if (strCount != count) + { + strRes = str.PadLeft(count, '0'); + + } + return strRes; + } + + /// + /// 增加结尾字节长度 + /// + /// + /// + /// + public static string GetEndString(string str, int count) + { + string strRes = str; + int strCount = str.Length; + + if (strCount != count) + { + + strRes = str.PadRight(count, ' '); + + } + return strRes; + } + + /// + /// 生成字符串List集合 + /// + /// + /// + public static List GetListString(int Num, string str) + { + List list = new List(); + for (int i = 0; i < Num; i++) + { + list.Add(str); + } + return list; + } + } +} diff --git a/JY.Inspection/Common/TxtHelper.cs b/JY.Inspection/Common/TxtHelper.cs new file mode 100644 index 0000000..045bdae --- /dev/null +++ b/JY.Inspection/Common/TxtHelper.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace JY.Common.Helper +{ + public class TxtHelper + { + static ReaderWriterLockSlim sucessLogWriteLockSlim = new ReaderWriterLockSlim(); + + /// + /// 写入TEXT文本 + /// + /// 文件名 + /// 内容 + /// 保存结果 + public static bool WriteTxt(string fullName, string content) + { + FileStream fs = null; + StreamWriter sw = null; + + try + { + string directory = fullName.Substring(0, fullName.LastIndexOf('\\')); + if (!Directory.Exists(directory)) + { + Directory.CreateDirectory(directory); + } + + sucessLogWriteLockSlim.EnterWriteLock();//加锁防止抢占 + if (!File.Exists(fullName)) + { + fs = new FileStream(fullName, FileMode.Create, FileAccess.Write); + sw = new StreamWriter(fs, Encoding.UTF8); + } + else + { + fs = new FileStream(fullName, FileMode.Append, FileAccess.Write); + sw = new StreamWriter(fs, Encoding.UTF8); + } + + sw.WriteLine(content); + + sw.Close(); + fs.Close(); + + return true; + } + catch (Exception ex) + { + sw?.Close(); + fs?.Close(); + + } + finally + { + sucessLogWriteLockSlim.ExitWriteLock(); + } + + return false; + } + + } +} diff --git a/JY.Inspection/Common/UserHelper.cs b/JY.Inspection/Common/UserHelper.cs new file mode 100644 index 0000000..9576ff6 --- /dev/null +++ b/JY.Inspection/Common/UserHelper.cs @@ -0,0 +1,296 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization.Formatters.Binary; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Inspection.Common +{ + public class CurrentInfo + { + public static Autuority autuority = Autuority.Empty; + public static bool LoginOut = false; + } + + [Serializable] + public class User + { + /// + /// 序号 + /// + /// + [Display(Name = "序号")] + public int Index { get; set; } + /// + /// 用户名 + /// + /// + [Display(Name = "用户名")] + public string UserName { get; set; } + /// + /// 密码 + /// + /// + [Display(Name = "密码")] + public string PassWord { get; set; } + /// + /// 权限 + /// + /// + [Display(Name = "权限")] + public Autuority Level { get; set; } + } + + /// + /// 权限枚举 + /// + public enum Autuority + { + 管理员,//管理员 + 工程师,//工程师 + 操作员,//操作员 + Empty, + } + + public class UserHelper + { + private string filePath = string.Empty; + public UserHelper(string path) + { + filePath = path; + } + + /// + /// 序列化到文件 + /// + /// + /// + /// + public bool SerializedUser(string path, List listUser) + { + if (listUser == null) + { + return false; + } + BinaryFormatter format = new BinaryFormatter(); + using (FileStream fs = new FileStream(path, FileMode.Create, FileAccess.Write)) + { + format.Serialize(fs, listUser); + return true; + } + } + + /// + /// 反序列化到文件 + /// + /// + /// + public List DeSerializedUser(string path) + { + BinaryFormatter format = new BinaryFormatter(); + try + { + using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read)) + { + object o = format.Deserialize(fs); + return o as List; + } + } + catch (Exception) + { + return null; + } + + } + + /// + /// 创建超级用户 + /// + /// + /// + public void CheckSupperUser(string path, List listUser) + { + if (!File.Exists(path)) + { + User user = new User() + { + Index = 0, + UserName = "Admin", + PassWord = "Admin", + Level = Autuority.管理员 + }; + listUser.Add(user); + SerializedUser(path, listUser); + } + } + + /// + /// 检查重复性 + /// + /// + /// + /// + public bool CheckContainUser(List listUser, string userNmae) + { + var user = from item in listUser + where item.UserName == userNmae + select item; + if (user.Count() > 0) + { + return true; + } + return false; + } + + /// + /// 添加用户 + /// + /// + /// + /// + /// + public bool AddUser(string path, List listUser, User user) + { + try + { + if (user == null) + { + return false; + } + if (CheckContainUser(listUser, user.UserName)) + { + return false; + } + listUser.Add(user); + SerializedUser(path, listUser); + return true; + } + catch + { + return true; + } + } + + /// + /// 删除 + /// + /// + /// + /// + /// + public bool DeleteUser(string path, List listUser, string userNmae) + { + try + { + if (listUser == null) + { + return false; + } + int index = 0; + foreach (var item in listUser) + { + if (item.UserName == userNmae) + { + break; + } + index++; + } + if (index == 0) + { + return false; + } + listUser.RemoveAt(index); + SerializedUser(path, listUser); + return true; + } + catch + { + return false; + } + } + + /// + /// 修改用户 + /// + /// + /// + /// + /// + public bool EditUser(string path, List listUser, User user) + { + try + { + if (listUser == null) + { + return false; + } + foreach (var item in listUser) + { + if (item.UserName == user.UserName) + { + item.PassWord = user.PassWord; + item.Level = user.Level; + SerializedUser(path, listUser); + return true; + } + } + return false; + } + catch + { + return false; + } + } + + public User CheckUserLogin(string path, string userName, string passWord, ref string strErr) + { + if (!File.Exists(path)) + { + return null; + } + + List list = DeSerializedUser(path); + if (list == null) + { + return null; + } + User user = new User(); + if (string.IsNullOrEmpty(userName)) + { + var res1 = from item in list + where item.PassWord == passWord + select item; + if (res1.Count() == 0) + { + return null; + } + foreach (var item in res1) + { + user.UserName = item.UserName; + user.PassWord = item.PassWord; + user.Level = item.Level; + } + } + else + { + var res = from item in list + where item.PassWord == passWord && item.UserName == userName + select item; + if (res.Count() == 0) + { + return null; + } + foreach (var item in res) + { + user.UserName = item.UserName; + user.PassWord = item.PassWord; + user.Level = item.Level; + } + } + return user; + } + } +} diff --git a/JY.Inspection/Config/ComConfig.ini b/JY.Inspection/Config/ComConfig.ini new file mode 100644 index 0000000..314c468 --- /dev/null +++ b/JY.Inspection/Config/ComConfig.ini @@ -0,0 +1,66 @@ +[SystemConfig] +ComCount=2 + +[1#COMMUNICATION_SETTING] +Tgr_Count=1 +Auto_Connect=True +Connect_Typt=2 +Endsymbol=1 +HeartBeat=False +HeartText=3000 +HeartTime=1000 +TCP_IP=127.0.0.1 +TCP_Port=7321 +COM_Port=COM3 +COM_BaudRate=38400 +COM_Parity=None +COM_DataBit=8 +COM_StopBit=1 + +[2#COMMUNICATION_SETTING] +Tgr_Count=1 +Auto_Connect=True +Connect_Typt=2 +Endsymbol=0 +HeartBeat=False +HeartText=3000 +HeartTime=1000 +TCP_IP=127.0.0.1 +TCP_Port=8321 +COM_Port=COM1 +COM_BaudRate=9600 +COM_Parity=None +COM_DataBit=8 +COM_StopBit=1 + +[3#COMMUNICATION_SETTING] +Tgr_Count=3 +Auto_Connect=True +Connect_Typt=3 +Endsymbol=0 +HeartBeat=False +HeartText=3000 +HeartTime=1000 +TCP_IP=127.0.0.3 +TCP_Port=60000 +COM_Port=COM1 +COM_BaudRate=9600 +COM_Parity=None +COM_DataBit=8 +COM_StopBit=1 + +[4#COMMUNICATION_SETTING] +Tgr_Count=4 +Auto_Connect=True +Connect_Typt=3 +Endsymbol=0 +HeartBeat=False +HeartText=3000 +HeartTime=1000 +TCP_IP=127.0.0.4 +TCP_Port=60000 +COM_Port=COM1 +COM_BaudRate=9600 +COM_Parity=None +COM_DataBit=8 +COM_StopBit=1 diff --git a/JY.Inspection/Config/Configure.ini b/JY.Inspection/Config/Configure.ini new file mode 100644 index 0000000..fd73962 --- /dev/null +++ b/JY.Inspection/Config/Configure.ini @@ -0,0 +1,58 @@ +[SYSTEM_CONFIGURE] +Company_Name=Íâ¹۷ֵµϵͳ +Project_Name=Íâ¹۷ֵµϵͳ +Project_FlowingText=Íâ¹۷ֵµϵͳ +IsMesUP=1 +IsSK=0 +Worker_code=123 +portName=COM2 +baudRate=9600 +ClassShift=2 +No=0 +TCP_IP=192.168.2.253 +TCP_Port=1030 + +[MESÅäÖÃ] +siteCode=18J +lineCode=18J-BZ-181 +equipCode=EVEDL18BZWGJ02 +materialCode=81035332 +productType=test +GradingMesUrl=http://10.22.167.141/core/api/public/eve/pm/eqm/new/grading +ResultProcessMesUrl=http://10.22.167.2/core/api/public/product/process/param/new/result +StationArrivalUrl=http://10.22.167.2/core/api/public/formation/section/arrival/bz +StationExitUrl=http://10.22.167.2/core/api/public/eve/pm/formation-section/bz +NGMessage=²»·ÖÀà,ÕýÃæ(2D/3D),·´Ãæ(2D/3D),×ó²àÃæ(2D/3D),ÓҲàÃæ(2D/3D),¶¥Ãæ(2D/3D),µ×Ãæ(2D/3D),µ×WE2,µ×WE2,µ×WE3,µ×WE4,ÖÐME1,ÖÐME2,ÖÐME3,ÖÐME1,¼«Öù(POS/NEG),·À±¬·§(PRO),ɨÂëNG,·ֵµNG,ÆäËû +CCDResultMessage=²»·ÖÀà,NG,OK +Grading1=K77 +Grading2=K77 +Grading3=K77 +Grading4=K77 +Grading5=K77 +Grading6=K77 +TensionStrap1=5 +TensionStrap2=6 +TensionStrap3=7 +TensionStrapCCDReslut1=1 +TensionStrapCCDReslut2=1 +TensionStrapCCDReslut3=1 +TensionStrapCCDReslut4=1 +StartNGFL=0 +Grading=1 +MesRequestTime=2 +LoginTime=10 + +[ͳ¼ƼÆÊý] +ProdAllQty=0 +ProdOKQty=0 +ProdSanNgQty=0 +ProdVolNgQty=0 +ProdImpNgty=0 +ProdBvolNgQty=0 +ProdKvalueNgty=0 +ProdLenthNgty=0 +ProdWideNgty=0 +ProdLMDNgty=0 +ProdLCDNgty=0 +ProdThinessNgty=0 +ProdMESNgty=0 diff --git a/JY.Inspection/Config/PlcConfig.ini b/JY.Inspection/Config/PlcConfig.ini new file mode 100644 index 0000000..9e3b147 --- /dev/null +++ b/JY.Inspection/Config/PlcConfig.ini @@ -0,0 +1,59 @@ +[SystemConfig] +ComCount=1 + +[1#PLCParameter] +Index=1 +IP=192.168.2.50 +Port=44818 +JobCount=3 +HeartBeat=True +HeartAddr=W100 +ScanTime=50 +Solt=0 + +1#ThreadName=ÉÏÁÏ +1#RecvAddr=W2000 +1#RecvType=Short +1#WriteAddr=W2020 +1#WriteType=Short +1#TriggerCmd=1 +1#IsRead=True +1#ReadAddr=W2010 +1#ReadType=Byte +1#ReadLength=80 + +2#ThreadName=ÏÂÁÏ +2#RecvAddr=W3000 +2#RecvType=Short +2#WriteAddr=W3020 +2#WriteType=Short +2#TriggerCmd=1 +2#IsRead=True +2#ReadAddr=W3010 +2#ReadType=Byte +2#ReadLength=118 + +3#ThreadName=±¨¾¯ +3#RecvAddr=W6000 +3#RecvType=Short +3#WriteAddr=W2006 +3#WriteType=Short +3#TriggerCmd=1 +3#IsRead=True +3#ReadAddr=W6100 +3#ReadType=Byte +3#ReadLength=1 + +4#ThreadName=Ò쳣²¥±¨ +4#RecvAddr=W7000 +4#RecvType=Short +4#WriteAddr=W7100 +4#WriteType=Short +4#TriggerCmd=1 +4#IsRead=True +4#ReadAddr=W7010 +4#ReadType=Byte +4#ReadLength=1 + + + diff --git a/JY.Inspection/Config/采集项参照表.xlsx b/JY.Inspection/Config/采集项参照表.xlsx new file mode 100644 index 0000000..3c0a6c0 Binary files /dev/null and b/JY.Inspection/Config/采集项参照表.xlsx differ diff --git a/JY.Inspection/EmailTemplate/Model.xls b/JY.Inspection/EmailTemplate/Model.xls new file mode 100644 index 0000000..28bbb16 Binary files /dev/null and b/JY.Inspection/EmailTemplate/Model.xls differ diff --git a/JY.Inspection/Entity/AlarmStatus.cs b/JY.Inspection/Entity/AlarmStatus.cs new file mode 100644 index 0000000..274b3e3 --- /dev/null +++ b/JY.Inspection/Entity/AlarmStatus.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Inspection.Entity +{ + public class AlarmStatus + { + /// + /// 报警地址 + /// + public string PLCAdress { get; set; } + + /// + /// 报警状态 + /// + public bool Status { get; set; } + } +} diff --git a/JY.Inspection/Frm/FormMesDataSet.cs b/JY.Inspection/Frm/FormMesDataSet.cs new file mode 100644 index 0000000..6675e8d --- /dev/null +++ b/JY.Inspection/Frm/FormMesDataSet.cs @@ -0,0 +1,107 @@ +using JY.Inspection.Common; +using JY.Inspection.ViewModel; +using JY.Utility; +using JYControl; +using MetroFramework.Forms; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + + +namespace JY.Inspection.Frm +{ + public partial class FormMesDataSet : MetroForm + { + private FrmMesSettingVM _viewModel = null; + public FormMesDataSet() + { + InitializeComponent(); + + _viewModel = new FrmMesSettingVM(); + SetDataBindings(); + } + + #region 数据绑定 + private void SetDataBindings() + { + bindingSource1.DataSource = _viewModel; + + tb_productType.DataBindings.Add(new Binding("Text", bindingSource1, "ProductType", true, DataSourceUpdateMode.OnPropertyChanged)); + tb_StationArrival.DataBindings.Add(new Binding("Text", bindingSource1, "StationArrivalUrl", true, DataSourceUpdateMode.OnPropertyChanged)); + tb_stationExit.DataBindings.Add(new Binding("Text", bindingSource1, "StationExitUrl", true, DataSourceUpdateMode.OnPropertyChanged)); + } + #endregion + + /// + /// 加载MES配置文件 + /// + /// + /// + private void FormMesDataSet_Load(object sender, EventArgs e) + { + + txtsiteCode.Text = IniFileHelper.ReadIniData("MES配置", "siteCode"); + txtlineCode.Text = IniFileHelper.ReadIniData("MES配置", "lineCode"); + txtequipCode.Text = IniFileHelper.ReadIniData("MES配置", "equipCode"); + txtmaterialCode.Text = IniFileHelper.ReadIniData("MES配置", "materialCode"); + _viewModel.ProductType = IniFileHelper.ReadIniData("MES配置", "productType"); + + txtGradingMesUrl.Text = IniFileHelper.ReadIniData("MES配置", "GradingMesUrl"); + txtResultProcessMesUrl.Text = IniFileHelper.ReadIniData("MES配置", "ResultProcessMesUrl"); + _viewModel.StationArrivalUrl = IniFileHelper.ReadIniData("MES配置", "StationArrivalUrl"); + _viewModel.StationExitUrl = IniFileHelper.ReadIniData("MES配置", "StationExitUrl"); + + LoginTime.Text = IniFileHelper.ReadIniData("MES配置", "LoginTime"); + txtMesRequestTime.Text = IniFileHelper.ReadIniData("MES配置", "MesRequestTime"); + + ckStartZNDB.Checked = IniFileHelper.ReadIniData("MES配置", "StartZNDB") == "1" ? true : false; + chkIsMesUP.Checked = IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "IsMesUP") == "1" ? true : false; + } + + /// + /// 保存MES配置文件信息 + /// + /// + /// + private void btnSave_Click(object sender, EventArgs e) + { + IniFileHelper.WriteIniData("MES配置", "siteCode", txtsiteCode.Text.Trim()); + IniFileHelper.WriteIniData("MES配置", "lineCode", txtlineCode.Text.Trim()); + IniFileHelper.WriteIniData("MES配置", "equipCode", txtequipCode.Text.Trim()); + IniFileHelper.WriteIniData("MES配置", "materialCode", txtmaterialCode.Text.Trim()); + IniFileHelper.WriteIniData("MES配置", "productType", _viewModel.ProductType.Trim()); + + IniFileHelper.WriteIniData("MES配置", "GradingMesUrl", txtGradingMesUrl.Text.Trim()); + IniFileHelper.WriteIniData("MES配置", "ResultProcessMesUrl", txtResultProcessMesUrl.Text.Trim()); + IniFileHelper.WriteIniData("MES配置", "StationArrivalUrl", _viewModel.StationArrivalUrl.Trim()); + IniFileHelper.WriteIniData("MES配置", "StationExitUrl", _viewModel.StationExitUrl.Trim()); + + IniFileHelper.WriteIniData("MES配置", "LoginTime", LoginTime.Text.Trim()); + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置权限超时时间[{LoginTime.Text.Trim()}]", LogAddtype.local, Logtype.Warning); + IniFileHelper.WriteIniData("MES配置", "MesRequestTime", txtMesRequestTime.Text.Trim()); + + IniFileHelper.WriteIniData("MES配置", "StartZNDB", ckStartZNDB.Checked ? "1" : "0"); + //是否启用MES + IniFileHelper.WriteIniData("SYSTEM_CONFIGURE", "IsMesUP", chkIsMesUP.Checked ? "1" : "2"); + MessageBox.Show("参数保存成功!", "系统提示"); + this.DialogResult = DialogResult.OK; + + } + + private void btnExit_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void linkLabel_editCollectItemCfg_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + System.Diagnostics.Process.Start(Global.CollectItemCfgPath); + } + } +} diff --git a/JY.Inspection/Frm/FormMesDataSet.designer.cs b/JY.Inspection/Frm/FormMesDataSet.designer.cs new file mode 100644 index 0000000..0fc93d0 --- /dev/null +++ b/JY.Inspection/Frm/FormMesDataSet.designer.cs @@ -0,0 +1,713 @@ + +namespace JY.Inspection.Frm +{ + partial class FormMesDataSet + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMesDataSet)); + this.btnExit = new MetroFramework.Controls.MetroButton(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.txtlineCode = new MetroFramework.Controls.MetroTextBox(); + this.btnSave = new MetroFramework.Controls.MetroButton(); + this.metroLabel3 = new MetroFramework.Controls.MetroLabel(); + this.txtequipCode = new MetroFramework.Controls.MetroTextBox(); + this.txtsiteCode = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel2 = new MetroFramework.Controls.MetroLabel(); + this.ckStartZNDB = new System.Windows.Forms.CheckBox(); + this.txtmaterialCode = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel4 = new MetroFramework.Controls.MetroLabel(); + this.txtGradingMesUrl = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel5 = new MetroFramework.Controls.MetroLabel(); + this.txtResultProcessMesUrl = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel6 = new MetroFramework.Controls.MetroLabel(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.linkLabel_editCollectItemCfg = new System.Windows.Forms.LinkLabel(); + this.metroLabel21 = new MetroFramework.Controls.MetroLabel(); + this.LoginTime = new System.Windows.Forms.NumericUpDown(); + this.metroLabel22 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel18 = new MetroFramework.Controls.MetroLabel(); + this.txtMesRequestTime = new System.Windows.Forms.NumericUpDown(); + this.metroLabel20 = new MetroFramework.Controls.MetroLabel(); + this.chkIsMesUP = new System.Windows.Forms.CheckBox(); + this.metroLabel7 = new MetroFramework.Controls.MetroLabel(); + this.tb_productType = new MetroFramework.Controls.MetroTextBox(); + this.metroPanel_top = new MetroFramework.Controls.MetroPanel(); + this.metroPanel_mid = new MetroFramework.Controls.MetroPanel(); + this.metroPanel_bottom = new MetroFramework.Controls.MetroPanel(); + this.metroLabel8 = new MetroFramework.Controls.MetroLabel(); + this.tb_StationArrival = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel9 = new MetroFramework.Controls.MetroLabel(); + this.tb_stationExit = new MetroFramework.Controls.MetroTextBox(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.LoginTime)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtMesRequestTime)).BeginInit(); + this.metroPanel_top.SuspendLayout(); + this.metroPanel_mid.SuspendLayout(); + this.metroPanel_bottom.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + this.SuspendLayout(); + // + // btnExit + // + this.btnExit.Location = new System.Drawing.Point(484, 40); + this.btnExit.Name = "btnExit"; + this.btnExit.Size = new System.Drawing.Size(103, 37); + this.btnExit.TabIndex = 13; + this.btnExit.Text = "退出"; + this.btnExit.UseSelectable = true; + this.btnExit.Click += new System.EventHandler(this.btnExit_Click); + // + // metroLabel1 + // + this.metroLabel1.AutoSize = true; + this.metroLabel1.Location = new System.Drawing.Point(33, 53); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Size = new System.Drawing.Size(79, 19); + this.metroLabel1.TabIndex = 12; + this.metroLabel1.Text = "产线名称:"; + // + // txtlineCode + // + // + // + // + this.txtlineCode.CustomButton.Image = null; + this.txtlineCode.CustomButton.Location = new System.Drawing.Point(123, 1); + this.txtlineCode.CustomButton.Name = ""; + this.txtlineCode.CustomButton.Size = new System.Drawing.Size(16, 17); + this.txtlineCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtlineCode.CustomButton.TabIndex = 1; + this.txtlineCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtlineCode.CustomButton.UseSelectable = true; + this.txtlineCode.CustomButton.Visible = false; + this.txtlineCode.Lines = new string[0]; + this.txtlineCode.Location = new System.Drawing.Point(118, 53); + this.txtlineCode.MaxLength = 32767; + this.txtlineCode.Name = "txtlineCode"; + this.txtlineCode.PasswordChar = '\0'; + this.txtlineCode.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtlineCode.SelectedText = ""; + this.txtlineCode.SelectionLength = 0; + this.txtlineCode.SelectionStart = 0; + this.txtlineCode.ShortcutsEnabled = true; + this.txtlineCode.Size = new System.Drawing.Size(186, 23); + this.txtlineCode.TabIndex = 11; + this.txtlineCode.UseSelectable = true; + this.txtlineCode.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtlineCode.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // btnSave + // + this.btnSave.Location = new System.Drawing.Point(68, 40); + this.btnSave.Name = "btnSave"; + this.btnSave.Size = new System.Drawing.Size(112, 37); + this.btnSave.TabIndex = 10; + this.btnSave.Text = "保存"; + this.btnSave.UseSelectable = true; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // + // metroLabel3 + // + this.metroLabel3.AutoSize = true; + this.metroLabel3.Location = new System.Drawing.Point(33, 92); + this.metroLabel3.Name = "metroLabel3"; + this.metroLabel3.Size = new System.Drawing.Size(79, 19); + this.metroLabel3.TabIndex = 25; + this.metroLabel3.Text = "设备编码:"; + // + // txtequipCode + // + // + // + // + this.txtequipCode.CustomButton.Image = null; + this.txtequipCode.CustomButton.Location = new System.Drawing.Point(123, 1); + this.txtequipCode.CustomButton.Name = ""; + this.txtequipCode.CustomButton.Size = new System.Drawing.Size(16, 17); + this.txtequipCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtequipCode.CustomButton.TabIndex = 1; + this.txtequipCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtequipCode.CustomButton.UseSelectable = true; + this.txtequipCode.CustomButton.Visible = false; + this.txtequipCode.Lines = new string[0]; + this.txtequipCode.Location = new System.Drawing.Point(118, 88); + this.txtequipCode.MaxLength = 32767; + this.txtequipCode.Name = "txtequipCode"; + this.txtequipCode.PasswordChar = '\0'; + this.txtequipCode.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtequipCode.SelectedText = ""; + this.txtequipCode.SelectionLength = 0; + this.txtequipCode.SelectionStart = 0; + this.txtequipCode.ShortcutsEnabled = true; + this.txtequipCode.Size = new System.Drawing.Size(186, 23); + this.txtequipCode.TabIndex = 26; + this.txtequipCode.UseSelectable = true; + this.txtequipCode.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtequipCode.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // txtsiteCode + // + // + // + // + this.txtsiteCode.CustomButton.Image = null; + this.txtsiteCode.CustomButton.Location = new System.Drawing.Point(123, 1); + this.txtsiteCode.CustomButton.Name = ""; + this.txtsiteCode.CustomButton.Size = new System.Drawing.Size(16, 17); + this.txtsiteCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtsiteCode.CustomButton.TabIndex = 1; + this.txtsiteCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtsiteCode.CustomButton.UseSelectable = true; + this.txtsiteCode.CustomButton.Visible = false; + this.txtsiteCode.Lines = new string[0]; + this.txtsiteCode.Location = new System.Drawing.Point(118, 15); + this.txtsiteCode.MaxLength = 32767; + this.txtsiteCode.Name = "txtsiteCode"; + this.txtsiteCode.PasswordChar = '\0'; + this.txtsiteCode.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtsiteCode.SelectedText = ""; + this.txtsiteCode.SelectionLength = 0; + this.txtsiteCode.SelectionStart = 0; + this.txtsiteCode.ShortcutsEnabled = true; + this.txtsiteCode.Size = new System.Drawing.Size(186, 23); + this.txtsiteCode.TabIndex = 28; + this.txtsiteCode.UseSelectable = true; + this.txtsiteCode.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtsiteCode.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel2 + // + this.metroLabel2.AutoSize = true; + this.metroLabel2.Location = new System.Drawing.Point(33, 15); + this.metroLabel2.Name = "metroLabel2"; + this.metroLabel2.Size = new System.Drawing.Size(79, 19); + this.metroLabel2.TabIndex = 27; + this.metroLabel2.Text = "工厂代码:"; + // + // ckStartZNDB + // + this.ckStartZNDB.AutoSize = true; + this.ckStartZNDB.Location = new System.Drawing.Point(68, 6); + this.ckStartZNDB.Name = "ckStartZNDB"; + this.ckStartZNDB.Size = new System.Drawing.Size(96, 16); + this.ckStartZNDB.TabIndex = 29; + this.ckStartZNDB.Text = "开启智能电表"; + this.ckStartZNDB.UseVisualStyleBackColor = true; + // + // txtmaterialCode + // + // + // + // + this.txtmaterialCode.CustomButton.Image = null; + this.txtmaterialCode.CustomButton.Location = new System.Drawing.Point(123, 1); + this.txtmaterialCode.CustomButton.Name = ""; + this.txtmaterialCode.CustomButton.Size = new System.Drawing.Size(16, 17); + this.txtmaterialCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtmaterialCode.CustomButton.TabIndex = 1; + this.txtmaterialCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtmaterialCode.CustomButton.UseSelectable = true; + this.txtmaterialCode.CustomButton.Visible = false; + this.txtmaterialCode.Lines = new string[0]; + this.txtmaterialCode.Location = new System.Drawing.Point(118, 129); + this.txtmaterialCode.MaxLength = 32767; + this.txtmaterialCode.Name = "txtmaterialCode"; + this.txtmaterialCode.PasswordChar = '\0'; + this.txtmaterialCode.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtmaterialCode.SelectedText = ""; + this.txtmaterialCode.SelectionLength = 0; + this.txtmaterialCode.SelectionStart = 0; + this.txtmaterialCode.ShortcutsEnabled = true; + this.txtmaterialCode.Size = new System.Drawing.Size(186, 23); + this.txtmaterialCode.TabIndex = 31; + this.txtmaterialCode.UseSelectable = true; + this.txtmaterialCode.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtmaterialCode.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel4 + // + this.metroLabel4.AutoSize = true; + this.metroLabel4.Location = new System.Drawing.Point(33, 127); + this.metroLabel4.Name = "metroLabel4"; + this.metroLabel4.Size = new System.Drawing.Size(79, 19); + this.metroLabel4.TabIndex = 30; + this.metroLabel4.Text = "物料编码:"; + // + // txtGradingMesUrl + // + // + // + // + this.txtGradingMesUrl.CustomButton.Image = null; + this.txtGradingMesUrl.CustomButton.Location = new System.Drawing.Point(376, 1); + this.txtGradingMesUrl.CustomButton.Name = ""; + this.txtGradingMesUrl.CustomButton.Size = new System.Drawing.Size(16, 17); + this.txtGradingMesUrl.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtGradingMesUrl.CustomButton.TabIndex = 1; + this.txtGradingMesUrl.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtGradingMesUrl.CustomButton.UseSelectable = true; + this.txtGradingMesUrl.CustomButton.Visible = false; + this.txtGradingMesUrl.Lines = new string[0]; + this.txtGradingMesUrl.Location = new System.Drawing.Point(176, 177); + this.txtGradingMesUrl.MaxLength = 32767; + this.txtGradingMesUrl.Name = "txtGradingMesUrl"; + this.txtGradingMesUrl.PasswordChar = '\0'; + this.txtGradingMesUrl.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtGradingMesUrl.SelectedText = ""; + this.txtGradingMesUrl.SelectionLength = 0; + this.txtGradingMesUrl.SelectionStart = 0; + this.txtGradingMesUrl.ShortcutsEnabled = true; + this.txtGradingMesUrl.Size = new System.Drawing.Size(524, 23); + this.txtGradingMesUrl.TabIndex = 33; + this.txtGradingMesUrl.UseSelectable = true; + this.txtGradingMesUrl.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtGradingMesUrl.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel5 + // + this.metroLabel5.AutoSize = true; + this.metroLabel5.Location = new System.Drawing.Point(29, 177); + this.metroLabel5.Name = "metroLabel5"; + this.metroLabel5.Size = new System.Drawing.Size(135, 19); + this.metroLabel5.TabIndex = 32; + this.metroLabel5.Text = "分档查询接口地址:"; + // + // txtResultProcessMesUrl + // + // + // + // + this.txtResultProcessMesUrl.CustomButton.Image = null; + this.txtResultProcessMesUrl.CustomButton.Location = new System.Drawing.Point(376, 1); + this.txtResultProcessMesUrl.CustomButton.Name = ""; + this.txtResultProcessMesUrl.CustomButton.Size = new System.Drawing.Size(16, 17); + this.txtResultProcessMesUrl.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtResultProcessMesUrl.CustomButton.TabIndex = 1; + this.txtResultProcessMesUrl.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtResultProcessMesUrl.CustomButton.UseSelectable = true; + this.txtResultProcessMesUrl.CustomButton.Visible = false; + this.txtResultProcessMesUrl.Lines = new string[0]; + this.txtResultProcessMesUrl.Location = new System.Drawing.Point(176, 214); + this.txtResultProcessMesUrl.MaxLength = 32767; + this.txtResultProcessMesUrl.Name = "txtResultProcessMesUrl"; + this.txtResultProcessMesUrl.PasswordChar = '\0'; + this.txtResultProcessMesUrl.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtResultProcessMesUrl.SelectedText = ""; + this.txtResultProcessMesUrl.SelectionLength = 0; + this.txtResultProcessMesUrl.SelectionStart = 0; + this.txtResultProcessMesUrl.ShortcutsEnabled = true; + this.txtResultProcessMesUrl.Size = new System.Drawing.Size(524, 23); + this.txtResultProcessMesUrl.TabIndex = 35; + this.txtResultProcessMesUrl.UseSelectable = true; + this.txtResultProcessMesUrl.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtResultProcessMesUrl.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel6 + // + this.metroLabel6.AutoSize = true; + this.metroLabel6.Location = new System.Drawing.Point(3, 214); + this.metroLabel6.Name = "metroLabel6"; + this.metroLabel6.Size = new System.Drawing.Size(163, 19); + this.metroLabel6.TabIndex = 34; + this.metroLabel6.Text = "结果加工参数接口地址:"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.metroPanel_top); + this.groupBox1.Controls.Add(this.metroPanel_mid); + this.groupBox1.Controls.Add(this.metroPanel_bottom); + this.groupBox1.Location = new System.Drawing.Point(23, 63); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(719, 492); + this.groupBox1.TabIndex = 36; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "MES配置"; + // + // linkLabel_editCollectItemCfg + // + this.linkLabel_editCollectItemCfg.AutoSize = true; + this.linkLabel_editCollectItemCfg.Location = new System.Drawing.Point(482, 7); + this.linkLabel_editCollectItemCfg.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.linkLabel_editCollectItemCfg.Name = "linkLabel_editCollectItemCfg"; + this.linkLabel_editCollectItemCfg.Size = new System.Drawing.Size(101, 12); + this.linkLabel_editCollectItemCfg.TabIndex = 182; + this.linkLabel_editCollectItemCfg.TabStop = true; + this.linkLabel_editCollectItemCfg.Text = "配置采集项参照表"; + this.linkLabel_editCollectItemCfg.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel_editCollectItemCfg_LinkClicked); + // + // metroLabel21 + // + this.metroLabel21.AutoSize = true; + this.metroLabel21.Location = new System.Drawing.Point(573, 127); + this.metroLabel21.Name = "metroLabel21"; + this.metroLabel21.Size = new System.Drawing.Size(31, 19); + this.metroLabel21.TabIndex = 180; + this.metroLabel21.Text = "min"; + this.metroLabel21.Visible = false; + // + // LoginTime + // + this.LoginTime.Location = new System.Drawing.Point(491, 127); + this.LoginTime.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.LoginTime.Name = "LoginTime"; + this.LoginTime.Size = new System.Drawing.Size(76, 21); + this.LoginTime.TabIndex = 179; + this.LoginTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.LoginTime.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.LoginTime.Visible = false; + // + // metroLabel22 + // + this.metroLabel22.AutoSize = true; + this.metroLabel22.Location = new System.Drawing.Point(378, 127); + this.metroLabel22.Name = "metroLabel22"; + this.metroLabel22.Size = new System.Drawing.Size(107, 19); + this.metroLabel22.TabIndex = 176; + this.metroLabel22.Text = "权限登录时长:"; + this.metroLabel22.Visible = false; + // + // metroLabel18 + // + this.metroLabel18.AutoSize = true; + this.metroLabel18.Location = new System.Drawing.Point(573, 53); + this.metroLabel18.Name = "metroLabel18"; + this.metroLabel18.Size = new System.Drawing.Size(14, 19); + this.metroLabel18.TabIndex = 97; + this.metroLabel18.Text = "s"; + // + // txtMesRequestTime + // + this.txtMesRequestTime.DecimalPlaces = 1; + this.txtMesRequestTime.Increment = new decimal(new int[] { + 5, + 0, + 0, + 65536}); + this.txtMesRequestTime.Location = new System.Drawing.Point(491, 53); + this.txtMesRequestTime.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.txtMesRequestTime.Minimum = new decimal(new int[] { + 5, + 0, + 0, + 65536}); + this.txtMesRequestTime.Name = "txtMesRequestTime"; + this.txtMesRequestTime.Size = new System.Drawing.Size(76, 21); + this.txtMesRequestTime.TabIndex = 96; + this.txtMesRequestTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtMesRequestTime.Value = new decimal(new int[] { + 5, + 0, + 0, + 65536}); + // + // metroLabel20 + // + this.metroLabel20.AutoSize = true; + this.metroLabel20.Location = new System.Drawing.Point(352, 53); + this.metroLabel20.Name = "metroLabel20"; + this.metroLabel20.Size = new System.Drawing.Size(133, 19); + this.metroLabel20.TabIndex = 49; + this.metroLabel20.Text = "请求MES超时时长:"; + // + // chkIsMesUP + // + this.chkIsMesUP.AutoSize = true; + this.chkIsMesUP.Enabled = false; + this.chkIsMesUP.Location = new System.Drawing.Point(279, 6); + this.chkIsMesUP.Name = "chkIsMesUP"; + this.chkIsMesUP.Size = new System.Drawing.Size(90, 16); + this.chkIsMesUP.TabIndex = 36; + this.chkIsMesUP.Text = "开启MES模式"; + this.chkIsMesUP.UseVisualStyleBackColor = true; + // + // metroLabel7 + // + this.metroLabel7.AutoSize = true; + this.metroLabel7.Location = new System.Drawing.Point(406, 15); + this.metroLabel7.Name = "metroLabel7"; + this.metroLabel7.Size = new System.Drawing.Size(79, 19); + this.metroLabel7.TabIndex = 183; + this.metroLabel7.Text = "产品类型:"; + // + // tb_productType + // + // + // + // + this.tb_productType.CustomButton.Image = null; + this.tb_productType.CustomButton.Location = new System.Drawing.Point(164, 1); + this.tb_productType.CustomButton.Name = ""; + this.tb_productType.CustomButton.Size = new System.Drawing.Size(21, 21); + this.tb_productType.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.tb_productType.CustomButton.TabIndex = 1; + this.tb_productType.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.tb_productType.CustomButton.UseSelectable = true; + this.tb_productType.CustomButton.Visible = false; + this.tb_productType.Lines = new string[0]; + this.tb_productType.Location = new System.Drawing.Point(491, 15); + this.tb_productType.MaxLength = 32767; + this.tb_productType.Name = "tb_productType"; + this.tb_productType.PasswordChar = '\0'; + this.tb_productType.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.tb_productType.SelectedText = ""; + this.tb_productType.SelectionLength = 0; + this.tb_productType.SelectionStart = 0; + this.tb_productType.ShortcutsEnabled = true; + this.tb_productType.Size = new System.Drawing.Size(186, 23); + this.tb_productType.TabIndex = 184; + this.tb_productType.UseSelectable = true; + this.tb_productType.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.tb_productType.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroPanel_top + // + this.metroPanel_top.Controls.Add(this.tb_productType); + this.metroPanel_top.Controls.Add(this.metroLabel18); + this.metroPanel_top.Controls.Add(this.metroLabel21); + this.metroPanel_top.Controls.Add(this.metroLabel7); + this.metroPanel_top.Controls.Add(this.LoginTime); + this.metroPanel_top.Controls.Add(this.txtMesRequestTime); + this.metroPanel_top.Controls.Add(this.metroLabel2); + this.metroPanel_top.Controls.Add(this.metroLabel22); + this.metroPanel_top.Controls.Add(this.metroLabel1); + this.metroPanel_top.Controls.Add(this.metroLabel3); + this.metroPanel_top.Controls.Add(this.metroLabel4); + this.metroPanel_top.Controls.Add(this.metroLabel20); + this.metroPanel_top.Controls.Add(this.txtsiteCode); + this.metroPanel_top.Controls.Add(this.txtlineCode); + this.metroPanel_top.Controls.Add(this.txtequipCode); + this.metroPanel_top.Controls.Add(this.txtmaterialCode); + this.metroPanel_top.Dock = System.Windows.Forms.DockStyle.Top; + this.metroPanel_top.HorizontalScrollbarBarColor = true; + this.metroPanel_top.HorizontalScrollbarHighlightOnWheel = false; + this.metroPanel_top.HorizontalScrollbarSize = 10; + this.metroPanel_top.Location = new System.Drawing.Point(3, 17); + this.metroPanel_top.Name = "metroPanel_top"; + this.metroPanel_top.Size = new System.Drawing.Size(713, 163); + this.metroPanel_top.TabIndex = 185; + this.metroPanel_top.VerticalScrollbarBarColor = true; + this.metroPanel_top.VerticalScrollbarHighlightOnWheel = false; + this.metroPanel_top.VerticalScrollbarSize = 10; + // + // metroPanel_mid + // + this.metroPanel_mid.Controls.Add(this.tb_stationExit); + this.metroPanel_mid.Controls.Add(this.metroLabel9); + this.metroPanel_mid.Controls.Add(this.tb_StationArrival); + this.metroPanel_mid.Controls.Add(this.metroLabel8); + this.metroPanel_mid.Controls.Add(this.txtResultProcessMesUrl); + this.metroPanel_mid.Controls.Add(this.txtGradingMesUrl); + this.metroPanel_mid.Controls.Add(this.metroLabel6); + this.metroPanel_mid.Controls.Add(this.metroLabel5); + this.metroPanel_mid.Dock = System.Windows.Forms.DockStyle.Fill; + this.metroPanel_mid.HorizontalScrollbarBarColor = true; + this.metroPanel_mid.HorizontalScrollbarHighlightOnWheel = false; + this.metroPanel_mid.HorizontalScrollbarSize = 10; + this.metroPanel_mid.Location = new System.Drawing.Point(3, 17); + this.metroPanel_mid.Name = "metroPanel_mid"; + this.metroPanel_mid.Size = new System.Drawing.Size(713, 379); + this.metroPanel_mid.TabIndex = 186; + this.metroPanel_mid.VerticalScrollbarBarColor = true; + this.metroPanel_mid.VerticalScrollbarHighlightOnWheel = false; + this.metroPanel_mid.VerticalScrollbarSize = 10; + // + // metroPanel_bottom + // + this.metroPanel_bottom.Controls.Add(this.linkLabel_editCollectItemCfg); + this.metroPanel_bottom.Controls.Add(this.ckStartZNDB); + this.metroPanel_bottom.Controls.Add(this.chkIsMesUP); + this.metroPanel_bottom.Controls.Add(this.btnSave); + this.metroPanel_bottom.Controls.Add(this.btnExit); + this.metroPanel_bottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.metroPanel_bottom.HorizontalScrollbarBarColor = true; + this.metroPanel_bottom.HorizontalScrollbarHighlightOnWheel = false; + this.metroPanel_bottom.HorizontalScrollbarSize = 10; + this.metroPanel_bottom.Location = new System.Drawing.Point(3, 396); + this.metroPanel_bottom.Name = "metroPanel_bottom"; + this.metroPanel_bottom.Size = new System.Drawing.Size(713, 93); + this.metroPanel_bottom.TabIndex = 187; + this.metroPanel_bottom.VerticalScrollbarBarColor = true; + this.metroPanel_bottom.VerticalScrollbarHighlightOnWheel = false; + this.metroPanel_bottom.VerticalScrollbarSize = 10; + // + // metroLabel8 + // + this.metroLabel8.AutoSize = true; + this.metroLabel8.Location = new System.Drawing.Point(29, 250); + this.metroLabel8.Name = "metroLabel8"; + this.metroLabel8.Size = new System.Drawing.Size(135, 19); + this.metroLabel8.TabIndex = 36; + this.metroLabel8.Text = "产品进站接口地址:"; + // + // tb_StationArrival + // + // + // + // + this.tb_StationArrival.CustomButton.Image = null; + this.tb_StationArrival.CustomButton.Location = new System.Drawing.Point(502, 1); + this.tb_StationArrival.CustomButton.Name = ""; + this.tb_StationArrival.CustomButton.Size = new System.Drawing.Size(21, 21); + this.tb_StationArrival.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.tb_StationArrival.CustomButton.TabIndex = 1; + this.tb_StationArrival.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.tb_StationArrival.CustomButton.UseSelectable = true; + this.tb_StationArrival.CustomButton.Visible = false; + this.tb_StationArrival.Lines = new string[0]; + this.tb_StationArrival.Location = new System.Drawing.Point(176, 250); + this.tb_StationArrival.MaxLength = 32767; + this.tb_StationArrival.Name = "tb_StationArrival"; + this.tb_StationArrival.PasswordChar = '\0'; + this.tb_StationArrival.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.tb_StationArrival.SelectedText = ""; + this.tb_StationArrival.SelectionLength = 0; + this.tb_StationArrival.SelectionStart = 0; + this.tb_StationArrival.ShortcutsEnabled = true; + this.tb_StationArrival.Size = new System.Drawing.Size(524, 23); + this.tb_StationArrival.TabIndex = 37; + this.tb_StationArrival.UseSelectable = true; + this.tb_StationArrival.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.tb_StationArrival.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel9 + // + this.metroLabel9.AutoSize = true; + this.metroLabel9.Location = new System.Drawing.Point(29, 283); + this.metroLabel9.Name = "metroLabel9"; + this.metroLabel9.Size = new System.Drawing.Size(135, 19); + this.metroLabel9.TabIndex = 38; + this.metroLabel9.Text = "产品出站接口地址:"; + // + // tb_stationExit + // + // + // + // + this.tb_stationExit.CustomButton.Image = null; + this.tb_stationExit.CustomButton.Location = new System.Drawing.Point(502, 1); + this.tb_stationExit.CustomButton.Name = ""; + this.tb_stationExit.CustomButton.Size = new System.Drawing.Size(21, 21); + this.tb_stationExit.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.tb_stationExit.CustomButton.TabIndex = 1; + this.tb_stationExit.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.tb_stationExit.CustomButton.UseSelectable = true; + this.tb_stationExit.CustomButton.Visible = false; + this.tb_stationExit.Lines = new string[0]; + this.tb_stationExit.Location = new System.Drawing.Point(176, 283); + this.tb_stationExit.MaxLength = 32767; + this.tb_stationExit.Name = "tb_stationExit"; + this.tb_stationExit.PasswordChar = '\0'; + this.tb_stationExit.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.tb_stationExit.SelectedText = ""; + this.tb_stationExit.SelectionLength = 0; + this.tb_stationExit.SelectionStart = 0; + this.tb_stationExit.ShortcutsEnabled = true; + this.tb_stationExit.Size = new System.Drawing.Size(524, 23); + this.tb_stationExit.TabIndex = 39; + this.tb_stationExit.UseSelectable = true; + this.tb_stationExit.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.tb_stationExit.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // FormMesDataSet + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(763, 578); + this.Controls.Add(this.groupBox1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FormMesDataSet"; + this.Resizable = false; + this.Text = "系统参数设置"; + this.Load += new System.EventHandler(this.FormMesDataSet_Load); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.LoginTime)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtMesRequestTime)).EndInit(); + this.metroPanel_top.ResumeLayout(false); + this.metroPanel_top.PerformLayout(); + this.metroPanel_mid.ResumeLayout(false); + this.metroPanel_mid.PerformLayout(); + this.metroPanel_bottom.ResumeLayout(false); + this.metroPanel_bottom.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + private MetroFramework.Controls.MetroButton btnExit; + private MetroFramework.Controls.MetroLabel metroLabel1; + private MetroFramework.Controls.MetroTextBox txtlineCode; + private MetroFramework.Controls.MetroButton btnSave; + private MetroFramework.Controls.MetroLabel metroLabel3; + private MetroFramework.Controls.MetroTextBox txtequipCode; + private MetroFramework.Controls.MetroTextBox txtsiteCode; + private MetroFramework.Controls.MetroLabel metroLabel2; + private System.Windows.Forms.CheckBox ckStartZNDB; + private MetroFramework.Controls.MetroTextBox txtmaterialCode; + private MetroFramework.Controls.MetroLabel metroLabel4; + private MetroFramework.Controls.MetroTextBox txtGradingMesUrl; + private MetroFramework.Controls.MetroLabel metroLabel5; + private MetroFramework.Controls.MetroTextBox txtResultProcessMesUrl; + private MetroFramework.Controls.MetroLabel metroLabel6; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.CheckBox chkIsMesUP; + private MetroFramework.Controls.MetroLabel metroLabel20; + private MetroFramework.Controls.MetroLabel metroLabel21; + private System.Windows.Forms.NumericUpDown LoginTime; + private MetroFramework.Controls.MetroLabel metroLabel22; + private MetroFramework.Controls.MetroLabel metroLabel18; + private System.Windows.Forms.NumericUpDown txtMesRequestTime; + private System.Windows.Forms.LinkLabel linkLabel_editCollectItemCfg; + private MetroFramework.Controls.MetroLabel metroLabel7; + private MetroFramework.Controls.MetroTextBox tb_productType; + private MetroFramework.Controls.MetroPanel metroPanel_bottom; + private MetroFramework.Controls.MetroPanel metroPanel_mid; + private MetroFramework.Controls.MetroPanel metroPanel_top; + private MetroFramework.Controls.MetroTextBox tb_stationExit; + private MetroFramework.Controls.MetroLabel metroLabel9; + private MetroFramework.Controls.MetroTextBox tb_StationArrival; + private MetroFramework.Controls.MetroLabel metroLabel8; + private System.Windows.Forms.BindingSource bindingSource1; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FormMesDataSet.resx b/JY.Inspection/Frm/FormMesDataSet.resx new file mode 100644 index 0000000..f2290db --- /dev/null +++ b/JY.Inspection/Frm/FormMesDataSet.resx @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAB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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8= + + + \ No newline at end of file diff --git a/JY.Inspection/Frm/FormMesGradingSet.Designer.cs b/JY.Inspection/Frm/FormMesGradingSet.Designer.cs new file mode 100644 index 0000000..d8e3079 --- /dev/null +++ b/JY.Inspection/Frm/FormMesGradingSet.Designer.cs @@ -0,0 +1,488 @@ +namespace JY.Inspection.Frm +{ + partial class FormMesGradingSet + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.chkStartNGFL = new System.Windows.Forms.CheckBox(); + this.cmbTensionStrap2 = new MetroFramework.Controls.MetroComboBox(); + this.cmbTensionStrap1 = new MetroFramework.Controls.MetroComboBox(); + this.metroLabel6 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel5 = new MetroFramework.Controls.MetroLabel(); + this.txtgrading4 = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel4 = new MetroFramework.Controls.MetroLabel(); + this.txtgrading2 = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel3 = new MetroFramework.Controls.MetroLabel(); + this.txtgrading1 = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel2 = new MetroFramework.Controls.MetroLabel(); + this.txtgrading3 = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.btnExit = new MetroFramework.Controls.MetroButton(); + this.btnSave = new MetroFramework.Controls.MetroButton(); + this.cmbTensionStrap3 = new MetroFramework.Controls.MetroComboBox(); + this.metroLabel7 = new MetroFramework.Controls.MetroLabel(); + this.chkCkGrading = new System.Windows.Forms.CheckBox(); + this.cmbTensionStrapCCD1 = new MetroFramework.Controls.MetroComboBox(); + this.cmbTensionStrapCCD2 = new MetroFramework.Controls.MetroComboBox(); + this.cmbTensionStrapCCD3 = new MetroFramework.Controls.MetroComboBox(); + this.cmbTensionStrapCCD4 = new MetroFramework.Controls.MetroComboBox(); + this.metroLabel8 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel9 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel10 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel11 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel12 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel13 = new MetroFramework.Controls.MetroLabel(); + this.SuspendLayout(); + // + // chkStartNGFL + // + this.chkStartNGFL.AutoSize = true; + this.chkStartNGFL.Location = new System.Drawing.Point(210, 399); + this.chkStartNGFL.Name = "chkStartNGFL"; + this.chkStartNGFL.Size = new System.Drawing.Size(120, 16); + this.chkStartNGFL.TabIndex = 178; + this.chkStartNGFL.Text = "NG电池不分类排出"; + this.chkStartNGFL.UseVisualStyleBackColor = true; + this.chkStartNGFL.Click += new System.EventHandler(this.chkStartNGFL_Click); + // + // cmbTensionStrap2 + // + this.cmbTensionStrap2.FormattingEnabled = true; + this.cmbTensionStrap2.ItemHeight = 23; + this.cmbTensionStrap2.Location = new System.Drawing.Point(143, 293); + this.cmbTensionStrap2.Name = "cmbTensionStrap2"; + this.cmbTensionStrap2.Size = new System.Drawing.Size(186, 29); + this.cmbTensionStrap2.TabIndex = 176; + this.cmbTensionStrap2.UseSelectable = true; + this.cmbTensionStrap2.DropDownClosed += new System.EventHandler(this.cmbTensionStrap2_DropDownClosed); + // + // cmbTensionStrap1 + // + this.cmbTensionStrap1.FormattingEnabled = true; + this.cmbTensionStrap1.ItemHeight = 23; + this.cmbTensionStrap1.Location = new System.Drawing.Point(143, 251); + this.cmbTensionStrap1.Name = "cmbTensionStrap1"; + this.cmbTensionStrap1.Size = new System.Drawing.Size(186, 29); + this.cmbTensionStrap1.TabIndex = 177; + this.cmbTensionStrap1.UseSelectable = true; + this.cmbTensionStrap1.DropDownClosed += new System.EventHandler(this.cmbTensionStrap1_DropDownClosed); + // + // metroLabel6 + // + this.metroLabel6.AutoSize = true; + this.metroLabel6.Location = new System.Drawing.Point(47, 298); + this.metroLabel6.Name = "metroLabel6"; + this.metroLabel6.Size = new System.Drawing.Size(85, 19); + this.metroLabel6.TabIndex = 173; + this.metroLabel6.Text = "NG拉带(6):"; + // + // metroLabel5 + // + this.metroLabel5.AutoSize = true; + this.metroLabel5.Location = new System.Drawing.Point(47, 255); + this.metroLabel5.Name = "metroLabel5"; + this.metroLabel5.Size = new System.Drawing.Size(85, 19); + this.metroLabel5.TabIndex = 174; + this.metroLabel5.Text = "NG拉带(5):"; + // + // txtgrading4 + // + // + // + // + this.txtgrading4.CustomButton.Image = null; + this.txtgrading4.CustomButton.Location = new System.Drawing.Point(60, 1); + this.txtgrading4.CustomButton.Name = ""; + this.txtgrading4.CustomButton.Size = new System.Drawing.Size(21, 21); + this.txtgrading4.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtgrading4.CustomButton.TabIndex = 1; + this.txtgrading4.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtgrading4.CustomButton.UseSelectable = true; + this.txtgrading4.CustomButton.Visible = false; + this.txtgrading4.FontSize = MetroFramework.MetroTextBoxSize.Medium; + this.txtgrading4.Lines = new string[0]; + this.txtgrading4.Location = new System.Drawing.Point(144, 200); + this.txtgrading4.MaxLength = 32767; + this.txtgrading4.Name = "txtgrading4"; + this.txtgrading4.PasswordChar = '\0'; + this.txtgrading4.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtgrading4.SelectedText = ""; + this.txtgrading4.SelectionLength = 0; + this.txtgrading4.SelectionStart = 0; + this.txtgrading4.ShortcutsEnabled = true; + this.txtgrading4.Size = new System.Drawing.Size(70, 28); + this.txtgrading4.TabIndex = 172; + this.txtgrading4.UseSelectable = true; + this.txtgrading4.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtgrading4.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel4 + // + this.metroLabel4.AutoSize = true; + this.metroLabel4.Location = new System.Drawing.Point(47, 202); + this.metroLabel4.Name = "metroLabel4"; + this.metroLabel4.Size = new System.Drawing.Size(84, 19); + this.metroLabel4.TabIndex = 175; + this.metroLabel4.Text = "OK拉带(4):"; + // + // txtgrading2 + // + // + // + // + this.txtgrading2.CustomButton.Image = null; + this.txtgrading2.CustomButton.Location = new System.Drawing.Point(60, 1); + this.txtgrading2.CustomButton.Name = ""; + this.txtgrading2.CustomButton.Size = new System.Drawing.Size(21, 21); + this.txtgrading2.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtgrading2.CustomButton.TabIndex = 1; + this.txtgrading2.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtgrading2.CustomButton.UseSelectable = true; + this.txtgrading2.CustomButton.Visible = false; + this.txtgrading2.FontSize = MetroFramework.MetroTextBoxSize.Medium; + this.txtgrading2.Lines = new string[0]; + this.txtgrading2.Location = new System.Drawing.Point(144, 136); + this.txtgrading2.MaxLength = 32767; + this.txtgrading2.Name = "txtgrading2"; + this.txtgrading2.PasswordChar = '\0'; + this.txtgrading2.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtgrading2.SelectedText = ""; + this.txtgrading2.SelectionLength = 0; + this.txtgrading2.SelectionStart = 0; + this.txtgrading2.ShortcutsEnabled = true; + this.txtgrading2.Size = new System.Drawing.Size(70, 28); + this.txtgrading2.TabIndex = 171; + this.txtgrading2.UseSelectable = true; + this.txtgrading2.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtgrading2.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel3 + // + this.metroLabel3.AutoSize = true; + this.metroLabel3.Location = new System.Drawing.Point(47, 139); + this.metroLabel3.Name = "metroLabel3"; + this.metroLabel3.Size = new System.Drawing.Size(84, 19); + this.metroLabel3.TabIndex = 170; + this.metroLabel3.Text = "OK拉带(2):"; + // + // txtgrading1 + // + // + // + // + this.txtgrading1.CustomButton.Image = null; + this.txtgrading1.CustomButton.Location = new System.Drawing.Point(56, 2); + this.txtgrading1.CustomButton.Name = ""; + this.txtgrading1.CustomButton.Size = new System.Drawing.Size(23, 23); + this.txtgrading1.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtgrading1.CustomButton.TabIndex = 1; + this.txtgrading1.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtgrading1.CustomButton.UseSelectable = true; + this.txtgrading1.CustomButton.Visible = false; + this.txtgrading1.FontSize = MetroFramework.MetroTextBoxSize.Medium; + this.txtgrading1.Lines = new string[0]; + this.txtgrading1.Location = new System.Drawing.Point(144, 103); + this.txtgrading1.MaxLength = 32767; + this.txtgrading1.Name = "txtgrading1"; + this.txtgrading1.PasswordChar = '\0'; + this.txtgrading1.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtgrading1.SelectedText = ""; + this.txtgrading1.SelectionLength = 0; + this.txtgrading1.SelectionStart = 0; + this.txtgrading1.ShortcutsEnabled = true; + this.txtgrading1.Size = new System.Drawing.Size(70, 28); + this.txtgrading1.TabIndex = 168; + this.txtgrading1.UseSelectable = true; + this.txtgrading1.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtgrading1.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel2 + // + this.metroLabel2.AutoSize = true; + this.metroLabel2.Location = new System.Drawing.Point(47, 106); + this.metroLabel2.Name = "metroLabel2"; + this.metroLabel2.Size = new System.Drawing.Size(82, 19); + this.metroLabel2.TabIndex = 169; + this.metroLabel2.Text = "OK拉带(1):"; + // + // txtgrading3 + // + // + // + // + this.txtgrading3.CustomButton.Image = null; + this.txtgrading3.CustomButton.Location = new System.Drawing.Point(60, 1); + this.txtgrading3.CustomButton.Name = ""; + this.txtgrading3.CustomButton.Size = new System.Drawing.Size(21, 21); + this.txtgrading3.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtgrading3.CustomButton.TabIndex = 1; + this.txtgrading3.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtgrading3.CustomButton.UseSelectable = true; + this.txtgrading3.CustomButton.Visible = false; + this.txtgrading3.FontSize = MetroFramework.MetroTextBoxSize.Medium; + this.txtgrading3.Lines = new string[0]; + this.txtgrading3.Location = new System.Drawing.Point(144, 168); + this.txtgrading3.MaxLength = 32767; + this.txtgrading3.Name = "txtgrading3"; + this.txtgrading3.PasswordChar = '\0'; + this.txtgrading3.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtgrading3.SelectedText = ""; + this.txtgrading3.SelectionLength = 0; + this.txtgrading3.SelectionStart = 0; + this.txtgrading3.ShortcutsEnabled = true; + this.txtgrading3.Size = new System.Drawing.Size(70, 28); + this.txtgrading3.TabIndex = 166; + this.txtgrading3.UseSelectable = true; + this.txtgrading3.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtgrading3.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel1 + // + this.metroLabel1.AutoSize = true; + this.metroLabel1.Location = new System.Drawing.Point(47, 172); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Size = new System.Drawing.Size(84, 19); + this.metroLabel1.TabIndex = 167; + this.metroLabel1.Text = "OK拉带(3):"; + // + // btnExit + // + this.btnExit.Location = new System.Drawing.Point(227, 438); + this.btnExit.Name = "btnExit"; + this.btnExit.Size = new System.Drawing.Size(103, 37); + this.btnExit.TabIndex = 165; + this.btnExit.Text = "退出"; + this.btnExit.UseSelectable = true; + this.btnExit.Click += new System.EventHandler(this.btnExit_Click); + // + // btnSave + // + this.btnSave.Location = new System.Drawing.Point(41, 438); + this.btnSave.Name = "btnSave"; + this.btnSave.Size = new System.Drawing.Size(112, 37); + this.btnSave.TabIndex = 164; + this.btnSave.Text = "保存"; + this.btnSave.UseSelectable = true; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // + // cmbTensionStrap3 + // + this.cmbTensionStrap3.FormattingEnabled = true; + this.cmbTensionStrap3.ItemHeight = 23; + this.cmbTensionStrap3.Location = new System.Drawing.Point(144, 334); + this.cmbTensionStrap3.Name = "cmbTensionStrap3"; + this.cmbTensionStrap3.Size = new System.Drawing.Size(186, 29); + this.cmbTensionStrap3.TabIndex = 180; + this.cmbTensionStrap3.UseSelectable = true; + this.cmbTensionStrap3.DropDownClosed += new System.EventHandler(this.cmbTensionStrap3_DropDownClosed); + // + // metroLabel7 + // + this.metroLabel7.AutoSize = true; + this.metroLabel7.Location = new System.Drawing.Point(47, 340); + this.metroLabel7.Name = "metroLabel7"; + this.metroLabel7.Size = new System.Drawing.Size(85, 19); + this.metroLabel7.TabIndex = 179; + this.metroLabel7.Text = "NG拉带(7):"; + // + // chkCkGrading + // + this.chkCkGrading.AutoSize = true; + this.chkCkGrading.Location = new System.Drawing.Point(47, 399); + this.chkCkGrading.Name = "chkCkGrading"; + this.chkCkGrading.Size = new System.Drawing.Size(96, 16); + this.chkCkGrading.TabIndex = 181; + this.chkCkGrading.Text = "是否启用分档"; + this.chkCkGrading.UseVisualStyleBackColor = true; + // + // cmbTensionStrapCCD1 + // + this.cmbTensionStrapCCD1.FormattingEnabled = true; + this.cmbTensionStrapCCD1.ItemHeight = 23; + this.cmbTensionStrapCCD1.Location = new System.Drawing.Point(260, 102); + this.cmbTensionStrapCCD1.Name = "cmbTensionStrapCCD1"; + this.cmbTensionStrapCCD1.Size = new System.Drawing.Size(70, 29); + this.cmbTensionStrapCCD1.TabIndex = 182; + this.cmbTensionStrapCCD1.UseSelectable = true; + // + // cmbTensionStrapCCD2 + // + this.cmbTensionStrapCCD2.FormattingEnabled = true; + this.cmbTensionStrapCCD2.ItemHeight = 23; + this.cmbTensionStrapCCD2.Location = new System.Drawing.Point(260, 133); + this.cmbTensionStrapCCD2.Name = "cmbTensionStrapCCD2"; + this.cmbTensionStrapCCD2.Size = new System.Drawing.Size(70, 29); + this.cmbTensionStrapCCD2.TabIndex = 183; + this.cmbTensionStrapCCD2.UseSelectable = true; + // + // cmbTensionStrapCCD3 + // + this.cmbTensionStrapCCD3.FormattingEnabled = true; + this.cmbTensionStrapCCD3.ItemHeight = 23; + this.cmbTensionStrapCCD3.Location = new System.Drawing.Point(260, 165); + this.cmbTensionStrapCCD3.Name = "cmbTensionStrapCCD3"; + this.cmbTensionStrapCCD3.Size = new System.Drawing.Size(70, 29); + this.cmbTensionStrapCCD3.TabIndex = 184; + this.cmbTensionStrapCCD3.UseSelectable = true; + // + // cmbTensionStrapCCD4 + // + this.cmbTensionStrapCCD4.FormattingEnabled = true; + this.cmbTensionStrapCCD4.ItemHeight = 23; + this.cmbTensionStrapCCD4.Location = new System.Drawing.Point(260, 198); + this.cmbTensionStrapCCD4.Name = "cmbTensionStrapCCD4"; + this.cmbTensionStrapCCD4.Size = new System.Drawing.Size(70, 29); + this.cmbTensionStrapCCD4.TabIndex = 185; + this.cmbTensionStrapCCD4.UseSelectable = true; + // + // metroLabel8 + // + this.metroLabel8.AutoSize = true; + this.metroLabel8.Location = new System.Drawing.Point(229, 106); + this.metroLabel8.Name = "metroLabel8"; + this.metroLabel8.Size = new System.Drawing.Size(15, 19); + this.metroLabel8.TabIndex = 186; + this.metroLabel8.Text = "-"; + // + // metroLabel9 + // + this.metroLabel9.AutoSize = true; + this.metroLabel9.Location = new System.Drawing.Point(230, 139); + this.metroLabel9.Name = "metroLabel9"; + this.metroLabel9.Size = new System.Drawing.Size(15, 19); + this.metroLabel9.TabIndex = 187; + this.metroLabel9.Text = "-"; + // + // metroLabel10 + // + this.metroLabel10.AutoSize = true; + this.metroLabel10.Location = new System.Drawing.Point(230, 171); + this.metroLabel10.Name = "metroLabel10"; + this.metroLabel10.Size = new System.Drawing.Size(15, 19); + this.metroLabel10.TabIndex = 188; + this.metroLabel10.Text = "-"; + // + // metroLabel11 + // + this.metroLabel11.AutoSize = true; + this.metroLabel11.Location = new System.Drawing.Point(230, 203); + this.metroLabel11.Name = "metroLabel11"; + this.metroLabel11.Size = new System.Drawing.Size(15, 19); + this.metroLabel11.TabIndex = 189; + this.metroLabel11.Text = "-"; + // + // metroLabel12 + // + this.metroLabel12.AutoSize = true; + this.metroLabel12.Location = new System.Drawing.Point(261, 71); + this.metroLabel12.Name = "metroLabel12"; + this.metroLabel12.Size = new System.Drawing.Size(63, 19); + this.metroLabel12.TabIndex = 190; + this.metroLabel12.Text = "CCD结果"; + // + // metroLabel13 + // + this.metroLabel13.AutoSize = true; + this.metroLabel13.Location = new System.Drawing.Point(155, 71); + this.metroLabel13.Name = "metroLabel13"; + this.metroLabel13.Size = new System.Drawing.Size(37, 19); + this.metroLabel13.TabIndex = 191; + this.metroLabel13.Text = "档位"; + // + // FormMesGradingSet + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(394, 529); + this.Controls.Add(this.metroLabel13); + this.Controls.Add(this.metroLabel12); + this.Controls.Add(this.txtgrading4); + this.Controls.Add(this.cmbTensionStrapCCD4); + this.Controls.Add(this.txtgrading3); + this.Controls.Add(this.cmbTensionStrapCCD3); + this.Controls.Add(this.txtgrading2); + this.Controls.Add(this.cmbTensionStrapCCD2); + this.Controls.Add(this.txtgrading1); + this.Controls.Add(this.cmbTensionStrapCCD1); + this.Controls.Add(this.metroLabel11); + this.Controls.Add(this.metroLabel10); + this.Controls.Add(this.metroLabel9); + this.Controls.Add(this.metroLabel8); + this.Controls.Add(this.chkCkGrading); + this.Controls.Add(this.cmbTensionStrap3); + this.Controls.Add(this.metroLabel7); + this.Controls.Add(this.chkStartNGFL); + this.Controls.Add(this.cmbTensionStrap2); + this.Controls.Add(this.cmbTensionStrap1); + this.Controls.Add(this.metroLabel6); + this.Controls.Add(this.metroLabel5); + this.Controls.Add(this.metroLabel4); + this.Controls.Add(this.metroLabel3); + this.Controls.Add(this.metroLabel2); + this.Controls.Add(this.metroLabel1); + this.Controls.Add(this.btnExit); + this.Controls.Add(this.btnSave); + this.Name = "FormMesGradingSet"; + this.Text = "MES档位设置"; + this.Load += new System.EventHandler(this.FormMesGradingSet_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.CheckBox chkStartNGFL; + private MetroFramework.Controls.MetroComboBox cmbTensionStrap2; + private MetroFramework.Controls.MetroComboBox cmbTensionStrap1; + private MetroFramework.Controls.MetroLabel metroLabel6; + private MetroFramework.Controls.MetroLabel metroLabel5; + private MetroFramework.Controls.MetroTextBox txtgrading4; + private MetroFramework.Controls.MetroLabel metroLabel4; + private MetroFramework.Controls.MetroTextBox txtgrading2; + private MetroFramework.Controls.MetroLabel metroLabel3; + private MetroFramework.Controls.MetroTextBox txtgrading1; + private MetroFramework.Controls.MetroLabel metroLabel2; + private MetroFramework.Controls.MetroTextBox txtgrading3; + private MetroFramework.Controls.MetroLabel metroLabel1; + private MetroFramework.Controls.MetroButton btnExit; + private MetroFramework.Controls.MetroButton btnSave; + private MetroFramework.Controls.MetroComboBox cmbTensionStrap3; + private MetroFramework.Controls.MetroLabel metroLabel7; + private System.Windows.Forms.CheckBox chkCkGrading; + private MetroFramework.Controls.MetroComboBox cmbTensionStrapCCD1; + private MetroFramework.Controls.MetroComboBox cmbTensionStrapCCD2; + private MetroFramework.Controls.MetroComboBox cmbTensionStrapCCD3; + private MetroFramework.Controls.MetroComboBox cmbTensionStrapCCD4; + private MetroFramework.Controls.MetroLabel metroLabel8; + private MetroFramework.Controls.MetroLabel metroLabel9; + private MetroFramework.Controls.MetroLabel metroLabel10; + private MetroFramework.Controls.MetroLabel metroLabel11; + private MetroFramework.Controls.MetroLabel metroLabel12; + private MetroFramework.Controls.MetroLabel metroLabel13; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FormMesGradingSet.cs b/JY.Inspection/Frm/FormMesGradingSet.cs new file mode 100644 index 0000000..85f78a1 --- /dev/null +++ b/JY.Inspection/Frm/FormMesGradingSet.cs @@ -0,0 +1,402 @@ +using JY.Utility; +using JYControl; +using PLCCommunication; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JY.Inspection.Frm +{ + public partial class FormMesGradingSet : MetroFramework.Forms.MetroForm + { + private FrmOmronPLCCom MelsecPLCCom; + public short[] MESGradingSet = new short[] { (short)1, (short)1, (short)1, (short)1 }; + public FormMesGradingSet(FrmOmronPLCCom plcccom) + { + InitializeComponent(); + MelsecPLCCom = plcccom; + } + + private void FormMesGradingSet_Load(object sender, EventArgs e) + { + if (Global.systemConfig.isUpMes) + { + chkCkGrading.Visible = true; + } + else + { + chkCkGrading.Visible = false; + } + + + BangDingcmb(); + BangDingcmbCCD(); + txtgrading1.Text = IniFileHelper.ReadIniData("MES配置", "Grading1"); + txtgrading2.Text = IniFileHelper.ReadIniData("MES配置", "Grading2"); + txtgrading3.Text = IniFileHelper.ReadIniData("MES配置", "Grading3"); + txtgrading4.Text = IniFileHelper.ReadIniData("MES配置", "Grading4"); + cmbTensionStrap1.SelectedIndex = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap1")); + cmbTensionStrap2.SelectedIndex = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap2")); + cmbTensionStrap3.SelectedIndex = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap3")); + cmbTensionStrapCCD1.SelectedIndex = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrapCCDReslut1")); + cmbTensionStrapCCD2.SelectedIndex = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrapCCDReslut2")); + cmbTensionStrapCCD3.SelectedIndex = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrapCCDReslut3")); + cmbTensionStrapCCD4.SelectedIndex = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrapCCDReslut4")); + //不分类 + chkStartNGFL.Checked = IniFileHelper.ReadIniData("MES配置", "StartNGFL") == "1" ? true : false; + //是否启用分档 + chkCkGrading.Checked = IniFileHelper.ReadIniData("MES配置", "Grading") == "1" ? true : false; + } + + public void BangDingcmb() + { + string[] bound = IniFileHelper.ReadIniData("MES配置", "NGMessage").Split(','); + List cmbls = new List(); + List cmbls2 = new List(); + List cmbls3 = new List(); + for (int i = 0; i < bound.Length; i++) + { + cmb _cmb = new cmb(); + _cmb.Key = i.ToString(); + _cmb.Value = bound[i]; + cmbls.Add(_cmb); + cmbls2.Add(_cmb); + cmbls3.Add(_cmb); + } + cmbTensionStrap1.DataSource = cmbls; + cmbTensionStrap1.DisplayMember = "Value"; + cmbTensionStrap2.DataSource = cmbls2; + cmbTensionStrap2.DisplayMember = "Value"; + cmbTensionStrap3.DataSource = cmbls3; + cmbTensionStrap3.DisplayMember = "Value"; + } + + public void BangDingcmbCCD() + { + string[] bound = IniFileHelper.ReadIniData("MES配置", "CCDResultMessage").Split(','); + List cmbls = new List(); + List cmbls2 = new List(); + List cmbls3 = new List(); + List cmbls4 = new List(); + for (int i = 0; i < bound.Length; i++) + { + cmb _cmb = new cmb(); + _cmb.Key = i.ToString(); + _cmb.Value = bound[i]; + cmbls.Add(_cmb); + cmbls2.Add(_cmb); + cmbls3.Add(_cmb); + cmbls4.Add(_cmb); + } + cmbTensionStrapCCD1.DataSource = cmbls; + cmbTensionStrapCCD1.DisplayMember = "Value"; + cmbTensionStrapCCD2.DataSource = cmbls2; + cmbTensionStrapCCD2.DisplayMember = "Value"; + cmbTensionStrapCCD3.DataSource = cmbls3; + cmbTensionStrapCCD3.DisplayMember = "Value"; + cmbTensionStrapCCD4.DataSource = cmbls4; + cmbTensionStrapCCD4.DisplayMember = "Value"; + } + + public class cmb + { + public string Key { get; set; } + public string Value { get; set; } + } + + /// + /// 保存MES配置文件信息 + /// + /// + /// + private void btnSave_Click(object sender, EventArgs e) + { + if (txtgrading1.Text.Trim().Equals("")) + { + MessageBox.Show("MES参数保存失败,一档(OK拉带1)对应档位不可为空!", "系统提示"); + return; + } + if (txtgrading2.Text.Trim().Equals("")) + { + MessageBox.Show("MES参数保存失败,一档(OK拉带2)对应档位不可为空!", "系统提示"); + return; + } + if (txtgrading3.Text.Trim().Equals("")) + { + MessageBox.Show("MES参数保存失败,一档(OK拉带3)对应档位不可为空!", "系统提示"); + return; + } + if (txtgrading4.Text.Trim().Equals("")) + { + MessageBox.Show("MES参数保存失败,一档(OK拉带4)对应档位不可为空!", "系统提示"); + return; + } + if (chkStartNGFL.Checked && cmbTensionStrap1.SelectedIndex != 0 && cmbTensionStrap2.SelectedIndex != 0 && cmbTensionStrap3.SelectedIndex != 0) + { + MessageBox.Show("MES参数保存失败,NG电池不分类排出时NG拉带1和NG拉带2以及NG拉带3必须为不分类", "系统提示"); + return; + } + if (!chkStartNGFL.Checked && (cmbTensionStrap1.SelectedIndex == 0 || cmbTensionStrap2.SelectedIndex == 0 || cmbTensionStrap3.SelectedIndex == 0)) + { + MessageBox.Show("MES参数保存失败,NG电池分类排出时NG拉带1和NG拉带2以及NG拉带3,不能选择不分类", "系统提示"); + return; + } + + if (txtgrading1.Text.Trim().Equals(txtgrading2.Text.Trim())) + { + if (cmbTensionStrapCCD1.SelectedIndex == 0 || cmbTensionStrapCCD2.SelectedIndex == 0) + { + if (cmbTensionStrapCCD1.SelectedIndex == 1 || cmbTensionStrapCCD2.SelectedIndex == 1 || cmbTensionStrapCCD1.SelectedIndex == 2 || cmbTensionStrapCCD2.SelectedIndex == 2) + { + MessageBox.Show("同一档位(一档、二档)不允许同时选择“不分类”与“OK/NG”", "系统提示"); + return; + } + } + } + if (txtgrading1.Text.Trim().Equals(txtgrading3.Text.Trim())) + { + if (cmbTensionStrapCCD1.SelectedIndex == 0 || cmbTensionStrapCCD3.SelectedIndex == 0) + { + if (cmbTensionStrapCCD1.SelectedIndex == 1 || cmbTensionStrapCCD3.SelectedIndex == 1 || cmbTensionStrapCCD1.SelectedIndex == 2 || cmbTensionStrapCCD3.SelectedIndex == 2) + { + MessageBox.Show("同一档位(一档、三档)不允许同时选择“不分类”与“OK/NG”", "系统提示"); + return; + } + } + } + if (txtgrading1.Text.Trim().Equals(txtgrading4.Text.Trim())) + { + if (cmbTensionStrapCCD1.SelectedIndex == 0 || cmbTensionStrapCCD4.SelectedIndex == 0) + { + if (cmbTensionStrapCCD1.SelectedIndex == 1 || cmbTensionStrapCCD4.SelectedIndex == 1 || cmbTensionStrapCCD1.SelectedIndex == 2 || cmbTensionStrapCCD4.SelectedIndex == 2) + { + MessageBox.Show("同一档位(一档、四档)不允许同时选择“不分类”与“OK/NG”", "系统提示"); + return; + } + } + } + if (txtgrading2.Text.Trim().Equals(txtgrading3.Text.Trim())) + { + if (cmbTensionStrapCCD2.SelectedIndex == 0 || cmbTensionStrapCCD3.SelectedIndex == 0) + { + if (cmbTensionStrapCCD2.SelectedIndex == 1 || cmbTensionStrapCCD3.SelectedIndex == 1 || cmbTensionStrapCCD2.SelectedIndex == 2 || cmbTensionStrapCCD3.SelectedIndex == 2) + { + MessageBox.Show("同一档位(二档、三档)不允许同时选择“不分类”与“OK/NG”", "系统提示"); + return; + } + } + } + if (txtgrading2.Text.Trim().Equals(txtgrading4.Text.Trim())) + { + if (cmbTensionStrapCCD2.SelectedIndex == 0 || cmbTensionStrapCCD4.SelectedIndex == 0) + { + if (cmbTensionStrapCCD2.SelectedIndex == 1 || cmbTensionStrapCCD4.SelectedIndex == 1 || cmbTensionStrapCCD2.SelectedIndex == 2 || cmbTensionStrapCCD4.SelectedIndex == 2) + { + MessageBox.Show("同一档位(二档、四档)不允许同时选择“不分类”与“OK/NG”", "系统提示"); + return; + } + } + } + if (txtgrading3.Text.Trim().Equals(txtgrading4.Text.Trim())) + { + if (cmbTensionStrapCCD3.SelectedIndex == 0 || cmbTensionStrapCCD4.SelectedIndex == 0) + { + if (cmbTensionStrapCCD3.SelectedIndex == 1 || cmbTensionStrapCCD4.SelectedIndex == 1 || cmbTensionStrapCCD3.SelectedIndex == 2 || cmbTensionStrapCCD4.SelectedIndex == 2) + { + MessageBox.Show("同一档位(三档、四档)不允许同时选择“不分类”与“OK/NG”", "系统提示"); + return; + } + } + } + + #region plc中ccd屏蔽 + //开启了ccd屏蔽的,只能使用 ccd结果 不分类 + //关闭了ccd屏蔽的,只能使用 ccd结果 ng ok + //同ok档位 必须有一个选择ccd ok 或者不分类 + var listGradingCCD = new List(); + listGradingCCD.Add(txtgrading1.Text.Trim() + "-" + cmbTensionStrapCCD1.Text); + listGradingCCD.Add(txtgrading2.Text.Trim() + "-" + cmbTensionStrapCCD2.Text); + listGradingCCD.Add(txtgrading3.Text.Trim() + "-" + cmbTensionStrapCCD3.Text); + listGradingCCD.Add(txtgrading4.Text.Trim() + "-" + cmbTensionStrapCCD4.Text); + //读取plc地址W260。9 是开启屏蔽。1 是默认不开启。 反馈地址w261。 1 是正常不报警。 2 是报警。 + var int_IsMaskCCD = MelsecPLCCom.lstMcUI[0].ReadshortDReg("W260"); + + if (int_IsMaskCCD == 9) + { + var gradingCCD_NoClassCount = listGradingCCD.Count(x => x.Contains("不分类")); + if(gradingCCD_NoClassCount <=0) + { + MessageBox.Show($"已开启CCD结果屏蔽,全部档位设置CCD结果不分类", "系统提示"); + return; + } + } + else + { + //必须有一个OK ccd结果拉带 + var gradingCCD_OKCount = listGradingCCD.Count(x => x.Contains("OK")); + if(gradingCCD_OKCount <= 0) + { + MessageBox.Show($"已关闭CCD结果屏蔽,档位设置至少有一个CCD结果OK选择值", "系统提示"); + return; + } + var lstGradingCCD_NG = listGradingCCD.Where(x => x.Contains("NG")).Distinct().ToList(); + foreach (var item_NG in lstGradingCCD_NG) + { + var grading_array = item_NG.Split(new string[] { "-" }, StringSplitOptions.RemoveEmptyEntries); + var indexGrading = listGradingCCD.IndexOf(grading_array[0] + "-" + "OK"); + if (indexGrading < 0) + { + MessageBox.Show($"已关闭CCD结果屏蔽,OK拉带档位{item_NG},必须选一个{grading_array[0]}档位对应的CCD结果OK值", "系统提示"); + return; + } + } + } + #endregion + + IniFileHelper.WriteIniData("MES配置", "Grading1", txtgrading1.Text.Trim()); + IniFileHelper.WriteIniData("MES配置", "Grading2", txtgrading2.Text.Trim()); + IniFileHelper.WriteIniData("MES配置", "Grading3", txtgrading3.Text.Trim()); + IniFileHelper.WriteIniData("MES配置", "Grading4", txtgrading4.Text.Trim()); + IniFileHelper.WriteIniData("MES配置", "TensionStrapCCDReslut1", cmbTensionStrapCCD1.SelectedIndex.ToString()); + IniFileHelper.WriteIniData("MES配置", "TensionStrapCCDReslut2", cmbTensionStrapCCD2.SelectedIndex.ToString()); + IniFileHelper.WriteIniData("MES配置", "TensionStrapCCDReslut3", cmbTensionStrapCCD3.SelectedIndex.ToString()); + IniFileHelper.WriteIniData("MES配置", "TensionStrapCCDReslut4", cmbTensionStrapCCD4.SelectedIndex.ToString()); + IniFileHelper.WriteIniData("MES配置", "TensionStrap1", cmbTensionStrap1.SelectedIndex.ToString()); + IniFileHelper.WriteIniData("MES配置", "TensionStrap2", cmbTensionStrap2.SelectedIndex.ToString()); + IniFileHelper.WriteIniData("MES配置", "TensionStrap3", cmbTensionStrap3.SelectedIndex.ToString()); + + //不分类 + IniFileHelper.WriteIniData("MES配置", "StartNGFL", chkStartNGFL.Checked ? "1" : "0"); + //是否启用分档 + IniFileHelper.WriteIniData("MES配置", "Grading", chkCkGrading.Checked ? "1" : "2"); + + MESGradingSet[0] = (short)1; + if ((txtgrading2.Text.Trim()+ cmbTensionStrapCCD2.Text).Equals(txtgrading1.Text.Trim()+ cmbTensionStrapCCD1.Text)) + MESGradingSet[1] = MESGradingSet[0]; + else + MESGradingSet[1] = (short)(MESGradingSet[0] + 1); + + if ((txtgrading3.Text.Trim() + cmbTensionStrapCCD3.Text).Equals(txtgrading1.Text.Trim()+ cmbTensionStrapCCD1.Text)) + MESGradingSet[2] = MESGradingSet[0]; + else + { + if ((txtgrading3.Text.Trim() + cmbTensionStrapCCD3.Text).Equals(txtgrading2.Text.Trim() + cmbTensionStrapCCD2.Text)) + MESGradingSet[2] = MESGradingSet[1]; + else + MESGradingSet[2] = (short)(MESGradingSet[1] + 1); + } + + if ((txtgrading4.Text.Trim() + cmbTensionStrapCCD4.Text).Equals(txtgrading1.Text.Trim() + cmbTensionStrapCCD1.Text)) + MESGradingSet[3] = MESGradingSet[0]; + else + { + if ((txtgrading4.Text.Trim() + cmbTensionStrapCCD4.Text).Equals(txtgrading2.Text.Trim() + cmbTensionStrapCCD2.Text)) + MESGradingSet[3] = MESGradingSet[1]; + else + { + if ((txtgrading4.Text.Trim() + cmbTensionStrapCCD4.Text).Equals(txtgrading3.Text.Trim() + cmbTensionStrapCCD3.Text)) + MESGradingSet[3] = MESGradingSet[2]; + else + MESGradingSet[3] = (short)(MESGradingSet[2] + 1); + } + } + + int Grading = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "Grading")); + + //告诉PLC当前OK与NG拉带设置挡位 + // + if(cmbTensionStrapCCD1.Text.ToUpper() =="NG") + { + MESGradingSet[0] = (short)(30 + MESGradingSet[0]); + } + if (cmbTensionStrapCCD2.Text.ToUpper() == "NG") + { + MESGradingSet[1] = (short)(30 + MESGradingSet[1]); + } + if (cmbTensionStrapCCD3.Text.ToUpper() == "NG") + { + MESGradingSet[2] = (short)(30 + MESGradingSet[2]); + } + if (cmbTensionStrapCCD4.Text.ToUpper() == "NG") + { + MESGradingSet[3] = (short)(30 + MESGradingSet[3]); + } + MelsecPLCCom.lstMcUI[0].WriteDReg("W241", MESGradingSet[0]); + MelsecPLCCom.lstMcUI[0].WriteDReg("W242", MESGradingSet[1]); + MelsecPLCCom.lstMcUI[0].WriteDReg("W243", MESGradingSet[2]); + MelsecPLCCom.lstMcUI[0].WriteDReg("W244", MESGradingSet[3]); + //+10 + //MelsecPLCCom.lstMcUI[0].WriteDReg("W245", (short)cmbTensionStrap1.SelectedIndex); + //MelsecPLCCom.lstMcUI[0].WriteDReg("W246", (short)cmbTensionStrap2.SelectedIndex); + //MelsecPLCCom.lstMcUI[0].WriteDReg("W247", (short)cmbTensionStrap3.SelectedIndex); + + MelsecPLCCom.lstMcUI[0].WriteDReg("W245", (short)(cmbTensionStrap1.SelectedIndex ==0 ? 99 : cmbTensionStrap1.SelectedIndex + 10)); + MelsecPLCCom.lstMcUI[0].WriteDReg("W246", (short)(cmbTensionStrap2.SelectedIndex == 0 ? 99 : cmbTensionStrap2.SelectedIndex + 10)); + MelsecPLCCom.lstMcUI[0].WriteDReg("W247", (short)(cmbTensionStrap3.SelectedIndex == 0 ? 99 : cmbTensionStrap3.SelectedIndex + 10)); + MelsecPLCCom.lstMcUI[0].WriteDReg("W248", (short)Grading); + + + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置一档,W241[值:{MESGradingSet[0]}-档位:{txtgrading1.Text.Trim()}{cmbTensionStrapCCD1.Text}]", LogAddtype.local, Logtype.Message); + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置二档,W242[值:{MESGradingSet[1]}-档位:{txtgrading2.Text.Trim()}{cmbTensionStrapCCD2.Text}]", LogAddtype.local, Logtype.Message); + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置三档,W243[值:{MESGradingSet[2]}-档位:{txtgrading3.Text.Trim()}{cmbTensionStrapCCD3.Text}]", LogAddtype.local, Logtype.Message); + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置四档,W244[值:{MESGradingSet[3]}-档位:{txtgrading4.Text.Trim()}{cmbTensionStrapCCD4.Text}]", LogAddtype.local, Logtype.Message); + + var ng1 = (short)(cmbTensionStrap1.SelectedIndex == 0 ? 99 : cmbTensionStrap1.SelectedIndex + 10); + var ng2 = (short)(cmbTensionStrap2.SelectedIndex == 0 ? 99 : cmbTensionStrap2.SelectedIndex + 10); + var ng3 = (short)(cmbTensionStrap3.SelectedIndex == 0 ? 99 : cmbTensionStrap3.SelectedIndex + 10); + + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置NG拉带1,W245[值:{ng1}-档位:{cmbTensionStrap1.Text.Trim()}]", LogAddtype.local, Logtype.Message); + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置NG拉带2,W246[值:{ng2}-档位:{cmbTensionStrap2.Text.Trim()}]", LogAddtype.local, Logtype.Message); + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置NG拉带3,W247[值:{ng3}-档位:{cmbTensionStrap3.Text.Trim()}]", LogAddtype.local, Logtype.Message); + if ((short)Grading == 1) + { + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}],设置W248[值:{(short)Grading}-启用分档模式]", LogAddtype.local, Logtype.Message); + } + else + { + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}],设置W248[值:{(short)Grading}-关闭分档模式]", LogAddtype.local, Logtype.Message); + } + MessageBox.Show("MES参数保存成功!", "系统提示"); + this.DialogResult = DialogResult.OK; + } + + private void btnExit_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void cmbTensionStrap1_DropDownClosed(object sender, EventArgs e) + { + if (cmbTensionStrap1.SelectedIndex != cmbTensionStrap1.Items.Count - 1) + cmbTensionStrap2.SelectedIndex = cmbTensionStrap2.Items.Count - 1; + } + + private void cmbTensionStrap2_DropDownClosed(object sender, EventArgs e) + { + if (cmbTensionStrap2.SelectedIndex != cmbTensionStrap2.Items.Count - 1) + cmbTensionStrap3.SelectedIndex = cmbTensionStrap3.Items.Count - 1; + } + + private void cmbTensionStrap3_DropDownClosed(object sender, EventArgs e) + { + if (cmbTensionStrap3.SelectedIndex != cmbTensionStrap3.Items.Count - 1) + cmbTensionStrap1.SelectedIndex = cmbTensionStrap1.Items.Count - 1; + } + + private void chkStartNGFL_Click(object sender, EventArgs e) + { + if (chkStartNGFL.Checked) + { + cmbTensionStrap1.SelectedIndex = 0; + cmbTensionStrap2.SelectedIndex = 0; + cmbTensionStrap3.SelectedIndex = 0; + } + } + } +} diff --git a/JY.Inspection/Frm/FormMesGradingSet.resx b/JY.Inspection/Frm/FormMesGradingSet.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/JY.Inspection/Frm/FormMesGradingSet.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmAbnormalVoice.Designer.cs b/JY.Inspection/Frm/FrmAbnormalVoice.Designer.cs new file mode 100644 index 0000000..26a7c48 --- /dev/null +++ b/JY.Inspection/Frm/FrmAbnormalVoice.Designer.cs @@ -0,0 +1,225 @@ + +namespace JY.Inspection.Frm +{ + partial class FrmAbnormalVoice + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.grdData = new System.Windows.Forms.DataGridView(); + this.metroLabel7 = new MetroFramework.Controls.MetroLabel(); + this.btnEdit = new MetroFramework.Controls.MetroButton(); + this.txtCode = new MetroFramework.Controls.MetroTextBox(); + this.btnDelete = new MetroFramework.Controls.MetroButton(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.btnAdd = new MetroFramework.Controls.MetroButton(); + this.txtRemark = new MetroFramework.Controls.MetroTextBox(); + this.groupBox3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.grdData)).BeginInit(); + this.SuspendLayout(); + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.grdData); + this.groupBox3.Controls.Add(this.metroLabel7); + this.groupBox3.Controls.Add(this.btnEdit); + this.groupBox3.Controls.Add(this.txtCode); + this.groupBox3.Controls.Add(this.btnDelete); + this.groupBox3.Controls.Add(this.metroLabel1); + this.groupBox3.Controls.Add(this.btnAdd); + this.groupBox3.Controls.Add(this.txtRemark); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(20, 30); + this.groupBox3.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.groupBox3.Size = new System.Drawing.Size(1039, 543); + this.groupBox3.TabIndex = 21; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "异常播报设置"; + // + // grdData + // + this.grdData.AllowUserToAddRows = false; + this.grdData.AllowUserToDeleteRows = false; + this.grdData.BackgroundColor = System.Drawing.Color.White; + this.grdData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.grdData.Location = new System.Drawing.Point(9, 25); + this.grdData.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.grdData.Name = "grdData"; + this.grdData.ReadOnly = true; + this.grdData.RowHeadersWidth = 51; + this.grdData.RowTemplate.Height = 23; + this.grdData.Size = new System.Drawing.Size(679, 500); + this.grdData.TabIndex = 5; + // + // metroLabel7 + // + this.metroLabel7.AutoSize = true; + this.metroLabel7.Location = new System.Drawing.Point(696, 40); + this.metroLabel7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.metroLabel7.Name = "metroLabel7"; + this.metroLabel7.Size = new System.Drawing.Size(84, 20); + this.metroLabel7.TabIndex = 16; + this.metroLabel7.Text = "工位编码:"; + // + // btnEdit + // + this.btnEdit.Location = new System.Drawing.Point(813, 231); + this.btnEdit.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.btnEdit.Name = "btnEdit"; + this.btnEdit.Size = new System.Drawing.Size(100, 28); + this.btnEdit.TabIndex = 4; + this.btnEdit.Text = "编 辑"; + this.btnEdit.UseSelectable = true; + // + // txtCode + // + // + // + // + this.txtCode.CustomButton.Image = null; + this.txtCode.CustomButton.Location = new System.Drawing.Point(192, 2); + this.txtCode.CustomButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.txtCode.CustomButton.Name = ""; + this.txtCode.CustomButton.Size = new System.Drawing.Size(23, 23); + this.txtCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtCode.CustomButton.TabIndex = 1; + this.txtCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtCode.CustomButton.UseSelectable = true; + this.txtCode.CustomButton.Visible = false; + this.txtCode.Lines = new string[0]; + this.txtCode.Location = new System.Drawing.Point(803, 36); + this.txtCode.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.txtCode.MaxLength = 10; + this.txtCode.Name = "txtCode"; + this.txtCode.PasswordChar = '\0'; + this.txtCode.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtCode.SelectedText = ""; + this.txtCode.SelectionLength = 0; + this.txtCode.SelectionStart = 0; + this.txtCode.ShortcutsEnabled = true; + this.txtCode.Size = new System.Drawing.Size(218, 28); + this.txtCode.TabIndex = 1; + this.txtCode.UseSelectable = true; + this.txtCode.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtCode.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // btnDelete + // + this.btnDelete.Location = new System.Drawing.Point(921, 231); + this.btnDelete.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.btnDelete.Name = "btnDelete"; + this.btnDelete.Size = new System.Drawing.Size(100, 28); + this.btnDelete.TabIndex = 5; + this.btnDelete.Text = "删 除"; + this.btnDelete.UseSelectable = true; + // + // metroLabel1 + // + this.metroLabel1.AutoSize = true; + this.metroLabel1.Location = new System.Drawing.Point(696, 76); + this.metroLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Size = new System.Drawing.Size(84, 20); + this.metroLabel1.TabIndex = 4; + this.metroLabel1.Text = "播报内容:"; + // + // btnAdd + // + this.btnAdd.Location = new System.Drawing.Point(706, 231); + this.btnAdd.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.btnAdd.Name = "btnAdd"; + this.btnAdd.Size = new System.Drawing.Size(100, 28); + this.btnAdd.TabIndex = 3; + this.btnAdd.Text = "添 加"; + this.btnAdd.UseSelectable = true; + // + // txtRemark + // + // + // + // + this.txtRemark.CustomButton.Image = null; + this.txtRemark.CustomButton.Location = new System.Drawing.Point(80, 1); + this.txtRemark.CustomButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.txtRemark.CustomButton.Name = ""; + this.txtRemark.CustomButton.Size = new System.Drawing.Size(137, 137); + this.txtRemark.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtRemark.CustomButton.TabIndex = 1; + this.txtRemark.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtRemark.CustomButton.UseSelectable = true; + this.txtRemark.CustomButton.Visible = false; + this.txtRemark.Lines = new string[0]; + this.txtRemark.Location = new System.Drawing.Point(803, 76); + this.txtRemark.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.txtRemark.MaxLength = 100; + this.txtRemark.Multiline = true; + this.txtRemark.Name = "txtRemark"; + this.txtRemark.PasswordChar = '\0'; + this.txtRemark.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtRemark.SelectedText = ""; + this.txtRemark.SelectionLength = 0; + this.txtRemark.SelectionStart = 0; + this.txtRemark.ShortcutsEnabled = true; + this.txtRemark.Size = new System.Drawing.Size(218, 139); + this.txtRemark.TabIndex = 2; + this.txtRemark.UseSelectable = true; + this.txtRemark.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtRemark.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // FrmAbnormalVoice + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1079, 593); + this.Controls.Add(this.groupBox3); + this.DisplayHeader = false; + this.MaximizeBox = false; + this.Name = "FrmAbnormalVoice"; + this.Padding = new System.Windows.Forms.Padding(20, 30, 20, 20); + this.Resizable = false; + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.grdData)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.DataGridView grdData; + private MetroFramework.Controls.MetroLabel metroLabel7; + private MetroFramework.Controls.MetroButton btnEdit; + private MetroFramework.Controls.MetroTextBox txtCode; + private MetroFramework.Controls.MetroButton btnDelete; + private MetroFramework.Controls.MetroLabel metroLabel1; + private MetroFramework.Controls.MetroButton btnAdd; + private MetroFramework.Controls.MetroTextBox txtRemark; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmAbnormalVoice.cs b/JY.Inspection/Frm/FrmAbnormalVoice.cs new file mode 100644 index 0000000..dd74ca0 --- /dev/null +++ b/JY.Inspection/Frm/FrmAbnormalVoice.cs @@ -0,0 +1,214 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Globalization; +using System.Linq; +using System.Speech.Synthesis; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using JY.DAL; +using JY.Model; + +namespace JY.Inspection.Frm +{ + public partial class FrmAbnormalVoice : MetroFramework.Forms.MetroForm + { + private DataTable _dt; + private SpeechSynthesizer _speech; + public FrmAbnormalVoice() + { + InitializeComponent(); + this.Load += FrmAbnormalVoice_Load; + this.FormClosing += FrmAbnormalVoice_FormClosing; + + btnAdd.Click += BtnAdd_Click; + btnEdit.Click += BtnEdit_Click; + btnDelete.Click += BtnDelete_Click; + grdData.SelectionChanged += GrdData_SelectionChanged; + grdData.CellContentClick += GrdData_CellContentClick; + } + + private void FrmAbnormalVoice_Load(object sender, EventArgs e) + { + try + { + BindGridStyle(); + LoadData(); + + _speech = new SpeechSynthesizer(); + _speech.Volume = 100; //音量 + CultureInfo keyboardCulture = InputLanguage.CurrentInputLanguage.Culture; + InstalledVoice neededVoice = _speech.GetInstalledVoices(keyboardCulture).FirstOrDefault(); + if (neededVoice != null) + { + _speech.SelectVoice(neededVoice.VoiceInfo.Name); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + private void LoadData() + { + _dt = SqlHelper.QueryTable("select *,'播放' as Operation from tb_AbnormalVoice"); + grdData.DataSource = _dt.DefaultView; + } + + private void BtnAdd_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(txtCode.Text.Trim())) + { + txtCode.Focus(); + MessageBox.Show("请输入工位编码"); + return; + } + if (string.IsNullOrEmpty(txtRemark.Text.Trim())) + { + txtRemark.Focus(); + MessageBox.Show("请输入播报内容"); + return; + } + try + { + string sql = $"insert tb_AbnormalVoice(Code,Remark) values('{txtCode.Text.Trim()}','{txtRemark.Text.Trim()}')"; + int result = SqlHelper.Execute(sql); + if (result > 0) + { + LoadData(); + MessageBox.Show("保存成功!"); + } + else + { + MessageBox.Show("保存失败!"); + } + } + catch (Exception ex) + { + MessageBox.Show("保存失败:" + ex.Message); + } + } + + private void BtnEdit_Click(object sender, EventArgs e) + { + try + { + string sql = $"update tb_AbnormalVoice set Code='{txtCode.Text.Trim()}',Remark='{txtRemark.Text.Trim()}' where id={grdData.CurrentRow.Cells["ID"].Value}"; + int result = SqlHelper.Execute(sql); + if (result > 0) + { + LoadData(); + MessageBox.Show("编辑成功!"); + } + else + { + MessageBox.Show("编辑失败!"); + } + } + catch (Exception ex) + { + MessageBox.Show("编辑失败:" + ex.Message); + } + } + + private void BtnDelete_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确认删除当前选中记录吗?", "提示", MessageBoxButtons.YesNo) == DialogResult.No) + { + return; + } + try + { + string sql = $"delete tb_AbnormalVoice where id={grdData.CurrentRow.Cells["ID"].Value}"; + int result = SqlHelper.Execute(sql); + if (result > 0) + { + LoadData(); + MessageBox.Show("删除成功!"); + } + else + { + MessageBox.Show("删除失败!"); + } + } + catch (Exception ex) + { + MessageBox.Show("删除失败:" + ex.Message); + } + } + private void GrdData_SelectionChanged(object sender, EventArgs e) + { + DataGridViewRow row = grdData.CurrentRow; + txtCode.Text = row.Cells["Code"].Value.ToString(); + txtRemark.Text = row.Cells["Remark"].Value.ToString(); + } + + private void GrdData_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex == 3) + { + DataGridViewRow row = grdData.CurrentRow; + if (_speech != null) + { + _speech.SpeakAsync(row.Cells["Remark"].Value.ToString()); + } + } + } + private void FrmAbnormalVoice_FormClosing(object sender, FormClosingEventArgs e) + { + if (_speech != null) + { + if (_speech.State == SynthesizerState.Speaking) + { + _speech.Pause(); + _speech.Dispose(); + } + } + } + + private void BindGridStyle() + { + grdData.AlternatingRowsDefaultCellStyle.BackColor = System.Drawing.Color.WhiteSmoke;//FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192))))); + //grdData.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + grdData.MultiSelect = false; + grdData.AllowUserToAddRows = false; + grdData.AutoGenerateColumns = false; + + DataGridViewTextBoxColumn col1 = new DataGridViewTextBoxColumn(); + col1.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; + col1.Name = "ID"; + col1.DataPropertyName = col1.Name; + col1.HeaderText = "ID"; + col1.Width = 50; + grdData.Columns.Add(col1); + + DataGridViewTextBoxColumn col2 = new DataGridViewTextBoxColumn(); + col2.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; + col2.Name = "Code"; + col2.DataPropertyName = col2.Name; + col2.HeaderText = "工位编码"; + col2.Width = 90; + grdData.Columns.Add(col2); + + DataGridViewTextBoxColumn col3 = new DataGridViewTextBoxColumn(); + col3.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft; + col3.Name = "Remark"; + col3.DataPropertyName = col3.Name; + col3.HeaderText = "播报内容"; + col3.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; + //col2.Width = 200; + grdData.Columns.Add(col3); + + DataGridViewLinkColumn col7 = new DataGridViewLinkColumn(); + col7.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; + col7.Name = "Operation"; + col7.DataPropertyName = col7.Name; + col7.HeaderText = ""; + col7.Width = 60; + grdData.Columns.Add(col7); + } + } +} diff --git a/JY.Inspection/Frm/FrmAbnormalVoice.resx b/JY.Inspection/Frm/FrmAbnormalVoice.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/JY.Inspection/Frm/FrmAbnormalVoice.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmAlamQuery.cs b/JY.Inspection/Frm/FrmAlamQuery.cs new file mode 100644 index 0000000..c98d89d --- /dev/null +++ b/JY.Inspection/Frm/FrmAlamQuery.cs @@ -0,0 +1,110 @@ +using JY.DAL; +using JY.Model; +using MetroFramework.Forms; +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 JY.Inspection.Frm +{ + public partial class FrmAlamQuery : MetroForm + { + public delegate void myDelegate(List dtt); + public delegate void PDelegate(); + Thread tSo; + + /// + /// 数据库访问接口 + /// + private IDbHelper dbHelper = new OpSqlDataBase(); + public FrmAlamQuery() + { + InitializeComponent(); + } + + private void FrmAlamQuery_Load(object sender, EventArgs e) + { + + } + /// + /// 查询报警日志 + /// + /// + /// + private void btnSelect_Click(object sender, EventArgs e) + { + //string strDate1 = dtStartTime.Value.ToString("yyyy-MM-dd HH:mm") + ":01"; + //string strDate2 = dtEndTime.Value.ToString("yyyy-MM-dd HH:mm") + ":59"; + + //var list = dbHelper.GetAlarmData(strDate1, strDate2); + + //if (list == null || list.Count == 0) + //{ + // MessageBox.Show("此时间段无数据或无此条码数据", "系统提示"); + // lblSelectStures.BeginInvoke(new PDelegate(bb)); + // return; + //} + //else + //{ + // dgvData.DataSource = list; + //} + //以下线程方法 + try + { + tSo = new Thread(new ThreadStart(ThreadWork)); + tSo.IsBackground = true; + tSo.Start(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message.ToString() + ",数据查询失败", "查询提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + } + + + private void ThreadWork() + { + lblSelectStures.BeginInvoke(new PDelegate(aa)); + string strDate1 = dtStartTime.Value.ToString("yyyy-MM-dd HH:mm") + ":01"; + string strDate2 = dtEndTime.Value.ToString("yyyy-MM-dd HH:mm") + ":59"; + if (dtEndTime.Value.Year != dtStartTime.Value.Year) + { + MessageBox.Show("请选择日期必须在同一年份内!"); + lblSelectStures.BeginInvoke(new PDelegate(bb)); + return; + } + + var result = dbHelper.GetAlarmData(strDate1, strDate2); + if (result == null || result.Count == 0) + { + MessageBox.Show("此时间段无数据或无此条码数据", "系统提示"); + lblSelectStures.BeginInvoke(new PDelegate(bb)); + return; + } + this.dgvData.BeginInvoke(new myDelegate(FillData), new object[] { result });//异步调用(来填充) + lblSelectStures.BeginInvoke(new PDelegate(bb)); + } + + private void FillData(List dt ) + { + this.dgvData.DataSource = dt; + } + + private void aa() + { + this.lblSelectStures.Text = "正在查询数据..."; + } + private void bb() + { + this.lblSelectStures.Text = "查询结束"; + } + } +} diff --git a/JY.Inspection/Frm/FrmAlamQuery.designer.cs b/JY.Inspection/Frm/FrmAlamQuery.designer.cs new file mode 100644 index 0000000..6ed442f --- /dev/null +++ b/JY.Inspection/Frm/FrmAlamQuery.designer.cs @@ -0,0 +1,319 @@ +namespace JY.Inspection.Frm +{ + partial class FrmAlamQuery + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmAlamQuery)); + this.btnSelect = new MetroFramework.Controls.MetroButton(); + this.metroLabel2 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.lblSelectStures = new System.Windows.Forms.Label(); + this.dtEndTime = new System.Windows.Forms.DateTimePicker(); + this.dtStartTime = new System.Windows.Forms.DateTimePicker(); + this.dgvData = new MetroFramework.Controls.MetroGrid(); + this.AlarmType = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.AlarmGuid = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.PLCAdress = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.AlarmContent = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.AlarmCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.AlarmDesc = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.AlarmState = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.AlarmTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.BurningTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Flag = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dgvData)).BeginInit(); + this.SuspendLayout(); + // + // btnSelect + // + this.btnSelect.Location = new System.Drawing.Point(984, 38); + this.btnSelect.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnSelect.Name = "btnSelect"; + this.btnSelect.Size = new System.Drawing.Size(100, 29); + this.btnSelect.TabIndex = 12; + this.btnSelect.Text = "查询"; + this.btnSelect.UseSelectable = true; + this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click); + // + // metroLabel2 + // + this.metroLabel2.AutoSize = true; + this.metroLabel2.Location = new System.Drawing.Point(688, 40); + this.metroLabel2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.metroLabel2.Name = "metroLabel2"; + this.metroLabel2.Size = new System.Drawing.Size(19, 20); + this.metroLabel2.TabIndex = 11; + this.metroLabel2.Text = "~"; + // + // metroLabel1 + // + this.metroLabel1.AutoSize = true; + this.metroLabel1.Location = new System.Drawing.Point(353, 40); + this.metroLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Size = new System.Drawing.Size(84, 20); + this.metroLabel1.TabIndex = 10; + this.metroLabel1.Text = "查询时间:"; + // + // lblSelectStures + // + this.lblSelectStures.AutoSize = true; + this.lblSelectStures.Location = new System.Drawing.Point(1271, 40); + this.lblSelectStures.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblSelectStures.Name = "lblSelectStures"; + this.lblSelectStures.Size = new System.Drawing.Size(0, 15); + this.lblSelectStures.TabIndex = 14; + // + // dtEndTime + // + this.dtEndTime.CustomFormat = "yyyy-MM-dd HH:mm:ss"; + this.dtEndTime.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dtEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtEndTime.Location = new System.Drawing.Point(720, 36); + this.dtEndTime.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.dtEndTime.Name = "dtEndTime"; + this.dtEndTime.Size = new System.Drawing.Size(233, 31); + this.dtEndTime.TabIndex = 19; + // + // dtStartTime + // + this.dtStartTime.CalendarForeColor = System.Drawing.SystemColors.ControlLight; + this.dtStartTime.CustomFormat = "yyyy-MM-dd HH:mm:ss"; + this.dtStartTime.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dtStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtStartTime.Location = new System.Drawing.Point(448, 36); + this.dtStartTime.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.dtStartTime.Name = "dtStartTime"; + this.dtStartTime.Size = new System.Drawing.Size(233, 31); + this.dtStartTime.TabIndex = 18; + // + // dgvData + // + this.dgvData.AllowUserToAddRows = false; + this.dgvData.AllowUserToDeleteRows = false; + this.dgvData.AllowUserToResizeRows = false; + this.dgvData.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.dgvData.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells; + this.dgvData.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvData.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dgvData.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dgvData.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.SkyBlue; + dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dgvData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.AlarmType, + this.AlarmGuid, + this.PLCAdress, + this.AlarmContent, + this.AlarmCode, + this.AlarmDesc, + this.AlarmState, + this.AlarmTime, + this.BurningTime, + this.Flag}); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(136)))), ((int)(((byte)(136)))), ((int)(((byte)(136))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Silver; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvData.DefaultCellStyle = dataGridViewCellStyle2; + this.dgvData.EnableHeadersVisualStyles = false; + this.dgvData.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + this.dgvData.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvData.Location = new System.Drawing.Point(7, 75); + this.dgvData.Margin = new System.Windows.Forms.Padding(4); + this.dgvData.Name = "dgvData"; + this.dgvData.ReadOnly = true; + this.dgvData.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvData.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; + this.dgvData.RowHeadersWidth = 51; + this.dgvData.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.dgvData.RowTemplate.Height = 23; + this.dgvData.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgvData.Size = new System.Drawing.Size(1479, 808); + this.dgvData.TabIndex = 20; + // + // AlarmType + // + this.AlarmType.DataPropertyName = "AlarmType"; + this.AlarmType.HeaderText = "报警类型"; + this.AlarmType.MinimumWidth = 6; + this.AlarmType.Name = "AlarmType"; + this.AlarmType.ReadOnly = true; + this.AlarmType.Width = 86; + // + // AlarmGuid + // + this.AlarmGuid.DataPropertyName = "AlarmGuid"; + this.AlarmGuid.HeaderText = "报警GUID"; + this.AlarmGuid.MinimumWidth = 6; + this.AlarmGuid.Name = "AlarmGuid"; + this.AlarmGuid.ReadOnly = true; + this.AlarmGuid.Width = 87; + // + // PLCAdress + // + this.PLCAdress.DataPropertyName = "PLCAdress"; + this.PLCAdress.HeaderText = "PLC报警地址"; + this.PLCAdress.MinimumWidth = 6; + this.PLCAdress.Name = "PLCAdress"; + this.PLCAdress.ReadOnly = true; + this.PLCAdress.Width = 107; + // + // AlarmContent + // + this.AlarmContent.DataPropertyName = "AlarmContent"; + this.AlarmContent.HeaderText = "报警内容"; + this.AlarmContent.MinimumWidth = 6; + this.AlarmContent.Name = "AlarmContent"; + this.AlarmContent.ReadOnly = true; + this.AlarmContent.Width = 86; + // + // AlarmCode + // + this.AlarmCode.DataPropertyName = "AlarmCode"; + this.AlarmCode.HeaderText = "报警代码"; + this.AlarmCode.MinimumWidth = 6; + this.AlarmCode.Name = "AlarmCode"; + this.AlarmCode.ReadOnly = true; + this.AlarmCode.Width = 86; + // + // AlarmDesc + // + this.AlarmDesc.DataPropertyName = "AlarmDesc"; + this.AlarmDesc.HeaderText = "报警说明"; + this.AlarmDesc.MinimumWidth = 6; + this.AlarmDesc.Name = "AlarmDesc"; + this.AlarmDesc.ReadOnly = true; + this.AlarmDesc.Visible = false; + this.AlarmDesc.Width = 82; + // + // AlarmState + // + this.AlarmState.DataPropertyName = "AlarmState"; + this.AlarmState.HeaderText = "报警状态"; + this.AlarmState.MinimumWidth = 6; + this.AlarmState.Name = "AlarmState"; + this.AlarmState.ReadOnly = true; + this.AlarmState.Visible = false; + this.AlarmState.Width = 82; + // + // AlarmTime + // + this.AlarmTime.DataPropertyName = "StartTime"; + this.AlarmTime.HeaderText = "报警开始时间"; + this.AlarmTime.MinimumWidth = 6; + this.AlarmTime.Name = "AlarmTime"; + this.AlarmTime.ReadOnly = true; + this.AlarmTime.Width = 112; + // + // BurningTime + // + this.BurningTime.DataPropertyName = "EndTime"; + this.BurningTime.HeaderText = "报警结束时间"; + this.BurningTime.MinimumWidth = 6; + this.BurningTime.Name = "BurningTime"; + this.BurningTime.ReadOnly = true; + this.BurningTime.Width = 112; + // + // Flag + // + this.Flag.DataPropertyName = "Flag"; + this.Flag.HeaderText = "更新状态"; + this.Flag.MinimumWidth = 6; + this.Flag.Name = "Flag"; + this.Flag.ReadOnly = true; + this.Flag.Visible = false; + this.Flag.Width = 64; + // + // FrmAlamQuery + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1492, 925); + this.Controls.Add(this.dgvData); + this.Controls.Add(this.dtEndTime); + this.Controls.Add(this.dtStartTime); + this.Controls.Add(this.lblSelectStures); + this.Controls.Add(this.btnSelect); + this.Controls.Add(this.metroLabel2); + this.Controls.Add(this.metroLabel1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Name = "FrmAlamQuery"; + this.Padding = new System.Windows.Forms.Padding(27, 75, 27, 25); + this.Text = "历史报警信息查询"; + this.Load += new System.EventHandler(this.FrmAlamQuery_Load); + ((System.ComponentModel.ISupportInitialize)(this.dgvData)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private MetroFramework.Controls.MetroButton btnSelect; + private MetroFramework.Controls.MetroLabel metroLabel2; + private MetroFramework.Controls.MetroLabel metroLabel1; + private System.Windows.Forms.Label lblSelectStures; + private System.Windows.Forms.DateTimePicker dtEndTime; + private System.Windows.Forms.DateTimePicker dtStartTime; + private MetroFramework.Controls.MetroGrid dgvData; + private System.Windows.Forms.DataGridViewTextBoxColumn AlarmType; + private System.Windows.Forms.DataGridViewTextBoxColumn AlarmGuid; + private System.Windows.Forms.DataGridViewTextBoxColumn PLCAdress; + private System.Windows.Forms.DataGridViewTextBoxColumn AlarmContent; + private System.Windows.Forms.DataGridViewTextBoxColumn AlarmCode; + private System.Windows.Forms.DataGridViewTextBoxColumn AlarmDesc; + private System.Windows.Forms.DataGridViewTextBoxColumn AlarmState; + private System.Windows.Forms.DataGridViewTextBoxColumn AlarmTime; + private System.Windows.Forms.DataGridViewTextBoxColumn BurningTime; + private System.Windows.Forms.DataGridViewTextBoxColumn Flag; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmAlamQuery.resx b/JY.Inspection/Frm/FrmAlamQuery.resx new file mode 100644 index 0000000..4dff0fd --- /dev/null +++ b/JY.Inspection/Frm/FrmAlamQuery.resx @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWU1QAFpNUABZTVASWU1QH1lNUB9ZTVAfWU1QH1lN + UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUBJaTVAAWU1QAFlN + UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXE5OAFlNUABZTVAFWU1QaFlLUM1YS0/gWEtQ4FhL + UOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS0/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--git a/JY.Inspection/Frm/FrmAlert.Designer.cs b/JY.Inspection/Frm/FrmAlert.Designer.cs new file mode 100644 index 0000000..993d169 --- /dev/null +++ b/JY.Inspection/Frm/FrmAlert.Designer.cs @@ -0,0 +1,101 @@ + +namespace JY.Inspection +{ + partial class FrmAlert + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.lblMsg = new System.Windows.Forms.Label(); + this.pictureBox2 = new System.Windows.Forms.PictureBox(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + + // + // lblMsg + // + this.lblMsg.AutoSize = true; + this.lblMsg.Font = new System.Drawing.Font("黑体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblMsg.ForeColor = System.Drawing.Color.White; + this.lblMsg.Location = new System.Drawing.Point(79, 37); + this.lblMsg.Name = "lblMsg"; + this.lblMsg.Size = new System.Drawing.Size(91, 14); + this.lblMsg.TabIndex = 2; + this.lblMsg.Text = "Message Text"; + // + // pictureBox2 + // + this.pictureBox2.Image = global::JY.Inspection.Properties.Resources.白色X32; + this.pictureBox2.Location = new System.Drawing.Point(276, -1); + this.pictureBox2.Name = "pictureBox2"; + this.pictureBox2.Size = new System.Drawing.Size(33, 32); + this.pictureBox2.TabIndex = 1; + this.pictureBox2.TabStop = false; + // + // pictureBox1 + // + this.pictureBox1.Image = global::JY.Inspection.Properties.Resources.warning; + this.pictureBox1.Location = new System.Drawing.Point(12, 28); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(32, 32); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 0; + this.pictureBox1.TabStop = false; + // + // FrmAlert + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215))))); + this.ClientSize = new System.Drawing.Size(310, 89); + this.Controls.Add(this.lblMsg); + this.Controls.Add(this.pictureBox2); + this.Controls.Add(this.pictureBox1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "FrmAlert"; + this.ShowIcon = false; + this.Text = "信息提示"; + this.TopMost = true; + + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.PictureBox pictureBox2; + private System.Windows.Forms.Label lblMsg; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmAlert.cs b/JY.Inspection/Frm/FrmAlert.cs new file mode 100644 index 0000000..b741f64 --- /dev/null +++ b/JY.Inspection/Frm/FrmAlert.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JY.Inspection +{ + public partial class FrmAlert : Form + { + + public FrmAlert() + { + InitializeComponent(); + } + + + private FrmAlert.enmAction action; //当前窗体状态变量 + private int x, y; //显示的坐标变量 + //定义窗体状态枚举 + private enum enmAction + { + wait, + start, + close + } + //定义弹窗类型枚举 + public enum enmType + { + Success, + Warning, + Error, + Info + } + //外部访问该函数实现窗体的实现 传入显示信息,弹窗类型 + public void ShowAlert(string msg, enmType type) + { + this.Opacity = 0.0; + this.StartPosition = FormStartPosition.Manual; + string fname; + + for (int i = 1; i < 10; i++) + { + fname = "alert" + i.ToString(); + FrmAlert frm = (FrmAlert)Application.OpenForms[fname]; + + if (frm == null) + { + this.Name = fname; + this.x = Screen.PrimaryScreen.WorkingArea.Width - this.Width + 15; + this.y = Screen.PrimaryScreen.WorkingArea.Height - this.Height * i - 5 * i; + this.Location = new Point(this.x, this.y); + + break; + + } + + } + this.x = Screen.PrimaryScreen.WorkingArea.Width - this.Width - 5; + + switch (type) + { + case enmType.Success: + this.pictureBox1.Image = JY.Inspection.Properties.Resources.success; + this.BackColor = Color.SeaGreen; + break; + case enmType.Error: + this.pictureBox1.Image = JY.Inspection.Properties.Resources.error; + this.BackColor = Color.DarkRed; + break; + case enmType.Info: + this.pictureBox1.Image = JY.Inspection.Properties.Resources.info; + this.BackColor = Color.RoyalBlue; + break; + case enmType.Warning: + this.pictureBox1.Image = JY.Inspection.Properties.Resources.warning; + this.BackColor = Color.DarkOrange; + break; + } + + + this.lblMsg.Text = msg; + + this.Show(); + //this.action = enmAction.start; + this.timer1.Interval = 2000; + this.timer1.Start(); + } + + + + + + //关闭窗体调用 + public void ShowClose() + { + timer1.Interval = 1; + action = enmAction.close; + } + + + } +} diff --git a/JY.Inspection/Frm/FrmAlert.resx b/JY.Inspection/Frm/FrmAlert.resx new file mode 100644 index 0000000..1f666f2 --- /dev/null +++ b/JY.Inspection/Frm/FrmAlert.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmCCDQuery.cs b/JY.Inspection/Frm/FrmCCDQuery.cs new file mode 100644 index 0000000..c8121fe --- /dev/null +++ b/JY.Inspection/Frm/FrmCCDQuery.cs @@ -0,0 +1,153 @@ +using JY.DAL; +using JY.Model; +using JY.Utility; +using MetroFramework.Forms; +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 JY.Inspection.Frm +{ + public partial class FrmCCDQuery : MetroForm + { + public delegate void myDelegate(DataTable dt); + public delegate void PDelegate(); + Thread tSo; + string strWorkerNum; + private string selectDate = ""; + private DataTable dataTable = null; + /// + /// 数据库访问接口 + /// + private IDbHelper dbHelper = new OpSqlDataBase(); + public FrmCCDQuery() + { + InitializeComponent(); + + } + + private void FrmAlamQuery_Load(object sender, EventArgs e) + { + dtStartTime.Value = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 08:00")); + dtEndTime.Value = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 23:59")); + } + /// + /// 查询报警日志 + /// + /// + /// + private void btnSelect_Click(object sender, EventArgs e) + { + + + //if (txtOrderNum.Text == "") + //{ + // MessageBox.Show("工单号未输入","系统提示"); + // return; + //} + + strWorkerNum = txtOrderNum.Text.Trim(); + try + { + tSo = new Thread(new ThreadStart(ThreadWork)); + tSo.IsBackground = true; + tSo.Start(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message.ToString() + ",数据查询失败", "查询提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + } + + + private void ThreadWork() + { + lblSelectStures.BeginInvoke(new PDelegate(aa)); + string strDate1 = dtStartTime.Value.ToString("yyyy-MM-dd ") + "00:00:01"; + string strDate2 = dtEndTime.Value.ToString("yyyy-MM-dd ") + "23:59:59"; + selectDate = dtStartTime.Value.ToString("yyyy-MM-dd "); + + if (dtEndTime.Value.Year != dtStartTime.Value.Year) + { + MessageBox.Show("请选择日期必须在同一年份内!"); + lblSelectStures.BeginInvoke(new PDelegate(bb)); + return; + } + + var result = dbHelper.GetCCDData(strWorkerNum, selectDate, selectDate); + if (result == null) + { + MessageBox.Show("此时间段无数据或无此条码数据", "系统提示"); + lblSelectStures.BeginInvoke(new PDelegate(bb)); + return; + } + this.dgvData.BeginInvoke(new myDelegate(FillData), new object[] { result });//异步调用(来填充) + lblSelectStures.BeginInvoke(new PDelegate(bb)); + } + + private void FillData(DataTable dt) + { + dataTable = dt; + this.dgvData.DataSource = dt.DefaultView; + } + + private void aa() + { + this.lblSelectStures.Text = "正在查询数据..."; + } + private void bb() + { + this.lblSelectStures.Text = "查询结束"; + } + + /// + /// 导出数据 + /// + /// + /// + private void btnExcel_Click(object sender, EventArgs e) + { + try + { + string strErr = ""; + DataTable dt = dataTable; + int b = OpenOfficeXML.ExportExcel(dt, selectDate, ref strErr); + switch (b) + { + case 0: + MessageBox.Show(strErr, "系统错误"); + break; + case 1: + MessageBox.Show(strErr, "系统错误"); + break; + case 2: + MessageBox.Show(strErr, "系统错误"); + break; + case 3: + MessageBox.Show(strErr, "系统错误"); + break; + case 4: + if (MessageBox.Show("导出成功,是否打开文件?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes) + { + System.Diagnostics.Process.Start(strErr); + } + break; + } + } + catch (Exception) + { + + throw; + } + + } + } +} diff --git a/JY.Inspection/Frm/FrmCCDQuery.designer.cs b/JY.Inspection/Frm/FrmCCDQuery.designer.cs new file mode 100644 index 0000000..d0176ae --- /dev/null +++ b/JY.Inspection/Frm/FrmCCDQuery.designer.cs @@ -0,0 +1,272 @@ +namespace JY.Inspection.Frm +{ + partial class FrmCCDQuery + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmCCDQuery)); + this.btnSelect = new MetroFramework.Controls.MetroButton(); + this.metroLabel2 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.dtEndTime = new MetroFramework.Controls.MetroDateTime(); + this.dtStartTime = new MetroFramework.Controls.MetroDateTime(); + this.lblSelectStures = new System.Windows.Forms.Label(); + this.dgvData = new MetroFramework.Controls.MetroGrid(); + this.txtOrderNum = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel8 = new MetroFramework.Controls.MetroLabel(); + this.btnExcel = new MetroFramework.Controls.MetroButton(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + ((System.ComponentModel.ISupportInitialize)(this.dgvData)).BeginInit(); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // btnSelect + // + this.btnSelect.Location = new System.Drawing.Point(578, 26); + this.btnSelect.Name = "btnSelect"; + this.btnSelect.Size = new System.Drawing.Size(75, 23); + this.btnSelect.TabIndex = 12; + this.btnSelect.Text = "查询"; + this.btnSelect.UseSelectable = true; + this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click); + // + // metroLabel2 + // + this.metroLabel2.AutoSize = true; + this.metroLabel2.Location = new System.Drawing.Point(1062, 31); + this.metroLabel2.Name = "metroLabel2"; + this.metroLabel2.Size = new System.Drawing.Size(18, 19); + this.metroLabel2.TabIndex = 11; + this.metroLabel2.Text = "~"; + this.metroLabel2.Visible = false; + // + // metroLabel1 + // + this.metroLabel1.AutoSize = true; + this.metroLabel1.Location = new System.Drawing.Point(928, 37); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Size = new System.Drawing.Size(79, 19); + this.metroLabel1.TabIndex = 10; + this.metroLabel1.Text = "查询时间:"; + this.metroLabel1.Visible = false; + // + // dtEndTime + // + this.dtEndTime.CustomFormat = "yyyy-MM-dd"; + this.dtEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtEndTime.Location = new System.Drawing.Point(1086, 26); + this.dtEndTime.MinimumSize = new System.Drawing.Size(4, 29); + this.dtEndTime.Name = "dtEndTime"; + this.dtEndTime.Size = new System.Drawing.Size(106, 29); + this.dtEndTime.TabIndex = 9; + this.dtEndTime.Value = new System.DateTime(2022, 3, 5, 0, 0, 0, 0); + this.dtEndTime.Visible = false; + // + // dtStartTime + // + this.dtStartTime.CustomFormat = "yyyy-MM-dd"; + this.dtStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtStartTime.Location = new System.Drawing.Point(1008, 32); + this.dtStartTime.MinimumSize = new System.Drawing.Size(4, 29); + this.dtStartTime.Name = "dtStartTime"; + this.dtStartTime.Size = new System.Drawing.Size(104, 29); + this.dtStartTime.TabIndex = 8; + this.dtStartTime.Value = new System.DateTime(2022, 3, 5, 0, 0, 0, 0); + this.dtStartTime.Visible = false; + // + // lblSelectStures + // + this.lblSelectStures.AutoSize = true; + this.lblSelectStures.Location = new System.Drawing.Point(833, 32); + this.lblSelectStures.Name = "lblSelectStures"; + this.lblSelectStures.Size = new System.Drawing.Size(0, 12); + this.lblSelectStures.TabIndex = 14; + // + // dgvData + // + this.dgvData.AllowUserToAddRows = false; + this.dgvData.AllowUserToDeleteRows = false; + this.dgvData.AllowUserToResizeRows = false; + this.dgvData.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvData.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dgvData.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dgvData.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.Gold; + dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dgvData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvData.DefaultCellStyle = dataGridViewCellStyle2; + this.dgvData.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvData.EnableHeadersVisualStyles = false; + this.dgvData.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + this.dgvData.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvData.Location = new System.Drawing.Point(3, 3); + this.dgvData.Name = "dgvData"; + this.dgvData.ReadOnly = true; + this.dgvData.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvData.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; + this.dgvData.RowHeadersVisible = false; + this.dgvData.RowHeadersWidth = 51; + this.dgvData.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.dgvData.RowTemplate.Height = 23; + this.dgvData.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgvData.Size = new System.Drawing.Size(1371, 174); + this.dgvData.TabIndex = 15; + // + // txtOrderNum + // + // + // + // + this.txtOrderNum.CustomButton.Image = null; + this.txtOrderNum.CustomButton.Location = new System.Drawing.Point(130, 1); + this.txtOrderNum.CustomButton.Name = ""; + this.txtOrderNum.CustomButton.Size = new System.Drawing.Size(21, 21); + this.txtOrderNum.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtOrderNum.CustomButton.TabIndex = 1; + this.txtOrderNum.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtOrderNum.CustomButton.UseSelectable = true; + this.txtOrderNum.CustomButton.Visible = false; + this.txtOrderNum.FontSize = MetroFramework.MetroTextBoxSize.Medium; + this.txtOrderNum.Lines = new string[0]; + this.txtOrderNum.Location = new System.Drawing.Point(378, 29); + this.txtOrderNum.MaxLength = 32767; + this.txtOrderNum.Name = "txtOrderNum"; + this.txtOrderNum.PasswordChar = '\0'; + this.txtOrderNum.PromptText = "输入要查询的工单"; + this.txtOrderNum.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtOrderNum.SelectedText = ""; + this.txtOrderNum.SelectionLength = 0; + this.txtOrderNum.SelectionStart = 0; + this.txtOrderNum.ShortcutsEnabled = true; + this.txtOrderNum.Size = new System.Drawing.Size(152, 23); + this.txtOrderNum.TabIndex = 16; + this.txtOrderNum.UseSelectable = true; + this.txtOrderNum.WaterMark = "输入要查询的工单"; + this.txtOrderNum.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtOrderNum.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel8 + // + this.metroLabel8.AutoSize = true; + this.metroLabel8.Location = new System.Drawing.Point(331, 30); + this.metroLabel8.Name = "metroLabel8"; + this.metroLabel8.Size = new System.Drawing.Size(51, 19); + this.metroLabel8.TabIndex = 17; + this.metroLabel8.Text = "工单:"; + // + // btnExcel + // + this.btnExcel.Location = new System.Drawing.Point(695, 26); + this.btnExcel.Name = "btnExcel"; + this.btnExcel.Size = new System.Drawing.Size(75, 23); + this.btnExcel.TabIndex = 18; + this.btnExcel.Text = "导出"; + this.btnExcel.UseSelectable = true; + this.btnExcel.Click += new System.EventHandler(this.btnExcel_Click); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Controls.Add(this.dgvData, 0, 0); + this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 72); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.45455F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 74.54546F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1377, 708); + this.tableLayoutPanel1.TabIndex = 19; + // + // FrmCCDQuery + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1386, 788); + this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.lblSelectStures); + this.Controls.Add(this.btnExcel); + this.Controls.Add(this.txtOrderNum); + this.Controls.Add(this.metroLabel8); + this.Controls.Add(this.btnSelect); + this.Controls.Add(this.metroLabel2); + this.Controls.Add(this.metroLabel1); + this.Controls.Add(this.dtEndTime); + this.Controls.Add(this.dtStartTime); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "FrmCCDQuery"; + this.Resizable = false; + this.ShadowType = MetroFramework.Forms.MetroFormShadowType.SystemShadow; + this.Text = "CCD统计数据查询"; + this.Load += new System.EventHandler(this.FrmAlamQuery_Load); + ((System.ComponentModel.ISupportInitialize)(this.dgvData)).EndInit(); + this.tableLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private MetroFramework.Controls.MetroButton btnSelect; + private MetroFramework.Controls.MetroLabel metroLabel2; + private MetroFramework.Controls.MetroLabel metroLabel1; + private MetroFramework.Controls.MetroDateTime dtEndTime; + private MetroFramework.Controls.MetroDateTime dtStartTime; + private System.Windows.Forms.Label lblSelectStures; + private MetroFramework.Controls.MetroGrid dgvData; + private MetroFramework.Controls.MetroTextBox txtOrderNum; + private MetroFramework.Controls.MetroLabel metroLabel8; + private MetroFramework.Controls.MetroButton btnExcel; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmCCDQuery.resx b/JY.Inspection/Frm/FrmCCDQuery.resx new file mode 100644 index 0000000..acb5bb2 --- /dev/null +++ b/JY.Inspection/Frm/FrmCCDQuery.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN + UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8= + + + \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmChangeModel.cs b/JY.Inspection/Frm/FrmChangeModel.cs new file mode 100644 index 0000000..61c3955 --- /dev/null +++ b/JY.Inspection/Frm/FrmChangeModel.cs @@ -0,0 +1,309 @@ +using JY.DAL; +using JY.Model; +using MetroFramework.Forms; +using PLCCommunication; +using System; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JY.Inspection.Frm +{ + public partial class FrmChangeModel : MetroForm + { + /// + /// 数据库访问接口 + /// + private IDbHelper dbHelper = new OpSqlDataBase(); + /// + /// 定义DataGridView数据源 + /// + private BindingList blPLCConfigParaList = new BindingList(); + + private delegate void UpdateBar(int value); + private FrmOmronPLCCom MelsecPLCCom; + public string strModelType; + //bool IsNoOrg = false; + int AxisCount = 0; + + + public FrmChangeModel(FrmOmronPLCCom melsecPLCCom, string ModelType) + { + InitializeComponent(); + MelsecPLCCom = melsecPLCCom; + strModelType = ModelType; + this.dgvParaPLC.AutoGenerateColumns = false; + dgvParaPLC.DataSource = blPLCConfigParaList; + } + + private void FrmChangeModel_Load(object sender, EventArgs e) + { + progressBar1.Maximum = 100;//进度条 + progressBar1.Step = 1; + setCombOrg(); + cmbProductModel.Text = strModelType; + GetPLCConfigPara(strModelType); + } + + /// + /// 加载产品型号下拉 + /// + private void setCombOrg() + { + var list = dbHelper.GetProductModelList(); + cmbProductModel.Items.Clear(); + + cmbProductModel.DataSource = list; + cmbProductModel.DisplayMember = "ModelName"; + cmbProductModel.ValueMember = "ModelName"; + } + + /// + /// 一键保存 + /// + /// + /// + private void btnReadPLC_Click(object sender, EventArgs e) + { + try + { + if (!HomeForm.startup) + { + MessageBox.Show("请先开启监控连接PLC!"); + return; + } + if (cmbProductModel.Text == "") + { + MessageBox.Show("请先选择型号!"); + return; + } + ChangeButtonStatus(false); + string model = cmbProductModel.Text; + if (blPLCConfigParaList.Count <= 0) + { + MessageBox.Show("轴参数为空不能保存", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + else + { + AxisCount = blPLCConfigParaList.Count; + Task.Run(() => + { + ClearPos(true); + for (int i = 1; i < AxisCount; i++) + { + try + { + blPLCConfigParaList[i].PLCValue = MelsecPLCCom.lstMcUI[0].ReadIntDReg(blPLCConfigParaList[i].PLCAddress); + blPLCConfigParaList[i].UpdateData = DateTime.Now;//更新数据时间 + } + catch (Exception ex) + { + blPLCConfigParaList[i].PLCValue = 0;//没有值的话,给予0值 + blPLCConfigParaList[i].UpdateData = DateTime.Now;//更新数据时间 + } + Thread.Sleep(100); + ChangeBar(i); + } + Thread.Sleep(100); + if (this.InvokeRequired) + { + Action w = colosbar; + this.Invoke(w); + } + else + { + progressBar1.Visible = false; + metroLabel2.Text = string.Empty; + metroLabel2.Visible = false; + } + + var result = dbHelper.InsertPLCConfigParam(blPLCConfigParaList.ToList()); + MessageBox.Show("保存成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + ChangeButtonStatus(true); + ClearPos(false); + }); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + /// + /// 一键换型 + /// + /// + /// + private void btnChangeConfig_Click(object sender, EventArgs e) + { + if (!HomeForm.startup) + { + MessageBox.Show("请先开启监控连接PLC!"); + return; + } + if (MessageBox.Show("确定要更改" + cmbProductModel.Text + "型号吗?", "系统提示", MessageBoxButtons.OKCancel, + MessageBoxIcon.Question) != DialogResult.OK) + { + return; + } + try + { + if (blPLCConfigParaList.Count > 0) + { + ChangeButtonStatus(false); + AxisCount = blPLCConfigParaList.Count; + Task.Run(() => + { + ClearPos(true); + for (int i = 0; i < blPLCConfigParaList.Count; i++) + { + try + { + MelsecPLCCom.lstMcUI[0].WriteDReg(blPLCConfigParaList[i].PLCAddress, blPLCConfigParaList[i].PLCValue); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + return; + } + Thread.Sleep(100); + ChangeBar(i); + } + Thread.Sleep(100); + if (this.InvokeRequired) + { + Action w = colosbar; + this.Invoke(w); + } + else + { + progressBar1.Visible = false; + metroLabel2.Text = string.Empty; + metroLabel2.Visible = false; + } + + }); + + //melsec.Write("R500", ProdTypeNum_All);//写回到PLC。型号序号下发到PLC。R500是跟黄晓宇工确定好的PLC地址,固定不变。 + MessageBox.Show("一键换型成功!"); + + } + else + { + MessageBox.Show("没有参数换型!"); + } + + ChangeButtonStatus(true); + ClearPos(false); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + return; + } + } + + /// + /// 打开轴参数配置页面 + /// + /// + /// + private void btnConfigBaseSet_Click(object sender, EventArgs e) + { + FrmConfigBaseSet frmConfigBaseSet = new FrmConfigBaseSet(); + frmConfigBaseSet.ShowDialog(); + } + + /// + /// 选择产品机型事件 + /// + /// + /// + private void cmbProductModel_SelectedIndexChanged(object sender, EventArgs e) + { + GetPLCConfigPara(cmbProductModel.Text); + } + + /// + /// 查询当前产品型号轴参数信息 + /// + /// + private void GetPLCConfigPara(string str) + { + try + { + var list = dbHelper.GetPLCConfigPara(str); + blPLCConfigParaList = new BindingList(list); + dgvParaPLC.DataSource = blPLCConfigParaList; + } + catch (Exception ex) + { + throw ex; + } + } + + #region 进度条码设置 + public void colosbar() + { + progressBar1.Visible = false; + metroLabel2.Visible = false; + } + public void ClearPos(bool b) + { + this.Invoke(new Action(() => + { + progressBar1.Visible = b; + metroLabel2.Visible = b; + })); + } + + public void ChangeBar(int value) + { + if (progressBar1.InvokeRequired) + { + UpdateBar c = new UpdateBar(ChangeBar); + this.Invoke(c, new object[] { value }); + } + else + { + if (value < AxisCount) + { + progressBar1.Value = Convert.ToInt16(((double)value / AxisCount) * 100); + progressBar1.PerformStep(); + Thread.Sleep(100); + metroLabel2.Text = "已完成" + progressBar1.Value + "%"; + Application.DoEvents(); + } + } + } + + public void ChangeButtonStatus(bool b) + { + this.Invoke(new Action(() => + { + btnSavePLCConfig.Enabled = b; + btnChangeConfig.Enabled = b; + btnConfigBaseSet.Enabled = b; + })); + } + #endregion + + private void dgvParaPLC_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, + e.RowBounds.Location.Y, + dgvParaPLC.RowHeadersWidth - 4, + e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), + dgvParaPLC.RowHeadersDefaultCellStyle.Font, + rectangle, + dgvParaPLC.RowHeadersDefaultCellStyle.ForeColor=Color.Gray, + TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + } +} diff --git a/JY.Inspection/Frm/FrmChangeModel.designer.cs b/JY.Inspection/Frm/FrmChangeModel.designer.cs new file mode 100644 index 0000000..7b6cdb4 --- /dev/null +++ b/JY.Inspection/Frm/FrmChangeModel.designer.cs @@ -0,0 +1,298 @@ + +namespace JY.Inspection.Frm +{ + partial class FrmChangeModel + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmChangeModel)); + this.dgvParaPLC = new MetroFramework.Controls.MetroGrid(); + this.cmbProductModel = new MetroFramework.Controls.MetroComboBox(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.btnSavePLCConfig = new MetroFramework.Controls.MetroButton(); + this.btnChangeConfig = new MetroFramework.Controls.MetroButton(); + this.btnConfigBaseSet = new MetroFramework.Controls.MetroButton(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.metroLabel2 = new MetroFramework.Controls.MetroLabel(); + this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ModelName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.PLCAddress = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.PLCValue = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.UpdateTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.PLCRemark = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.OrderNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dgvParaPLC)).BeginInit(); + this.SuspendLayout(); + // + // dgvParaPLC + // + this.dgvParaPLC.AllowUserToAddRows = false; + this.dgvParaPLC.AllowUserToDeleteRows = false; + this.dgvParaPLC.AllowUserToResizeRows = false; + this.dgvParaPLC.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvParaPLC.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dgvParaPLC.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dgvParaPLC.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); + dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvParaPLC.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dgvParaPLC.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvParaPLC.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.序号, + this.ModelName, + this.PLCAddress, + this.PLCValue, + this.UpdateTime, + this.PLCRemark, + this.OrderNum}); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(136)))), ((int)(((byte)(136)))), ((int)(((byte)(136))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvParaPLC.DefaultCellStyle = dataGridViewCellStyle2; + this.dgvParaPLC.Dock = System.Windows.Forms.DockStyle.Right; + this.dgvParaPLC.EnableHeadersVisualStyles = false; + this.dgvParaPLC.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + this.dgvParaPLC.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvParaPLC.Location = new System.Drawing.Point(490, 75); + this.dgvParaPLC.Margin = new System.Windows.Forms.Padding(4); + this.dgvParaPLC.Name = "dgvParaPLC"; + this.dgvParaPLC.ReadOnly = true; + this.dgvParaPLC.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); + dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvParaPLC.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; + this.dgvParaPLC.RowHeadersVisible = false; + this.dgvParaPLC.RowHeadersWidth = 51; + this.dgvParaPLC.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.dgvParaPLC.RowTemplate.Height = 23; + this.dgvParaPLC.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgvParaPLC.Size = new System.Drawing.Size(935, 814); + this.dgvParaPLC.TabIndex = 0; + this.dgvParaPLC.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvParaPLC_RowPostPaint); + // + // cmbProductModel + // + this.cmbProductModel.FormattingEnabled = true; + this.cmbProductModel.ItemHeight = 24; + this.cmbProductModel.Location = new System.Drawing.Point(161, 118); + this.cmbProductModel.Margin = new System.Windows.Forms.Padding(4); + this.cmbProductModel.Name = "cmbProductModel"; + this.cmbProductModel.Size = new System.Drawing.Size(257, 30); + this.cmbProductModel.TabIndex = 2; + this.cmbProductModel.UseSelectable = true; + this.cmbProductModel.SelectedIndexChanged += new System.EventHandler(this.cmbProductModel_SelectedIndexChanged); + // + // metroLabel1 + // + this.metroLabel1.AutoSize = true; + this.metroLabel1.Location = new System.Drawing.Point(53, 122); + this.metroLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Size = new System.Drawing.Size(84, 20); + this.metroLabel1.TabIndex = 3; + this.metroLabel1.Text = "电芯型号:"; + // + // btnSavePLCConfig + // + this.btnSavePLCConfig.Location = new System.Drawing.Point(51, 259); + this.btnSavePLCConfig.Margin = new System.Windows.Forms.Padding(4); + this.btnSavePLCConfig.Name = "btnSavePLCConfig"; + this.btnSavePLCConfig.Size = new System.Drawing.Size(152, 46); + this.btnSavePLCConfig.TabIndex = 4; + this.btnSavePLCConfig.Text = "一键保存"; + this.btnSavePLCConfig.UseSelectable = true; + this.btnSavePLCConfig.Click += new System.EventHandler(this.btnReadPLC_Click); + // + // btnChangeConfig + // + this.btnChangeConfig.Location = new System.Drawing.Point(252, 259); + this.btnChangeConfig.Margin = new System.Windows.Forms.Padding(4); + this.btnChangeConfig.Name = "btnChangeConfig"; + this.btnChangeConfig.Size = new System.Drawing.Size(152, 46); + this.btnChangeConfig.TabIndex = 5; + this.btnChangeConfig.Text = "一键换型"; + this.btnChangeConfig.UseSelectable = true; + this.btnChangeConfig.Click += new System.EventHandler(this.btnChangeConfig_Click); + // + // btnConfigBaseSet + // + this.btnConfigBaseSet.Location = new System.Drawing.Point(51, 352); + this.btnConfigBaseSet.Margin = new System.Windows.Forms.Padding(4); + this.btnConfigBaseSet.Name = "btnConfigBaseSet"; + this.btnConfigBaseSet.Size = new System.Drawing.Size(152, 46); + this.btnConfigBaseSet.TabIndex = 6; + this.btnConfigBaseSet.Text = "轴参数维护设置"; + this.btnConfigBaseSet.UseSelectable = true; + this.btnConfigBaseSet.Click += new System.EventHandler(this.btnConfigBaseSet_Click); + // + // progressBar1 + // + this.progressBar1.Location = new System.Drawing.Point(51, 190); + this.progressBar1.Margin = new System.Windows.Forms.Padding(4); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(353, 29); + this.progressBar1.TabIndex = 7; + this.progressBar1.Visible = false; + // + // metroLabel2 + // + this.metroLabel2.AutoSize = true; + this.metroLabel2.Location = new System.Drawing.Point(144, 162); + this.metroLabel2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.metroLabel2.Name = "metroLabel2"; + this.metroLabel2.Size = new System.Drawing.Size(0, 0); + this.metroLabel2.TabIndex = 8; + this.metroLabel2.Visible = false; + // + // 序号 + // + this.序号.DataPropertyName = "序号"; + this.序号.HeaderText = "序号"; + this.序号.MinimumWidth = 6; + this.序号.Name = "序号"; + this.序号.ReadOnly = true; + this.序号.Width = 125; + // + // ModelName + // + this.ModelName.DataPropertyName = "ModelName"; + this.ModelName.HeaderText = "型号"; + this.ModelName.MinimumWidth = 6; + this.ModelName.Name = "ModelName"; + this.ModelName.ReadOnly = true; + this.ModelName.Width = 125; + // + // PLCAddress + // + this.PLCAddress.DataPropertyName = "PLCAddress"; + this.PLCAddress.HeaderText = "PLC地址"; + this.PLCAddress.MinimumWidth = 6; + this.PLCAddress.Name = "PLCAddress"; + this.PLCAddress.ReadOnly = true; + this.PLCAddress.Width = 125; + // + // PLCValue + // + this.PLCValue.DataPropertyName = "PLCValue"; + this.PLCValue.HeaderText = "PLC值"; + this.PLCValue.MinimumWidth = 6; + this.PLCValue.Name = "PLCValue"; + this.PLCValue.ReadOnly = true; + this.PLCValue.Width = 125; + // + // UpdateTime + // + this.UpdateTime.DataPropertyName = "UpdateTime"; + this.UpdateTime.HeaderText = "更新时间"; + this.UpdateTime.MinimumWidth = 6; + this.UpdateTime.Name = "UpdateTime"; + this.UpdateTime.ReadOnly = true; + this.UpdateTime.Width = 125; + // + // PLCRemark + // + this.PLCRemark.DataPropertyName = "PLCRemark"; + this.PLCRemark.HeaderText = "备注"; + this.PLCRemark.MinimumWidth = 6; + this.PLCRemark.Name = "PLCRemark"; + this.PLCRemark.ReadOnly = true; + this.PLCRemark.Width = 125; + // + // OrderNum + // + this.OrderNum.DataPropertyName = "OrderNum"; + this.OrderNum.HeaderText = "排序"; + this.OrderNum.MinimumWidth = 6; + this.OrderNum.Name = "OrderNum"; + this.OrderNum.ReadOnly = true; + this.OrderNum.Width = 125; + // + // FrmChangeModel + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle; + this.ClientSize = new System.Drawing.Size(1452, 914); + this.Controls.Add(this.metroLabel2); + this.Controls.Add(this.progressBar1); + this.Controls.Add(this.btnConfigBaseSet); + this.Controls.Add(this.btnChangeConfig); + this.Controls.Add(this.btnSavePLCConfig); + this.Controls.Add(this.metroLabel1); + this.Controls.Add(this.cmbProductModel); + this.Controls.Add(this.dgvParaPLC); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(4); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Movable = false; + this.Name = "FrmChangeModel"; + this.Padding = new System.Windows.Forms.Padding(27, 75, 27, 25); + this.Text = "9978-"; + this.Load += new System.EventHandler(this.FrmChangeModel_Load); + ((System.ComponentModel.ISupportInitialize)(this.dgvParaPLC)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private MetroFramework.Controls.MetroGrid dgvParaPLC; + private MetroFramework.Controls.MetroComboBox cmbProductModel; + private MetroFramework.Controls.MetroLabel metroLabel1; + private MetroFramework.Controls.MetroButton btnSavePLCConfig; + private MetroFramework.Controls.MetroButton btnChangeConfig; + private MetroFramework.Controls.MetroButton btnConfigBaseSet; + private System.Windows.Forms.ProgressBar progressBar1; + private MetroFramework.Controls.MetroLabel metroLabel2; + private System.Windows.Forms.DataGridViewTextBoxColumn 序号; + private System.Windows.Forms.DataGridViewTextBoxColumn ModelName; + private System.Windows.Forms.DataGridViewTextBoxColumn PLCAddress; + private System.Windows.Forms.DataGridViewTextBoxColumn PLCValue; + private System.Windows.Forms.DataGridViewTextBoxColumn UpdateTime; + private System.Windows.Forms.DataGridViewTextBoxColumn PLCRemark; + private System.Windows.Forms.DataGridViewTextBoxColumn OrderNum; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmChangeModel.resx b/JY.Inspection/Frm/FrmChangeModel.resx new file mode 100644 index 0000000..ec37289 --- /dev/null +++ b/JY.Inspection/Frm/FrmChangeModel.resx @@ -0,0 +1,218 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWU1QAFpNUABZTVASWU1QH1lNUB9ZTVAfWU1QH1lN + UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUBJaTVAAWU1QAFlN + UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXE5OAFlNUABZTVAFWU1QaFlLUM1YS0/gWEtQ4FhL + UOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS0/gWUtQzVlN + UGhZTVAFWU1QAFxOTgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWS1EAWU1QAFlNUE5ZTlD0YGxY/2eH + Xv9nh17/Z4de/2eHXv9nh17/Z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I1lNUCNZTVAVXE5QAFlNUABZTVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAWU1QAFlNUABZTVAAWU1QAFlNUABWSlAAWExPpV5TVv9yaGr/c2ps/3NqbP9zamz/c2ps/3Jo + av9eU1b/WExPpVZKUQFZTVAAWU1QAFlNUABYTVAAWU1QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVklRAFlNUABZTVA7WU1QwlhMT+BYTE/gWExP4FhM + T+BYTE/gWExP4FlNUMJZTVA7WU1QAFZKUgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN + UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8= + + + \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmConfigBaseSet.cs b/JY.Inspection/Frm/FrmConfigBaseSet.cs new file mode 100644 index 0000000..bd37a62 --- /dev/null +++ b/JY.Inspection/Frm/FrmConfigBaseSet.cs @@ -0,0 +1,173 @@ +using JY.DAL; +using JY.Inspection.Common; +using JY.Model; +using JY.Utility; +using MetroFramework.Forms; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JY.Inspection.Frm +{ + public partial class FrmConfigBaseSet : MetroForm + { + /// + /// 数据库访问接口 + /// + private IDbHelper dbHelper = new OpSqlDataBase(); + /// + /// 定义DataGridView数据源 + /// + private BindingList blPLCConfigBaseList = new BindingList(); + public FrmConfigBaseSet() + { + InitializeComponent(); + } + + //bool IsOrg = true; + + private void FrmConfigBaseSet_Load(object sender, EventArgs e) + { + this.dgvPara.AutoGenerateColumns = false; + //IsOrg = false; + GetData(); + } + + /// + /// 加载PLC轴参数数据到页面列表 + /// + private void GetData() + { + var list = dbHelper.GetPLCConfigBases(); + blPLCConfigBaseList = new BindingList(list); + dgvPara.DataSource = blPLCConfigBaseList; + //dgvPara.Columns[0].Visible = false; + } + + /// + /// 导出到Excel + /// + /// + /// + private void btnExcelToDgv_Click(object sender, EventArgs e) + { + try + { + OpenFileDialog fd = new OpenFileDialog(); + fd.Filter = "导入Excel数据库|*.xlsx;"; //打开文件对话框筛选器 + if (fd.ShowDialog() == DialogResult.OK) + { + EPPlusExcelHelper excelHepler = new EPPlusExcelHelper(fd.FileName); + DataTable dt = excelHepler.ImportExcel(1); + if (dt != null && dt.Rows.Count > 0) + { + blPLCConfigBaseList.Clear(); + foreach (DataRow dr in dt.Rows) + { + blPLCConfigBaseList.Add(new PLCConfigBase() + { + OrderNum = int.Parse(dr["顺序"].ToString()), + PLCAddress = dr["PLC地址"].ToString(), + PLCRemark = dr["地址说明"].ToString() + }); + } + } + } + } + catch (Exception exception) + { + MessageBox.Show(exception.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + /// + /// 保存轴参数信息 + /// + /// + /// + private void btnOk_Click(object sender, EventArgs e) + { + try + { + string PlcAddressErr = "";//判断 PLC地址 是否重复 + + if (blPLCConfigBaseList.Count == 0) + { + MessageBox.Show("列表数据空数据,不能保存!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + + var duplicateData = blPLCConfigBaseList.GroupBy(p => p.PLCAddress); + foreach (var item in duplicateData) + { + if (item.Count() > 1) + { + PlcAddressErr += $"PLC地址不能重复:{item.FirstOrDefault().PLCAddress}"; + } + } + + if (PlcAddressErr != "")//重复,需要报错并返出 + { + MessageBox.Show(PlcAddressErr, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + return;//返出 + } + + dbHelper.InsertPLCConfigBase(blPLCConfigBaseList.ToList()); + MessageBox.Show("保存成功!"); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + } + } + /// + /// 关闭窗体 + /// + /// + /// + private void btnCancel_Click(object sender, EventArgs e) + { + this.Close(); + } + + /// + /// 添加记录 + /// + /// + /// + private void tsmiAdd_Click(object sender, EventArgs e) + { + blPLCConfigBaseList.Add(new PLCConfigBase() + { + OrderNum = blPLCConfigBaseList.Count + 1, + PLCAddress = "D00", + PLCRemark = "" + }); + } + + /// + /// 删除记录 + /// + /// + /// + private void tsmiDelete_Click(object sender, EventArgs e) + { + if (dgvPara.RowCount == 0) + { + MessageBox.Show("没有数据需要删除!"); + return; + } + if (MessageBox.Show("确定要删除该行?", "系统提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) + { + int row = dgvPara.CurrentCell.RowIndex; + blPLCConfigBaseList.RemoveAt(row); + } + } + } +} diff --git a/JY.Inspection/Frm/FrmConfigBaseSet.designer.cs b/JY.Inspection/Frm/FrmConfigBaseSet.designer.cs new file mode 100644 index 0000000..9a2d596 --- /dev/null +++ b/JY.Inspection/Frm/FrmConfigBaseSet.designer.cs @@ -0,0 +1,226 @@ + +namespace JY.Inspection.Frm +{ + partial class FrmConfigBaseSet + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmConfigBaseSet)); + this.dgvPara = new MetroFramework.Controls.MetroGrid(); + this.PLCAddress = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.PLCRemark = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.OrderNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.tsmiAdd = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiDelete = new System.Windows.Forms.ToolStripMenuItem(); + this.btnOk = new MetroFramework.Controls.MetroButton(); + this.btnCancel = new MetroFramework.Controls.MetroButton(); + this.btnExcelToDgv = new MetroFramework.Controls.MetroButton(); + ((System.ComponentModel.ISupportInitialize)(this.dgvPara)).BeginInit(); + this.contextMenuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // dgvPara + // + this.dgvPara.AllowUserToAddRows = false; + this.dgvPara.AllowUserToDeleteRows = false; + this.dgvPara.AllowUserToResizeRows = false; + this.dgvPara.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvPara.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dgvPara.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dgvPara.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); + dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvPara.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dgvPara.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvPara.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.PLCAddress, + this.PLCRemark, + this.OrderNum}); + this.dgvPara.ContextMenuStrip = this.contextMenuStrip1; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(136)))), ((int)(((byte)(136)))), ((int)(((byte)(136))))); + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvPara.DefaultCellStyle = dataGridViewCellStyle2; + this.dgvPara.Dock = System.Windows.Forms.DockStyle.Top; + this.dgvPara.EnableHeadersVisualStyles = false; + this.dgvPara.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + this.dgvPara.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvPara.Location = new System.Drawing.Point(27, 75); + this.dgvPara.Margin = new System.Windows.Forms.Padding(4); + this.dgvPara.Name = "dgvPara"; + this.dgvPara.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); + dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvPara.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; + this.dgvPara.RowHeadersVisible = false; + this.dgvPara.RowHeadersWidth = 51; + this.dgvPara.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.dgvPara.RowTemplate.Height = 23; + this.dgvPara.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgvPara.Size = new System.Drawing.Size(737, 680); + this.dgvPara.TabIndex = 0; + // + // PLCAddress + // + this.PLCAddress.DataPropertyName = "PLCAddress"; + this.PLCAddress.HeaderText = "PLC地址"; + this.PLCAddress.MinimumWidth = 6; + this.PLCAddress.Name = "PLCAddress"; + this.PLCAddress.Width = 125; + // + // PLCRemark + // + this.PLCRemark.DataPropertyName = "PLCRemark"; + this.PLCRemark.HeaderText = "地址说明"; + this.PLCRemark.MinimumWidth = 6; + this.PLCRemark.Name = "PLCRemark"; + this.PLCRemark.Width = 300; + // + // OrderNum + // + this.OrderNum.DataPropertyName = "OrderNum"; + this.OrderNum.HeaderText = "顺序"; + this.OrderNum.MinimumWidth = 6; + this.OrderNum.Name = "OrderNum"; + this.OrderNum.Width = 125; + // + // contextMenuStrip1 + // + this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsmiAdd, + this.tsmiDelete}); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(124, 52); + // + // tsmiAdd + // + this.tsmiAdd.Name = "tsmiAdd"; + this.tsmiAdd.Size = new System.Drawing.Size(123, 24); + this.tsmiAdd.Text = "添加行"; + this.tsmiAdd.Click += new System.EventHandler(this.tsmiAdd_Click); + // + // tsmiDelete + // + this.tsmiDelete.Name = "tsmiDelete"; + this.tsmiDelete.Size = new System.Drawing.Size(123, 24); + this.tsmiDelete.Text = "删除行"; + this.tsmiDelete.Click += new System.EventHandler(this.tsmiDelete_Click); + // + // btnOk + // + this.btnOk.Location = new System.Drawing.Point(292, 811); + this.btnOk.Margin = new System.Windows.Forms.Padding(4); + this.btnOk.Name = "btnOk"; + this.btnOk.Size = new System.Drawing.Size(181, 55); + this.btnOk.TabIndex = 1; + this.btnOk.Text = "保存"; + this.btnOk.UseSelectable = true; + this.btnOk.Click += new System.EventHandler(this.btnOk_Click); + // + // btnCancel + // + this.btnCancel.Location = new System.Drawing.Point(537, 811); + this.btnCancel.Margin = new System.Windows.Forms.Padding(4); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(181, 55); + this.btnCancel.TabIndex = 2; + this.btnCancel.Text = "退出"; + this.btnCancel.UseSelectable = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnExcelToDgv + // + this.btnExcelToDgv.Location = new System.Drawing.Point(64, 811); + this.btnExcelToDgv.Margin = new System.Windows.Forms.Padding(4); + this.btnExcelToDgv.Name = "btnExcelToDgv"; + this.btnExcelToDgv.Size = new System.Drawing.Size(181, 55); + this.btnExcelToDgv.TabIndex = 3; + this.btnExcelToDgv.Text = "导入轴寄存器"; + this.btnExcelToDgv.UseSelectable = true; + this.btnExcelToDgv.Click += new System.EventHandler(this.btnExcelToDgv_Click); + // + // FrmConfigBaseSet + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle; + this.ClientSize = new System.Drawing.Size(791, 877); + this.Controls.Add(this.btnExcelToDgv); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.btnOk); + this.Controls.Add(this.dgvPara); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(4); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Movable = false; + this.Name = "FrmConfigBaseSet"; + this.Padding = new System.Windows.Forms.Padding(27, 75, 27, 25); + this.Text = "PLC轴寄存器维护地址"; + this.Load += new System.EventHandler(this.FrmConfigBaseSet_Load); + ((System.ComponentModel.ISupportInitialize)(this.dgvPara)).EndInit(); + this.contextMenuStrip1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private MetroFramework.Controls.MetroGrid dgvPara; + private MetroFramework.Controls.MetroButton btnOk; + private MetroFramework.Controls.MetroButton btnCancel; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.ToolStripMenuItem tsmiAdd; + private System.Windows.Forms.ToolStripMenuItem tsmiDelete; + private MetroFramework.Controls.MetroButton btnExcelToDgv; + private System.Windows.Forms.DataGridViewTextBoxColumn PLCAddress; + private System.Windows.Forms.DataGridViewTextBoxColumn PLCRemark; + private System.Windows.Forms.DataGridViewTextBoxColumn OrderNum; + + + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmConfigBaseSet.resx b/JY.Inspection/Frm/FrmConfigBaseSet.resx new file mode 100644 index 0000000..c1c4cf4 --- /dev/null +++ b/JY.Inspection/Frm/FrmConfigBaseSet.resx @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + 17, 17 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN + UABZTVAAWU1QA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AAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8= + + + \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmDBbaseSet.cs b/JY.Inspection/Frm/FrmDBbaseSet.cs new file mode 100644 index 0000000..2fb9471 --- /dev/null +++ b/JY.Inspection/Frm/FrmDBbaseSet.cs @@ -0,0 +1,47 @@ +using MetroFramework.Forms; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using JY.Inspection.Common; +using JY.Utility; + +namespace JY.Inspection.Frm +{ + public partial class FrmDBbaseSet : MetroForm + { + public FrmDBbaseSet() + { + InitializeComponent(); + } + + private void FrmDBbaseSet_Load(object sender, EventArgs e) + { + txtDBIP.Text = IniFileHelper.ReadIniData("MYSQL配置", "DB_IP"); + txtDBName.Text = IniFileHelper.ReadIniData("MYSQL配置", "DB_Name"); + txtDBUser.Text = IniFileHelper.ReadIniData("MYSQL配置", "DB_User"); + txtDBPwd.Text = IniFileHelper.ReadIniData("MYSQL配置", "DB_Pwd"); + + } + + private void btnSave_Click(object sender, EventArgs e) + { + IniFileHelper.WriteIniData("MYSQL配置", "DB_IP", txtDBIP.Text.Trim()); + IniFileHelper.WriteIniData("MYSQL配置", "DB_Name", txtDBName.Text.Trim()); + IniFileHelper.WriteIniData("MYSQL配置", "DB_User", txtDBUser.Text.Trim()); + IniFileHelper.WriteIniData("MYSQL配置", "DB_Pwd", txtDBPwd.Text.Trim()); + + MessageBox.Show("数据库参数保存成功!", "系统提示"); + } + + private void btnExit_Click(object sender, EventArgs e) + { + this.Close(); + } + } +} diff --git a/JY.Inspection/Frm/FrmDBbaseSet.designer.cs b/JY.Inspection/Frm/FrmDBbaseSet.designer.cs new file mode 100644 index 0000000..4794465 --- /dev/null +++ b/JY.Inspection/Frm/FrmDBbaseSet.designer.cs @@ -0,0 +1,276 @@ + +namespace JY.Inspection.Frm +{ + partial class FrmDBbaseSet + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmDBbaseSet)); + this.btnSave = new MetroFramework.Controls.MetroButton(); + this.txtDBIP = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.btnExit = new MetroFramework.Controls.MetroButton(); + this.metroLabel2 = new MetroFramework.Controls.MetroLabel(); + this.txtDBName = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel3 = new MetroFramework.Controls.MetroLabel(); + this.txtDBUser = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel4 = new MetroFramework.Controls.MetroLabel(); + this.txtDBPwd = new MetroFramework.Controls.MetroTextBox(); + this.SuspendLayout(); + // + // btnSave + // + this.btnSave.Location = new System.Drawing.Point(87, 331); + this.btnSave.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnSave.Name = "btnSave"; + this.btnSave.Size = new System.Drawing.Size(149, 46); + this.btnSave.TabIndex = 0; + this.btnSave.Text = "保存"; + this.btnSave.UseSelectable = true; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // + // txtDBIP + // + // + // + // + this.txtDBIP.CustomButton.Image = null; + this.txtDBIP.CustomButton.Location = new System.Drawing.Point(273, 1); + this.txtDBIP.CustomButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtDBIP.CustomButton.Name = ""; + this.txtDBIP.CustomButton.Size = new System.Drawing.Size(36, 34); + this.txtDBIP.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtDBIP.CustomButton.TabIndex = 1; + this.txtDBIP.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtDBIP.CustomButton.UseSelectable = true; + this.txtDBIP.CustomButton.Visible = false; + this.txtDBIP.Lines = new string[0]; + this.txtDBIP.Location = new System.Drawing.Point(204, 95); + this.txtDBIP.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtDBIP.MaxLength = 32767; + this.txtDBIP.Name = "txtDBIP"; + this.txtDBIP.PasswordChar = '\0'; + this.txtDBIP.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtDBIP.SelectedText = ""; + this.txtDBIP.SelectionLength = 0; + this.txtDBIP.SelectionStart = 0; + this.txtDBIP.ShortcutsEnabled = true; + this.txtDBIP.Size = new System.Drawing.Size(233, 29); + this.txtDBIP.TabIndex = 1; + this.txtDBIP.UseSelectable = true; + this.txtDBIP.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtDBIP.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel1 + // + this.metroLabel1.AutoSize = true; + this.metroLabel1.Location = new System.Drawing.Point(75, 95); + this.metroLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Size = new System.Drawing.Size(99, 20); + this.metroLabel1.TabIndex = 2; + this.metroLabel1.Text = "数据库地址:"; + // + // btnExit + // + this.btnExit.Location = new System.Drawing.Point(300, 331); + this.btnExit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnExit.Name = "btnExit"; + this.btnExit.Size = new System.Drawing.Size(137, 46); + this.btnExit.TabIndex = 3; + this.btnExit.Text = "退出"; + this.btnExit.UseSelectable = true; + this.btnExit.Click += new System.EventHandler(this.btnExit_Click); + // + // metroLabel2 + // + this.metroLabel2.AutoSize = true; + this.metroLabel2.Location = new System.Drawing.Point(75, 150); + this.metroLabel2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.metroLabel2.Name = "metroLabel2"; + this.metroLabel2.Size = new System.Drawing.Size(99, 20); + this.metroLabel2.TabIndex = 5; + this.metroLabel2.Text = "数据库名称:"; + // + // txtDBName + // + // + // + // + this.txtDBName.CustomButton.Image = null; + this.txtDBName.CustomButton.Location = new System.Drawing.Point(273, 1); + this.txtDBName.CustomButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtDBName.CustomButton.Name = ""; + this.txtDBName.CustomButton.Size = new System.Drawing.Size(36, 34); + this.txtDBName.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtDBName.CustomButton.TabIndex = 1; + this.txtDBName.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtDBName.CustomButton.UseSelectable = true; + this.txtDBName.CustomButton.Visible = false; + this.txtDBName.Lines = new string[0]; + this.txtDBName.Location = new System.Drawing.Point(204, 150); + this.txtDBName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtDBName.MaxLength = 32767; + this.txtDBName.Name = "txtDBName"; + this.txtDBName.PasswordChar = '\0'; + this.txtDBName.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtDBName.SelectedText = ""; + this.txtDBName.SelectionLength = 0; + this.txtDBName.SelectionStart = 0; + this.txtDBName.ShortcutsEnabled = true; + this.txtDBName.Size = new System.Drawing.Size(233, 29); + this.txtDBName.TabIndex = 4; + this.txtDBName.UseSelectable = true; + this.txtDBName.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtDBName.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel3 + // + this.metroLabel3.AutoSize = true; + this.metroLabel3.Location = new System.Drawing.Point(75, 206); + this.metroLabel3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.metroLabel3.Name = "metroLabel3"; + this.metroLabel3.Size = new System.Drawing.Size(99, 20); + this.metroLabel3.TabIndex = 7; + this.metroLabel3.Text = "数据库用户:"; + // + // txtDBUser + // + // + // + // + this.txtDBUser.CustomButton.Image = null; + this.txtDBUser.CustomButton.Location = new System.Drawing.Point(273, 1); + this.txtDBUser.CustomButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtDBUser.CustomButton.Name = ""; + this.txtDBUser.CustomButton.Size = new System.Drawing.Size(36, 34); + this.txtDBUser.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtDBUser.CustomButton.TabIndex = 1; + this.txtDBUser.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtDBUser.CustomButton.UseSelectable = true; + this.txtDBUser.CustomButton.Visible = false; + this.txtDBUser.Lines = new string[0]; + this.txtDBUser.Location = new System.Drawing.Point(204, 206); + this.txtDBUser.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtDBUser.MaxLength = 32767; + this.txtDBUser.Name = "txtDBUser"; + this.txtDBUser.PasswordChar = '\0'; + this.txtDBUser.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtDBUser.SelectedText = ""; + this.txtDBUser.SelectionLength = 0; + this.txtDBUser.SelectionStart = 0; + this.txtDBUser.ShortcutsEnabled = true; + this.txtDBUser.Size = new System.Drawing.Size(233, 29); + this.txtDBUser.TabIndex = 6; + this.txtDBUser.UseSelectable = true; + this.txtDBUser.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtDBUser.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel4 + // + this.metroLabel4.AutoSize = true; + this.metroLabel4.Location = new System.Drawing.Point(75, 259); + this.metroLabel4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.metroLabel4.Name = "metroLabel4"; + this.metroLabel4.Size = new System.Drawing.Size(99, 20); + this.metroLabel4.TabIndex = 9; + this.metroLabel4.Text = "数据库密码:"; + // + // txtDBPwd + // + // + // + // + this.txtDBPwd.CustomButton.Image = null; + this.txtDBPwd.CustomButton.Location = new System.Drawing.Point(273, 1); + this.txtDBPwd.CustomButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtDBPwd.CustomButton.Name = ""; + this.txtDBPwd.CustomButton.Size = new System.Drawing.Size(36, 34); + this.txtDBPwd.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtDBPwd.CustomButton.TabIndex = 1; + this.txtDBPwd.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtDBPwd.CustomButton.UseSelectable = true; + this.txtDBPwd.CustomButton.Visible = false; + this.txtDBPwd.Lines = new string[0]; + this.txtDBPwd.Location = new System.Drawing.Point(204, 259); + this.txtDBPwd.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtDBPwd.MaxLength = 32767; + this.txtDBPwd.Name = "txtDBPwd"; + this.txtDBPwd.PasswordChar = '\0'; + this.txtDBPwd.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtDBPwd.SelectedText = ""; + this.txtDBPwd.SelectionLength = 0; + this.txtDBPwd.SelectionStart = 0; + this.txtDBPwd.ShortcutsEnabled = true; + this.txtDBPwd.Size = new System.Drawing.Size(233, 29); + this.txtDBPwd.TabIndex = 8; + this.txtDBPwd.UseSelectable = true; + this.txtDBPwd.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtDBPwd.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // FrmDBbaseSet + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(497, 420); + this.Controls.Add(this.metroLabel4); + this.Controls.Add(this.txtDBPwd); + this.Controls.Add(this.metroLabel3); + this.Controls.Add(this.txtDBUser); + this.Controls.Add(this.metroLabel2); + this.Controls.Add(this.txtDBName); + this.Controls.Add(this.btnExit); + this.Controls.Add(this.metroLabel1); + this.Controls.Add(this.txtDBIP); + this.Controls.Add(this.btnSave); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FrmDBbaseSet"; + this.Padding = new System.Windows.Forms.Padding(27, 75, 27, 25); + this.Text = "数据库设置"; + this.Load += new System.EventHandler(this.FrmDBbaseSet_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private MetroFramework.Controls.MetroButton btnSave; + private MetroFramework.Controls.MetroTextBox txtDBIP; + private MetroFramework.Controls.MetroLabel metroLabel1; + private MetroFramework.Controls.MetroButton btnExit; + private MetroFramework.Controls.MetroLabel metroLabel2; + private MetroFramework.Controls.MetroTextBox txtDBName; + private MetroFramework.Controls.MetroLabel metroLabel3; + private MetroFramework.Controls.MetroTextBox txtDBUser; + private MetroFramework.Controls.MetroLabel metroLabel4; + private MetroFramework.Controls.MetroTextBox txtDBPwd; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmDBbaseSet.resx b/JY.Inspection/Frm/FrmDBbaseSet.resx new file mode 100644 index 0000000..acb5bb2 --- /dev/null +++ b/JY.Inspection/Frm/FrmDBbaseSet.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWU1QAFpNUABZTVASWU1QH1lNUB9ZTVAfWU1QH1lN + UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUBJaTVAAWU1QAFlN + UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXE5OAFlNUABZTVAFWU1QaFlLUM1YS0/gWEtQ4FhL + UOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS0/gWUtQzVlN + UGhZTVAFWU1QAFxOTgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWS1EAWU1QAFlNUE5ZTlD0YGxY/2eH + Xv9nh17/Z4de/2eHXv9nh17/Z4de/2eHXv9nh17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XE5QAFlNUABZTVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAWU1QAFlNUABZTVAAWU1QAFlNUABWSlAAWExPpV5TVv9yaGr/c2ps/3NqbP9zamz/c2ps/3Jo + av9eU1b/WExPpVZKUQFZTVAAWU1QAFlNUABYTVAAWU1QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVklRAFlNUABZTVA7WU1QwlhMT+BYTE/gWExP4FhM + T+BYTE/gWExP4FlNUMJZTVA7WU1QAFZKUgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN + UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8= + + + \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmHelper.cs b/JY.Inspection/Frm/FrmHelper.cs new file mode 100644 index 0000000..6e7baf4 --- /dev/null +++ b/JY.Inspection/Frm/FrmHelper.cs @@ -0,0 +1,21 @@ +using MetroFramework.Forms; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JY.Inspection.Frm +{ + public partial class FrmHelper : MetroForm + { + public FrmHelper() + { + InitializeComponent(); + } + } +} diff --git a/JY.Inspection/Frm/FrmHelper.designer.cs b/JY.Inspection/Frm/FrmHelper.designer.cs new file mode 100644 index 0000000..ff0e8a0 --- /dev/null +++ b/JY.Inspection/Frm/FrmHelper.designer.cs @@ -0,0 +1,82 @@ + +namespace JY.Inspection.Frm +{ + partial class FrmHelper + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmHelper)); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel2 = new MetroFramework.Controls.MetroLabel(); + this.SuspendLayout(); + // + // metroLabel1 + // + this.metroLabel1.AutoSize = true; + this.metroLabel1.Location = new System.Drawing.Point(114, 166); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Size = new System.Drawing.Size(317, 19); + this.metroLabel1.TabIndex = 0; + this.metroLabel1.Text = "本系统由惠州金源精密自动化设备有限公司开发。"; + // + // metroLabel2 + // + this.metroLabel2.AutoSize = true; + this.metroLabel2.Location = new System.Drawing.Point(114, 185); + this.metroLabel2.Name = "metroLabel2"; + this.metroLabel2.Size = new System.Drawing.Size(216, 19); + this.metroLabel2.TabIndex = 1; + this.metroLabel2.Text = "版本号V1.2,更新时间2025.11.22。"; + // + // FrmHelper + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(531, 332); + this.Controls.Add(this.metroLabel2); + this.Controls.Add(this.metroLabel1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Movable = false; + this.Name = "FrmHelper"; + this.Resizable = false; + this.ShadowType = MetroFramework.Forms.MetroFormShadowType.AeroShadow; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.Text = "帮助页面"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private MetroFramework.Controls.MetroLabel metroLabel1; + private MetroFramework.Controls.MetroLabel metroLabel2; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmHelper.resx b/JY.Inspection/Frm/FrmHelper.resx new file mode 100644 index 0000000..acb5bb2 --- /dev/null +++ b/JY.Inspection/Frm/FrmHelper.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWU1QAFpNUABZTVASWU1QH1lNUB9ZTVAfWU1QH1lN + UB9ZTVAfWU1QH1lNUB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AAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8= + + + \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmHistoricalDataQuery.cs b/JY.Inspection/Frm/FrmHistoricalDataQuery.cs new file mode 100644 index 0000000..4da8337 --- /dev/null +++ b/JY.Inspection/Frm/FrmHistoricalDataQuery.cs @@ -0,0 +1,349 @@ +using System; +using System.Data; +using System.IO; +using System.Threading; +using System.Windows.Forms; +using JY.DAL; +using JY.Utility; +using System.Drawing; +using Newtonsoft.Json; +using JYControl; +using JY.MES.Entity; +using JY.MES; +using OfficeOpenXml; +using MiniExcelLibs; + +namespace JY.Inspection.Frm +{ + public partial class FrmHistoricalDataQuery : MetroFramework.Forms.MetroForm + { + public delegate void myDelegate(DataTable t); + public delegate void PDelegate(); + Thread tSo; + int type = 0;//查询类型 + int resulttype = 0;//结果类型 + DataTable dts = null; + /// + /// 用于电芯进站时设备与FMS校验电芯合法性 + /// + string CheckBarCodeInUrl = ""; + /// + /// 用于电芯出站时向FMS上报出站及生产数据 + /// + string BarCodeOutUrl = ""; + /// + /// MES上传验证码 + /// + string authorization = ""; + + /// + /// 数据库访问接口 + /// + private IDbHelper dbHelper = new OpSqlDataBase(); + public FrmHistoricalDataQuery() + { + InitializeComponent(); + CheckForIllegalCrossThreadCalls = false; + } + /// + /// 窗体加载事件 + /// + /// + /// + private void FrmHistoricalDataQuery_Load(object sender, EventArgs e) + { + cbSelectType.SelectedIndex = 0; + resultSelectType.SelectedIndex = 0; + cmbFlag.SelectedIndex = 0; + dtStartTime.Value = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm")); + dtEndTime.Value = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm")); + //为dgv添加复选框列 + DataGridViewCheckBoxColumn checkbox = new DataGridViewCheckBoxColumn(); + //列显示名称 + checkbox.HeaderText = "选择"; + checkbox.Name = "IsChecked"; + checkbox.TrueValue = true; + checkbox.FalseValue = false; + checkbox.DataPropertyName = "IsChecked"; + //列宽 + checkbox.Width = 30; + //列大小不改变 + checkbox.Resizable = DataGridViewTriState.False; + //添加的checkbox在dgv的第一列 + this.dgvData.Columns.Insert(0, checkbox); + } + + private void btnSelect_Click(object sender, EventArgs e) + { + + try + { + tSo = new Thread(new ThreadStart(ThreadWork)); + tSo.IsBackground = true; + tSo.Start(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message.ToString() + ",数据查询失败", "查询提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + this.dgvData.DataSource = null; + type = cbSelectType.SelectedIndex; + resulttype = resultSelectType.SelectedIndex; + } + + + private void ThreadWork() + { + lblSelectStures.BeginInvoke(new PDelegate(aa)); + + string strDate1 = dtStartTime.Value.ToString("yyyy-MM-dd HH:mm") + ":01"; + string strDate2 = dtEndTime.Value.ToString("yyyy-MM-dd HH:mm") + ":01"; + if (dtEndTime.Value.Year != dtStartTime.Value.Year) + { + MessageBox.Show("请选择日期必须在同一年份内!"); + lblSelectStures.BeginInvoke(new PDelegate(bb)); + return; + } + string flag = cmbFlag.Text; + string strBarcode = txtBarCode.Text.Trim(); + // var dt = dbHelper.GetTestData(type, strBarcode, strDate1, strDate2, flag); + var dt = dbHelper.GetTestData2(type,resulttype, strBarcode, strDate1, strDate2, flag); + if (dt == null || dt.Rows.Count == 0) + { + MessageBox.Show("此时间段无数据或无此条码数据", "系统提示"); + lblSelectStures.BeginInvoke(new PDelegate(bb)); + return; + } + this.dgvData.BeginInvoke(new myDelegate(FillData), new object[] { dt });//异步调用(来填充) + lblSelectStures.BeginInvoke(new PDelegate(bb)); + + } + + + + private void FillData(DataTable dt) + { + dts = dt; + this.dgvData.DataSource = dt.DefaultView; + } + + private void aa() + { + this.lblSelectStures.Text = "正在查询数据..."; + } + private void bb() + { + this.lblSelectStures.Text = "查询结束"; + } + + + private void btnExcel_Click(object sender, EventArgs e) + { + if (dts != null && dgvData.Columns.Count <= 0) + { + MessageBox.Show("请先查询数据,再进行导出", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + SaveFileDialog saveFileDialog = new SaveFileDialog(); + saveFileDialog.Title = "导出Excel"; + saveFileDialog.Filter = "Excel文件(*.xlsx)|*.xlsx"; + saveFileDialog.FilterIndex = 1; + //保存对话框是否记忆上次打开的目录 + saveFileDialog.RestoreDirectory = true; + //设置默认的文件名 + saveFileDialog.DefaultExt = "xlsx"; + //saveFileDialog.DefaultFileName = "查询结果" + DateTime.Now.ToString("yyyyMMddHHmmss"); + var dialogResult = saveFileDialog.ShowDialog(this); + + if (dialogResult == DialogResult.OK) + { + + //string filter = saveFileDialog.FileName.Substring(saveFileDialog.FileName.LastIndexOf(".") + 1); + try + { + MiniExcel.SaveAs(saveFileDialog.FileName, dts); + //ExcelPackage.License.SetNonCommercialOrganization("My Noncommercial organization"); + //EPPlusExcelHelper excelHelper = new EPPlusExcelHelper(saveFileDialog.FileName); + //excelHelper.ExportDataTable("sheet1", dts); + Thread.Sleep(50); + MessageBox.Show("数据导出成功!"); + } + catch (Exception ex) + { + MessageBox.Show("保存的EXCEL已有数据,无法覆盖,重新创建" + ex.Message); + } + + + //if (MessageBox.Show("保存成功,是否打开文件?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes) + //{ + // System.Diagnostics.Process.Start(saveFileDialog.FileName); + //} + } + } + + private void dgvData_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + //自动编号,与数据无关 + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, + e.RowBounds.Location.Y, + dgvData.RowHeadersWidth - 4, + e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, + (e.RowIndex + 1).ToString(), + dgvData.RowHeadersDefaultCellStyle.Font, + rectangle, + dgvData.RowHeadersDefaultCellStyle.ForeColor, + TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + /// + /// 上传MES按钮设置 + /// + /// + /// + private void btnUpMES_Click(object sender, EventArgs e) + { + if (dgvData.Columns.Count <= 1) + { + MessageBox.Show("请先查询数据,再进行上传MES操作", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + try + { + if (cbSelectType.Text=="查询进站数据")//上料 + { + foreach (DataGridViewRow row in dgvData.Rows) + { + if (Convert.ToBoolean(row.Cells[0].Value)) + { + if (Convert.ToInt32(row.Cells["状态"].Value) == 1 || Convert.ToInt32(row.Cells["状态"].Value) == 2) + { + MessageBox.Show("勾选电芯数据已上传", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + else + { + + JY.MES.FMS.FMS_In fMS_In = new MES.FMS.FMS_In(); + + //fMS_In.systemCode = Global.systemConfig.systemCode; + //fMS_In.houseCode = Global.systemConfig.houseCode; + //fMS_In.skuCode = Convert.ToString(row.Cells["条码"].Value); + //fMS_In.deviceCode = Global.systemConfig.deviceCode; + //fMS_In.processCode = Global.systemConfig.processCode; + + + string strJosn = JsonConvert.SerializeObject(fMS_In); + LogManagerControl.AddLog($"PC->FMS[电芯出站]:{strJosn}", LogAddtype.MES); + var result = JY.MES.FMS.MesHelper_EVE.MES_Inbound(fMS_In); + string strRes = "statusCode:" + "[" + result.statusCode + "]" + "statusMessage" + "[" + result.statusMessage + "]"; + LogManagerControl.AddLog($"FMS->PC[电芯出站]:{strRes}", LogAddtype.MES); + + + string NowTime = DateTime.Now.ToString("yyyy - MM - dd HH: mm: ss"); + var result1 = @" UPDATE FeedingData set Flag=2,UploadMESTime='" + NowTime + "' where[ID]=" + Convert.ToString(row.Cells["唯一ID"].Value); + //var result2 = @" UPDATE FeedingData set UploadMESTime='" + NowTime + "' where[ID]='" + Convert.ToString(row.Cells["唯一ID"].Value) + "'"; + DataTable dt = SqlHelper.QueryTable(result1); + } + } + } + } + else//下料 + { + foreach (DataGridViewRow row in dgvData.Rows) + { + if (Convert.ToBoolean(row.Cells[0].Value)) + { + if (Convert.ToInt32(row.Cells["状态"].Value) == 1 || Convert.ToInt32(row.Cells["状态"].Value) == 2) + { + MessageBox.Show("勾选电芯数据已上传", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + else + { + + JY.MES.FMS.FMS_Out fMS_Out = new MES.FMS.FMS_Out(); + //fMS_In.deviceCode = Global.systemConfig.eqp_code; + //fMS_In.houseCode = "test11"; + //fMS_In.skuCode = m.BarCode; + //fMS_In.systemCode = "win10"; + //fMS_In.processCode = Global.systemConfig.seq_code; + //fMS_In.ngCode = ""; + //fMS_Out.systemCode = Global.systemConfig.systemCode; + //fMS_Out.houseCode = Global.systemConfig.houseCode; + //fMS_Out.skuCode = Convert.ToString(row.Cells["条码"].Value); + //fMS_Out.deviceCode = Global.systemConfig.deviceCode; + //fMS_Out.processCode = Global.systemConfig.processCode; + fMS_Out.testResult = "NG"; + fMS_Out.ngCode = "0"; + + JY.MES.FMS.processData ProData = new JY.MES.FMS.processData(); + + ProData.inTime = Convert.ToString(row.Cells["进站时间"].Value); + ProData.outTime = Convert.ToString(row.Cells["进站时间"].Value); + ProData.cspdjg = Convert.ToString(row.Cells["综合结果"].Value); + ProData.cssj = ""; + ProData.cspc = ""; + ProData.csjg = Convert.ToString(row.Cells["综合结果"].Value); + ProData.fcbj = ""; + ProData.fccs = ""; + ProData.fcsj = ""; + ProData.fcyy = ""; + ProData.ngyy = Convert.ToString(row.Cells["备注"].Value); + ProData.ngsj = ""; + ProData.ngwz = ""; + ProData.hjwd = ""; + ProData.hjsd = ""; + ProData.kqjjd = ""; + ProData.workShift = Convert.ToString(row.Cells["班次"].Value); + fMS_Out.processData = ProData; + + string strJosn = JsonConvert.SerializeObject(fMS_Out); + LogManagerControl.AddLog($"PC->FMS[电芯出站]:{strJosn}", LogAddtype.MES); + var result = JY.MES.FMS.MesHelper_EVE.MES_Outbound(fMS_Out); + string strRes = "statusCode:" + "[" + result.statusCode + "]" + "statusMessage" + "[" + result.statusMessage + "]"; + LogManagerControl.AddLog($"FMS->PC[电芯出站]:{strRes}", LogAddtype.MES); + + string NowTime = DateTime.Now.ToString("yyyy - MM - dd HH: mm: ss"); + var result1 = @" UPDATE BlankingData set Flag=2,strUploadMESTime='" + NowTime + "' where[ID]=" + Convert.ToInt32(row.Cells["唯一ID"].Value); + //var result2 = @" UPDATE BlankingData set UploadMESTime='" + NowTime + "' where[ID]='" + Convert.ToString(row.Cells["唯一ID"].Value) + "'"; + DataTable dt = SqlHelper.QueryTable(result1); + } + } + } + } + } + catch + { + MessageBox.Show("手动上传MES失败", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + MessageBox.Show("手动上传MES成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + + + } + /// + /// dgvCellMouseClick鼠标点击列事件 + /// + /// + /// + private void dgvData_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) + { + //不是序号列和标题列时才执行 + if (e.RowIndex != -1 && e.ColumnIndex != -1) + { + //checkbox勾上 + if ((bool)dgvData.Rows[e.RowIndex].Cells[0].EditedFormattedValue == true) + { + //选中改为不选中 + this.dgvData.Rows[e.RowIndex].Cells[0].Value = false; + } + else + { + //不选中改为选中 + this.dgvData.Rows[e.RowIndex].Cells[0].Value = true; + } + } + } + } +} diff --git a/JY.Inspection/Frm/FrmHistoricalDataQuery.designer.cs b/JY.Inspection/Frm/FrmHistoricalDataQuery.designer.cs new file mode 100644 index 0000000..f73a1b9 --- /dev/null +++ b/JY.Inspection/Frm/FrmHistoricalDataQuery.designer.cs @@ -0,0 +1,386 @@ + +namespace JY.Inspection.Frm +{ + partial class FrmHistoricalDataQuery + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmHistoricalDataQuery)); + this.txtBarCode = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel3 = new MetroFramework.Controls.MetroLabel(); + this.btnSelect = new MetroFramework.Controls.MetroButton(); + this.btnExcel = new MetroFramework.Controls.MetroButton(); + this.metroLabel4 = new MetroFramework.Controls.MetroLabel(); + this.cbSelectType = new MetroFramework.Controls.MetroComboBox(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.dgvData = new MetroFramework.Controls.MetroGrid(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.metroLabel5 = new MetroFramework.Controls.MetroLabel(); + this.btnUpMES = new MetroFramework.Controls.MetroButton(); + this.cmbFlag = new MetroFramework.Controls.MetroComboBox(); + this.dtEndTime = new System.Windows.Forms.DateTimePicker(); + this.dtStartTime = new System.Windows.Forms.DateTimePicker(); + this.lblSelectStures = new System.Windows.Forms.Label(); + this.metroLabel2 = new MetroFramework.Controls.MetroLabel(); + this.resultSelectType = new MetroFramework.Controls.MetroComboBox(); + this.metroLabel6 = new MetroFramework.Controls.MetroLabel(); + this.tableLayoutPanel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvData)).BeginInit(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // txtBarCode + // + // + // + // + this.txtBarCode.CustomButton.Image = null; + this.txtBarCode.CustomButton.Location = new System.Drawing.Point(171, 1); + this.txtBarCode.CustomButton.Name = ""; + this.txtBarCode.CustomButton.Size = new System.Drawing.Size(21, 21); + this.txtBarCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtBarCode.CustomButton.TabIndex = 1; + this.txtBarCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtBarCode.CustomButton.UseSelectable = true; + this.txtBarCode.CustomButton.Visible = false; + this.txtBarCode.FontSize = MetroFramework.MetroTextBoxSize.Medium; + this.txtBarCode.Lines = new string[0]; + this.txtBarCode.Location = new System.Drawing.Point(7, 186); + this.txtBarCode.MaxLength = 32767; + this.txtBarCode.Name = "txtBarCode"; + this.txtBarCode.PasswordChar = '\0'; + this.txtBarCode.PromptText = "输入要查询的条码"; + this.txtBarCode.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtBarCode.SelectedText = ""; + this.txtBarCode.SelectionLength = 0; + this.txtBarCode.SelectionStart = 0; + this.txtBarCode.ShortcutsEnabled = true; + this.txtBarCode.Size = new System.Drawing.Size(193, 23); + this.txtBarCode.TabIndex = 1; + this.txtBarCode.UseSelectable = true; + this.txtBarCode.WaterMark = "输入要查询的条码"; + this.txtBarCode.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtBarCode.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel1 + // + this.metroLabel1.AutoSize = true; + this.metroLabel1.Location = new System.Drawing.Point(7, 34); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Size = new System.Drawing.Size(107, 19); + this.metroLabel1.TabIndex = 4; + this.metroLabel1.Text = "查询起始时间:"; + // + // metroLabel3 + // + this.metroLabel3.AutoSize = true; + this.metroLabel3.Location = new System.Drawing.Point(9, 164); + this.metroLabel3.Name = "metroLabel3"; + this.metroLabel3.Size = new System.Drawing.Size(79, 19); + this.metroLabel3.TabIndex = 6; + this.metroLabel3.Text = "查询条码:"; + // + // btnSelect + // + this.btnSelect.Location = new System.Drawing.Point(10, 360); + this.btnSelect.Name = "btnSelect"; + this.btnSelect.Size = new System.Drawing.Size(75, 23); + this.btnSelect.TabIndex = 7; + this.btnSelect.Text = "查 询"; + this.btnSelect.UseSelectable = true; + this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click); + // + // btnExcel + // + this.btnExcel.Location = new System.Drawing.Point(123, 360); + this.btnExcel.Name = "btnExcel"; + this.btnExcel.Size = new System.Drawing.Size(75, 23); + this.btnExcel.TabIndex = 8; + this.btnExcel.Text = "导 出"; + this.btnExcel.UseSelectable = true; + this.btnExcel.Click += new System.EventHandler(this.btnExcel_Click); + // + // metroLabel4 + // + this.metroLabel4.AutoSize = true; + this.metroLabel4.Location = new System.Drawing.Point(9, 230); + this.metroLabel4.Name = "metroLabel4"; + this.metroLabel4.Size = new System.Drawing.Size(79, 19); + this.metroLabel4.TabIndex = 11; + this.metroLabel4.Text = "查询类型:"; + // + // cbSelectType + // + this.cbSelectType.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cbSelectType.FormattingEnabled = true; + this.cbSelectType.ItemHeight = 23; + this.cbSelectType.Items.AddRange(new object[] { + "查询进站数据", + "查询出站数据"}); + this.cbSelectType.Location = new System.Drawing.Point(7, 252); + this.cbSelectType.Name = "cbSelectType"; + this.cbSelectType.Size = new System.Drawing.Size(193, 29); + this.cbSelectType.TabIndex = 12; + this.cbSelectType.UseSelectable = true; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 2; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 220F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.Controls.Add(this.dgvData, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.groupBox1, 0, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(20, 60); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 1; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1044, 546); + this.tableLayoutPanel1.TabIndex = 13; + // + // dgvData + // + this.dgvData.AllowUserToAddRows = false; + this.dgvData.AllowUserToDeleteRows = false; + this.dgvData.AllowUserToResizeRows = false; + this.dgvData.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvData.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dgvData.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dgvData.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.SkyBlue; + dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dgvData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvData.DefaultCellStyle = dataGridViewCellStyle2; + this.dgvData.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvData.EnableHeadersVisualStyles = false; + this.dgvData.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + this.dgvData.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvData.Location = new System.Drawing.Point(223, 3); + this.dgvData.Name = "dgvData"; + this.dgvData.ReadOnly = true; + this.dgvData.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvData.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; + this.dgvData.RowHeadersWidth = 51; + this.dgvData.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.dgvData.RowTemplate.Height = 23; + this.dgvData.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgvData.Size = new System.Drawing.Size(819, 540); + this.dgvData.TabIndex = 16; + this.dgvData.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvData_CellMouseClick); + this.dgvData.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvData_RowPostPaint); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.resultSelectType); + this.groupBox1.Controls.Add(this.metroLabel6); + this.groupBox1.Controls.Add(this.metroLabel5); + this.groupBox1.Controls.Add(this.btnUpMES); + this.groupBox1.Controls.Add(this.cmbFlag); + this.groupBox1.Controls.Add(this.dtEndTime); + this.groupBox1.Controls.Add(this.dtStartTime); + this.groupBox1.Controls.Add(this.lblSelectStures); + this.groupBox1.Controls.Add(this.metroLabel2); + this.groupBox1.Controls.Add(this.btnExcel); + this.groupBox1.Controls.Add(this.btnSelect); + this.groupBox1.Controls.Add(this.cbSelectType); + this.groupBox1.Controls.Add(this.metroLabel1); + this.groupBox1.Controls.Add(this.metroLabel4); + this.groupBox1.Controls.Add(this.txtBarCode); + this.groupBox1.Controls.Add(this.metroLabel3); + this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox1.Location = new System.Drawing.Point(3, 3); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(214, 540); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "查询条件"; + // + // metroLabel5 + // + this.metroLabel5.AutoSize = true; + this.metroLabel5.Location = new System.Drawing.Point(9, 425); + this.metroLabel5.Name = "metroLabel5"; + this.metroLabel5.Size = new System.Drawing.Size(91, 19); + this.metroLabel5.TabIndex = 53; + this.metroLabel5.Text = "上传MES状态"; + this.metroLabel5.Visible = false; + // + // btnUpMES + // + this.btnUpMES.Location = new System.Drawing.Point(10, 392); + this.btnUpMES.Name = "btnUpMES"; + this.btnUpMES.Size = new System.Drawing.Size(75, 23); + this.btnUpMES.TabIndex = 51; + this.btnUpMES.Text = "上传MES"; + this.btnUpMES.UseSelectable = true; + this.btnUpMES.Visible = false; + this.btnUpMES.Click += new System.EventHandler(this.btnUpMES_Click); + // + // cmbFlag + // + this.cmbFlag.FormattingEnabled = true; + this.cmbFlag.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.cmbFlag.ItemHeight = 23; + this.cmbFlag.Items.AddRange(new object[] { + "全部", + "自动上传MES数据", + "手动上传MES数据", + "未上传MES数据"}); + this.cmbFlag.Location = new System.Drawing.Point(6, 447); + this.cmbFlag.Name = "cmbFlag"; + this.cmbFlag.Size = new System.Drawing.Size(192, 29); + this.cmbFlag.TabIndex = 50; + this.cmbFlag.UseSelectable = true; + this.cmbFlag.Visible = false; + // + // dtEndTime + // + this.dtEndTime.CustomFormat = "yyyy-MM-dd HH:mm:ss"; + this.dtEndTime.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dtEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtEndTime.Location = new System.Drawing.Point(10, 118); + this.dtEndTime.Name = "dtEndTime"; + this.dtEndTime.Size = new System.Drawing.Size(189, 26); + this.dtEndTime.TabIndex = 17; + // + // dtStartTime + // + this.dtStartTime.CalendarForeColor = System.Drawing.SystemColors.ControlLight; + this.dtStartTime.CustomFormat = "yyyy-MM-dd HH:mm:ss"; + this.dtStartTime.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dtStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtStartTime.Location = new System.Drawing.Point(10, 56); + this.dtStartTime.Name = "dtStartTime"; + this.dtStartTime.Size = new System.Drawing.Size(189, 26); + this.dtStartTime.TabIndex = 16; + // + // lblSelectStures + // + this.lblSelectStures.AutoSize = true; + this.lblSelectStures.Location = new System.Drawing.Point(59, 354); + this.lblSelectStures.Name = "lblSelectStures"; + this.lblSelectStures.Size = new System.Drawing.Size(0, 12); + this.lblSelectStures.TabIndex = 15; + // + // metroLabel2 + // + this.metroLabel2.AutoSize = true; + this.metroLabel2.Location = new System.Drawing.Point(7, 96); + this.metroLabel2.Name = "metroLabel2"; + this.metroLabel2.Size = new System.Drawing.Size(107, 19); + this.metroLabel2.TabIndex = 5; + this.metroLabel2.Text = "查询结束时间:"; + // + // resultSelectType + // + this.resultSelectType.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.resultSelectType.FormattingEnabled = true; + this.resultSelectType.ItemHeight = 23; + this.resultSelectType.Items.AddRange(new object[] { + "全部", + "OK", + "NG"}); + this.resultSelectType.Location = new System.Drawing.Point(8, 317); + this.resultSelectType.Name = "resultSelectType"; + this.resultSelectType.Size = new System.Drawing.Size(193, 29); + this.resultSelectType.TabIndex = 55; + this.resultSelectType.UseSelectable = true; + // + // metroLabel6 + // + this.metroLabel6.AutoSize = true; + this.metroLabel6.Location = new System.Drawing.Point(10, 295); + this.metroLabel6.Name = "metroLabel6"; + this.metroLabel6.Size = new System.Drawing.Size(79, 19); + this.metroLabel6.TabIndex = 54; + this.metroLabel6.Text = "结果类型:"; + // + // FrmHistoricalDataQuery + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1084, 626); + this.Controls.Add(this.tableLayoutPanel1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Movable = false; + this.Name = "FrmHistoricalDataQuery"; + this.Text = "历史数据查询"; + this.Load += new System.EventHandler(this.FrmHistoricalDataQuery_Load); + this.tableLayoutPanel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgvData)).EndInit(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + private MetroFramework.Controls.MetroTextBox txtBarCode; + private MetroFramework.Controls.MetroLabel metroLabel1; + private MetroFramework.Controls.MetroLabel metroLabel3; + private MetroFramework.Controls.MetroButton btnSelect; + private MetroFramework.Controls.MetroButton btnExcel; + private MetroFramework.Controls.MetroLabel metroLabel4; + private MetroFramework.Controls.MetroComboBox cbSelectType; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.GroupBox groupBox1; + private MetroFramework.Controls.MetroLabel metroLabel2; + private MetroFramework.Controls.MetroGrid dgvData; + private System.Windows.Forms.Label lblSelectStures; + private System.Windows.Forms.DateTimePicker dtStartTime; + private System.Windows.Forms.DateTimePicker dtEndTime; + private MetroFramework.Controls.MetroButton btnUpMES; + private MetroFramework.Controls.MetroComboBox cmbFlag; + private MetroFramework.Controls.MetroLabel metroLabel5; + private MetroFramework.Controls.MetroComboBox resultSelectType; + private MetroFramework.Controls.MetroLabel metroLabel6; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmHistoricalDataQuery.resx b/JY.Inspection/Frm/FrmHistoricalDataQuery.resx new file mode 100644 index 0000000..acb5bb2 --- /dev/null +++ b/JY.Inspection/Frm/FrmHistoricalDataQuery.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWU1QAFpNUABZTVASWU1QH1lNUB9ZTVAfWU1QH1lN + UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUBJaTVAAWU1QAFlN + UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXE5OAFlNUABZTVAFWU1QaFlLUM1YS0/gWEtQ4FhL + UOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS0/gWUtQzVlN + UGhZTVAFWU1QAFxOTgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWS1EAWU1QAFlNUE5ZTlD0YGxY/2eH + Xv9nh17/Z4de/2eHXv9nh17/Z4de/2eHXv9nh17/Z4de/2eHXv9nh17/Z4de/2eHXv9nh17/Z4de/2eH + Xv9gbFj/WU5Q9FlNUE5ZTVAAVktRAAA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ABZTVAAWU1QAFlNUABWSlAAWExPpV5TVv9yaGr/c2ps/3NqbP9zamz/c2ps/3Jo + av9eU1b/WExPpVZKUQFZTVAAWU1QAFlNUABYTVAAWU1QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVklRAFlNUABZTVA7WU1QwlhMT+BYTE/gWExP4FhM + T+BYTE/gWExP4FlNUMJZTVA7WU1QAFZKUgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN + UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8= + + + \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmParaConfig.cs b/JY.Inspection/Frm/FrmParaConfig.cs new file mode 100644 index 0000000..d1c0480 --- /dev/null +++ b/JY.Inspection/Frm/FrmParaConfig.cs @@ -0,0 +1,182 @@ +using JY.DAL; +using JY.Model; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JY.Inspection.Frm +{ + public partial class FrmParaConfig : MetroFramework.Forms.MetroForm + { + public delegate void SendParamIN(); + public SendParamIN sendParamIN; + + /// + /// 数据库访问接口 + /// + private IDbHelper dbHelper = new OpSqlDataBase(); + /// + /// 定义DataGridView数据源 + /// + private BindingList blPLCConfigBaseList = new BindingList(); + + + public FrmParaConfig() + { + InitializeComponent(); + } + + private void FrmParaEdit_Load(object sender, EventArgs e) + { + this.dgvEdit.AutoGenerateColumns = false; + this.dgvEdit.DataSource = blPLCConfigBaseList; + setComb(); + } + /// + /// 加载产品型号下拉 + /// + private void setComb() + { + var list = dbHelper.GetProductModelList(); + + cmbProductModel.DataSource = list; + cmbProductModel.DisplayMember = "ModelName"; + cmbProductModel.ValueMember = "ModelName"; + } + + /// + /// 保存数据 + /// + /// + /// + private void btnOK_Click(object sender, EventArgs e) + { + string strModelType = cmbProductModel.Text.Trim(); + if (string.IsNullOrEmpty(strModelType) || blPLCConfigBaseList.Count <= 0) + { + MessageBox.Show("产品型号和参数列表不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + try + { + dbHelper.AddProductParaList(blPLCConfigBaseList.ToList()); + MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + MessageBox.Show("保存失败:" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + /// + /// 添加型号 + /// + /// + /// + private void btnAddProductModel_Click(object sender, EventArgs e) + { + var productModel = new ProductModel(); + productModel.ModelName = txtProductModel.Text; + productModel.Remark = txtProductModel.Text; + + if (string.IsNullOrEmpty(productModel.ModelName)) + { + MessageBox.Show("产品型号不能为空!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + + try + { + dbHelper.AddProductModel(productModel); + setComb(); + MessageBox.Show("新增成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + MessageBox.Show("新增失败:" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + //同步刷新主界面的类型选项 + sendParamIN(); + } + + /// + /// 删除型号 + /// + /// + /// + private void btnDelProductModel_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(cmbProductModel.Text.Trim())) + { + MessageBox.Show("产品型号不能为空!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + if (MessageBox.Show("删除该型号设置将无法恢复,确定要删除该产品型号?", "系统提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) + { + try + { + dbHelper.DelProductModel(cmbProductModel.Text); + + setComb(); + MessageBox.Show("删除成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + MessageBox.Show("删除失败:" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + + /// + /// 产品型号下拉框选择变更事件 + /// + /// + /// + private void cmbProductModel_SelectedIndexChanged(object sender, EventArgs e) + { + var list = dbHelper.GetProductParaByProdModel(cmbProductModel.Text); + blPLCConfigBaseList.Clear(); + foreach (var item in list) + { + blPLCConfigBaseList.Add(item); + } + } + + /// + /// 关闭事件 + /// + /// + /// + private void FrmParaEdit_FormClosing(object sender, FormClosingEventArgs e) + { + this.DialogResult = DialogResult.OK; + } + + /// + /// DataGrid自动添加行号 + /// + /// + /// + private void dgvEdit_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + //自动编号,与数据无关 + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, + e.RowBounds.Location.Y, + dgvEdit.RowHeadersWidth - 4, + e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, + (e.RowIndex + 1).ToString(), + dgvEdit.RowHeadersDefaultCellStyle.Font, + rectangle, + dgvEdit.RowHeadersDefaultCellStyle.ForeColor, + TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + } +} diff --git a/JY.Inspection/Frm/FrmParaConfig.designer.cs b/JY.Inspection/Frm/FrmParaConfig.designer.cs new file mode 100644 index 0000000..6e27654 --- /dev/null +++ b/JY.Inspection/Frm/FrmParaConfig.designer.cs @@ -0,0 +1,263 @@ + +namespace JY.Inspection.Frm +{ + partial class FrmParaConfig + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmParaConfig)); + this.btnAddProductModel = new MetroFramework.Controls.MetroButton(); + this.txtProductModel = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.dgvEdit = new MetroFramework.Controls.MetroGrid(); + this.ParaName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ParaValue = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.btnDelProductModel = new MetroFramework.Controls.MetroButton(); + this.cmbProductModel = new MetroFramework.Controls.MetroComboBox(); + this.metroLabel2 = new MetroFramework.Controls.MetroLabel(); + this.btnOK = new MetroFramework.Controls.MetroButton(); + ((System.ComponentModel.ISupportInitialize)(this.dgvEdit)).BeginInit(); + this.SuspendLayout(); + // + // btnAddProductModel + // + this.btnAddProductModel.Location = new System.Drawing.Point(811, 420); + this.btnAddProductModel.Margin = new System.Windows.Forms.Padding(4); + this.btnAddProductModel.Name = "btnAddProductModel"; + this.btnAddProductModel.Size = new System.Drawing.Size(100, 29); + this.btnAddProductModel.TabIndex = 1; + this.btnAddProductModel.Text = "添 加"; + this.btnAddProductModel.UseSelectable = true; + this.btnAddProductModel.Click += new System.EventHandler(this.btnAddProductModel_Click); + // + // txtProductModel + // + // + // + // + this.txtProductModel.CustomButton.Image = null; + this.txtProductModel.CustomButton.Location = new System.Drawing.Point(185, 1); + this.txtProductModel.CustomButton.Margin = new System.Windows.Forms.Padding(4); + this.txtProductModel.CustomButton.Name = ""; + this.txtProductModel.CustomButton.Size = new System.Drawing.Size(27, 27); + this.txtProductModel.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtProductModel.CustomButton.TabIndex = 1; + this.txtProductModel.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtProductModel.CustomButton.UseSelectable = true; + this.txtProductModel.CustomButton.Visible = false; + this.txtProductModel.Lines = new string[0]; + this.txtProductModel.Location = new System.Drawing.Point(891, 352); + this.txtProductModel.Margin = new System.Windows.Forms.Padding(4); + this.txtProductModel.MaxLength = 32767; + this.txtProductModel.Name = "txtProductModel"; + this.txtProductModel.PasswordChar = '\0'; + this.txtProductModel.PromptText = "请输入新增加的产品型号"; + this.txtProductModel.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtProductModel.SelectedText = ""; + this.txtProductModel.SelectionLength = 0; + this.txtProductModel.SelectionStart = 0; + this.txtProductModel.ShortcutsEnabled = true; + this.txtProductModel.Size = new System.Drawing.Size(213, 29); + this.txtProductModel.TabIndex = 2; + this.txtProductModel.UseSelectable = true; + this.txtProductModel.WaterMark = "请输入新增加的产品型号"; + this.txtProductModel.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtProductModel.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel1 + // + this.metroLabel1.AutoSize = true; + this.metroLabel1.Location = new System.Drawing.Point(757, 352); + this.metroLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Size = new System.Drawing.Size(114, 20); + this.metroLabel1.TabIndex = 3; + this.metroLabel1.Text = "新增产品型号:"; + // + // dgvEdit + // + this.dgvEdit.AllowUserToAddRows = false; + this.dgvEdit.AllowUserToDeleteRows = false; + this.dgvEdit.AllowUserToResizeRows = false; + this.dgvEdit.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvEdit.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dgvEdit.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dgvEdit.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); + dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvEdit.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dgvEdit.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvEdit.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.ParaName, + this.ParaValue}); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvEdit.DefaultCellStyle = dataGridViewCellStyle2; + this.dgvEdit.EnableHeadersVisualStyles = false; + this.dgvEdit.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + this.dgvEdit.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvEdit.Location = new System.Drawing.Point(15, 79); + this.dgvEdit.Margin = new System.Windows.Forms.Padding(4); + this.dgvEdit.Name = "dgvEdit"; + this.dgvEdit.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvEdit.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; + this.dgvEdit.RowHeadersWidth = 51; + this.dgvEdit.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black; + this.dgvEdit.RowsDefaultCellStyle = dataGridViewCellStyle4; + this.dgvEdit.RowTemplate.Height = 23; + this.dgvEdit.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgvEdit.Size = new System.Drawing.Size(731, 866); + this.dgvEdit.TabIndex = 4; + this.dgvEdit.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvEdit_RowPostPaint); + // + // ParaName + // + this.ParaName.DataPropertyName = "ParaName"; + this.ParaName.HeaderText = "名称"; + this.ParaName.MinimumWidth = 6; + this.ParaName.Name = "ParaName"; + this.ParaName.ReadOnly = true; + this.ParaName.Width = 350; + // + // ParaValue + // + this.ParaValue.DataPropertyName = "ParaValue"; + this.ParaValue.HeaderText = "值"; + this.ParaValue.MinimumWidth = 6; + this.ParaValue.Name = "ParaValue"; + this.ParaValue.Width = 125; + // + // btnDelProductModel + // + this.btnDelProductModel.Location = new System.Drawing.Point(941, 420); + this.btnDelProductModel.Margin = new System.Windows.Forms.Padding(4); + this.btnDelProductModel.Name = "btnDelProductModel"; + this.btnDelProductModel.Size = new System.Drawing.Size(100, 29); + this.btnDelProductModel.TabIndex = 5; + this.btnDelProductModel.Text = "删 除"; + this.btnDelProductModel.UseSelectable = true; + this.btnDelProductModel.Click += new System.EventHandler(this.btnDelProductModel_Click); + // + // cmbProductModel + // + this.cmbProductModel.FormattingEnabled = true; + this.cmbProductModel.ItemHeight = 24; + this.cmbProductModel.Location = new System.Drawing.Point(867, 112); + this.cmbProductModel.Margin = new System.Windows.Forms.Padding(4); + this.cmbProductModel.Name = "cmbProductModel"; + this.cmbProductModel.Size = new System.Drawing.Size(228, 30); + this.cmbProductModel.TabIndex = 6; + this.cmbProductModel.UseSelectable = true; + this.cmbProductModel.SelectedIndexChanged += new System.EventHandler(this.cmbProductModel_SelectedIndexChanged); + // + // metroLabel2 + // + this.metroLabel2.AutoSize = true; + this.metroLabel2.Location = new System.Drawing.Point(753, 115); + this.metroLabel2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.metroLabel2.Name = "metroLabel2"; + this.metroLabel2.Size = new System.Drawing.Size(84, 20); + this.metroLabel2.TabIndex = 8; + this.metroLabel2.Text = "产品型号:"; + // + // btnOK + // + this.btnOK.Location = new System.Drawing.Point(811, 204); + this.btnOK.Margin = new System.Windows.Forms.Padding(4); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(229, 41); + this.btnOK.TabIndex = 10; + this.btnOK.Text = "保 存"; + this.btnOK.UseSelectable = true; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // FrmParaConfig + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1200, 961); + this.Controls.Add(this.txtProductModel); + this.Controls.Add(this.btnOK); + this.Controls.Add(this.metroLabel2); + this.Controls.Add(this.cmbProductModel); + this.Controls.Add(this.btnDelProductModel); + this.Controls.Add(this.dgvEdit); + this.Controls.Add(this.metroLabel1); + this.Controls.Add(this.btnAddProductModel); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(4); + this.MinimizeBox = false; + this.Movable = false; + this.Name = "FrmParaConfig"; + this.Padding = new System.Windows.Forms.Padding(27, 75, 27, 25); + this.Text = "参数编辑"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmParaEdit_FormClosing); + this.Load += new System.EventHandler(this.FrmParaEdit_Load); + ((System.ComponentModel.ISupportInitialize)(this.dgvEdit)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private MetroFramework.Controls.MetroButton btnAddProductModel; + private MetroFramework.Controls.MetroTextBox txtProductModel; + private MetroFramework.Controls.MetroLabel metroLabel1; + private MetroFramework.Controls.MetroGrid dgvEdit; + private MetroFramework.Controls.MetroButton btnDelProductModel; + private MetroFramework.Controls.MetroComboBox cmbProductModel; + private MetroFramework.Controls.MetroLabel metroLabel2; + private MetroFramework.Controls.MetroButton btnOK; + private System.Windows.Forms.DataGridViewTextBoxColumn ParaName; + private System.Windows.Forms.DataGridViewTextBoxColumn ParaValue; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmParaConfig.resx b/JY.Inspection/Frm/FrmParaConfig.resx new file mode 100644 index 0000000..3148922 --- /dev/null +++ b/JY.Inspection/Frm/FrmParaConfig.resx @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken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UgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN + UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8= + + + \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmPwd.Designer.cs b/JY.Inspection/Frm/FrmPwd.Designer.cs new file mode 100644 index 0000000..297cb7e --- /dev/null +++ b/JY.Inspection/Frm/FrmPwd.Designer.cs @@ -0,0 +1,103 @@ +namespace JY.Inspection.Frm +{ + partial class FrmPwd + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.txtPwd = new System.Windows.Forms.TextBox(); + this.btOK = new System.Windows.Forms.Button(); + this.btExit = new System.Windows.Forms.Button(); + this.metroLabel6 = new MetroFramework.Controls.MetroLabel(); + this.SuspendLayout(); + // + // txtPwd + // + this.txtPwd.Location = new System.Drawing.Point(28, 32); + this.txtPwd.Name = "txtPwd"; + this.txtPwd.PasswordChar = '*'; + this.txtPwd.Size = new System.Drawing.Size(203, 21); + this.txtPwd.TabIndex = 0; + // + // btOK + // + this.btOK.Location = new System.Drawing.Point(41, 59); + this.btOK.Name = "btOK"; + this.btOK.Size = new System.Drawing.Size(75, 23); + this.btOK.TabIndex = 1; + this.btOK.Text = "确定"; + this.btOK.UseVisualStyleBackColor = true; + this.btOK.Click += new System.EventHandler(this.btOK_Click); + // + // btExit + // + this.btExit.Location = new System.Drawing.Point(134, 59); + this.btExit.Name = "btExit"; + this.btExit.Size = new System.Drawing.Size(75, 23); + this.btExit.TabIndex = 2; + this.btExit.Text = "退出"; + this.btExit.UseVisualStyleBackColor = true; + this.btExit.Click += new System.EventHandler(this.btExit_Click); + // + // metroLabel6 + // + this.metroLabel6.AutoSize = true; + this.metroLabel6.BackColor = System.Drawing.SystemColors.Control; + this.metroLabel6.Location = new System.Drawing.Point(98, 9); + this.metroLabel6.Name = "metroLabel6"; + this.metroLabel6.Size = new System.Drawing.Size(65, 19); + this.metroLabel6.TabIndex = 11; + this.metroLabel6.Text = "输入密码"; + // + // FrmPwd + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(243, 94); + this.Controls.Add(this.metroLabel6); + this.Controls.Add(this.btExit); + this.Controls.Add(this.btOK); + this.Controls.Add(this.txtPwd); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FrmPwd"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "FrmPwd"; + this.Load += new System.EventHandler(this.FrmPwd_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox txtPwd; + private System.Windows.Forms.Button btOK; + private System.Windows.Forms.Button btExit; + private MetroFramework.Controls.MetroLabel metroLabel6; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmPwd.cs b/JY.Inspection/Frm/FrmPwd.cs new file mode 100644 index 0000000..ebab1b7 --- /dev/null +++ b/JY.Inspection/Frm/FrmPwd.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JY.Inspection.Frm +{ + public partial class FrmPwd : Form + { + public FrmPwd() + { + InitializeComponent(); + } + + private void FrmPwd_Load(object sender, EventArgs e) + { + + } + + private void btOK_Click(object sender, EventArgs e) + { + if (txtPwd.Text.ToLower().Trim() == "eve@2022") + { + this.DialogResult = DialogResult.OK; + } + else + { + MessageBox.Show("输入的密码不正确!"); + } + } + + private void btExit_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + } + } +} diff --git a/JY.Inspection/Frm/FrmPwd.resx b/JY.Inspection/Frm/FrmPwd.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/JY.Inspection/Frm/FrmPwd.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmStatistics.cs b/JY.Inspection/Frm/FrmStatistics.cs new file mode 100644 index 0000000..13a8a61 --- /dev/null +++ b/JY.Inspection/Frm/FrmStatistics.cs @@ -0,0 +1,551 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Windows.Forms; +using System.Windows.Forms.DataVisualization.Charting; +using JY.DAL; +using JY.Model; +using JY.Utility; +using MetroFramework.Forms; + +namespace JY.Inspection.Frm +{ + public partial class FrmStatistics : MetroForm + { + /// + /// 数据库访问接口 + /// + private IDbHelper dbHelper = new OpSqlDataBase(); + /// + /// 读取成功 + /// + public bool isReadOK = true; + /// + /// Timer是否运行 + /// + public bool isEnabled = false; + /// + /// chart图表Y轴的上限值 + /// + int iChartHeight = 5000; + + + /// + /// 读取 + /// + public System.Timers.Timer timerStatistics1; + /// + /// 读取24小时产能统计 + /// + public System.Timers.Timer timer_HourProd; + + /// + /// 投入产出饼状图显示委托 + /// + /// + /// + private delegate void UpdateDataChart2(List xData, List yData); + /// + /// 各不良统计NG显示委托 + /// + /// + private delegate void UpdateDataChart3(List xData, List yData); + /// + /// 不良统计项目 + /// + List NGList = new List(); + /// + /// 生产统计项目 + /// + List ProductionList = new List(); + + + public FrmStatistics() + { + InitializeComponent(); + + } + + /// + /// 窗体实例 + /// + private static FrmStatistics _instance; + internal static FrmStatistics Instance + { + get + { + if (_instance == null) + _instance = new FrmStatistics(); + return _instance; + } + } + + private void FrmStatistics_Load(object sender, EventArgs e) + { + + //SetProductionList(); + //OrgChart(); + //GetValue(); + //InitTimer(); + } + + /// + /// 初始化Timer控件 + /// + internal void InitTimer() + { + + OrgChart(); + SetProductionList(); + isEnabled = true; + + + } + + /// + ///定义饼图和右上角柱状图显示类型 + /// + /// + internal void SetProductionList() + { + //不良统计项目 + NGList.Add(new ChartDataType() { DataType = "线扫扫码NG" }); + NGList.Add(new ChartDataType() { DataType = "分档扫码NG" }); + NGList.Add(new ChartDataType() { DataType = "侧面不良" }); + NGList.Add(new ChartDataType() { DataType = "正极不良" }); + NGList.Add(new ChartDataType() { DataType = "负极不良" }); + //生产统计项目 + ProductionList.Add(new ChartDataType() { DataType = "生产总数" }); + ProductionList.Add(new ChartDataType() { DataType = "良品数" }); + ProductionList.Add(new ChartDataType() { DataType = "不良数" }); + } + + /// + /// Chart控件初始化 + /// + internal void OrgChart() + { + #region 24小时统计 + chart1.Series.Clear(); + chart1.Titles.Clear(); + chart1.ChartAreas[0].AxisY.Minimum = 0; + chart1.ChartAreas[0].AxisY.Maximum = iChartHeight + 500; + + ChartHelper.AddSeries(chart1, "投入", SeriesChartType.Column, Color.DodgerBlue, Color.Red, true); + ChartHelper.AddSeries(chart1, "产出", SeriesChartType.Column, Color.Lime, Color.Red, true); + ChartHelper.AddSeries(chart1, "优率", SeriesChartType.Spline, Color.Red, Color.Red); + + ChartHelper.SetTitle(chart1, "当日每2小时投入与产出", new Font("微软雅黑", 18), Docking.Top, Color.Black); + ChartHelper.SetStyle(chart1, Color.White, Color.Black); + ChartHelper.SetLegend(chart1, Docking.Top, StringAlignment.Center, Color.White, Color.Black); + ChartHelper.SetXY(chart1, "时间", "数值", StringAlignment.Far, Color.Black, Color.Black, AxisArrowStyle.None, 1, 2); + ChartHelper.SetMajorGrid(chart1, Color.White, 20, 2); + #endregion + + #region 数据统计 + chartNgShow.Series.Clear(); + chartNgShow.Titles.Clear(); + chartNgShow.ChartAreas[0].AxisY.Minimum = 0; + chartNgShow.ChartAreas[0].AxisY.Maximum = iChartHeight + 500; + foreach (var item in NGList) + { + ChartHelper.AddSeries(chartNgShow, item.DataType, SeriesChartType.Column, Color.Red, Color.Red, true); + } + ChartHelper.SetTitle(chartNgShow, "各不良项", new Font("微软雅黑", 22), Docking.Top, Color.Black); + ChartHelper.SetStyle(chartNgShow, Color.White, Color.Black); + ChartHelper.SetLegend(chartNgShow, Docking.Top, StringAlignment.Center, Color.White, Color.Black); + ChartHelper.SetXY(chartNgShow, "不良项", "数值", StringAlignment.Far, Color.Black, Color.Black, AxisArrowStyle.None, 1, 2); + ChartHelper.SetMajorGrid(chartNgShow, Color.White, 20, 2); + #endregion + + //投入产出统计 + ChartHelper.SetTitle(chartToalShow, "投入产出", new Font("微软雅黑", 22), Docking.Top, Color.Black); + chartToalShow.Series[0].ChartType = SeriesChartType.Pie;//设置图表类型为饼图 + //chart2.Series[0].CustomProperties="PieLabel"+"PieSize = 50";//设置饼图参数 + chartToalShow.Series[0].CustomProperties = "DoughnutRadius=60, PieLabelStyle=Disabled, PieDrawingStyle=SoftEdge"; + chartToalShow.Series[0]["PieLabelStyle"] = "Inside";//将文字移到外侧 + chartToalShow.Series[0].XValueType = ChartValueType.String; + } + + /// + /// 读取PLC产能统计 + /// + /// + /// + private void TimerUpGetData() + { + if (!HomeForm.startup) + { + return; + } + if (isReadOK) + { + isReadOK = false; + GetValue(); + } + + } + + /// + /// 获取图表数据 + /// + public void GetValue() + { + try + { + if (isEnabled) + { + + int ProdAllQty = HomeForm.omronPLCCom.lstMcUI[0].ReadIntDReg("HMI.生产总数"); + int ProdOKQty = HomeForm.omronPLCCom.lstMcUI[0].ReadIntDReg("HMI.OK总数"); + int ProdNGQty= HomeForm.omronPLCCom.lstMcUI[0].ReadIntDReg("HMI.NG总数"); + int ProdSanNgQty = 123;//扫码NG + int ProdVolNgQty = 145;//电压NG + + //從PLC讀取數據賦值給到NGList + ProductionList.Where(p => p.DataType == "生产总数").FirstOrDefault().DataCount = ProdAllQty; + ProductionList.Where(p => p.DataType == "良品数").FirstOrDefault().DataCount = ProdOKQty; + ProductionList.Where(p => p.DataType == "不良数").FirstOrDefault().DataCount = ProdNGQty; + + + + //從PLC讀取數據賦值給到NGList + NGList.Where(p => p.DataType == "线扫扫码NG").FirstOrDefault().DataCount = ProdSanNgQty; + NGList.Where(p => p.DataType == "分档扫码NG").FirstOrDefault().DataCount = ProdSanNgQty; + NGList.Where(p => p.DataType == "侧面不良").FirstOrDefault().DataCount = ProdVolNgQty; + NGList.Where(p => p.DataType == "正极不良").FirstOrDefault().DataCount = ProdVolNgQty; + NGList.Where(p => p.DataType == "负极不良").FirstOrDefault().DataCount = ProdSanNgQty; + + ShowChartData(); + //------------------------------每小时产能------------------------------------------ + string strErr = ""; + DateTime dateTime = DateTime.Now; + string strDate = dateTime.ToString("yyyy-MM-dd"); + int Hour = dateTime.Hour; + + //读取PLC投入总数 + int ProdCurrAllQty = GetToDayHourQty(Hour, true); + //读取PLC产出数 + int ProdCurrOKQty = GetToDayHourQty(Hour, false); + HourprodEntity mh = new HourprodEntity(); + mh.FDate = strDate; + mh.FHour = Hour; + mh.ProdIn = ProdCurrAllQty; + mh.ProdOut = ProdCurrOKQty; + mh.TestTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + + var iResult = dbHelper.UpdateHourprodData(mh); + if (iResult <= 0) + { + MessageBox.Show("存储每小时产能失败" + strErr, "系统异常", MessageBoxButtons.OK, MessageBoxIcon.Hand); + LogHelper.Error("存储每小时产能失败" + strErr, new Exception("异常信息")); + } + isReadOK = true; + } + + } + catch (Exception ex) + { + LogHelper.Error(ex.Message, new Exception("异常信息")); + timerStatistics1.Enabled = false; + isReadOK = true; + } + } + + /// + /// 每小时产能读取处理 + /// + /// + /// + /// + private int GetToDayHourQty(int hour, bool flag) + { + try + { + string strAddr = ""; + if (hour == 0) + { + hour = 24; + } + //else + //{ + // hour = hour - 1; + //} + if (flag)//产出 + { + strAddr = "W" + (1040 + hour); + } + else//良品数 + { + strAddr = "W" + (1070 + hour); + } + int ProdNGQty = HomeForm.omronPLCCom.lstMcUI[0].ReadIntDReg(strAddr);//生产NG数量 + return ProdNGQty; + + } + catch (Exception ex) + { + LogHelper.Error(ex.Message, new Exception("异常信息")); + MessageBox.Show(ex.Message, "系统异常", MessageBoxButtons.OK, MessageBoxIcon.Hand); + } + return 0; + } + + /// + /// 刷新饼图生产统计信息;刷新生产不良统计信息 + /// + public void ShowChartData() + { + try + { + //不良类型统计 + List xData = NGList.Select(c => c.DataType).ToList(); + List yData = NGList.Select(c => c.DataCount).ToList(); + ShowNGChart(xData, yData); + + //生产总数统计 + var xlist = ProductionList.Select(c => c.DataType).ToList(); + var ylist = ProductionList.Select(c => c.DataCount).ToList(); + ShowChartToal(xlist, ylist); + } + catch (Exception ex) + { + LogHelper.Error(ex.Message, new Exception("异常信息")); + MessageBox.Show(ex.Message, "系统异常", MessageBoxButtons.OK, MessageBoxIcon.Hand); + } + + } + + /// + /// 投入产出饼状图显示 + /// + /// + /// + private void ShowChartToal(List xData, List yData) + { + if (chartToalShow.InvokeRequired) + { + UpdateDataChart2 c = new UpdateDataChart2(ShowChartToal); + this.Invoke(c, new object[] { xData, yData }); + } + else + { + chartToalShow.Series[0].Points.DataBindXY(xData, yData); + } + + + } + + /// + /// 不良数统计显示 + /// + /// + private void ShowNGChart(List xData, List yData) + { + if (chartNgShow.InvokeRequired) + { + UpdateDataChart3 c = new UpdateDataChart3(ShowNGChart); + this.Invoke(c, new object[] { xData, yData }); + } + else + { + chartNgShow.Series[0].Points.DataBindXY(xData, yData); + } + } + + + /// + /// 读取产入产出 + /// + /// + /// + /// + private void TimerUpHourProd() + { + try + { + if (isEnabled) + { + List chart24Hours = new List(); + DateTime dtTime = DateTime.Now; + string strDate = dtTime.ToString("yyyy-MM-dd"); + int Hour = dtTime.Hour; + var listTotal = dbHelper.GetProdTotal(strDate, 0);// 查询稼动率表中total数据 + + if (listTotal != null && listTotal.Count > 0) + { + for (int i = 1; i <= 12; i++) + { + if (!isEnabled) + { + break; + } + int j = i * 2; + int m = j - 2; + int n = j - 1; + //当前时段第一个小时 + var hour1 = listTotal.Where(p => p.FHour == m).FirstOrDefault(); + //当前时段第二个小时 + var hour2 = listTotal.Where(p => p.FHour == n).FirstOrDefault(); + int ProdALLQty = 0; + int ProdOKQty = 0; + int ProdNGQty = 0; + string strOkRatio = "0"; + + if (hour1 != null) + { + ProdALLQty += hour1.ProdIn; + ProdOKQty += hour1.ProdOut; + } + if (hour2 != null) + { + ProdALLQty += hour2.ProdIn; + ProdOKQty += hour2.ProdOut; + } + ProdNGQty = ProdALLQty - ProdOKQty; + if (ProdNGQty > 0) + { + strOkRatio = Math.Round((ProdOKQty * 1.0 / ProdALLQty) * 100, 2) + "%"; + } + + chart24Hours.Add(new Chart24HourData() + { + DisplayTime = m + ":00~" + n + ":59", + ProdIn = ProdALLQty, + ProdOut = ProdOKQty, + ProdNg = ProdNGQty, + OKRatio = strOkRatio + }); + } + } + else + { + Random rand = new Random(); + for (int i = 1; i < 13; i++) + { + if (!isEnabled) + { + break; + } + int j = i * 2; + int m = j - 2; + int n = j - 1; + + int ranOK = rand.Next(1000, 3000); + int ranNG = rand.Next(400, 1200); + int total = ranOK + ranNG; + + chart24Hours.Add(new Chart24HourData() + { + DisplayTime = m + ":00~" + n + ":59", + ProdIn = ranOK + ranNG, + ProdOut = ranOK, + ProdNg = ranNG, + OKRatio = Math.Round((ranOK * 1.0 / total) * 100, 2) + "%" + }); + } + } + if (!isEnabled) + { + return; + } + UpdateGV(chart24Hours); + BindChart(chart24Hours); + } + } + catch (Exception ex) + { + LogHelper.Error(ex.Message, new Exception("异常信息")); + MessageBox.Show(ex.Message, "系统异常", MessageBoxButtons.OK, MessageBoxIcon.Hand); + timer_HourProd.Enabled = false; + + } + } + /// + /// 更新24小时产能 + /// + /// + private void UpdateGV(List list) + { + if (this.InvokeRequired) + { + this.BeginInvoke(new EventHandler(delegate + { + DataTable dtsShow = new DataTable(); + for (int i = 1; i <= 13; i++) + { + dtsShow.Columns.Add("Col" + i); + } + dtsShow.Rows.Add(new object[] { "优率", list[0].OKRatio, list[1].OKRatio, list[2].OKRatio, list[3].OKRatio, list[4].OKRatio, list[5].OKRatio + ,list[6].OKRatio, list[7].OKRatio, list[8].OKRatio, list[9].OKRatio, list[10].OKRatio, list[11].OKRatio }); + dtsShow.Rows.Add(new object[] { "产出" , list[0].ProdOut, list[1].ProdOut, list[2].ProdOut, list[3].ProdOut, list[4].ProdOut, list[5].ProdOut + ,list[6].ProdOut, list[7].ProdOut, list[8].ProdOut, list[9].ProdOut, list[10].ProdOut, list[11].ProdOut }); + dtsShow.Rows.Add(new object[] { "投入", list[0].ProdIn, list[1].ProdIn, list[2].ProdIn, list[3].ProdIn, list[4].ProdIn, list[5].ProdIn + ,list[6].ProdIn, list[7].ProdIn, list[8].ProdIn, list[9].ProdIn, list[10].ProdIn, list[11].ProdIn}); + dtsShow.Rows.Add(new object[] { "时间" , list[0].DisplayTime, list[1].DisplayTime, list[2].DisplayTime, list[3].DisplayTime, list[4].DisplayTime, list[5].DisplayTime + ,list[6].DisplayTime, list[7].DisplayTime, list[8].DisplayTime, list[9].DisplayTime, list[10].DisplayTime, list[11].DisplayTime }); + dgvHShow.DataSource = dtsShow; + dgvHShow.Refresh(); + })); + } + } + + /// + /// 更新24小时产能Chart柱状图显示 + /// + /// + public void BindChart(List list) + { + if (this.InvokeRequired) + { + this.BeginInvoke(new EventHandler(delegate + { + var x1 = list.Select(c => c.DisplayTime).ToList(); + var y1 = list.Select(c => c.ProdIn).ToList(); + var y2 = list.Select(c => c.ProdOut).ToList(); + + chart1.Series[0].Points.DataBindXY(x1, y1); + chart1.Series[1].Points.DataBindXY(x1, y2); + chart1.Series[2].Points.DataBindXY(x1, y2); + })); + } + } + + /// + /// 窗口渐变透明 + /// + /// + /// + private void timerOpacity_Tick(object sender, EventArgs e) + { + this.Opacity += 0.1; + if (this.Opacity == 1.0) + { + timerOpacity.Stop(); + } + } + + /// + /// 关闭界面 + /// + /// + /// + public void FrmStatistics_FormClosing(object sender, FormClosingEventArgs e) + { + this.Visible = false; + e.Cancel = true; + } + + public void timerStatistics_Tick(object sender, EventArgs e) + { + TimerUpGetData(); + } + + public void timer_HourProd2_Tick(object sender, EventArgs e) + { + TimerUpHourProd(); + } + } +} diff --git a/JY.Inspection/Frm/FrmStatistics.designer.cs b/JY.Inspection/Frm/FrmStatistics.designer.cs new file mode 100644 index 0000000..a02e35b --- /dev/null +++ b/JY.Inspection/Frm/FrmStatistics.designer.cs @@ -0,0 +1,319 @@ + +namespace JY.Inspection.Frm +{ + partial class FrmStatistics + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea7 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Legend legend7 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series7 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea8 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Legend legend8 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series8 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea9 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Legend legend9 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series9 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmStatistics)); + this.chartToalShow = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.chartNgShow = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dgvHShow = new MetroFramework.Controls.MetroGrid(); + this.timerOpacity = new System.Windows.Forms.Timer(this.components); + this.timerStatistics = new System.Windows.Forms.Timer(this.components); + this.timer_HourProd2 = new System.Windows.Forms.Timer(this.components); + ((System.ComponentModel.ISupportInitialize)(this.chartToalShow)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.chartNgShow)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.Panel2.SuspendLayout(); + this.splitContainer3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvHShow)).BeginInit(); + this.SuspendLayout(); + // + // chartToalShow + // + chartArea7.Name = "ChartArea1"; + this.chartToalShow.ChartAreas.Add(chartArea7); + this.chartToalShow.Dock = System.Windows.Forms.DockStyle.Fill; + legend7.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F); + legend7.IsTextAutoFit = false; + legend7.Name = "Legend1"; + this.chartToalShow.Legends.Add(legend7); + this.chartToalShow.Location = new System.Drawing.Point(0, 0); + this.chartToalShow.Name = "chartToalShow"; + series7.ChartArea = "ChartArea1"; + series7.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Doughnut; + series7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + series7.IsValueShownAsLabel = true; + series7.Label = "#VALX:#VAL"; + series7.Legend = "Legend1"; + series7.Name = "Series1"; + this.chartToalShow.Series.Add(series7); + this.chartToalShow.Size = new System.Drawing.Size(618, 299); + this.chartToalShow.TabIndex = 4; + this.chartToalShow.Text = "chart1"; + // + // chartNgShow + // + chartArea8.Name = "ChartArea1"; + this.chartNgShow.ChartAreas.Add(chartArea8); + this.chartNgShow.Dock = System.Windows.Forms.DockStyle.Fill; + legend8.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + legend8.IsTextAutoFit = false; + legend8.Name = "Legend1"; + this.chartNgShow.Legends.Add(legend8); + this.chartNgShow.Location = new System.Drawing.Point(0, 0); + this.chartNgShow.Name = "chartNgShow"; + series8.ChartArea = "ChartArea1"; + series8.Legend = "Legend1"; + series8.Name = "Series1"; + this.chartNgShow.Series.Add(series8); + this.chartNgShow.Size = new System.Drawing.Size(746, 299); + this.chartNgShow.TabIndex = 5; + this.chartNgShow.Text = "chart2"; + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(20, 60); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.splitContainer2); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer3); + this.splitContainer1.Size = new System.Drawing.Size(1368, 745); + this.splitContainer1.SplitterDistance = 299; + this.splitContainer1.TabIndex = 6; + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.chartToalShow); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.chartNgShow); + this.splitContainer2.Size = new System.Drawing.Size(1368, 299); + this.splitContainer2.SplitterDistance = 618; + this.splitContainer2.TabIndex = 0; + // + // splitContainer3 + // + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer3.Location = new System.Drawing.Point(0, 0); + this.splitContainer3.Name = "splitContainer3"; + this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.chart1); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.groupBox1); + this.splitContainer3.Panel2MinSize = 50; + this.splitContainer3.Size = new System.Drawing.Size(1368, 442); + this.splitContainer3.SplitterDistance = 300; + this.splitContainer3.TabIndex = 0; + // + // chart1 + // + chartArea9.Name = "ChartArea1"; + this.chart1.ChartAreas.Add(chartArea9); + this.chart1.Dock = System.Windows.Forms.DockStyle.Fill; + legend9.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + legend9.IsTextAutoFit = false; + legend9.Name = "Legend1"; + this.chart1.Legends.Add(legend9); + this.chart1.Location = new System.Drawing.Point(0, 0); + this.chart1.Name = "chart1"; + series9.ChartArea = "ChartArea1"; + series9.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F); + series9.IsValueShownAsLabel = true; + series9.Legend = "Legend1"; + series9.Name = "Series1"; + this.chart1.Series.Add(series9); + this.chart1.Size = new System.Drawing.Size(1368, 300); + this.chart1.TabIndex = 7; + this.chart1.Text = "chart1"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.dgvHShow); + this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox1.Font = new System.Drawing.Font("宋体", 9F); + this.groupBox1.Location = new System.Drawing.Point(0, 0); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(1368, 138); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "每2小时产能"; + // + // dgvHShow + // + this.dgvHShow.AllowUserToAddRows = false; + this.dgvHShow.AllowUserToDeleteRows = false; + this.dgvHShow.AllowUserToResizeColumns = false; + this.dgvHShow.AllowUserToResizeRows = false; + this.dgvHShow.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvHShow.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dgvHShow.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dgvHShow.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle7.BackColor = System.Drawing.Color.SkyBlue; + dataGridViewCellStyle7.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle7.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle7.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvHShow.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; + this.dgvHShow.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvHShow.ColumnHeadersVisible = false; + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle8.Font = new System.Drawing.Font("Segoe UI", 11F); + dataGridViewCellStyle8.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvHShow.DefaultCellStyle = dataGridViewCellStyle8; + this.dgvHShow.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvHShow.EnableHeadersVisualStyles = false; + this.dgvHShow.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + this.dgvHShow.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvHShow.Location = new System.Drawing.Point(3, 17); + this.dgvHShow.Name = "dgvHShow"; + this.dgvHShow.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle9.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle9.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvHShow.RowHeadersDefaultCellStyle = dataGridViewCellStyle9; + this.dgvHShow.RowHeadersWidth = 51; + this.dgvHShow.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.dgvHShow.RowTemplate.Height = 23; + this.dgvHShow.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgvHShow.Size = new System.Drawing.Size(1362, 118); + this.dgvHShow.TabIndex = 14; + // + // timerOpacity + // + this.timerOpacity.Tick += new System.EventHandler(this.timerOpacity_Tick); + // + // timerStatistics + // + this.timerStatistics.Tick += new System.EventHandler(this.timerStatistics_Tick); + // + // timer_HourProd2 + // + this.timer_HourProd2.Tick += new System.EventHandler(this.timer_HourProd2_Tick); + // + // FrmStatistics + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1408, 825); + this.Controls.Add(this.splitContainer1); + this.Font = new System.Drawing.Font("宋体", 9F); + this.ForeColor = System.Drawing.SystemColors.ControlLight; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FrmStatistics"; + this.Resizable = false; + this.ShowInTaskbar = false; + this.Text = "数据统计"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmStatistics_FormClosing); + this.Load += new System.EventHandler(this.FrmStatistics_Load); + ((System.ComponentModel.ISupportInitialize)(this.chartToalShow)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.chartNgShow)).EndInit(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + this.splitContainer3.Panel1.ResumeLayout(false); + this.splitContainer3.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); + this.splitContainer3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgvHShow)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Timer timerOpacity; + private System.Windows.Forms.SplitContainer splitContainer3; + internal System.Windows.Forms.DataVisualization.Charting.Chart chartToalShow; + internal System.Windows.Forms.DataVisualization.Charting.Chart chartNgShow; + internal System.Windows.Forms.DataVisualization.Charting.Chart chart1; + internal MetroFramework.Controls.MetroGrid dgvHShow; + internal System.Windows.Forms.Timer timerStatistics; + internal System.Windows.Forms.Timer timer_HourProd2; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmStatistics.resx b/JY.Inspection/Frm/FrmStatistics.resx new file mode 100644 index 0000000..b25921a --- /dev/null +++ b/JY.Inspection/Frm/FrmStatistics.resx @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 145, 17 + + + 282, 11 + + + 48 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACg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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN + UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8= + + + \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmTest.Designer.cs b/JY.Inspection/Frm/FrmTest.Designer.cs new file mode 100644 index 0000000..e7bd0f6 --- /dev/null +++ b/JY.Inspection/Frm/FrmTest.Designer.cs @@ -0,0 +1,86 @@ +namespace JY.Inspection.Frm +{ + partial class FrmTest + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.btn_readCollectItemCfg = new MetroFramework.Controls.MetroButton(); + this.btn_stationExit = new MetroFramework.Controls.MetroButton(); + this.btn_stationArrival = new MetroFramework.Controls.MetroButton(); + this.SuspendLayout(); + // + // btn_readCollectItemCfg + // + this.btn_readCollectItemCfg.Location = new System.Drawing.Point(87, 127); + this.btn_readCollectItemCfg.Name = "btn_readCollectItemCfg"; + this.btn_readCollectItemCfg.Size = new System.Drawing.Size(125, 53); + this.btn_readCollectItemCfg.TabIndex = 0; + this.btn_readCollectItemCfg.Text = "读取采集项配置"; + this.btn_readCollectItemCfg.UseSelectable = true; + this.btn_readCollectItemCfg.Click += new System.EventHandler(this.btn_readCollectItemCfg_Click); + // + // btn_stationExit + // + this.btn_stationExit.Location = new System.Drawing.Point(426, 127); + this.btn_stationExit.Name = "btn_stationExit"; + this.btn_stationExit.Size = new System.Drawing.Size(125, 53); + this.btn_stationExit.TabIndex = 1; + this.btn_stationExit.Text = "电池出站"; + this.btn_stationExit.UseSelectable = true; + this.btn_stationExit.Click += new System.EventHandler(this.btn_stationArrival_Click); + // + // btn_stationArrival + // + this.btn_stationArrival.Location = new System.Drawing.Point(263, 127); + this.btn_stationArrival.Name = "btn_stationArrival"; + this.btn_stationArrival.Size = new System.Drawing.Size(125, 53); + this.btn_stationArrival.TabIndex = 2; + this.btn_stationArrival.Text = "电池进站"; + this.btn_stationArrival.UseSelectable = true; + this.btn_stationArrival.Click += new System.EventHandler(this.btn_stationArrival_Click_1); + // + // FrmTest + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(998, 586); + this.Controls.Add(this.btn_stationArrival); + this.Controls.Add(this.btn_stationExit); + this.Controls.Add(this.btn_readCollectItemCfg); + this.Name = "FrmTest"; + this.Text = "FrmTest"; + this.ResumeLayout(false); + + } + + #endregion + + private MetroFramework.Controls.MetroButton btn_readCollectItemCfg; + private MetroFramework.Controls.MetroButton btn_stationExit; + private MetroFramework.Controls.MetroButton btn_stationArrival; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/FrmTest.cs b/JY.Inspection/Frm/FrmTest.cs new file mode 100644 index 0000000..63f1e66 --- /dev/null +++ b/JY.Inspection/Frm/FrmTest.cs @@ -0,0 +1,54 @@ +using JY.Model.Excel; +using JY.Utility; +using MetroFramework.Forms; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JY.Inspection.Frm +{ + public partial class FrmTest : MetroForm + { + public FrmTest() + { + InitializeComponent(); + } + + private void btn_readCollectItemCfg_Click(object sender, EventArgs e) + { + string fileName = @"Config/采集项参照表.xlsx"; + //string fileName = @"Config/Device.xlsx"; + List list = ExcelImporter.Import(fileName); + } + + private void btn_stationArrival_Click(object sender, EventArgs e) + { + try + { + throw new NotImplementedException(); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + } + } + + private void btn_stationArrival_Click_1(object sender, EventArgs e) + { + try + { + throw new NotImplementedException(); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + } + } + } +} diff --git a/JY.Inspection/Frm/FrmTest.resx b/JY.Inspection/Frm/FrmTest.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/JY.Inspection/Frm/FrmTest.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/JY.Inspection/Frm/ListViewBuff.cs b/JY.Inspection/Frm/ListViewBuff.cs new file mode 100644 index 0000000..43bd4f7 --- /dev/null +++ b/JY.Inspection/Frm/ListViewBuff.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JY.Inspection +{ + class ListViewBuff: MetroFramework.Controls.MetroListView + { + public ListViewBuff() + { + this.SetStyle( //设置控件的样式和行为 + ControlStyles.DoubleBuffer | //绘制在缓冲区中进行,完成后将结果输出到屏幕上。双重缓冲区可防止由控件重绘引起的闪烁 + ControlStyles.OptimizedDoubleBuffer | //控件首先在缓冲区中绘制,而不是直接绘制到屏幕上,这样可以减少闪烁 + ControlStyles.AllPaintingInWmPaint, true); //控件将忽略WM_ERASEBKGND(当窗口背景必须被擦除时 例如窗口改变大小时)窗口消息以减少闪烁 + UpdateStyles(); //更新控件的样式和行为 + } + } + + /// + /// GridView + /// + class GridViewBuff : MetroFramework.Controls.MetroGrid + { + public GridViewBuff() + { + this.SetStyle( //设置控件的样式和行为 + ControlStyles.DoubleBuffer | //绘制在缓冲区中进行,完成后将结果输出到屏幕上。双重缓冲区可防止由控件重绘引起的闪烁 + ControlStyles.OptimizedDoubleBuffer | //控件首先在缓冲区中绘制,而不是直接绘制到屏幕上,这样可以减少闪烁 + ControlStyles.AllPaintingInWmPaint, true); //控件将忽略WM_ERASEBKGND(当窗口背景必须被擦除时 例如窗口改变大小时)窗口消息以减少闪烁 + UpdateStyles(); //更新控件的样式和行为 + } + } +} diff --git a/JY.Inspection/Frm/LoginForm.cs b/JY.Inspection/Frm/LoginForm.cs new file mode 100644 index 0000000..c7d7c7d --- /dev/null +++ b/JY.Inspection/Frm/LoginForm.cs @@ -0,0 +1,131 @@ +using System; +using System.Windows.Forms; +using JY.Inspection.Common; +using JY.Utility; +using MetroFramework.Forms; + +namespace JY.Inspection.Frm +{ + public delegate void SendLoginIN(User user); + public partial class LoginForm : MetroForm + { + public SendLoginIN sendLogin; + + private int loginFailedCount = 0; + public LoginForm() + { + InitializeComponent(); + + pLogin_card.Location = new System.Drawing.Point(81, 282); + + chkIsSK.CheckedChanged += chkIsSK_CheckedChanged; + txtPassword2.KeyUp += txtPassWord_KeyUp; + txtPassword2.KeyDown += txtPassword2_KeyDown; + btLogin.Click += btLogin_Click; + } + + private void LoginForm_Load(object sender, EventArgs e) + { + + chkIsSK.Checked = IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "IsSK") == "1" ? true : false; + chkIsSK_CheckedChanged(null, null); + //loginFailedCount = 0; + //txtPassWord.Focus(); + //txtPassWord.Text = null; + //lblICCard.Visible = txtPassword2.Visible = true; + //btLogin.Visible = pLogin_pwd.Visible = false; + } + + private void txtPassWord_KeyUp(object sender, KeyEventArgs e) + { + + DateTime _tempDt = DateTime.Now; + TimeSpan ts = _tempDt.Subtract(_dt); + if (ts.Milliseconds > 100) + { + + txtPassword2.Text = "";//清空 + } + else + { + if (e.KeyCode == Keys.Enter) + { + + if (txtPassword2.Text == string.Empty) + { + txtPassword2.Focus(); + MessageBox.Show("IC卡号为空", "系统提示"); + return; + } + UserHelper helper = new UserHelper(""); + string strErr = ""; + var res = helper.CheckUserLogin("user.pt", "", txtPassword2.Text.Trim(), ref strErr); + if (res == null) + { + txtPassword2.Text = ""; + txtPassword2.Focus(); + MessageBox.Show("IC卡号不正确" + strErr, "系统提示"); + return; + } + sendLogin(res); + + this.Close(); + } + } + } + private void btLogin_Click(object sender, EventArgs e) + { + + if (string.IsNullOrEmpty(txtUserID.Text) | string.IsNullOrEmpty(txtPassWord.Text)) + { + txtUserID.Focus(); + MessageBox.Show("用户名或密码为空", "系统提示"); + return; + } + UserHelper helper = new UserHelper(""); + string strErr = ""; + var res = helper.CheckUserLogin("user.pt", txtUserID.Text.Trim(), txtPassWord.Text.Trim(), ref strErr); + if (res == null) + { + txtPassWord.Focus(); + loginFailedCount++; + MessageBox.Show($"用户名或密码不正确,登录失败({loginFailedCount})次!", "系统提示"); + return; + } + + sendLogin(res); + this.Close(); + } + + private void btExit_Click(object sender, EventArgs e) + { + this.Close(); + } + + + private void chkIsSK_CheckedChanged(object sender, EventArgs e) + { + //IniFileHelper.WriteIniData("SYSTEM_CONFIGURE", "IsSK", chkIsSK.Checked ? "1" : "0"); + //lblICCard.Visible = txtPassword2.Visible = chkIsSK.Checked; + //btLogin.Visible = pLogin_pwd.Visible = !chkIsSK.Checked; + //lblICCard.Visible = txtPassword2.Visible = true; + //btLogin.Visible = pLogin.Visible = false; + if (chkIsSK.Checked) + { + pLogin_card.Visible = true; + pLogin_pwd.Visible = false; + } + else + { + pLogin_pwd.Visible = true; + pLogin_card.Visible = false; + } + + } + //定义输入时间变量 + private DateTime _dt; + private void txtPassword2_KeyDown(object sender, KeyEventArgs e) + { + } + } +} diff --git a/JY.Inspection/Frm/LoginForm.designer.cs b/JY.Inspection/Frm/LoginForm.designer.cs new file mode 100644 index 0000000..24fe8fd --- /dev/null +++ b/JY.Inspection/Frm/LoginForm.designer.cs @@ -0,0 +1,294 @@ + +namespace JY.Inspection.Frm +{ + partial class LoginForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginForm)); + this.chkIsSK = new MetroFramework.Controls.MetroCheckBox(); + this.btExit = new MetroFramework.Controls.MetroButton(); + this.btLogin = new MetroFramework.Controls.MetroButton(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.txtUserID = new MetroFramework.Controls.MetroTextBox(); + this.txtPassWord = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel3 = new MetroFramework.Controls.MetroLabel(); + this.pLogin_pwd = new System.Windows.Forms.Panel(); + this.pLogin_card = new System.Windows.Forms.Panel(); + this.lblICCard = new MetroFramework.Controls.MetroLabel(); + this.txtPassword2 = new MetroFramework.Controls.MetroTextBox(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.pLogin_pwd.SuspendLayout(); + this.pLogin_card.SuspendLayout(); + this.SuspendLayout(); + // + // chkIsSK + // + this.chkIsSK.AutoSize = true; + this.chkIsSK.Location = new System.Drawing.Point(237, 390); + this.chkIsSK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chkIsSK.Name = "chkIsSK"; + this.chkIsSK.Size = new System.Drawing.Size(168, 17); + this.chkIsSK.TabIndex = 20; + this.chkIsSK.Text = "是否启用刷卡模式?"; + this.chkIsSK.UseSelectable = true; + // + // btExit + // + this.btExit.Location = new System.Drawing.Point(279, 428); + this.btExit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btExit.Name = "btExit"; + this.btExit.Size = new System.Drawing.Size(127, 46); + this.btExit.TabIndex = 22; + this.btExit.Text = "退 出"; + this.btExit.UseSelectable = true; + this.btExit.Click += new System.EventHandler(this.btExit_Click); + // + // btLogin + // + this.btLogin.Location = new System.Drawing.Point(81, 428); + this.btLogin.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btLogin.Name = "btLogin"; + this.btLogin.Size = new System.Drawing.Size(127, 46); + this.btLogin.TabIndex = 21; + this.btLogin.Text = "登 录"; + this.btLogin.UseSelectable = true; + // + // pictureBox1 + // + this.pictureBox1.Image = global::JY.Inspection.Properties.Resources.登录; + this.pictureBox1.Location = new System.Drawing.Point(153, 55); + this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(168, 165); + this.pictureBox1.TabIndex = 18; + this.pictureBox1.TabStop = false; + // + // txtUserID + // + // + // + // + this.txtUserID.CustomButton.Image = null; + this.txtUserID.CustomButton.Location = new System.Drawing.Point(236, 1); + this.txtUserID.CustomButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtUserID.CustomButton.Name = ""; + this.txtUserID.CustomButton.Size = new System.Drawing.Size(36, 34); + this.txtUserID.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtUserID.CustomButton.TabIndex = 1; + this.txtUserID.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtUserID.CustomButton.UseSelectable = true; + this.txtUserID.CustomButton.Visible = false; + this.txtUserID.Lines = new string[] { + "Admin"}; + this.txtUserID.Location = new System.Drawing.Point(108, 16); + this.txtUserID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtUserID.MaxLength = 32767; + this.txtUserID.Name = "txtUserID"; + this.txtUserID.PasswordChar = '\0'; + this.txtUserID.PromptText = "请输入员工号"; + this.txtUserID.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtUserID.SelectedText = ""; + this.txtUserID.SelectionLength = 0; + this.txtUserID.SelectionStart = 0; + this.txtUserID.ShortcutsEnabled = true; + this.txtUserID.Size = new System.Drawing.Size(205, 29); + this.txtUserID.TabIndex = 0; + this.txtUserID.Text = "Admin"; + this.txtUserID.UseSelectable = true; + this.txtUserID.WaterMark = "请输入员工号"; + this.txtUserID.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtUserID.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // txtPassWord + // + // + // + // + this.txtPassWord.CustomButton.Image = null; + this.txtPassWord.CustomButton.Location = new System.Drawing.Point(236, 1); + this.txtPassWord.CustomButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtPassWord.CustomButton.Name = ""; + this.txtPassWord.CustomButton.Size = new System.Drawing.Size(36, 34); + this.txtPassWord.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtPassWord.CustomButton.TabIndex = 1; + this.txtPassWord.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtPassWord.CustomButton.UseSelectable = true; + this.txtPassWord.CustomButton.Visible = false; + this.txtPassWord.Lines = new string[] { + "Admin"}; + this.txtPassWord.Location = new System.Drawing.Point(108, 60); + this.txtPassWord.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtPassWord.MaxLength = 32767; + this.txtPassWord.Name = "txtPassWord"; + this.txtPassWord.PasswordChar = '*'; + this.txtPassWord.PromptText = "请输入密码"; + this.txtPassWord.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtPassWord.SelectedText = ""; + this.txtPassWord.SelectionLength = 0; + this.txtPassWord.SelectionStart = 0; + this.txtPassWord.ShortcutsEnabled = true; + this.txtPassWord.Size = new System.Drawing.Size(205, 29); + this.txtPassWord.TabIndex = 1; + this.txtPassWord.Text = "Admin"; + this.txtPassWord.UseSelectable = true; + this.txtPassWord.WaterMark = "请输入密码"; + this.txtPassWord.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtPassWord.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel1 + // + this.metroLabel1.AutoSize = true; + this.metroLabel1.Location = new System.Drawing.Point(12, 66); + this.metroLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Size = new System.Drawing.Size(54, 20); + this.metroLabel1.TabIndex = 11; + this.metroLabel1.Text = "密码:"; + // + // metroLabel3 + // + this.metroLabel3.AutoSize = true; + this.metroLabel3.Location = new System.Drawing.Point(12, 22); + this.metroLabel3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.metroLabel3.Name = "metroLabel3"; + this.metroLabel3.Size = new System.Drawing.Size(69, 20); + this.metroLabel3.TabIndex = 10; + this.metroLabel3.Text = "员工号:"; + // + // pLogin_pwd + // + this.pLogin_pwd.Controls.Add(this.txtUserID); + this.pLogin_pwd.Controls.Add(this.txtPassWord); + this.pLogin_pwd.Controls.Add(this.metroLabel1); + this.pLogin_pwd.Controls.Add(this.metroLabel3); + this.pLogin_pwd.Location = new System.Drawing.Point(81, 278); + this.pLogin_pwd.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.pLogin_pwd.Name = "pLogin_pwd"; + this.pLogin_pwd.Size = new System.Drawing.Size(333, 94); + this.pLogin_pwd.TabIndex = 26; + // + // pLogin_card + // + this.pLogin_card.Controls.Add(this.lblICCard); + this.pLogin_card.Controls.Add(this.txtPassword2); + this.pLogin_card.Location = new System.Drawing.Point(81, 207); + this.pLogin_card.Name = "pLogin_card"; + this.pLogin_card.Size = new System.Drawing.Size(333, 50); + this.pLogin_card.TabIndex = 27; + // + // lblICCard + // + this.lblICCard.AutoSize = true; + this.lblICCard.Location = new System.Drawing.Point(12, 24); + this.lblICCard.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblICCard.Name = "lblICCard"; + this.lblICCard.Size = new System.Drawing.Size(51, 20); + this.lblICCard.TabIndex = 25; + this.lblICCard.Text = "IC卡:"; + // + // txtPassword2 + // + // + // + // + this.txtPassword2.CustomButton.Image = null; + this.txtPassword2.CustomButton.Location = new System.Drawing.Point(177, 1); + this.txtPassword2.CustomButton.Margin = new System.Windows.Forms.Padding(4); + this.txtPassword2.CustomButton.Name = ""; + this.txtPassword2.CustomButton.Size = new System.Drawing.Size(27, 27); + this.txtPassword2.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtPassword2.CustomButton.TabIndex = 1; + this.txtPassword2.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtPassword2.CustomButton.UseSelectable = true; + this.txtPassword2.CustomButton.Visible = false; + this.txtPassword2.Lines = new string[0]; + this.txtPassword2.Location = new System.Drawing.Point(105, 17); + this.txtPassword2.Margin = new System.Windows.Forms.Padding(4); + this.txtPassword2.MaxLength = 32767; + this.txtPassword2.Name = "txtPassword2"; + this.txtPassword2.PasswordChar = '*'; + this.txtPassword2.PromptText = "请刷卡"; + this.txtPassword2.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtPassword2.SelectedText = ""; + this.txtPassword2.SelectionLength = 0; + this.txtPassword2.SelectionStart = 0; + this.txtPassword2.ShortcutsEnabled = true; + this.txtPassword2.Size = new System.Drawing.Size(205, 29); + this.txtPassword2.TabIndex = 24; + this.txtPassword2.UseSelectable = true; + this.txtPassword2.WaterMark = "请刷卡"; + this.txtPassword2.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtPassword2.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // LoginForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(472, 529); + this.Controls.Add(this.pLogin_pwd); + this.Controls.Add(this.pLogin_card); + this.Controls.Add(this.chkIsSK); + this.Controls.Add(this.btExit); + this.Controls.Add(this.btLogin); + this.Controls.Add(this.pictureBox1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "LoginForm"; + this.Padding = new System.Windows.Forms.Padding(27, 75, 27, 25); + this.Resizable = false; + this.Text = "登录"; + this.Load += new System.EventHandler(this.LoginForm_Load); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.pLogin_pwd.ResumeLayout(false); + this.pLogin_pwd.PerformLayout(); + this.pLogin_card.ResumeLayout(false); + this.pLogin_card.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private MetroFramework.Controls.MetroCheckBox chkIsSK; + private MetroFramework.Controls.MetroButton btExit; + private MetroFramework.Controls.MetroButton btLogin; + private System.Windows.Forms.PictureBox pictureBox1; + private MetroFramework.Controls.MetroTextBox txtUserID; + private MetroFramework.Controls.MetroTextBox txtPassWord; + private MetroFramework.Controls.MetroLabel metroLabel1; + private MetroFramework.Controls.MetroLabel metroLabel3; + private System.Windows.Forms.Panel pLogin_pwd; + private System.Windows.Forms.Panel pLogin_card; + private MetroFramework.Controls.MetroLabel lblICCard; + private MetroFramework.Controls.MetroTextBox txtPassword2; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/LoginForm.resx b/JY.Inspection/Frm/LoginForm.resx new file mode 100644 index 0000000..acb5bb2 --- /dev/null +++ b/JY.Inspection/Frm/LoginForm.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWU1QAFpNUABZTVASWU1QH1lNUB9ZTVAfWU1QH1lN + UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUBJaTVAAWU1QAFlN + UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXE5OAFlNUABZTVAFWU1QaFlLUM1YS0/gWEtQ4FhL + UOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS1D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/8= + + + \ No newline at end of file diff --git a/JY.Inspection/Frm/SetForm.cs b/JY.Inspection/Frm/SetForm.cs new file mode 100644 index 0000000..a4a0c71 --- /dev/null +++ b/JY.Inspection/Frm/SetForm.cs @@ -0,0 +1,207 @@ +using JY.Inspection.Common; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Windows.Forms; + +namespace JY.Inspection.Frm +{ + public partial class SetForm : MetroFramework.Forms.MetroForm + { + UserHelper helper = new UserHelper(""); + List ListUser = new List(); + DataTable dt = new DataTable(); + public SetForm() + { + InitializeComponent(); + + if (File.Exists("user.pt")) + { + ListUser = helper.DeSerializedUser("user.pt"); + ShowUserList(ListUser); + } + } + + private void SetForm_Load(object sender, EventArgs e) + { + + } + + public void ShowUserList(List List) + { + + List UpList = new List(); + for (int i = 0; i < List.Count; i++) + { + if (i>0) + { + UpList.Add(List[i]); + } + } + dgvManger.DataSource = null; + dgvManger.DataSource = UpList; + } + + /// + /// + /// + /// + /// + /// + public static DataTable ToDataTable(IEnumerable collection) + { + var props = typeof(T).GetProperties(); + var dt = new DataTable(); + dt.Columns.AddRange(props.Select(p => new DataColumn(p.Name, p.PropertyType)).ToArray()); + if (collection.Count() > 0) + { + for (int i = 0; i < collection.Count(); i++) + { + ArrayList tempList = new ArrayList(); + foreach (PropertyInfo pi in props) + { + object obj = pi.GetValue(collection.ElementAt(i), null); + tempList.Add(obj); + } + object[] array = tempList.ToArray(); + dt.LoadDataRow(array, true); + } + } + return dt; + } + + private User GetUser(List list) + { + if (txtUser.Text == string.Empty | txtPassWord.Text == string.Empty) + { + return null; + } + User user = new User(); + user.Index = list[list.Count - 1].Index + 1; + user.UserName = txtUser.Text; + user.PassWord = txtPassWord.Text; + switch (cmbLevel.SelectedIndex) + { + case 0: + user.Level = Autuority.管理员; + break; + case 1: + user.Level = Autuority.工程师; + break; + case 2: + user.Level = Autuority.操作员; + break; + default: + break; + } + return user; + } + + /// + /// 获取表格选中行单元格数据 + /// + private void SetUser() + { + DataGridViewSelectedRowCollection rowCollection = dgvManger.SelectedRows; + if (rowCollection.Count == 0) + { + return; + } + DataGridViewRow row = rowCollection[0]; + txtUser.Text = row.Cells[1].Value.ToString(); + txtPassWord.Text = row.Cells[2].Value.ToString(); + switch (row.Cells[3].Value.ToString()) + { + case "管理员": + cmbLevel.SelectedIndex = 0; + break; + case "工程师": + cmbLevel.SelectedIndex = 1; + break; + case "操作员": + cmbLevel.SelectedIndex = 2; + break; + default: + break; + } + } + + /// + /// 添加用户 + /// + /// + /// + private void btAdd_Click(object sender, EventArgs e) + { + + + User user = GetUser(ListUser); + var res = helper.AddUser("user.pt", ListUser, user); + if (res) + { + MessageBox.Show("添加成功"); + ShowUserList(ListUser); + } + else if (user == null) + { + MessageBox.Show("添加内容为空"); + } + + else + { + MessageBox.Show("添加失败"); + } + } + + /// + /// 删除用户 + /// + /// + /// + private void btDelete_Click(object sender, EventArgs e) + { + + var res = helper.DeleteUser("user.pt", ListUser, txtUser.Text); + if (res) + { + MessageBox.Show("删除成功"); + ShowUserList(ListUser); + } + else + { + MessageBox.Show("删除失败"); + } + } + + private void dgvManger_SelectionChanged(object sender, EventArgs e) + { + SetUser(); + } + + /// + /// 编辑用户 + /// + /// + /// + private void btEdit_Click(object sender, EventArgs e) + { + User user = GetUser(ListUser); + var res = helper.EditUser("user.pt", ListUser, user); + if (res) + { + MessageBox.Show("修改成功"); + ShowUserList(ListUser); + } + else + { + MessageBox.Show("修改失败"); + } + } + + + } +} diff --git a/JY.Inspection/Frm/SetForm.designer.cs b/JY.Inspection/Frm/SetForm.designer.cs new file mode 100644 index 0000000..6abe739 --- /dev/null +++ b/JY.Inspection/Frm/SetForm.designer.cs @@ -0,0 +1,270 @@ + +namespace JY.Inspection.Frm +{ + partial class SetForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetForm)); + this.dgvManger = new System.Windows.Forms.DataGridView(); + this.txtUser = new MetroFramework.Controls.MetroTextBox(); + this.txtPassWord = new MetroFramework.Controls.MetroTextBox(); + this.cmbLevel = new MetroFramework.Controls.MetroComboBox(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel2 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel3 = new MetroFramework.Controls.MetroLabel(); + this.btAdd = new MetroFramework.Controls.MetroButton(); + this.btDelete = new MetroFramework.Controls.MetroButton(); + this.btEdit = new MetroFramework.Controls.MetroButton(); + this.metroTabControl1 = new MetroFramework.Controls.MetroTabControl(); + this.metroTabPage1 = new MetroFramework.Controls.MetroTabPage(); + ((System.ComponentModel.ISupportInitialize)(this.dgvManger)).BeginInit(); + this.metroTabControl1.SuspendLayout(); + this.metroTabPage1.SuspendLayout(); + this.SuspendLayout(); + // + // dgvManger + // + this.dgvManger.AllowUserToAddRows = false; + this.dgvManger.AllowUserToDeleteRows = false; + this.dgvManger.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dgvManger.BackgroundColor = System.Drawing.Color.White; + this.dgvManger.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvManger.Location = new System.Drawing.Point(3, 12); + this.dgvManger.Name = "dgvManger"; + this.dgvManger.ReadOnly = true; + this.dgvManger.RowHeadersWidth = 51; + this.dgvManger.RowTemplate.Height = 23; + this.dgvManger.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgvManger.Size = new System.Drawing.Size(472, 469); + this.dgvManger.TabIndex = 0; + this.dgvManger.SelectionChanged += new System.EventHandler(this.dgvManger_SelectionChanged); + // + // txtUser + // + // + // + // + this.txtUser.CustomButton.Image = null; + this.txtUser.CustomButton.Location = new System.Drawing.Point(107, 1); + this.txtUser.CustomButton.Name = ""; + this.txtUser.CustomButton.Size = new System.Drawing.Size(16, 17); + this.txtUser.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtUser.CustomButton.TabIndex = 1; + this.txtUser.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtUser.CustomButton.UseSelectable = true; + this.txtUser.CustomButton.Visible = false; + this.txtUser.Lines = new string[0]; + this.txtUser.Location = new System.Drawing.Point(566, 31); + this.txtUser.MaxLength = 32767; + this.txtUser.Name = "txtUser"; + this.txtUser.PasswordChar = '\0'; + this.txtUser.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtUser.SelectedText = ""; + this.txtUser.SelectionLength = 0; + this.txtUser.SelectionStart = 0; + this.txtUser.ShortcutsEnabled = true; + this.txtUser.Size = new System.Drawing.Size(165, 23); + this.txtUser.TabIndex = 1; + this.txtUser.UseSelectable = true; + this.txtUser.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtUser.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // txtPassWord + // + // + // + // + this.txtPassWord.CustomButton.Image = null; + this.txtPassWord.CustomButton.Location = new System.Drawing.Point(107, 1); + this.txtPassWord.CustomButton.Name = ""; + this.txtPassWord.CustomButton.Size = new System.Drawing.Size(16, 17); + this.txtPassWord.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.txtPassWord.CustomButton.TabIndex = 1; + this.txtPassWord.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.txtPassWord.CustomButton.UseSelectable = true; + this.txtPassWord.CustomButton.Visible = false; + this.txtPassWord.Lines = new string[0]; + this.txtPassWord.Location = new System.Drawing.Point(566, 89); + this.txtPassWord.MaxLength = 32767; + this.txtPassWord.Name = "txtPassWord"; + this.txtPassWord.PasswordChar = '\0'; + this.txtPassWord.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtPassWord.SelectedText = ""; + this.txtPassWord.SelectionLength = 0; + this.txtPassWord.SelectionStart = 0; + this.txtPassWord.ShortcutsEnabled = true; + this.txtPassWord.Size = new System.Drawing.Size(165, 23); + this.txtPassWord.TabIndex = 2; + this.txtPassWord.UseSelectable = true; + this.txtPassWord.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.txtPassWord.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // cmbLevel + // + this.cmbLevel.FormattingEnabled = true; + this.cmbLevel.ItemHeight = 23; + this.cmbLevel.Items.AddRange(new object[] { + "管理员", + "工程师", + "操作员"}); + this.cmbLevel.Location = new System.Drawing.Point(566, 147); + this.cmbLevel.Name = "cmbLevel"; + this.cmbLevel.Size = new System.Drawing.Size(165, 29); + this.cmbLevel.TabIndex = 3; + this.cmbLevel.UseSelectable = true; + // + // metroLabel1 + // + this.metroLabel1.AutoSize = true; + this.metroLabel1.Location = new System.Drawing.Point(501, 31); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Size = new System.Drawing.Size(65, 19); + this.metroLabel1.TabIndex = 4; + this.metroLabel1.Text = "用户名:"; + // + // metroLabel2 + // + this.metroLabel2.AutoSize = true; + this.metroLabel2.Location = new System.Drawing.Point(501, 92); + this.metroLabel2.Name = "metroLabel2"; + this.metroLabel2.Size = new System.Drawing.Size(51, 19); + this.metroLabel2.TabIndex = 5; + this.metroLabel2.Text = "密码:"; + // + // metroLabel3 + // + this.metroLabel3.AutoSize = true; + this.metroLabel3.Location = new System.Drawing.Point(501, 153); + this.metroLabel3.Name = "metroLabel3"; + this.metroLabel3.Size = new System.Drawing.Size(51, 19); + this.metroLabel3.TabIndex = 6; + this.metroLabel3.Text = "权限:"; + // + // btAdd + // + this.btAdd.Location = new System.Drawing.Point(491, 213); + this.btAdd.Name = "btAdd"; + this.btAdd.Size = new System.Drawing.Size(75, 23); + this.btAdd.TabIndex = 7; + this.btAdd.Text = "添加"; + this.btAdd.UseSelectable = true; + this.btAdd.Click += new System.EventHandler(this.btAdd_Click); + // + // btDelete + // + this.btDelete.Location = new System.Drawing.Point(580, 213); + this.btDelete.Name = "btDelete"; + this.btDelete.Size = new System.Drawing.Size(75, 23); + this.btDelete.TabIndex = 8; + this.btDelete.Text = "删除"; + this.btDelete.UseSelectable = true; + this.btDelete.Click += new System.EventHandler(this.btDelete_Click); + // + // btEdit + // + this.btEdit.Location = new System.Drawing.Point(669, 213); + this.btEdit.Name = "btEdit"; + this.btEdit.Size = new System.Drawing.Size(75, 23); + this.btEdit.TabIndex = 9; + this.btEdit.Text = "编辑"; + this.btEdit.UseSelectable = true; + this.btEdit.Click += new System.EventHandler(this.btEdit_Click); + // + // metroTabControl1 + // + this.metroTabControl1.Controls.Add(this.metroTabPage1); + this.metroTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.metroTabControl1.Location = new System.Drawing.Point(0, 30); + this.metroTabControl1.Name = "metroTabControl1"; + this.metroTabControl1.SelectedIndex = 0; + this.metroTabControl1.Size = new System.Drawing.Size(773, 535); + this.metroTabControl1.TabIndex = 10; + this.metroTabControl1.UseSelectable = true; + // + // metroTabPage1 + // + this.metroTabPage1.Controls.Add(this.btEdit); + this.metroTabPage1.Controls.Add(this.btDelete); + this.metroTabPage1.Controls.Add(this.btAdd); + this.metroTabPage1.Controls.Add(this.dgvManger); + this.metroTabPage1.Controls.Add(this.metroLabel3); + this.metroTabPage1.Controls.Add(this.txtUser); + this.metroTabPage1.Controls.Add(this.metroLabel2); + this.metroTabPage1.Controls.Add(this.txtPassWord); + this.metroTabPage1.Controls.Add(this.metroLabel1); + this.metroTabPage1.Controls.Add(this.cmbLevel); + this.metroTabPage1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.metroTabPage1.HorizontalScrollbarBarColor = true; + this.metroTabPage1.HorizontalScrollbarHighlightOnWheel = false; + this.metroTabPage1.HorizontalScrollbarSize = 10; + this.metroTabPage1.Location = new System.Drawing.Point(4, 38); + this.metroTabPage1.Name = "metroTabPage1"; + this.metroTabPage1.Size = new System.Drawing.Size(765, 493); + this.metroTabPage1.TabIndex = 0; + this.metroTabPage1.Text = "用户管理"; + this.metroTabPage1.VerticalScrollbarBarColor = true; + this.metroTabPage1.VerticalScrollbarHighlightOnWheel = false; + this.metroTabPage1.VerticalScrollbarSize = 10; + // + // SetForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(773, 565); + this.Controls.Add(this.metroTabControl1); + this.DisplayHeader = false; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.Name = "SetForm"; + this.Padding = new System.Windows.Forms.Padding(0, 30, 0, 0); + this.Text = "用户管理"; + this.Load += new System.EventHandler(this.SetForm_Load); + ((System.ComponentModel.ISupportInitialize)(this.dgvManger)).EndInit(); + this.metroTabControl1.ResumeLayout(false); + this.metroTabPage1.ResumeLayout(false); + this.metroTabPage1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.DataGridView dgvManger; + private MetroFramework.Controls.MetroTextBox txtUser; + private MetroFramework.Controls.MetroTextBox txtPassWord; + private MetroFramework.Controls.MetroComboBox cmbLevel; + private MetroFramework.Controls.MetroLabel metroLabel1; + private MetroFramework.Controls.MetroLabel metroLabel2; + private MetroFramework.Controls.MetroLabel metroLabel3; + private MetroFramework.Controls.MetroButton btAdd; + private MetroFramework.Controls.MetroButton btDelete; + private MetroFramework.Controls.MetroButton btEdit; + private MetroFramework.Controls.MetroTabControl metroTabControl1; + private MetroFramework.Controls.MetroTabPage metroTabPage1; + } +} \ No newline at end of file diff --git a/JY.Inspection/Frm/SetForm.resx b/JY.Inspection/Frm/SetForm.resx new file mode 100644 index 0000000..acb5bb2 --- /dev/null +++ b/JY.Inspection/Frm/SetForm.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWU1QAFpNUABZTVASWU1QH1lNUB9ZTVAfWU1QH1lN + UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUBJaTVAAWU1QAFlN + UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXE5OAFlNUABZTVAFWU1QaFlLUM1YS0/gWEtQ4FhL + UOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS0/gWUtQzVlN + UGhZTVAFWU1QAFxOTgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWS1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8JiV1n/fHN2/311d/99dXf/fXV3/311d/98dHb/Ylda/1hM + T8JZTVApWU1QI1lNUCNZTVAVXE5QAFlNUABZTVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAWU1QAFlNUABZTVAAWU1QAFlNUABWSlAAWExPpV5TVv9yaGr/c2ps/3NqbP9zamz/c2ps/3Jo + av9eU1b/WExPpVZKUQFZTVAAWU1QAFlNUABYTVAAWU1QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVklRAFlNUABZTVA7WU1QwlhMT+BYTE/gWExP4FhM + T+BYTE/gWExP4FlNUMJZTVA7WU1QAFZKUgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN + UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN + UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA + AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8= + + + \ No newline at end of file diff --git a/JY.Inspection/HomeForm.cs b/JY.Inspection/HomeForm.cs new file mode 100644 index 0000000..74d42b3 --- /dev/null +++ b/JY.Inspection/HomeForm.cs @@ -0,0 +1,3794 @@ +//19QTH 930方形外观检测 启东FMS接口开发文档 - 外观检测 +using HslCommunication; +using HslCommunication.Core; +using HslCommunication.ModBus; +using JY.Common.Helper; +using JY.DAL; +using JY.DAL.Repository; +using JY.DAL.Service; +using JY.Inspection.Common; +using JY.Inspection.Entity; +using JY.Inspection.Frm; +using JY.Inspection.Mes; +using JY.MES; +using JY.MES.Entity; +using JY.MES.MES; +using JY.Model; +using JY.Model.Excel; +using JY.Utility; +using JYControl; +using log4net.Repository.Hierarchy; +using MetroFramework.Forms; +using Microsoft.Extensions.DependencyInjection; +using Modbus.Device; +using Newtonsoft.Json; +using NPOI.OpenXmlFormats.Shared; +using NPOI.OpenXmlFormats.Spreadsheet; +using NPOI.SS.Formula.Functions; +using Org.BouncyCastle.Utilities.Net; +using PLCCommunication; +using SimpleCommunication; +using SocketHelper; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.Globalization; +using System.IO; +using System.IO.Ports; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Speech.Synthesis; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading; +using System.Threading.Tasks; +using System.Web.UI.WebControls; +using System.Windows.Forms; +using System.Windows.Forms.DataVisualization.Charting; + +namespace JY.Inspection +{ + public partial class HomeForm : MetroForm + { + //用双缓冲绘制窗口的所有控件 + + protected override CreateParams CreateParams + { + get { CreateParams cp = base.CreateParams; cp.ExStyle |= 0x02000000; return cp; } + } + + private Stopwatch sw = new Stopwatch(); + + UserHelper helper = new UserHelper(""); + List ListUser = new List(); + SynchronizationContext syscContext; + + private static IModbusMaster master; + private static SerialPort port; + private static ModbusTcpNet modbus; + + MESDataCombin ToMesData = new MESDataCombin(); + DateTime dtLogin; + //串口参数 + private string portName; + private int baudRate; + private ushort[] registerBuffer; + private string modbusTcp; + private string modbusTcpPort; + + private System.Timers.Timer timerWatt; + private double timejige = 2000;//2秒 + + private delegate void UpdateLog(int index, string log); + /// + /// 按钮状态委托 + /// + /// + public delegate void ShowButtonHandler(string time); + /// + /// 数据库访问接口 + /// + private IDbHelper dbHelper = new OpSqlDataBase(); + /// + ///上料电芯数据采集显示委托 + /// + /// + private delegate void ChangeFunctionWatthourMeter(List m); + /// + ///上料电芯数据采集显示委托 + /// + /// + private delegate void ChangeFunctionHTestA(List m); + /// + ///下料电芯采集显示委托 + /// + /// + private delegate void ChangeFunctionHTestB(List m); + /// + /// 绑定上料电芯数据 + /// + BindingList listTA = new BindingList(); + /// + /// 绑定空托盘 + /// + BindingList listTB = new BindingList(); + + private Task[] mTaskA = new Task[4]; + private Task[] mTaskC = new Task[1]; + private string MelsecConfigPath = AppDomain.CurrentDomain.BaseDirectory + "Config\\PlcConfig.ini"; + private string ConfigPath = AppDomain.CurrentDomain.BaseDirectory + "Config\\ComConfig.ini"; + + //private Thread thread = null; + + internal static FrmOmronPLCCom omronPLCCom; + private int OmronCount; + + ServiceLog serviceLog = new ServiceLog(); + private bool isEnabled = false; + private delegate void UpdateDataChart3(List xData, List yData); + + private CancellationTokenSource mctsA1 = new CancellationTokenSource(); + private CancellationTokenSource mctsA2 = new CancellationTokenSource(); + private CancellationTokenSource mctsA3 = new CancellationTokenSource(); + private CancellationTokenSource mctsA4 = new CancellationTokenSource(); + private CancellationTokenSource Amcts7 = new CancellationTokenSource(); + + private CancellationTokenSource mctsC1 = new CancellationTokenSource(); + //private CancellationTokenSource mctsC2 = new CancellationTokenSource(); + //private CancellationTokenSource mctsC3 = new CancellationTokenSource(); + //public CancellationTokenSource mCTState = new CancellationTokenSource(); + + public CancellationTokenSource mCOMState = new CancellationTokenSource(); + private ManualResetEvent resetEventRecv = new ManualResetEvent(true); + + private ByteTransformBase TransformBase = new ByteTransformBase(); + + + /// + /// 用于电芯出站时向FMS上报出站及生产数据 + /// + string BarCodeOutUrl = ""; + /// + /// 报警数据上传 + /// + string UpAlarmUrl = ""; + /// + /// 设备状态上传 + /// + string UpStatuesUrl = ""; + /// + /// MES上传验证码 + /// + string authorization = ""; + /// + /// 不良统计项目 + /// + List NGList = new List(); + + /// + /// 报警原始数据 + /// + List listAlamByte = new List(); + //报警表单数据 + List listAlarmForm = null; + //PLC报警状态值 + List listAlarmStatus = null; + + + /// + /// PLC报警状态信号 + /// + public string AlamCode = "0"; + + public bool IsNoOrg = false; + /// + /// 欧姆龙网口链接标志 + /// + public bool startOmronUp = false; + /// + /// 串口链接标志 + /// + public bool startComUp = false; + /// + /// tcpIP链接通知 + /// + public bool startTCPUp = false; + /// + /// 通讯链接标志 + /// + internal static bool startup = false; + /// + /// 测试型号 + /// + public string strProdType;//测试型号 + /// + /// 员工号 + /// + public string strWorker = ""; + + /// + /// 是否开启智能电表 + /// + public bool IsStartZNDB = false; + /// + /// 是否启用分档 + /// + public bool chkCkGrading = false; + /// + /// 班次 + /// + private int No = 0, ClassShift = 0; + /// + /// NG电池不分类排出 + /// + public bool IsStartNGFL = false; + public short[] MESGradingSet = new short[] { (short)1, (short)1, (short)1, (short)1 }; + public short[] MESGradingCCDSet = new short[] { (short)1, (short)1, (short)1, (short)1 }; + //新增 ng 拉带 + public short[] NgGradingSet = new short[] { (short)1, (short)1, (short)1 }; + public string[] strNgBound = new string[] { }; + private SpeechSynthesizer _speech;//异常播报 + + public HomeForm() + { + //设置窗体的双缓冲 + this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true); + this.UpdateStyles(); + + InitializeComponent(); + //掩耳盗铃线程控制UI控件 + CheckForIllegalCrossThreadCalls = false; + + //利用反射设置DataGridView的双缓冲 + Type dgvType = this.dgvDataShow_A.GetType(); + PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", + BindingFlags.Instance | BindingFlags.NonPublic); + pi.SetValue(this.dgvDataShow_A, true, null); + + this.dgvDataShow_A.AutoGenerateColumns = false; + dgvDataShow_A.DataSource = listTA; + this.dgvDataShow_A.DataError += delegate (object sender, DataGridViewDataErrorEventArgs e) { }; + + //利用反射设置DataGridView的双缓冲 + Type dgvType1 = this.dgvDataShow_B.GetType(); + PropertyInfo pi1 = dgvType1.GetProperty("DoubleBuffered", + BindingFlags.Instance | BindingFlags.NonPublic); + pi1.SetValue(this.dgvDataShow_B, true, null); + + this.dgvDataShow_B.AutoGenerateColumns = false; + dgvDataShow_B.DataSource = listTB; + this.dgvDataShow_B.DataError += delegate (object sender, DataGridViewDataErrorEventArgs e) { }; + + helper.CheckSupperUser("user.pt", ListUser); + syscContext = SynchronizationContext.Current; + //panel2.Location = new Point(2100, 8);//重新设定标签的位置,这个位置时相对于父控件的右上角 + panel2.Location = new Point(this.Width - 450, 8);//重新设定标签的位置,这个位置时相对于父控件的右上角 + + // 尝试启用控制按钮(最大化/最小化/关闭) + this.ControlBox = true; + // 或设置窗口可调整大小 + this.Resizable = true; + } + + + /// + /// 单例 + /// + private static HomeForm _instance; + internal static HomeForm Instance + { + get + { + if (_instance == null) + _instance = new HomeForm(); + return _instance; + } + } + + #region 柱状图显示屏蔽 + //private void chart() + //{ + // chartNgShow.Series.Clear(); + // chartNgShow.Titles.Clear(); + // chartNgShow.ChartAreas[0].AxisY.Minimum = 0; + // chartNgShow.ChartAreas[0].AxisY.Maximum = 20000; + // foreach (var item in NGList) + // { + // ChartHelper.AddSeries(chartNgShow, item.DataType, SeriesChartType.Column, Color.Red, Color.Red, true); + // } + // ChartHelper.SetTitle(chartNgShow, "各不良项", new Font("微软雅黑", 22), Docking.Top, Color.Black); + // ChartHelper.SetStyle(chartNgShow, Color.White, Color.Black); + // ChartHelper.SetLegend(chartNgShow, Docking.Top, StringAlignment.Center, Color.White, Color.Black); + // ChartHelper.SetXY(chartNgShow, "不良项", "数值", StringAlignment.Far, Color.Black, Color.Black, AxisArrowStyle.None, 1, 2); + // ChartHelper.SetMajorGrid(chartNgShow, Color.White, 20, 2); + //} + + + /// + /// 表格统计目录 + /// + //internal void SetProductionList() + //{ + // //不良统计项目 + // NGList.Add(new ChartDataType() { DataType = "蓝膜气泡不良" }); + // NGList.Add(new ChartDataType() { DataType = "蓝膜凹凸点" }); + // NGList.Add(new ChartDataType() { DataType = "蓝膜褶皱不良" }); + // NGList.Add(new ChartDataType() { DataType = "蓝膜破损不良" }); + // NGList.Add(new ChartDataType() { DataType = "蓝膜划痕不良" }); + // NGList.Add(new ChartDataType() { DataType = "蓝膜重合宽度不良" }); + // NGList.Add(new ChartDataType() { DataType = "蓝膜高度不良" }); + // NGList.Add(new ChartDataType() { DataType = "包膜表面异物不良" }); + // NGList.Add(new ChartDataType() { DataType = "包膜翘起不良" }); + // NGList.Add(new ChartDataType() { DataType = "U型折耳不良" }); + // NGList.Add(new ChartDataType() { DataType = "蓝膜手印不良" }); + // NGList.Add(new ChartDataType() { DataType = "极柱划痕不良" }); + // NGList.Add(new ChartDataType() { DataType = "极柱凹点不良" }); + // NGList.Add(new ChartDataType() { DataType = "极柱焊渣不良" }); + // NGList.Add(new ChartDataType() { DataType = "极柱污染不良" }); + // NGList.Add(new ChartDataType() { DataType = "极柱残缺不良" }); + // NGList.Add(new ChartDataType() { DataType = "极柱胶圈残缺不良" }); + // NGList.Add(new ChartDataType() { DataType = "极柱倾斜不良" }); + // NGList.Add(new ChartDataType() { DataType = "防爆阀不良" }); + // NGList.Add(new ChartDataType() { DataType = "防爆阀PET膜不良" }); + // NGList.Add(new ChartDataType() { DataType = "二维码不良" }); + // NGList.Add(new ChartDataType() { DataType = "绝缘片翘起不良" }); + // NGList.Add(new ChartDataType() { DataType = "绝缘片破损不良" }); + // NGList.Add(new ChartDataType() { DataType = "绝缘片污染不良" }); + //} + + /// + /// 获取图表数据 + /// + /// + /// + /// + //public void GetValue() + //{ + // if (isEnabled) + // { + //Random r = new Random(); + //a1 = r.Next(100, 1200); a2 = r.Next(100, 1300); a3 = r.Next(100, 1050); a4 = r.Next(100, 1090); a5 = r.Next(100, 2000); a6 = r.Next(100, 1000); a7 = r.Next(100, 1000); a8 = r.Next(100, 1000); a9 = r.Next(100, 1000); a10 = r.Next(100, 1000); + //a11 = r.Next(100, 10200); a12 = r.Next(500, 1000); a13 = r.Next(100, 5000); a14 = r.Next(100, 1000); a15 = r.Next(100, 1000); a16 = r.Next(100, 1000); a17 = r.Next(100, 1000); a18 = r.Next(100, 1000); a19 = r.Next(100, 1000); + //a20 = r.Next(100, 8000); a21 = r.Next(100, 7000); a22 = r.Next(100, 4000); a23 = r.Next(100, 10400); a24 = r.Next(100, 10050); + //NGList.Where(p => p.DataType == "蓝膜气泡不良").FirstOrDefault().DataCount = a1; + //NGList.Where(p => p.DataType == "蓝膜凹凸点").FirstOrDefault().DataCount = a2; + //NGList.Where(p => p.DataType == "蓝膜褶皱不良").FirstOrDefault().DataCount = a3; + //NGList.Where(p => p.DataType == "蓝膜破损不良").FirstOrDefault().DataCount = a4; + //NGList.Where(p => p.DataType == "蓝膜划痕不良").FirstOrDefault().DataCount = a5; + //NGList.Where(p => p.DataType == "蓝膜重合宽度不良").FirstOrDefault().DataCount = a6; + //NGList.Where(p => p.DataType == "蓝膜高度不良").FirstOrDefault().DataCount = a7; + //NGList.Where(p => p.DataType == "包膜表面异物不良").FirstOrDefault().DataCount = a8; + //NGList.Where(p => p.DataType == "包膜翘起不良").FirstOrDefault().DataCount = a9; + //NGList.Where(p => p.DataType == "U型折耳不良").FirstOrDefault().DataCount = a10; + //NGList.Where(p => p.DataType == "蓝膜手印不良").FirstOrDefault().DataCount = a11; + //NGList.Where(p => p.DataType == "极柱划痕不良").FirstOrDefault().DataCount = a12; + //NGList.Where(p => p.DataType == "极柱凹点不良").FirstOrDefault().DataCount = a13; + //NGList.Where(p => p.DataType == "极柱焊渣不良").FirstOrDefault().DataCount = a14; + //NGList.Where(p => p.DataType == "极柱污染不良").FirstOrDefault().DataCount = a15; + //NGList.Where(p => p.DataType == "极柱残缺不良").FirstOrDefault().DataCount = a16; + //NGList.Where(p => p.DataType == "极柱胶圈残缺不良").FirstOrDefault().DataCount = a17; + //NGList.Where(p => p.DataType == "极柱倾斜不良").FirstOrDefault().DataCount = a18; + //NGList.Where(p => p.DataType == "防爆阀不良").FirstOrDefault().DataCount = a19; + //NGList.Where(p => p.DataType == "防爆阀PET膜不良").FirstOrDefault().DataCount = a20; + //NGList.Where(p => p.DataType == "二维码不良").FirstOrDefault().DataCount = a21; + //NGList.Where(p => p.DataType == "绝缘片翘起不良").FirstOrDefault().DataCount = a22; + //NGList.Where(p => p.DataType == "绝缘片破损不良").FirstOrDefault().DataCount = a23; + //NGList.Where(p => p.DataType == "绝缘片污染不良").FirstOrDefault().DataCount = a24; + // ShowChartData(); + // } + //} + + //public void ShowChartData() + //{ + // try + // { + // //不良类型统计 + // List xData = NGList.Select(c => c.DataType).ToList(); + // List yData = NGList.Select(c => c.DataCount).ToList(); + // ShowNGChart(xData, yData); ; + // } + // catch (Exception ex) + // { + // MessageBox.Show(ex.Message, "系统异常", MessageBoxButtons.OK, MessageBoxIcon.Hand); + // } + + //} + //private void ShowNGChart(List xData, List yData) + //{ + // if (chartNgShow.InvokeRequired) + // { + // UpdateDataChart3 c = new UpdateDataChart3(ShowNGChart); + // this.Invoke(c, new object[] { xData, yData }); + // } + // else + // { + // chartNgShow.Series[0].Points.DataBindXY(xData, yData); + // } + //} + + #endregion + + + #region 页面事件 + private void HomeForm_Load(object sender, EventArgs e) + { + + txtlog.Controls.Add(LogManagerControl.Manager);//添加自定义日志控件 + LogManagerControl.Manager.Dock = System.Windows.Forms.DockStyle.Fill; + timer_Clock.Enabled = true; + + //SetProductionList(); + //chart(); + ReadIni(); + CheckClassShift(); + InitOmronCom(); + + + CancellationToken token1 = mctsA1.Token; + CancellationToken token2 = mctsA2.Token; + CancellationToken token3 = mctsA3.Token; + CancellationToken token4 = mctsA4.Token; + + //CancellationToken token11 = mCTState.Token; + CancellationToken token15 = mCOMState.Token; + CancellationToken token12 = mctsC1.Token; + //CancellationToken token13 = mctsC2.Token; + //CancellationToken token14 = mctsC3.Token; + CancellationToken tokenCOM = mCOMState.Token; + CancellationToken token7 = Amcts7.Token; + + //mTaskC[0] = Task.Factory.StartNew(delegate + //{ + // processModeStatus(); + //}, mctsC1.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default); + + Task sd = Task.Factory.StartNew(delegate + { + processModeStatus(Amcts7); + }, Amcts7.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default); + + InitialAndConnect(); + IsNoOrg = true; + + //删除日志 + serviceLog.Start(); + + _speech = new SpeechSynthesizer(); + _speech.Volume = 100; //音量 + CultureInfo keyboardCulture = InputLanguage.CurrentInputLanguage.Culture; + InstalledVoice neededVoice = _speech.GetInstalledVoices(keyboardCulture).FirstOrDefault(); + if (neededVoice != null) + { + _speech.SelectVoice(neededVoice.VoiceInfo.Name); + } + + IocConfig.Initialize(); + + LogManagerControl.AddLog("程序已启动", LogAddtype.local); + } + + + public void InitialAndConnect() + { + Task RecvTask = Task.Factory.StartNew(delegate { UpdateDianBiaoByModbus(); }, mCOMState.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default); + if (!isEnabled) + { + resetEventRecv.Reset(); + } + } + /// + /// 读取INI配置文件 + /// + public void ReadIni() + { + authorization = IniFileHelper.ReadIniData("MES配置", "authorization"); + BarCodeOutUrl = IniFileHelper.ReadIniData("MES配置", "BarCodeOutUrl"); + UpAlarmUrl = IniFileHelper.ReadIniData("MES配置", "UpAlarmUrl"); + UpStatuesUrl = IniFileHelper.ReadIniData("MES配置", "UpStatuesUrl"); + + //MES信息 + Global.systemConfig.siteCode = IniFileHelper.ReadIniData("MES配置", "siteCode"); + Global.systemConfig.lineCode = IniFileHelper.ReadIniData("MES配置", "lineCode"); + Global.systemConfig.equipCode = IniFileHelper.ReadIniData("MES配置", "equipCode"); + Global.systemConfig.materialCode = IniFileHelper.ReadIniData("MES配置", "materialCode"); + Global.systemConfig.productType = IniFileHelper.ReadIniData("MES配置", "productType"); + + Global.systemConfig.GradingMesUrl = IniFileHelper.ReadIniData("MES配置", "GradingMesUrl"); + Global.systemConfig.ResultProcessMesUrl = IniFileHelper.ReadIniData("MES配置", "ResultProcessMesUrl"); + Global.systemConfig.StationArrivalUrl = IniFileHelper.ReadIniData("MES配置", "StationArrivalUrl"); + Global.systemConfig.StationExitUrl = IniFileHelper.ReadIniData("MES配置", "StationExitUrl"); + + try + { + Global.systemConfig.CollectItemCfgList = ExcelImporter.Import(Global.CollectItemCfgPath); + } + catch (Exception) + { + LogManagerControl.AddLog("读取采集参照表", LogAddtype.local); + } + + Global.systemConfig.LoginTime = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "LoginTime")); + Global.systemConfig.MesRequestTime = Convert.ToDouble(IniFileHelper.ReadIniData("MES配置", "MesRequestTime")); + + txtsiteCode.Text = Global.systemConfig.siteCode; + txtlineCode.Text = Global.systemConfig.lineCode; + txtequipCode.Text = Global.systemConfig.equipCode; + txtmaterialCode.Text = Global.systemConfig.materialCode; + + //分档ok档 ccd结果 + string[] boundCCD = IniFileHelper.ReadIniData("MES配置", "CCDResultMessage").Split(','); + txtTensionStrapCCD1.Text = boundCCD[Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrapCCDReslut1"))]; + txtTensionStrapCCD2.Text = boundCCD[Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrapCCDReslut2"))]; + txtTensionStrapCCD3.Text = boundCCD[Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrapCCDReslut3"))]; + txtTensionStrapCCD4.Text = boundCCD[Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrapCCDReslut4"))]; + //分档配置信息 + string[] bound = IniFileHelper.ReadIniData("MES配置", "NGMessage").Split(','); + txtgrading1.Text = IniFileHelper.ReadIniData("MES配置", "Grading1"); + txtgrading2.Text = IniFileHelper.ReadIniData("MES配置", "Grading2"); + txtgrading3.Text = IniFileHelper.ReadIniData("MES配置", "Grading3"); + txtgrading4.Text = IniFileHelper.ReadIniData("MES配置", "Grading4"); + Global.systemConfig.Grading1 = txtgrading1.Text + txtTensionStrapCCD1.Text; + Global.systemConfig.Grading2 = txtgrading2.Text + txtTensionStrapCCD2.Text; + Global.systemConfig.Grading3 = txtgrading3.Text + txtTensionStrapCCD3.Text; + Global.systemConfig.Grading4 = txtgrading4.Text + txtTensionStrapCCD4.Text; + + + MESGradingSet[0] = (short)1; + if (Global.systemConfig.Grading2.Equals(Global.systemConfig.Grading1)) + MESGradingSet[1] = MESGradingSet[0]; + else + MESGradingSet[1] = (short)(MESGradingSet[0] + 1); + + if (Global.systemConfig.Grading3.Equals(Global.systemConfig.Grading1)) + MESGradingSet[2] = MESGradingSet[0]; + else + { + if (Global.systemConfig.Grading3.Equals(Global.systemConfig.Grading2)) + MESGradingSet[2] = MESGradingSet[1]; + else + MESGradingSet[2] = (short)(MESGradingSet[1] + 1); + } + + if (Global.systemConfig.Grading4.Equals(Global.systemConfig.Grading1)) + MESGradingSet[3] = MESGradingSet[0]; + else + { + if (Global.systemConfig.Grading4.Equals(Global.systemConfig.Grading2)) + MESGradingSet[3] = MESGradingSet[1]; + else + { + if (Global.systemConfig.Grading4.Equals(Global.systemConfig.Grading3)) + MESGradingSet[3] = MESGradingSet[2]; + else + MESGradingSet[3] = (short)(MESGradingSet[2] + 1); + } + } + + if (txtTensionStrapCCD1.Text.ToUpper() == "NG") + { + MESGradingSet[0] = (short)(30 + MESGradingSet[0]); + } + if (txtTensionStrapCCD2.Text.ToUpper() == "NG") + { + MESGradingSet[1] = (short)(30 + MESGradingSet[1]); + } + if (txtTensionStrapCCD3.Text.ToUpper() == "NG") + { + MESGradingSet[2] = (short)(30 + MESGradingSet[2]); + } + if (txtTensionStrapCCD4.Text.ToUpper() == "NG") + { + MESGradingSet[3] = (short)(30 + MESGradingSet[3]); + } + + txtTensionStrap1.Text = bound[Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap1"))]; + txtTensionStrap2.Text = bound[Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap2"))]; + txtTensionStrap3.Text = bound[Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap3"))]; + NgGradingSet[0] = (short)(Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap1")) +10); + NgGradingSet[1] = (short)(Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap2"))+10); + NgGradingSet[2] = (short)(Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap3"))+10); + strNgBound = IniFileHelper.ReadIniData("MES配置", "NGMessage").Split(','); + //出站计数 + No = Convert.ToInt32(IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "No")); + ClassShift = Convert.ToInt32(IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "ClassShift")); + //是否启用分档 + chkCkGrading = IniFileHelper.ReadIniData("MES配置", "Grading") == "1" ? true : false; + chkIsGarding.Checked = chkCkGrading; + //不分类排除 + IsStartNGFL = IniFileHelper.ReadIniData("MES配置", "StartNGFL") == "1" ? true : false; + chkStartNGFL.Checked = IsStartNGFL; + + listAlamByte = GetListByte(200); + + + Global.systemConfig.isUpMes = IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "IsMesUP") == "1" ? true : false; + txtTcpClicet.Text = Global.systemConfig.isUpMes ? "MES在线" : "MES离线"; + if (Global.systemConfig.isUpMes) + { + chkIsGarding.Visible = true; + } + else + { + chkIsGarding.Visible = false; + } + //电表 + portName = IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "portName"); + baudRate = int.Parse(IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "baudRate")); + IsStartZNDB = IniFileHelper.ReadIniData("MES配置", "StartZNDB") == "1" ? true : false; + modbusTcp = IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "TCP_IP"); + modbusTcpPort = IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "TCP_Port"); + ckStartZNDB.Checked = IsStartZNDB; + + + Global.Instructions.Clear(); + Global.Instructions.Add("0x25");//相电压UA + Global.Instructions.Add("0x26");//相电压UB + Global.Instructions.Add("0x27");//相电压UC + Global.Instructions.Add("0x28");//线电压UAB + Global.Instructions.Add("0x29");//线电压UBC + Global.Instructions.Add("0x2A");//线电压UAC + Global.Instructions.Add("0x2B");//电流IA + Global.Instructions.Add("0x2C");//电流IB + Global.Instructions.Add("0x2D");//电流IC + Global.Instructions.Add("0x31");//A相有功功率 + Global.Instructions.Add("0x35");//B相有功功率 + Global.Instructions.Add("0x39");//C相有功功率 + Global.Instructions.Add("0x05");//总有功功率 + + } + + #region 串口初始化 + private SerialPort InitSerialPortParameter() + { + return port; + } + + public bool InitSerialPort(ref string strErr) + { + //return InitSerialPort_TCP( ref strErr); + + try + { + if (port == null) + { + if (!string.IsNullOrEmpty(portName)) + { + port = new SerialPort(portName, baudRate, Parity.None, 8, StopBits.One); + port.ReadTimeout = 500; + port.Open(); + if (port.IsOpen) + { + master = ModbusSerialMaster.CreateRtu(port); + registerBuffer = master.ReadHoldingRegisters((byte)1, (ushort)0, (ushort)2); + if (registerBuffer == null) + { + strErr = "与智能电表通讯异常,请检查串口线路!!!"; + return false; + } + strErr = $"[{registerBuffer[0]}],与智能电表通讯正常!!"; + COMStart(true); + isEnabled = true; + return true; + } + } + } + else + { + COMStart(true); + isEnabled = true; + return true; + } + + } + catch (Exception ex) + { + port.Close(); + port.Dispose(); + port = null; + COMStart(false); + isEnabled = false; + CleardbData(); + strErr = $"初始化串口异常!原因:{ex.Message}\r\n 请检查串口线路!!!"; + } + return false; + } + public bool InitSerialPort_TCP(ref string strErr) + { + try + { + modbus = new ModbusTcpNet(); + modbus.Station = 1; + modbus.IsStringReverse = false; + modbus.DataFormat = DataFormat.CDAB; + modbus.IpAddress = modbusTcp; + modbus.Port = Convert.ToInt32(modbusTcpPort); + modbus.ConnectTimeOut = 5000; + modbus.ReceiveTimeOut = 10000; + modbus.ConnectServer(); + + OperateResult result = new OperateResult(); + var task = Task.Run(async () => { result = await modbus.ReadUInt16Async("0", 68); }); + task.Wait(); + if (result.IsSuccess) + { + COMStart(true); + isEnabled = true; + return true; + } + + } + catch (Exception ex) + { + modbus.ConnectClose(); + COMStart(false); + isEnabled = false; + CleardbData(); + strErr = $"初始化ModbusTCP异常!原因:{ex.Message}\r\n 请检查串口线路!!!"; + } + return false; + } + + /// + /// 链接串口状态 + /// + /// + public void COMStart(bool status) + { + if (status) + { + resetEventRecv.Set(); + } + else + { + resetEventRecv.Reset(); + } + } + + + private void UpdateDianBiao() + { + while (true) + { + + if (mCOMState.Token.IsCancellationRequested) + { + return; + } + resetEventRecv.WaitOne(); + if (isEnabled) + { + if (modbus != null && !string.IsNullOrEmpty(modbus.ConnectionId)) + { + try + { + List resylt = GetListInt(17); + //for (int i = 0; i < Global.Instructions.Count; i++) + //{ + // ushort startAddress = (ushort)System.Convert.ToInt32(Global.Instructions[i], 16); + // registerBuffer = master.ReadHoldingRegisters((byte)1, startAddress, (ushort)1); + // resylt[i] = registerBuffer[0]; + //} + + OperateResult result = new OperateResult(); + while (!result.IsSuccess) + { + var task = Task.Run(async () => { result = await modbus.ReadUInt16Async("0", 68); }); + task.Wait(); + if (result.IsSuccess) + { + for (int i = 0; i < 17; i++) + { + resylt[i] = result.Content[i]; + } + } + } + if (resylt != null) + { + if (startup) + { + for (int i = 0; i < resylt.Count; i++) + { + omronPLCCom.lstMcUI[0].WriteDReg($"W4000[{i.ToString()}]", resylt[i]); + } + } + + + this.Invoke(new Action(() => + { + var index = 0; + //相电压UA + txtPhaseVolUA.Text = (Convert.ToDouble(resylt[index++]) / 10).ToString("F1"); + //相电压UB + txtPhaseVolUB.Text = (Convert.ToDouble(resylt[index++]) / 10).ToString("F1"); + //相电压UC + txtPhaseVolUC.Text = (Convert.ToDouble(resylt[index++]) / 10).ToString("F1"); + + //线电压UAB + txtLineVolUAB.Text = (Convert.ToDouble(resylt[index++]) / 10).ToString("F1"); + //线电压UBC + txtLineVolUBC.Text = (Convert.ToDouble(resylt[index++]) / 10).ToString("F1"); + //线电压UAC + txtLineVolUAC.Text = (Convert.ToDouble(resylt[index++]) / 10).ToString("F1"); + + //电流IA + txtIA.Text = (Convert.ToDouble(resylt[index++]) / 1000).ToString("F3"); + //电流IB + txtIB.Text = (Convert.ToDouble(resylt[index++]) / 1000).ToString("F3"); + //电流IC + txtIC.Text = (Convert.ToDouble(resylt[index++]) / 1000).ToString("F3"); + + //A相有功功率 + index++; + txtPowerA.Text = (Convert.ToDouble(resylt[index++]) / 1000).ToString("F3"); + //B相有功功率 + index++; + txtPowerB.Text = (Convert.ToDouble(resylt[index++]) / 1000).ToString("F3"); + //C相有功功率 + index++; + txtPowerC.Text = (Convert.ToDouble(resylt[index++]) / 1000).ToString("F3"); + + //总有功功率 + index++; + txtTotalPower.Text = (Convert.ToDouble(resylt[index++]) / 1000).ToString("F3"); + + })); + } + } + catch (Exception ex) + { + CleardbData(); + LogManagerControl.AddLog("智能电表通讯异常,请检查串口线路\r\n " + ex.Message, LogAddtype.local, Logtype.Error); + } + } + else + { + // port.Close(); + // port.Dispose(); + modbus.ConnectClose(); + Thread.Sleep(3000); + string strErr = ""; + InitSerialPort(ref strErr); + } + } + Thread.Sleep(1000); + + } + } + + private void UpdateDianBiaoByModbus() + { + while (true) + { + + if (mCOMState.Token.IsCancellationRequested) + { + return; + } + resetEventRecv.WaitOne(); + if (isEnabled) + { + + + if (master !=null) + { + try + { + List resylt = GetListInt(13); + List resylt_float = new List(); + OperateResult result = new OperateResult(); + + + for (int i = 0; i < Global.Instructions.Count; i++) + { + ushort startAddress = (ushort)System.Convert.ToInt32(Global.Instructions[i], 16); + + registerBuffer = master.ReadHoldingRegisters((byte)1, startAddress, (ushort)1); + //var registerBuffer2 = master.ReadHoldingRegisters((byte)1, 0, (ushort)100); + resylt[i] = registerBuffer[0]; + } + if (resylt != null) + { + // toFloat + { + var index = 0; + //相电压UA + resylt_float.Add((Convert.ToDouble(resylt[index++]) / 10)); + //相电压UB + resylt_float.Add((Convert.ToDouble(resylt[index++]) / 10)); + //相电压UC + resylt_float.Add((Convert.ToDouble(resylt[index++]) / 10)); + + //线电压UAB + resylt_float.Add((Convert.ToDouble(resylt[index++]) / 10)); + //线电压UBC + resylt_float.Add((Convert.ToDouble(resylt[index++]) / 10)); + //线电压UAC + resylt_float.Add((Convert.ToDouble(resylt[index++]) / 10)); + ; + //电流IA + resylt_float.Add((Convert.ToDouble(resylt[index++]) / 1000)); + //电流IB + resylt_float.Add((Convert.ToDouble(resylt[index++]) / 1000)); + //电流IC + resylt_float.Add((Convert.ToDouble(resylt[index++]) / 1000)); + + //A相有功功率 + //index++; + resylt_float.Add((Convert.ToDouble(resylt[index++]) / 1000)); + //B相有功功率 + // index++; + resylt_float.Add((Convert.ToDouble(resylt[index++]) / 1000)); + //C相有功功率 + // index++; + resylt_float.Add((Convert.ToDouble(resylt[index++]) / 1000)); + + //总有功功率 + // index++; + resylt_float.Add((Convert.ToDouble(resylt[index++]) / 1000)); + } + // + if (startup) + { + for (int i = 0; i < resylt.Count; i++) + { + omronPLCCom.lstMcUI[0].WriteDReg($"W380[{i.ToString()}]", (float)resylt_float[i]); + + } + } + this.Invoke(new Action(() => + { + var index =0; + //相电压UA + txtPhaseVolUA.Text = resylt_float[index++].ToString("F1"); + //相电压UB + txtPhaseVolUB.Text = resylt_float[index++].ToString("F1"); + //相电压UC + txtPhaseVolUC.Text = resylt_float[index++].ToString("F1"); + + //线电压UAB + txtLineVolUAB.Text = resylt_float[index++].ToString("F1"); + //线电压UBC + txtLineVolUBC.Text = resylt_float[index++].ToString("F1"); + //线电压UAC + txtLineVolUAC.Text = resylt_float[index++].ToString("F1"); + + //电流IA + txtIA.Text = resylt_float[index++].ToString("F3"); + //电流IB + txtIB.Text = resylt_float[index++].ToString("F3"); + //电流IC + txtIC.Text = resylt_float[index++].ToString("F3"); + + //A相有功功率 + //index++; + txtPowerA.Text = resylt_float[index++].ToString("F3"); + //B相有功功率 + // index++; + txtPowerB.Text = resylt_float[index++].ToString("F3"); + //C相有功功率 + // index++; + txtPowerC.Text = resylt_float[index++].ToString("F3"); + + //总有功功率 + // index++; + txtTotalPower.Text = resylt_float[index++].ToString("F3"); + + })); + } + } + catch (Exception ex) + { + CleardbData(); + LogManagerControl.AddLog("智能电表通讯异常,请检查串口线路\r\n " + ex.Message, LogAddtype.local, Logtype.Error); + } + } + else + { + // port.Close(); + // port.Dispose(); + modbus.ConnectClose(); + Thread.Sleep(3000); + string strErr = ""; + InitSerialPort(ref strErr); + } + } + Thread.Sleep(1000); + + } + } + + /// + /// 清除智能电表显示数据 + /// + public void CleardbData() + { + this.Invoke(new Action(() => + { + //相电压UA + txtPhaseVolUA.Text = "0"; + //相电压UB + txtPhaseVolUB.Text = "0"; + //相电压UC + txtPhaseVolUC.Text = "0"; + + //线电压UAB + txtLineVolUAB.Text = "0"; + //线电压UBC + txtLineVolUBC.Text = "0"; + //线电压UAC + txtLineVolUAC.Text = "0"; + + //电流IA + txtIA.Text = "0"; + //电流IB + txtIB.Text = "0"; + //电流IC + txtIC.Text = "0"; + + //A相有功功率 + txtPowerA.Text = "0"; + //B相有功功率 + txtPowerB.Text = "0"; + //C相有功功率 + txtPowerC.Text = "0"; + //总有功功率 + txtTotalPower.Text = "0"; + + })); + } + + + + #endregion + + /// + /// 登录窗口 + /// + /// + /// + private void tsmiLogin_Click(object sender, EventArgs e) + { + if (CurrentInfo.autuority == Autuority.Empty) + { + LoginForm frm = new LoginForm(); + frm.sendLogin += Login; + frm.ShowDialog(); + txtTcpClicet.Text = Global.systemConfig.isUpMes ? "MES在线" : "MES离线"; + } + else + { + LoginOut(); + } + } + + /// + /// 历史数据查询 + /// + /// + /// + private void tsmiHistory_Click(object sender, EventArgs e) + { + if (CurrentInfo.autuority == Autuority.Empty) + { + MessageBox.Show("请先登录!", "系统提示"); + return; + } + FrmHistoricalDataQuery frm = new FrmHistoricalDataQuery(); + frm.ShowDialog(); + } + + /// + /// 报警信息查询 + /// + /// + /// + private void tsmiAlarmSearch_Click(object sender, EventArgs e) + { + if (CurrentInfo.autuority == Autuority.Empty) + { + MessageBox.Show("请先登录!", "系统提示"); + return; + } + FrmAlamQuery frm = new FrmAlamQuery(); + frm.ShowDialog(); + } + + /// + /// 打开统计页面 + /// + /// + /// + private void tsmiChart_Click(object sender, EventArgs e) + { + if (CurrentInfo.autuority == Autuority.Empty) + { + MessageBox.Show("请先登录!", "系统提示"); + return; + } + + FrmStatistics.Instance.ShowDialog(); + } + + /// + /// 打开换形页面 + /// + /// + /// + private void tsmiChangeModel_Click(object sender, EventArgs e) + { + if (!CheckAdminOrEng()) + { + MessageBox.Show("权限不足", "系统提示"); + return; + } + if (!startup) + { + MessageBox.Show("请在联机状态下操作换型", "系统提示"); + return; + } + //FrmChangeModel frm = new FrmChangeModel(omronPLCCom, cmbProductModel.Text.Trim()); + FrmChangeModel frm = new FrmChangeModel(omronPLCCom, ""); + frm.ShowDialog(); + } + + /// + /// 打开系统信息页面 + /// + /// + /// + private void tsmiAbout_Click(object sender, EventArgs e) + { + FrmHelper frm = new FrmHelper(); + frm.ShowDialog(); + } + + /// + /// 打开PLC配置页面 + /// + /// + /// + private void tsmiPLCConfig_Click(object sender, EventArgs e) + { + if (!CheckAdminOrEng()) + { + MessageBox.Show("权限不足", "系统提示"); + return; + } + //FrmPwd frm = new FrmPwd(); + //if (frm.ShowDialog() == DialogResult.Cancel) + //{ + // return; + //} + if (omronPLCCom != null) + { + omronPLCCom.Show(); + return; + } + omronPLCCom = new FrmOmronPLCCom(MelsecConfigPath); + omronPLCCom.Show(); + } + /// + /// 打开数据库配置页面 + /// + /// + /// + private void tsmiDBConfig_Click(object sender, EventArgs e) + { + if (!CheckAdminOrEng()) + { + MessageBox.Show("权限不足", "系统提示"); + return; + } + FrmDBbaseSet frm = new FrmDBbaseSet(); + frm.ShowDialog(); + } + /// + /// 打开MES参数配置页面 + /// + /// + /// + private void tsmiMESConfig_Click(object sender, EventArgs e) + { + if (!CheckAdminOrEng()) + { + MessageBox.Show("权限不足", "系统提示"); + return; + } + FormMesDataSet frm = new FormMesDataSet(); + if (frm.ShowDialog() == DialogResult.OK) + { + ReadIni(); + + } + } + /// + /// 打开参数编辑页面 + /// + /// + /// + private void tsmiParaConfig_Click(object sender, EventArgs e) + { + if (!CheckAdminOrEng()) + { + MessageBox.Show("权限不足", "系统提示"); + return; + } + IsNoOrg = false; + //FrmParaConfig frmPara = new FrmParaConfig(); + //frmPara.sendParamIN += SetCombOrg; + //if (frmPara.ShowDialog() == DialogResult.OK) + //{ + // IsNoOrg = true; + //} + } + + /// + /// 打开用户配置页面 + /// + /// + /// + private void tsmiUserConfig_Click(object sender, EventArgs e) + { + if (!CheckAdmin()) + { + MessageBox.Show("权限不足", "系统提示"); + return; + } + SetForm setForm = new SetForm(); + setForm.ShowDialog(); + } + + /// + /// TCP通讯设置 + /// + /// + /// + private void tsmiSerialPortConfig_Click(object sender, EventArgs e) + { + if (!CheckAdmin()) + { + MessageBox.Show("权限不足", "系统提示"); + return; + } + //FrmPwd frm = new FrmPwd(); + //if (frm.ShowDialog() == DialogResult.Cancel) + //{ + // return; + //} + //com.Show(); + } + + + + /// + /// 统计清零 + /// + /// + /// + private void btSave_Click(object sender, EventArgs e) + { + if (CurrentInfo.autuority == Autuority.Empty) + { + MessageBox.Show("请先登录再进行操作!", "错误提示"); + return; + } + IniFileHelper.WriteIniData("统计计数", "ProdAllQty", "0"); + + } + + /// + /// 刷新页面时间 + /// + /// + /// + private void timer_Clock_Tick(object sender, EventArgs e) + { + string time = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"); + ShowButtonHandler handler = ShowButtonEven_Run; + IAsyncResult result = handler.BeginInvoke(time, null, handler); + string timenow = DateTime.Now.ToString("HH:mm:ss"); + CheckClassShift(); + AgeingCheck(); + GetMESinfo(); + } + + /// + /// 判断班次 + /// + public void CheckClassShift() + { + TimeSpan dsp3 = DateTime.Now.TimeOfDay; + if (dsp3 > DateTime.Parse("08:30").TimeOfDay && dsp3 <= DateTime.Parse("20:30").TimeOfDay) + { + if (ClassShift == 1) + No = 0; + ClassShift = 0; + if (this.InvokeRequired) + { + this.BeginInvoke(new MethodInvoker(delegate + { + txtClassShift.Text = "白班"; + })); + } + else + { + txtClassShift.Text = "白班"; + } + } + else + { + if (ClassShift == 0) + No = 0; + ClassShift = 1; + if (this.InvokeRequired) + { + this.BeginInvoke(new MethodInvoker(delegate + { + txtClassShift.Text = "夜班"; + })); + } + else + { + txtClassShift.Text = "夜班"; + } + } + } + + /// + /// 登录时效检查 + /// + public void AgeingCheck() + { + if (CheckAdminOrEng() && (DateTime.Now - dtLogin).TotalMinutes > Global.systemConfig.LoginTime) + { + + CurrentInfo.autuority = Autuority.操作员; + lblAuthority.Text = "操作员"; + if (startup)//plc链接成功 + // omronPLCCom.lstMcUI[0].WriteDReg("W50", (short)1);//提示PLC进入操作员权限 + omronPLCCom.lstMcUI[0].WriteDReg("D21", (short)1);//提示PLC进入操作员权限 + LogManagerControl.AddLog("管理员登录时效过期已自动降级为操作员权限,请重新登录获取管理员权限。", LogAddtype.local, Logtype.Warning); + + } + } + + /// + /// 告诉PLC MES信息 + /// + public void GetMESinfo() + { + if (startup) + { + if (Global.systemConfig.isUpMes) + { + omronPLCCom.lstMcUI[0].WriteDReg("W250", (short)1); + if (chkCkGrading) + { + omronPLCCom.lstMcUI[0].WriteDReg("W248", (short)1); + } + else + { + omronPLCCom.lstMcUI[0].WriteDReg("W248", (short)2); + } + } + else + { + omronPLCCom.lstMcUI[0].WriteDReg("W250", (short)2); + omronPLCCom.lstMcUI[0].WriteDReg("W248", (short)2); + } + } + } + + /// + /// CCD数据统计 + /// + /// + /// + private void tsmiCCDData_Click(object sender, EventArgs e) + { + if (!CheckAdmin()) + { + MessageBox.Show("权限不足", "系统提示"); + return; + } + FrmCCDQuery frm = new FrmCCDQuery(); + frm.ShowDialog(); + } + + + + #endregion + + #region PLC读写 + /// + /// 初始化通讯接口委托事件 + /// + public void InitOmronCom() + { + #region 欧姆龙MC协议网口 + PLCCommunication.IniHelper iniMelse = new PLCCommunication.IniHelper(MelsecConfigPath); + OmronCount = Convert.ToInt16(iniMelse.IniReadValue("SystemConfig", "ComCount")); + omronPLCCom = new FrmOmronPLCCom(MelsecConfigPath); + for (int i = 0; i < OmronCount; i++) + { + switch (i) + { + case 0: + //外观设备心跳消息接受委托事件 + omronPLCCom.lstMcUI[i].UpHeartBeatEvent += TriggerHeartEvent; + //外观设备数据接收委托事件 + omronPLCCom.lstMcUI[i].ReceiveEvent += OmronRegEvent_Job1; + break; + } + } + #endregion + + #region TCPIP协议网口 + //SimpleCommunication.IniHelper iniCom = new SimpleCommunication.IniHelper(ConfigPath); + //TcpCount = Convert.ToInt16(iniCom.IniReadValue("SystemConfig", "ComCount")); + //com = new FrmCommunication(ConfigPath); + //for (int i = 0; i < TcpCount; i++) + //{ + // switch (i) + // { + // case 0: + // //信息接受委托事件 + // com.lstUI[i].TcoComInfoMsgEvent += InfoEvent_Job; + // com.lstUI[i].TCPOpen(); + // //信息接受委托事件 + // com.lstUI[i].TcoComRecvMsgEvent += RegEvent_Job; + // break; + // case 1: + // //信息接受委托事件 + // com.lstUI[i].TcoComInfoMsgEvent += InfoEvent_Job1; + // com.lstUI[i].TCPOpen(); + // //信息接受委托事件 + // com.lstUI[i].TcoComRecvMsgEvent += RegEvent_Job1; + // break; + + // } + //} + #endregion + } + + + /// + /// 消息悬浮提示 + /// + /// + /// + /// + public void ShowMsg(Logstype logType, string str, int time) + { + if (this.InvokeRequired) + { + this.BeginInvoke(new ThreadStart(delegate () + { + switch (logType) + { + case Logstype.Message: + MessageTip.ShowOk($"{str}", decimal.ToInt32(time)); + break; + case Logstype.Warning: + MessageTip.ShowWarning($"{str}", decimal.ToInt32(time)); + break; + case Logstype.Error: + MessageTip.ShowError($"{str}", decimal.ToInt32(time)); + break; + default: + break; + } + })); + } + else + { + switch (logType) + { + case Logstype.Message: + MessageTip.ShowOk($"{str}", decimal.ToInt32(time)); + break; + case Logstype.Warning: + MessageTip.ShowWarning($"{str}", decimal.ToInt32(time)); + break; + case Logstype.Error: + MessageTip.ShowError($"{str}", decimal.ToInt32(time)); + break; + default: + break; + } + } + } + + /// + ///开始 + /// + /// + /// + private void btStart_Click(object sender, EventArgs e) + { + if (CurrentInfo.autuority == Autuority.Empty) + { + MessageBox.Show("请先登录再进行操作!", "错误提示"); + return; + } + ReadIni(); + if (IsStartZNDB) + { + string strErr = ""; + bool b1 = InitSerialPort(ref strErr); + if (!b1) + { + MessageBox.Show(strErr, "错误提示"); + return; + } + } + if (!startup) + { + SystemStart(); + return; + } + startup = false; + Invoke((Action)delegate + { + btnStart.ButtonCenterColorStart = Color.Red; + btnStart.ButtonCenterColorEnd = Color.Salmon; + lblMsg.Text = "启动联机"; + lblLinkPLCState.IsFlash = false; + lblLinkPLCState.LedStatus = false; + + }); + + + + COMStart(false); + isEnabled = false; + CleardbData(); + + for (int i = 0; i < OmronCount; i++) + { + if (omronPLCCom.lstMcUI[i].IsRun) + { + omronPLCCom.lstMcUI[i].ConnectClose(); + omronPLCCom.lstMcUI[i].OmronStart(false); + omronPLCCom.lstMcUI[i].IsRun = false; + omronPLCCom.lstMcUI[i].btnStart.Text = "启动"; + omronPLCCom.lstMcUI[i].HeartBeat = false; + + + + } + } + } + + /// + /// 启动PLC连接 + /// + private void SystemStart() + { + for (int i = 0; i < OmronCount; i++) + { + if (!omronPLCCom.lstMcUI[i].IsRun) + { + bool b = omronPLCCom.lstMcUI[i].Connect(); + if (b) + { + startOmronUp = true; + omronPLCCom.lstMcUI[i].OmronStart(true); + omronPLCCom.lstMcUI[i].IsRun = true; + omronPLCCom.lstMcUI[i].btnStart.Text = "停止"; + omronPLCCom.lstMcUI[i].HeartBeat = true; + } + else + { + startOmronUp = false; + } + } + } + if (startOmronUp) + { + startup = true; + } + if (startup) + { + SendAuthorityToPLC(); + //SetProductModelEnable(false); + btnStart.ButtonCenterColorStart = Color.OliveDrab; + btnStart.ButtonCenterColorEnd = Color.OliveDrab; + lblMsg.Text = "停止联机"; + #region 开机前告诉PLC当前挡位设置 + //开机前告诉PLC当前挡位设置 + MESGradingSet[0] = (short)1; + if ((txtgrading2.Text.Trim()+ txtTensionStrapCCD2.Text).Equals(txtgrading1.Text.Trim() + txtTensionStrapCCD1.Text)) + MESGradingSet[1] = MESGradingSet[0]; + else + MESGradingSet[1] = (short)(MESGradingSet[0] + 1); + + if ((txtgrading3.Text.Trim() + txtTensionStrapCCD3.Text).Equals(txtgrading1.Text.Trim() + txtTensionStrapCCD1.Text)) + MESGradingSet[2] = MESGradingSet[0]; + else + { + if ((txtgrading3.Text.Trim() + txtTensionStrapCCD3.Text).Equals(txtgrading2.Text.Trim()+txtTensionStrapCCD2.Text)) + MESGradingSet[2] = MESGradingSet[1]; + else + MESGradingSet[2] = (short)(MESGradingSet[1] + 1); + } + + if ((txtgrading4.Text.Trim() + txtTensionStrapCCD4.Text).Equals(txtgrading1.Text.Trim() + txtTensionStrapCCD1.Text)) + MESGradingSet[3] = MESGradingSet[0]; + else + { + if ((txtgrading4.Text.Trim() + txtTensionStrapCCD4.Text).Equals(txtgrading2.Text.Trim() + txtTensionStrapCCD2.Text)) + MESGradingSet[3] = MESGradingSet[1]; + else + { + if ((txtgrading4.Text.Trim() + txtTensionStrapCCD4.Text).Equals(txtgrading3.Text.Trim() + txtTensionStrapCCD3.Text)) + MESGradingSet[3] = MESGradingSet[2]; + else + MESGradingSet[3] = (short)(MESGradingSet[2] + 1); + } + } + // + if (txtTensionStrapCCD1.Text.ToUpper() == "NG") + { + MESGradingSet[0] = (short)(30 + MESGradingSet[0]); + } + if (txtTensionStrapCCD2.Text.ToUpper() == "NG") + { + MESGradingSet[1] = (short)(30 + MESGradingSet[1]); + } + if (txtTensionStrapCCD3.Text.ToUpper() == "NG") + { + MESGradingSet[2] = (short)(30 + MESGradingSet[2]); + } + if (txtTensionStrapCCD4.Text.ToUpper() == "NG") + { + MESGradingSet[3] = (short)(30 + MESGradingSet[3]); + } + + int TensionStrap1 = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap1")); + int TensionStrap2 = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap2")); + int TensionStrap3 = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap3")); + int Grading = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "Grading")); + int IsMesUP = Convert.ToInt32(IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "IsMesUP")); + + //告诉PLC当前OK与NG拉带设置挡位 + omronPLCCom.lstMcUI[0].WriteDReg("W241", MESGradingSet[0]); + omronPLCCom.lstMcUI[0].WriteDReg("W242", MESGradingSet[1]); + omronPLCCom.lstMcUI[0].WriteDReg("W243", MESGradingSet[2]); + omronPLCCom.lstMcUI[0].WriteDReg("W244", MESGradingSet[3]); + omronPLCCom.lstMcUI[0].WriteDReg("W245", (short)(TensionStrap1==0?99: TensionStrap1 + 10)); + omronPLCCom.lstMcUI[0].WriteDReg("W246", (short)(TensionStrap2==0?99: TensionStrap2 + 10)); + omronPLCCom.lstMcUI[0].WriteDReg("W247", (short)(TensionStrap3==0?99: TensionStrap3 + 10)); + //omronPLCCom.lstMcUI[0].WriteDReg("W245", 5); + //omronPLCCom.lstMcUI[0].WriteDReg("W246", 6); + //omronPLCCom.lstMcUI[0].WriteDReg("W247", 7); + omronPLCCom.lstMcUI[0].WriteDReg("W248", (short)Grading); + omronPLCCom.lstMcUI[0].WriteDReg("W250", (short)IsMesUP); + + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]当前一档,W241[值:{MESGradingSet[0]}-档位:{txtgrading1.Text.Trim()}-{txtTensionStrapCCD1.Text}]", LogAddtype.local, Logtype.Message); + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]当前二档,W242[值:{MESGradingSet[1]}-档位:{txtgrading2.Text.Trim()}-{txtTensionStrapCCD2.Text}]", LogAddtype.local, Logtype.Message); + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]当前三档,W243[值:{MESGradingSet[2]}-档位:{txtgrading3.Text.Trim()}-{txtTensionStrapCCD3.Text}]", LogAddtype.local, Logtype.Message); + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]当前四档,W244[值:{MESGradingSet[3]}-档位:{txtgrading4.Text.Trim()}-{txtTensionStrapCCD4.Text}]", LogAddtype.local, Logtype.Message); + + var ng1 = (short)(TensionStrap1 == 0 ? 99 : TensionStrap1 + 10); + var ng2 = (short)(TensionStrap2 == 0 ? 99 : TensionStrap2 + 10); + var ng3 = (short)(TensionStrap3 == 0 ? 99 : TensionStrap3 + 10); + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]当前NG拉带1,W245[值:{ng1}-档位:{txtTensionStrap1.Text.Trim()}]", LogAddtype.local, Logtype.Message); + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]当前NG拉带2,W246[值:{ng2}-档位:{txtTensionStrap2.Text.Trim()}]", LogAddtype.local, Logtype.Message); + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]当前NG拉带3,W247[值:{ng3}-档位:{txtTensionStrap3.Text.Trim()}]", LogAddtype.local, Logtype.Message); + + if ((short)IsMesUP == 1) + { + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}],当前W250[值:{(short)IsMesUP}-启用MES模式]", LogAddtype.local, Logtype.Message); + + if ((short)Grading == 1) + { + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}],当前W248[值:{(short)Grading}-启用分档模式]", LogAddtype.local, Logtype.Message); + } + else + { + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}],当前W248[值:{(short)Grading}-关闭分档模式]", LogAddtype.local, Logtype.Message); + } + } + else + { + LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}],当前W250[值:{(short)IsMesUP}-关闭MES模式]", LogAddtype.local, Logtype.Message); + } + #endregion + } + else + { + COMStart(false); + isEnabled = false; + CleardbData(); + Invoke((Action)delegate + { + lblLinkPLCState.IsFlash = false; + lblLinkPLCState.LedStatus = false; + + }); + startup = false; + btnStart.ButtonCenterColorStart = Color.Red; + btnStart.ButtonCenterColorEnd = Color.Salmon; + lblMsg.Text = "启动联机"; + MessageBox.Show("PLC通讯未连接!", "系统程序运行错误", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification); + } + } + /// + /// 给PLC写入权限 + /// + private void SendAuthorityToPLC() + { + if (lblAuthority.Text == "操作员") + { + omronPLCCom.lstMcUI[0].WriteDReg("D21", (short)1);//提示PLC进入操作员权限 + } + else if (lblAuthority.Text == "工程师") + { + omronPLCCom.lstMcUI[0].WriteDReg("D21", (short)2);//提示PLC进入工程师权限 + } + else + { + omronPLCCom.lstMcUI[0].WriteDReg("D21", (short)3);//提示PLC进入管理员权限 + } + } + /// + /// 计算CheckSum + /// + /// + /// + public static string GetCheckSum(string st) + { + //ASCII字符转10进制byte + string res = ""; + try + { + int result = 0; + byte[] ba = System.Text.ASCIIEncoding.Default.GetBytes(st); + for (int i = 0; i < ba.Length; i++) + { + result += ba[i]; + } + string dfd = result.ToString(); + if (dfd.Length >= 2) + { + res = dfd.Substring(dfd.Length - 2); + } + else + { + res = "0" + dfd; + } + } + catch (Exception) { } + return res; + } + + #endregion + + /// + /// 设备心跳消息委托更新状态 + /// + /// + private void TriggerHeartEvent(bool b) + { + if (!startup) + { + return; + } + if (this.InvokeRequired) + { + if (b) + { + Invoke((Action)delegate + { + lblLinkPLCState.IsFlash = true; + lblLinkPLCState.LedStatus = true; + }); + } + else + { + Invoke((Action)delegate + { + lblLinkPLCState.IsFlash = false; + lblLinkPLCState.LedStatus = false; + }); + } + } + } + + /// + /// 1#通讯块读取PLC信号 + /// + /// + /// + /// + private void OmronRegEvent_Job1(int Index, string msg, OperateResult resByte) + { + if (!startup) + { + return; + } + if (omronPLCCom.lstMcUI[0].IsConnected) + { + switch (Index) + { + case 1: //1#上料 + if (omronPLCCom.lstMcUI[0].lstTrgUI[0].TrgParams.TriggerCmd == msg) + { + omronPLCCom.lstMcUI[0].WriteDReg(omronPLCCom.lstMcUI[0].lstTrgUI[0].TrgParams.TriggerAddr, (short)2); + mTaskA[0] = Task.Factory.StartNew(delegate + { + processA1(mctsA1, resByte); + }); + } + break; + case 2: //2#下料 + if (omronPLCCom.lstMcUI[0].lstTrgUI[1].TrgParams.TriggerCmd == msg) + { + omronPLCCom.lstMcUI[0].WriteDReg(omronPLCCom.lstMcUI[0].lstTrgUI[1].TrgParams.TriggerAddr, (short)2); + mTaskA[1] = Task.Factory.StartNew(delegate + { + processA2(mctsA2, resByte); + }); + } + break; + //case 3://3#报警 + // if (msg == "1" || msg == "2") + // { + // AlamCode = msg; + // omronPLCCom.lstMcUI[0].WriteDReg(omronPLCCom.lstMcUI[0].lstTrgUI[2].TrgParams.TriggerAddr, (short)3); + // mTaskA[2] = Task.Factory.StartNew(delegate + // { + // AlarmProcess(mctsA3, resByte); + // }); + // } + // break; + //case 4: //4#异常播报 + // if (omronPLCCom.lstMcUI[0].lstTrgUI[3].TrgParams.TriggerCmd == msg) + // { + // omronPLCCom.lstMcUI[0].WriteDReg(omronPLCCom.lstMcUI[0].lstTrgUI[3].TrgParams.TriggerAddr, (short)2); + // mTaskA[3] = Task.Factory.StartNew(delegate + // { + // processA3(mctsA4, resByte); + // }); + // } + // break; + } + } + else + { + Invoke((Action)delegate + { + lblLinkPLCState.IsFlash = false; + lblLinkPLCState.LedStatus = false; + }); + } + } + + + #region 上料数据 + /// + /// 1#通道读取异常条码数据 + /// + /// + /// + private void processA1(CancellationTokenSource mt, OperateResult resByte) + { + if (!mt.IsCancellationRequested) + { + if (resByte.IsSuccess && resByte != null) + { + try + { + sw.Restart(); + List list = new List(); + List listBar = StrUtil.GetListString(2, "NG"); + List listResult = CollectionUtil.GetListUShort(2); + //高低位取反 + byte[] bytes = resByte.Content.ByteReverse(); + //前面有\03\00 标识 占2个字节 + int offset = 0; + listBar[0] = TransformBase.TransString(bytes, 0+ offset, 20*2, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();//1# 条码 + listBar[1] = TransformBase.TransString(bytes, 40+ offset, 20*2, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();//2# 条码 + // listBar[2] = TransformBase.TransString(bytes, 80+ offset, 20 * 2, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();//3# 条码 + //新增 左右通道 + var dtGroup = 0; + try + { + dtGroup = omronPLCCom.lstMcUI[0].ReadshortDReg("W2023"); + } + catch (Exception) + { + + dtGroup = 0; + } + + for (int i = 0; i < listBar.Count; i++) + { + FeedingData m = new FeedingData(); + // m.TD = i + 1; + m.TD = i * 2 + dtGroup;// 主道 =1 通道改为 1,3 主道=2 时 通道该为 2,4 + m.BarCode = listBar[i]; + m.TDGroup = dtGroup; + + m.CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + if (String.IsNullOrEmpty(m.BarCode) || m.BarCode.Trim() == "ERROR") + { + m.BarCode = "ERROR" + Guid.NewGuid().ToString("N").Substring(0, 8); + m.Result = "NG"; + m.Remark = "扫码不良"; + listResult[i] = 2; + } + else + { + m.Result = "OK"; + m.Remark = "良品"; + + #region 947 MES + if (Global.systemConfig.isUpMes) + { + // TODO 进站数据上传 + ReqArrivalStation req = new ReqArrivalStation() + { + SiteCode = Global.systemConfig.siteCode, + LineCode = Global.systemConfig.lineCode, + EquipNum = Global.systemConfig.equipCode, + MaterialCode = Global.systemConfig.materialCode, + UserName = "Test_HC", + Identification = m.BarCode, + ProductType = Global.systemConfig.productType + }; + + Task.Run(() => { + var resp = new MESDataCombin().PostProductArrivalStationData(req); + if (!resp.Success) + { + string errMsg = $"进站数据上传MES失败, 错误代码: {resp.Code}, 错误消息:{resp.Message}, 报错消息类型: {resp.Category}"; + LogManagerControl.AddLog(errMsg, LogAddtype.MES, Logtype.Error); + } + }); + } + #endregion + } + list.Add(m); + //电芯判断结果返回PLC + omronPLCCom.lstMcUI[0].WriteDReg("W202" + i.ToString(), listResult[i]); + } + //复位PLC信号 + omronPLCCom.lstMcUI[0].ClearReg(omronPLCCom.lstMcUI[0].lstTrgUI[0].TrgParams.TriggerAddr, VarType.Short); + sw.Stop(); + LogManagerControl.AddLog("上料数据处理耗时:" + sw.ElapsedMilliseconds + "ms", LogAddtype.local); + //显示数据库 + Task.Run(() => + { + SaveDataEven1_Run(list); + }); + } + catch (Exception ex) + { + LogManagerControl.AddLog("读取上料数据异常:" + ex.Message, LogAddtype.local, Logtype.Error); + } + } + } + } + + /// + /// 上料电芯数据保存 + /// + /// + private void SaveDataEven1_Run(object obj) + { + if (!startup) + { + return; + } + if (dgvDataShow_A.InvokeRequired) + { + ChangeFunctionHTestA a = new ChangeFunctionHTestA(SaveDataEven1_Run); + this.Invoke(a, new object[] { obj }); + } + else + { + try + { + Repository repository = new Repository(); + var feedingService = new FeedingDataService(repository); + + List list = (List)obj; + if (list != null) + { + foreach (FeedingData m in list) + { + string strRes = ""; + + int addCout = feedingService.AddFeedingData(m); + //var result = dbHelper.AddFeedingData(m, ref strErr);//保存本地数据 + //strRes = strErr == "" ? ",本地存储OK" : ",本地存储NG" + strErr; + strRes = addCout > 0 ? ",本地存储OK" : ",本地存储NG"; + m.Remark += strRes; + // 文件形式保存到本地 + List data = new List(); + data.Add(m); + CSVHelper.WriteCSV("", data, 1); + + if (listTA.Count > 50) + { + listTA.RemoveAt(0); + } + listTA.Add(m); + } + } + if (dgvDataShow_A.Rows.Count > 0) + { + dgvDataShow_A.CurrentCell = dgvDataShow_A.Rows[this.dgvDataShow_A.Rows.Count - 1].Cells[0]; + } + } + catch (Exception ex) + { + LogManagerControl.AddLog("进站条码保存数据失败:" + ex.Message, LogAddtype.local, Logtype.Error); + } + } + } + + #endregion + + #region 下料数据 + /// + /// 下料数据 + /// + /// + /// + private void processA2(CancellationTokenSource mt, OperateResult resByte) + { + + if (!mt.IsCancellationRequested) + { + if (resByte.IsSuccess && resByte != null) + { + try + { + sw.Restart(); + List list = new List(); + List listBarIn = StrUtil.GetListString(2, "NG");//进站条码 + List listBarOut = StrUtil.GetListString(2, "NG");//出站条码 + List> listBarResult = new List>(); //CCD结果 + List listBar1Result = CollectionUtil.GetListUShort(16); + List listBar2Result = CollectionUtil.GetListUShort(16); + List listBar3Result = CollectionUtil.GetListUShort(16); + listBarResult.Add(listBar1Result); + listBarResult.Add(listBar2Result); + listBarResult.Add(listBar3Result); + List listResult = CollectionUtil.GetListUShort(2); + //读取plc地址W260。1 是开启屏蔽。2 是默认不开启。 反馈地址w261。 1 是正常不报警。 2 是报警。 + var isCCDMask = omronPLCCom.lstMcUI[0].ReadshortDReg("W260"); + int id = 0; + + byte[] bytes = resByte.Content.ByteReverse(); + //前面有2个占位标识 04 + int offset = 0; + for (int i = 0; i < 2; i++) + { + listBarOut[i] = TransformBase.TransString(bytes, 0 + offset + (i*40 *2), 20 *2, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();//1# 出站条码 + var lstBarResult = listBarResult[i]; + for (int j = 0; j < 16; j++) + { + + // var okNg = TransformBase.TransString(bytes, 40 + offset + (i * 40*2) + j *2, 1*2, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim(); + int ccdDefault = TransformBase.TransInt16(resByte.Content, 40 + offset + (i * 40 * 2) + j * 2); + // int.TryParse(okNg,out ccdDefault); + lstBarResult[j] = (short)ccdDefault; + // TransformBase.TransInt16(resByte.Content, 20 + offset+(i * 40)+j,1);//1#CCD1结果CCD给0是OK,1是NG + } + listBarIn[i] = TransformBase.TransString(bytes, 140 * 2 + offset + (i * 20*2), 20 * 2, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();// + // listBarIn[i] = listBarOut[i]; + ///1# 进站条码 + } + + Repository repository = new Repository(); + FeedingDataService service = new FeedingDataService(repository); + + for (int i = 0; i < listBarOut.Count; i++) + { + BlankingData m = new BlankingData(); + id = i + 1; + + No = No + 1; + m.TD = No; + m.WorkShift = ClassShift == 0 ? "白班" : "夜班"; + m.ArrivalBarCode = listBarIn[i]; + m.DepartureBarCode = listBarOut[i]; + m.OutTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + + + var listEntity = service.GetFeedingData(m.ArrivalBarCode); + if (listEntity.Count() > 0) + { + m.TDGroup = listEntity.First().TDGroup; + } + var lstBarResult = listBarResult[i]; + #region CCD结果 0 ok ;1 ng + m.CCD1 = lstBarResult[0] == 1 ? "OK" : "NG"; + m.CCD2 = lstBarResult[1] == 1 ? "OK" : "NG"; + m.CCD3 = lstBarResult[2] == 1 ? "OK" : "NG"; + m.CCD4 = lstBarResult[3] == 1 ? "OK" : "NG"; + m.CCD5 = lstBarResult[4] == 1 ? "OK" : "NG"; + m.CCD6 = lstBarResult[5] == 1 ? "OK" : "NG"; + m.CCD7 = lstBarResult[6] == 1 ? "OK" : "NG"; + m.CCD8 = lstBarResult[7] == 1 ? "OK" : "NG"; + m.CCD9 = lstBarResult[8] == 1 ? "OK" : "NG"; + m.CCD10 = lstBarResult[9] == 1 ? "OK" : "NG"; + m.CCD11 = lstBarResult[10] == 1 ? "OK" : "NG"; + m.CCD12 = lstBarResult[11] == 1 ? "OK" : "NG"; + m.CCD13 = lstBarResult[12] == 1 ? "OK" : "NG"; + m.CCD14 = lstBarResult[13] == 1 ? "OK" : "NG"; + m.CCD15 = lstBarResult[14] == 1 ? "OK" : "NG"; + m.CCD16 = lstBarResult[15] == 1 ? "OK" : "NG"; + + var cfgList = Global.systemConfig.CollectItemCfgList + .Where(it => it.IsEnable && it.PLCRelAddress != null) + .OrderBy(it => it.PLCRelAddress).ToList(); + + for (int k = 0; k < cfgList.Count; k++) + { + var item = cfgList[k]; + + int index = (int)item.PLCRelAddress - 1; + + if (index < listBar2Result.Count) + { + var code = listBar2Result[index] == 1 ? "OK" : "NG"; + m.PLCValDic.Add((int)item.PLCRelAddress, code); + } + } + #endregion + string levelresult = null; + string strErr = ""; + //入站条码判断 + if (String.IsNullOrEmpty(m.ArrivalBarCode) || m.ArrivalBarCode.Trim() == "ERROR") + m.ArrivalBarCode = "ERROR" + Guid.NewGuid().ToString("N").Substring(0, 8); + //出站条码判断 + if (String.IsNullOrEmpty(m.DepartureBarCode) || m.DepartureBarCode.Trim() == "ERROR") + m.DepartureBarCode = "ERROR" + Guid.NewGuid().ToString("N").Substring(0, 8); + + var lstError = new List(); + listResult[i] = GetResult(m, ref strErr,ref lstError); + + m.Result = listResult[i] == 1 ? "OK" : "NG"; + m.Remark = strErr; + //扫码不良 进出站扫码不对应 不需要上传MES + var scanCount = lstError.Count(x => x == 2 || x == 3); + var ccdOkNg = "OK"; //ccd总结果 ok ng + if (scanCount > 0) + { + m.Result = "扫码NG"; + } + else + { + //扫码ng 另一分支ccd NG + var ccdNgCount = lstError.Count(x => x > 10); + if(ccdNgCount >0) + { + ccdOkNg = "NG"; + m.Result = "CCD结果NG"; + } + } + + + //OK + //扫码ng的不进行mes分档,CCD NG的也进行mes分档 + var isOkGrading = false; //是否已经完成OK挡位的分档成功 + if (listResult[i] == 1 || ccdOkNg =="NG") + { + if (Global.systemConfig.isUpMes && chkCkGrading) + { + //分档接口 + //21~24 OK挡位 + MesResponse resGrading = ToMesData.GetMesIn(m.DepartureBarCode, m.ArrivalBarCode);//分档查询 + try + { + //listResult[i] = (short)(88);//默认分档NG + //m.Remark = "外观检OK分档NG"; + if (resGrading.success) + { + if (resGrading.rows != null && resGrading.rows.Count > 0 && resGrading.rows[0].rank != null) + { + var rank = resGrading.rows[0].rank; + //不分类 + // 读取plc地址W260。9 是开启屏蔽 使用不分类。1 是默认不开启。 反馈地址w261。 1 是正常不报警。 2 是报警。 + + #region //CCD屏蔽被修改 报警 + var listGradingCCD = new List(); + listGradingCCD.Add(Global.systemConfig.Grading1);//k77_ok + listGradingCCD.Add(Global.systemConfig.Grading2); + listGradingCCD.Add(Global.systemConfig.Grading3); + listGradingCCD.Add(Global.systemConfig.Grading4); + if (isCCDMask == 9) + { + ccdOkNg = "不分类"; + var gradingCCD_NoClassCount = listGradingCCD.Count(x => x.Contains("不分类")); + if (gradingCCD_NoClassCount <= 0) + { + //CCD屏蔽被修改 报警 + omronPLCCom.lstMcUI[0].WriteDReg("W261", (short)2); + } + } + else + { + //必须有一个OK ccd结果拉带 + var gradingCCD_OKCount = listGradingCCD.Count(x => x.Contains("OK")); + if (gradingCCD_OKCount <= 0) + { + //CCD屏蔽被修改 报警 + omronPLCCom.lstMcUI[0].WriteDReg("W261", (short)2); + } + var lstGradingCCD_NG = listGradingCCD.Where(x => x.Contains("NG")).Distinct().ToList(); + foreach (var item_NG in lstGradingCCD_NG) + { + var grading_array = item_NG.Substring(0,item_NG.Length-2); + var indexGrading = listGradingCCD.IndexOf(grading_array + "OK"); + if (indexGrading < 0) + { + //CCD屏蔽被修改 报警 + omronPLCCom.lstMcUI[0].WriteDReg("W261", (short)2); + } + } + } + #endregion + + + rank += ccdOkNg; + //k77 + 不分类 ng ok + if (rank.Equals(Global.systemConfig.Grading1) ) + { + listResult[i] = (short)(MESGradingSet[0]); + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检OKMES反馈档位:{resGrading.rows[0].rank}-CCD结果{ccdOkNg}"; + isOkGrading = true; + } + else if (rank.Equals(Global.systemConfig.Grading2) ) + { + listResult[i] = (short)(MESGradingSet[1]); + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检OKMES反馈档位:{resGrading.rows[0].rank}-CCD结果{ccdOkNg}"; + isOkGrading = true; + } + else if (rank.Equals(Global.systemConfig.Grading3) ) + { + listResult[i] = (short)(MESGradingSet[2]); + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检OKMES反馈档位:{resGrading.rows[0].rank}-CCD结果{ccdOkNg}"; + isOkGrading = true; + } + else if (rank.Equals(Global.systemConfig.Grading4)) + { + listResult[i] = (short)(MESGradingSet[3]); + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检OKMES反馈档位:{resGrading.rows[0].rank}-CCD结果{ccdOkNg}"; + isOkGrading = true; + } + else + { + if (isCCDMask == 9) + { + m.Result = "分档NG"; + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检OKMES反馈档位:{resGrading.rows[0].rank}-CCD屏蔽状态"; + } + else + { + m.Result = "分档NG"; + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检OKMES反馈档位:{resGrading.rows[0].rank}与设置档位不匹配NG"; + } + + } + levelresult = resGrading.rows[0].level; + + } + else + { + m.Result = "分档NG"; + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检OK分档NG,MES未反馈正确档位"; + } + + } + else + { + if (resGrading.error == 9 || resGrading.error == 99) + { + omronPLCCom.lstMcUI[0].WriteDReg("W249", (short)1);//MES网络异常 + LogManagerControl.AddLog($"出站条码[{m.DepartureBarCode}]访问MES异常", LogAddtype.local, Logtype.Error); + } + m.Result = "分档NG"; + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检MES分档请求失败,访问MES异常"; + } + + } + catch (Exception ex) + { + m.Result = "分档NG"; + m.Remark = $"出站条码[{m.DepartureBarCode}]解析出站MES分档数据异常,分档NG"; + LogManagerControl.AddLog("解析出站MES分档数据异常:" + ex.Message, LogAddtype.local, Logtype.Error); + } + + } + else + { + listResult[i] = 80;//不开启分档 + } + // + } + //NG + if (m.Result.IndexOf("NG") >= 0 && !isOkGrading) + { + if (IsStartNGFL) + { + listResult[i] = 99; + m.Result = "NG不分类"; + m.Remark = $"出站条码[{m.DepartureBarCode}],出站NG不分类"; + } + else + { + var NgOkChannelNo = 0; + var NgOkChannelValue = ""; + var indexFD = strNgBound.ToList().FindIndex(x => x == m.Result); + var smAndFdNg = false; + if (indexFD >= 0) + { + listResult[i] = (short)indexFD; + // m.Remark = $"出站条码[{m.DepartureBarCode},{m.Result}]"; + // + var smNgGradingSet = NgGradingSet.ToList().FindIndex(x => x == (indexFD+10)); + if(smNgGradingSet >= 0) + { + listResult[i] = (short)(NgGradingSet[smNgGradingSet]); + smAndFdNg = true; + NgOkChannelNo = smNgGradingSet; + m.Remark = $"出站条码[{m.DepartureBarCode},{m.Result},通道[{NgOkChannelNo + 5}]出站NG拉带值{listResult[i]},MES获取等级{levelresult}"; + } + } + if(!smAndFdNg) + { + var NgGrading1 = lstError.FindIndex(x => x == NgGradingSet[0]); + var NgGrading2 = lstError.FindIndex(x => x == NgGradingSet[1]); + var NgGrading3 = lstError.FindIndex(x => x == NgGradingSet[2]); + + if (NgGrading1 >= 0) + { + listResult[i] = (short)(NgGradingSet[0]); + NgOkChannelNo = 0; + } + else if (NgGrading2 >= 0) + { + listResult[i] = (short)(NgGradingSet[1]); + NgOkChannelNo = 1; + } + else if (NgGrading3 >= 0) + { + listResult[i] = (short)(NgGradingSet[2]); + NgOkChannelNo = 2; + } + else + { + var indexQT = strNgBound.ToList().FindIndex(x => x == "其他"); + var smNgGradingSet = NgGradingSet.ToList().FindIndex(x => x == (indexQT+10)); + if (smNgGradingSet >= 0) + { + listResult[i] = NgGradingSet[smNgGradingSet]; + NgOkChannelNo = smNgGradingSet; + } + else + { + listResult[i] = 88; + } + + } + m.Remark = $"出站条码[{m.DepartureBarCode}],NG,通道[{NgOkChannelNo + 5}]出站NG拉带值{listResult[i]},MES获取等级{levelresult}"; + } + } + } + + list.Add(m); + //电芯判断结果返回PLC + omronPLCCom.lstMcUI[0].WriteDReg("W302" + i.ToString(), listResult[i]); + } + //复位PLC信号 + omronPLCCom.lstMcUI[0].ClearReg(omronPLCCom.lstMcUI[0].lstTrgUI[1].TrgParams.TriggerAddr, VarType.Short); + sw.Stop(); + LogManagerControl.AddLog("出站数据处理耗时:" + sw.ElapsedMilliseconds + "ms", LogAddtype.local); + //显示数据库 + Task.Run(() => + { + SaveDataEven2_Run(list); + if (Global.systemConfig.isUpMes) + { + UpDataMES_Run(list); + } + }); + + + } + catch (Exception ex) + { + LogManagerControl.AddLog("读取出站数据异常:" + ex.Message, LogAddtype.local, Logtype.Error); + } + } + } + } + + /// + /// 结果加工参数上传 + /// + /// + private void UpDataMES_Run(object obj) + { + + try + { + List list = (List)obj; + if (list != null) + { + foreach (BlankingData m in list) + { + if (m != null) + { + #region 3、产品结果加工参数 + MesResponse resMes = ToMesData.ProductResultParameters(m); + if (!resMes.success) + { + if (resMes.error == 99) + { + omronPLCCom.lstMcUI[0].WriteDReg("W249", (short)1);//MES网络异常 + LogManagerControl.AddLog("结果数据上传MES超时或无法访问MES服务器", LogAddtype.local, Logtype.Error); + } + else + { + LogManagerControl.AddLog("结果数据上传MES失败NG" + resMes.message, LogAddtype.local, Logtype.Error); + } + } + #endregion + + #region 电池出站 + ReqExitStation req = new ReqExitStation() + { + SiteCode = Global.systemConfig.siteCode, + LineCode = Global.systemConfig.lineCode, + EquipNum = Global.systemConfig.equipCode, + UserName = Global.systemConfig.userName, + ContainerCode = string.Empty, + AssembleLineList = new List() { + new AssembleLine() { + Identification = m.ArrivalBarCode, + QualityStatus = m.Result, + // TODO NG编码 + QrCode = string.Empty, + NgCode = new string[] { string.Empty }, + // NG错误信息 + NgMessage = string.Empty + } + } + }; + RespArrivalStation resp = ToMesData.PostProductExitStationData(req); + + if (resp == null || !resp.Success) + { + string errMsg = $"出站数据上传MES失败, 错误代码: {resp?.Code}, 错误消息:{resp?.Message}, 报错消息类型: {resp?.Category}"; + LogManagerControl.AddLog(errMsg, LogAddtype.local, Logtype.Error); + } + #endregion + } + } + } + } + catch (System.Exception ex) + { + LogManagerControl.AddLog("上传出站结果参数异常:" + ex.Message, LogAddtype.local, Logtype.Error); + } + } + + + /// 电池异常数据保存 + /// + /// + private void SaveDataEven2_Run(object obj) + { + //if (!startup) + //{ + // return; + //} + if (dgvDataShow_B.InvokeRequired) + { + ChangeFunctionHTestB c = new ChangeFunctionHTestB(SaveDataEven2_Run); + this.Invoke(c, new object[] { obj }); + } + else + { + try + { + //BlankingDataService service = IocConfig.Provider.GetService(); + Repository repository = new Repository(); + var service = new BlankingDataService(repository); + + List list = (List)obj; + if (list != null) + { + foreach (BlankingData m in list) + { + //string strErr = ""; + string strRes = ""; + + // TODO 使用service操作 + int addCount = service.AddBlankData(m); + //var result = dbHelper.AddBlankingData(m, ref strErr);//保存本地数据 + strRes = addCount > 0 ? ",本地存储OK" : ",本地存储NG"; + m.Remark += strRes; + // 文件形式保存到本地 + List data = new List(); + data.Add(m); + CSVHelper.WriteCSV("", data, 2); + + if (listTB.Count > 50) + { + listTB.RemoveAt(0); + } + listTB.Add(m); + } + } + if (dgvDataShow_B.Rows.Count > 0) + { + dgvDataShow_B.CurrentCell = dgvDataShow_B.Rows[this.dgvDataShow_B.Rows.Count - 1].Cells[0]; + IniFileHelper.WriteIniData("SYSTEM_CONFIGURE", "ClassShift", ClassShift.ToString()); + IniFileHelper.WriteIniData("SYSTEM_CONFIGURE", "No", No.ToString()); + } + } + catch (Exception ex) + { + LogManagerControl.AddLog("下料保存数据失败:" + ex.Message, LogAddtype.local, Logtype.Error); + } + } + } + /// + /// 结果判断 + /// + /// + /// + /// + private short GetResult(BlankingData m, ref string strErr,ref List lstError) + { + short res = 0; + + strErr = ""; + #region 判断各项参数 + //入站条码判断 + bool IsBarInOK = !m.ArrivalBarCode.Contains("ERROR"); + //出站条码判断 + bool IsBarOK = !m.DepartureBarCode.Contains("ERROR"); + //判断条码是否一致 + bool bBar = true; + if (m.ArrivalBarCode.Trim() != m.DepartureBarCode.Trim()) + bBar = false; + m.TMDB = bBar ? "OK" : "NG"; + + bool[] b0 = new bool[16] { true, true, true, true, true, true, true, true, true, true, true, true, true, true,true,true }; + b0[0] = m.CCD1 == "OK" ? true : false; + b0[1] = m.CCD2 == "OK" ? true : false; + b0[2] = m.CCD3 == "OK" ? true : false; + b0[3] = m.CCD4 == "OK" ? true : false; + b0[4] = m.CCD5 == "OK" ? true : false; + b0[5] = m.CCD6 == "OK" ? true : false; + b0[6] = m.CCD7 == "OK" ? true : false; + b0[7] = m.CCD8 == "OK" ? true : false; + b0[8] = m.CCD9 == "OK" ? true : false; + b0[9] = m.CCD10 == "OK" ? true : false; + b0[10] = m.CCD11 == "OK" ? true : false; + b0[11] = m.CCD12 == "OK" ? true : false; + b0[12] = m.CCD13 == "OK" ? true : false; + b0[13] = m.CCD14 == "OK" ? true : false; + b0[14] = m.CCD15 == "OK" ? true : false; + b0[15] = m.CCD16 == "OK" ? true : false; + #endregion + + + #region + if ( IsBarOK && bBar && b0[0] && b0[1] && b0[2] && b0[3] && b0[4] && b0[5] && b0[6] && b0[7] && b0[8] && b0[9] && b0[10] && b0[11] && b0[12] && b0[13] && b0[14] && b0[15]) + { + strErr = "良品"; + res = 1; + lstError.Add(res); + return 1; + } + + //if (!IsBarInOK) + //{ + // strErr = "入站扫码不良,入站条码:" + m.ArrivalBarCode; + // return 2; + //} + if (!IsBarOK) + { + strErr = "出站扫码不良,出站条码:" + m.DepartureBarCode; + res = 2; + lstError.Add(res); + } + if (!bBar) + { + strErr = "入站与出站条码不一致"; + res = 3; + lstError.Add(res); + } + + if (!b0[0]) + { + strErr = "正面(2D/3D)不良"; + res = 11; + lstError.Add(res); + } + if (!b0[1]) + { + strErr = "反面(2D/3D)不良"; + res = 12; + lstError.Add(res); + } + if (!b0[2]) + { + strErr = "左侧面(2D/3D)不良"; + res =13; + lstError.Add(res); + } + if (!b0[3]) + { + strErr = "右侧面(2D/3D)不良"; + res = 14; + lstError.Add(res); + } + if (!b0[4]) + { + strErr = "顶面(2D/3D)不良"; + res = 15; + lstError.Add(res); + } + if (!b0[5]) + { + strErr = "底面(2D/3D)不良"; + res = 16; + lstError.Add(res); + } + if (!b0[6]) + { + strErr = "底WE1不良"; + res = 17; + lstError.Add(res); + } + if (!b0[7]) + { + strErr = "底WE2不良"; + res = 18; + lstError.Add(res); + } + if (!b0[8]) + { + strErr = "底WE3不良"; + res = 19; + lstError.Add(res); + } + if (!b0[9]) + { + strErr = "底WE4不良"; + res = 20; + lstError.Add(res); + } + if (!b0[10]) + { + strErr = "中ME1不良"; + res = 21; + lstError.Add(res); + } + if (!b0[11]) + { + strErr = "中ME2不良"; + res = 22; + lstError.Add(res); + } + if (!b0[12]) + { + strErr = "中ME3不良"; + res = 23; + lstError.Add(res); + } + if (!b0[13]) + { + strErr = "中ME4不良"; + res = 24; + lstError.Add(res); + } + if (!b0[14]) + { + strErr = "极柱(POS/NEG)不良"; + res = 25; + lstError.Add(res); + } + if (!b0[15]) + { + strErr = "防爆阀(PRO)不良"; + res = 26; + lstError.Add(res); + } + return 0; + + #endregion + + + + } + + + /// + /// 获取进站条码 + /// + /// + /// + /// + public string GetInTime(string strBar, ref string strErr) + { + string strTime = ""; + strErr = ""; + try + { + + if (strBar != "") + { + var result = dbHelper.GetBarInTime(strBar);//保存本地数据 + if (result != null && result.Rows.Count > 0) + { + strTime = result.Rows[0]["进站时间"].ToString(); + //dbHelper.UparInTime(strBar); + } + } + } + catch (Exception ex) + { + strErr = ex.Message; + } + return strTime; + + + } + /// + /// 判断字符串是否有特殊符号 + /// + /// + /// + public bool IsSpecialChar(string str) + { + Regex regExp = new Regex("[ \\[ \\] \\^ \\-_*×――(^)$%~!@@##$…&%¥—+=<>《》!!???::•`·、。,;,.;/\'\"{}()‘’“”-]"); + if (regExp.IsMatch(str)) + { + return true; + } + return false; + } + + /// + /// + /// + /// + /// + public List GetListInt(int Num) + { + List list = new List(); + for (int i = 0; i < Num; i++) + { + list.Add(1); + } + return list; + } + + /// + /// 生成byte List集合 + /// + /// + /// + public List GetListByte(int Num) + { + List list = new List(); + for (int i = 0; i < Num; i++) + { + list.Add(0); + } + return list; + } + + /// + /// 判断分档是否都扫到条码 + /// + /// + /// + public bool IsListRes(List list) + { + HashSet hs = new HashSet(list); + if (hs.Count == 1) + { + return true; + } + return false; + } + + #region 设备状态报告 + + /// + /// 间隔 + /// + /// + /// + string strStatues = ""; + private void processModeStatus(CancellationTokenSource mt) + { + strStatues = ""; + while (true) + { + //SendStatus(); + Thread.Sleep(1000); + } + } + + + /// + /// 设备状态上传 + /// + /// + + private void SendStatus() + { + + //size1 0:OFF, 1:Vacancy, 2:Tray In, 3:Running, 4:End, 5:Error, 6: Ready, 9: Red Ready -托盘接受到入库预约但是无法进入(5分钟) / 트레이 정보 응답을 못받은 경우(5분) + //size2 0: Auto, 1: Local + //先确定设备是在自动还是手动状态下 + if (startup) + { + string Size1 = "0"; + string Size2 = "1"; + Size1 = omronPLCCom.lstMcUI[0].ReadshortDReg("W10").ToString(); + Size2 = omronPLCCom.lstMcUI[0].ReadBoolDReg("W12").ToString() == "True" ? "0" : "1"; + if (Size1 != strStatues) + { + strStatues = Size1; + + #region 上传mes + //if (Global.systemConfig.isUpMes) + //{ + string currentTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + + JY.MES.FMS.FMS_Status Status = new JY.MES.FMS.FMS_Status(); + + Status.seatId = ""; + Status.recordDate = currentTime; + //Status.statusCode = ""; + Status.uploadTime = currentTime; + Status.guid = Guid.NewGuid().ToString(); + + switch (strStatues) + { + case "1": + Status.statusCode = "Run";//正常运行 + LogManagerControl.AddLog("当前状态:正常运行", LogAddtype.local, Logtype.Message); + + break; + case "2": + Status.statusCode = "Idle";//待机状态 + LogManagerControl.AddLog("当前状态:闲置待机", LogAddtype.local, Logtype.Message); + + break; + case "3": + Status.statusCode = "Alert";//故障调试 + LogManagerControl.AddLog("当前状态:故障调试", LogAddtype.local, Logtype.Message); + + break; + case "4": + Status.statusCode = "Maintain";//停机 + LogManagerControl.AddLog("当前状态:停止运行", LogAddtype.local, Logtype.Message); + break; + // default: + //Status.statusCode = "Idle";//待机状态 + //break; + } + + if (Global.systemConfig.isUpMes) + { + string strJosn = JsonConvert.SerializeObject(Status); + // LogManagerControl.AddLog($"PC->FMS[MES_Status]:{strJosn}", LogAddtype.MES); + //TxtHelper.WriteTxt($@"{Global.strMesLogspath}\{DateTime.Now.ToString("yyyyMMdd")}\设备运行状态\{DateTime.Now.ToString("HH")}.txt", strJosn); + + Stopwatch swTime = new Stopwatch(); + swTime.Start(); + var result = JY.MES.FMS.MesHelper_EVE.MES_Status(Status); + swTime.Stop(); + LogManagerControl.AddLog($"处理设备状态上报FMS耗时:{swTime.ElapsedMilliseconds}ms", LogAddtype.local, Logtype.Message); + + if (result != null) + { + string strRes = "code" + "[" + result.code + "]" + "success" + "[" + result.success + "]" + "message" + "[" + result.message + "]" + "category" + "[" + result.category + "]"; + LogManagerControl.AddLog($"FMS->PC[MES_Status]:{strRes}", LogAddtype.MES); + } + else + { + LogManagerControl.AddLog($"设备状态上报FMS出错", LogAddtype.local, Logtype.Message); + } + } + + #endregion + + // } + } + Task.Delay(1000); + } + + } + #endregion + + #region 报警信息读取 + /// + /// 报警信息读取 + /// + /// + /// + private void AlarmProcess(CancellationTokenSource mt, OperateResult resByte) + { + if (!mt.IsCancellationRequested) + { + sw.Restart(); + byte[] res = new byte[2]; + for (int i = 0; i < 30; i++) + { + res = omronPLCCom.lstMcUI[0].Readbyte("W6100[" + i + "].Word区", 1); + if (res != null) + { + for (int j = i; j < res.Length + i; j++) + { + listAlamByte[i + j] = res[j - i]; + } + } + } + + //AddLog(0, "读取报警耗时:" + sw.ElapsedMilliseconds + "ms"); + if (listAlamByte == null) { return; } + string strFileName = Environment.CurrentDirectory + "\\欧姆龙报警寄存器对应表.csv"; + listAlarmForm = CSVHelper.ReadCSV(strFileName); + //如果未配置报警地址信息返回 TODO + if (listAlarmForm == null) { return; } + int startPlcAddr = 0;//TODO 读取起始地址 + //3.公用方法解析byte[]数据 => List + if (listAlamByte == null) { return; } //如果未配置报警地址信息返回 + //TODO 切换三菱和欧姆龙 + listAlarmStatus = PLCAlarmParse.OmronEIPByte2Status(startPlcAddr, listAlamByte); + //4.判定有不良后,关联AlarmStatus 和AlarmForm + if (listAlarmStatus == null) { return; } //状态信息为空返回 + + //如果有报警,获取报警信息 + if (listAlarmStatus.Any(p => p.Status)) + { + #region 屏蔽 + ////从PLC读取读取开机时间 + //string starHourtTime = omronPLCCom.lstMcUI[0].ReadIntDReg("HMI_开机时间_H").ToString(); + //string starMinuteTime = omronPLCCom.lstMcUI[0].ReadIntDReg("HMI_开机时间_M").ToString(); + //string startSecondTime = omronPLCCom.lstMcUI[0].ReadIntDReg("HMI_开机时间_S").ToString(); + //string strStartTime = starHourtTime + ":" + starMinuteTime + ":" + startSecondTime; + //DateTime startTime = Convert.ToDateTime(strStartTime); + ////从PLC读取读取运行时间 + //string runHourtTime = omronPLCCom.lstMcUI[0].ReadIntDReg("HMI_运行时间_H").ToString(); + //string runMinuteTime = omronPLCCom.lstMcUI[0].ReadIntDReg("HMI_运行时间_H").ToString(); + //string runSecondTime = omronPLCCom.lstMcUI[0].ReadIntDReg("HMI_运行时间_H").ToString(); + //string strRunTime = runHourtTime + ":" + runMinuteTime + ":" + runSecondTime; + //DateTime runTime1 = Convert.ToDateTime(strRunTime); + #endregion + + //关联表单数据和报警记录,获取报警信息 + var result = listAlarmStatus.Where(s => s.Status).Join(listAlarmForm, s => s.PLCAdress, f => f.PLCAdress, (s, f) => new AlarmData() + { + AlarmGuid = Guid.NewGuid().ToString(), + PLCAdress = s.PLCAdress, + AlarmCode = f.AlarmCode, + AlarmContent = f.AlarmContent, + AlarmType = "停机报警", + AlarmDesc = f.AlarmContent, + AlarmState = "1", + StartTime = DateTime.Now, + EndTime = DateTime.Now, + Flag = 0, + }).ToList(); + + if (result != null && result.Count > 0 && Global.systemConfig.isUpMes) + { + try + { + foreach (var item in result) + { + if (item.AlarmCode != "") + { + #region 屏蔽 + //AlarmMesData alarmMesData = new AlarmMesData(); + //alarmMesData.deviceNo = Eqp_code; + //alarmMesData.alarmCode = item.AlarmCode; + //alarmMesData.alarmType = item.AlarmType; + //alarmMesData.alarmName = item.AlarmContent; + //alarmMesData.createTime = item.StartTime; + + //string strJosn = JsonConvert.SerializeObject(uploadAlarm); + //LogManagerControl.AddLog($"PC->FMS[报警状态]:{strJosn}", LogAddtype.MES); + //string strRecJosn = MESApiHelper.HttpPostJsonAPI(UpAlarmUrl, authorization, strJosn); + //var result1 = JsonConvert.DeserializeObject(strRecJosn); + //LogManagerControl.AddLog($"FMS->PC[报警状态]:{strRecJosn}", LogAddtype.MES); + #endregion + + //if (Global.systemConfig.isUpMes) + //{ + string currentTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + + JY.MES.FMS.FMS_Alarm Alarm = new JY.MES.FMS.FMS_Alarm(); + + Alarm.seatId = ""; + Alarm.recordDate = currentTime; + Alarm.guid = item.AlarmGuid; + Alarm.alarmEndTime = item.EndTime.ToString("yyyy-MM-dd HH:mm:ss"); + Alarm.alarmType = item.AlarmType; + Alarm.alarmName = item.AlarmContent; + //string strOCVStart = m.StartTime.Substring(0, 18); + //strOCVStart = strOCVStart.Replace("/", "-"); + //Alarm.alarmStartTime = strOCVStart; + Alarm.alarmStartTime = item.StartTime.ToString("yyyy-MM-dd HH:mm:ss"); + Alarm.faultCode = item.AlarmCode; + + + if (Global.systemConfig.isUpMes) + { + string strJosn = JsonConvert.SerializeObject(Alarm); + // LogManagerControl.AddLog($"PC->FMS[MES_Alarm]:{strJosn}", LogAddtype.MES); + //TxtHelper.WriteTxt($@"{Global.strMesLogspath}\{DateTime.Now.ToString("yyyyMMdd")}\设备报警\{DateTime.Now.ToString("HH")}.txt", strJosn); + + Stopwatch swTime1 = new Stopwatch(); + swTime1.Start(); + var AlarmResult = JY.MES.FMS.MesHelper_EVE.MES_Alarm(Alarm); + swTime1.Stop(); + LogManagerControl.AddLog($"处理报警上报FMS耗时:{swTime1.ElapsedMilliseconds}ms", LogAddtype.local, Logtype.Message); + + if (result != null) + { + string strRes = "code" + "[" + AlarmResult.code + "]" + "success" + "[" + AlarmResult.success + "]" + "message" + "[" + AlarmResult.message + "]" + "category" + "[" + AlarmResult.category + "]"; + LogManagerControl.AddLog($"FMS->PC[MES_Alarm]:{strRes}", LogAddtype.MES); + } + else + { + LogManagerControl.AddLog($"报警上报FMS出错", LogAddtype.local, Logtype.Message); + } + } + + + // } + + + } + } + } + catch (Exception ex) + { + LogManagerControl.AddLog("报警信息异常:" + ex.Message, LogAddtype.local, Logtype.Error); + } + //dbHelper.AddAlarmCacheData("tb_alarm", (List)result); + sw.Stop(); + LogManagerControl.AddLog("设备报警信息耗时:" + sw.ElapsedMilliseconds + "ms", LogAddtype.local); + } + Task.Run(() => + { + SaveAlamDataEven_Run(result); + }); + + //复位PLC信号 + omronPLCCom.lstMcUI[0].ClearReg(omronPLCCom.lstMcUI[0].lstTrgUI[2].TrgParams.TriggerAddr, VarType.Short); + } + } + } + /// + /// 保存和显示设备报警信息 + /// + /// + public void SaveAlamDataEven_Run(List list) + { + if (!startup) + { + return; + } + this.BeginInvoke((EventHandler)delegate + { + try + { + string strAlam = ""; + if (list != null) + { + foreach (AlarmData m in list) + { + var result = dbHelper.AddAlarmData(m);//保存本地数据 + strAlam += m.AlarmContent + ','; + } + //AddLog(2, "设备报警----->" + strAlam); + } + } + catch (Exception ex) + { + LogManagerControl.AddLog("保存异常数据失败:" + ex.Message, LogAddtype.local, Logtype.Error); + //AddLog(2, ex.Message); + //LogHelper.Error(ex.Message, new Exception("异常信息")); + } + }); + } + + #endregion + + /// + /// 读取稼动率和PPM + /// + /// + private void UpdatePPM() + { + try + { + if (startup) + { + float Capacit = Convert.ToSingle(omronPLCCom.lstMcUI[0].ReadFloatDReg("W14").ToString("f2"));//稼动率 + int PPM = omronPLCCom.lstMcUI[0].ReadIntDReg("W16");//PPM + int ToalQty = omronPLCCom.lstMcUI[0].ReadIntDReg("W18");//生产总数 + int OKQty = omronPLCCom.lstMcUI[0].ReadIntDReg("W20");//良品数 + //float AntiDustAirSpeed = Convert.ToSingle(omronPLCCom.lstMcUI[0].ReadFloatDReg("D16").ToString("f2")); + Invoke((Action)delegate + { + RPimpacting.Value = Capacit; + RPPPM.Progress = PPM; + crToalQty.CountValue = ToalQty; + cvOKQty.CountValue = OKQty; + bool flag = ToalQty == 0L; + if (flag) + { + prYield.Value = 0L; + } + else + { + prYield.Value = Convert.ToSingle((Convert.ToDouble(OKQty) / Convert.ToDouble(ToalQty)).ToString("f2")); + } + }); + } + } + catch (Exception ex) + { + LogManagerControl.AddLog("电池ppm与稼动率" + ex.Message, LogAddtype.local, Logtype.Error); + } + } + + #endregion + + #region 异常播报处理 + /// + /// 读取异常播报信息 + /// + /// + /// + private void processA3(CancellationTokenSource mt, OperateResult resByte) + { + if (!mt.IsCancellationRequested) + { + if (resByte.IsSuccess && resByte != null) + { + try + { + sw.Restart(); + string code = Convert.ToString(TransformBase.TransInt16(resByte.Content, 0));//读取工位编码,W7010 + omronPLCCom.lstMcUI[0].WriteDReg(omronPLCCom.lstMcUI[0].lstTrgUI[3].TrgParams.ResultAddr, 1);//结果返回PLC,W7100 + omronPLCCom.lstMcUI[0].ClearReg(omronPLCCom.lstMcUI[0].lstTrgUI[3].TrgParams.TriggerAddr, VarType.Short);//复位PLC信号,W7000 + sw.Stop(); + LogManagerControl.AddLog("读取异常播报数据处理耗时:" + sw.ElapsedMilliseconds + "ms", LogAddtype.local); + //查找对应数据,播放内容 + Task.Run(() => + { + string remark = dbHelper.GetAbnormalVoice(code, true); + if (_speech != null) + { + _speech.SpeakAsync(remark); + } + }); + } + catch (Exception ex) + { + LogManagerControl.AddLog("读取异常播报数据异常:" + ex.Message, LogAddtype.local, Logtype.Error); + } + } + } + } + + #endregion + + #region 通用方法 + + /// + /// 获取鼠标光标的当前位置 + /// + /// + /// + [DllImport("user32.dll")] + public static extern bool GetCursorPos(out Point pt); + + /// + /// 用户登录超时检查 + /// + /// + private void UserTimeOut(int secTime) + { + Task task = Task.Run(() => + { + for (int i = 0; i < secTime; i++) + { + GetCursorPos(out Point sourcePoint); + System.Threading.Thread.Sleep(1000); + GetCursorPos(out Point currentPoint); + if (sourcePoint.X != currentPoint.X | sourcePoint.Y == currentPoint.Y) + { + i = 0; + } + if (CurrentInfo.LoginOut) + { + break; + } + } + LoginOut(); + }); + } + + private void LoginOut() + { + LogManagerControl.AddLog(lblUser.Text + "-退出", LogAddtype.local); + CurrentInfo.autuority = Autuority.Empty; + lblUser.Invoke(new Action(() => lblUser.Text = "No User" + )); + CurrentInfo.LoginOut = true; + } + + private void Login(User user) + { + lblUser.Text = user.UserName; + Global.systemConfig.userName = user.UserName; + lblAuthority.Text = user.Level.ToString(); + CurrentInfo.autuority = user.Level; + CurrentInfo.LoginOut = false; + dtLogin = DateTime.Now; + LogManagerControl.AddLog(user.UserName + "-登录成功!", LogAddtype.local); + txtTcpClicet.Text = Global.systemConfig.isUpMes ? "MES在线" : "MES离线"; + if (startup) + { + SendAuthorityToPLC(); + } + //ShowEnabled(true); + UserTimeOut(30); + } + + /// + /// 检测是否是管理员账号 + /// + /// + private bool CheckAdmin() + { + if (CurrentInfo.autuority == Autuority.管理员) + { + return true; + } + return false; + } + + /// + /// 检测是否是管理员或者是工程师账号 + /// + /// + private bool CheckAdminOrEng() + { + if (CurrentInfo.autuority == Autuority.管理员 | CurrentInfo.autuority == Autuority.工程师) + { + return true; + } + return false; + } + + + /// + /// 判断长度 + /// + /// + /// + public string GetDataLenth(string str) + { + string strLenth = ""; + int lenth2 = str.Length; + int lenth = lenth2.ToString().Length; + if (lenth == 1) + { + strLenth = $" {lenth2}"; + + } + if (lenth == 2) + { + strLenth = $" {lenth2}"; + + } + if (lenth == 3) + { + strLenth = $" {lenth2}"; + + } + if (lenth == 4) + { + strLenth = $" {lenth2}"; + + } + if (lenth == 5) + { + strLenth = $" {lenth2}"; + + } + if (lenth == 6) + { + strLenth = $"{lenth2}"; + + } + return strLenth; + } + + int HeartCount = 0; + /// + /// 更新工具栏按钮状态 + /// + /// + private void ShowButtonEven_Run(string time) + { + HeartCount++; + UpdateDateTime(time); + UpdatePPM(); + + //if (isClient8321OK) + //{ + // if (HeartCount < 1 || HeartCount > 60) //1分钟发送一次 + // { + // HeartCount = 0; + // string Send925 = $"1{bObjID}1925{nSeqNo}9"; + // try + // { + + // LogManagerControl.AddLog($"PC->FMS[925][DataLength:{Send925.Length}]:{Send925}", LogAddtype.MES); + // SendMsg(Send925); + // //string str = ReadSpurtCode(Send925, ref strErr); + + // } + + // catch (Exception ex) + // { + // LogManagerControl.AddLog(ex.Message, LogAddtype.local, Logtype.Error); + // } + // } + //} + } + + /// + /// 日期时间显示 + /// + /// + private void UpdateDateTime(string _time) + { + timelabel.BeginInvoke((Action)delegate + { + timelabel.Text = _time; + }, _time); + } + #endregion + + private void LinkTCPEven_Run(string _time) + { + UpdateCommStatus(); + } + + private void UpdateCommStatus() + { + if (this.InvokeRequired) + { + BeginInvoke(new Action(UpdateCommStatus)); + return; + } + try + { + //if (com != null && com.lstUI[0] != null) + //{ + // if (com.lstUI[0].tcpClient.IsConnected) + // { + // if (com.lstUI[0].tcpClient.tcpclient.Client.Poll(10, SelectMode.SelectRead)) + // { + // LogManagerControl.AddLog(com.lstUI[0].tcpClient.tcpclient.Client.RemoteEndPoint.ToString() + "链接断开了…………", LogAddtype.local, Logtype.Error); + // com.lstUI[0].btnStart_Click(null, null); + // } + // else if (com.lstUI[0].info_Lab.Text == "未连接") + // { + // com.lstUI[0].btnStart_Click(null, null); + // } + // } + // else + // { + // com.lstUI[0].btnStart_Click(null, null); + // } + //} + } + catch (Exception) + { + //try + //{ + // com.lstUI[0].btnStart_Click(null, null); + //} + //catch (System.Exception) + //{ + //} + } + } + + private void HomeForm_FormClosing(object sender, FormClosingEventArgs e) + { + if (MessageBox.Show("是否退出程序?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk) == DialogResult.OK) + { + mCOMState.Cancel(); + isEnabled = false; + mctsA1.Cancel(); + mctsA2.Cancel(); + mctsA3.Cancel(); + IniFileHelper.WriteIniData("SYSTEM_CONFIGURE", "No", No.ToString()); + IniFileHelper.WriteIniData("SYSTEM_CONFIGURE", "ClassShift", ClassShift.ToString()); + if (port != null && port.IsOpen) + { + port.Close(); + port.Dispose(); + } + if (omronPLCCom != null) + { + for (int i = 0; i < OmronCount; i++) + { + omronPLCCom.lstMcUI[i].Shutdown(); + omronPLCCom.lstMcUI[i].Dispose(); + } + } + if (_speech != null) + { + if (_speech.State == SynthesizerState.Speaking) + { + _speech.Pause(); + _speech.Dispose(); + } + } + GC.Collect(); + } + else + { + e.Cancel = true; + } + } + + + private void HomeForm_FormClosed(object sender, FormClosedEventArgs e) + { + Process.GetCurrentProcess().Kill(); + } + + + + private void dgvDataShow_A_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + if (e.RowIndex >= dgvDataShow_A.Rows.Count - 1) + return; + DataGridViewRow dr = (sender as DataGridView).Rows[e.RowIndex]; + + try + { + if (dr.Cells["Column4"].Value.Equals("OK")) + { + // 设置单元格的背景色 + dr.Cells["Column4"].Style.BackColor = Color.LightGreen; + // 设置单元格的前景色 + dr.Cells["Column4"].Style.ForeColor = Color.Black; + } + else + { + dr.Cells["Column4"].Style.BackColor = Color.Red; + dr.Cells["Column4"].Style.ForeColor = Color.White; + } + } + catch (Exception ex) + { + LogManagerControl.AddLog($"上料数据显示:[{ex.Message}]", LogAddtype.local, Logtype.Error); + } + } + + private void dgvDataShow_B_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + if (e.RowIndex >= dgvDataShow_B.Rows.Count - 1) + return; + DataGridViewRow dr = (sender as DataGridView).Rows[e.RowIndex]; + + try + { + if (dr.Cells["Column22"].Value.Equals("OK")) + { + // 设置单元格的背景色 + dr.Cells["Column22"].Style.BackColor = Color.LightGreen; + // 设置单元格的前景色 + dr.Cells["Column22"].Style.ForeColor = Color.Black; + } + else + { + dr.Cells["Column22"].Style.BackColor = Color.Red; + dr.Cells["Column22"].Style.ForeColor = Color.White; + } + } + catch (Exception ex) + { + LogManagerControl.AddLog($"下料数据显示:[{ex.Message}]", LogAddtype.local, Logtype.Error); + } + } + + + private void tsmiAbnormalVoice_Click(object sender, EventArgs e) + { + if (!CheckAdmin()) + { + MessageBox.Show("权限不足", "系统提示"); + return; + } + FrmAbnormalVoice frm = new FrmAbnormalVoice(); + frm.ShowDialog(); + } + private void button1_Click(object sender, EventArgs e) + { + //GradingParam gradingParam = new GradingParam + //{ + // siteCode = "1", + // lineCode = "2", + // userName = "admin", + // equipCode = "3", + // recordDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), + // qty = 1, + // containerCode = "", + // materialCode = "4", + // materiallotCodeList = new List() { "ABC" } + //}; + //string p = JsonConvert.SerializeObject(gradingParam); + + //GradingParam gradingParam = new GradingParam(); + //gradingParam.siteCode = "1"; + //gradingParam.lineCode = "1"; + //gradingParam.equipCode = "1"; + //gradingParam.userName = "123"; + //gradingParam.qty = 1; + //gradingParam.containerCode = ""; + //gradingParam.materialCode = "1"; + //gradingParam.recordDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + //gradingParam.materiallotCodeList = new List() { "123" }; + //string p = JsonConvert.SerializeObject(gradingParam); + List list = new List(); + List listBarIn = StrUtil.GetListString(2, "04QCB6CJ68701JF6K0008815");//进站条码 + List listBarOut = StrUtil.GetListString(2, "04QCB6CJ68701JF6K0008815");//出站条码 + List listBar1Result = CollectionUtil.GetListUShort(14); + List listBar2Result = CollectionUtil.GetListUShort(14); + List listResult = CollectionUtil.GetListUShort(2); + int id = 0; + + for (int i = 0; i < listBarOut.Count; i++) + { + BlankingData m = new BlankingData(); + id = i + 1; + + No = No + 1; + m.TD = No; + m.WorkShift = ClassShift == 0 ? "白班" : "夜班"; + m.ArrivalBarCode = listBarIn[i]; + m.DepartureBarCode = listBarOut[i]; + m.OutTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + + #region CCD结果 + if (id == 1) + { + m.CCD1 = "NG"; + m.CCD2 = listBar1Result[1] == 1 ? "OK" : "NG"; + m.CCD3 = listBar1Result[2] == 1 ? "OK" : "NG"; + m.CCD4 = listBar1Result[3] == 1 ? "OK" : "NG"; + m.CCD5 = listBar1Result[4] == 1 ? "OK" : "NG"; + m.CCD6 = listBar1Result[5] == 1 ? "OK" : "NG"; + m.CCD7 = listBar1Result[6] == 1 ? "OK" : "NG"; + m.CCD8 = listBar1Result[7] == 1 ? "OK" : "NG"; + m.CCD9 = listBar1Result[8] == 1 ? "OK" : "NG"; + m.CCD10 = listBar1Result[9] == 1 ? "OK" : "NG"; + m.CCD11 = listBar1Result[10] == 1 ? "OK" : "NG"; + m.CCD12 = listBar1Result[11] == 1 ? "OK" : "NG"; + m.CCD13 = listBar1Result[12] == 1 ? "OK" : "NG"; + m.CCD14 = listBar1Result[13] == 1 ? "OK" : "NG"; + + } + else + { + m.CCD1 = listBar2Result[0] == 1 ? "OK" : "NG"; + m.CCD2 = listBar2Result[1] == 1 ? "OK" : "NG"; + m.CCD3 = listBar2Result[2] == 1 ? "OK" : "NG"; + m.CCD4 = listBar2Result[3] == 1 ? "OK" : "NG"; + m.CCD5 = listBar2Result[4] == 1 ? "OK" : "NG"; + m.CCD6 = listBar2Result[5] == 1 ? "OK" : "NG"; + m.CCD7 = listBar2Result[6] == 1 ? "OK" : "NG"; + m.CCD8 = listBar2Result[7] == 1 ? "OK" : "NG"; + m.CCD9 = listBar2Result[8] == 1 ? "OK" : "NG"; + m.CCD10 = listBar2Result[9] == 1 ? "OK" : "NG"; + m.CCD11 = listBar2Result[10] == 1 ? "OK" : "NG"; + m.CCD12 = listBar2Result[11] == 1 ? "OK" : "NG"; + m.CCD13 = listBar2Result[12] == 1 ? "OK" : "NG"; + m.CCD14 = listBar2Result[13] == 1 ? "OK" : "NG"; + } + + var cfgList = Global.systemConfig.CollectItemCfgList + .Where(it => it.IsEnable && it.PLCRelAddress != null) + .OrderBy(it => it.PLCRelAddress).ToList(); + + for (int k = 0; k < cfgList.Count; k++) + { + var item = cfgList[k]; + + int index = (int)item.PLCRelAddress - 1; + + if (index < listBar2Result.Count) + { + var code = listBar2Result[index] == 1 ? "OK" : "NG"; + m.PLCValDic.Add((int)item.PLCRelAddress, code); + } + } + #endregion + + string strErr = ""; + //入站条码判断 + if (String.IsNullOrEmpty(m.ArrivalBarCode) || m.ArrivalBarCode.Trim() == "ERROR") + m.ArrivalBarCode = "ERROR" + Guid.NewGuid().ToString("N").Substring(0, 8); + //出站条码判断 + if (String.IsNullOrEmpty(m.DepartureBarCode) || m.DepartureBarCode.Trim() == "ERROR") + m.DepartureBarCode = "ERROR" + Guid.NewGuid().ToString("N").Substring(0, 8); + + var listNgError = new List(); + listResult[i] = GetResult(m, ref strErr,ref listNgError); + m.Result = listResult[i] == 1 ? "OK" : "NG"; + m.Remark = strErr; + + + if (Global.systemConfig.isUpMes) + { + + if (listResult[i] == 1 && chkCkGrading) + { + //分档接口 + //21~24 OK挡位 + MesResponse resGrading = ToMesData.GetMesIn(m.DepartureBarCode, m.ArrivalBarCode);//分档查询 + + try + { + listResult[i] = (short)25;//默认分档NG + m.Remark = "外观检OK分档NG"; + if (resGrading.success) + { + if (resGrading.rows != null && resGrading.rows.Count > 0 && resGrading.rows[0].rank != null) + { + if (resGrading.rows[0].rank.Equals(Global.systemConfig.Grading1)) + { + listResult[i] = (short)(MESGradingSet[0] + 20); + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检OKMES反馈档位:{resGrading.rows[0].rank}"; + } + else if (resGrading.rows[0].rank.Equals(Global.systemConfig.Grading2)) + { + listResult[i] = (short)(MESGradingSet[1] + 20); + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检OKMES反馈档位:{resGrading.rows[0].rank}"; + } + else if (resGrading.rows[0].rank.Equals(Global.systemConfig.Grading3)) + { + listResult[i] = (short)(MESGradingSet[2] + 20); + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检OKMES反馈档位:{resGrading.rows[0].rank}"; + } + else if (resGrading.rows[0].rank.Equals(Global.systemConfig.Grading4)) + { + listResult[i] = (short)(MESGradingSet[3] + 20); + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检OKMES反馈档位:{resGrading.rows[0].rank}"; + } + else + { + m.Result = "NG"; + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检OKMES反馈档位:{resGrading.rows[0].rank}与设置档位不匹配NG"; + } + + } + else + { + m.Result = "NG"; + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检OK分档NG,MES未反馈正确档位"; + } + + } + else + { + if (resGrading.error == 9 || resGrading.error == 99) + { + omronPLCCom.lstMcUI[0].WriteDReg("W249", (short)1);//MES网络异常 + LogManagerControl.AddLog($"出站条码[{m.DepartureBarCode}]访问MES异常", LogAddtype.local, Logtype.Error); + } + m.Result = "NG"; + m.Remark = $"出站条码[{m.DepartureBarCode}]外观检OKMES分档请求失败,分档NG"; + } + } + catch (Exception ex) + { + LogManagerControl.AddLog("解析出站MES分档数据异常:" + ex.Message, LogAddtype.local, Logtype.Error); + } + + } + } + + if (IsStartNGFL && m.Result == "NG") + { + listResult[i] = (short)26; + m.Result = "NG"; + m.Remark = $"出站条码[{m.DepartureBarCode}],出站NG不分类"; + } + + + + list.Add(m); + } + + Task.Run(() => + { + SaveDataEven2_Run(list); + if (Global.systemConfig.isUpMes) + { + UpDataMES_Run(list); + } + }); + } + + /// + /// 一键降级 + /// + /// + /// + private void btn_YJJJ_Click(object sender, EventArgs e) + { + CurrentInfo.autuority = Autuority.操作员; + lblAuthority.Text = "操作员"; + if (startup)//plc链接成功 + omronPLCCom.lstMcUI[0].WriteDReg("D21", (short)1);//提示PLC进入操作员权限 + LogManagerControl.AddLog($"管理员{Global.systemConfig.userName}点击一键降级,为操作员权限,请重新登录获取管理员权限。", LogAddtype.local, Logtype.Warning); + + } + + private void tsmiTestCode_Click(object sender, EventArgs e) + { + FrmTest form = new FrmTest(); + form.ShowDialog(); + } + + private void mES分档设置ToolStripMenuItem_Click(object sender, EventArgs e) + { + if (!CheckAdminOrEng()) + { + MessageBox.Show("权限不足", "系统提示"); + return; + } + if (!startup) + { + MessageBox.Show("请先开启联机再进行操作!", "错误提示"); + return; + } + FormMesGradingSet frm = new FormMesGradingSet(omronPLCCom); + if (frm.ShowDialog() == DialogResult.OK) + { + ReadIni(); + } + //LogManagerControl.AddLog($"用户[{Global.mesConfig.userName}]点击了档位设置", LogAddtype.local, FilePathType.Local, Logtype.Message); + } + } +} diff --git a/JY.Inspection/HomeForm.designer.cs b/JY.Inspection/HomeForm.designer.cs new file mode 100644 index 0000000..3594d6f --- /dev/null +++ b/JY.Inspection/HomeForm.designer.cs @@ -0,0 +1,2453 @@ + +namespace JY.Inspection +{ + partial class HomeForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HomeForm)); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.tsmiLogin = new System.Windows.Forms.ToolStripMenuItem(); + this.mES测试ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiSearch = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiHistory = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiCCDData = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiAlarmSearch = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiSetting = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiUserConfig = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiMESConfig = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiDBConfig = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiPLCConfig = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiSerialPortConfig = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiAbnormalVoice = new System.Windows.Forms.ToolStripMenuItem(); + this.mES分档设置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiTestCode = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiParaConfig = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiChart = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiChangeModel = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiAbout = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.imageList1 = new System.Windows.Forms.ImageList(this.components); + this.lblUser = new MetroFramework.Controls.MetroLabel(); + this.metroLabel3 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel4 = new MetroFramework.Controls.MetroLabel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.lblAuthority = new MetroFramework.Controls.MetroLabel(); + this.metroLabel31 = new MetroFramework.Controls.MetroLabel(); + this.timelabel = new MetroFramework.Controls.MetroLabel(); + this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.txtsiteCode = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel(); + this.txtlineCode = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel4 = new System.Windows.Forms.ToolStripStatusLabel(); + this.txtequipCode = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel6 = new System.Windows.Forms.ToolStripStatusLabel(); + this.txtmaterialCode = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel7 = new System.Windows.Forms.ToolStripStatusLabel(); + this.txtTcpClicet = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel(); + this.txtClassShift = new System.Windows.Forms.ToolStripStatusLabel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.txtlog = new System.Windows.Forms.GroupBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.dgvDataShow_B = new JY.Inspection.GridViewBuff(); + this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column8 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column31 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column26 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column27 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column25 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column11 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column12 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column13 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column14 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column15 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column16 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column17 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column18 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column19 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column20 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column21 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column23 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column28 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column29 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column22 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column24 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.dgvDataShow_A = new JY.Inspection.GridViewBuff(); + this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column30 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.timer_Clock = new System.Windows.Forms.Timer(this.components); + this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.splitContainer4 = new System.Windows.Forms.SplitContainer(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.ckStartZNDB = new System.Windows.Forms.CheckBox(); + this.label26 = new System.Windows.Forms.Label(); + this.label23 = new System.Windows.Forms.Label(); + this.label24 = new System.Windows.Forms.Label(); + this.label25 = new System.Windows.Forms.Label(); + this.label20 = new System.Windows.Forms.Label(); + this.label21 = new System.Windows.Forms.Label(); + this.label22 = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.txtTotalPower = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.txtPowerC = new System.Windows.Forms.TextBox(); + this.txtPowerB = new System.Windows.Forms.TextBox(); + this.txtPowerA = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.txtIC = new System.Windows.Forms.TextBox(); + this.txtIB = new System.Windows.Forms.TextBox(); + this.txtIA = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.txtLineVolUAC = new System.Windows.Forms.TextBox(); + this.txtLineVolUBC = new System.Windows.Forms.TextBox(); + this.txtLineVolUAB = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.txtPhaseVolUC = new System.Windows.Forms.TextBox(); + this.txtPhaseVolUB = new System.Windows.Forms.TextBox(); + this.txtPhaseVolUA = new System.Windows.Forms.TextBox(); + this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.txtTensionStrapCCD4 = new System.Windows.Forms.TextBox(); + this.txtgrading4 = new System.Windows.Forms.TextBox(); + this.metroLabel13 = new MetroFramework.Controls.MetroLabel(); + this.txtTensionStrapCCD3 = new System.Windows.Forms.TextBox(); + this.txtgrading3 = new System.Windows.Forms.TextBox(); + this.metroLabel7 = new MetroFramework.Controls.MetroLabel(); + this.txtTensionStrapCCD2 = new System.Windows.Forms.TextBox(); + this.txtgrading2 = new System.Windows.Forms.TextBox(); + this.metroLabel6 = new MetroFramework.Controls.MetroLabel(); + this.txtgrading1 = new System.Windows.Forms.TextBox(); + this.txtTensionStrapCCD1 = new System.Windows.Forms.TextBox(); + this.metroLabel5 = new MetroFramework.Controls.MetroLabel(); + this.chkStartNGFL = new System.Windows.Forms.CheckBox(); + this.txtTensionStrap3 = new System.Windows.Forms.TextBox(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel36 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel35 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel34 = new MetroFramework.Controls.MetroLabel(); + this.txtTensionStrap2 = new System.Windows.Forms.TextBox(); + this.chkIsGarding = new System.Windows.Forms.CheckBox(); + this.metroLabel38 = new MetroFramework.Controls.MetroLabel(); + this.txtTensionStrap1 = new System.Windows.Forms.TextBox(); + this.metroLabel37 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel33 = new MetroFramework.Controls.MetroLabel(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.pictureBox2 = new System.Windows.Forms.PictureBox(); + this.pictureBox3 = new System.Windows.Forms.PictureBox(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); + this.metroLabel2 = new MetroFramework.Controls.MetroLabel(); + this.btn_YJJJ = new System.Windows.Forms.PictureBox(); + this.cvOKQty = new JYControl.CircleCountValue(); + this.prYield = new WinformControlLibraryExtension.PercentageProgressExt(); + this.RPimpacting = new WinformControlLibraryExtension.PercentageProgressExt(); + this.metroLabel8 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel9 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel10 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel11 = new MetroFramework.Controls.MetroLabel(); + this.RPPPM = new JYControl.CircleProgramBar(); + this.metroLabel12 = new MetroFramework.Controls.MetroLabel(); + this.crToalQty = new JYControl.CircleCountValue(); + this.lblLinkPLCState = new JYControl.LedControl(); + this.lblMsg = new MetroFramework.Controls.MetroLabel(); + this.btnStart = new JYControl.RoundButton(); + this.metroLabel14 = new MetroFramework.Controls.MetroLabel(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.button1 = new System.Windows.Forms.Button(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker(); + this.menuStrip1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.statusStrip1.SuspendLayout(); + this.panel3.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvDataShow_B)).BeginInit(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvDataShow_A)).BeginInit(); + this.tableLayoutPanel3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.Panel2.SuspendLayout(); + this.splitContainer3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit(); + this.splitContainer4.Panel1.SuspendLayout(); + this.splitContainer4.Panel2.SuspendLayout(); + this.splitContainer4.SuspendLayout(); + this.groupBox5.SuspendLayout(); + this.groupBox6.SuspendLayout(); + this.groupBox4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); + this.groupBox3.SuspendLayout(); + this.tableLayoutPanel4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.btn_YJJJ)).BeginInit(); + this.SuspendLayout(); + // + // menuStrip1 + // + this.menuStrip1.Font = new System.Drawing.Font("Microsoft YaHei UI", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsmiLogin, + this.mES测试ToolStripMenuItem, + this.tsmiSearch, + this.tsmiSetting, + this.tsmiParaConfig, + this.tsmiChart, + this.tsmiChangeModel, + this.tsmiAbout, + this.toolStripMenuItem1}); + this.menuStrip1.Location = new System.Drawing.Point(0, 60); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Padding = new System.Windows.Forms.Padding(4, 2, 0, 2); + this.menuStrip1.Size = new System.Drawing.Size(1556, 28); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // tsmiLogin + // + this.tsmiLogin.Image = ((System.Drawing.Image)(resources.GetObject("tsmiLogin.Image"))); + this.tsmiLogin.Name = "tsmiLogin"; + this.tsmiLogin.Size = new System.Drawing.Size(69, 24); + this.tsmiLogin.Text = "登录"; + this.tsmiLogin.Click += new System.EventHandler(this.tsmiLogin_Click); + // + // mES测试ToolStripMenuItem + // + this.mES测试ToolStripMenuItem.Name = "mES测试ToolStripMenuItem"; + this.mES测试ToolStripMenuItem.Size = new System.Drawing.Size(12, 24); + // + // tsmiSearch + // + this.tsmiSearch.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsmiHistory, + this.tsmiCCDData, + this.tsmiAlarmSearch}); + this.tsmiSearch.Image = ((System.Drawing.Image)(resources.GetObject("tsmiSearch.Image"))); + this.tsmiSearch.Name = "tsmiSearch"; + this.tsmiSearch.Size = new System.Drawing.Size(69, 24); + this.tsmiSearch.Text = "查询"; + // + // tsmiHistory + // + this.tsmiHistory.Name = "tsmiHistory"; + this.tsmiHistory.Size = new System.Drawing.Size(191, 24); + this.tsmiHistory.Text = "历史数据查询"; + this.tsmiHistory.Click += new System.EventHandler(this.tsmiHistory_Click); + // + // tsmiCCDData + // + this.tsmiCCDData.Name = "tsmiCCDData"; + this.tsmiCCDData.Size = new System.Drawing.Size(191, 24); + this.tsmiCCDData.Text = "CCD检测数据统计"; + this.tsmiCCDData.Visible = false; + this.tsmiCCDData.Click += new System.EventHandler(this.tsmiCCDData_Click); + // + // tsmiAlarmSearch + // + this.tsmiAlarmSearch.Name = "tsmiAlarmSearch"; + this.tsmiAlarmSearch.Size = new System.Drawing.Size(191, 24); + this.tsmiAlarmSearch.Text = "报警信息查询"; + this.tsmiAlarmSearch.Visible = false; + this.tsmiAlarmSearch.Click += new System.EventHandler(this.tsmiAlarmSearch_Click); + // + // tsmiSetting + // + this.tsmiSetting.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsmiUserConfig, + this.tsmiMESConfig, + this.tsmiDBConfig, + this.tsmiPLCConfig, + this.tsmiSerialPortConfig, + this.tsmiAbnormalVoice, + this.mES分档设置ToolStripMenuItem, + this.tsmiTestCode}); + this.tsmiSetting.Image = ((System.Drawing.Image)(resources.GetObject("tsmiSetting.Image"))); + this.tsmiSetting.Name = "tsmiSetting"; + this.tsmiSetting.Size = new System.Drawing.Size(69, 24); + this.tsmiSetting.Text = "设置"; + // + // tsmiUserConfig + // + this.tsmiUserConfig.AccessibleRole = System.Windows.Forms.AccessibleRole.None; + this.tsmiUserConfig.Image = ((System.Drawing.Image)(resources.GetObject("tsmiUserConfig.Image"))); + this.tsmiUserConfig.Name = "tsmiUserConfig"; + this.tsmiUserConfig.Size = new System.Drawing.Size(168, 26); + this.tsmiUserConfig.Text = "用户设置"; + this.tsmiUserConfig.Click += new System.EventHandler(this.tsmiUserConfig_Click); + // + // tsmiMESConfig + // + this.tsmiMESConfig.Image = ((System.Drawing.Image)(resources.GetObject("tsmiMESConfig.Image"))); + this.tsmiMESConfig.Name = "tsmiMESConfig"; + this.tsmiMESConfig.Size = new System.Drawing.Size(168, 26); + this.tsmiMESConfig.Text = "系统参数设置"; + this.tsmiMESConfig.Click += new System.EventHandler(this.tsmiMESConfig_Click); + // + // tsmiDBConfig + // + this.tsmiDBConfig.Image = ((System.Drawing.Image)(resources.GetObject("tsmiDBConfig.Image"))); + this.tsmiDBConfig.Name = "tsmiDBConfig"; + this.tsmiDBConfig.Size = new System.Drawing.Size(168, 26); + this.tsmiDBConfig.Text = "数据库设置"; + this.tsmiDBConfig.Visible = false; + this.tsmiDBConfig.Click += new System.EventHandler(this.tsmiDBConfig_Click); + // + // tsmiPLCConfig + // + this.tsmiPLCConfig.Image = ((System.Drawing.Image)(resources.GetObject("tsmiPLCConfig.Image"))); + this.tsmiPLCConfig.Name = "tsmiPLCConfig"; + this.tsmiPLCConfig.Size = new System.Drawing.Size(168, 26); + this.tsmiPLCConfig.Text = "PLC通讯设置"; + this.tsmiPLCConfig.Click += new System.EventHandler(this.tsmiPLCConfig_Click); + // + // tsmiSerialPortConfig + // + this.tsmiSerialPortConfig.Image = ((System.Drawing.Image)(resources.GetObject("tsmiSerialPortConfig.Image"))); + this.tsmiSerialPortConfig.Name = "tsmiSerialPortConfig"; + this.tsmiSerialPortConfig.Size = new System.Drawing.Size(168, 26); + this.tsmiSerialPortConfig.Text = "TCP通讯设置"; + this.tsmiSerialPortConfig.Visible = false; + this.tsmiSerialPortConfig.Click += new System.EventHandler(this.tsmiSerialPortConfig_Click); + // + // tsmiAbnormalVoice + // + this.tsmiAbnormalVoice.Image = ((System.Drawing.Image)(resources.GetObject("tsmiAbnormalVoice.Image"))); + this.tsmiAbnormalVoice.Name = "tsmiAbnormalVoice"; + this.tsmiAbnormalVoice.Size = new System.Drawing.Size(168, 26); + this.tsmiAbnormalVoice.Text = "异常播报设置"; + this.tsmiAbnormalVoice.Visible = false; + this.tsmiAbnormalVoice.Click += new System.EventHandler(this.tsmiAbnormalVoice_Click); + // + // mES分档设置ToolStripMenuItem + // + this.mES分档设置ToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("mES分档设置ToolStripMenuItem.Image"))); + this.mES分档设置ToolStripMenuItem.Name = "mES分档设置ToolStripMenuItem"; + this.mES分档设置ToolStripMenuItem.Size = new System.Drawing.Size(168, 26); + this.mES分档设置ToolStripMenuItem.Text = "MES分档设置"; + this.mES分档设置ToolStripMenuItem.Click += new System.EventHandler(this.mES分档设置ToolStripMenuItem_Click); + // + // tsmiTestCode + // + this.tsmiTestCode.AccessibleRole = System.Windows.Forms.AccessibleRole.None; + this.tsmiTestCode.Name = "tsmiTestCode"; + this.tsmiTestCode.Size = new System.Drawing.Size(168, 26); + this.tsmiTestCode.Text = "开发测试"; + this.tsmiTestCode.Click += new System.EventHandler(this.tsmiTestCode_Click); + // + // tsmiParaConfig + // + this.tsmiParaConfig.Image = ((System.Drawing.Image)(resources.GetObject("tsmiParaConfig.Image"))); + this.tsmiParaConfig.Name = "tsmiParaConfig"; + this.tsmiParaConfig.Size = new System.Drawing.Size(69, 24); + this.tsmiParaConfig.Text = "参数"; + this.tsmiParaConfig.Visible = false; + this.tsmiParaConfig.Click += new System.EventHandler(this.tsmiParaConfig_Click); + // + // tsmiChart + // + this.tsmiChart.Image = ((System.Drawing.Image)(resources.GetObject("tsmiChart.Image"))); + this.tsmiChart.Name = "tsmiChart"; + this.tsmiChart.Size = new System.Drawing.Size(69, 24); + this.tsmiChart.Text = "统计"; + this.tsmiChart.Visible = false; + this.tsmiChart.Click += new System.EventHandler(this.tsmiChart_Click); + // + // tsmiChangeModel + // + this.tsmiChangeModel.Image = ((System.Drawing.Image)(resources.GetObject("tsmiChangeModel.Image"))); + this.tsmiChangeModel.Name = "tsmiChangeModel"; + this.tsmiChangeModel.Size = new System.Drawing.Size(69, 24); + this.tsmiChangeModel.Text = "换型"; + this.tsmiChangeModel.Visible = false; + this.tsmiChangeModel.Click += new System.EventHandler(this.tsmiChangeModel_Click); + // + // tsmiAbout + // + this.tsmiAbout.Image = ((System.Drawing.Image)(resources.GetObject("tsmiAbout.Image"))); + this.tsmiAbout.Name = "tsmiAbout"; + this.tsmiAbout.Size = new System.Drawing.Size(69, 24); + this.tsmiAbout.Text = "关于"; + this.tsmiAbout.Click += new System.EventHandler(this.tsmiAbout_Click); + // + // toolStripMenuItem1 + // + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(12, 24); + // + // imageList1 + // + this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); + this.imageList1.TransparentColor = System.Drawing.Color.Transparent; + this.imageList1.Images.SetKeyName(0, "info.png"); + this.imageList1.Images.SetKeyName(1, "warning.png"); + this.imageList1.Images.SetKeyName(2, "error.png"); + // + // lblUser + // + this.lblUser.AutoSize = true; + this.lblUser.Location = new System.Drawing.Point(64, 29); + this.lblUser.Name = "lblUser"; + this.lblUser.Size = new System.Drawing.Size(57, 19); + this.lblUser.TabIndex = 3; + this.lblUser.Text = "No User"; + // + // metroLabel3 + // + this.metroLabel3.AutoSize = true; + this.metroLabel3.Location = new System.Drawing.Point(3, 29); + this.metroLabel3.Name = "metroLabel3"; + this.metroLabel3.Size = new System.Drawing.Size(65, 19); + this.metroLabel3.TabIndex = 4; + this.metroLabel3.Text = "用户名:"; + // + // metroLabel4 + // + this.metroLabel4.AutoSize = true; + this.metroLabel4.Location = new System.Drawing.Point(3, 5); + this.metroLabel4.Name = "metroLabel4"; + this.metroLabel4.Size = new System.Drawing.Size(79, 19); + this.metroLabel4.TabIndex = 5; + this.metroLabel4.Text = "日期时间:"; + // + // panel2 + // + this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.panel2.Controls.Add(this.lblAuthority); + this.panel2.Controls.Add(this.lblUser); + this.panel2.Controls.Add(this.metroLabel31); + this.panel2.Controls.Add(this.metroLabel3); + this.panel2.Controls.Add(this.timelabel); + this.panel2.Controls.Add(this.metroLabel4); + this.panel2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.panel2.Location = new System.Drawing.Point(3659, 6); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(260, 52); + this.panel2.TabIndex = 7; + // + // lblAuthority + // + this.lblAuthority.AutoSize = true; + this.lblAuthority.Location = new System.Drawing.Point(183, 29); + this.lblAuthority.Name = "lblAuthority"; + this.lblAuthority.Size = new System.Drawing.Size(57, 19); + this.lblAuthority.TabIndex = 7; + this.lblAuthority.Text = "No User"; + // + // metroLabel31 + // + this.metroLabel31.AutoSize = true; + this.metroLabel31.Location = new System.Drawing.Point(141, 29); + this.metroLabel31.Name = "metroLabel31"; + this.metroLabel31.Size = new System.Drawing.Size(51, 19); + this.metroLabel31.TabIndex = 8; + this.metroLabel31.Text = "权限:"; + // + // timelabel + // + this.timelabel.AutoSize = true; + this.timelabel.Location = new System.Drawing.Point(100, 5); + this.timelabel.Name = "timelabel"; + this.timelabel.Size = new System.Drawing.Size(121, 19); + this.timelabel.TabIndex = 6; + this.timelabel.Text = "2021-10-18 15:30:50"; + this.timelabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.timelabel.Theme = MetroFramework.MetroThemeStyle.Light; + // + // statusStrip1 + // + this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripStatusLabel1, + this.txtsiteCode, + this.toolStripStatusLabel2, + this.txtlineCode, + this.toolStripStatusLabel4, + this.txtequipCode, + this.toolStripStatusLabel6, + this.txtmaterialCode, + this.toolStripStatusLabel7, + this.txtTcpClicet, + this.toolStripStatusLabel3, + this.txtClassShift}); + this.statusStrip1.Location = new System.Drawing.Point(0, 862); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(1556, 22); + this.statusStrip1.TabIndex = 8; + this.statusStrip1.Text = "statusStrip1"; + // + // toolStripStatusLabel1 + // + this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + this.toolStripStatusLabel1.Size = new System.Drawing.Size(68, 17); + this.toolStripStatusLabel1.Text = "工厂代码:"; + // + // txtsiteCode + // + this.txtsiteCode.Name = "txtsiteCode"; + this.txtsiteCode.Size = new System.Drawing.Size(37, 17); + this.txtsiteCode.Text = "R001"; + // + // toolStripStatusLabel2 + // + this.toolStripStatusLabel2.Name = "toolStripStatusLabel2"; + this.toolStripStatusLabel2.Size = new System.Drawing.Size(68, 17); + this.toolStripStatusLabel2.Text = "产线名称:"; + // + // txtlineCode + // + this.txtlineCode.Name = "txtlineCode"; + this.txtlineCode.Size = new System.Drawing.Size(36, 17); + this.txtlineCode.Text = "1111"; + // + // toolStripStatusLabel4 + // + this.toolStripStatusLabel4.Name = "toolStripStatusLabel4"; + this.toolStripStatusLabel4.Size = new System.Drawing.Size(59, 17); + this.toolStripStatusLabel4.Text = "设备编码:"; + // + // txtequipCode + // + this.txtequipCode.Name = "txtequipCode"; + this.txtequipCode.Size = new System.Drawing.Size(29, 17); + this.txtequipCode.Text = "123"; + // + // toolStripStatusLabel6 + // + this.toolStripStatusLabel6.Name = "toolStripStatusLabel6"; + this.toolStripStatusLabel6.Size = new System.Drawing.Size(59, 17); + this.toolStripStatusLabel6.Text = "物料编码:"; + // + // txtmaterialCode + // + this.txtmaterialCode.Name = "txtmaterialCode"; + this.txtmaterialCode.Size = new System.Drawing.Size(29, 17); + this.txtmaterialCode.Text = "111"; + // + // toolStripStatusLabel7 + // + this.toolStripStatusLabel7.Name = "toolStripStatusLabel7"; + this.toolStripStatusLabel7.Size = new System.Drawing.Size(84, 17); + this.toolStripStatusLabel7.Text = " 当前模式:"; + // + // txtTcpClicet + // + this.txtTcpClicet.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192))))); + this.txtTcpClicet.ForeColor = System.Drawing.Color.White; + this.txtTcpClicet.Name = "txtTcpClicet"; + this.txtTcpClicet.Size = new System.Drawing.Size(56, 17); + this.txtTcpClicet.Text = "单机模式"; + // + // toolStripStatusLabel3 + // + this.toolStripStatusLabel3.Name = "toolStripStatusLabel3"; + this.toolStripStatusLabel3.Size = new System.Drawing.Size(44, 17); + this.toolStripStatusLabel3.Text = "班次:"; + // + // txtClassShift + // + this.txtClassShift.Name = "txtClassShift"; + this.txtClassShift.Size = new System.Drawing.Size(29, 17); + this.txtClassShift.Text = "111"; + // + // panel3 + // + this.panel3.Controls.Add(this.txtlog); + this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panel3.Location = new System.Drawing.Point(0, 659); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(1556, 203); + this.panel3.TabIndex = 9; + // + // txtlog + // + this.txtlog.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtlog.Location = new System.Drawing.Point(0, 0); + this.txtlog.Name = "txtlog"; + this.txtlog.Size = new System.Drawing.Size(1556, 203); + this.txtlog.TabIndex = 0; + this.txtlog.TabStop = false; + this.txtlog.Text = "日志记录"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.dgvDataShow_B); + this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox1.Location = new System.Drawing.Point(0, 0); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(1473, 250); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "电芯出站"; + // + // dgvDataShow_B + // + this.dgvDataShow_B.AllowUserToAddRows = false; + this.dgvDataShow_B.AllowUserToDeleteRows = false; + this.dgvDataShow_B.AllowUserToResizeRows = false; + this.dgvDataShow_B.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells; + this.dgvDataShow_B.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvDataShow_B.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dgvDataShow_B.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dgvDataShow_B.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); + dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvDataShow_B.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dgvDataShow_B.ColumnHeadersHeight = 29; + this.dgvDataShow_B.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dgvDataShow_B.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.Column6, + this.Column8, + this.Column31, + this.Column26, + this.Column7, + this.Column27, + this.Column25, + this.Column9, + this.Column10, + this.Column11, + this.Column12, + this.Column13, + this.Column14, + this.Column15, + this.Column16, + this.Column17, + this.Column18, + this.Column19, + this.Column20, + this.Column21, + this.Column23, + this.Column28, + this.Column29, + this.Column22, + this.Column24}); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Silver; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvDataShow_B.DefaultCellStyle = dataGridViewCellStyle2; + this.dgvDataShow_B.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvDataShow_B.EnableHeadersVisualStyles = false; + this.dgvDataShow_B.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + this.dgvDataShow_B.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvDataShow_B.Location = new System.Drawing.Point(3, 17); + this.dgvDataShow_B.Name = "dgvDataShow_B"; + this.dgvDataShow_B.ReadOnly = true; + this.dgvDataShow_B.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Sunken; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); + dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvDataShow_B.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; + this.dgvDataShow_B.RowHeadersVisible = false; + this.dgvDataShow_B.RowHeadersWidth = 51; + this.dgvDataShow_B.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.dgvDataShow_B.RowTemplate.Height = 23; + this.dgvDataShow_B.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgvDataShow_B.Size = new System.Drawing.Size(1467, 230); + this.dgvDataShow_B.TabIndex = 0; + this.dgvDataShow_B.RowPrePaint += new System.Windows.Forms.DataGridViewRowPrePaintEventHandler(this.dgvDataShow_B_RowPrePaint); + // + // Column6 + // + this.Column6.DataPropertyName = "TD"; + this.Column6.HeaderText = "序号"; + this.Column6.MinimumWidth = 6; + this.Column6.Name = "Column6"; + this.Column6.ReadOnly = true; + this.Column6.Width = 52; + // + // Column8 + // + this.Column8.DataPropertyName = "WorkShift"; + this.Column8.HeaderText = "班次"; + this.Column8.MinimumWidth = 6; + this.Column8.Name = "Column8"; + this.Column8.ReadOnly = true; + this.Column8.Width = 52; + // + // Column31 + // + this.Column31.DataPropertyName = "TDGroup"; + this.Column31.HeaderText = "主道"; + this.Column31.MinimumWidth = 8; + this.Column31.Name = "Column31"; + this.Column31.ReadOnly = true; + this.Column31.Width = 52; + // + // Column26 + // + this.Column26.DataPropertyName = "ArrivalBarCode"; + this.Column26.HeaderText = "入站条码"; + this.Column26.MinimumWidth = 8; + this.Column26.Name = "Column26"; + this.Column26.ReadOnly = true; + this.Column26.Width = 64; + // + // Column7 + // + this.Column7.DataPropertyName = "DepartureBarCode"; + this.Column7.HeaderText = "出站条码"; + this.Column7.MinimumWidth = 6; + this.Column7.Name = "Column7"; + this.Column7.ReadOnly = true; + this.Column7.Width = 64; + // + // Column27 + // + this.Column27.DataPropertyName = "TMDB"; + this.Column27.HeaderText = "条码对比"; + this.Column27.MinimumWidth = 8; + this.Column27.Name = "Column27"; + this.Column27.ReadOnly = true; + this.Column27.Width = 64; + // + // Column25 + // + this.Column25.DataPropertyName = "OutTime"; + this.Column25.HeaderText = "出站时间"; + this.Column25.MinimumWidth = 6; + this.Column25.Name = "Column25"; + this.Column25.ReadOnly = true; + this.Column25.Width = 64; + // + // Column9 + // + this.Column9.DataPropertyName = "CCD1"; + this.Column9.HeaderText = "正面(2D/3D)"; + this.Column9.MinimumWidth = 6; + this.Column9.Name = "Column9"; + this.Column9.ReadOnly = true; + this.Column9.Width = 86; + // + // Column10 + // + this.Column10.DataPropertyName = "CCD2"; + this.Column10.HeaderText = "反面(2D/3D)"; + this.Column10.MinimumWidth = 6; + this.Column10.Name = "Column10"; + this.Column10.ReadOnly = true; + this.Column10.Width = 86; + // + // Column11 + // + this.Column11.DataPropertyName = "CCD3"; + this.Column11.HeaderText = "左侧面(2D/3D)"; + this.Column11.MinimumWidth = 6; + this.Column11.Name = "Column11"; + this.Column11.ReadOnly = true; + this.Column11.Width = 98; + // + // Column12 + // + this.Column12.DataPropertyName = "CCD4"; + this.Column12.HeaderText = "右侧面(2D/3D)"; + this.Column12.MinimumWidth = 6; + this.Column12.Name = "Column12"; + this.Column12.ReadOnly = true; + this.Column12.Width = 98; + // + // Column13 + // + this.Column13.DataPropertyName = "CCD5"; + this.Column13.HeaderText = "顶面(2D/3D)"; + this.Column13.MinimumWidth = 6; + this.Column13.Name = "Column13"; + this.Column13.ReadOnly = true; + this.Column13.Width = 86; + // + // Column14 + // + this.Column14.DataPropertyName = "CCD6"; + this.Column14.HeaderText = "底面(2D/3D)"; + this.Column14.MinimumWidth = 6; + this.Column14.Name = "Column14"; + this.Column14.ReadOnly = true; + this.Column14.Width = 86; + // + // Column15 + // + this.Column15.DataPropertyName = "CCD7"; + this.Column15.HeaderText = "底棱边WE1"; + this.Column15.MinimumWidth = 6; + this.Column15.Name = "Column15"; + this.Column15.ReadOnly = true; + this.Column15.Width = 85; + // + // Column16 + // + this.Column16.DataPropertyName = "CCD8"; + this.Column16.HeaderText = "底棱边WE2"; + this.Column16.MinimumWidth = 6; + this.Column16.Name = "Column16"; + this.Column16.ReadOnly = true; + this.Column16.Width = 85; + // + // Column17 + // + this.Column17.DataPropertyName = "CCD9"; + this.Column17.HeaderText = "底棱边WE3"; + this.Column17.MinimumWidth = 6; + this.Column17.Name = "Column17"; + this.Column17.ReadOnly = true; + this.Column17.Width = 85; + // + // Column18 + // + this.Column18.DataPropertyName = "CCD10"; + this.Column18.HeaderText = "底棱边WE4"; + this.Column18.MinimumWidth = 6; + this.Column18.Name = "Column18"; + this.Column18.ReadOnly = true; + this.Column18.Width = 85; + // + // Column19 + // + this.Column19.DataPropertyName = "CCD11"; + this.Column19.HeaderText = "中棱边ME1"; + this.Column19.MinimumWidth = 6; + this.Column19.Name = "Column19"; + this.Column19.ReadOnly = true; + this.Column19.Width = 84; + // + // Column20 + // + this.Column20.DataPropertyName = "CCD12"; + this.Column20.HeaderText = "中棱边ME2"; + this.Column20.MinimumWidth = 6; + this.Column20.Name = "Column20"; + this.Column20.ReadOnly = true; + this.Column20.Width = 84; + // + // Column21 + // + this.Column21.DataPropertyName = "CCD13"; + this.Column21.HeaderText = "中棱边ME3"; + this.Column21.MinimumWidth = 6; + this.Column21.Name = "Column21"; + this.Column21.ReadOnly = true; + this.Column21.Width = 84; + // + // Column23 + // + this.Column23.DataPropertyName = "CCD14"; + this.Column23.HeaderText = "中棱边ME4"; + this.Column23.MinimumWidth = 6; + this.Column23.Name = "Column23"; + this.Column23.ReadOnly = true; + this.Column23.Width = 84; + // + // Column28 + // + this.Column28.DataPropertyName = "CCD15"; + this.Column28.HeaderText = "极柱(POS/NEG)"; + this.Column28.MinimumWidth = 8; + this.Column28.Name = "Column28"; + this.Column28.ReadOnly = true; + // + // Column29 + // + this.Column29.DataPropertyName = "CCD16"; + this.Column29.HeaderText = "防爆阀(PRO)"; + this.Column29.MinimumWidth = 8; + this.Column29.Name = "Column29"; + this.Column29.ReadOnly = true; + this.Column29.Width = 89; + // + // Column22 + // + this.Column22.DataPropertyName = "Result"; + this.Column22.HeaderText = "综合结果"; + this.Column22.MinimumWidth = 6; + this.Column22.Name = "Column22"; + this.Column22.ReadOnly = true; + this.Column22.Width = 64; + // + // Column24 + // + this.Column24.DataPropertyName = "Remark"; + this.Column24.HeaderText = "备注"; + this.Column24.MinimumWidth = 6; + this.Column24.Name = "Column24"; + this.Column24.ReadOnly = true; + this.Column24.Width = 52; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.dgvDataShow_A); + this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox2.Location = new System.Drawing.Point(3, 3); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(430, 305); + this.groupBox2.TabIndex = 1; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "电芯进站"; + // + // dgvDataShow_A + // + this.dgvDataShow_A.AllowUserToAddRows = false; + this.dgvDataShow_A.AllowUserToDeleteRows = false; + this.dgvDataShow_A.AllowUserToResizeRows = false; + this.dgvDataShow_A.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells; + this.dgvDataShow_A.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvDataShow_A.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dgvDataShow_A.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dgvDataShow_A.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); + dataGridViewCellStyle4.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvDataShow_A.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dgvDataShow_A.ColumnHeadersHeight = 29; + this.dgvDataShow_A.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dgvDataShow_A.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.Column1, + this.Column30, + this.Column2, + this.Column3, + this.Column4, + this.Column5}); + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle5.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.Silver; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvDataShow_A.DefaultCellStyle = dataGridViewCellStyle5; + this.dgvDataShow_A.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvDataShow_A.EnableHeadersVisualStyles = false; + this.dgvDataShow_A.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + this.dgvDataShow_A.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.dgvDataShow_A.Location = new System.Drawing.Point(3, 17); + this.dgvDataShow_A.Name = "dgvDataShow_A"; + this.dgvDataShow_A.ReadOnly = true; + this.dgvDataShow_A.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Sunken; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); + dataGridViewCellStyle6.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvDataShow_A.RowHeadersDefaultCellStyle = dataGridViewCellStyle6; + this.dgvDataShow_A.RowHeadersVisible = false; + this.dgvDataShow_A.RowHeadersWidth = 51; + this.dgvDataShow_A.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this.dgvDataShow_A.RowTemplate.Height = 23; + this.dgvDataShow_A.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgvDataShow_A.Size = new System.Drawing.Size(424, 285); + this.dgvDataShow_A.TabIndex = 1; + this.dgvDataShow_A.RowPrePaint += new System.Windows.Forms.DataGridViewRowPrePaintEventHandler(this.dgvDataShow_A_RowPrePaint); + // + // Column1 + // + this.Column1.DataPropertyName = "TD"; + this.Column1.HeaderText = "通道"; + this.Column1.MinimumWidth = 6; + this.Column1.Name = "Column1"; + this.Column1.ReadOnly = true; + this.Column1.Width = 52; + // + // Column30 + // + this.Column30.DataPropertyName = "TDGroup"; + this.Column30.HeaderText = "主道"; + this.Column30.MinimumWidth = 8; + this.Column30.Name = "Column30"; + this.Column30.ReadOnly = true; + this.Column30.Width = 52; + // + // Column2 + // + this.Column2.DataPropertyName = "BarCode"; + this.Column2.HeaderText = "入站条码"; + this.Column2.MinimumWidth = 6; + this.Column2.Name = "Column2"; + this.Column2.ReadOnly = true; + this.Column2.Width = 64; + // + // Column3 + // + this.Column3.DataPropertyName = "CreateTime"; + this.Column3.HeaderText = "时间"; + this.Column3.MinimumWidth = 6; + this.Column3.Name = "Column3"; + this.Column3.ReadOnly = true; + this.Column3.Width = 52; + // + // Column4 + // + this.Column4.DataPropertyName = "Result"; + this.Column4.HeaderText = "结果"; + this.Column4.MinimumWidth = 6; + this.Column4.Name = "Column4"; + this.Column4.ReadOnly = true; + this.Column4.Width = 52; + // + // Column5 + // + this.Column5.DataPropertyName = "Remark"; + this.Column5.HeaderText = "备注"; + this.Column5.MinimumWidth = 6; + this.Column5.Name = "Column5"; + this.Column5.ReadOnly = true; + this.Column5.Width = 52; + // + // timer_Clock + // + this.timer_Clock.Interval = 1000; + this.timer_Clock.Tick += new System.EventHandler(this.timer_Clock_Tick); + // + // tableLayoutPanel3 + // + this.tableLayoutPanel3.ColumnCount = 2; + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 77F)); + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel3.Controls.Add(this.splitContainer1, 1, 0); + this.tableLayoutPanel3.Controls.Add(this.groupBox3, 0, 0); + this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 88); + this.tableLayoutPanel3.Name = "tableLayoutPanel3"; + this.tableLayoutPanel3.RowCount = 1; + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel3.Size = new System.Drawing.Size(1556, 571); + this.tableLayoutPanel3.TabIndex = 50; + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(80, 3); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel2); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.groupBox1); + this.splitContainer1.Size = new System.Drawing.Size(1473, 565); + this.splitContainer1.SplitterDistance = 311; + this.splitContainer1.TabIndex = 12; + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.ColumnCount = 2; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 436F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel2.Controls.Add(this.groupBox2, 0, 0); + this.tableLayoutPanel2.Controls.Add(this.splitContainer3, 1, 0); + this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 1; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(1473, 311); + this.tableLayoutPanel2.TabIndex = 0; + // + // splitContainer3 + // + this.splitContainer3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.splitContainer3.Location = new System.Drawing.Point(439, 3); + this.splitContainer3.Name = "splitContainer3"; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.splitContainer4); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.groupBox4); + this.splitContainer3.Size = new System.Drawing.Size(1031, 305); + this.splitContainer3.SplitterDistance = 376; + this.splitContainer3.SplitterWidth = 1; + this.splitContainer3.TabIndex = 2; + // + // splitContainer4 + // + this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer4.Location = new System.Drawing.Point(0, 0); + this.splitContainer4.Name = "splitContainer4"; + this.splitContainer4.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer4.Panel1 + // + this.splitContainer4.Panel1.Controls.Add(this.groupBox5); + // + // splitContainer4.Panel2 + // + this.splitContainer4.Panel2.Controls.Add(this.groupBox6); + this.splitContainer4.Size = new System.Drawing.Size(376, 305); + this.splitContainer4.SplitterDistance = 168; + this.splitContainer4.TabIndex = 0; + // + // groupBox5 + // + this.groupBox5.AutoSize = true; + this.groupBox5.Controls.Add(this.ckStartZNDB); + this.groupBox5.Controls.Add(this.label26); + this.groupBox5.Controls.Add(this.label23); + this.groupBox5.Controls.Add(this.label24); + this.groupBox5.Controls.Add(this.label25); + this.groupBox5.Controls.Add(this.label20); + this.groupBox5.Controls.Add(this.label21); + this.groupBox5.Controls.Add(this.label22); + this.groupBox5.Controls.Add(this.label17); + this.groupBox5.Controls.Add(this.label18); + this.groupBox5.Controls.Add(this.label19); + this.groupBox5.Controls.Add(this.label16); + this.groupBox5.Controls.Add(this.label14); + this.groupBox5.Controls.Add(this.label13); + this.groupBox5.Controls.Add(this.label15); + this.groupBox5.Controls.Add(this.txtTotalPower); + this.groupBox5.Controls.Add(this.label10); + this.groupBox5.Controls.Add(this.label11); + this.groupBox5.Controls.Add(this.label12); + this.groupBox5.Controls.Add(this.txtPowerC); + this.groupBox5.Controls.Add(this.txtPowerB); + this.groupBox5.Controls.Add(this.txtPowerA); + this.groupBox5.Controls.Add(this.label7); + this.groupBox5.Controls.Add(this.label8); + this.groupBox5.Controls.Add(this.label9); + this.groupBox5.Controls.Add(this.txtIC); + this.groupBox5.Controls.Add(this.txtIB); + this.groupBox5.Controls.Add(this.txtIA); + this.groupBox5.Controls.Add(this.label4); + this.groupBox5.Controls.Add(this.label5); + this.groupBox5.Controls.Add(this.label6); + this.groupBox5.Controls.Add(this.txtLineVolUAC); + this.groupBox5.Controls.Add(this.txtLineVolUBC); + this.groupBox5.Controls.Add(this.txtLineVolUAB); + this.groupBox5.Controls.Add(this.label3); + this.groupBox5.Controls.Add(this.label2); + this.groupBox5.Controls.Add(this.label1); + this.groupBox5.Controls.Add(this.txtPhaseVolUC); + this.groupBox5.Controls.Add(this.txtPhaseVolUB); + this.groupBox5.Controls.Add(this.txtPhaseVolUA); + this.groupBox5.Location = new System.Drawing.Point(0, 1); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(515, 261); + this.groupBox5.TabIndex = 0; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "电表数据"; + // + // ckStartZNDB + // + this.ckStartZNDB.AutoSize = true; + this.ckStartZNDB.Enabled = false; + this.ckStartZNDB.Location = new System.Drawing.Point(295, 1); + this.ckStartZNDB.Name = "ckStartZNDB"; + this.ckStartZNDB.Size = new System.Drawing.Size(144, 16); + this.ckStartZNDB.TabIndex = 41; + this.ckStartZNDB.Text = "是否开启智能电表读取"; + this.ckStartZNDB.UseVisualStyleBackColor = true; + // + // label26 + // + this.label26.AutoSize = true; + this.label26.Location = new System.Drawing.Point(199, 211); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(11, 12); + this.label26.TabIndex = 40; + this.label26.Text = "w"; + // + // label23 + // + this.label23.AutoSize = true; + this.label23.Location = new System.Drawing.Point(424, 187); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(11, 12); + this.label23.TabIndex = 39; + this.label23.Text = "w"; + // + // label24 + // + this.label24.AutoSize = true; + this.label24.Location = new System.Drawing.Point(424, 156); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(11, 12); + this.label24.TabIndex = 38; + this.label24.Text = "w"; + // + // label25 + // + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(424, 124); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(11, 12); + this.label25.TabIndex = 37; + this.label25.Text = "w"; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(199, 185); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(11, 12); + this.label20.TabIndex = 36; + this.label20.Text = "A"; + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Location = new System.Drawing.Point(199, 154); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(11, 12); + this.label21.TabIndex = 35; + this.label21.Text = "A"; + // + // label22 + // + this.label22.AutoSize = true; + this.label22.Location = new System.Drawing.Point(199, 120); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(11, 12); + this.label22.TabIndex = 34; + this.label22.Text = "A"; + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(424, 96); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(11, 12); + this.label17.TabIndex = 33; + this.label17.Text = "V"; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Location = new System.Drawing.Point(424, 62); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(11, 12); + this.label18.TabIndex = 32; + this.label18.Text = "V"; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Location = new System.Drawing.Point(424, 31); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(11, 12); + this.label19.TabIndex = 31; + this.label19.Text = "V"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Location = new System.Drawing.Point(198, 97); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(11, 12); + this.label16.TabIndex = 30; + this.label16.Text = "V"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(198, 62); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(11, 12); + this.label14.TabIndex = 29; + this.label14.Text = "V"; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(198, 31); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(11, 12); + this.label13.TabIndex = 28; + this.label13.Text = "V"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(16, 210); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(65, 12); + this.label15.TabIndex = 27; + this.label15.Text = "总有功功率"; + // + // txtTotalPower + // + this.txtTotalPower.Enabled = false; + this.txtTotalPower.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtTotalPower.Location = new System.Drawing.Point(89, 203); + this.txtTotalPower.Name = "txtTotalPower"; + this.txtTotalPower.ReadOnly = true; + this.txtTotalPower.Size = new System.Drawing.Size(108, 23); + this.txtTotalPower.TabIndex = 24; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(236, 180); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(71, 12); + this.label10.TabIndex = 23; + this.label10.Text = "C相有功功率"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(236, 150); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(71, 12); + this.label11.TabIndex = 22; + this.label11.Text = "B相有功功率"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(236, 119); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(71, 12); + this.label12.TabIndex = 21; + this.label12.Text = "A相有功功率"; + // + // txtPowerC + // + this.txtPowerC.Enabled = false; + this.txtPowerC.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtPowerC.Location = new System.Drawing.Point(314, 175); + this.txtPowerC.Name = "txtPowerC"; + this.txtPowerC.ReadOnly = true; + this.txtPowerC.Size = new System.Drawing.Size(108, 23); + this.txtPowerC.TabIndex = 20; + // + // txtPowerB + // + this.txtPowerB.Enabled = false; + this.txtPowerB.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtPowerB.Location = new System.Drawing.Point(314, 144); + this.txtPowerB.Name = "txtPowerB"; + this.txtPowerB.ReadOnly = true; + this.txtPowerB.Size = new System.Drawing.Size(108, 23); + this.txtPowerB.TabIndex = 19; + // + // txtPowerA + // + this.txtPowerA.Enabled = false; + this.txtPowerA.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtPowerA.Location = new System.Drawing.Point(314, 113); + this.txtPowerA.Name = "txtPowerA"; + this.txtPowerA.ReadOnly = true; + this.txtPowerA.Size = new System.Drawing.Size(108, 23); + this.txtPowerA.TabIndex = 18; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(16, 179); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(41, 12); + this.label7.TabIndex = 17; + this.label7.Text = "电流IC"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(16, 148); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(41, 12); + this.label8.TabIndex = 16; + this.label8.Text = "电流IB"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(16, 120); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(41, 12); + this.label9.TabIndex = 15; + this.label9.Text = "电流IA"; + // + // txtIC + // + this.txtIC.Enabled = false; + this.txtIC.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtIC.Location = new System.Drawing.Point(89, 174); + this.txtIC.Name = "txtIC"; + this.txtIC.ReadOnly = true; + this.txtIC.Size = new System.Drawing.Size(108, 23); + this.txtIC.TabIndex = 14; + // + // txtIB + // + this.txtIB.Enabled = false; + this.txtIB.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtIB.Location = new System.Drawing.Point(89, 143); + this.txtIB.Name = "txtIB"; + this.txtIB.ReadOnly = true; + this.txtIB.Size = new System.Drawing.Size(108, 23); + this.txtIB.TabIndex = 13; + // + // txtIA + // + this.txtIA.Enabled = false; + this.txtIA.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtIA.Location = new System.Drawing.Point(89, 114); + this.txtIA.Name = "txtIA"; + this.txtIA.ReadOnly = true; + this.txtIA.Size = new System.Drawing.Size(108, 23); + this.txtIA.TabIndex = 12; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(236, 90); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(59, 12); + this.label4.TabIndex = 11; + this.label4.Text = "线电压UAC"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(236, 59); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(59, 12); + this.label5.TabIndex = 10; + this.label5.Text = "线电压UBC"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(236, 28); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(59, 12); + this.label6.TabIndex = 9; + this.label6.Text = "线电压UAB"; + // + // txtLineVolUAC + // + this.txtLineVolUAC.Enabled = false; + this.txtLineVolUAC.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtLineVolUAC.Location = new System.Drawing.Point(314, 84); + this.txtLineVolUAC.Name = "txtLineVolUAC"; + this.txtLineVolUAC.ReadOnly = true; + this.txtLineVolUAC.Size = new System.Drawing.Size(108, 23); + this.txtLineVolUAC.TabIndex = 8; + // + // txtLineVolUBC + // + this.txtLineVolUBC.Enabled = false; + this.txtLineVolUBC.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtLineVolUBC.Location = new System.Drawing.Point(314, 54); + this.txtLineVolUBC.Name = "txtLineVolUBC"; + this.txtLineVolUBC.ReadOnly = true; + this.txtLineVolUBC.Size = new System.Drawing.Size(108, 23); + this.txtLineVolUBC.TabIndex = 7; + // + // txtLineVolUAB + // + this.txtLineVolUAB.Enabled = false; + this.txtLineVolUAB.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtLineVolUAB.Location = new System.Drawing.Point(314, 23); + this.txtLineVolUAB.Name = "txtLineVolUAB"; + this.txtLineVolUAB.ReadOnly = true; + this.txtLineVolUAB.Size = new System.Drawing.Size(108, 23); + this.txtLineVolUAB.TabIndex = 6; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(16, 90); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(53, 12); + this.label3.TabIndex = 5; + this.label3.Text = "相电压UC"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(16, 59); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(53, 12); + this.label2.TabIndex = 4; + this.label2.Text = "相电压UB"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(16, 28); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(53, 12); + this.label1.TabIndex = 3; + this.label1.Text = "相电压UA"; + // + // txtPhaseVolUC + // + this.txtPhaseVolUC.Enabled = false; + this.txtPhaseVolUC.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtPhaseVolUC.Location = new System.Drawing.Point(89, 85); + this.txtPhaseVolUC.Name = "txtPhaseVolUC"; + this.txtPhaseVolUC.ReadOnly = true; + this.txtPhaseVolUC.Size = new System.Drawing.Size(108, 23); + this.txtPhaseVolUC.TabIndex = 2; + // + // txtPhaseVolUB + // + this.txtPhaseVolUB.Enabled = false; + this.txtPhaseVolUB.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtPhaseVolUB.Location = new System.Drawing.Point(89, 54); + this.txtPhaseVolUB.Name = "txtPhaseVolUB"; + this.txtPhaseVolUB.ReadOnly = true; + this.txtPhaseVolUB.Size = new System.Drawing.Size(108, 23); + this.txtPhaseVolUB.TabIndex = 1; + // + // txtPhaseVolUA + // + this.txtPhaseVolUA.Enabled = false; + this.txtPhaseVolUA.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtPhaseVolUA.Location = new System.Drawing.Point(89, 23); + this.txtPhaseVolUA.Name = "txtPhaseVolUA"; + this.txtPhaseVolUA.ReadOnly = true; + this.txtPhaseVolUA.Size = new System.Drawing.Size(108, 23); + this.txtPhaseVolUA.TabIndex = 0; + // + // groupBox6 + // + this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox6.AutoSize = true; + this.groupBox6.Controls.Add(this.txtTensionStrapCCD4); + this.groupBox6.Controls.Add(this.txtgrading4); + this.groupBox6.Controls.Add(this.metroLabel13); + this.groupBox6.Controls.Add(this.txtTensionStrapCCD3); + this.groupBox6.Controls.Add(this.txtgrading3); + this.groupBox6.Controls.Add(this.metroLabel7); + this.groupBox6.Controls.Add(this.txtTensionStrapCCD2); + this.groupBox6.Controls.Add(this.txtgrading2); + this.groupBox6.Controls.Add(this.metroLabel6); + this.groupBox6.Controls.Add(this.txtgrading1); + this.groupBox6.Controls.Add(this.txtTensionStrapCCD1); + this.groupBox6.Controls.Add(this.metroLabel5); + this.groupBox6.Controls.Add(this.chkStartNGFL); + this.groupBox6.Controls.Add(this.txtTensionStrap3); + this.groupBox6.Controls.Add(this.metroLabel1); + this.groupBox6.Controls.Add(this.metroLabel36); + this.groupBox6.Controls.Add(this.metroLabel35); + this.groupBox6.Controls.Add(this.metroLabel34); + this.groupBox6.Controls.Add(this.txtTensionStrap2); + this.groupBox6.Controls.Add(this.chkIsGarding); + this.groupBox6.Controls.Add(this.metroLabel38); + this.groupBox6.Controls.Add(this.txtTensionStrap1); + this.groupBox6.Controls.Add(this.metroLabel37); + this.groupBox6.Controls.Add(this.metroLabel33); + this.groupBox6.Location = new System.Drawing.Point(0, 6); + this.groupBox6.Name = "groupBox6"; + this.groupBox6.Size = new System.Drawing.Size(564, 194); + this.groupBox6.TabIndex = 0; + this.groupBox6.TabStop = false; + this.groupBox6.Text = "档位拉带参数"; + // + // txtTensionStrapCCD4 + // + this.txtTensionStrapCCD4.Enabled = false; + this.txtTensionStrapCCD4.Location = new System.Drawing.Point(173, 129); + this.txtTensionStrapCCD4.Name = "txtTensionStrapCCD4"; + this.txtTensionStrapCCD4.Size = new System.Drawing.Size(58, 21); + this.txtTensionStrapCCD4.TabIndex = 157; + // + // txtgrading4 + // + this.txtgrading4.Enabled = false; + this.txtgrading4.Location = new System.Drawing.Point(109, 129); + this.txtgrading4.Name = "txtgrading4"; + this.txtgrading4.Size = new System.Drawing.Size(58, 21); + this.txtgrading4.TabIndex = 141; + // + // metroLabel13 + // + this.metroLabel13.AutoSize = true; + this.metroLabel13.Location = new System.Drawing.Point(163, 131); + this.metroLabel13.Name = "metroLabel13"; + this.metroLabel13.Size = new System.Drawing.Size(15, 19); + this.metroLabel13.TabIndex = 158; + this.metroLabel13.Text = "-"; + // + // txtTensionStrapCCD3 + // + this.txtTensionStrapCCD3.Enabled = false; + this.txtTensionStrapCCD3.Location = new System.Drawing.Point(173, 94); + this.txtTensionStrapCCD3.Name = "txtTensionStrapCCD3"; + this.txtTensionStrapCCD3.Size = new System.Drawing.Size(58, 21); + this.txtTensionStrapCCD3.TabIndex = 156; + // + // txtgrading3 + // + this.txtgrading3.Enabled = false; + this.txtgrading3.Location = new System.Drawing.Point(109, 94); + this.txtgrading3.Name = "txtgrading3"; + this.txtgrading3.Size = new System.Drawing.Size(58, 21); + this.txtgrading3.TabIndex = 142; + // + // metroLabel7 + // + this.metroLabel7.AutoSize = true; + this.metroLabel7.Location = new System.Drawing.Point(163, 91); + this.metroLabel7.Name = "metroLabel7"; + this.metroLabel7.Size = new System.Drawing.Size(15, 19); + this.metroLabel7.TabIndex = 155; + this.metroLabel7.Text = "-"; + // + // txtTensionStrapCCD2 + // + this.txtTensionStrapCCD2.Enabled = false; + this.txtTensionStrapCCD2.Location = new System.Drawing.Point(173, 62); + this.txtTensionStrapCCD2.Name = "txtTensionStrapCCD2"; + this.txtTensionStrapCCD2.Size = new System.Drawing.Size(58, 21); + this.txtTensionStrapCCD2.TabIndex = 154; + // + // txtgrading2 + // + this.txtgrading2.Enabled = false; + this.txtgrading2.Location = new System.Drawing.Point(109, 62); + this.txtgrading2.Name = "txtgrading2"; + this.txtgrading2.Size = new System.Drawing.Size(58, 21); + this.txtgrading2.TabIndex = 143; + // + // metroLabel6 + // + this.metroLabel6.AutoSize = true; + this.metroLabel6.Location = new System.Drawing.Point(163, 62); + this.metroLabel6.Name = "metroLabel6"; + this.metroLabel6.Size = new System.Drawing.Size(15, 19); + this.metroLabel6.TabIndex = 153; + this.metroLabel6.Text = "-"; + // + // txtgrading1 + // + this.txtgrading1.Enabled = false; + this.txtgrading1.Location = new System.Drawing.Point(109, 28); + this.txtgrading1.Name = "txtgrading1"; + this.txtgrading1.Size = new System.Drawing.Size(58, 21); + this.txtgrading1.TabIndex = 146; + // + // txtTensionStrapCCD1 + // + this.txtTensionStrapCCD1.Enabled = false; + this.txtTensionStrapCCD1.Location = new System.Drawing.Point(173, 28); + this.txtTensionStrapCCD1.Name = "txtTensionStrapCCD1"; + this.txtTensionStrapCCD1.Size = new System.Drawing.Size(58, 21); + this.txtTensionStrapCCD1.TabIndex = 152; + // + // metroLabel5 + // + this.metroLabel5.AutoSize = true; + this.metroLabel5.Location = new System.Drawing.Point(163, 28); + this.metroLabel5.Name = "metroLabel5"; + this.metroLabel5.Size = new System.Drawing.Size(15, 19); + this.metroLabel5.TabIndex = 151; + this.metroLabel5.Text = "-"; + // + // chkStartNGFL + // + this.chkStartNGFL.AutoSize = true; + this.chkStartNGFL.Enabled = false; + this.chkStartNGFL.Location = new System.Drawing.Point(377, 134); + this.chkStartNGFL.Name = "chkStartNGFL"; + this.chkStartNGFL.Size = new System.Drawing.Size(120, 16); + this.chkStartNGFL.TabIndex = 150; + this.chkStartNGFL.Text = "NG电池不分类排出"; + this.chkStartNGFL.UseVisualStyleBackColor = true; + // + // txtTensionStrap3 + // + this.txtTensionStrap3.Enabled = false; + this.txtTensionStrap3.Location = new System.Drawing.Point(367, 96); + this.txtTensionStrap3.Name = "txtTensionStrap3"; + this.txtTensionStrap3.Size = new System.Drawing.Size(92, 21); + this.txtTensionStrap3.TabIndex = 149; + // + // metroLabel1 + // + this.metroLabel1.AutoSize = true; + this.metroLabel1.Location = new System.Drawing.Point(290, 96); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Size = new System.Drawing.Size(85, 19); + this.metroLabel1.TabIndex = 148; + this.metroLabel1.Text = "NG拉带(7):"; + // + // metroLabel36 + // + this.metroLabel36.AutoSize = true; + this.metroLabel36.Location = new System.Drawing.Point(34, 129); + this.metroLabel36.Name = "metroLabel36"; + this.metroLabel36.Size = new System.Drawing.Size(84, 19); + this.metroLabel36.TabIndex = 134; + this.metroLabel36.Text = "OK拉带(4):"; + // + // metroLabel35 + // + this.metroLabel35.AutoSize = true; + this.metroLabel35.Location = new System.Drawing.Point(34, 97); + this.metroLabel35.Name = "metroLabel35"; + this.metroLabel35.Size = new System.Drawing.Size(84, 19); + this.metroLabel35.TabIndex = 135; + this.metroLabel35.Text = "OK拉带(3):"; + // + // metroLabel34 + // + this.metroLabel34.AutoSize = true; + this.metroLabel34.Location = new System.Drawing.Point(34, 62); + this.metroLabel34.Name = "metroLabel34"; + this.metroLabel34.Size = new System.Drawing.Size(84, 19); + this.metroLabel34.TabIndex = 136; + this.metroLabel34.Text = "OK拉带(2):"; + // + // txtTensionStrap2 + // + this.txtTensionStrap2.Enabled = false; + this.txtTensionStrap2.Location = new System.Drawing.Point(368, 62); + this.txtTensionStrap2.Name = "txtTensionStrap2"; + this.txtTensionStrap2.Size = new System.Drawing.Size(92, 21); + this.txtTensionStrap2.TabIndex = 144; + // + // chkIsGarding + // + this.chkIsGarding.AutoSize = true; + this.chkIsGarding.Enabled = false; + this.chkIsGarding.Location = new System.Drawing.Point(243, 134); + this.chkIsGarding.Name = "chkIsGarding"; + this.chkIsGarding.Size = new System.Drawing.Size(132, 16); + this.chkIsGarding.TabIndex = 147; + this.chkIsGarding.Text = "是否开启上位机分档"; + this.chkIsGarding.UseVisualStyleBackColor = true; + // + // metroLabel38 + // + this.metroLabel38.AutoSize = true; + this.metroLabel38.Location = new System.Drawing.Point(290, 62); + this.metroLabel38.Name = "metroLabel38"; + this.metroLabel38.Size = new System.Drawing.Size(85, 19); + this.metroLabel38.TabIndex = 138; + this.metroLabel38.Text = "NG拉带(6):"; + // + // txtTensionStrap1 + // + this.txtTensionStrap1.Enabled = false; + this.txtTensionStrap1.Location = new System.Drawing.Point(368, 28); + this.txtTensionStrap1.Name = "txtTensionStrap1"; + this.txtTensionStrap1.Size = new System.Drawing.Size(92, 21); + this.txtTensionStrap1.TabIndex = 145; + // + // metroLabel37 + // + this.metroLabel37.AutoSize = true; + this.metroLabel37.Location = new System.Drawing.Point(290, 28); + this.metroLabel37.Name = "metroLabel37"; + this.metroLabel37.Size = new System.Drawing.Size(85, 19); + this.metroLabel37.TabIndex = 139; + this.metroLabel37.Text = "NG拉带(5):"; + // + // metroLabel33 + // + this.metroLabel33.AutoSize = true; + this.metroLabel33.Location = new System.Drawing.Point(34, 28); + this.metroLabel33.Name = "metroLabel33"; + this.metroLabel33.Size = new System.Drawing.Size(82, 19); + this.metroLabel33.TabIndex = 140; + this.metroLabel33.Text = "OK拉带(1):"; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.splitContainer2); + this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox4.Location = new System.Drawing.Point(0, 0); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(654, 305); + this.groupBox4.TabIndex = 2; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "电池外观检测面定义"; + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.Location = new System.Drawing.Point(3, 17); + this.splitContainer2.Name = "splitContainer2"; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.pictureBox2); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.pictureBox3); + this.splitContainer2.Size = new System.Drawing.Size(648, 285); + this.splitContainer2.SplitterDistance = 322; + this.splitContainer2.SplitterWidth = 3; + this.splitContainer2.TabIndex = 0; + this.splitContainer2.TabStop = false; + // + // pictureBox2 + // + this.pictureBox2.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image"))); + this.pictureBox2.Location = new System.Drawing.Point(0, 0); + this.pictureBox2.Name = "pictureBox2"; + this.pictureBox2.Size = new System.Drawing.Size(322, 285); + this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox2.TabIndex = 2; + this.pictureBox2.TabStop = false; + // + // pictureBox3 + // + this.pictureBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image"))); + this.pictureBox3.Location = new System.Drawing.Point(0, 0); + this.pictureBox3.Name = "pictureBox3"; + this.pictureBox3.Size = new System.Drawing.Size(323, 285); + this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox3.TabIndex = 3; + this.pictureBox3.TabStop = false; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.tableLayoutPanel4); + this.groupBox3.Location = new System.Drawing.Point(3, 3); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(71, 556); + this.groupBox3.TabIndex = 11; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "设备状态"; + // + // tableLayoutPanel4 + // + this.tableLayoutPanel4.ColumnCount = 1; + this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel4.Controls.Add(this.metroLabel2, 0, 15); + this.tableLayoutPanel4.Controls.Add(this.btn_YJJJ, 0, 14); + this.tableLayoutPanel4.Controls.Add(this.cvOKQty, 0, 10); + this.tableLayoutPanel4.Controls.Add(this.prYield, 0, 12); + this.tableLayoutPanel4.Controls.Add(this.RPimpacting, 0, 4); + this.tableLayoutPanel4.Controls.Add(this.metroLabel8, 0, 13); + this.tableLayoutPanel4.Controls.Add(this.metroLabel9, 0, 7); + this.tableLayoutPanel4.Controls.Add(this.metroLabel10, 0, 11); + this.tableLayoutPanel4.Controls.Add(this.metroLabel11, 0, 9); + this.tableLayoutPanel4.Controls.Add(this.RPPPM, 0, 6); + this.tableLayoutPanel4.Controls.Add(this.metroLabel12, 0, 3); + this.tableLayoutPanel4.Controls.Add(this.crToalQty, 0, 8); + this.tableLayoutPanel4.Controls.Add(this.lblLinkPLCState, 0, 2); + this.tableLayoutPanel4.Controls.Add(this.lblMsg, 0, 1); + this.tableLayoutPanel4.Controls.Add(this.btnStart, 0, 0); + this.tableLayoutPanel4.Controls.Add(this.metroLabel14, 0, 5); + this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 17); + this.tableLayoutPanel4.Name = "tableLayoutPanel4"; + this.tableLayoutPanel4.RowCount = 17; + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 66F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 21F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 63F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 18F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 69F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 18F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 64F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 64F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 21F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 64F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 64F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 21F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 64F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 19F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 62F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel4.Size = new System.Drawing.Size(65, 536); + this.tableLayoutPanel4.TabIndex = 5; + // + // metroLabel2 + // + this.metroLabel2.AutoSize = true; + this.metroLabel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.metroLabel2.FontSize = MetroFramework.MetroLabelSize.Small; + this.metroLabel2.FontWeight = MetroFramework.MetroLabelWeight.Regular; + this.metroLabel2.Location = new System.Drawing.Point(3, 664); + this.metroLabel2.Name = "metroLabel2"; + this.metroLabel2.Size = new System.Drawing.Size(59, 19); + this.metroLabel2.TabIndex = 29; + this.metroLabel2.Text = "一键降级"; + this.metroLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btn_YJJJ + // + this.btn_YJJJ.Dock = System.Windows.Forms.DockStyle.Fill; + this.btn_YJJJ.Image = ((System.Drawing.Image)(resources.GetObject("btn_YJJJ.Image"))); + this.btn_YJJJ.Location = new System.Drawing.Point(3, 603); + this.btn_YJJJ.Name = "btn_YJJJ"; + this.btn_YJJJ.Size = new System.Drawing.Size(59, 58); + this.btn_YJJJ.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.btn_YJJJ.TabIndex = 28; + this.btn_YJJJ.TabStop = false; + this.btn_YJJJ.Click += new System.EventHandler(this.btn_YJJJ_Click); + // + // cvOKQty + // + this.cvOKQty.BgColor = System.Drawing.Color.Green; + this.cvOKQty.BorderWidth = 5; + this.cvOKQty.CountValue = 500000; + this.cvOKQty.Dock = System.Windows.Forms.DockStyle.Fill; + this.cvOKQty.Location = new System.Drawing.Point(0, 427); + this.cvOKQty.Margin = new System.Windows.Forms.Padding(0); + this.cvOKQty.Name = "cvOKQty"; + this.cvOKQty.SectorColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(179)))), ((int)(((byte)(63))))); + this.cvOKQty.Size = new System.Drawing.Size(65, 64); + this.cvOKQty.TabIndex = 24; + this.cvOKQty.Text = "circleCountValue2"; + // + // prYield + // + this.prYield.ArcAnnulusBackColor = System.Drawing.Color.Empty; + this.prYield.ArcBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(112)))), ((int)(((byte)(0)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); + this.prYield.ArcRadius = 32; + this.prYield.ArcRound = true; + this.prYield.ArcThickness = 6; + this.prYield.Dock = System.Windows.Forms.DockStyle.Fill; + this.prYield.Location = new System.Drawing.Point(1, 516); + this.prYield.Margin = new System.Windows.Forms.Padding(1); + this.prYield.Name = "prYield"; + this.prYield.Size = new System.Drawing.Size(63, 62); + this.prYield.TabIndex = 0; + this.prYield.TabStop = false; + this.prYield.Type = WinformControlLibraryExtension.PercentageProgressExt.PercentageType.Arc; + this.prYield.Value = 0.23F; + this.prYield.ValueColor = System.Drawing.Color.FromArgb(((int)(((byte)(227)))), ((int)(((byte)(0)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); + this.prYield.ValueFont = new System.Drawing.Font("楷体", 9F); + // + // RPimpacting + // + this.RPimpacting.ArcAnnulusBackColor = System.Drawing.Color.Empty; + this.RPimpacting.ArcBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(112)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128))))); + this.RPimpacting.ArcRadius = 32; + this.RPimpacting.ArcRound = true; + this.RPimpacting.ArcThickness = 6; + this.RPimpacting.Dock = System.Windows.Forms.DockStyle.Fill; + this.RPimpacting.Location = new System.Drawing.Point(1, 169); + this.RPimpacting.Margin = new System.Windows.Forms.Padding(1); + this.RPimpacting.Name = "RPimpacting"; + this.RPimpacting.Size = new System.Drawing.Size(63, 67); + this.RPimpacting.TabIndex = 0; + this.RPimpacting.TabStop = false; + this.RPimpacting.Type = WinformControlLibraryExtension.PercentageProgressExt.PercentageType.Arc; + this.RPimpacting.Value = 0.23F; + this.RPimpacting.ValueColor = System.Drawing.Color.FromArgb(((int)(((byte)(227)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); + this.RPimpacting.ValueFont = new System.Drawing.Font("楷体", 9F); + // + // metroLabel8 + // + this.metroLabel8.AutoSize = true; + this.metroLabel8.Dock = System.Windows.Forms.DockStyle.Fill; + this.metroLabel8.FontSize = MetroFramework.MetroLabelSize.Small; + this.metroLabel8.FontWeight = MetroFramework.MetroLabelWeight.Regular; + this.metroLabel8.Location = new System.Drawing.Point(3, 579); + this.metroLabel8.Name = "metroLabel8"; + this.metroLabel8.Size = new System.Drawing.Size(59, 21); + this.metroLabel8.TabIndex = 20; + this.metroLabel8.Text = "良率"; + this.metroLabel8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // metroLabel9 + // + this.metroLabel9.AutoSize = true; + this.metroLabel9.Dock = System.Windows.Forms.DockStyle.Fill; + this.metroLabel9.FontWeight = MetroFramework.MetroLabelWeight.Regular; + this.metroLabel9.Location = new System.Drawing.Point(3, 319); + this.metroLabel9.Name = "metroLabel9"; + this.metroLabel9.Size = new System.Drawing.Size(59, 23); + this.metroLabel9.TabIndex = 15; + this.metroLabel9.Text = "PPM"; + this.metroLabel9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // metroLabel10 + // + this.metroLabel10.AutoSize = true; + this.metroLabel10.Dock = System.Windows.Forms.DockStyle.Fill; + this.metroLabel10.FontSize = MetroFramework.MetroLabelSize.Small; + this.metroLabel10.FontWeight = MetroFramework.MetroLabelWeight.Regular; + this.metroLabel10.Location = new System.Drawing.Point(3, 491); + this.metroLabel10.Name = "metroLabel10"; + this.metroLabel10.Size = new System.Drawing.Size(59, 24); + this.metroLabel10.TabIndex = 21; + this.metroLabel10.Text = "良品数"; + this.metroLabel10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // metroLabel11 + // + this.metroLabel11.AutoSize = true; + this.metroLabel11.Dock = System.Windows.Forms.DockStyle.Fill; + this.metroLabel11.FontSize = MetroFramework.MetroLabelSize.Small; + this.metroLabel11.FontWeight = MetroFramework.MetroLabelWeight.Regular; + this.metroLabel11.Location = new System.Drawing.Point(3, 406); + this.metroLabel11.Name = "metroLabel11"; + this.metroLabel11.Size = new System.Drawing.Size(59, 21); + this.metroLabel11.TabIndex = 20; + this.metroLabel11.Text = "投入数"; + this.metroLabel11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RPPPM + // + this.RPPPM.BgColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); + this.RPPPM.BorderWidth = 5; + this.RPPPM.Dock = System.Windows.Forms.DockStyle.Fill; + this.RPPPM.Font = new System.Drawing.Font("楷体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RPPPM.Location = new System.Drawing.Point(0, 255); + this.RPPPM.Margin = new System.Windows.Forms.Padding(0); + this.RPPPM.Name = "RPPPM"; + this.RPPPM.Progress = 1000; + this.RPPPM.SectorColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(179)))), ((int)(((byte)(63))))); + this.RPPPM.Size = new System.Drawing.Size(65, 64); + this.RPPPM.TabIndex = 2; + this.RPPPM.Text = "circleProgramBar1"; + // + // metroLabel12 + // + this.metroLabel12.AutoSize = true; + this.metroLabel12.Dock = System.Windows.Forms.DockStyle.Fill; + this.metroLabel12.FontSize = MetroFramework.MetroLabelSize.Small; + this.metroLabel12.FontWeight = MetroFramework.MetroLabelWeight.Regular; + this.metroLabel12.Location = new System.Drawing.Point(3, 150); + this.metroLabel12.Name = "metroLabel12"; + this.metroLabel12.Size = new System.Drawing.Size(59, 18); + this.metroLabel12.TabIndex = 7; + this.metroLabel12.Text = "PLC状态"; + this.metroLabel12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // crToalQty + // + this.crToalQty.BgColor = System.Drawing.Color.Green; + this.crToalQty.BorderWidth = 5; + this.crToalQty.CountValue = 100000; + this.crToalQty.Dock = System.Windows.Forms.DockStyle.Fill; + this.crToalQty.Location = new System.Drawing.Point(0, 342); + this.crToalQty.Margin = new System.Windows.Forms.Padding(0); + this.crToalQty.Name = "crToalQty"; + this.crToalQty.SectorColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); + this.crToalQty.Size = new System.Drawing.Size(65, 64); + this.crToalQty.TabIndex = 2; + this.crToalQty.Text = "circleCountValue1"; + // + // lblLinkPLCState + // + this.lblLinkPLCState.BorderWidth = 4; + this.lblLinkPLCState.CenterColor = System.Drawing.Color.White; + this.lblLinkPLCState.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblLinkPLCState.FlashInterval = 500; + this.lblLinkPLCState.GapWidth = 5; + this.lblLinkPLCState.IsBorder = true; + this.lblLinkPLCState.IsFlash = false; + this.lblLinkPLCState.IsHighLight = true; + this.lblLinkPLCState.LampColor = new System.Drawing.Color[] { + System.Drawing.Color.Green, + System.Drawing.Color.Yellow}; + this.lblLinkPLCState.LedColor = System.Drawing.Color.Green; + this.lblLinkPLCState.LedFalseColor = System.Drawing.Color.Red; + this.lblLinkPLCState.LedStatus = false; + this.lblLinkPLCState.LedTrueColor = System.Drawing.Color.Green; + this.lblLinkPLCState.Location = new System.Drawing.Point(0, 87); + this.lblLinkPLCState.Margin = new System.Windows.Forms.Padding(0); + this.lblLinkPLCState.Name = "lblLinkPLCState"; + this.lblLinkPLCState.Size = new System.Drawing.Size(65, 63); + this.lblLinkPLCState.TabIndex = 16; + // + // lblMsg + // + this.lblMsg.AutoSize = true; + this.lblMsg.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblMsg.FontSize = MetroFramework.MetroLabelSize.Small; + this.lblMsg.FontWeight = MetroFramework.MetroLabelWeight.Regular; + this.lblMsg.Location = new System.Drawing.Point(3, 66); + this.lblMsg.Name = "lblMsg"; + this.lblMsg.Size = new System.Drawing.Size(59, 21); + this.lblMsg.TabIndex = 18; + this.lblMsg.Text = "开启联机"; + this.lblMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnStart + // + this.btnStart.ButtonCenterColorEnd = System.Drawing.Color.Red; + this.btnStart.ButtonCenterColorStart = System.Drawing.Color.Coral; + this.btnStart.DistanceToBorder = 4; + this.btnStart.Dock = System.Windows.Forms.DockStyle.Fill; + this.btnStart.IsShowIcon = false; + this.btnStart.Location = new System.Drawing.Point(0, 0); + this.btnStart.Margin = new System.Windows.Forms.Padding(0); + this.btnStart.Name = "btnStart"; + this.btnStart.Size = new System.Drawing.Size(65, 66); + this.btnStart.TabIndex = 2; + this.btnStart.Text = "roundButton1"; + this.btnStart.UseVisualStyleBackColor = true; + this.btnStart.Click += new System.EventHandler(this.btStart_Click); + // + // metroLabel14 + // + this.metroLabel14.AutoSize = true; + this.metroLabel14.Dock = System.Windows.Forms.DockStyle.Fill; + this.metroLabel14.FontSize = MetroFramework.MetroLabelSize.Small; + this.metroLabel14.FontWeight = MetroFramework.MetroLabelWeight.Regular; + this.metroLabel14.Location = new System.Drawing.Point(3, 237); + this.metroLabel14.Name = "metroLabel14"; + this.metroLabel14.Size = new System.Drawing.Size(59, 18); + this.metroLabel14.TabIndex = 13; + this.metroLabel14.Text = "稼动率"; + this.metroLabel14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // timer1 + // + this.timer1.Enabled = true; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(1245, 25); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(115, 32); + this.button1.TabIndex = 51; + this.button1.Text = "MEStest"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Visible = false; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // contextMenuStrip1 + // + this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4); + // + // HomeForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(1556, 884); + this.Controls.Add(this.button1); + this.Controls.Add(this.panel2); + this.Controls.Add(this.tableLayoutPanel3); + this.Controls.Add(this.panel3); + this.Controls.Add(this.statusStrip1); + this.Controls.Add(this.menuStrip1); + this.HelpButton = true; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MainMenuStrip = this.menuStrip1; + this.Name = "HomeForm"; + this.Padding = new System.Windows.Forms.Padding(0, 60, 0, 0); + this.Text = "电芯外观检测系统"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.HomeForm_FormClosing); + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.HomeForm_FormClosed); + this.Load += new System.EventHandler(this.HomeForm_Load); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + this.panel3.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgvDataShow_B)).EndInit(); + this.groupBox2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgvDataShow_A)).EndInit(); + this.tableLayoutPanel3.ResumeLayout(false); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.tableLayoutPanel2.ResumeLayout(false); + this.splitContainer3.Panel1.ResumeLayout(false); + this.splitContainer3.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); + this.splitContainer3.ResumeLayout(false); + this.splitContainer4.Panel1.ResumeLayout(false); + this.splitContainer4.Panel1.PerformLayout(); + this.splitContainer4.Panel2.ResumeLayout(false); + this.splitContainer4.Panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit(); + this.splitContainer4.ResumeLayout(false); + this.groupBox5.ResumeLayout(false); + this.groupBox5.PerformLayout(); + this.groupBox6.ResumeLayout(false); + this.groupBox6.PerformLayout(); + this.groupBox4.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit(); + this.groupBox3.ResumeLayout(false); + this.tableLayoutPanel4.ResumeLayout(false); + this.tableLayoutPanel4.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.btn_YJJJ)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem tsmiLogin; + private System.Windows.Forms.ToolStripMenuItem tsmiParaConfig; + private System.Windows.Forms.ToolStripMenuItem tsmiSetting; + private System.Windows.Forms.ToolStripMenuItem tsmiAbout; + private MetroFramework.Controls.MetroLabel lblUser; + private MetroFramework.Controls.MetroLabel metroLabel3; + private MetroFramework.Controls.MetroLabel metroLabel4; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.StatusStrip statusStrip1; + private System.Windows.Forms.ToolStripMenuItem tsmiSearch; + private System.Windows.Forms.ToolStripMenuItem tsmiChangeModel; + private System.Windows.Forms.ToolStripMenuItem tsmiPLCConfig; + private System.Windows.Forms.ToolStripMenuItem tsmiDBConfig; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.ToolStripMenuItem tsmiUserConfig; + private System.Windows.Forms.ToolStripMenuItem tsmiChart; + private System.Windows.Forms.ToolStripMenuItem tsmiSerialPortConfig; + private System.Windows.Forms.ImageList imageList1; + private System.Windows.Forms.GroupBox txtlog; + private System.Windows.Forms.ToolStripMenuItem tsmiMESConfig; + private MetroFramework.Controls.MetroLabel metroLabel31; + private MetroFramework.Controls.MetroLabel lblAuthority; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel7; + private System.Windows.Forms.Timer timer_Clock; + private System.Windows.Forms.ToolStripMenuItem tsmiHistory; + private System.Windows.Forms.ToolStripMenuItem tsmiAlarmSearch; + private System.Windows.Forms.GroupBox groupBox1; + private GridViewBuff dgvDataShow_B; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; + private System.Windows.Forms.GroupBox groupBox3; + + private MetroFramework.Controls.MetroLabel timelabel; + private System.Windows.Forms.ToolStripStatusLabel txtTcpClicet; + private System.Windows.Forms.ToolStripMenuItem tsmiCCDData; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1; + private System.Windows.Forms.ToolStripStatusLabel txtsiteCode; + private System.Windows.Forms.SplitContainer splitContainer1; + private GridViewBuff dgvDataShow_A; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; + private System.Windows.Forms.PictureBox pictureBox3; + private System.Windows.Forms.PictureBox pictureBox2; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem mES测试ToolStripMenuItem; + private System.Windows.Forms.SplitContainer splitContainer3; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.TextBox txtPhaseVolUA; + private System.Windows.Forms.TextBox txtPhaseVolUC; + private System.Windows.Forms.TextBox txtPhaseVolUB; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox txtLineVolUAC; + private System.Windows.Forms.TextBox txtLineVolUBC; + private System.Windows.Forms.TextBox txtLineVolUAB; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.TextBox txtPowerC; + private System.Windows.Forms.TextBox txtPowerB; + private System.Windows.Forms.TextBox txtPowerA; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox txtIC; + private System.Windows.Forms.TextBox txtIB; + private System.Windows.Forms.TextBox txtIA; + private System.Windows.Forms.Label label26; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.Label label25; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TextBox txtTotalPower; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4; + private MetroFramework.Controls.MetroLabel metroLabel8; + private MetroFramework.Controls.MetroLabel metroLabel9; + private MetroFramework.Controls.MetroLabel metroLabel10; + private MetroFramework.Controls.MetroLabel metroLabel11; + private JYControl.CircleProgramBar RPPPM; + private MetroFramework.Controls.MetroLabel metroLabel12; + private JYControl.CircleCountValue crToalQty; + private JYControl.LedControl lblLinkPLCState; + private MetroFramework.Controls.MetroLabel lblMsg; + private JYControl.RoundButton btnStart; + private MetroFramework.Controls.MetroLabel metroLabel14; + private WinformControlLibraryExtension.PercentageProgressExt prYield; + private WinformControlLibraryExtension.PercentageProgressExt RPimpacting; + private JYControl.CircleCountValue cvOKQty; + private System.Windows.Forms.CheckBox ckStartZNDB; + private System.Windows.Forms.ToolStripMenuItem tsmiAbnormalVoice; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2; + private System.Windows.Forms.ToolStripStatusLabel txtlineCode; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel4; + private System.Windows.Forms.ToolStripStatusLabel txtequipCode; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel6; + private System.Windows.Forms.ToolStripStatusLabel txtmaterialCode; + private System.Windows.Forms.ToolStripMenuItem mES分档设置ToolStripMenuItem; + private System.Windows.Forms.SplitContainer splitContainer4; + private System.Windows.Forms.GroupBox groupBox6; + private System.Windows.Forms.TextBox txtTensionStrap3; + private MetroFramework.Controls.MetroLabel metroLabel1; + private System.Windows.Forms.TextBox txtgrading4; + private MetroFramework.Controls.MetroLabel metroLabel36; + private System.Windows.Forms.TextBox txtgrading3; + private MetroFramework.Controls.MetroLabel metroLabel35; + private System.Windows.Forms.TextBox txtgrading2; + private MetroFramework.Controls.MetroLabel metroLabel34; + private System.Windows.Forms.TextBox txtTensionStrap2; + private System.Windows.Forms.CheckBox chkIsGarding; + private MetroFramework.Controls.MetroLabel metroLabel38; + private System.Windows.Forms.TextBox txtTensionStrap1; + private MetroFramework.Controls.MetroLabel metroLabel37; + private System.Windows.Forms.TextBox txtgrading1; + private MetroFramework.Controls.MetroLabel metroLabel33; + private System.ComponentModel.BackgroundWorker backgroundWorker1; + private System.Windows.Forms.CheckBox chkStartNGFL; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel3; + private System.Windows.Forms.ToolStripStatusLabel txtClassShift; + private MetroFramework.Controls.MetroLabel metroLabel2; + private System.Windows.Forms.PictureBox btn_YJJJ; + private System.Windows.Forms.DataGridViewTextBoxColumn Column1; + private System.Windows.Forms.DataGridViewTextBoxColumn Column30; + private System.Windows.Forms.DataGridViewTextBoxColumn Column2; + private System.Windows.Forms.DataGridViewTextBoxColumn Column3; + private System.Windows.Forms.DataGridViewTextBoxColumn Column4; + private System.Windows.Forms.DataGridViewTextBoxColumn Column5; + private System.Windows.Forms.DataGridViewTextBoxColumn Column6; + private System.Windows.Forms.DataGridViewTextBoxColumn Column8; + private System.Windows.Forms.DataGridViewTextBoxColumn Column31; + private System.Windows.Forms.DataGridViewTextBoxColumn Column26; + private System.Windows.Forms.DataGridViewTextBoxColumn Column7; + private System.Windows.Forms.DataGridViewTextBoxColumn Column27; + private System.Windows.Forms.DataGridViewTextBoxColumn Column25; + private System.Windows.Forms.DataGridViewTextBoxColumn Column9; + private System.Windows.Forms.DataGridViewTextBoxColumn Column10; + private System.Windows.Forms.DataGridViewTextBoxColumn Column11; + private System.Windows.Forms.DataGridViewTextBoxColumn Column12; + private System.Windows.Forms.DataGridViewTextBoxColumn Column13; + private System.Windows.Forms.DataGridViewTextBoxColumn Column14; + private System.Windows.Forms.DataGridViewTextBoxColumn Column15; + private System.Windows.Forms.DataGridViewTextBoxColumn Column16; + private System.Windows.Forms.DataGridViewTextBoxColumn Column17; + private System.Windows.Forms.DataGridViewTextBoxColumn Column18; + private System.Windows.Forms.DataGridViewTextBoxColumn Column19; + private System.Windows.Forms.DataGridViewTextBoxColumn Column20; + private System.Windows.Forms.DataGridViewTextBoxColumn Column21; + private System.Windows.Forms.DataGridViewTextBoxColumn Column23; + private System.Windows.Forms.DataGridViewTextBoxColumn Column28; + private System.Windows.Forms.DataGridViewTextBoxColumn Column29; + private System.Windows.Forms.DataGridViewTextBoxColumn Column22; + private System.Windows.Forms.DataGridViewTextBoxColumn Column24; + private System.Windows.Forms.TextBox txtTensionStrapCCD1; + private MetroFramework.Controls.MetroLabel metroLabel5; + private System.Windows.Forms.TextBox txtTensionStrapCCD4; + private System.Windows.Forms.TextBox txtTensionStrapCCD3; + private MetroFramework.Controls.MetroLabel metroLabel7; + private System.Windows.Forms.TextBox txtTensionStrapCCD2; + private MetroFramework.Controls.MetroLabel metroLabel6; + private MetroFramework.Controls.MetroLabel metroLabel13; + private System.Windows.Forms.ToolStripMenuItem tsmiTestCode; + } +} \ No newline at end of file diff --git a/JY.Inspection/HomeForm.resx b/JY.Inspection/HomeForm.resx new file mode 100644 index 0000000..355542a --- /dev/null +++ b/JY.Inspection/HomeForm.resx @@ -0,0 +1,2960 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 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AEAAHxAY8BAgFABAAB+AEfAQQBIAQAAfgBHwQAAYABAQH8 + AT8BgAEBAgABwAEDAf4BfwHAAQMCAAHgAQcB/gF/AeABBwIAAfABDwL/AfABDwIACw== + + + + True + + + 137, 17 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + 373, 17 + + + + iVBORw0KGgoAAAANSUhEUgAAAngAAAEaCAYAAACCQyr2AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS + cQAAEnEB89x6jgAA+pBJREFUeF7svQVcXGfa/v97/++++3b37Xa33Xa70na7dfc2bZO0SZs07u7u7u7E + SLCQECA4JGiCxIDg7u6W4B7cQuD6n/thBoZhgMESMvNcn8/1gfOcM2fOHP2e+37k/4GLi4uLi4uLi0uh + xAGPi4uLi4uLi0vBxAGPi4uLi4uLi0vBxAGPi4tL4dTU1Iz6hseo435qrn8kr5tEFv4Xf6718xLz5LCs + 7eipaT3Nzc0y53Fzd2c6d+n8GQzigMfFxaVwSs+twF69IOzW5X5a3iPLesGdux+Wl7UdPfVR4zDU1DXK + nMfN3Z3pvlNeVS+6Ez1dccDj4hqkelRXCldHB8RnlohK2tRYXw6PWw6IzigUlXBJKv7+Q8w75oa5R7m5 + e+YVZ7xQWfNI5jxu7u48X7jvlFTUie5ET1cc8Li4BqlKM53x7//+X2zVviMqadPDXH989Kf/xYpTdqIS + LklxwOPurTngcffFHPC4uLi6VZeAl8MBrytxwOPurTngcffFHPC4uJ6inlQFWPqe7tyVOOD1XhzwBrfn + ySgbLOaAx90Xc8Dj6rUqKyuRk5ODrKws7l44MzOznWUt01+W/i5J0/yKioouQY8DXu/VV8C7eCMOp8wj + sOC4u8z5XXnpKU+sPOslcx5t03p13x5v257LQbjunYGNGn4y50t7vrDdBCqSZctOe7abljZtU29+rywv + OemJY8ZhMkFu4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ht3QSDN4utEGMtFbSsz9UAjOFYyf7/Mwg9zol1xFNUGbTT0q8fs+YU9+Q5CXZFovaNzUt2mr + 8H3FI025AefvHD35960ypTeQk3Cb31YhWMI9MkGd6CzXXyZFdT4rq4+z/M8HRd0ryMXxIkdRz4JtO/ct + GFn2+dUceAlG7n7D6Q1PRsYXAFlFZ9phukMdfGqDq66fyqygQz3dmSYnGQrD9OnMMjvVtY40Y/d1ShPa + se4CvxNtJfJ0ZhrTpzVMZ6F1Igb06VKlk+BTmSaYUxvZuVk53GNWxmo8jYkF0xdzMFPZ5EIqFC59ge2+ + mK6e6a7BxthKs5ZC34zRmCq7gFWQpRyB5vzUQO8gW+BtcdFPDWxXzRf6os+bVtjDgm3Lm862bQ7HCWzU + sNYmXyXYaOVahjT+3MY0ZXvB2tr/GbiyqsbkJo4AAAAASUVORK5CYII= + + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + 494, 17 + + + 584, 17 + + + 749, 17 + + + 32 + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJ3IDgCeyA4AnMcOAJvHDwCayBEAmsgRAJrI + EACayBAAmsgQAJrIEACayBAAmsgQAJ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git a/JY.Inspection/JY.Inspection.csproj b/JY.Inspection/JY.Inspection.csproj new file mode 100644 index 0000000..34c31c4 --- /dev/null +++ b/JY.Inspection/JY.Inspection.csproj @@ -0,0 +1,492 @@ + + + + + Debug + AnyCPU + {607AF967-65F7-483E-8BD9-2D92AD17D151} + WinExe + JY.Inspection + JY.Inspection + v4.8 + 512 + true + true + + + + + + AnyCPU + true + full + false + ..\..\..\..\JY.Inspection\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + JY.Inspection.Program + + + + 外观检测.ico + + + + appini.manifest + + + + ..\packages\Portable.BouncyCastle.1.8.9\lib\net40\BouncyCastle.Crypto.dll + + + ..\packages\CsvHelper.30.0.1\lib\net45\CsvHelper.dll + + + ..\packages\EPPlus.8.0.8\lib\net462\EPPlus.dll + + + ..\packages\EPPlus.Interfaces.8.0.0\lib\net462\EPPlus.Interfaces.dll + + + False + Lib\HslCommunication.dll + + + ..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll + + + ..\packages\log4net.2.0.13\lib\net45\log4net.dll + + + ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.dll + True + + + ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Design.dll + True + + + ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Fonts.dll + True + + + ..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.9\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll + + + ..\packages\Microsoft.Extensions.DependencyInjection.10.0.9\lib\net462\Microsoft.Extensions.DependencyInjection.dll + + + ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.10.0.9\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll + + + ..\packages\Microsoft.IO.RecyclableMemoryStream.3.0.1\lib\netstandard2.0\Microsoft.IO.RecyclableMemoryStream.dll + + + ..\packages\MiniExcel.1.36.1\lib\net45\MiniExcel.dll + + + ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + + + ..\packages\NModbus4.2.1.0\lib\net40\NModbus4.dll + + + ..\packages\NPOI.2.5.5\lib\net45\NPOI.dll + + + ..\packages\NPOI.2.5.5\lib\net45\NPOI.OOXML.dll + + + ..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXml4Net.dll + + + ..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXmlFormats.dll + + + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.ComponentModel.Annotations.5.0.0\lib\net461\System.ComponentModel.Annotations.dll + + + + + + + + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll + + + + ..\packages\System.Security.Cryptography.Xml.8.0.2\lib\net462\System.Security.Cryptography.Xml.dll + + + + ..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll + + + ..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll + + + + + + + + + + + + + + False + Lib\WcleAnimationLibrary.dll + + + ..\..\..\..\..\14J大圆柱\908项目大圆柱\908-9 封口机\HBG_SealMachine\HBG_SealMachine\Lib\WinformControlLibraryExtension.dll + + + False + Lib\WinformControlLibraryExtension.ComplexityPropertys.dll + + + + + + + + + + + + + + + + + + + + + Form + + + FormMesGradingSet.cs + + + Form + + + FrmAbnormalVoice.cs + + + Form + + + FrmAlert.cs + + + Form + + + FrmCCDQuery.cs + + + Form + + + FormMesDataSet.cs + + + Form + + + FrmAlamQuery.cs + + + Form + + + FrmChangeModel.cs + + + Form + + + FrmConfigBaseSet.cs + + + Form + + + FrmDBbaseSet.cs + + + Form + + + FrmHelper.cs + + + Form + + + FrmHistoricalDataQuery.cs + + + Form + + + FrmParaConfig.cs + + + Form + + + FrmPwd.cs + + + Form + + + FrmStatistics.cs + + + Form + + + FrmTest.cs + + + Form + + + LoginForm.cs + + + Form + + + SetForm.cs + + + Form + + + HomeForm.cs + + + + Component + + + + + + + + FormMesGradingSet.cs + + + FrmAbnormalVoice.cs + + + FrmAlert.cs + + + FrmCCDQuery.cs + + + FormMesDataSet.cs + + + FrmAlamQuery.cs + + + FrmChangeModel.cs + + + FrmConfigBaseSet.cs + + + FrmDBbaseSet.cs + + + FrmHelper.cs + + + FrmHistoricalDataQuery.cs + + + FrmParaConfig.cs + + + FrmPwd.cs + + + FrmStatistics.cs + + + FrmTest.cs + + + LoginForm.cs + + + SetForm.cs + + + HomeForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {01a2aa2c-9b80-41aa-9f47-3cb67e60af24} + JY.Control + + + {d5889580-58f9-467e-87d3-efa37a300e67} + JY.DAL + + + {168C8644-3975-450D-94D2-29D21C135C16} + JY.MES + + + {f7db3a93-fca2-479b-8b2e-380116aae9fc} + JY.Model + + + {76de07e0-9e97-44ab-8148-01b44c5c1add} + JY.Utility + + + {796c9dfe-1d66-4921-b998-c5fcf15c2983} + PLCCommunication + + + {d73fae32-aaa3-4a51-bb0a-f1a5dc5a7260} + SimpleCommunication + + + {2E9AC112-75CC-4FB6-B058-F9C7424514EF} + SocketHelper + + + + + + + + + + + + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JY.Inspection/JY.Inspection.csproj.user b/JY.Inspection/JY.Inspection.csproj.user new file mode 100644 index 0000000..0b24643 --- /dev/null +++ b/JY.Inspection/JY.Inspection.csproj.user @@ -0,0 +1,6 @@ + + + + ProjectFiles + + \ No newline at end of file diff --git a/JY.Inspection/Lib/HslCommunication.dll b/JY.Inspection/Lib/HslCommunication.dll new file mode 100644 index 0000000..8a764c1 Binary files /dev/null and b/JY.Inspection/Lib/HslCommunication.dll differ diff --git a/JY.Inspection/Lib/MetroFramework.Design.dll b/JY.Inspection/Lib/MetroFramework.Design.dll new file mode 100644 index 0000000..fe69d7d Binary files /dev/null and b/JY.Inspection/Lib/MetroFramework.Design.dll differ diff --git a/JY.Inspection/Lib/MetroFramework.Fonts.dll b/JY.Inspection/Lib/MetroFramework.Fonts.dll new file mode 100644 index 0000000..324ee0f Binary files /dev/null and b/JY.Inspection/Lib/MetroFramework.Fonts.dll differ diff --git a/JY.Inspection/Lib/MetroFramework.dll b/JY.Inspection/Lib/MetroFramework.dll new file mode 100644 index 0000000..ebffc7e Binary files /dev/null and b/JY.Inspection/Lib/MetroFramework.dll differ diff --git a/JY.Inspection/Lib/WcleAnimationLibrary.dll b/JY.Inspection/Lib/WcleAnimationLibrary.dll new file mode 100644 index 0000000..b7b8082 Binary files /dev/null and b/JY.Inspection/Lib/WcleAnimationLibrary.dll differ diff --git a/JY.Inspection/Lib/WinformControlLibraryExtension.ComplexityPropertys.dll b/JY.Inspection/Lib/WinformControlLibraryExtension.ComplexityPropertys.dll new file mode 100644 index 0000000..41dae08 Binary files /dev/null and b/JY.Inspection/Lib/WinformControlLibraryExtension.ComplexityPropertys.dll differ diff --git a/JY.Inspection/Lib/WinformControlLibraryExtension.dll b/JY.Inspection/Lib/WinformControlLibraryExtension.dll new file mode 100644 index 0000000..cb7fe0e Binary files /dev/null and b/JY.Inspection/Lib/WinformControlLibraryExtension.dll differ diff --git a/JY.Inspection/Mes/MESDataCombin.cs b/JY.Inspection/Mes/MESDataCombin.cs new file mode 100644 index 0000000..ab76860 --- /dev/null +++ b/JY.Inspection/Mes/MESDataCombin.cs @@ -0,0 +1,314 @@ +using JY.MES; +using JY.MES.MES; +using JY.Model; +using JY.Utility; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; + +namespace JY.Inspection.Mes +{ + public interface IMes + { + /// + /// 分档查询 + /// + /// + /// + /// + MesResponse GetMesIn(string code, string code2); + + /// + /// 结果加工参数 + /// + /// + /// + MesResponse ProductResultParameters(BlankingData m); + + /// + /// 产品进站(包装) + /// + /// + /// + RespArrivalStation PostProductArrivalStationData(ReqArrivalStation req); + + + /// + /// 产品出站(包装) + /// + /// + /// + RespExitStation PostProductExitStationData(ReqExitStation req); + } + + public class MESDataCombin : IMes + { + #region 1、 分档查询 + public MesResponse GetMesIn(string code, string code2) + { + MesResponse mesResponse = new MesResponse(); + DateTime nowTime = DateTime.Now; + string josnTxtMsg = string.Empty; + string BarCode = ""; + try + { + if (code.Contains("ERROR")) + { + BarCode = code2; + } + else + { + BarCode = code; + } + GradingParam gradingParam = new GradingParam + { + siteCode = Global.systemConfig.siteCode, + lineCode = Global.systemConfig.lineCode, + userName = "admin", + equipCode = Global.systemConfig.equipCode, + recordDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), + qty = 1, + containerCode = "", + materialCode = Global.systemConfig.materialCode, + + + materiallotCodeList = new List() { BarCode } + }; + + string p = JsonConvert.SerializeObject(gradingParam); + + var sw = new Stopwatch(); + sw.Start(); + string mesRes = MESApiHelper.HttpPostJsonAPI(Global.systemConfig.GradingMesUrl, p, Global.systemConfig.MesRequestTime); + sw.Stop(); + + var res = JsonConvert.DeserializeObject(mesRes); + josnTxtMsg = $"{nowTime.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用电芯分档查询接口:{Global.systemConfig.GradingMesUrl},请求数据为:{p},\n{nowTime.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{mesRes}"; + TxtHelper.WriteTxt($@"D:\APILog\MesLogs\{nowTime.ToString("yyyyMMdd")}\调用电芯分档查询接口\{nowTime.ToString("HH")}.txt", josnTxtMsg);//前面是路径,后面是数据 + + mesResponse.success = res.success; + mesResponse.message = res.message; + mesResponse.error = res.error; + if (!res.success) + { + mesResponse.message = res.message; + mesResponse.error = res.error; + } + else + { + try + { + if (res.rows != null && res.rows.Count > 0) + { + List rowsls = new List(); + MesResponse.rowsListItem rows = new MesResponse.rowsListItem(); + rows.identification = res.rows[0].identification; + rows.level = res.rows[0].level; + rows.passage = res.rows[0].passage; + rows.rank = res.rows[0].rank; + rows.message = res.rows[0].message; + rowsls.Add(rows); + mesResponse.rows = rowsls; + } + } + catch (Exception ex) + { + } + } + } + catch (Exception ex) + { + mesResponse.success = false; + mesResponse.error = 9; + mesResponse.message = "电芯分档查询异常:" + ex.Message; + + } + + return mesResponse; + } + #endregion + + #region 2、结果加工参数 + public MesResponse ProductResultParameters(BlankingData m) + { + MesResponse mesResponse = new MesResponse(); + DateTime nowTime = DateTime.Now; + string josnTxtMsg = string.Empty; + try + { + ProductResultParameters prp = new ProductResultParameters(); + prp.equipNum = Global.systemConfig.equipCode; + prp.type = "DD"; + + Payload pl = new Payload(); + pl.siteCode = Global.systemConfig.siteCode; + pl.lineCode = Global.systemConfig.lineCode; + pl.userName = "admin"; + pl.materialCode = Global.systemConfig.materialCode; + pl.carCode = ""; + pl.collection = "JS"; + pl.recordDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + pl.qty = 1; + pl.containerCode = ""; + IdentificationItem iil = new IdentificationItem(); + if (m.DepartureBarCode.Contains("ERROR")) + iil.identification = m.ArrivalBarCode; + else + iil.identification = m.DepartureBarCode; + iil.qualityStatus = m.Result == "OK" ? "Y" : "N"; + pl.identification = iil; + + List tdvls = new List(); + TagDataVOListItem tag1; + + // 结果采集项 + + + tag1 = new TagDataVOListItem() { tagCode = "WGJA001", tagValue = m.ArrivalBarCode, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "入站条码" }; tdvls.Add(tag1); + tag1 = new TagDataVOListItem() { tagCode = "WGJA002", tagValue = m.DepartureBarCode, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "出站条码" }; tdvls.Add(tag1); + tag1 = new TagDataVOListItem() { tagCode = "WGJA003", tagValue = m.WorkShift, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "班次" }; tdvls.Add(tag1); + tag1 = new TagDataVOListItem() { tagCode = "WGJA004", tagValue = m.OutTime, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "出站时间" }; tdvls.Add(tag1); + + foreach (var item in m.PLCValDic) + { + // TODO 获取采集项配置 + var cfgItem = Global.systemConfig.CollectItemCfgList + .Where(it => it.IsEnable && it.PLCRelAddress == item.Key) + .FirstOrDefault(); + + if (cfgItem == null) + { + continue; + } + + // 生成TagDataVoListItem + tdvls.Add(new TagDataVOListItem() { + tagCode = cfgItem.MesItemCode, + tagValue = item.Value, + tagTime = m.OutTime, + tagCalculateResult = "Y", + tagRemark = cfgItem.MesItemName + }); + } + + tdvls.Add(new TagDataVOListItem() + { + tagCode = "WGJA021", + tagValue = m.Result, + tagTime = m.OutTime, + tagCalculateResult = "Y", + tagRemark = "电池总结果" + }); + //多个 + + pl.tagDataVOList = tdvls; + prp.payload = JsonConvert.SerializeObject(pl); + string p = JsonConvert.SerializeObject(prp); + + var sw = new Stopwatch(); + sw.Start(); + string mesRes = MESApiHelper.HttpPostJsonAPI(Global.systemConfig.ResultProcessMesUrl, p, Global.systemConfig.MesRequestTime); + sw.Stop(); + + var res = JsonConvert.DeserializeObject(mesRes); + mesResponse.success = res.success.Value; + if (!res.success.Value) + { + mesResponse.code = res.code.Value; + mesResponse.message = res.message.Value; + if (mesRes.Contains("category")) + mesResponse.category = res.category.Value; + if (res.error != null) + mesResponse.error = (int)res.error.Value; + } + + new MesLog().LogProductResult(nowTime, p, mesRes, sw.ElapsedMilliseconds); + } + catch (Exception ex) + { + mesResponse.success = false; + mesResponse.error = 9; + mesResponse.message = "结果加工参数上传异常:" + ex.Message; + } + return mesResponse; + } + #endregion + + #region 登录 + #endregion + + public RespArrivalStation PostProductArrivalStationData(ReqArrivalStation req) + { + if (req == null) + { + throw new ArgumentNullException("入站数据为空"); + } + + DateTime currentTime = DateTime.Now; + string reqUrl = Global.systemConfig.StationArrivalUrl; + RespArrivalStation resp = new RespArrivalStation(); + + try + { + string reqJsonStr = JsonConvert.SerializeObject(req); + var sw = new Stopwatch(); + sw.Start(); + string mesRes = MESApiHelper.HttpPostJsonAPI( + reqUrl, + reqJsonStr, + Global.systemConfig.MesRequestTime + ); + sw.Stop(); + + resp = JsonConvert.DeserializeObject(mesRes); + + new MesLog().LogArrivalStation(currentTime, reqJsonStr, mesRes, sw.ElapsedMilliseconds); + } + catch (Exception ex) + { + resp.Success = false; + resp.Message = "入站数据上传异常:" + ex.Message; + } + + return resp; + } + + public RespExitStation PostProductExitStationData(ReqExitStation req) + { + if (req == null) + { + throw new ArgumentNullException("出站请求数据为空"); + } + + DateTime currentTime = DateTime.Now; + string reqUrl = Global.systemConfig.StationExitUrl; + RespExitStation resp = new RespExitStation(); + + try + { + string reqJsonStr = JsonConvert.SerializeObject(req); + var sw = new Stopwatch(); + sw.Start(); + string mesRes = MESApiHelper.HttpPostJsonAPI( + reqUrl, + reqJsonStr, + Global.systemConfig.MesRequestTime + ); + sw.Stop(); + + resp = JsonConvert.DeserializeObject(mesRes); + + new MesLog().LogArrivalStation(currentTime, reqJsonStr, mesRes, sw.ElapsedMilliseconds); + } + catch (Exception ex) + { + resp.Success = false; + resp.Message = "出站数据上传异常:" + ex.Message; + } + + return resp; + } + } +} diff --git a/JY.Inspection/Mes/MesLog.cs b/JY.Inspection/Mes/MesLog.cs new file mode 100644 index 0000000..2b0ed9c --- /dev/null +++ b/JY.Inspection/Mes/MesLog.cs @@ -0,0 +1,66 @@ +using JY.Utility; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Web.UI.WebControls; + +namespace JY.Inspection.Mes +{ + public interface IMesLog + { + void LogProductResult(DateTime curTime, string reqJsonStr, string respMes, long costTime); + void LogArrivalStation(DateTime curTime, string reqJsonStr, string respMes, long costTime); + + void LogExitStation(DateTime curTime, string reqJsonStr, string respMes, long costTime); + } + + public class MesLog : IMesLog + { + private void LogoutAction(string actionName, DateTime curTime, string reqJsonStr, string respMes, long costTime) + { + // 构建日志目录和文件路径 + string mesLogPath = @"D:\APILog\MesLogs"; + string logDate = curTime.ToString("yyyyMMdd"); + string logHour = curTime.ToString("HH"); + string logDirectory = Path.Combine(mesLogPath, logDate, actionName); + string logFilePath = Path.Combine(logDirectory, $"{logHour}.txt"); + + // 确保目录存在 + Directory.CreateDirectory(logDirectory); + + // 使用StringBuilder构建日志消息 + var logBuilder = new StringBuilder(); + logBuilder.AppendLine($"{curTime.ToString("yyyy-MM-dd HH:mm:ss.fff")}:{actionName}接口:{Global.systemConfig.ResultProcessMesUrl}"); + logBuilder.AppendLine($"请求数据为:{reqJsonStr}"); + logBuilder.AppendLine($"{curTime.AddMilliseconds(costTime).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{costTime}ms"); + logBuilder.AppendLine($"返回结果:{respMes}"); + + // 写入日志文件 + TxtHelper.WriteTxt(logFilePath, logBuilder.ToString()); + } + + public void LogArrivalStation(DateTime curTime, string reqJsonStr, string respMes, long costTime) + { + string actionName = "产品入站"; + + LogoutAction(actionName, curTime, reqJsonStr, respMes, costTime); + } + + public void LogExitStation(DateTime curTime, string reqJsonStr, string respMes, long costTime) + { + string actionName = "产品出站"; + + LogoutAction(actionName, curTime, reqJsonStr, respMes, costTime); + } + + public void LogProductResult(DateTime curTime, string reqJsonStr, string respMes, long costTime) + { + string actionName = "产品结果加工参数"; + + LogoutAction(actionName, curTime, reqJsonStr, respMes, costTime); + } + } +} diff --git a/JY.Inspection/MetroFramework.txt b/JY.Inspection/MetroFramework.txt new file mode 100644 index 0000000..81064ca --- /dev/null +++ b/JY.Inspection/MetroFramework.txt @@ -0,0 +1,25 @@ +MetroFramework - Modern UI for WinForms + +Copyright (c) 2013 Jens Thiel, http://thielj.github.io/MetroFramework + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in the +Software without restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Portions of this software are: + + Copyright (c) 2011 Sven Walter, http://github.com/viperneo diff --git a/JY.Inspection/Program.cs b/JY.Inspection/Program.cs new file mode 100644 index 0000000..007f20c --- /dev/null +++ b/JY.Inspection/Program.cs @@ -0,0 +1,67 @@ +using HslCommunication; +using JY.Utility; +using System; +using System.Reflection; +using System.Threading; +using System.Windows.Forms; + +namespace JY.Inspection +{ + static class Program + { + + public delegate void RunWorkHandler(); + private static HomeForm mFrmMain; + + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main() + { + if (Authorization.SetAuthorizationCode("b5f8f9f7-c075-4913-ae6e-d7d2cc6f2de1")) + { + Console.WriteLine("注册成功"); + } + try + { + Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); + Application.ThreadException += Application_ThreadException; + AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + IniFileHelper.CreateIniFile(Application.StartupPath + "\\Config\\", "Configure.ini"); + string mutexName = Assembly.GetEntryAssembly().FullName; + string title = IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "Project_Name"); + mFrmMain = new HomeForm(); + bool isFirst; + using (new Mutex(false, mutexName, out isFirst)) + { + if (!isFirst) + { + MessageBox.Show(title + " 已运行,请勿重复启动!", "信息", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); + return; + } + else + { + Application.Run(mFrmMain); + } + } + } + catch (Exception ex) + { + LogHelper.WriteException(ex, string.Empty); + } + } + + private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) + { + LogHelper.WriteException(e.Exception, string.Empty); + } + + private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) + { + LogHelper.WriteException(e.ExceptionObject as Exception, e.ToString()); + } + } +} diff --git a/JY.Inspection/Properties/AssemblyInfo.cs b/JY.Inspection/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f39daca --- /dev/null +++ b/JY.Inspection/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("JY-Inspection")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("JY-Inspection")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("607af967-65f7-483e-8bd9-2d92ad17d151")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/JY.Inspection/Properties/Resources.Designer.cs b/JY.Inspection/Properties/Resources.Designer.cs new file mode 100644 index 0000000..704704d --- /dev/null +++ b/JY.Inspection/Properties/Resources.Designer.cs @@ -0,0 +1,413 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace JY.Inspection.Properties { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.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() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [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("JY.Inspection.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap error { + get { + object obj = ResourceManager.GetObject("error", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap info { + get { + object obj = ResourceManager.GetObject("info", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap inlogo { + get { + object obj = ResourceManager.GetObject("inlogo", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap logo1 { + get { + object obj = ResourceManager.GetObject("logo1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap save { + get { + object obj = ResourceManager.GetObject("save", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap success { + get { + object obj = ResourceManager.GetObject("success", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap warning { + get { + object obj = ResourceManager.GetObject("warning", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap yiweidongli { + get { + object obj = ResourceManager.GetObject("yiweidongli", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 串口 { + get { + object obj = ResourceManager.GetObject("串口", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 主页 { + get { + object obj = ResourceManager.GetObject("主页", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 云上传 { + get { + object obj = ResourceManager.GetObject("云上传", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 停止 { + get { + object obj = ResourceManager.GetObject("停止", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 关于 { + get { + object obj = ResourceManager.GetObject("关于", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 切换 { + get { + object obj = ResourceManager.GetObject("切换", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 切换1 { + get { + object obj = ResourceManager.GetObject("切换1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 图表 { + get { + object obj = ResourceManager.GetObject("图表", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 存储设备 { + get { + object obj = ResourceManager.GetObject("存储设备", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 导入数据_操作_jurassic { + get { + object obj = ResourceManager.GetObject("导入数据_操作_jurassic", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 报警记录 { + get { + object obj = ResourceManager.GetObject("报警记录", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 数据导入 { + get { + object obj = ResourceManager.GetObject("数据导入", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 数据查询 { + get { + object obj = ResourceManager.GetObject("数据查询", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 查询 { + get { + object obj = ResourceManager.GetObject("查询", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 模块 { + get { + object obj = ResourceManager.GetObject("模块", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 清空__1_ { + get { + object obj = ResourceManager.GetObject("清空__1_", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 用户 { + get { + object obj = ResourceManager.GetObject("用户", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 用户管理 { + get { + object obj = ResourceManager.GetObject("用户管理", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 登录 { + get { + object obj = ResourceManager.GetObject("登录", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 白色X32 { + get { + object obj = ResourceManager.GetObject("白色X32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 系统构建 { + get { + object obj = ResourceManager.GetObject("系统构建", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 系统设置 { + get { + object obj = ResourceManager.GetObject("系统设置", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 维修 { + get { + object obj = ResourceManager.GetObject("维修", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 设备报警 { + get { + object obj = ResourceManager.GetObject("设备报警", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 设置 { + get { + object obj = ResourceManager.GetObject("设置", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 运行 { + get { + object obj = ResourceManager.GetObject("运行", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 运行中 { + get { + object obj = ResourceManager.GetObject("运行中", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/JY.Inspection/Properties/Resources.resx b/JY.Inspection/Properties/Resources.resx new file mode 100644 index 0000000..ce6090d --- /dev/null +++ b/JY.Inspection/Properties/Resources.resx @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\导入数据_操作_jurassic.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\设备报警.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\模块.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\用户.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\主页.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\数据查询.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\错误提示图标32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\系统设置.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\停止.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\白色勾48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\设置.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\图表.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\三角感叹号32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\关于.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\系统构建.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\白色X32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\用户管理.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\清空 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\存储设备.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\报警记录.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\切换.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\维修.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\查询.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\云上传.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\logo1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\inlogo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\运行.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\白色感叹号32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\串口.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\数据导入.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\登录.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\运行中.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resouces\切换1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\yiweidongli.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/JY.Inspection/Properties/Settings.Designer.cs b/JY.Inspection/Properties/Settings.Designer.cs new file mode 100644 index 0000000..4db6059 --- /dev/null +++ b/JY.Inspection/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace JY.Inspection.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.11.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; + } + } + } +} diff --git a/JY.Inspection/Properties/Settings.settings b/JY.Inspection/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/JY.Inspection/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/JY.Inspection/Resouces/LFLog.png b/JY.Inspection/Resouces/LFLog.png new file mode 100644 index 0000000..c951c47 Binary files /dev/null and b/JY.Inspection/Resouces/LFLog.png differ diff --git a/JY.Inspection/Resouces/logo1.png b/JY.Inspection/Resouces/logo1.png new file mode 100644 index 0000000..f629b62 Binary files /dev/null and b/JY.Inspection/Resouces/logo1.png differ diff --git a/JY.Inspection/Resouces/save.png b/JY.Inspection/Resouces/save.png new file mode 100644 index 0000000..a2e1a88 Binary files /dev/null and b/JY.Inspection/Resouces/save.png differ diff --git a/JY.Inspection/Resouces/串口.png b/JY.Inspection/Resouces/串口.png new file mode 100644 index 0000000..9f4b814 Binary files /dev/null and b/JY.Inspection/Resouces/串口.png differ diff --git a/JY.Inspection/Resouces/主页.png b/JY.Inspection/Resouces/主页.png new file mode 100644 index 0000000..02dfb32 Binary files /dev/null and b/JY.Inspection/Resouces/主页.png differ diff --git a/JY.Inspection/Resouces/云上传.png b/JY.Inspection/Resouces/云上传.png new file mode 100644 index 0000000..87a179b Binary files /dev/null and b/JY.Inspection/Resouces/云上传.png differ diff --git a/JY.Inspection/Resouces/停止.png b/JY.Inspection/Resouces/停止.png new file mode 100644 index 0000000..024bf52 Binary files /dev/null and b/JY.Inspection/Resouces/停止.png differ diff --git a/JY.Inspection/Resouces/关于.png b/JY.Inspection/Resouces/关于.png new file mode 100644 index 0000000..7ab0c10 Binary files /dev/null and b/JY.Inspection/Resouces/关于.png differ diff --git a/JY.Inspection/Resouces/切换.png b/JY.Inspection/Resouces/切换.png new file mode 100644 index 0000000..3148fbe Binary files /dev/null and b/JY.Inspection/Resouces/切换.png differ diff --git a/JY.Inspection/Resouces/切换1.png b/JY.Inspection/Resouces/切换1.png new file mode 100644 index 0000000..2a4b2e3 Binary files /dev/null and b/JY.Inspection/Resouces/切换1.png differ diff --git a/JY.Inspection/Resouces/图表.png b/JY.Inspection/Resouces/图表.png new file mode 100644 index 0000000..70bea5a Binary files /dev/null and b/JY.Inspection/Resouces/图表.png differ diff --git a/JY.Inspection/Resouces/存储设备.png b/JY.Inspection/Resouces/存储设备.png new file mode 100644 index 0000000..41fd3c5 Binary files /dev/null and b/JY.Inspection/Resouces/存储设备.png differ diff --git a/JY.Inspection/Resouces/数据查询.png b/JY.Inspection/Resouces/数据查询.png new file mode 100644 index 0000000..712e712 Binary files /dev/null and b/JY.Inspection/Resouces/数据查询.png differ diff --git a/JY.Inspection/Resouces/查询.png b/JY.Inspection/Resouces/查询.png new file mode 100644 index 0000000..2a5d785 Binary files /dev/null and b/JY.Inspection/Resouces/查询.png differ diff --git a/JY.Inspection/Resouces/模块.png b/JY.Inspection/Resouces/模块.png new file mode 100644 index 0000000..edd5912 Binary files /dev/null and b/JY.Inspection/Resouces/模块.png differ diff --git a/JY.Inspection/Resouces/清空 (1).png b/JY.Inspection/Resouces/清空 (1).png new file mode 100644 index 0000000..e597f9b Binary files /dev/null and b/JY.Inspection/Resouces/清空 (1).png differ diff --git a/JY.Inspection/Resouces/用户.png b/JY.Inspection/Resouces/用户.png new file mode 100644 index 0000000..491c8c8 Binary files /dev/null and b/JY.Inspection/Resouces/用户.png differ diff --git a/JY.Inspection/Resouces/用户管理.png b/JY.Inspection/Resouces/用户管理.png new file mode 100644 index 0000000..2c1caca Binary files /dev/null and b/JY.Inspection/Resouces/用户管理.png differ diff --git a/JY.Inspection/Resouces/登录.png b/JY.Inspection/Resouces/登录.png new file mode 100644 index 0000000..62bcd2f Binary files /dev/null and b/JY.Inspection/Resouces/登录.png differ diff --git a/JY.Inspection/Resouces/系统构建.png b/JY.Inspection/Resouces/系统构建.png new file mode 100644 index 0000000..8e125fa Binary files /dev/null and b/JY.Inspection/Resouces/系统构建.png differ diff --git a/JY.Inspection/Resouces/系统设置.png b/JY.Inspection/Resouces/系统设置.png new file mode 100644 index 0000000..77fd481 Binary files /dev/null and b/JY.Inspection/Resouces/系统设置.png differ diff --git a/JY.Inspection/Resouces/维修.png b/JY.Inspection/Resouces/维修.png new file mode 100644 index 0000000..90b8a34 Binary files /dev/null and b/JY.Inspection/Resouces/维修.png differ diff --git a/JY.Inspection/Resouces/设置.png b/JY.Inspection/Resouces/设置.png new file mode 100644 index 0000000..e6bd915 Binary files /dev/null and b/JY.Inspection/Resouces/设置.png differ diff --git a/JY.Inspection/Resouces/运行.png b/JY.Inspection/Resouces/运行.png new file mode 100644 index 0000000..ffe1df6 Binary files /dev/null and b/JY.Inspection/Resouces/运行.png differ diff --git a/JY.Inspection/Resouces/运行中.png b/JY.Inspection/Resouces/运行中.png new file mode 100644 index 0000000..84b49fa Binary files /dev/null and b/JY.Inspection/Resouces/运行中.png differ diff --git a/JY.Inspection/Resources/inlogo.png b/JY.Inspection/Resources/inlogo.png new file mode 100644 index 0000000..3d1dfcb Binary files /dev/null and b/JY.Inspection/Resources/inlogo.png differ diff --git a/JY.Inspection/Resources/yiweidongli.png b/JY.Inspection/Resources/yiweidongli.png new file mode 100644 index 0000000..25cfbea Binary files /dev/null and b/JY.Inspection/Resources/yiweidongli.png differ diff --git a/JY.Inspection/Resources/三角感叹号32.png b/JY.Inspection/Resources/三角感叹号32.png new file mode 100644 index 0000000..8803384 Binary files /dev/null and b/JY.Inspection/Resources/三角感叹号32.png differ diff --git a/JY.Inspection/Resources/导入数据_操作_jurassic.png b/JY.Inspection/Resources/导入数据_操作_jurassic.png new file mode 100644 index 0000000..5a5a40b Binary files /dev/null and b/JY.Inspection/Resources/导入数据_操作_jurassic.png differ diff --git a/JY.Inspection/Resources/报警记录.png b/JY.Inspection/Resources/报警记录.png new file mode 100644 index 0000000..819814a Binary files /dev/null and b/JY.Inspection/Resources/报警记录.png differ diff --git a/JY.Inspection/Resources/数据导入.png b/JY.Inspection/Resources/数据导入.png new file mode 100644 index 0000000..7e72335 Binary files /dev/null and b/JY.Inspection/Resources/数据导入.png differ diff --git a/JY.Inspection/Resources/白色X32.png b/JY.Inspection/Resources/白色X32.png new file mode 100644 index 0000000..45ee56d Binary files /dev/null and b/JY.Inspection/Resources/白色X32.png differ diff --git a/JY.Inspection/Resources/白色勾48.png b/JY.Inspection/Resources/白色勾48.png new file mode 100644 index 0000000..dbca3f3 Binary files /dev/null and b/JY.Inspection/Resources/白色勾48.png differ diff --git a/JY.Inspection/Resources/白色感叹号32.png b/JY.Inspection/Resources/白色感叹号32.png new file mode 100644 index 0000000..f3b9ed8 Binary files /dev/null and b/JY.Inspection/Resources/白色感叹号32.png differ diff --git a/JY.Inspection/Resources/设备报警.png b/JY.Inspection/Resources/设备报警.png new file mode 100644 index 0000000..a44292c Binary files /dev/null and b/JY.Inspection/Resources/设备报警.png differ diff --git a/JY.Inspection/Resources/错误提示图标32.png b/JY.Inspection/Resources/错误提示图标32.png new file mode 100644 index 0000000..b67ab19 Binary files /dev/null and b/JY.Inspection/Resources/错误提示图标32.png differ diff --git a/JY.Inspection/ViewModel/FrmMesSettingVM.cs b/JY.Inspection/ViewModel/FrmMesSettingVM.cs new file mode 100644 index 0000000..3129022 --- /dev/null +++ b/JY.Inspection/ViewModel/FrmMesSettingVM.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.ComponentModel; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Inspection.ViewModel +{ + public class ObservableObject : INotifyPropertyChanged + { + public event PropertyChangedEventHandler PropertyChanged; + + protected void OnPropertyChanged([CallerMemberName] string propertyName = null) + { + if (PropertyChanged != null) + { + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + public class FrmMesSettingVM : ObservableObject + { + private string stationArrivalUrl; + + /// + /// Mes电池进站接口地址 + /// + public string StationArrivalUrl + { + get { return stationArrivalUrl; } + set { stationArrivalUrl = value; OnPropertyChanged(); } + } + + private string stationExitUrl; + + /// + /// Mes电池出站接口地址 + /// + public string StationExitUrl + { + get { return stationExitUrl; } + set { stationExitUrl = value; OnPropertyChanged(); } + } + + private string productType; + + /// + /// 产品型号 + /// + public string ProductType + { + get { return productType; } + set { productType = value; OnPropertyChanged(); } + } + } +} diff --git a/JY.Inspection/appini.manifest b/JY.Inspection/appini.manifest new file mode 100644 index 0000000..60a45a2 --- /dev/null +++ b/JY.Inspection/appini.manifest @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JY.Inspection/log4net.xml b/JY.Inspection/log4net.xml new file mode 100644 index 0000000..ac8ed2c --- /dev/null +++ b/JY.Inspection/log4net.xml @@ -0,0 +1,32444 @@ + + + + log4net + + + + + Appender that logs to a database. + + + + appends logging events to a table within a + database. The appender can be configured to specify the connection + string by setting the property. + The connection type (provider) can be specified by setting the + property. For more information on database connection strings for + your specific database see http://www.connectionstrings.com/. + + + Records are written into the database either using a prepared + statement or a stored procedure. The property + is set to (System.Data.CommandType.Text) to specify a prepared statement + or to (System.Data.CommandType.StoredProcedure) to specify a stored + procedure. + + + The prepared statement text or the name of the stored procedure + must be set in the property. + + + The prepared statement or stored procedure can take a number + of parameters. Parameters are added using the + method. This adds a single to the + ordered list of parameters. The + type may be subclassed if required to provide database specific + functionality. The specifies + the parameter name, database type, size, and how the value should + be generated using a . + + + + An example of a SQL Server table that could be logged to: + + CREATE TABLE [dbo].[Log] ( + [ID] [int] IDENTITY (1, 1) NOT NULL , + [Date] [datetime] NOT NULL , + [Thread] [varchar] (255) NOT NULL , + [Level] [varchar] (20) NOT NULL , + [Logger] [varchar] (255) NOT NULL , + [Message] [varchar] (4000) NOT NULL + ) ON [PRIMARY] + + + + An example configuration to log to the above table: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Julian Biddle + Nicko Cadell + Gert Driesen + Lance Nehring + + + + Initializes a new instance of the class. + + + Public default constructor to initialize a new instance of this class. + + + + + Gets or sets the database connection string that is used to connect to + the database. + + + The database connection string used to connect to the database. + + + + The connections string is specific to the connection type. + See for more information. + + + Connection string for MS Access via ODBC: + "DSN=MS Access Database;UID=admin;PWD=;SystemDB=C:\data\System.mdw;SafeTransactions = 0;FIL=MS Access;DriverID = 25;DBQ=C:\data\train33.mdb" + + Another connection string for MS Access via ODBC: + "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Work\cvs_root\log4net-1.2\access.mdb;UID=;PWD=;" + + Connection string for MS Access via OLE DB: + "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Work\cvs_root\log4net-1.2\access.mdb;User Id=;Password=;" + + + + + The appSettings key from App.Config that contains the connection string. + + + + + The connectionStrings key from App.Config that contains the connection string. + + + This property requires at least .NET 2.0. + + + + + Gets or sets the type name of the connection + that should be created. + + + The type name of the connection. + + + + The type name of the ADO.NET provider to use. + + + The default is to use the OLE DB provider. + + + Use the OLE DB Provider. This is the default value. + System.Data.OleDb.OleDbConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Use the MS SQL Server Provider. + System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Use the ODBC Provider. + Microsoft.Data.Odbc.OdbcConnection,Microsoft.Data.Odbc,version=1.0.3300.0,publicKeyToken=b77a5c561934e089,culture=neutral + This is an optional package that you can download from + http://msdn.microsoft.com/downloads + search for ODBC .NET Data Provider. + + Use the Oracle Provider. + System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + This is an optional package that you can download from + http://msdn.microsoft.com/downloads + search for .NET Managed Provider for Oracle. + + + + + Gets or sets the command text that is used to insert logging events + into the database. + + + The command text used to insert logging events into the database. + + + + Either the text of the prepared statement or the + name of the stored procedure to execute to write into + the database. + + + The property determines if + this text is a prepared statement or a stored procedure. + + + If this property is not set, the command text is retrieved by invoking + . + + + + + + Gets or sets the command type to execute. + + + The command type to execute. + + + + This value may be either (System.Data.CommandType.Text) to specify + that the is a prepared statement to execute, + or (System.Data.CommandType.StoredProcedure) to specify that the + property is the name of a stored procedure + to execute. + + + The default value is (System.Data.CommandType.Text). + + + + + + Should transactions be used to insert logging events in the database. + + + true if transactions should be used to insert logging events in + the database, otherwise false. The default value is true. + + + + Gets or sets a value that indicates whether transactions should be used + to insert logging events in the database. + + + When set a single transaction will be used to insert the buffered events + into the database. Otherwise each event will be inserted without using + an explicit transaction. + + + + + + Gets or sets the used to call the NetSend method. + + + The used to call the NetSend method. + + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + Should this appender try to reconnect to the database on error. + + + true if the appender should try to reconnect to the database after an + error has occurred, otherwise false. The default value is false, + i.e. not to try to reconnect. + + + + The default behaviour is for the appender not to try to reconnect to the + database if an error occurs. Subsequent logging events are discarded. + + + To force the appender to attempt to reconnect to the database set this + property to true. + + + When the appender attempts to connect to the database there may be a + delay of up to the connection timeout specified in the connection string. + This delay will block the calling application's thread. + Until the connection can be reestablished this potential delay may occur multiple times. + + + + + + Gets or sets the underlying . + + + The underlying . + + + creates a to insert + logging events into a database. Classes deriving from + can use this property to get or set this . Use the + underlying returned from if + you require access beyond that which provides. + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Override the parent method to close the database + + + + Closes the database command and database connection. + + + + + + Inserts the events into the database. + + The events to insert into the database. + + + Insert all the events specified in the + array into the database. + + + + + + Adds a parameter to the command. + + The parameter to add to the command. + + + Adds a parameter to the ordered list of command parameters. + + + + + + Writes the events to the database using the transaction specified. + + The transaction that the events will be executed under. + The array of events to insert into the database. + + + The transaction argument can be null if the appender has been + configured not to use transactions. See + property for more information. + + + + + + Formats the log message into database statement text. + + The event being logged. + + This method can be overridden by subclasses to provide + more control over the format of the database statement. + + + Text that can be passed to a . + + + + + Creates an instance used to connect to the database. + + + This method is called whenever a new IDbConnection is needed (i.e. when a reconnect is necessary). + + The of the object. + The connectionString output from the ResolveConnectionString method. + An instance with a valid connection string. + + + + Resolves the connection string from the ConnectionString, ConnectionStringName, or AppSettingsKey + property. + + + ConnectiongStringName is only supported on .NET 2.0 and higher. + + Additional information describing the connection string. + A connection string used to connect to the database. + + + + Retrieves the class type of the ADO.NET provider. + + + + Gets the Type of the ADO.NET provider to use to connect to the + database. This method resolves the type specified in the + property. + + + Subclasses can override this method to return a different type + if necessary. + + + The of the ADO.NET provider + + + + Connects to the database. + + + + + Cleanup the existing connection. + + + Calls the IDbConnection's method. + + + + + The list of objects. + + + + The list of objects. + + + + + + The security context to use for privileged calls + + + + + The that will be used + to insert logging events into a database. + + + + + Database connection string. + + + + + The appSettings key from App.Config that contains the connection string. + + + + + The connectionStrings key from App.Config that contains the connection string. + + + + + String type name of the type name. + + + + + The text of the command. + + + + + The command type. + + + + + Indicates whether to use transactions when writing to the database. + + + + + Indicates whether to reconnect when a connection is lost. + + + + + The fully qualified type of the AdoNetAppender class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Parameter type used by the . + + + + This class provides the basic database parameter properties + as defined by the interface. + + This type can be subclassed to provide database specific + functionality. The two methods that are called externally are + and . + + + + + + Initializes a new instance of the class. + + + Default constructor for the AdoNetAppenderParameter class. + + + + + Gets or sets the name of this parameter. + + + The name of this parameter. + + + + The name of this parameter. The parameter name + must match up to a named parameter to the SQL stored procedure + or prepared statement. + + + + + + Gets or sets the database type for this parameter. + + + The database type for this parameter. + + + + The database type for this parameter. This property should + be set to the database type from the + enumeration. See . + + + This property is optional. If not specified the ADO.NET provider + will attempt to infer the type from the value. + + + + + + + Gets or sets the precision for this parameter. + + + The precision for this parameter. + + + + The maximum number of digits used to represent the Value. + + + This property is optional. If not specified the ADO.NET provider + will attempt to infer the precision from the value. + + + + + + + Gets or sets the scale for this parameter. + + + The scale for this parameter. + + + + The number of decimal places to which Value is resolved. + + + This property is optional. If not specified the ADO.NET provider + will attempt to infer the scale from the value. + + + + + + + Gets or sets the size for this parameter. + + + The size for this parameter. + + + + The maximum size, in bytes, of the data within the column. + + + This property is optional. If not specified the ADO.NET provider + will attempt to infer the size from the value. + + + For BLOB data types like VARCHAR(max) it may be impossible to infer the value automatically, use -1 as the size in this case. + + + + + + + Gets or sets the to use to + render the logging event into an object for this + parameter. + + + The used to render the + logging event into an object for this parameter. + + + + The that renders the value for this + parameter. + + + The can be used to adapt + any into a + for use in the property. + + + + + + Prepare the specified database command object. + + The command to prepare. + + + Prepares the database command object by adding + this parameter to its collection of parameters. + + + + + + Renders the logging event and set the parameter value in the command. + + The command containing the parameter. + The event to be rendered. + + + Renders the logging event using this parameters layout + object. Sets the value of the parameter on the command object. + + + + + + The name of this parameter. + + + + + The database type for this parameter. + + + + + Flag to infer type rather than use the DbType + + + + + The precision for this parameter. + + + + + The scale for this parameter. + + + + + The size for this parameter. + + + + + The to use to render the + logging event into an object for this parameter. + + + + + Appends logging events to the terminal using ANSI color escape sequences. + + + + AnsiColorTerminalAppender appends log events to the standard output stream + or the error output stream using a layout specified by the + user. It also allows the color of a specific level of message to be set. + + + This appender expects the terminal to understand the VT100 control set + in order to interpret the color codes. If the terminal or console does not + understand the control codes the behavior is not defined. + + + By default, all output is written to the console's standard output stream. + The property can be set to direct the output to the + error stream. + + + NOTE: This appender writes each message to the System.Console.Out or + System.Console.Error that is set at the time the event is appended. + Therefore it is possible to programmatically redirect the output of this appender + (for example NUnit does this to capture program output). While this is the desired + behavior of this appender it may have security implications in your application. + + + When configuring the ANSI colored terminal appender, a mapping should be + specified to map a logging level to a color. For example: + + + + + + + + + + + + + + + The Level is the standard log4net logging level and ForeColor and BackColor can be any + of the following values: + + Blue + Green + Red + White + Yellow + Purple + Cyan + + These color values cannot be combined together to make new colors. + + + The attributes can be any combination of the following: + + Brightforeground is brighter + Dimforeground is dimmer + Underscoremessage is underlined + Blinkforeground is blinking (does not work on all terminals) + Reverseforeground and background are reversed + Hiddenoutput is hidden + Strikethroughmessage has a line through it + + While any of these attributes may be combined together not all combinations + work well together, for example setting both Bright and Dim attributes makes + no sense. + + + Patrick Wagstrom + Nicko Cadell + + + + The enum of possible display attributes + + + + The following flags can be combined together to + form the ANSI color attributes. + + + + + + + text is bright + + + + + text is dim + + + + + text is underlined + + + + + text is blinking + + + Not all terminals support this attribute + + + + + text and background colors are reversed + + + + + text is hidden + + + + + text is displayed with a strikethrough + + + + + text color is light + + + + + The enum of possible foreground or background color values for + use with the color mapping method + + + + The output can be in one for the following ANSI colors. + + + + + + + color is black + + + + + color is red + + + + + color is green + + + + + color is yellow + + + + + color is blue + + + + + color is magenta + + + + + color is cyan + + + + + color is white + + + + + Initializes a new instance of the class. + + + The instance of the class is set up to write + to the standard output stream. + + + + + Target is the value of the console output stream. + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + + + Add a mapping of level to color + + The mapping to add + + + Add a mapping to this appender. + Each mapping defines the foreground and background colours + for a level. + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to the console. + + + The format of the output will depend on the appender's layout. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Initialize the options for this appender + + + + Initialize the level to color mappings set on this appender. + + + + + + The to use when writing to the Console + standard output stream. + + + + The to use when writing to the Console + standard output stream. + + + + + + The to use when writing to the Console + standard error output stream. + + + + The to use when writing to the Console + standard error output stream. + + + + + + Flag to write output to the error stream rather than the standard output stream + + + + + Mapping from level object to color value + + + + + Ansi code to reset terminal + + + + + A class to act as a mapping between the level that a logging call is made at and + the color it should be displayed as. + + + + Defines the mapping between a level and the color it should be displayed in. + + + + + + The mapped foreground color for the specified level + + + + Required property. + The mapped foreground color for the specified level + + + + + + The mapped background color for the specified level + + + + Required property. + The mapped background color for the specified level + + + + + + The color attributes for the specified level + + + + Required property. + The color attributes for the specified level + + + + + + Initialize the options for the object + + + + Combine the and together + and append the attributes. + + + + + + The combined , and + suitable for setting the ansi terminal color. + + + + + A strongly-typed collection of objects. + + Nicko Cadell + + + + Supports type-safe iteration over a . + + + + + + Gets the current element in the collection. + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Creates a read-only wrapper for a AppenderCollection instance. + + list to create a readonly wrapper arround + + An AppenderCollection wrapper that is read-only. + + + + + An empty readonly static AppenderCollection + + + + + Initializes a new instance of the AppenderCollection class + that is empty and has the default initial capacity. + + + + + Initializes a new instance of the AppenderCollection class + that has the specified initial capacity. + + + The number of elements that the new AppenderCollection is initially capable of storing. + + + + + Initializes a new instance of the AppenderCollection class + that contains elements copied from the specified AppenderCollection. + + The AppenderCollection whose elements are copied to the new collection. + + + + Initializes a new instance of the AppenderCollection class + that contains elements copied from the specified array. + + The array whose elements are copied to the new list. + + + + Initializes a new instance of the AppenderCollection class + that contains elements copied from the specified collection. + + The collection whose elements are copied to the new list. + + + + Type visible only to our subclasses + Used to access protected constructor + + + + + + A value + + + + + Allow subclasses to avoid our default constructors + + + + + + + Gets the number of elements actually contained in the AppenderCollection. + + + + + Copies the entire AppenderCollection to a one-dimensional + array. + + The one-dimensional array to copy to. + + + + Copies the entire AppenderCollection to a one-dimensional + array, starting at the specified index of the target array. + + The one-dimensional array to copy to. + The zero-based index in at which copying begins. + + + + Gets a value indicating whether access to the collection is synchronized (thread-safe). + + false, because the backing type is an array, which is never thread-safe. + + + + Gets an object that can be used to synchronize access to the collection. + + + + + Gets or sets the at the specified index. + + The zero-based index of the element to get or set. + + is less than zero + -or- + is equal to or greater than . + + + + + Adds a to the end of the AppenderCollection. + + The to be added to the end of the AppenderCollection. + The index at which the value has been added. + + + + Removes all elements from the AppenderCollection. + + + + + Creates a shallow copy of the . + + A new with a shallow copy of the collection data. + + + + Determines whether a given is in the AppenderCollection. + + The to check for. + true if is found in the AppenderCollection; otherwise, false. + + + + Returns the zero-based index of the first occurrence of a + in the AppenderCollection. + + The to locate in the AppenderCollection. + + The zero-based index of the first occurrence of + in the entire AppenderCollection, if found; otherwise, -1. + + + + + Inserts an element into the AppenderCollection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + is less than zero + -or- + is equal to or greater than . + + + + + Removes the first occurrence of a specific from the AppenderCollection. + + The to remove from the AppenderCollection. + + The specified was not found in the AppenderCollection. + + + + + Removes the element at the specified index of the AppenderCollection. + + The zero-based index of the element to remove. + + is less than zero + -or- + is equal to or greater than . + + + + + Gets a value indicating whether the collection has a fixed size. + + true if the collection has a fixed size; otherwise, false. The default is false + + + + Gets a value indicating whether the IList is read-only. + + true if the collection is read-only; otherwise, false. The default is false + + + + Returns an enumerator that can iterate through the AppenderCollection. + + An for the entire AppenderCollection. + + + + Gets or sets the number of elements the AppenderCollection can contain. + + + + + Adds the elements of another AppenderCollection to the current AppenderCollection. + + The AppenderCollection whose elements should be added to the end of the current AppenderCollection. + The new of the AppenderCollection. + + + + Adds the elements of a array to the current AppenderCollection. + + The array whose elements should be added to the end of the AppenderCollection. + The new of the AppenderCollection. + + + + Adds the elements of a collection to the current AppenderCollection. + + The collection whose elements should be added to the end of the AppenderCollection. + The new of the AppenderCollection. + + + + Sets the capacity to the actual number of elements. + + + + + Return the collection elements as an array + + the array + + + + is less than zero + -or- + is equal to or greater than . + + + + + is less than zero + -or- + is equal to or greater than . + + + + + Supports simple iteration over a . + + + + + + Initializes a new instance of the Enumerator class. + + + + + + Gets the current element in the collection. + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + + + + Abstract base class implementation of . + + + + This class provides the code for common functionality, such + as support for threshold filtering and support for general filters. + + + Appenders can also implement the interface. Therefore + they would require that the method + be called after the appenders properties have been configured. + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + Empty default constructor + + + + + Finalizes this appender by calling the implementation's + method. + + + + If this appender has not been closed then the Finalize method + will call . + + + + + + Gets or sets the threshold of this appender. + + + The threshold of the appender. + + + + All log events with lower level than the threshold level are ignored + by the appender. + + + In configuration files this option is specified by setting the + value of the option to a level + string, such as "DEBUG", "INFO" and so on. + + + + + + Gets or sets the for this appender. + + The of the appender + + + The provides a default + implementation for the property. + + + + + + The filter chain. + + The head of the filter chain filter chain. + + + Returns the head Filter. The Filters are organized in a linked list + and so all Filters on this Appender are available through the result. + + + + + + Gets or sets the for this appender. + + The layout of the appender. + + + See for more information. + + + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Gets or sets the name of this appender. + + The name of the appender. + + + The name uniquely identifies the appender. + + + + + + Closes the appender and release resources. + + + + Release any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + This method cannot be overridden by subclasses. This method + delegates the closing of the appender to the + method which must be overridden in the subclass. + + + + + + Performs threshold checks and invokes filters before + delegating actual logging to the subclasses specific + method. + + The event to log. + + + This method cannot be overridden by derived classes. A + derived class should override the method + which is called by this method. + + + The implementation of this method is as follows: + + + + + + Checks that the severity of the + is greater than or equal to the of this + appender. + + + + Checks that the chain accepts the + . + + + + + Calls and checks that + it returns true. + + + + + If all of the above steps succeed then the + will be passed to the abstract method. + + + + + + Performs threshold checks and invokes filters before + delegating actual logging to the subclasses specific + method. + + The array of events to log. + + + This method cannot be overridden by derived classes. A + derived class should override the method + which is called by this method. + + + The implementation of this method is as follows: + + + + + + Checks that the severity of the + is greater than or equal to the of this + appender. + + + + Checks that the chain accepts the + . + + + + + Calls and checks that + it returns true. + + + + + If all of the above steps succeed then the + will be passed to the method. + + + + + + Test if the logging event should we output by this appender + + the event to test + true if the event should be output, false if the event should be ignored + + + This method checks the logging event against the threshold level set + on this appender and also against the filters specified on this + appender. + + + The implementation of this method is as follows: + + + + + + Checks that the severity of the + is greater than or equal to the of this + appender. + + + + Checks that the chain accepts the + . + + + + + + + + + Adds a filter to the end of the filter chain. + + the filter to add to this appender + + + The Filters are organized in a linked list. + + + Setting this property causes the new filter to be pushed onto the + back of the filter chain. + + + + + + Clears the filter list for this appender. + + + + Clears the filter list for this appender. + + + + + + Checks if the message level is below this appender's threshold. + + to test against. + + + If there is no threshold set, then the return value is always true. + + + + true if the meets the + requirements of this appender. + + + + + Is called when the appender is closed. Derived classes should override + this method if resources need to be released. + + + + Releases any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + + + + Subclasses of should implement this method + to perform actual logging. + + The event to append. + + + A subclass must implement this method to perform + logging of the . + + This method will be called by + if all the conditions listed for that method are met. + + + To restrict the logging of events in the appender + override the method. + + + + + + Append a bulk array of logging events. + + the array of logging events + + + This base class implementation calls the + method for each element in the bulk array. + + + A sub class that can better process a bulk array of events should + override this method in addition to . + + + + + + Called before as a precondition. + + + + This method is called by + before the call to the abstract method. + + + This method can be overridden in a subclass to extend the checks + made before the event is passed to the method. + + + A subclass should ensure that they delegate this call to + this base class if it is overridden. + + + true if the call to should proceed. + + + + Renders the to a string. + + The event to render. + The event rendered as a string. + + + Helper method to render a to + a string. This appender must have a + set to render the to + a string. + + If there is exception data in the logging event and + the layout does not process the exception, this method + will append the exception text to the rendered string. + + + Where possible use the alternative version of this method + . + That method streams the rendering onto an existing Writer + which can give better performance if the caller already has + a open and ready for writing. + + + + + + Renders the to a string. + + The event to render. + The TextWriter to write the formatted event to + + + Helper method to render a to + a string. This appender must have a + set to render the to + a string. + + If there is exception data in the logging event and + the layout does not process the exception, this method + will append the exception text to the rendered string. + + + Use this method in preference to + where possible. If, however, the caller needs to render the event + to a string then does + provide an efficient mechanism for doing so. + + + + + + Tests if this appender requires a to be set. + + + + In the rather exceptional case, where the appender + implementation admits a layout but can also work without it, + then the appender should return true. + + + This default implementation always returns false. + + + + true if the appender requires a layout object, otherwise false. + + + + + Flushes any buffered log data. + + + This implementation doesn't flush anything and always returns true + + True if all logging events were flushed successfully, else false. + + + + The layout of this appender. + + + See for more information. + + + + + The name of this appender. + + + See for more information. + + + + + The level threshold of this appender. + + + + There is no level threshold filtering by default. + + + See for more information. + + + + + + It is assumed and enforced that errorHandler is never null. + + + + It is assumed and enforced that errorHandler is never null. + + + See for more information. + + + + + + The first filter in the filter chain. + + + + Set to null initially. + + + See for more information. + + + + + + The last filter in the filter chain. + + + See for more information. + + + + + Flag indicating if this appender is closed. + + + See for more information. + + + + + The guard prevents an appender from repeatedly calling its own DoAppend method + + + + + StringWriter used to render events + + + + + Initial buffer size + + + + + Maximum buffer size before it is recycled + + + + + The fully qualified type of the AppenderSkeleton class. + + + Used by the internal logger to record the Type of the + log message. + + + + + + Appends log events to the ASP.NET system. + + + + + Diagnostic information and tracing messages that you specify are appended to the output + of the page that is sent to the requesting browser. Optionally, you can view this information + from a separate trace viewer (Trace.axd) that displays trace information for every page in a + given application. + + + Trace statements are processed and displayed only when tracing is enabled. You can control + whether tracing is displayed to a page, to the trace viewer, or both. + + + The logging event is passed to the or + method depending on the level of the logging event. + The event's logger name is the default value for the category parameter of the Write/Warn method. + + + Nicko Cadell + Gert Driesen + Ron Grabowski + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Write the logging event to the ASP.NET trace + + the event to log + + + Write the logging event to the ASP.NET trace + HttpContext.Current.Trace + (). + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + The category parameter sent to the Trace method. + + + + Defaults to %logger which will use the logger name of the current + as the category parameter. + + + + + + + + Defaults to %logger + + + + + Abstract base class implementation of that + buffers events in a fixed size buffer. + + + + This base class should be used by appenders that need to buffer a + number of events before logging them. + For example the + buffers events and then submits the entire contents of the buffer to + the underlying database in one go. + + + Subclasses should override the + method to deliver the buffered events. + + The BufferingAppenderSkeleton maintains a fixed size cyclic + buffer of events. The size of the buffer is set using + the property. + + A is used to inspect + each event as it arrives in the appender. If the + triggers, then the current buffer is sent immediately + (see ). Otherwise the event + is stored in the buffer. For example, an evaluator can be used to + deliver the events immediately when an ERROR event arrives. + + + The buffering appender can be configured in a mode. + By default the appender is NOT lossy. When the buffer is full all + the buffered events are sent with . + If the property is set to true then the + buffer will not be sent when it is full, and new events arriving + in the appender will overwrite the oldest event in the buffer. + In lossy mode the buffer will only be sent when the + triggers. This can be useful behavior when you need to know about + ERROR events but not about events with a lower level, configure an + evaluator that will trigger when an ERROR event arrives, the whole + buffer will be sent which gives a history of events leading up to + the ERROR event. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Protected default constructor to allow subclassing. + + + + + + Initializes a new instance of the class. + + the events passed through this appender must be + fixed by the time that they arrive in the derived class' SendBuffer method. + + + Protected constructor to allow subclassing. + + + The should be set if the subclass + expects the events delivered to be fixed even if the + is set to zero, i.e. when no buffering occurs. + + + + + + Gets or sets a value that indicates whether the appender is lossy. + + + true if the appender is lossy, otherwise false. The default is false. + + + + This appender uses a buffer to store logging events before + delivering them. A triggering event causes the whole buffer + to be send to the remote sink. If the buffer overruns before + a triggering event then logging events could be lost. Set + to false to prevent logging events + from being lost. + + If is set to true then an + must be specified. + + + + + Gets or sets the size of the cyclic buffer used to hold the + logging events. + + + The size of the cyclic buffer used to hold the logging events. + + + + The option takes a positive integer + representing the maximum number of logging events to collect in + a cyclic buffer. When the is reached, + oldest events are deleted as new events are added to the + buffer. By default the size of the cyclic buffer is 512 events. + + + If the is set to a value less than + or equal to 1 then no buffering will occur. The logging event + will be delivered synchronously (depending on the + and properties). Otherwise the event will + be buffered. + + + + + + Gets or sets the that causes the + buffer to be sent immediately. + + + The that causes the buffer to be + sent immediately. + + + + The evaluator will be called for each event that is appended to this + appender. If the evaluator triggers then the current buffer will + immediately be sent (see ). + + If is set to true then an + must be specified. + + + + + Gets or sets the value of the to use. + + + The value of the to use. + + + + The evaluator will be called for each event that is discarded from this + appender. If the evaluator triggers then the current buffer will immediately + be sent (see ). + + + + + + Gets or sets a value indicating if only part of the logging event data + should be fixed. + + + true if the appender should only fix part of the logging event + data, otherwise false. The default is false. + + + + Setting this property to true will cause only part of the + event data to be fixed and serialized. This will improve performance. + + + See for more information. + + + + + + Gets or sets a the fields that will be fixed in the event + + + The event fields that will be fixed before the event is buffered + + + + The logging event needs to have certain thread specific values + captured before it can be buffered. See + for details. + + + + + + + Flushes any buffered log data. + + The maximum time to wait for logging events to be flushed. + True if all logging events were flushed successfully, else false. + + + + Flush the currently buffered events + + + + Flushes any events that have been buffered. + + + If the appender is buffering in mode then the contents + of the buffer will NOT be flushed to the appender. + + + + + + Flush the currently buffered events + + set to true to flush the buffer of lossy events + + + Flushes events that have been buffered. If is + false then events will only be flushed if this buffer is non-lossy mode. + + + If the appender is buffering in mode then the contents + of the buffer will only be flushed if is true. + In this case the contents of the buffer will be tested against the + and if triggering will be output. All other buffered + events will be discarded. + + + If is true then the buffer will always + be emptied by calling this method. + + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Close this appender instance. + + + + Close this appender instance. If this appender is marked + as not then the remaining events in + the buffer must be sent when the appender is closed. + + + + + + This method is called by the method. + + the event to log + + + Stores the in the cyclic buffer. + + + The buffer will be sent (i.e. passed to the + method) if one of the following conditions is met: + + + + The cyclic buffer is full and this appender is + marked as not lossy (see ) + + + An is set and + it is triggered for the + specified. + + + + Before the event is stored in the buffer it is fixed + (see ) to ensure that + any data referenced by the event will be valid when the buffer + is processed. + + + + + + Sends the contents of the buffer. + + The first logging event. + The buffer containing the events that need to be send. + + + The subclass must override . + + + + + + Sends the events. + + The events that need to be send. + + + The subclass must override this method to process the buffered events. + + + + + + The default buffer size. + + + The default size of the cyclic buffer used to store events. + This is set to 512 by default. + + + + + The size of the cyclic buffer used to hold the logging events. + + + Set to by default. + + + + + The cyclic buffer used to store the logging events. + + + + + The triggering event evaluator that causes the buffer to be sent immediately. + + + The object that is used to determine if an event causes the entire + buffer to be sent immediately. This field can be null, which + indicates that event triggering is not to be done. The evaluator + can be set using the property. If this appender + has the ( property) set to + true then an must be set. + + + + + Indicates if the appender should overwrite events in the cyclic buffer + when it becomes full, or if the buffer should be flushed when the + buffer is full. + + + If this field is set to true then an must + be set. + + + + + The triggering event evaluator filters discarded events. + + + The object that is used to determine if an event that is discarded should + really be discarded or if it should be sent to the appenders. + This field can be null, which indicates that all discarded events will + be discarded. + + + + + Value indicating which fields in the event should be fixed + + + By default all fields are fixed + + + + + The events delivered to the subclass must be fixed. + + + + + Buffers events and then forwards them to attached appenders. + + + + The events are buffered in this appender until conditions are + met to allow the appender to deliver the events to the attached + appenders. See for the + conditions that cause the buffer to be sent. + + The forwarding appender can be used to specify different + thresholds and filters for the same appender at different locations + within the hierarchy. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Closes the appender and releases resources. + + + + Releases any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + + + + Send the events. + + The events that need to be send. + + + Forwards the events to the attached appenders. + + + + + + Adds an to the list of appenders of this + instance. + + The to add to this appender. + + + If the specified is already in the list of + appenders, then it won't be added again. + + + + + + Gets the appenders contained in this appender as an + . + + + If no appenders can be found, then an + is returned. + + + A collection of the appenders in this appender. + + + + + Looks for the appender with the specified name. + + The name of the appender to lookup. + + The appender with the specified name, or null. + + + + Get the named appender attached to this buffering appender. + + + + + + Removes all previously added appenders from this appender. + + + + This is useful when re-reading configuration information. + + + + + + Removes the specified appender from the list of appenders. + + The appender to remove. + The appender removed from the list + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + Removes the appender with the specified name from the list of appenders. + + The name of the appender to remove. + The appender removed from the list + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + Implementation of the interface + + + + + Appends logging events to the console. + + + + ColoredConsoleAppender appends log events to the standard output stream + or the error output stream using a layout specified by the + user. It also allows the color of a specific type of message to be set. + + + By default, all output is written to the console's standard output stream. + The property can be set to direct the output to the + error stream. + + + NOTE: This appender writes directly to the application's attached console + not to the System.Console.Out or System.Console.Error TextWriter. + The System.Console.Out and System.Console.Error streams can be + programmatically redirected (for example NUnit does this to capture program output). + This appender will ignore these redirections because it needs to use Win32 + API calls to colorize the output. To respect these redirections the + must be used. + + + When configuring the colored console appender, mapping should be + specified to map a logging level to a color. For example: + + + + + + + + + + + + + + The Level is the standard log4net logging level and ForeColor and BackColor can be any + combination of the following values: + + Blue + Green + Red + White + Yellow + Purple + Cyan + HighIntensity + + + + Rick Hobbs + Nicko Cadell + + + + The enum of possible color values for use with the color mapping method + + + + The following flags can be combined together to + form the colors. + + + + + + + color is blue + + + + + color is green + + + + + color is red + + + + + color is white + + + + + color is yellow + + + + + color is purple + + + + + color is cyan + + + + + color is intensified + + + + + Initializes a new instance of the class. + + + The instance of the class is set up to write + to the standard output stream. + + + + + Initializes a new instance of the class + with the specified layout. + + the layout to use for this appender + + The instance of the class is set up to write + to the standard output stream. + + + + + Initializes a new instance of the class + with the specified layout. + + the layout to use for this appender + flag set to true to write to the console error stream + + When is set to true, output is written to + the standard error output stream. Otherwise, output is written to the standard + output stream. + + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + + + Add a mapping of level to color - done by the config file + + The mapping to add + + + Add a mapping to this appender. + Each mapping defines the foreground and background colors + for a level. + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to the console. + + + The format of the output will depend on the appender's layout. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Initialize the options for this appender + + + + Initialize the level to color mappings set on this appender. + + + + + + The to use when writing to the Console + standard output stream. + + + + The to use when writing to the Console + standard output stream. + + + + + + The to use when writing to the Console + standard error output stream. + + + + The to use when writing to the Console + standard error output stream. + + + + + + Flag to write output to the error stream rather than the standard output stream + + + + + Mapping from level object to color value + + + + + The console output stream writer to write to + + + + This writer is not thread safe. + + + + + + A class to act as a mapping between the level that a logging call is made at and + the color it should be displayed as. + + + + Defines the mapping between a level and the color it should be displayed in. + + + + + + The mapped foreground color for the specified level + + + + Required property. + The mapped foreground color for the specified level. + + + + + + The mapped background color for the specified level + + + + Required property. + The mapped background color for the specified level. + + + + + + Initialize the options for the object + + + + Combine the and together. + + + + + + The combined and suitable for + setting the console color. + + + + + Appends logging events to the console. + + + + ConsoleAppender appends log events to the standard output stream + or the error output stream using a layout specified by the + user. + + + By default, all output is written to the console's standard output stream. + The property can be set to direct the output to the + error stream. + + + NOTE: This appender writes each message to the System.Console.Out or + System.Console.Error that is set at the time the event is appended. + Therefore it is possible to programmatically redirect the output of this appender + (for example NUnit does this to capture program output). While this is the desired + behavior of this appender it may have security implications in your application. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + The instance of the class is set up to write + to the standard output stream. + + + + + Initializes a new instance of the class + with the specified layout. + + the layout to use for this appender + + The instance of the class is set up to write + to the standard output stream. + + + + + Initializes a new instance of the class + with the specified layout. + + the layout to use for this appender + flag set to true to write to the console error stream + + When is set to true, output is written to + the standard error output stream. Otherwise, output is written to the standard + output stream. + + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to the console. + + + The format of the output will depend on the appender's layout. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + The to use when writing to the Console + standard output stream. + + + + The to use when writing to the Console + standard output stream. + + + + + + The to use when writing to the Console + standard error output stream. + + + + The to use when writing to the Console + standard error output stream. + + + + + + Appends log events to the system. + + + + The application configuration file can be used to control what listeners + are actually used. See the MSDN documentation for the + class for details on configuring the + debug system. + + + Events are written using the + method. The event's logger name is passed as the value for the category name to the Write method. + + + Nicko Cadell + + + + Initializes a new instance of the . + + + + Default constructor. + + + + + + Initializes a new instance of the + with a specified layout. + + The layout to use with this appender. + + + Obsolete constructor. + + + + + + Gets or sets a value that indicates whether the appender will + flush at the end of each write. + + + The default behavior is to flush at the end of each + write. If the option is set tofalse, then the underlying + stream can defer writing to physical medium to a later time. + + + Avoiding the flush operation at the end of each append results + in a performance gain of 10 to 20 percent. However, there is safety + trade-off involved in skipping flushing. Indeed, when flushing is + skipped, then it is likely that the last few log events will not + be recorded on disk when the application exits. This is a high + price to pay even for a 20% performance gain. + + + + + + Formats the category parameter sent to the Debug method. + + + + Defaults to a with %logger as the pattern which will use the logger name of the current + as the category parameter. + + + + + + + + Flushes any buffered log data. + + The maximum time to wait for logging events to be flushed. + True if all logging events were flushed successfully, else false. + + + + Writes the logging event to the system. + + The event to log. + + + Writes the logging event to the system. + If is true then the + is called. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Immediate flush means that the underlying writer or output stream + will be flushed at the end of each append operation. + + + + Immediate flush is slower but ensures that each append request is + actually written. If is set to + false, then there is a good chance that the last few + logs events are not actually written to persistent media if and + when the application crashes. + + + The default value is true. + + + + + Defaults to a with %logger as the pattern. + + + + + Writes events to the system event log. + + + + The appender will fail if you try to write using an event source that doesn't exist unless it is running with local administrator privileges. + See also http://logging.apache.org/log4net/release/faq.html#trouble-EventLog + + + The EventID of the event log entry can be + set using the EventID property () + on the . + + + The Category of the event log entry can be + set using the Category property () + on the . + + + There is a limit of 32K characters for an event log message + + + When configuring the EventLogAppender a mapping can be + specified to map a logging level to an event log entry type. For example: + + + <mapping> + <level value="ERROR" /> + <eventLogEntryType value="Error" /> + </mapping> + <mapping> + <level value="DEBUG" /> + <eventLogEntryType value="Information" /> + </mapping> + + + The Level is the standard log4net logging level and eventLogEntryType can be any value + from the enum, i.e.: + + Erroran error event + Warninga warning event + Informationan informational event + + + + Aspi Havewala + Douglas de la Torre + Nicko Cadell + Gert Driesen + Thomas Voss + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Initializes a new instance of the class + with the specified . + + The to use with this appender. + + + Obsolete constructor. + + + + + + The name of the log where messages will be stored. + + + The string name of the log where messages will be stored. + + + This is the name of the log as it appears in the Event Viewer + tree. The default value is to log into the Application + log, this is where most applications write their events. However + if you need a separate log for your application (or applications) + then you should set the appropriately. + This should not be used to distinguish your event log messages + from those of other applications, the + property should be used to distinguish events. This property should be + used to group together events into a single log. + + + + + + Property used to set the Application name. This appears in the + event logs when logging. + + + The string used to distinguish events from different sources. + + + Sets the event log source property. + + + + + This property is used to return the name of the computer to use + when accessing the event logs. Currently, this is the current + computer, denoted by a dot "." + + + The string name of the machine holding the event log that + will be logged into. + + + This property cannot be changed. It is currently set to '.' + i.e. the local machine. This may be changed in future. + + + + + Add a mapping of level to - done by the config file + + The mapping to add + + + Add a mapping to this appender. + Each mapping defines the event log entry type for a level. + + + + + + Gets or sets the used to write to the EventLog. + + + The used to write to the EventLog. + + + + The system security context used to write to the EventLog. + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + Gets or sets the EventId to use unless one is explicitly specified via the LoggingEvent's properties. + + + + The EventID of the event log entry will normally be + set using the EventID property () + on the . + This property provides the fallback value which defaults to 0. + + + + + + Gets or sets the Category to use unless one is explicitly specified via the LoggingEvent's properties. + + + + The Category of the event log entry will normally be + set using the Category property () + on the . + This property provides the fallback value which defaults to 0. + + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Create an event log source + + + Uses different API calls under NET_2_0 + + + + + This method is called by the + method. + + the event to log + + Writes the event to the system event log using the + . + + If the event has an EventID property (see ) + set then this integer will be used as the event log event id. + + + There is a limit of 32K characters for an event log message + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Get the equivalent for a + + the Level to convert to an EventLogEntryType + The equivalent for a + + Because there are fewer applicable + values to use in logging levels than there are in the + this is a one way mapping. There is + a loss of information during the conversion. + + + + + The log name is the section in the event logs where the messages + are stored. + + + + + Name of the application to use when logging. This appears in the + application column of the event log named by . + + + + + The name of the machine which holds the event log. This is + currently only allowed to be '.' i.e. the current machine. + + + + + Mapping from level object to EventLogEntryType + + + + + The security context to use for privileged calls + + + + + The event ID to use unless one is explicitly specified via the LoggingEvent's properties. + + + + + The event category to use unless one is explicitly specified via the LoggingEvent's properties. + + + + + A class to act as a mapping between the level that a logging call is made at and + the color it should be displayed as. + + + + Defines the mapping between a level and its event log entry type. + + + + + + The for this entry + + + + Required property. + The for this entry + + + + + + The fully qualified type of the EventLogAppender class. + + + Used by the internal logger to record the Type of the + log message. + + + + + The maximum size supported by default. + + + http://msdn.microsoft.com/en-us/library/xzwc042w(v=vs.100).aspx + The 32766 documented max size is two bytes shy of 32K (I'm assuming 32766 + may leave space for a two byte null terminator of #0#0). The 32766 max + length is what the .NET 4.0 source code checks for, but this is WRONG! + Strings with a length > 31839 on Windows Vista or higher can CORRUPT + the event log! See: System.Diagnostics.EventLogInternal.InternalWriteEvent() + for the use of the 32766 max size. + + + + + The maximum size supported by a windows operating system that is vista + or newer. + + + See ReportEvent API: + http://msdn.microsoft.com/en-us/library/aa363679(VS.85).aspx + ReportEvent's lpStrings parameter: + "A pointer to a buffer containing an array of + null-terminated strings that are merged into the message before Event Viewer + displays the string to the user. This parameter must be a valid pointer + (or NULL), even if wNumStrings is zero. Each string is limited to 31,839 characters." + + Going beyond the size of 31839 will (at some point) corrupt the event log on Windows + Vista or higher! It may succeed for a while...but you will eventually run into the + error: "System.ComponentModel.Win32Exception : A device attached to the system is + not functioning", and the event log will then be corrupt (I was able to corrupt + an event log using a length of 31877 on Windows 7). + + The max size for Windows Vista or higher is documented here: + http://msdn.microsoft.com/en-us/library/xzwc042w(v=vs.100).aspx. + Going over this size may succeed a few times but the buffer will overrun and + eventually corrupt the log (based on testing). + + The maxEventMsgSize size is based on the max buffer size of the lpStrings parameter of the ReportEvent API. + The documented max size for EventLog.WriteEntry for Windows Vista and higher is 31839, but I'm leaving room for a + terminator of #0#0, as we cannot see the source of ReportEvent (though we could use an API monitor to examine the + buffer, given enough time). + + + + + The maximum size that the operating system supports for + a event log message. + + + Used to determine the maximum string length that can be written + to the operating system event log and eventually truncate a string + that exceeds the limits. + + + + + This method determines the maximum event log message size allowed for + the current environment. + + + + + + Appends logging events to a file. + + + + Logging events are sent to the file specified by + the property. + + + The file can be opened in either append or overwrite mode + by specifying the property. + If the file path is relative it is taken as relative from + the application base directory. The file encoding can be + specified by setting the property. + + + The layout's and + values will be written each time the file is opened and closed + respectively. If the property is + then the file may contain multiple copies of the header and footer. + + + This appender will first try to open the file for writing when + is called. This will typically be during configuration. + If the file cannot be opened for writing the appender will attempt + to open the file again each time a message is logged to the appender. + If the file cannot be opened for writing when a message is logged then + the message will be discarded by this appender. + + + The supports pluggable file locking models via + the property. + The default behavior, implemented by + is to obtain an exclusive write lock on the file until this appender is closed. + The alternative models only hold a + write lock while the appender is writing a logging event () + or synchronize by using a named system wide Mutex (). + + + All locking strategies have issues and you should seriously consider using a different strategy that + avoids having multiple processes logging to the same file. + + + Nicko Cadell + Gert Driesen + Rodrigo B. de Oliveira + Douglas de la Torre + Niall Daley + + + + Write only that uses the + to manage access to an underlying resource. + + + + + True asynchronous writes are not supported, the implementation forces a synchronous write. + + + + + Locking model base class + + + + Base class for the locking models available to the derived loggers. + + + + + + Open the output file + + The filename to use + Whether to append to the file, or overwrite + The encoding to use + + + Open the file specified and prepare for logging. + No writes will be made until is called. + Must be called before any calls to , + and . + + + + + + Close the file + + + + Close the file. No further writes will be made. + + + + + + Initializes all resources used by this locking model. + + + + + Disposes all resources that were initialized by this locking model. + + + + + Acquire the lock on the file + + A stream that is ready to be written to. + + + Acquire the lock on the file in preparation for writing to it. + Return a stream pointing to the file. + must be called to release the lock on the output file. + + + + + + Release the lock on the file + + + + Release the lock on the file. No further writes will be made to the + stream until is called again. + + + + + + Gets or sets the for this LockingModel + + + The for this LockingModel + + + + The file appender this locking model is attached to and working on + behalf of. + + + The file appender is used to locate the security context and the error handler to use. + + + The value of this property will be set before is + called. + + + + + + Helper method that creates a FileStream under CurrentAppender's SecurityContext. + + + + Typically called during OpenFile or AcquireLock. + + + If the directory portion of the does not exist, it is created + via Directory.CreateDirecctory. + + + + + + + + + + Helper method to close under CurrentAppender's SecurityContext. + + + Does not set to null. + + + + + + Hold an exclusive lock on the output file + + + + Open the file once for writing and hold it open until is called. + Maintains an exclusive lock on the file during this time. + + + + + + Open the file specified and prepare for logging. + + The filename to use + Whether to append to the file, or overwrite + The encoding to use + + + Open the file specified and prepare for logging. + No writes will be made until is called. + Must be called before any calls to , + and . + + + + + + Close the file + + + + Close the file. No further writes will be made. + + + + + + Acquire the lock on the file + + A stream that is ready to be written to. + + + Does nothing. The lock is already taken + + + + + + Release the lock on the file + + + + Does nothing. The lock will be released when the file is closed. + + + + + + Initializes all resources used by this locking model. + + + + + Disposes all resources that were initialized by this locking model. + + + + + Acquires the file lock for each write + + + + Opens the file once for each / cycle, + thus holding the lock for the minimal amount of time. This method of locking + is considerably slower than but allows + other processes to move/delete the log file whilst logging continues. + + + + + + Prepares to open the file when the first message is logged. + + The filename to use + Whether to append to the file, or overwrite + The encoding to use + + + Open the file specified and prepare for logging. + No writes will be made until is called. + Must be called before any calls to , + and . + + + + + + Close the file + + + + Close the file. No further writes will be made. + + + + + + Acquire the lock on the file + + A stream that is ready to be written to. + + + Acquire the lock on the file in preparation for writing to it. + Return a stream pointing to the file. + must be called to release the lock on the output file. + + + + + + Release the lock on the file + + + + Release the lock on the file. No further writes will be made to the + stream until is called again. + + + + + + Initializes all resources used by this locking model. + + + + + Disposes all resources that were initialized by this locking model. + + + + + Provides cross-process file locking. + + Ron Grabowski + Steve Wranovsky + + + + Open the file specified and prepare for logging. + + The filename to use + Whether to append to the file, or overwrite + The encoding to use + + + Open the file specified and prepare for logging. + No writes will be made until is called. + Must be called before any calls to , + - and . + + + + + + Close the file + + + + Close the file. No further writes will be made. + + + + + + Acquire the lock on the file + + A stream that is ready to be written to. + + + Does nothing. The lock is already taken + + + + + + Releases the lock and allows others to acquire a lock. + + + + + Initializes all resources used by this locking model. + + + + + Disposes all resources that were initialized by this locking model. + + + + + Default constructor + + + + Default constructor + + + + + + Construct a new appender using the layout, file and append mode. + + the layout to use with this appender + the full path to the file to write to + flag to indicate if the file should be appended to + + + Obsolete constructor. + + + + + + Construct a new appender using the layout and file specified. + The file will be appended to. + + the layout to use with this appender + the full path to the file to write to + + + Obsolete constructor. + + + + + + Gets or sets the path to the file that logging will be written to. + + + The path to the file that logging will be written to. + + + + If the path is relative it is taken as relative from + the application base directory. + + + + + + Gets or sets a flag that indicates whether the file should be + appended to or overwritten. + + + Indicates whether the file should be appended to or overwritten. + + + + If the value is set to false then the file will be overwritten, if + it is set to true then the file will be appended to. + + The default value is true. + + + + + Gets or sets used to write to the file. + + + The used to write to the file. + + + + The default encoding set is + which is the encoding for the system's current ANSI code page. + + + + + + Gets or sets the used to write to the file. + + + The used to write to the file. + + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + Gets or sets the used to handle locking of the file. + + + The used to lock the file. + + + + Gets or sets the used to handle locking of the file. + + + There are three built in locking models, , and . + The first locks the file from the start of logging to the end, the + second locks only for the minimal amount of time when logging each message + and the last synchronizes processes using a named system wide Mutex. + + + The default locking model is the . + + + + + + Activate the options on the file appender. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + This will cause the file to be opened. + + + + + + Closes any previously opened file and calls the parent's . + + + + Resets the filename and the file stream. + + + + + + Close this appender instance. The underlying stream or writer is also closed. + + + + + Called to initialize the file writer + + + + Will be called for each logged message until the file is + successfully opened. + + + + + + This method is called by the + method. + + The event to log. + + + Writes a log statement to the output stream if the output stream exists + and is writable. + + + The format of the output will depend on the appender's layout. + + + + + + This method is called by the + method. + + The array of events to log. + + + Acquires the output file locks once before writing all the events to + the stream. + + + + + + Writes a footer as produced by the embedded layout's property. + + + + Writes a footer as produced by the embedded layout's property. + + + + + + Writes a header produced by the embedded layout's property. + + + + Writes a header produced by the embedded layout's property. + + + + + + Closes the underlying . + + + + Closes the underlying . + + + + + + Closes the previously opened file. + + + + Writes the to the file and then + closes the file. + + + + + + Sets and opens the file where the log output will go. The specified file must be writable. + + The path to the log file. Must be a fully qualified path. + If true will append to fileName. Otherwise will truncate fileName + + + Calls but guarantees not to throw an exception. + Errors are passed to the . + + + + + + Sets and opens the file where the log output will go. The specified file must be writable. + + The path to the log file. Must be a fully qualified path. + If true will append to fileName. Otherwise will truncate fileName + + + If there was already an opened file, then the previous file + is closed first. + + + This method will ensure that the directory structure + for the specified exists. + + + + + + Sets the quiet writer used for file output + + the file stream that has been opened for writing + + + This implementation of creates a + over the and passes it to the + method. + + + This method can be overridden by sub classes that want to wrap the + in some way, for example to encrypt the output + data using a System.Security.Cryptography.CryptoStream. + + + + + + Sets the quiet writer being used. + + the writer over the file stream that has been opened for writing + + + This method can be overridden by sub classes that want to + wrap the in some way. + + + + + + Convert a path into a fully qualified path. + + The path to convert. + The fully qualified path. + + + Converts the path specified to a fully + qualified path. If the path is relative it is + taken as relative from the application base + directory. + + + + + + Flag to indicate if we should append to the file + or overwrite the file. The default is to append. + + + + + The name of the log file. + + + + + The encoding to use for the file stream. + + + + + The security context to use for privileged calls + + + + + The stream to log to. Has added locking semantics + + + + + The locking model to use + + + + + The fully qualified type of the FileAppender class. + + + Used by the internal logger to record the Type of the + log message. + + + + + This appender forwards logging events to attached appenders. + + + + The forwarding appender can be used to specify different thresholds + and filters for the same appender at different locations within the hierarchy. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Closes the appender and releases resources. + + + + Releases any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + + + + Forward the logging event to the attached appenders + + The event to log. + + + Delivers the logging event to all the attached appenders. + + + + + + Forward the logging events to the attached appenders + + The array of events to log. + + + Delivers the logging events to all the attached appenders. + + + + + + Adds an to the list of appenders of this + instance. + + The to add to this appender. + + + If the specified is already in the list of + appenders, then it won't be added again. + + + + + + Gets the appenders contained in this appender as an + . + + + If no appenders can be found, then an + is returned. + + + A collection of the appenders in this appender. + + + + + Looks for the appender with the specified name. + + The name of the appender to lookup. + + The appender with the specified name, or null. + + + + Get the named appender attached to this appender. + + + + + + Removes all previously added appenders from this appender. + + + + This is useful when re-reading configuration information. + + + + + + Removes the specified appender from the list of appenders. + + The appender to remove. + The appender removed from the list + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + Removes the appender with the specified name from the list of appenders. + + The name of the appender to remove. + The appender removed from the list + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + Implementation of the interface + + + + + Implement this interface for your own strategies for printing log statements. + + + + Implementors should consider extending the + class which provides a default implementation of this interface. + + + Appenders can also implement the interface. Therefore + they would require that the method + be called after the appenders properties have been configured. + + + Nicko Cadell + Gert Driesen + + + + Closes the appender and releases resources. + + + + Releases any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + + + + Log the logging event in Appender specific way. + + The event to log + + + This method is called to log a message into this appender. + + + + + + Gets or sets the name of this appender. + + The name of the appender. + + The name uniquely identifies the appender. + + + + + Interface for appenders that support bulk logging. + + + + This interface extends the interface to + support bulk logging of objects. Appenders + should only implement this interface if they can bulk log efficiently. + + + Nicko Cadell + + + + Log the array of logging events in Appender specific way. + + The events to log + + + This method is called to log an array of events into this appender. + + + + + + Interface that can be implemented by Appenders that buffer logging data and expose a method. + + + + + Flushes any buffered log data. + + + Appenders that implement the method must do so in a thread-safe manner: it can be called concurrently with + the method. + + Typically this is done by locking on the Appender instance, e.g.: + + + + + + The parameter is only relevant for appenders that process logging events asynchronously, + such as . + + + The maximum time to wait for logging events to be flushed. + True if all logging events were flushed successfully, else false. + + + + Logs events to a local syslog service. + + + + This appender uses the POSIX libc library functions openlog, syslog, and closelog. + If these functions are not available on the local system then this appender will not work! + + + The functions openlog, syslog, and closelog are specified in SUSv2 and + POSIX 1003.1-2001 standards. These are used to log messages to the local syslog service. + + + This appender talks to a local syslog service. If you need to log to a remote syslog + daemon and you cannot configure your local syslog service to do this you may be + able to use the to log via UDP. + + + Syslog messages must have a facility and and a severity. The severity + is derived from the Level of the logging event. + The facility must be chosen from the set of defined syslog + values. The facilities list is predefined + and cannot be extended. + + + An identifier is specified with each log message. This can be specified + by setting the property. The identity (also know + as the tag) must not contain white space. The default value for the + identity is the application name (from ). + + + Rob Lyon + Nicko Cadell + + + + syslog severities + + + + The log4net Level maps to a syslog severity using the + method and the + class. The severity is set on . + + + + + + system is unusable + + + + + action must be taken immediately + + + + + critical conditions + + + + + error conditions + + + + + warning conditions + + + + + normal but significant condition + + + + + informational + + + + + debug-level messages + + + + + syslog facilities + + + + The syslog facility defines which subsystem the logging comes from. + This is set on the property. + + + + + + kernel messages + + + + + random user-level messages + + + + + mail system + + + + + system daemons + + + + + security/authorization messages + + + + + messages generated internally by syslogd + + + + + line printer subsystem + + + + + network news subsystem + + + + + UUCP subsystem + + + + + clock (cron/at) daemon + + + + + security/authorization messages (private) + + + + + ftp daemon + + + + + NTP subsystem + + + + + log audit + + + + + log alert + + + + + clock daemon + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + Initializes a new instance of the class. + + + This instance of the class is set up to write + to a local syslog service. + + + + + Message identity + + + + An identifier is specified with each log message. This can be specified + by setting the property. The identity (also know + as the tag) must not contain white space. The default value for the + identity is the application name (from ). + + + + + + Syslog facility + + + Set to one of the values. The list of + facilities is predefined and cannot be extended. The default value + is . + + + + + Add a mapping of level to severity + + The mapping to add + + + Adds a to this appender. + + + + + + Initialize the appender based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to a remote syslog daemon. + + + The format of the output will depend on the appender's layout. + + + + + + Close the syslog when the appender is closed + + + + Close the syslog when the appender is closed + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Translates a log4net level to a syslog severity. + + A log4net level. + A syslog severity. + + + Translates a log4net level to a syslog severity. + + + + + + Generate a syslog priority. + + The syslog facility. + The syslog severity. + A syslog priority. + + + + The facility. The default facility is . + + + + + The message identity + + + + + Marshaled handle to the identity string. We have to hold on to the + string as the openlog and syslog APIs just hold the + pointer to the ident and dereference it for each log message. + + + + + Mapping from level object to syslog severity + + + + + Open connection to system logger. + + + + + Generate a log message. + + + + The libc syslog method takes a format string and a variable argument list similar + to the classic printf function. As this type of vararg list is not supported + by C# we need to specify the arguments explicitly. Here we have specified the + format string with a single message argument. The caller must set the format + string to "%s". + + + + + + Close descriptor used to write to system logger. + + + + + A class to act as a mapping between the level that a logging call is made at and + the syslog severity that is should be logged at. + + + + A class to act as a mapping between the level that a logging call is made at and + the syslog severity that is should be logged at. + + + + + + The mapped syslog severity for the specified level + + + + Required property. + The mapped syslog severity for the specified level + + + + + + Appends colorful logging events to the console, using the .NET 2 + built-in capabilities. + + + + ManagedColoredConsoleAppender appends log events to the standard output stream + or the error output stream using a layout specified by the + user. It also allows the color of a specific type of message to be set. + + + By default, all output is written to the console's standard output stream. + The property can be set to direct the output to the + error stream. + + + When configuring the colored console appender, mappings should be + specified to map logging levels to colors. For example: + + + + + + + + + + + + + + + + + + + + + + The Level is the standard log4net logging level while + ForeColor and BackColor are the values of + enumeration. + + + Based on the ColoredConsoleAppender + + + Rick Hobbs + Nicko Cadell + Pavlos Touboulidis + + + + Initializes a new instance of the class. + + + The instance of the class is set up to write + to the standard output stream. + + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + + + Add a mapping of level to color - done by the config file + + The mapping to add + + + Add a mapping to this appender. + Each mapping defines the foreground and background colors + for a level. + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to the console. + + + The format of the output will depend on the appender's layout. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Initialize the options for this appender + + + + Initialize the level to color mappings set on this appender. + + + + + + The to use when writing to the Console + standard output stream. + + + + The to use when writing to the Console + standard output stream. + + + + + + The to use when writing to the Console + standard error output stream. + + + + The to use when writing to the Console + standard error output stream. + + + + + + Flag to write output to the error stream rather than the standard output stream + + + + + Mapping from level object to color value + + + + + A class to act as a mapping between the level that a logging call is made at and + the color it should be displayed as. + + + + Defines the mapping between a level and the color it should be displayed in. + + + + + + The mapped foreground color for the specified level + + + + Required property. + The mapped foreground color for the specified level. + + + + + + The mapped background color for the specified level + + + + Required property. + The mapped background color for the specified level. + + + + + + Stores logging events in an array. + + + + The memory appender stores all the logging events + that are appended in an in-memory array. + + + Use the method to get + and clear the current list of events that have been appended. + + + Use the method to get the current + list of events that have been appended. Note there is a + race-condition when calling and + in pairs, you better use in that case. + + + Use the method to clear the + current list of events. Note there is a + race-condition when calling and + in pairs, you better use in that case. + + + Julian Biddle + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Gets the events that have been logged. + + The events that have been logged + + + Gets the events that have been logged. + + + + + + Gets or sets a value indicating whether only part of the logging event + data should be fixed. + + + true if the appender should only fix part of the logging event + data, otherwise false. The default is false. + + + + Setting this property to true will cause only part of the event + data to be fixed and stored in the appender, hereby improving performance. + + + See for more information. + + + + + + Gets or sets the fields that will be fixed in the event + + + + The logging event needs to have certain thread specific values + captured before it can be buffered. See + for details. + + + + + + This method is called by the method. + + the event to log + + Stores the in the events list. + + + + + Clear the list of events + + + Clear the list of events + + + + + Gets the events that have been logged and clears the list of events. + + The events that have been logged + + + Gets the events that have been logged and clears the list of events. + + + + + + The list of events that have been appended. + + + + + Value indicating which fields in the event should be fixed + + + By default all fields are fixed + + + + + Logs entries by sending network messages using the + native function. + + + + You can send messages only to names that are active + on the network. If you send the message to a user name, + that user must be logged on and running the Messenger + service to receive the message. + + + The receiver will get a top most window displaying the + messages one at a time, therefore this appender should + not be used to deliver a high volume of messages. + + + The following table lists some possible uses for this appender : + + + + + Action + Property Value(s) + + + Send a message to a user account on the local machine + + + = <name of the local machine> + + + = <user name> + + + + + Send a message to a user account on a remote machine + + + = <name of the remote machine> + + + = <user name> + + + + + Send a message to a domain user account + + + = <name of a domain controller | uninitialized> + + + = <user name> + + + + + Send a message to all the names in a workgroup or domain + + + = <workgroup name | domain name>* + + + + + Send a message from the local machine to a remote machine + + + = <name of the local machine | uninitialized> + + + = <name of the remote machine> + + + + + + + Note : security restrictions apply for sending + network messages, see + for more information. + + + + + An example configuration section to log information + using this appender from the local machine, named + LOCAL_PC, to machine OPERATOR_PC : + + + + + + + + + + Nicko Cadell + Gert Driesen + + + + The DNS or NetBIOS name of the server on which the function is to execute. + + + + + The sender of the network message. + + + + + The message alias to which the message should be sent. + + + + + The security context to use for privileged calls + + + + + Initializes the appender. + + + The default constructor initializes all fields to their default values. + + + + + Gets or sets the sender of the message. + + + The sender of the message. + + + If this property is not specified, the message is sent from the local computer. + + + + + Gets or sets the message alias to which the message should be sent. + + + The recipient of the message. + + + This property should always be specified in order to send a message. + + + + + Gets or sets the DNS or NetBIOS name of the remote server on which the function is to execute. + + + DNS or NetBIOS name of the remote server on which the function is to execute. + + + + For Windows NT 4.0 and earlier, the string should begin with \\. + + + If this property is not specified, the local computer is used. + + + + + + Gets or sets the used to call the NetSend method. + + + The used to call the NetSend method. + + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + Initialize the appender based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + The appender will be ignored if no was specified. + + + The required property was not specified. + + + + This method is called by the method. + + The event to log. + + + Sends the event using a network message. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Sends a buffer of information to a registered message alias. + + The DNS or NetBIOS name of the server on which the function is to execute. + The message alias to which the message buffer should be sent + The originator of the message. + The message text. + The length, in bytes, of the message text. + + + The following restrictions apply for sending network messages: + + + + + Platform + Requirements + + + Windows NT + + + No special group membership is required to send a network message. + + + Admin, Accounts, Print, or Server Operator group membership is required to + successfully send a network message on a remote server. + + + + + Windows 2000 or later + + + If you send a message on a domain controller that is running Active Directory, + access is allowed or denied based on the access control list (ACL) for the securable + object. The default ACL permits only Domain Admins and Account Operators to send a network message. + + + On a member server or workstation, only Administrators and Server Operators can send a network message. + + + + + + + For more information see Security Requirements for the Network Management Functions. + + + + + If the function succeeds, the return value is zero. + + + + + + Appends log events to the OutputDebugString system. + + + + OutputDebugStringAppender appends log events to the + OutputDebugString system. + + + The string is passed to the native OutputDebugString + function. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Write the logging event to the output debug string API + + the event to log + + + Write the logging event to the output debug string API + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Stub for OutputDebugString native method + + the string to output + + + Stub for OutputDebugString native method + + + + + + Logs events to a remote syslog daemon. + + + + The BSD syslog protocol is used to remotely log to + a syslog daemon. The syslogd listens for for messages + on UDP port 514. + + + The syslog UDP protocol is not authenticated. Most syslog daemons + do not accept remote log messages because of the security implications. + You may be able to use the LocalSyslogAppender to talk to a local + syslog service. + + + There is an RFC 3164 that claims to document the BSD Syslog Protocol. + This RFC can be seen here: http://www.faqs.org/rfcs/rfc3164.html. + This appender generates what the RFC calls an "Original Device Message", + i.e. does not include the TIMESTAMP or HOSTNAME fields. By observation + this format of message will be accepted by all current syslog daemon + implementations. The daemon will attach the current time and the source + hostname or IP address to any messages received. + + + Syslog messages must have a facility and and a severity. The severity + is derived from the Level of the logging event. + The facility must be chosen from the set of defined syslog + values. The facilities list is predefined + and cannot be extended. + + + An identifier is specified with each log message. This can be specified + by setting the property. The identity (also know + as the tag) must not contain white space. The default value for the + identity is the application name (from ). + + + Rob Lyon + Nicko Cadell + + + + Syslog port 514 + + + + + syslog severities + + + + The syslog severities. + + + + + + system is unusable + + + + + action must be taken immediately + + + + + critical conditions + + + + + error conditions + + + + + warning conditions + + + + + normal but significant condition + + + + + informational + + + + + debug-level messages + + + + + syslog facilities + + + + The syslog facilities + + + + + + kernel messages + + + + + random user-level messages + + + + + mail system + + + + + system daemons + + + + + security/authorization messages + + + + + messages generated internally by syslogd + + + + + line printer subsystem + + + + + network news subsystem + + + + + UUCP subsystem + + + + + clock (cron/at) daemon + + + + + security/authorization messages (private) + + + + + ftp daemon + + + + + NTP subsystem + + + + + log audit + + + + + log alert + + + + + clock daemon + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + Initializes a new instance of the class. + + + This instance of the class is set up to write + to a remote syslog daemon. + + + + + Message identity + + + + An identifier is specified with each log message. This can be specified + by setting the property. The identity (also know + as the tag) must not contain white space. The default value for the + identity is the application name (from ). + + + + + + Syslog facility + + + Set to one of the values. The list of + facilities is predefined and cannot be extended. The default value + is . + + + + + Add a mapping of level to severity + + The mapping to add + + + Add a mapping to this appender. + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to a remote syslog daemon. + + + The format of the output will depend on the appender's layout. + + + + + + Initialize the options for this appender + + + + Initialize the level to syslog severity mappings set on this appender. + + + + + + Translates a log4net level to a syslog severity. + + A log4net level. + A syslog severity. + + + Translates a log4net level to a syslog severity. + + + + + + Generate a syslog priority. + + The syslog facility. + The syslog severity. + A syslog priority. + + + Generate a syslog priority. + + + + + + The facility. The default facility is . + + + + + The message identity + + + + + Mapping from level object to syslog severity + + + + + Initial buffer size + + + + + Maximum buffer size before it is recycled + + + + + A class to act as a mapping between the level that a logging call is made at and + the syslog severity that is should be logged at. + + + + A class to act as a mapping between the level that a logging call is made at and + the syslog severity that is should be logged at. + + + + + + The mapped syslog severity for the specified level + + + + Required property. + The mapped syslog severity for the specified level + + + + + + Delivers logging events to a remote logging sink. + + + + This Appender is designed to deliver events to a remote sink. + That is any object that implements the + interface. It delivers the events using .NET remoting. The + object to deliver events to is specified by setting the + appenders property. + + The RemotingAppender buffers events before sending them. This allows it to + make more efficient use of the remoting infrastructure. + + Once the buffer is full the events are still not sent immediately. + They are scheduled to be sent using a pool thread. The effect is that + the send occurs asynchronously. This is very important for a + number of non obvious reasons. The remoting infrastructure will + flow thread local variables (stored in the ), + if they are marked as , across the + remoting boundary. If the server is not contactable then + the remoting infrastructure will clear the + objects from the . To prevent a logging failure from + having side effects on the calling application the remoting call must be made + from a separate thread to the one used by the application. A + thread is used for this. If no thread is available then + the events will block in the thread pool manager until a thread is available. + + Because the events are sent asynchronously using pool threads it is possible to close + this appender before all the queued events have been sent. + When closing the appender attempts to wait until all the queued events have been sent, but + this will timeout after 30 seconds regardless. + + If this appender is being closed because the + event has fired it may not be possible to send all the queued events. During process + exit the runtime limits the time that a + event handler is allowed to run for. If the runtime terminates the threads before + the queued events have been sent then they will be lost. To ensure that all events + are sent the appender must be closed before the application exits. See + for details on how to shutdown + log4net programmatically. + + + Nicko Cadell + Gert Driesen + Daniel Cazzulino + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Gets or sets the URL of the well-known object that will accept + the logging events. + + + The well-known URL of the remote sink. + + + + The URL of the remoting sink that will accept logging events. + The sink must implement the + interface. + + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Send the contents of the buffer to the remote sink. + + + The events are not sent immediately. They are scheduled to be sent + using a pool thread. The effect is that the send occurs asynchronously. + This is very important for a number of non obvious reasons. The remoting + infrastructure will flow thread local variables (stored in the ), + if they are marked as , across the + remoting boundary. If the server is not contactable then + the remoting infrastructure will clear the + objects from the . To prevent a logging failure from + having side effects on the calling application the remoting call must be made + from a separate thread to the one used by the application. A + thread is used for this. If no thread is available then + the events will block in the thread pool manager until a thread is available. + + The events to send. + + + + Override base class close. + + + + This method waits while there are queued work items. The events are + sent asynchronously using work items. These items + will be sent once a thread pool thread is available to send them, therefore + it is possible to close the appender before all the queued events have been + sent. + + This method attempts to wait until all the queued events have been sent, but this + method will timeout after 30 seconds regardless. + + If the appender is being closed because the + event has fired it may not be possible to send all the queued events. During process + exit the runtime limits the time that a + event handler is allowed to run for. + + + + + Flushes any buffered log data. + + The maximum time to wait for logging events to be flushed. + True if all logging events were flushed successfully, else false. + + + + A work item is being queued into the thread pool + + + + + A work item from the thread pool has completed + + + + + Send the contents of the buffer to the remote sink. + + + This method is designed to be used with the . + This method expects to be passed an array of + objects in the state param. + + the logging events to send + + + + The URL of the remote sink. + + + + + The local proxy (.NET remoting) for the remote logging sink. + + + + + The number of queued callbacks currently waiting or executing + + + + + Event used to signal when there are no queued work items + + + This event is set when there are no queued work items. In this + state it is safe to close the appender. + + + + + Interface used to deliver objects to a remote sink. + + + This interface must be implemented by a remoting sink + if the is to be used + to deliver logging events to the sink. + + + + + Delivers logging events to the remote sink + + Array of events to log. + + + Delivers logging events to the remote sink + + + + + + Appender that rolls log files based on size or date or both. + + + + RollingFileAppender can roll log files based on size or date or both + depending on the setting of the property. + When set to the log file will be rolled + once its size exceeds the . + When set to the log file will be rolled + once the date boundary specified in the property + is crossed. + When set to the log file will be + rolled once the date boundary specified in the property + is crossed, but within a date boundary the file will also be rolled + once its size exceeds the . + When set to the log file will be rolled when + the appender is configured. This effectively means that the log file can be + rolled once per program execution. + + + A of few additional optional features have been added: + + Attach date pattern for current log file + Backup number increments for newer files + Infinite number of backups by file size + + + + + + For large or infinite numbers of backup files a + greater than zero is highly recommended, otherwise all the backup files need + to be renamed each time a new backup is created. + + + When Date/Time based rolling is used setting + to will reduce the number of file renamings to few or none. + + + + + + Changing or without clearing + the log file directory of backup files will cause unexpected and unwanted side effects. + + + + + If Date/Time based rolling is enabled this appender will attempt to roll existing files + in the directory without a Date/Time tag based on the last write date of the base log file. + The appender only rolls the log file when a message is logged. If Date/Time based rolling + is enabled then the appender will not roll the log file at the Date/Time boundary but + at the point when the next message is logged after the boundary has been crossed. + + + + The extends the and + has the same behavior when opening the log file. + The appender will first try to open the file for writing when + is called. This will typically be during configuration. + If the file cannot be opened for writing the appender will attempt + to open the file again each time a message is logged to the appender. + If the file cannot be opened for writing when a message is logged then + the message will be discarded by this appender. + + + When rolling a backup file necessitates deleting an older backup file the + file to be deleted is moved to a temporary name before being deleted. + + + + + A maximum number of backup files when rolling on date/time boundaries is not supported. + + + + Nicko Cadell + Gert Driesen + Aspi Havewala + Douglas de la Torre + Edward Smit + + + + Style of rolling to use + + + + Style of rolling to use + + + + + + Roll files once per program execution + + + + Roll files once per program execution. + Well really once each time this appender is + configured. + + + Setting this option also sets AppendToFile to + false on the RollingFileAppender, otherwise + this appender would just be a normal file appender. + + + + + + Roll files based only on the size of the file + + + + + Roll files based only on the date + + + + + Roll files based on both the size and date of the file + + + + + The code assumes that the following 'time' constants are in a increasing sequence. + + + + The code assumes that the following 'time' constants are in a increasing sequence. + + + + + + Roll the log not based on the date + + + + + Roll the log for each minute + + + + + Roll the log for each hour + + + + + Roll the log twice a day (midday and midnight) + + + + + Roll the log each day (midnight) + + + + + Roll the log each week + + + + + Roll the log each month + + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Cleans up all resources used by this appender. + + + + + Gets or sets the strategy for determining the current date and time. The default + implementation is to use LocalDateTime which internally calls through to DateTime.Now. + DateTime.UtcNow may be used on frameworks newer than .NET 1.0 by specifying + . + + + An implementation of the interface which returns the current date and time. + + + + Gets or sets the used to return the current date and time. + + + There are two built strategies for determining the current date and time, + + and . + + + The default strategy is . + + + + + + Gets or sets the date pattern to be used for generating file names + when rolling over on date. + + + The date pattern to be used for generating file names when rolling + over on date. + + + + Takes a string in the same format as expected by + . + + + This property determines the rollover schedule when rolling over + on date. + + + + + + Gets or sets the maximum number of backup files that are kept before + the oldest is erased. + + + The maximum number of backup files that are kept before the oldest is + erased. + + + + If set to zero, then there will be no backup files and the log file + will be truncated when it reaches . + + + If a negative number is supplied then no deletions will be made. Note + that this could result in very slow performance as a large number of + files are rolled over unless is used. + + + The maximum applies to each time based group of files and + not the total. + + + + + + Gets or sets the maximum size that the output file is allowed to reach + before being rolled over to backup files. + + + The maximum size in bytes that the output file is allowed to reach before being + rolled over to backup files. + + + + This property is equivalent to except + that it is required for differentiating the setter taking a + argument from the setter taking a + argument. + + + The default maximum file size is 10MB (10*1024*1024). + + + + + + Gets or sets the maximum size that the output file is allowed to reach + before being rolled over to backup files. + + + The maximum size that the output file is allowed to reach before being + rolled over to backup files. + + + + This property allows you to specify the maximum size with the + suffixes "KB", "MB" or "GB" so that the size is interpreted being + expressed respectively in kilobytes, megabytes or gigabytes. + + + For example, the value "10KB" will be interpreted as 10240 bytes. + + + The default maximum file size is 10MB. + + + If you have the option to set the maximum file size programmatically + consider using the property instead as this + allows you to set the size in bytes as a . + + + + + + Gets or sets the rolling file count direction. + + + The rolling file count direction. + + + + Indicates if the current file is the lowest numbered file or the + highest numbered file. + + + By default newer files have lower numbers ( < 0), + i.e. log.1 is most recent, log.5 is the 5th backup, etc... + + + >= 0 does the opposite i.e. + log.1 is the first backup made, log.5 is the 5th backup made, etc. + For infinite backups use >= 0 to reduce + rollover costs. + + The default file count direction is -1. + + + + + Gets or sets the rolling style. + + The rolling style. + + + The default rolling style is . + + + When set to this appender's + property is set to false, otherwise + the appender would append to a single file rather than rolling + the file each time it is opened. + + + + + + Gets or sets a value indicating whether to preserve the file name extension when rolling. + + + true if the file name extension should be preserved. + + + + By default file.log is rolled to file.log.yyyy-MM-dd or file.log.curSizeRollBackup. + However, under Windows the new file name will loose any program associations as the + extension is changed. Optionally file.log can be renamed to file.yyyy-MM-dd.log or + file.curSizeRollBackup.log to maintain any program associations. + + + + + + Gets or sets a value indicating whether to always log to + the same file. + + + true if always should be logged to the same file, otherwise false. + + + + By default file.log is always the current file. Optionally + file.log.yyyy-mm-dd for current formatted datePattern can by the currently + logging file (or file.log.curSizeRollBackup or even + file.log.yyyy-mm-dd.curSizeRollBackup). + + + This will make time based rollovers with a large number of backups + much faster as the appender it won't have to rename all the backups! + + + + + + The fully qualified type of the RollingFileAppender class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Sets the quiet writer being used. + + + This method can be overridden by sub classes. + + the writer to set + + + + Write out a logging event. + + the event to write to file. + + + Handles append time behavior for RollingFileAppender. This checks + if a roll over either by date (checked first) or time (checked second) + is need and then appends to the file last. + + + + + + Write out an array of logging events. + + the events to write to file. + + + Handles append time behavior for RollingFileAppender. This checks + if a roll over either by date (checked first) or time (checked second) + is need and then appends to the file last. + + + + + + Performs any required rolling before outputting the next event + + + + Handles append time behavior for RollingFileAppender. This checks + if a roll over either by date (checked first) or time (checked second) + is need and then appends to the file last. + + + + + + Creates and opens the file for logging. If + is false then the fully qualified name is determined and used. + + the name of the file to open + true to append to existing file + + This method will ensure that the directory structure + for the specified exists. + + + + + Get the current output file name + + the base file name + the output file name + + The output file name is based on the base fileName specified. + If is set then the output + file name is the same as the base file passed in. Otherwise + the output file depends on the date pattern, on the count + direction or both. + + + + + Determines curSizeRollBackups (only within the current roll point) + + + + + Generates a wildcard pattern that can be used to find all files + that are similar to the base file name. + + + + + + + Builds a list of filenames for all files matching the base filename plus a file + pattern. + + + + + + + Initiates a roll over if needed for crossing a date boundary since the last run. + + + + + Initializes based on existing conditions at time of . + + + + Initializes based on existing conditions at time of . + The following is done + + determine curSizeRollBackups (only within the current roll point) + initiates a roll over if needed for crossing a date boundary since the last run. + + + + + + + Does the work of bumping the 'current' file counter higher + to the highest count when an incremental file name is seen. + The highest count is either the first file (when count direction + is greater than 0) or the last file (when count direction less than 0). + In either case, we want to know the highest count that is present. + + + + + + + Attempts to extract a number from the end of the file name that indicates + the number of the times the file has been rolled over. + + + Certain date pattern extensions like yyyyMMdd will be parsed as valid backup indexes. + + + + + + + Takes a list of files and a base file name, and looks for + 'incremented' versions of the base file. Bumps the max + count up to the highest count seen. + + + + + + + Calculates the RollPoint for the datePattern supplied. + + the date pattern to calculate the check period for + The RollPoint that is most accurate for the date pattern supplied + + Essentially the date pattern is examined to determine what the + most suitable roll point is. The roll point chosen is the roll point + with the smallest period that can be detected using the date pattern + supplied. i.e. if the date pattern only outputs the year, month, day + and hour then the smallest roll point that can be detected would be + and hourly roll point as minutes could not be detected. + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + Sets initial conditions including date/time roll over information, first check, + scheduledFilename, and calls to initialize + the current number of backups. + + + + + + + + + .1, .2, .3, etc. + + + + + Rollover the file(s) to date/time tagged file(s). + + set to true if the file to be rolled is currently open + + + Rollover the file(s) to date/time tagged file(s). + Resets curSizeRollBackups. + If fileIsOpen is set then the new file is opened (through SafeOpenFile). + + + + + + Renames file to file . + + Name of existing file to roll. + New name for file. + + + Renames file to file . It + also checks for existence of target file and deletes if it does. + + + + + + Test if a file exists at a specified path + + the path to the file + true if the file exists + + + Test if a file exists at a specified path + + + + + + Deletes the specified file if it exists. + + The file to delete. + + + Delete a file if is exists. + The file is first moved to a new filename then deleted. + This allows the file to be removed even when it cannot + be deleted, but it still can be moved. + + + + + + Implements file roll base on file size. + + + + If the maximum number of size based backups is reached + (curSizeRollBackups == maxSizeRollBackups) then the oldest + file is deleted -- its index determined by the sign of countDirection. + If countDirection < 0, then files + {File.1, ..., File.curSizeRollBackups -1} + are renamed to {File.2, ..., + File.curSizeRollBackups}. Moreover, File is + renamed File.1 and closed. + + + A new file is created to receive further log output. + + + If maxSizeRollBackups is equal to zero, then the + File is truncated with no backup files created. + + + If maxSizeRollBackups < 0, then File is + renamed if needed and no files are deleted. + + + + + + Implements file roll. + + the base name to rename + + + If the maximum number of size based backups is reached + (curSizeRollBackups == maxSizeRollBackups) then the oldest + file is deleted -- its index determined by the sign of countDirection. + If countDirection < 0, then files + {File.1, ..., File.curSizeRollBackups -1} + are renamed to {File.2, ..., + File.curSizeRollBackups}. + + + If maxSizeRollBackups is equal to zero, then the + File is truncated with no backup files created. + + + If maxSizeRollBackups < 0, then File is + renamed if needed and no files are deleted. + + + This is called by to rename the files. + + + + + + Get the start time of the next window for the current rollpoint + + the current date + the type of roll point we are working with + the start time for the next roll point an interval after the currentDateTime date + + + Returns the date of the next roll point after the currentDateTime date passed to the method. + + + The basic strategy is to subtract the time parts that are less significant + than the rollpoint from the current time. This should roll the time back to + the start of the time window for the current rollpoint. Then we add 1 window + worth of time and get the start time of the next window for the rollpoint. + + + + + + This object supplies the current date/time. Allows test code to plug in + a method to control this class when testing date/time based rolling. The default + implementation uses the underlying value of DateTime.Now. + + + + + The date pattern. By default, the pattern is set to ".yyyy-MM-dd" + meaning daily rollover. + + + + + The actual formatted filename that is currently being written to + or will be the file transferred to on roll over + (based on staticLogFileName). + + + + + The timestamp when we shall next recompute the filename. + + + + + Holds date of last roll over + + + + + The type of rolling done + + + + + The default maximum file size is 10MB + + + + + There is zero backup files by default + + + + + How many sized based backups have been made so far + + + + + The rolling file count direction. + + + + + The rolling mode used in this appender. + + + + + Cache flag set if we are rolling by date. + + + + + Cache flag set if we are rolling by size. + + + + + Value indicating whether to always log to the same file. + + + + + Value indicating whether to preserve the file name extension when rolling. + + + + + FileName provided in configuration. Used for rolling properly + + + + + A mutex that is used to lock rolling of files. + + + + + The 1st of January 1970 in UTC + + + + + This interface is used to supply Date/Time information to the . + + + This interface is used to supply Date/Time information to the . + Used primarily to allow test classes to plug themselves in so they can + supply test date/times. + + + + + Gets the current time. + + The current time. + + + Gets the current time. + + + + + + Default implementation of that returns the current time. + + + + + Gets the current time. + + The current time. + + + Gets the current time. + + + + + + Implementation of that returns the current time as the coordinated universal time (UTC). + + + + + Gets the current time. + + The current time. + + + Gets the current time. + + + + + + Send an e-mail when a specific logging event occurs, typically on errors + or fatal errors. + + + + The number of logging events delivered in this e-mail depend on + the value of option. The + keeps only the last + logging events in its + cyclic buffer. This keeps memory requirements at a reasonable level while + still delivering useful application context. + + + Authentication and setting the server Port are only available on the MS .NET 1.1 runtime. + For these features to be enabled you need to ensure that you are using a version of + the log4net assembly that is built against the MS .NET 1.1 framework and that you are + running the your application on the MS .NET 1.1 runtime. On all other platforms only sending + unauthenticated messages to a server listening on port 25 (the default) is supported. + + + Authentication is supported by setting the property to + either or . + If using authentication then the + and properties must also be set. + + + To set the SMTP server port use the property. The default port is 25. + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Default constructor + + + + + + Gets or sets a comma- or semicolon-delimited list of recipient e-mail addresses (use semicolon on .NET 1.1 and comma for later versions). + + + + For .NET 1.1 (System.Web.Mail): A semicolon-delimited list of e-mail addresses. + + + For .NET 2.0 (System.Net.Mail): A comma-delimited list of e-mail addresses. + + + + + For .NET 1.1 (System.Web.Mail): A semicolon-delimited list of e-mail addresses. + + + For .NET 2.0 (System.Net.Mail): A comma-delimited list of e-mail addresses. + + + + + + Gets or sets a comma- or semicolon-delimited list of recipient e-mail addresses + that will be carbon copied (use semicolon on .NET 1.1 and comma for later versions). + + + + For .NET 1.1 (System.Web.Mail): A semicolon-delimited list of e-mail addresses. + + + For .NET 2.0 (System.Net.Mail): A comma-delimited list of e-mail addresses. + + + + + For .NET 1.1 (System.Web.Mail): A semicolon-delimited list of e-mail addresses. + + + For .NET 2.0 (System.Net.Mail): A comma-delimited list of e-mail addresses. + + + + + + Gets or sets a semicolon-delimited list of recipient e-mail addresses + that will be blind carbon copied. + + + A semicolon-delimited list of e-mail addresses. + + + + A semicolon-delimited list of recipient e-mail addresses. + + + + + + Gets or sets the e-mail address of the sender. + + + The e-mail address of the sender. + + + + The e-mail address of the sender. + + + + + + Gets or sets the subject line of the e-mail message. + + + The subject line of the e-mail message. + + + + The subject line of the e-mail message. + + + + + + Gets or sets the name of the SMTP relay mail server to use to send + the e-mail messages. + + + The name of the e-mail relay server. If SmtpServer is not set, the + name of the local SMTP server is used. + + + + The name of the e-mail relay server. If SmtpServer is not set, the + name of the local SMTP server is used. + + + + + + Obsolete + + + Use the BufferingAppenderSkeleton Fix methods instead + + + + Obsolete property. + + + + + + The mode to use to authentication with the SMTP server + + + Authentication is only available on the MS .NET 1.1 runtime. + + Valid Authentication mode values are: , + , and . + The default value is . When using + you must specify the + and to use to authenticate. + When using the Windows credentials for the current + thread, if impersonating, or the process will be used to authenticate. + + + + + + The username to use to authenticate with the SMTP server + + + Authentication is only available on the MS .NET 1.1 runtime. + + A and must be specified when + is set to , + otherwise the username will be ignored. + + + + + + The password to use to authenticate with the SMTP server + + + Authentication is only available on the MS .NET 1.1 runtime. + + A and must be specified when + is set to , + otherwise the password will be ignored. + + + + + + The port on which the SMTP server is listening + + + Server Port is only available on the MS .NET 1.1 runtime. + + The port on which the SMTP server is listening. The default + port is 25. The Port can only be changed when running on + the MS .NET 1.1 runtime. + + + + + + Gets or sets the priority of the e-mail message + + + One of the values. + + + + Sets the priority of the e-mails generated by this + appender. The default priority is . + + + If you are using this appender to report errors then + you may want to set the priority to . + + + + + + Enable or disable use of SSL when sending e-mail message + + + This is available on MS .NET 2.0 runtime and higher + + + + + Gets or sets the reply-to e-mail address. + + + This is available on MS .NET 2.0 runtime and higher + + + + + Gets or sets the subject encoding to be used. + + + The default encoding is the operating system's current ANSI codepage. + + + + + Gets or sets the body encoding to be used. + + + The default encoding is the operating system's current ANSI codepage. + + + + + Sends the contents of the cyclic buffer as an e-mail message. + + The logging events to send. + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Send the email message + + the body text to include in the mail + + + + Values for the property. + + + + SMTP authentication modes. + + + + + + No authentication + + + + + Basic authentication. + + + Requires a username and password to be supplied + + + + + Integrated authentication + + + Uses the Windows credentials from the current thread or process to authenticate. + + + + + trims leading and trailing commas or semicolons + + + + + Send an email when a specific logging event occurs, typically on errors + or fatal errors. Rather than sending via smtp it writes a file into the + directory specified by . This allows services such + as the IIS SMTP agent to manage sending the messages. + + + + The configuration for this appender is identical to that of the SMTPAppender, + except that instead of specifying the SMTPAppender.SMTPHost you specify + . + + + The number of logging events delivered in this e-mail depend on + the value of option. The + keeps only the last + logging events in its + cyclic buffer. This keeps memory requirements at a reasonable level while + still delivering useful application context. + + + Niall Daley + Nicko Cadell + + + + Default constructor + + + + Default constructor + + + + + + Gets or sets a semicolon-delimited list of recipient e-mail addresses. + + + A semicolon-delimited list of e-mail addresses. + + + + A semicolon-delimited list of e-mail addresses. + + + + + + Gets or sets the e-mail address of the sender. + + + The e-mail address of the sender. + + + + The e-mail address of the sender. + + + + + + Gets or sets the subject line of the e-mail message. + + + The subject line of the e-mail message. + + + + The subject line of the e-mail message. + + + + + + Gets or sets the path to write the messages to. + + + + Gets or sets the path to write the messages to. This should be the same + as that used by the agent sending the messages. + + + + + + Gets or sets the file extension for the generated files + + + The file extension for the generated files + + + + The file extension for the generated files + + + + + + Gets or sets the used to write to the pickup directory. + + + The used to write to the pickup directory. + + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + Sends the contents of the cyclic buffer as an e-mail message. + + The logging events to send. + + + Sends the contents of the cyclic buffer as an e-mail message. + + + + + + Activate the options on this appender. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Convert a path into a fully qualified path. + + The path to convert. + The fully qualified path. + + + Converts the path specified to a fully + qualified path. If the path is relative it is + taken as relative from the application base + directory. + + + + + + The security context to use for privileged calls + + + + + Appender that allows clients to connect via Telnet to receive log messages + + + + The TelnetAppender accepts socket connections and streams logging messages + back to the client. + The output is provided in a telnet-friendly way so that a log can be monitored + over a TCP/IP socket. + This allows simple remote monitoring of application logging. + + + The default is 23 (the telnet port). + + + Keith Long + Nicko Cadell + + + + Default constructor + + + + Default constructor + + + + + + The fully qualified type of the TelnetAppender class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Gets or sets the TCP port number on which this will listen for connections. + + + An integer value in the range to + indicating the TCP port number on which this will listen for connections. + + + + The default value is 23 (the telnet port). + + + The value specified is less than + or greater than . + + + + Overrides the parent method to close the socket handler + + + + Closes all the outstanding connections. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Initialize the appender based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + Create the socket handler and wait for connections + + + + + + Writes the logging event to each connected client. + + The event to log. + + + Writes the logging event to each connected client. + + + + + + Helper class to manage connected clients + + + + The SocketHandler class is used to accept connections from + clients. It is threaded so that clients can connect/disconnect + asynchronously. + + + + + + Class that represents a client connected to this handler + + + + Class that represents a client connected to this handler + + + + + + Create this for the specified + + the client's socket + + + Opens a stream writer on the socket. + + + + + + Write a string to the client + + string to send + + + Write a string to the client + + + + + + Cleanup the clients connection + + + + Close the socket connection. + + + + + + Opens a new server port on + + the local port to listen on for connections + + + Creates a socket handler on the specified local server port. + + + + + + Sends a string message to each of the connected clients + + the text to send + + + Sends a string message to each of the connected clients + + + + + + Add a client to the internal clients list + + client to add + + + + Remove a client from the internal clients list + + client to remove + + + + Test if this handler has active connections + + + true if this handler has active connections + + + + This property will be true while this handler has + active connections, that is at least one connection that + the handler will attempt to send a message to. + + + + + + Callback used to accept a connection on the server socket + + The result of the asynchronous operation + + + On connection adds to the list of connections + if there are two many open connections you will be disconnected + + + + + + Close all network connections + + + + Make sure we close all network connections + + + + + + Sends logging events to a . + + + + An Appender that writes to a . + + + This appender may be used stand alone if initialized with an appropriate + writer, however it is typically used as a base class for an appender that + can open a to write to. + + + Nicko Cadell + Gert Driesen + Douglas de la Torre + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Initializes a new instance of the class and + sets the output destination to a new initialized + with the specified . + + The layout to use with this appender. + The to output to. + + + Obsolete constructor. + + + + + + Initializes a new instance of the class and sets + the output destination to the specified . + + The layout to use with this appender + The to output to + + The must have been previously opened. + + + + Obsolete constructor. + + + + + + Gets or set whether the appender will flush at the end + of each append operation. + + + + The default behavior is to flush at the end of each + append operation. + + + If this option is set to false, then the underlying + stream can defer persisting the logging event to a later + time. + + + + Avoiding the flush operation at the end of each append results in + a performance gain of 10 to 20 percent. However, there is safety + trade-off involved in skipping flushing. Indeed, when flushing is + skipped, then it is likely that the last few log events will not + be recorded on disk when the application exits. This is a high + price to pay even for a 20% performance gain. + + + + + Sets the where the log output will go. + + + + The specified must be open and writable. + + + The will be closed when the appender + instance is closed. + + + Note: Logging to an unopened will fail. + + + + + + This method determines if there is a sense in attempting to append. + + + + This method checks if an output target has been set and if a + layout has been set. + + + false if any of the preconditions fail. + + + + This method is called by the + method. + + The event to log. + + + Writes a log statement to the output stream if the output stream exists + and is writable. + + + The format of the output will depend on the appender's layout. + + + + + + This method is called by the + method. + + The array of events to log. + + + This method writes all the bulk logged events to the output writer + before flushing the stream. + + + + + + Close this appender instance. The underlying stream or writer is also closed. + + + Closed appenders cannot be reused. + + + + + Gets or set the and the underlying + , if any, for this appender. + + + The for this appender. + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Writes the footer and closes the underlying . + + + + Writes the footer and closes the underlying . + + + + + + Closes the underlying . + + + + Closes the underlying . + + + + + + Clears internal references to the underlying + and other variables. + + + + Subclasses can override this method for an alternate closing behavior. + + + + + + Writes a footer as produced by the embedded layout's property. + + + + Writes a footer as produced by the embedded layout's property. + + + + + + Writes a header produced by the embedded layout's property. + + + + Writes a header produced by the embedded layout's property. + + + + + + Called to allow a subclass to lazily initialize the writer + + + + This method is called when an event is logged and the or + have not been set. This allows a subclass to + attempt to initialize the writer multiple times. + + + + + + Gets or sets the where logging events + will be written to. + + + The where logging events are written. + + + + This is the where logging events + will be written to. + + + + + + This is the where logging events + will be written to. + + + + + Immediate flush means that the underlying + or output stream will be flushed at the end of each append operation. + + + + Immediate flush is slower but ensures that each append request is + actually written. If is set to + false, then there is a good chance that the last few + logging events are not actually persisted if and when the application + crashes. + + + The default value is true. + + + + + + The fully qualified type of the TextWriterAppender class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Flushes any buffered log data. + + The maximum time to wait for logging events to be flushed. + True if all logging events were flushed successfully, else false. + + + + Appends log events to the system. + + + + The application configuration file can be used to control what listeners + are actually used. See the MSDN documentation for the + class for details on configuring the + trace system. + + + Events are written using the System.Diagnostics.Trace.Write(string,string) + method. The event's logger name is the default value for the category parameter + of the Write method. + + + Compact Framework
+ The Compact Framework does not support the + class for any operation except Assert. When using the Compact Framework this + appender will write to the system rather than + the Trace system. This appender will therefore behave like the . +
+
+ Douglas de la Torre + Nicko Cadell + Gert Driesen + Ron Grabowski +
+ + + Initializes a new instance of the . + + + + Default constructor. + + + + + + Initializes a new instance of the + with a specified layout. + + The layout to use with this appender. + + + Obsolete constructor. + + + + + + Gets or sets a value that indicates whether the appender will + flush at the end of each write. + + + The default behavior is to flush at the end of each + write. If the option is set tofalse, then the underlying + stream can defer writing to physical medium to a later time. + + + Avoiding the flush operation at the end of each append results + in a performance gain of 10 to 20 percent. However, there is safety + trade-off involved in skipping flushing. Indeed, when flushing is + skipped, then it is likely that the last few log events will not + be recorded on disk when the application exits. This is a high + price to pay even for a 20% performance gain. + + + + + + The category parameter sent to the Trace method. + + + + Defaults to %logger which will use the logger name of the current + as the category parameter. + + + + + + + + Writes the logging event to the system. + + The event to log. + + + Writes the logging event to the system. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Immediate flush means that the underlying writer or output stream + will be flushed at the end of each append operation. + + + + Immediate flush is slower but ensures that each append request is + actually written. If is set to + false, then there is a good chance that the last few + logs events are not actually written to persistent media if and + when the application crashes. + + + The default value is true. + + + + + Defaults to %logger + + + + + Flushes any buffered log data. + + The maximum time to wait for logging events to be flushed. + True if all logging events were flushed successfully, else false. + + + + Sends logging events as connectionless UDP datagrams to a remote host or a + multicast group using an . + + + + UDP guarantees neither that messages arrive, nor that they arrive in the correct order. + + + To view the logging results, a custom application can be developed that listens for logging + events. + + + When decoding events send via this appender remember to use the same encoding + to decode the events as was used to send the events. See the + property to specify the encoding to use. + + + + This example shows how to log receive logging events that are sent + on IP address 244.0.0.1 and port 8080 to the console. The event is + encoded in the packet as a unicode string and it is decoded as such. + + IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 0); + UdpClient udpClient; + byte[] buffer; + string loggingEvent; + + try + { + udpClient = new UdpClient(8080); + + while(true) + { + buffer = udpClient.Receive(ref remoteEndPoint); + loggingEvent = System.Text.Encoding.Unicode.GetString(buffer); + Console.WriteLine(loggingEvent); + } + } + catch(Exception e) + { + Console.WriteLine(e.ToString()); + } + + + Dim remoteEndPoint as IPEndPoint + Dim udpClient as UdpClient + Dim buffer as Byte() + Dim loggingEvent as String + + Try + remoteEndPoint = new IPEndPoint(IPAddress.Any, 0) + udpClient = new UdpClient(8080) + + While True + buffer = udpClient.Receive(ByRef remoteEndPoint) + loggingEvent = System.Text.Encoding.Unicode.GetString(buffer) + Console.WriteLine(loggingEvent) + Wend + Catch e As Exception + Console.WriteLine(e.ToString()) + End Try + + + An example configuration section to log information using this appender to the + IP 224.0.0.1 on port 8080: + + + + + + + + + + Gert Driesen + Nicko Cadell + + + + Initializes a new instance of the class. + + + The default constructor initializes all fields to their default values. + + + + + Gets or sets the IP address of the remote host or multicast group to which + the underlying should sent the logging event. + + + The IP address of the remote host or multicast group to which the logging event + will be sent. + + + + Multicast addresses are identified by IP class D addresses (in the range 224.0.0.0 to + 239.255.255.255). Multicast packets can pass across different networks through routers, so + it is possible to use multicasts in an Internet scenario as long as your network provider + supports multicasting. + + + Hosts that want to receive particular multicast messages must register their interest by joining + the multicast group. Multicast messages are not sent to networks where no host has joined + the multicast group. Class D IP addresses are used for multicast groups, to differentiate + them from normal host addresses, allowing nodes to easily detect if a message is of interest. + + + Static multicast addresses that are needed globally are assigned by IANA. A few examples are listed in the table below: + + + + + IP Address + Description + + + 224.0.0.1 + + + Sends a message to all system on the subnet. + + + + + 224.0.0.2 + + + Sends a message to all routers on the subnet. + + + + + 224.0.0.12 + + + The DHCP server answers messages on the IP address 224.0.0.12, but only on a subnet. + + + + + + + A complete list of actually reserved multicast addresses and their owners in the ranges + defined by RFC 3171 can be found at the IANA web site. + + + The address range 239.0.0.0 to 239.255.255.255 is reserved for administrative scope-relative + addresses. These addresses can be reused with other local groups. Routers are typically + configured with filters to prevent multicast traffic in this range from flowing outside + of the local network. + + + + + + Gets or sets the TCP port number of the remote host or multicast group to which + the underlying should sent the logging event. + + + An integer value in the range to + indicating the TCP port number of the remote host or multicast group to which the logging event + will be sent. + + + The underlying will send messages to this TCP port number + on the remote host or multicast group. + + The value specified is less than or greater than . + + + + Gets or sets the TCP port number from which the underlying will communicate. + + + An integer value in the range to + indicating the TCP port number from which the underlying will communicate. + + + + The underlying will bind to this port for sending messages. + + + Setting the value to 0 (the default) will cause the udp client not to bind to + a local port. + + + The value specified is less than or greater than . + + + + Gets or sets used to write the packets. + + + The used to write the packets. + + + + The used to write the packets. + + + + + + Gets or sets the underlying . + + + The underlying . + + + creates a to send logging events + over a network. Classes deriving from can use this + property to get or set this . Use the underlying + returned from if you require access beyond that which + provides. + + + + + Gets or sets the cached remote endpoint to which the logging events should be sent. + + + The cached remote endpoint to which the logging events will be sent. + + + The method will initialize the remote endpoint + with the values of the and + properties. + + + + + Initialize the appender based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + The appender will be ignored if no was specified or + an invalid remote or local TCP port number was specified. + + + The required property was not specified. + The TCP port number assigned to or is less than or greater than . + + + + This method is called by the method. + + The event to log. + + + Sends the event using an UDP datagram. + + + Exceptions are passed to the . + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Closes the UDP connection and releases all resources associated with + this instance. + + + + Disables the underlying and releases all managed + and unmanaged resources associated with the . + + + + + + Initializes the underlying connection. + + + + The underlying is initialized and binds to the + port number from which you intend to communicate. + + + Exceptions are passed to the . + + + + + + The IP address of the remote host or multicast group to which + the logging event will be sent. + + + + + The TCP port number of the remote host or multicast group to + which the logging event will be sent. + + + + + The cached remote endpoint to which the logging events will be sent. + + + + + The TCP port number from which the will communicate. + + + + + The instance that will be used for sending the + logging events. + + + + + The encoding to use for the packet. + + + + + Assembly level attribute that specifies a domain to alias to this assembly's repository. + + + + AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute. + + + An assembly's logger repository is defined by its , + however this can be overridden by an assembly loaded before the target assembly. + + + An assembly can alias another assembly's domain to its repository by + specifying this attribute with the name of the target domain. + + + This attribute can only be specified on the assembly and may be used + as many times as necessary to alias all the required domains. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class with + the specified domain to alias to this assembly's repository. + + The domain to alias to this assemby's repository. + + + Obsolete. Use instead of . + + + + + + Assembly level attribute that specifies a repository to alias to this assembly's repository. + + + + An assembly's logger repository is defined by its , + however this can be overridden by an assembly loaded before the target assembly. + + + An assembly can alias another assembly's repository to its repository by + specifying this attribute with the name of the target repository. + + + This attribute can only be specified on the assembly and may be used + as many times as necessary to alias all the required repositories. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class with + the specified repository to alias to this assembly's repository. + + The repository to alias to this assemby's repository. + + + Initializes a new instance of the class with + the specified repository to alias to this assembly's repository. + + + + + + Gets or sets the repository to alias to this assemby's repository. + + + The repository to alias to this assemby's repository. + + + + The name of the repository to alias to this assemby's repository. + + + + + + Use this class to quickly configure a . + + + + Allows very simple programmatic configuration of log4net. + + + Only one appender can be configured using this configurator. + The appender is set at the root of the hierarchy and all logging + events will be delivered to that appender. + + + Appenders can also implement the interface. Therefore + they would require that the method + be called after the appenders properties have been configured. + + + Nicko Cadell + Gert Driesen + + + + The fully qualified type of the BasicConfigurator class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + Initializes the log4net system with a default configuration. + + + + Initializes the log4net logging system using a + that will write to Console.Out. The log messages are + formatted using the layout object + with the + layout style. + + + + + + Initializes the log4net system using the specified appenders. + + The appenders to use to log all logging events. + + + Initializes the log4net system using the specified appenders. + + + + + + Initializes the log4net system using the specified appender. + + The appender to use to log all logging events. + + + Initializes the log4net system using the specified appender. + + + + + + Initializes the with a default configuration. + + The repository to configure. + + + Initializes the specified repository using a + that will write to Console.Out. The log messages are + formatted using the layout object + with the + layout style. + + + + + + Initializes the using the specified appender. + + The repository to configure. + The appender to use to log all logging events. + + + Initializes the using the specified appender. + + + + + + Initializes the using the specified appenders. + + The repository to configure. + The appenders to use to log all logging events. + + + Initializes the using the specified appender. + + + + + + Base class for all log4net configuration attributes. + + + This is an abstract class that must be extended by + specific configurators. This attribute allows the + configurator to be parameterized by an assembly level + attribute. + + Nicko Cadell + Gert Driesen + + + + Constructor used by subclasses. + + the ordering priority for this configurator + + + The is used to order the configurator + attributes before they are invoked. Higher priority configurators are executed + before lower priority ones. + + + + + + Configures the for the specified assembly. + + The assembly that this attribute was defined on. + The repository to configure. + + + Abstract method implemented by a subclass. When this method is called + the subclass should configure the . + + + + + + Compare this instance to another ConfiguratorAttribute + + the object to compare to + see + + + Compares the priorities of the two instances. + Sorts by priority in descending order. Objects with the same priority are + randomly ordered. + + + + + + Assembly level attribute that specifies the logging domain for the assembly. + + + + DomainAttribute is obsolete. Use RepositoryAttribute instead of DomainAttribute. + + + Assemblies are mapped to logging domains. Each domain has its own + logging repository. This attribute specified on the assembly controls + the configuration of the domain. The property specifies the name + of the domain that this assembly is a part of. The + specifies the type of the repository objects to create for the domain. If + this attribute is not specified and a is not specified + then the assembly will be part of the default shared logging domain. + + + This attribute can only be specified on the assembly and may only be used + once per assembly. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Obsolete. Use RepositoryAttribute instead of DomainAttribute. + + + + + + Initialize a new instance of the class + with the name of the domain. + + The name of the domain. + + + Obsolete. Use RepositoryAttribute instead of DomainAttribute. + + + + + + Use this class to initialize the log4net environment using an Xml tree. + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + Configures a using an Xml tree. + + + Nicko Cadell + Gert Driesen + + + + Private constructor + + + + + Automatically configures the log4net system based on the + application's configuration settings. + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + Each application has a configuration file. This has the + same name as the application with '.config' appended. + This file is XML and calling this function prompts the + configurator to look in that file for a section called + log4net that contains the configuration data. + + + + + Automatically configures the using settings + stored in the application's configuration file. + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + Each application has a configuration file. This has the + same name as the application with '.config' appended. + This file is XML and calling this function prompts the + configurator to look in that file for a section called + log4net that contains the configuration data. + + The repository to configure. + + + + Configures log4net using a log4net element + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + Loads the log4net configuration from the XML element + supplied as . + + The element to parse. + + + + Configures the using the specified XML + element. + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + Loads the log4net configuration from the XML element + supplied as . + + The repository to configure. + The element to parse. + + + + Configures log4net using the specified configuration file. + + The XML file to load the configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + The log4net configuration file can possible be specified in the application's + configuration file (either MyAppName.exe.config for a + normal application on Web.config for an ASP.NET application). + + + The following example configures log4net using a configuration file, of which the + location is stored in the application's configuration file : + + + using log4net.Config; + using System.IO; + using System.Configuration; + + ... + + DOMConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); + + + In the .config file, the path to the log4net can be specified like this : + + + + + + + + + + + + + Configures log4net using the specified configuration file. + + A stream to load the XML configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + Note that this method will NOT close the stream parameter. + + + + + + Configures the using the specified configuration + file. + + The repository to configure. + The XML file to load the configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The log4net configuration file can possible be specified in the application's + configuration file (either MyAppName.exe.config for a + normal application on Web.config for an ASP.NET application). + + + The following example configures log4net using a configuration file, of which the + location is stored in the application's configuration file : + + + using log4net.Config; + using System.IO; + using System.Configuration; + + ... + + DOMConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); + + + In the .config file, the path to the log4net can be specified like this : + + + + + + + + + + + + + Configures the using the specified configuration + file. + + The repository to configure. + The stream to load the XML configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + Note that this method will NOT close the stream parameter. + + + + + + Configures log4net using the file specified, monitors the file for changes + and reloads the configuration if a change is detected. + + The XML file to load the configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The configuration file will be monitored using a + and depends on the behavior of that class. + + + For more information on how to configure log4net using + a separate configuration file, see . + + + + + + + Configures the using the file specified, + monitors the file for changes and reloads the configuration if a change + is detected. + + The repository to configure. + The XML file to load the configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The configuration file will be monitored using a + and depends on the behavior of that class. + + + For more information on how to configure log4net using + a separate configuration file, see . + + + + + + + Assembly level attribute to configure the . + + + + AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute. + + + This attribute may only be used at the assembly scope and can only + be used once per assembly. + + + Use this attribute to configure the + without calling one of the + methods. + + + Nicko Cadell + Gert Driesen + + + + Class to register for the log4net section of the configuration file + + + The log4net section of the configuration file needs to have a section + handler registered. This is the section handler used. It simply returns + the XML element that is the root of the section. + + + Example of registering the log4net section handler : + + + +
+ + + log4net configuration XML goes here + + + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Parses the configuration section. + + The configuration settings in a corresponding parent configuration section. + The configuration context when called from the ASP.NET configuration system. Otherwise, this parameter is reserved and is a null reference. + The for the log4net section. + The for the log4net section. + + + Returns the containing the configuration data, + + + + + + Assembly level attribute that specifies a plugin to attach to + the repository. + + + + Specifies the type of a plugin to create and attach to the + assembly's repository. The plugin type must implement the + interface. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class + with the specified type. + + The type name of plugin to create. + + + Create the attribute with the plugin type specified. + + + Where possible use the constructor that takes a . + + + + + + Initializes a new instance of the class + with the specified type. + + The type of plugin to create. + + + Create the attribute with the plugin type specified. + + + + + + Gets or sets the type for the plugin. + + + The type for the plugin. + + + + The type for the plugin. + + + + + + Gets or sets the type name for the plugin. + + + The type name for the plugin. + + + + The type name for the plugin. + + + Where possible use the property instead. + + + + + + Creates the plugin object defined by this attribute. + + + + Creates the instance of the object as + specified by this attribute. + + + The plugin object. + + + + Returns a representation of the properties of this object. + + + + Overrides base class method to + return a representation of the properties of this object. + + + A representation of the properties of this object + + + + Assembly level attribute that specifies the logging repository for the assembly. + + + + Assemblies are mapped to logging repository. This attribute specified + on the assembly controls + the configuration of the repository. The property specifies the name + of the repository that this assembly is a part of. The + specifies the type of the object + to create for the assembly. If this attribute is not specified or a + is not specified then the assembly will be part of the default shared logging repository. + + + This attribute can only be specified on the assembly and may only be used + once per assembly. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Initialize a new instance of the class + with the name of the repository. + + The name of the repository. + + + Initialize the attribute with the name for the assembly's repository. + + + + + + Gets or sets the name of the logging repository. + + + The string name to use as the name of the repository associated with this + assembly. + + + + This value does not have to be unique. Several assemblies can share the + same repository. They will share the logging configuration of the repository. + + + + + + Gets or sets the type of repository to create for this assembly. + + + The type of repository to create for this assembly. + + + + The type of the repository to create for the assembly. + The type must implement the + interface. + + + This will be the type of repository created when + the repository is created. If multiple assemblies reference the + same repository then the repository is only created once using the + of the first assembly to call into the + repository. + + + + + + Assembly level attribute to configure the . + + + + This attribute may only be used at the assembly scope and can only + be used once per assembly. + + + Use this attribute to configure the + without calling one of the + methods. + + + Nicko Cadell + + + + Construct provider attribute with type specified + + the type of the provider to use + + + The provider specified must subclass the + class. + + + + + + Gets or sets the type of the provider to use. + + + the type of the provider to use. + + + + The provider specified must subclass the + class. + + + + + + Configures the SecurityContextProvider + + The assembly that this attribute was defined on. + The repository to configure. + + + Creates a provider instance from the specified. + Sets this as the default security context provider . + + + + + + The fully qualified type of the SecurityContextProviderAttribute class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Use this class to initialize the log4net environment using an Xml tree. + + + + Configures a using an Xml tree. + + + Nicko Cadell + Gert Driesen + + + + Private constructor + + + + + Automatically configures the using settings + stored in the application's configuration file. + + + + Each application has a configuration file. This has the + same name as the application with '.config' appended. + This file is XML and calling this function prompts the + configurator to look in that file for a section called + log4net that contains the configuration data. + + + To use this method to configure log4net you must specify + the section + handler for the log4net configuration section. See the + for an example. + + + The repository to configure. + + + + Automatically configures the log4net system based on the + application's configuration settings. + + + + Each application has a configuration file. This has the + same name as the application with '.config' appended. + This file is XML and calling this function prompts the + configurator to look in that file for a section called + log4net that contains the configuration data. + + + To use this method to configure log4net you must specify + the section + handler for the log4net configuration section. See the + for an example. + + + + + + + Configures log4net using a log4net element + + + + Loads the log4net configuration from the XML element + supplied as . + + + The element to parse. + + + + Configures log4net using the specified configuration file. + + The XML file to load the configuration from. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + The log4net configuration file can possible be specified in the application's + configuration file (either MyAppName.exe.config for a + normal application on Web.config for an ASP.NET application). + + + The first element matching <configuration> will be read as the + configuration. If this file is also a .NET .config file then you must specify + a configuration section for the log4net element otherwise .NET will + complain. Set the type for the section handler to , for example: + + +
+ + + + + The following example configures log4net using a configuration file, of which the + location is stored in the application's configuration file : + + + using log4net.Config; + using System.IO; + using System.Configuration; + + ... + + XmlConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); + + + In the .config file, the path to the log4net can be specified like this : + + + + + + + + + + + + + Configures log4net using the specified configuration URI. + + A URI to load the XML configuration from. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + The must support the URI scheme specified. + + + + + + Configures log4net using the specified configuration data stream. + + A stream to load the XML configuration from. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + Note that this method will NOT close the stream parameter. + + + + + + Configures the using the specified XML + element. + + + Loads the log4net configuration from the XML element + supplied as . + + The repository to configure. + The element to parse. + + + + Configures the using the specified configuration + file. + + The repository to configure. + The XML file to load the configuration from. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The log4net configuration file can possible be specified in the application's + configuration file (either MyAppName.exe.config for a + normal application on Web.config for an ASP.NET application). + + + The first element matching <configuration> will be read as the + configuration. If this file is also a .NET .config file then you must specify + a configuration section for the log4net element otherwise .NET will + complain. Set the type for the section handler to , for example: + + +
+ + + + + The following example configures log4net using a configuration file, of which the + location is stored in the application's configuration file : + + + using log4net.Config; + using System.IO; + using System.Configuration; + + ... + + XmlConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); + + + In the .config file, the path to the log4net can be specified like this : + + + + + + + + + + + + + Configures the using the specified configuration + URI. + + The repository to configure. + A URI to load the XML configuration from. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The must support the URI scheme specified. + + + + + + Configures the using the specified configuration + file. + + The repository to configure. + The stream to load the XML configuration from. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + Note that this method will NOT close the stream parameter. + + + + + + Configures log4net using the file specified, monitors the file for changes + and reloads the configuration if a change is detected. + + The XML file to load the configuration from. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The configuration file will be monitored using a + and depends on the behavior of that class. + + + For more information on how to configure log4net using + a separate configuration file, see . + + + + + + + Configures the using the file specified, + monitors the file for changes and reloads the configuration if a change + is detected. + + The repository to configure. + The XML file to load the configuration from. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The configuration file will be monitored using a + and depends on the behavior of that class. + + + For more information on how to configure log4net using + a separate configuration file, see . + + + + + + + Class used to watch config files. + + + + Uses the to monitor + changes to a specified file. Because multiple change notifications + may be raised when the file is modified, a timer is used to + compress the notifications into a single event. The timer + waits for time before delivering + the event notification. If any further + change notifications arrive while the timer is waiting it + is reset and waits again for to + elapse. + + + + + + Holds the FileInfo used to configure the XmlConfigurator + + + + + Holds the repository being configured. + + + + + The timer used to compress the notification events. + + + + + The default amount of time to wait after receiving notification + before reloading the config file. + + + + + Watches file for changes. This object should be disposed when no longer + needed to free system handles on the watched resources. + + + + + Initializes a new instance of the class to + watch a specified config file used to configure a repository. + + The repository to configure. + The configuration file to watch. + + + Initializes a new instance of the class. + + + + + + Event handler used by . + + The firing the event. + The argument indicates the file that caused the event to be fired. + + + This handler reloads the configuration from the file when the event is fired. + + + + + + Event handler used by . + + The firing the event. + The argument indicates the file that caused the event to be fired. + + + This handler reloads the configuration from the file when the event is fired. + + + + + + Called by the timer when the configuration has been updated. + + null + + + + Release the handles held by the watcher and timer. + + + + + Configures the specified repository using a log4net element. + + The hierarchy to configure. + The element to parse. + + + Loads the log4net configuration from the XML element + supplied as . + + + This method is ultimately called by one of the Configure methods + to load the configuration from an . + + + + + + Maps repository names to ConfigAndWatchHandler instances to allow a particular + ConfigAndWatchHandler to dispose of its FileSystemWatcher when a repository is + reconfigured. + + + + + The fully qualified type of the XmlConfigurator class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Assembly level attribute to configure the . + + + + This attribute may only be used at the assembly scope and can only + be used once per assembly. + + + Use this attribute to configure the + without calling one of the + methods. + + + If neither of the or + properties are set the configuration is loaded from the application's .config file. + If set the property takes priority over the + property. The property + specifies a path to a file to load the config from. The path is relative to the + application's base directory; . + The property is used as a postfix to the assembly file name. + The config file must be located in the application's base directory; . + For example in a console application setting the to + config has the same effect as not specifying the or + properties. + + + The property can be set to cause the + to watch the configuration file for changes. + + + + Log4net will only look for assembly level configuration attributes once. + When using the log4net assembly level attributes to control the configuration + of log4net you must ensure that the first call to any of the + methods is made from the assembly with the configuration + attributes. + + + If you cannot guarantee the order in which log4net calls will be made from + different assemblies you must use programmatic configuration instead, i.e. + call the method directly. + + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Default constructor + + + + + + Gets or sets the filename of the configuration file. + + + The filename of the configuration file. + + + + If specified, this is the name of the configuration file to use with + the . This file path is relative to the + application base directory (). + + + The takes priority over the . + + + + + + Gets or sets the extension of the configuration file. + + + The extension of the configuration file. + + + + If specified this is the extension for the configuration file. + The path to the config file is built by using the application + base directory (), + the assembly file name and the config file extension. + + + If the is set to MyExt then + possible config file names would be: MyConsoleApp.exe.MyExt or + MyClassLibrary.dll.MyExt. + + + The takes priority over the . + + + + + + Gets or sets a value indicating whether to watch the configuration file. + + + true if the configuration should be watched, false otherwise. + + + + If this flag is specified and set to true then the framework + will watch the configuration file and will reload the config each time + the file is modified. + + + The config file can only be watched if it is loaded from local disk. + In a No-Touch (Smart Client) deployment where the application is downloaded + from a web server the config file may not reside on the local disk + and therefore it may not be able to watch it. + + + Watching configuration is not supported on the SSCLI. + + + + + + Configures the for the specified assembly. + + The assembly that this attribute was defined on. + The repository to configure. + + + Configure the repository using the . + The specified must extend the + class otherwise the will not be able to + configure it. + + + The does not extend . + + + + Attempt to load configuration from the local file system + + The assembly that this attribute was defined on. + The repository to configure. + + + + Configure the specified repository using a + + The repository to configure. + the FileInfo pointing to the config file + + + + Attempt to load configuration from a URI + + The assembly that this attribute was defined on. + The repository to configure. + + + + The fully qualified type of the XmlConfiguratorAttribute class. + + + Used by the internal logger to record the Type of the + log message. + + + + + The implementation of the interface suitable + for use with the compact framework + + + + This implementation is a simple + mapping between repository name and + object. + + + The .NET Compact Framework 1.0 does not support retrieving assembly + level attributes therefore unlike the DefaultRepositorySelector + this selector does not examine the calling assembly for attributes. + + + Nicko Cadell + + + + Create a new repository selector + + the type of the repositories to create, must implement + + + Create an new compact repository selector. + The default type for repositories must be specified, + an appropriate value would be . + + + throw if is null + throw if does not implement + + + + Get the for the specified assembly + + not used + The default + + + The argument is not used. This selector does not create a + separate repository for each assembly. + + + As a named repository is not specified the default repository is + returned. The default repository is named log4net-default-repository. + + + + + + Get the named + + the name of the repository to lookup + The named + + + Get the named . The default + repository is log4net-default-repository. Other repositories + must be created using the . + If the named repository does not exist an exception is thrown. + + + throw if is null + throw if the does not exist + + + + Create a new repository for the assembly specified + + not used + the type of repository to create, must implement + the repository created + + + The argument is not used. This selector does not create a + separate repository for each assembly. + + + If the is null then the + default repository type specified to the constructor is used. + + + As a named repository is not specified the default repository is + returned. The default repository is named log4net-default-repository. + + + + + + Create a new repository for the repository specified + + the repository to associate with the + the type of repository to create, must implement . + If this param is null then the default repository type is used. + the repository created + + + The created will be associated with the repository + specified such that a call to with the + same repository specified will return the same repository instance. + + + If the named repository already exists an exception will be thrown. + + + If is null then the default + repository type specified to the constructor is used. + + + throw if is null + throw if the already exists + + + + Test if a named repository exists + + the named repository to check + true if the repository exists + + + Test if a named repository exists. Use + to create a new repository and to retrieve + a repository. + + + + + + Gets a list of objects + + an array of all known objects + + + Gets an array of all of the repositories created by this selector. + + + + + + The fully qualified type of the CompactRepositorySelector class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Event to notify that a logger repository has been created. + + + Event to notify that a logger repository has been created. + + + + Event raised when a new repository is created. + The event source will be this selector. The event args will + be a which + holds the newly created . + + + + + + Notify the registered listeners that the repository has been created + + The repository that has been created + + + Raises the LoggerRepositoryCreatedEvent + event. + + + + + + The default implementation of the interface. + + + + Uses attributes defined on the calling assembly to determine how to + configure the hierarchy for the repository. + + + Nicko Cadell + Gert Driesen + + + + Event to notify that a logger repository has been created. + + + Event to notify that a logger repository has been created. + + + + Event raised when a new repository is created. + The event source will be this selector. The event args will + be a which + holds the newly created . + + + + + + Creates a new repository selector. + + The type of the repositories to create, must implement + + + Create an new repository selector. + The default type for repositories must be specified, + an appropriate value would be . + + + is . + does not implement . + + + + Gets the for the specified assembly. + + The assembly use to lookup the . + + + The type of the created and the repository + to create can be overridden by specifying the + attribute on the . + + + The default values are to use the + implementation of the interface and to use the + as the name of the repository. + + + The created will be automatically configured using + any attributes defined on + the . + + + The for the assembly + is . + + + + Gets the for the specified repository. + + The repository to use to lookup the . + The for the specified repository. + + + Returns the named repository. If is null + a is thrown. If the repository + does not exist a is thrown. + + + Use to create a repository. + + + is . + does not exist. + + + + Create a new repository for the assembly specified + + the assembly to use to create the repository to associate with the . + The type of repository to create, must implement . + The repository created. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + The type of the created and + the repository to create can be overridden by specifying the + attribute on the + . The default values are to use the + implementation of the + interface and to use the + as the name of the repository. + + + The created will be automatically + configured using any + attributes defined on the . + + + If a repository for the already exists + that repository will be returned. An error will not be raised and that + repository may be of a different type to that specified in . + Also the attribute on the + assembly may be used to override the repository type specified in + . + + + is . + + + + Creates a new repository for the assembly specified. + + the assembly to use to create the repository to associate with the . + The type of repository to create, must implement . + The name to assign to the created repository + Set to true to read and apply the assembly attributes + The repository created. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + The type of the created and + the repository to create can be overridden by specifying the + attribute on the + . The default values are to use the + implementation of the + interface and to use the + as the name of the repository. + + + The created will be automatically + configured using any + attributes defined on the . + + + If a repository for the already exists + that repository will be returned. An error will not be raised and that + repository may be of a different type to that specified in . + Also the attribute on the + assembly may be used to override the repository type specified in + . + + + is . + + + + Creates a new repository for the specified repository. + + The repository to associate with the . + The type of repository to create, must implement . + If this param is then the default repository type is used. + The new repository. + + + The created will be associated with the repository + specified such that a call to with the + same repository specified will return the same repository instance. + + + is . + already exists. + + + + Test if a named repository exists + + the named repository to check + true if the repository exists + + + Test if a named repository exists. Use + to create a new repository and to retrieve + a repository. + + + + + + Gets a list of objects + + an array of all known objects + + + Gets an array of all of the repositories created by this selector. + + + + + + Aliases a repository to an existing repository. + + The repository to alias. + The repository that the repository is aliased to. + + + The repository specified will be aliased to the repository when created. + The repository must not already exist. + + + When the repository is created it must utilize the same repository type as + the repository it is aliased to, otherwise the aliasing will fail. + + + + is . + -or- + is . + + + + + Notifies the registered listeners that the repository has been created. + + The repository that has been created. + + + Raises the event. + + + + + + Gets the repository name and repository type for the specified assembly. + + The assembly that has a . + in/out param to hold the repository name to use for the assembly, caller should set this to the default value before calling. + in/out param to hold the type of the repository to create for the assembly, caller should set this to the default value before calling. + is . + + + + Configures the repository using information from the assembly. + + The assembly containing + attributes which define the configuration for the repository. + The repository to configure. + + is . + -or- + is . + + + + + Loads the attribute defined plugins on the assembly. + + The assembly that contains the attributes. + The repository to add the plugins to. + + is . + -or- + is . + + + + + Loads the attribute defined aliases on the assembly. + + The assembly that contains the attributes. + The repository to alias to. + + is . + -or- + is . + + + + + The fully qualified type of the DefaultRepositorySelector class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Defined error codes that can be passed to the method. + + + + Values passed to the method. + + + Nicko Cadell + + + + A general error + + + + + Error while writing output + + + + + Failed to flush file + + + + + Failed to close file + + + + + Unable to open output file + + + + + No layout specified + + + + + Failed to parse address + + + + + An evaluator that triggers on an Exception type + + + + This evaluator will trigger if the type of the Exception + passed to + is equal to a Type in . /// + + + Drew Schaeffer + + + + The type that causes the trigger to fire. + + + + + Causes subclasses of to cause the trigger to fire. + + + + + Default ctor to allow dynamic creation through a configurator. + + + + + Constructs an evaluator and initializes to trigger on + + the type that triggers this evaluator. + If true, this evaluator will trigger on subclasses of . + + + + The type that triggers this evaluator. + + + + + If true, this evaluator will trigger on subclasses of . + + + + + Is this the triggering event? + + The event to check + This method returns true, if the logging event Exception + Type is . + Otherwise it returns false + + + This evaluator will trigger if the Exception Type of the event + passed to + is . + + + + + + Interface for attaching appenders to objects. + + + + Interface for attaching, removing and retrieving appenders. + + + Nicko Cadell + Gert Driesen + + + + Attaches an appender. + + The appender to add. + + + Add the specified appender. The implementation may + choose to allow or deny duplicate appenders. + + + + + + Gets all attached appenders. + + + A collection of attached appenders. + + + + Gets a collection of attached appenders. + If there are no attached appenders the + implementation should return an empty + collection rather than null. + + + + + + Gets an attached appender with the specified name. + + The name of the appender to get. + + The appender with the name specified, or null if no appender with the + specified name is found. + + + + Returns an attached appender with the specified. + If no appender with the specified name is found null will be + returned. + + + + + + Removes all attached appenders. + + + + Removes and closes all attached appenders + + + + + + Removes the specified appender from the list of attached appenders. + + The appender to remove. + The appender removed from the list + + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + Removes the appender with the specified name from the list of appenders. + + The name of the appender to remove. + The appender removed from the list + + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + Appenders may delegate their error handling to an . + + + + Error handling is a particularly tedious to get right because by + definition errors are hard to predict and to reproduce. + + + Nicko Cadell + Gert Driesen + + + + Handles the error and information about the error condition is passed as + a parameter. + + The message associated with the error. + The that was thrown when the error occurred. + The error code associated with the error. + + + Handles the error and information about the error condition is passed as + a parameter. + + + + + + Prints the error message passed as a parameter. + + The message associated with the error. + The that was thrown when the error occurred. + + + See . + + + + + + Prints the error message passed as a parameter. + + The message associated with the error. + + + See . + + + + + + Interface for objects that require fixing. + + + + Interface that indicates that the object requires fixing before it + can be taken outside the context of the appender's + method. + + + When objects that implement this interface are stored + in the context properties maps + and + are fixed + (see ) the + method will be called. + + + Nicko Cadell + + + + Get a portable version of this object + + the portable instance of this object + + + Get a portable instance object that represents the current + state of this object. The portable object can be stored + and logged from any thread with identical results. + + + + + + Interface that all loggers implement + + + + This interface supports logging events and testing if a level + is enabled for logging. + + + These methods will not throw exceptions. Note to implementor, ensure + that the implementation of these methods cannot allow an exception + to be thrown to the caller. + + + Nicko Cadell + Gert Driesen + + + + Gets the name of the logger. + + + The name of the logger. + + + + The name of this logger + + + + + + This generic form is intended to be used by wrappers. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The level of the message to be logged. + The message object to log. + the exception to log, including its stack trace. Pass null to not log an exception. + + + Generates a logging event for the specified using + the and . + + + + + + This is the most generic printing method that is intended to be used + by wrappers. + + The event being logged. + + + Logs the specified logging event through this logger. + + + + + + Checks if this logger is enabled for a given passed as parameter. + + The level to check. + + true if this logger is enabled for level, otherwise false. + + + + Test if this logger is going to log events of the specified . + + + + + + Gets the where this + Logger instance is attached to. + + + The that this logger belongs to. + + + + Gets the where this + Logger instance is attached to. + + + + + + Base interface for all wrappers + + + + Base interface for all wrappers. + + + All wrappers must implement this interface. + + + Nicko Cadell + + + + Get the implementation behind this wrapper object. + + + The object that in implementing this object. + + + + The object that in implementing this + object. The Logger object may not + be the same object as this object because of logger decorators. + This gets the actual underlying objects that is used to process + the log events. + + + + + + Interface used to delay activate a configured object. + + + + This allows an object to defer activation of its options until all + options have been set. This is required for components which have + related options that remain ambiguous until all are set. + + + If a component implements this interface then the method + must be called by the container after its all the configured properties have been set + and before the component can be used. + + + Nicko Cadell + + + + Activate the options that were previously set with calls to properties. + + + + This allows an object to defer activation of its options until all + options have been set. This is required for components which have + related options that remain ambiguous until all are set. + + + If a component implements this interface then this method must be called + after its properties have been set before the component can be used. + + + + + + Delegate used to handle logger repository creation event notifications + + The which created the repository. + The event args + that holds the instance that has been created. + + + Delegate used to handle logger repository creation event notifications. + + + + + + Provides data for the event. + + + + A + event is raised every time a is created. + + + + + + The created + + + + + Construct instance using specified + + the that has been created + + + Construct instance using specified + + + + + + The that has been created + + + The that has been created + + + + The that has been created + + + + + + Interface used by the to select the . + + + + The uses a + to specify the policy for selecting the correct + to return to the caller. + + + Nicko Cadell + Gert Driesen + + + + Gets the for the specified assembly. + + The assembly to use to lookup to the + The for the assembly. + + + Gets the for the specified assembly. + + + How the association between and + is made is not defined. The implementation may choose any method for + this association. The results of this method must be repeatable, i.e. + when called again with the same arguments the result must be the + save value. + + + + + + Gets the named . + + The name to use to lookup to the . + The named + + Lookup a named . This is the repository created by + calling . + + + + + Creates a new repository for the assembly specified. + + The assembly to use to create the domain to associate with the . + The type of repository to create, must implement . + The repository created. + + + The created will be associated with the domain + specified such that a call to with the + same assembly specified will return the same repository instance. + + + How the association between and + is made is not defined. The implementation may choose any method for + this association. + + + + + + Creates a new repository with the name specified. + + The name to associate with the . + The type of repository to create, must implement . + The repository created. + + + The created will be associated with the name + specified such that a call to with the + same name will return the same repository instance. + + + + + + Test if a named repository exists + + the named repository to check + true if the repository exists + + + Test if a named repository exists. Use + to create a new repository and to retrieve + a repository. + + + + + + Gets an array of all currently defined repositories. + + + An array of the instances created by + this . + + + Gets an array of all of the repositories created by this selector. + + + + + + Event to notify that a logger repository has been created. + + + Event to notify that a logger repository has been created. + + + + Event raised when a new repository is created. + The event source will be this selector. The event args will + be a which + holds the newly created . + + + + + + Test if an triggers an action + + + + Implementations of this interface allow certain appenders to decide + when to perform an appender specific action. + + + The action or behavior triggered is defined by the implementation. + + + Nicko Cadell + + + + Test if this event triggers the action + + The event to check + true if this event triggers the action, otherwise false + + + Return true if this event triggers the action + + + + + + Defines the default set of levels recognized by the system. + + + + Each has an associated . + + + Levels have a numeric that defines the relative + ordering between levels. Two Levels with the same + are deemed to be equivalent. + + + The levels that are recognized by log4net are set for each + and each repository can have different levels defined. The levels are stored + in the on the repository. Levels are + looked up by name from the . + + + When logging at level INFO the actual level used is not but + the value of LoggerRepository.LevelMap["INFO"]. The default value for this is + , but this can be changed by reconfiguring the level map. + + + Each level has a in addition to its . The + is the string that is written into the output log. By default + the display name is the same as the level name, but this can be used to alias levels + or to localize the log output. + + + Some of the predefined levels recognized by the system are: + + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + + Nicko Cadell + Gert Driesen + + + + Constructor + + Integer value for this level, higher values represent more severe levels. + The string name of this level. + The display name for this level. This may be localized or otherwise different from the name + + + Initializes a new instance of the class with + the specified level name and value. + + + + + + Constructor + + Integer value for this level, higher values represent more severe levels. + The string name of this level. + + + Initializes a new instance of the class with + the specified level name and value. + + + + + + Gets the name of this level. + + + The name of this level. + + + + Gets the name of this level. + + + + + + Gets the value of this level. + + + The value of this level. + + + + Gets the value of this level. + + + + + + Gets the display name of this level. + + + The display name of this level. + + + + Gets the display name of this level. + + + + + + Returns the representation of the current + . + + + A representation of the current . + + + + Returns the level . + + + + + + Compares levels. + + The object to compare against. + true if the objects are equal. + + + Compares the levels of instances, and + defers to base class if the target object is not a + instance. + + + + + + Returns a hash code + + A hash code for the current . + + + Returns a hash code suitable for use in hashing algorithms and data + structures like a hash table. + + + Returns the hash code of the level . + + + + + + Compares this instance to a specified object and returns an + indication of their relative values. + + A instance or to compare with this instance. + + A 32-bit signed integer that indicates the relative order of the + values compared. The return value has these meanings: + + + Value + Meaning + + + Less than zero + This instance is less than . + + + Zero + This instance is equal to . + + + Greater than zero + + This instance is greater than . + -or- + is . + + + + + + + must be an instance of + or ; otherwise, an exception is thrown. + + + is not a . + + + + Returns a value indicating whether a specified + is greater than another specified . + + A + A + + true if is greater than + ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether a specified + is less than another specified . + + A + A + + true if is less than + ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether a specified + is greater than or equal to another specified . + + A + A + + true if is greater than or equal to + ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether a specified + is less than or equal to another specified . + + A + A + + true if is less than or equal to + ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether two specified + objects have the same value. + + A or . + A or . + + true if the value of is the same as the + value of ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether two specified + objects have different values. + + A or . + A or . + + true if the value of is different from + the value of ; otherwise, false. + + + + Compares two levels. + + + + + + Compares two specified instances. + + The first to compare. + The second to compare. + + A 32-bit signed integer that indicates the relative order of the + two values compared. The return value has these meanings: + + + Value + Meaning + + + Less than zero + is less than . + + + Zero + is equal to . + + + Greater than zero + is greater than . + + + + + + Compares two levels. + + + + + + The level designates a higher level than all the rest. + + + + + The level designates very severe error events. + System unusable, emergencies. + + + + + The level designates very severe error events. + System unusable, emergencies. + + + + + The level designates very severe error events + that will presumably lead the application to abort. + + + + + The level designates very severe error events. + Take immediate action, alerts. + + + + + The level designates very severe error events. + Critical condition, critical. + + + + + The level designates very severe error events. + + + + + The level designates error events that might + still allow the application to continue running. + + + + + The level designates potentially harmful + situations. + + + + + The level designates informational messages + that highlight the progress of the application at the highest level. + + + + + The level designates informational messages that + highlight the progress of the application at coarse-grained level. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates the lowest level possible. + + + + + A strongly-typed collection of objects. + + Nicko Cadell + + + + Supports type-safe iteration over a . + + + + + Gets the current element in the collection. + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Creates a read-only wrapper for a LevelCollection instance. + + list to create a readonly wrapper arround + + A LevelCollection wrapper that is read-only. + + + + + Initializes a new instance of the LevelCollection class + that is empty and has the default initial capacity. + + + + + Initializes a new instance of the LevelCollection class + that has the specified initial capacity. + + + The number of elements that the new LevelCollection is initially capable of storing. + + + + + Initializes a new instance of the LevelCollection class + that contains elements copied from the specified LevelCollection. + + The LevelCollection whose elements are copied to the new collection. + + + + Initializes a new instance of the LevelCollection class + that contains elements copied from the specified array. + + The array whose elements are copied to the new list. + + + + Initializes a new instance of the LevelCollection class + that contains elements copied from the specified collection. + + The collection whose elements are copied to the new list. + + + + Type visible only to our subclasses + Used to access protected constructor + + + + + A value + + + + + Allow subclasses to avoid our default constructors + + + + + + Gets the number of elements actually contained in the LevelCollection. + + + + + Copies the entire LevelCollection to a one-dimensional + array. + + The one-dimensional array to copy to. + + + + Copies the entire LevelCollection to a one-dimensional + array, starting at the specified index of the target array. + + The one-dimensional array to copy to. + The zero-based index in at which copying begins. + + + + Gets a value indicating whether access to the collection is synchronized (thread-safe). + + false, because the backing type is an array, which is never thread-safe. + + + + Gets an object that can be used to synchronize access to the collection. + + + + + Gets or sets the at the specified index. + + The zero-based index of the element to get or set. + + is less than zero + -or- + is equal to or greater than . + + + + + Adds a to the end of the LevelCollection. + + The to be added to the end of the LevelCollection. + The index at which the value has been added. + + + + Removes all elements from the LevelCollection. + + + + + Creates a shallow copy of the . + + A new with a shallow copy of the collection data. + + + + Determines whether a given is in the LevelCollection. + + The to check for. + true if is found in the LevelCollection; otherwise, false. + + + + Returns the zero-based index of the first occurrence of a + in the LevelCollection. + + The to locate in the LevelCollection. + + The zero-based index of the first occurrence of + in the entire LevelCollection, if found; otherwise, -1. + + + + + Inserts an element into the LevelCollection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + is less than zero + -or- + is equal to or greater than . + + + + + Removes the first occurrence of a specific from the LevelCollection. + + The to remove from the LevelCollection. + + The specified was not found in the LevelCollection. + + + + + Removes the element at the specified index of the LevelCollection. + + The zero-based index of the element to remove. + + is less than zero + -or- + is equal to or greater than . + + + + + Gets a value indicating whether the collection has a fixed size. + + true if the collection has a fixed size; otherwise, false. The default is false + + + + Gets a value indicating whether the IList is read-only. + + true if the collection is read-only; otherwise, false. The default is false + + + + Returns an enumerator that can iterate through the LevelCollection. + + An for the entire LevelCollection. + + + + Gets or sets the number of elements the LevelCollection can contain. + + + + + Adds the elements of another LevelCollection to the current LevelCollection. + + The LevelCollection whose elements should be added to the end of the current LevelCollection. + The new of the LevelCollection. + + + + Adds the elements of a array to the current LevelCollection. + + The array whose elements should be added to the end of the LevelCollection. + The new of the LevelCollection. + + + + Adds the elements of a collection to the current LevelCollection. + + The collection whose elements should be added to the end of the LevelCollection. + The new of the LevelCollection. + + + + Sets the capacity to the actual number of elements. + + + + + is less than zero + -or- + is equal to or greater than . + + + + + is less than zero + -or- + is equal to or greater than . + + + + + Supports simple iteration over a . + + + + + Initializes a new instance of the Enumerator class. + + + + + + Gets the current element in the collection. + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + An evaluator that triggers at a threshold level + + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + Nicko Cadell + + + + The threshold for triggering + + + + + Create a new evaluator using the threshold. + + + + Create a new evaluator using the threshold. + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + + + + Create a new evaluator using the specified threshold. + + the threshold to trigger at + + + Create a new evaluator using the specified threshold. + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + + + + the threshold to trigger at + + + The that will cause this evaluator to trigger + + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + + + + Is this the triggering event? + + The event to check + This method returns true, if the event level + is equal or higher than the . + Otherwise it returns false + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + + + + Mapping between string name and Level object + + + + Mapping between string name and object. + This mapping is held separately for each . + The level name is case insensitive. + + + Nicko Cadell + + + + Mapping from level name to Level object. The + level name is case insensitive + + + + + Construct the level map + + + + Construct the level map. + + + + + + Clear the internal maps of all levels + + + + Clear the internal maps of all levels + + + + + + Lookup a by name + + The name of the Level to lookup + a Level from the map with the name specified + + + Returns the from the + map with the name specified. If the no level is + found then null is returned. + + + + + + Create a new Level and add it to the map + + the string to display for the Level + the level value to give to the Level + + + Create a new Level and add it to the map + + + + + + + Create a new Level and add it to the map + + the string to display for the Level + the level value to give to the Level + the display name to give to the Level + + + Create a new Level and add it to the map + + + + + + Add a Level to the map + + the Level to add + + + Add a Level to the map + + + + + + Return all possible levels as a list of Level objects. + + all possible levels as a list of Level objects + + + Return all possible levels as a list of Level objects. + + + + + + Lookup a named level from the map + + the name of the level to lookup is taken from this level. + If the level is not set on the map then this level is added + the level in the map with the name specified + + + Lookup a named level from the map. The name of the level to lookup is taken + from the property of the + argument. + + + If no level with the specified name is found then the + argument is added to the level map + and returned. + + + + + + The internal representation of caller location information. + + + + This class uses the System.Diagnostics.StackTrace class to generate + a call stack. The caller's information is then extracted from this stack. + + + The System.Diagnostics.StackTrace class is not supported on the + .NET Compact Framework 1.0 therefore caller location information is not + available on that framework. + + + The System.Diagnostics.StackTrace class has this to say about Release builds: + + + "StackTrace information will be most informative with Debug build configurations. + By default, Debug builds include debug symbols, while Release builds do not. The + debug symbols contain most of the file, method name, line number, and column + information used in constructing StackFrame and StackTrace objects. StackTrace + might not report as many method calls as expected, due to code transformations + that occur during optimization." + + + This means that in a Release build the caller information may be incomplete or may + not exist at all! Therefore caller location information cannot be relied upon in a Release build. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + The declaring type of the method that is + the stack boundary into the logging system for this call. + + + Initializes a new instance of the + class based on the current thread. + + + + + + Constructor + + The fully qualified class name. + The method name. + The file name. + The line number of the method within the file. + + + Initializes a new instance of the + class with the specified data. + + + + + + Gets the fully qualified class name of the caller making the logging + request. + + + The fully qualified class name of the caller making the logging + request. + + + + Gets the fully qualified class name of the caller making the logging + request. + + + + + + Gets the file name of the caller. + + + The file name of the caller. + + + + Gets the file name of the caller. + + + + + + Gets the line number of the caller. + + + The line number of the caller. + + + + Gets the line number of the caller. + + + + + + Gets the method name of the caller. + + + The method name of the caller. + + + + Gets the method name of the caller. + + + + + + Gets all available caller information + + + All available caller information, in the format + fully.qualified.classname.of.caller.methodName(Filename:line) + + + + Gets all available caller information, in the format + fully.qualified.classname.of.caller.methodName(Filename:line) + + + + + + Gets the stack frames from the stack trace of the caller making the log request + + + + + The fully qualified type of the LocationInfo class. + + + Used by the internal logger to record the Type of the + log message. + + + + + When location information is not available the constant + NA is returned. Current value of this string + constant is ?. + + + + + Exception base type for log4net. + + + + This type extends . It + does not add any new functionality but does differentiate the + type of exception being thrown. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + A message to include with the exception. + + + Initializes a new instance of the class with + the specified message. + + + + + + Constructor + + A message to include with the exception. + A nested exception to include. + + + Initializes a new instance of the class + with the specified message and inner exception. + + + + + + Serialization constructor + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + Initializes a new instance of the class + with serialized data. + + + + + + Static manager that controls the creation of repositories + + + + Static manager that controls the creation of repositories + + + This class is used by the wrapper managers (e.g. ) + to provide access to the objects. + + + This manager also holds the that is used to + lookup and create repositories. The selector can be set either programmatically using + the property, or by setting the log4net.RepositorySelector + AppSetting in the applications config file to the fully qualified type name of the + selector to use. + + + Nicko Cadell + Gert Driesen + + + + Private constructor to prevent instances. Only static methods should be used. + + + + Private constructor to prevent instances. Only static methods should be used. + + + + + + Hook the shutdown event + + + + On the full .NET runtime, the static constructor hooks up the + AppDomain.ProcessExit and AppDomain.DomainUnload> events. + These are used to shutdown the log4net system as the application exits. + + + + + + Register for ProcessExit and DomainUnload events on the AppDomain + + + + This needs to be in a separate method because the events make + a LinkDemand for the ControlAppDomain SecurityPermission. Because + this is a LinkDemand it is demanded at JIT time. Therefore we cannot + catch the exception in the method itself, we have to catch it in the + caller. + + + + + + Return the default instance. + + the repository to lookup in + Return the default instance + + + Gets the for the repository specified + by the argument. + + + + + + Returns the default instance. + + The assembly to use to lookup the repository. + The default instance. + + + + Return the default instance. + + the repository to lookup in + Return the default instance + + + Gets the for the repository specified + by the argument. + + + + + + Returns the default instance. + + The assembly to use to lookup the repository. + The default instance. + + + Returns the default instance. + + + + + + Returns the named logger if it exists. + + The repository to lookup in. + The fully qualified logger name to look for. + + The logger found, or null if the named logger does not exist in the + specified repository. + + + + If the named logger exists (in the specified repository) then it + returns a reference to the logger, otherwise it returns + null. + + + + + + Returns the named logger if it exists. + + The assembly to use to lookup the repository. + The fully qualified logger name to look for. + + The logger found, or null if the named logger does not exist in the + specified assembly's repository. + + + + If the named logger exists (in the specified assembly's repository) then it + returns a reference to the logger, otherwise it returns + null. + + + + + + Returns all the currently defined loggers in the specified repository. + + The repository to lookup in. + All the defined loggers. + + + The root logger is not included in the returned array. + + + + + + Returns all the currently defined loggers in the specified assembly's repository. + + The assembly to use to lookup the repository. + All the defined loggers. + + + The root logger is not included in the returned array. + + + + + + Retrieves or creates a named logger. + + The repository to lookup in. + The name of the logger to retrieve. + The logger with the name specified. + + + Retrieves a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + + + + Retrieves or creates a named logger. + + The assembly to use to lookup the repository. + The name of the logger to retrieve. + The logger with the name specified. + + + Retrieves a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + + + + Shorthand for . + + The repository to lookup in. + The of which the fullname will be used as the name of the logger to retrieve. + The logger with the name specified. + + + Gets the logger for the fully qualified name of the type specified. + + + + + + Shorthand for . + + the assembly to use to lookup the repository + The of which the fullname will be used as the name of the logger to retrieve. + The logger with the name specified. + + + Gets the logger for the fully qualified name of the type specified. + + + + + + Shuts down the log4net system. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in all the + default repositories. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Shuts down the repository for the repository specified. + + The repository to shutdown. + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + repository for the specified. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Shuts down the repository for the repository specified. + + The assembly to use to lookup the repository. + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + repository for the repository. The repository is looked up using + the specified. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Resets all values contained in this repository instance to their defaults. + + The repository to reset. + + + Resets all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set its default "off" value. + + + + + + Resets all values contained in this repository instance to their defaults. + + The assembly to use to lookup the repository to reset. + + + Resets all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set its default "off" value. + + + + + + Creates a repository with the specified name. + + The name of the repository, this must be unique amongst repositories. + The created for the repository. + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + Creates the default type of which is a + object. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The specified repository already exists. + + + + Creates a repository with the specified name. + + The name of the repository, this must be unique amongst repositories. + The created for the repository. + + + Creates the default type of which is a + object. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The specified repository already exists. + + + + Creates a repository with the specified name and repository type. + + The name of the repository, this must be unique to the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The name must be unique. Repositories cannot be redefined. + An Exception will be thrown if the repository already exists. + + + The specified repository already exists. + + + + Creates a repository with the specified name and repository type. + + The name of the repository, this must be unique to the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + The name must be unique. Repositories cannot be redefined. + An Exception will be thrown if the repository already exists. + + + The specified repository already exists. + + + + Creates a repository for the specified assembly and repository type. + + The assembly to use to get the name of the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + + + + Creates a repository for the specified assembly and repository type. + + The assembly to use to get the name of the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + + + + Gets an array of all currently defined repositories. + + An array of all the known objects. + + + Gets an array of all currently defined repositories. + + + + + + Gets or sets the repository selector used by the . + + + The repository selector used by the . + + + + The repository selector () is used by + the to create and select repositories + (). + + + The caller to supplies either a string name + or an assembly (if not supplied the assembly is inferred using + ). + + + This context is used by the selector to lookup a specific repository. + + + For the full .NET Framework, the default repository is DefaultRepositorySelector; + for the .NET Compact Framework CompactRepositorySelector is the default + repository. + + + + + + Internal method to get pertinent version info. + + A string of version info. + + + + Called when the event fires + + the that is exiting + null + + + Called when the event fires. + + + When the event is triggered the log4net system is . + + + + + + Called when the event fires + + the that is exiting + null + + + Called when the event fires. + + + When the event is triggered the log4net system is . + + + + + + The fully qualified type of the LoggerManager class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Initialize the default repository selector + + + + + Implementation of the interface. + + + + This class should be used as the base for all wrapper implementations. + + + Nicko Cadell + Gert Driesen + + + + Constructs a new wrapper for the specified logger. + + The logger to wrap. + + + Constructs a new wrapper for the specified logger. + + + + + + Gets the implementation behind this wrapper object. + + + The object that this object is implementing. + + + + The Logger object may not be the same object as this object + because of logger decorators. + + + This gets the actual underlying objects that is used to process + the log events. + + + + + + The logger that this object is wrapping + + + + + Portable data structure used by + + + + Portable data structure used by + + + Nicko Cadell + + + + The logger name. + + + + The logger name. + + + + + + Level of logging event. + + + + Level of logging event. Level cannot be Serializable + because it is a flyweight. Due to its special serialization it + cannot be declared final either. + + + + + + The application supplied message. + + + + The application supplied message of logging event. + + + + + + The name of thread + + + + The name of thread in which this logging event was generated + + + + + + Gets or sets the local time the event was logged + + + + Prefer using the setter, since local time can be ambiguous. + + + + + + Gets or sets the UTC time the event was logged + + + + The TimeStamp is stored in the UTC time zone. + + + + + + Location information for the caller. + + + + Location information for the caller. + + + + + + String representation of the user + + + + String representation of the user's windows name, + like DOMAIN\username + + + + + + String representation of the identity. + + + + String representation of the current thread's principal identity. + + + + + + The string representation of the exception + + + + The string representation of the exception + + + + + + String representation of the AppDomain. + + + + String representation of the AppDomain. + + + + + + Additional event specific properties + + + + A logger or an appender may attach additional + properties to specific events. These properties + have a string key and an object value. + + + + + + Flags passed to the property + + + + Flags passed to the property + + + Nicko Cadell + + + + Fix the MDC + + + + + Fix the NDC + + + + + Fix the rendered message + + + + + Fix the thread name + + + + + Fix the callers location information + + + CAUTION: Very slow to generate + + + + + Fix the callers windows user name + + + CAUTION: Slow to generate + + + + + Fix the domain friendly name + + + + + Fix the callers principal name + + + CAUTION: May be slow to generate + + + + + Fix the exception text + + + + + Fix the event properties. Active properties must implement in order to be eligible for fixing. + + + + + No fields fixed + + + + + All fields fixed + + + + + Partial fields fixed + + + + This set of partial fields gives good performance. The following fields are fixed: + + + + + + + + + + + + + The internal representation of logging events. + + + + When an affirmative decision is made to log then a + instance is created. This instance + is passed around to the different log4net components. + + + This class is of concern to those wishing to extend log4net. + + + Some of the values in instances of + are considered volatile, that is the values are correct at the + time the event is delivered to appenders, but will not be consistent + at any time afterwards. If an event is to be stored and then processed + at a later time these volatile values must be fixed by calling + . There is a performance penalty + for incurred by calling but it + is essential to maintaining data consistency. + + + Nicko Cadell + Gert Driesen + Douglas de la Torre + Daniel Cazzulino + + + + Initializes a new instance of the class + from the supplied parameters. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The repository this event is logged in. + The name of the logger of this event. + The level of this event. + The message of this event. + The exception for this event. + + + Except , and , + all fields of LoggingEvent are filled when actually needed. Call + to cache all data locally + to prevent inconsistencies. + + This method is called by the log4net framework + to create a logging event. + + + + + + Initializes a new instance of the class + using specific data. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The repository this event is logged in. + Data used to initialize the logging event. + The fields in the struct that have already been fixed. + + + This constructor is provided to allow a + to be created independently of the log4net framework. This can + be useful if you require a custom serialization scheme. + + + Use the method to obtain an + instance of the class. + + + The parameter should be used to specify which fields in the + struct have been preset. Fields not specified in the + will be captured from the environment if requested or fixed. + + + + + + Initializes a new instance of the class + using specific data. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The repository this event is logged in. + Data used to initialize the logging event. + + + This constructor is provided to allow a + to be created independently of the log4net framework. This can + be useful if you require a custom serialization scheme. + + + Use the method to obtain an + instance of the class. + + + This constructor sets this objects flags to , + this assumes that all the data relating to this event is passed in via the + parameter and no other data should be captured from the environment. + + + + + + Initializes a new instance of the class + using specific data. + + Data used to initialize the logging event. + + + This constructor is provided to allow a + to be created independently of the log4net framework. This can + be useful if you require a custom serialization scheme. + + + Use the method to obtain an + instance of the class. + + + This constructor sets this objects flags to , + this assumes that all the data relating to this event is passed in via the + parameter and no other data should be captured from the environment. + + + + + + Serialization constructor + + The that holds the serialized object data. + The that contains contextual information about the source or destination. + + + Initializes a new instance of the class + with serialized data. + + + + + + Gets the time when the current process started. + + + This is the time when this process started. + + + + The TimeStamp is stored internally in UTC and converted to the local time zone for this computer. + + + Tries to get the start time for the current process. + Failing that it returns the time of the first call to + this property. + + + Note that AppDomains may be loaded and unloaded within the + same process without the process terminating and therefore + without the process start time being reset. + + + + + + Gets the UTC time when the current process started. + + + This is the UTC time when this process started. + + + + Tries to get the start time for the current process. + Failing that it returns the time of the first call to + this property. + + + Note that AppDomains may be loaded and unloaded within the + same process without the process terminating and therefore + without the process start time being reset. + + + + + + Gets the of the logging event. + + + The of the logging event. + + + + Gets the of the logging event. + + + + + + Gets the time of the logging event. + + + The time of the logging event. + + + + The TimeStamp is stored in UTC and converted to the local time zone for this computer. + + + + + + Gets UTC the time of the logging event. + + + The UTC time of the logging event. + + + + + Gets the name of the logger that logged the event. + + + The name of the logger that logged the event. + + + + Gets the name of the logger that logged the event. + + + + + + Gets the location information for this logging event. + + + The location information for this logging event. + + + + The collected information is cached for future use. + + + See the class for more information on + supported frameworks and the different behavior in Debug and + Release builds. + + + + + + Gets the message object used to initialize this event. + + + The message object used to initialize this event. + + + + Gets the message object used to initialize this event. + Note that this event may not have a valid message object. + If the event is serialized the message object will not + be transferred. To get the text of the message the + property must be used + not this property. + + + If there is no defined message object for this event then + null will be returned. + + + + + + Gets the exception object used to initialize this event. + + + The exception object used to initialize this event. + + + + Gets the exception object used to initialize this event. + Note that this event may not have a valid exception object. + If the event is serialized the exception object will not + be transferred. To get the text of the exception the + method must be used + not this property. + + + If there is no defined exception object for this event then + null will be returned. + + + + + + The that this event was created in. + + + + The that this event was created in. + + + + + + Ensure that the repository is set. + + the value for the repository + + + + Gets the message, rendered through the . + + + The message rendered through the . + + + + The collected information is cached for future use. + + + + + + Write the rendered message to a TextWriter + + the writer to write the message to + + + Unlike the property this method + does store the message data in the internal cache. Therefore + if called only once this method should be faster than the + property, however if the message is + to be accessed multiple times then the property will be more efficient. + + + + + + Gets the name of the current thread. + + + The name of the current thread, or the thread ID when + the name is not available. + + + + The collected information is cached for future use. + + + + + + Gets the name of the current user. + + + The name of the current user, or NOT AVAILABLE when the + underlying runtime has no support for retrieving the name of the + current user. + + + + Calls WindowsIdentity.GetCurrent().Name to get the name of + the current windows user. + + + To improve performance, we could cache the string representation of + the name, and reuse that as long as the identity stayed constant. + Once the identity changed, we would need to re-assign and re-render + the string. + + + However, the WindowsIdentity.GetCurrent() call seems to + return different objects every time, so the current implementation + doesn't do this type of caching. + + + Timing for these operations: + + + + Method + Results + + + WindowsIdentity.GetCurrent() + 10000 loops, 00:00:00.2031250 seconds + + + WindowsIdentity.GetCurrent().Name + 10000 loops, 00:00:08.0468750 seconds + + + + This means we could speed things up almost 40 times by caching the + value of the WindowsIdentity.GetCurrent().Name property, since + this takes (8.04-0.20) = 7.84375 seconds. + + + + + + Gets the identity of the current thread principal. + + + The string name of the identity of the current thread principal. + + + + Calls System.Threading.Thread.CurrentPrincipal.Identity.Name to get + the name of the current thread principal. + + + + + + Gets the AppDomain friendly name. + + + The AppDomain friendly name. + + + + Gets the AppDomain friendly name. + + + + + + Additional event specific properties. + + + Additional event specific properties. + + + + A logger or an appender may attach additional + properties to specific events. These properties + have a string key and an object value. + + + This property is for events that have been added directly to + this event. The aggregate properties (which include these + event properties) can be retrieved using + and . + + + Once the properties have been fixed this property + returns the combined cached properties. This ensures that updates to + this property are always reflected in the underlying storage. When + returning the combined properties there may be more keys in the + Dictionary than expected. + + + + + + The fixed fields in this event + + + The set of fields that are fixed in this event + + + + Fields will not be fixed if they have previously been fixed. + It is not possible to 'unfix' a field. + + + + + + Serializes this object into the provided. + + The to populate with data. + The destination for this serialization. + + + The data in this event must be fixed before it can be serialized. + + + The method must be called during the + method call if this event + is to be used outside that method. + + + + + + Gets the portable data for this . + + The for this event. + + + A new can be constructed using a + instance. + + + Does a fix of the data + in the logging event before returning the event data. + + + + + + Gets the portable data for this . + + The set of data to ensure is fixed in the LoggingEventData + The for this event. + + + A new can be constructed using a + instance. + + + + + + Returns this event's exception's rendered using the + . + + + This event's exception's rendered using the . + + + + Obsolete. Use instead. + + + + + + Returns this event's exception's rendered using the + . + + + This event's exception's rendered using the . + + + + Returns this event's exception's rendered using the + . + + + + + + Fix instance fields that hold volatile data. + + + + Some of the values in instances of + are considered volatile, that is the values are correct at the + time the event is delivered to appenders, but will not be consistent + at any time afterwards. If an event is to be stored and then processed + at a later time these volatile values must be fixed by calling + . There is a performance penalty + incurred by calling but it + is essential to maintaining data consistency. + + + Calling is equivalent to + calling passing the parameter + false. + + + See for more + information. + + + + + + Fixes instance fields that hold volatile data. + + Set to true to not fix data that takes a long time to fix. + + + Some of the values in instances of + are considered volatile, that is the values are correct at the + time the event is delivered to appenders, but will not be consistent + at any time afterwards. If an event is to be stored and then processed + at a later time these volatile values must be fixed by calling + . There is a performance penalty + for incurred by calling but it + is essential to maintaining data consistency. + + + The param controls the data that + is fixed. Some of the data that can be fixed takes a long time to + generate, therefore if you do not require those settings to be fixed + they can be ignored by setting the param + to true. This setting will ignore the + and settings. + + + Set to false to ensure that all + settings are fixed. + + + + + + Fix the fields specified by the parameter + + the fields to fix + + + Only fields specified in the will be fixed. + Fields will not be fixed if they have previously been fixed. + It is not possible to 'unfix' a field. + + + + + + Lookup a composite property in this event + + the key for the property to lookup + the value for the property + + + This event has composite properties that combine together properties from + several different contexts in the following order: + + + this events properties + + This event has that can be set. These + properties are specific to this event only. + + + + the thread properties + + The that are set on the current + thread. These properties are shared by all events logged on this thread. + + + + the global properties + + The that are set globally. These + properties are shared by all the threads in the AppDomain. + + + + + + + + + Get all the composite properties in this event + + the containing all the properties + + + See for details of the composite properties + stored by the event. + + + This method returns a single containing all the + properties defined for this event. + + + + + + The internal logging event data. + + + + + The internal logging event data. + + + + + The internal logging event data. + + + + + The fully qualified Type of the calling + logger class in the stack frame (i.e. the declaring type of the method). + + + + + The application supplied message of logging event. + + + + + The exception that was thrown. + + + This is not serialized. The string representation + is serialized instead. + + + + + The repository that generated the logging event + + + This is not serialized. + + + + + The fix state for this event + + + These flags indicate which fields have been fixed. + Not serialized. + + + + + Indicated that the internal cache is updateable (ie not fixed) + + + This is a seperate flag to m_fixFlags as it allows incrementel fixing and simpler + changes in the caching strategy. + + + + + The key into the Properties map for the host name value. + + + + + The key into the Properties map for the thread identity value. + + + + + The key into the Properties map for the user name value. + + + + + Implementation of wrapper interface. + + + + This implementation of the interface + forwards to the held by the base class. + + + This logger has methods to allow the caller to log at the following + levels: + + + + DEBUG + + The and methods log messages + at the DEBUG level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + INFO + + The and methods log messages + at the INFO level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + WARN + + The and methods log messages + at the WARN level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + ERROR + + The and methods log messages + at the ERROR level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + FATAL + + The and methods log messages + at the FATAL level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + + The values for these levels and their semantic meanings can be changed by + configuring the for the repository. + + + Nicko Cadell + Gert Driesen + + + + Construct a new wrapper for the specified logger. + + The logger to wrap. + + + Construct a new wrapper for the specified logger. + + + + + + Virtual method called when the configuration of the repository changes + + the repository holding the levels + + + Virtual method called when the configuration of the repository changes + + + + + + Logs a message object with the DEBUG level. + + The message object to log. + + + This method first checks if this logger is DEBUG + enabled by comparing the level of this logger with the + DEBUG level. If this logger is + DEBUG enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the DEBUG level + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the DEBUG level including + the stack trace of the passed + as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the DEBUG level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the DEBUG level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the DEBUG level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the DEBUG level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the DEBUG level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a message object with the INFO level. + + The message object to log. + + + This method first checks if this logger is INFO + enabled by comparing the level of this logger with the + INFO level. If this logger is + INFO enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the INFO level. + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the INFO level including + the stack trace of the + passed as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the INFO level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the INFO level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the INFO level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the INFO level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the INFO level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a message object with the WARN level. + + the message object to log + + + This method first checks if this logger is WARN + enabled by comparing the level of this logger with the + WARN level. If this logger is + WARN enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger and + also higher in the hierarchy depending on the value of the + additivity flag. + + + WARNING Note that passing an to this + method will print the name of the but no + stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the WARN level + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the WARN level including + the stack trace of the + passed as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the WARN level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the WARN level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the WARN level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the WARN level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the WARN level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a message object with the ERROR level. + + The message object to log. + + + This method first checks if this logger is ERROR + enabled by comparing the level of this logger with the + ERROR level. If this logger is + ERROR enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger and + also higher in the hierarchy depending on the value of the + additivity flag. + + + WARNING Note that passing an to this + method will print the name of the but no + stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the ERROR level + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the ERROR level including + the stack trace of the + passed as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the ERROR level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the ERROR level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the ERROR level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the ERROR level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the ERROR level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a message object with the FATAL level. + + The message object to log. + + + This method first checks if this logger is FATAL + enabled by comparing the level of this logger with the + FATAL level. If this logger is + FATAL enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger and + also higher in the hierarchy depending on the value of the + additivity flag. + + + WARNING Note that passing an to this + method will print the name of the but no + stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the FATAL level + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the FATAL level including + the stack trace of the + passed as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the FATAL level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the FATAL level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the FATAL level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the FATAL level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the FATAL level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Checks if this logger is enabled for the DEBUG + level. + + + true if this logger is enabled for DEBUG events, + false otherwise. + + + + This function is intended to lessen the computational cost of + disabled log debug statements. + + + For some log Logger object, when you write: + + + log.Debug("This is entry number: " + i ); + + + You incur the cost constructing the message, concatenation in + this case, regardless of whether the message is logged or not. + + + If you are worried about speed, then you should write: + + + if (log.IsDebugEnabled()) + { + log.Debug("This is entry number: " + i ); + } + + + This way you will not incur the cost of parameter + construction if debugging is disabled for log. On + the other hand, if the log is debug enabled, you + will incur the cost of evaluating whether the logger is debug + enabled twice. Once in IsDebugEnabled and once in + the Debug. This is an insignificant overhead + since evaluating a logger takes about 1% of the time it + takes to actually log. + + + + + + Checks if this logger is enabled for the INFO level. + + + true if this logger is enabled for INFO events, + false otherwise. + + + + See for more information and examples + of using this method. + + + + + + + Checks if this logger is enabled for the WARN level. + + + true if this logger is enabled for WARN events, + false otherwise. + + + + See for more information and examples + of using this method. + + + + + + + Checks if this logger is enabled for the ERROR level. + + + true if this logger is enabled for ERROR events, + false otherwise. + + + + See for more information and examples of using this method. + + + + + + + Checks if this logger is enabled for the FATAL level. + + + true if this logger is enabled for FATAL events, + false otherwise. + + + + See for more information and examples of using this method. + + + + + + + Event handler for the event + + the repository + Empty + + + + The fully qualified name of this declaring type not the type of any subclass. + + + + + provides method information without actually referencing a System.Reflection.MethodBase + as that would require that the containing assembly is loaded. + + + + + + constructs a method item for an unknown method. + + + + + constructs a method item from the name of the method. + + + + + + constructs a method item from the name of the method and its parameters. + + + + + + + constructs a method item from a method base by determining the method name and its parameters. + + + + + + Gets the method name of the caller making the logging + request. + + + The method name of the caller making the logging + request. + + + + Gets the method name of the caller making the logging + request. + + + + + + Gets the method parameters of the caller making + the logging request. + + + The method parameters of the caller making + the logging request + + + + Gets the method parameters of the caller making + the logging request. + + + + + + The fully qualified type of the StackFrameItem class. + + + Used by the internal logger to record the Type of the + log message. + + + + + When location information is not available the constant + NA is returned. Current value of this string + constant is ?. + + + + + A SecurityContext used by log4net when interacting with protected resources + + + + A SecurityContext used by log4net when interacting with protected resources + for example with operating system services. This can be used to impersonate + a principal that has been granted privileges on the system resources. + + + Nicko Cadell + + + + Impersonate this SecurityContext + + State supplied by the caller + An instance that will + revoke the impersonation of this SecurityContext, or null + + + Impersonate this security context. Further calls on the current + thread should now be made in the security context provided + by this object. When the result + method is called the security + context of the thread should be reverted to the state it was in + before was called. + + + + + + The providers default instances. + + + + A configured component that interacts with potentially protected system + resources uses a to provide the elevated + privileges required. If the object has + been not been explicitly provided to the component then the component + will request one from this . + + + By default the is + an instance of which returns only + objects. This is a reasonable default + where the privileges required are not know by the system. + + + This default behavior can be overridden by subclassing the + and overriding the method to return + the desired objects. The default provider + can be replaced by programmatically setting the value of the + property. + + + An alternative is to use the log4net.Config.SecurityContextProviderAttribute + This attribute can be applied to an assembly in the same way as the + log4net.Config.XmlConfiguratorAttribute". The attribute takes + the type to use as the as an argument. + + + Nicko Cadell + + + + The default provider + + + + + Gets or sets the default SecurityContextProvider + + + The default SecurityContextProvider + + + + The default provider is used by configured components that + require a and have not had one + given to them. + + + By default this is an instance of + that returns objects. + + + The default provider can be set programmatically by setting + the value of this property to a sub class of + that has the desired behavior. + + + + + + Protected default constructor to allow subclassing + + + + Protected default constructor to allow subclassing + + + + + + Create a SecurityContext for a consumer + + The consumer requesting the SecurityContext + An impersonation context + + + The default implementation is to return a . + + + Subclasses should override this method to provide their own + behavior. + + + + + + provides stack frame information without actually referencing a System.Diagnostics.StackFrame + as that would require that the containing assembly is loaded. + + + + + + returns a stack frame item from a stack frame. This + + + + + + + Gets the fully qualified class name of the caller making the logging + request. + + + The fully qualified class name of the caller making the logging + request. + + + + Gets the fully qualified class name of the caller making the logging + request. + + + + + + Gets the file name of the caller. + + + The file name of the caller. + + + + Gets the file name of the caller. + + + + + + Gets the line number of the caller. + + + The line number of the caller. + + + + Gets the line number of the caller. + + + + + + Gets the method name of the caller. + + + The method name of the caller. + + + + Gets the method name of the caller. + + + + + + Gets all available caller information + + + All available caller information, in the format + fully.qualified.classname.of.caller.methodName(Filename:line) + + + + Gets all available caller information, in the format + fully.qualified.classname.of.caller.methodName(Filename:line) + + + + + + The fully qualified type of the StackFrameItem class. + + + Used by the internal logger to record the Type of the + log message. + + + + + When location information is not available the constant + NA is returned. Current value of this string + constant is ?. + + + + + An evaluator that triggers after specified number of seconds. + + + + This evaluator will trigger if the specified time period + has passed since last check. + + + Robert Sevcik + + + + The time threshold for triggering in seconds. Zero means it won't trigger at all. + + + + + The UTC time of last check. This gets updated when the object is created and when the evaluator triggers. + + + + + The default time threshold for triggering in seconds. Zero means it won't trigger at all. + + + + + Create a new evaluator using the time threshold in seconds. + + + + Create a new evaluator using the time threshold in seconds. + + + This evaluator will trigger if the specified time period + has passed since last check. + + + + + + Create a new evaluator using the specified time threshold in seconds. + + + The time threshold in seconds to trigger after. + Zero means it won't trigger at all. + + + + Create a new evaluator using the specified time threshold in seconds. + + + This evaluator will trigger if the specified time period + has passed since last check. + + + + + + The time threshold in seconds to trigger after + + + The time threshold in seconds to trigger after. + Zero means it won't trigger at all. + + + + This evaluator will trigger if the specified time period + has passed since last check. + + + + + + Is this the triggering event? + + The event to check + This method returns true, if the specified time period + has passed since last check.. + Otherwise it returns false + + + This evaluator will trigger if the specified time period + has passed since last check. + + + + + + Delegate used to handle creation of new wrappers. + + The logger to wrap in a wrapper. + + + Delegate used to handle creation of new wrappers. This delegate + is called from the + method to construct the wrapper for the specified logger. + + + The delegate to use is supplied to the + constructor. + + + + + + Maps between logger objects and wrapper objects. + + + + This class maintains a mapping between objects and + objects. Use the method to + lookup the for the specified . + + + New wrapper instances are created by the + method. The default behavior is for this method to delegate construction + of the wrapper to the delegate supplied + to the constructor. This allows specialization of the behavior without + requiring subclassing of this type. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the + + The handler to use to create the wrapper objects. + + + Initializes a new instance of the class with + the specified handler to create the wrapper objects. + + + + + + Gets the wrapper object for the specified logger. + + The wrapper object for the specified logger + + + If the logger is null then the corresponding wrapper is null. + + + Looks up the wrapper it it has previously been requested and + returns it. If the wrapper has never been requested before then + the virtual method is + called. + + + + + + Gets the map of logger repositories. + + + Map of logger repositories. + + + + Gets the hashtable that is keyed on . The + values are hashtables keyed on with the + value being the corresponding . + + + + + + Creates the wrapper object for the specified logger. + + The logger to wrap in a wrapper. + The wrapper object for the logger. + + + This implementation uses the + passed to the constructor to create the wrapper. This method + can be overridden in a subclass. + + + + + + Called when a monitored repository shutdown event is received. + + The that is shutting down + + + This method is called when a that this + is holding loggers for has signaled its shutdown + event . The default + behavior of this method is to release the references to the loggers + and their wrappers generated for this repository. + + + + + + Event handler for repository shutdown event. + + The sender of the event. + The event args. + + + + Map of logger repositories to hashtables of ILogger to ILoggerWrapper mappings + + + + + The handler to use to create the extension wrapper objects. + + + + + Internal reference to the delegate used to register for repository shutdown events. + + + + + Formats a as "HH:mm:ss,fff". + + + + Formats a in the format "HH:mm:ss,fff" for example, "15:49:37,459". + + + Nicko Cadell + Gert Driesen + + + + Renders the date into a string. Format is "HH:mm:ss". + + The date to render into a string. + The string builder to write to. + + + Subclasses should override this method to render the date + into a string using a precision up to the second. This method + will be called at most once per second and the result will be + reused if it is needed again during the same second. + + + + + + Renders the date into a string. Format is "HH:mm:ss,fff". + + The date to render into a string. + The writer to write to. + + + Uses the method to generate the + time string up to the seconds and then appends the current + milliseconds. The results from are + cached and is called at most once + per second. + + + Sub classes should override + rather than . + + + + + + String constant used to specify AbsoluteTimeDateFormat in layouts. Current value is ABSOLUTE. + + + + + String constant used to specify DateTimeDateFormat in layouts. Current value is DATE. + + + + + String constant used to specify ISO8601DateFormat in layouts. Current value is ISO8601. + + + + + Last stored time with precision up to the second. + + + + + Last stored time with precision up to the second, formatted + as a string. + + + + + Last stored time with precision up to the second, formatted + as a string. + + + + + Formats a as "dd MMM yyyy HH:mm:ss,fff" + + + + Formats a in the format + "dd MMM yyyy HH:mm:ss,fff" for example, + "06 Nov 1994 15:49:37,459". + + + Nicko Cadell + Gert Driesen + Angelika Schnagl + + + + Default constructor. + + + + Initializes a new instance of the class. + + + + + + Formats the date without the milliseconds part + + The date to format. + The string builder to write to. + + + Formats a DateTime in the format "dd MMM yyyy HH:mm:ss" + for example, "06 Nov 1994 15:49:37". + + + The base class will append the ",fff" milliseconds section. + This method will only be called at most once per second. + + + + + + The format info for the invariant culture. + + + + + Render a as a string. + + + + Interface to abstract the rendering of a + instance into a string. + + + The method is used to render the + date to a text writer. + + + Nicko Cadell + Gert Driesen + + + + Formats the specified date as a string. + + The date to format. + The writer to write to. + + + Format the as a string and write it + to the provided. + + + + + + Formats the as "yyyy-MM-dd HH:mm:ss,fff". + + + + Formats the specified as a string: "yyyy-MM-dd HH:mm:ss,fff". + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Initializes a new instance of the class. + + + + + + Formats the date without the milliseconds part + + The date to format. + The string builder to write to. + + + Formats the date specified as a string: "yyyy-MM-dd HH:mm:ss". + + + The base class will append the ",fff" milliseconds section. + This method will only be called at most once per second. + + + + + + Formats the using the method. + + + + Formats the using the method. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + The format string. + + + Initializes a new instance of the class + with the specified format string. + + + The format string must be compatible with the options + that can be supplied to . + + + + + + Formats the date using . + + The date to convert to a string. + The writer to write to. + + + Uses the date format string supplied to the constructor to call + the method to format the date. + + + + + + The format string used to format the . + + + + The format string must be compatible with the options + that can be supplied to . + + + + + + This filter drops all . + + + + You can add this filter to the end of a filter chain to + switch from the default "accept all unless instructed otherwise" + filtering behavior to a "deny all unless instructed otherwise" + behavior. + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + + Always returns the integer constant + + the LoggingEvent to filter + Always returns + + + Ignores the event being logged and just returns + . This can be used to change the default filter + chain behavior from to . This filter + should only be used as the last filter in the chain + as any further filters will be ignored! + + + + + + The return result from + + + + The return result from + + + + + + The log event must be dropped immediately without + consulting with the remaining filters, if any, in the chain. + + + + + This filter is neutral with respect to the log event. + The remaining filters, if any, should be consulted for a final decision. + + + + + The log event must be logged immediately without + consulting with the remaining filters, if any, in the chain. + + + + + Subclass this type to implement customized logging event filtering + + + + Users should extend this class to implement customized logging + event filtering. Note that and + , the parent class of all standard + appenders, have built-in filtering rules. It is suggested that you + first use and understand the built-in rules before rushing to write + your own custom filters. + + + This abstract class assumes and also imposes that filters be + organized in a linear chain. The + method of each filter is called sequentially, in the order of their + addition to the chain. + + + The method must return one + of the integer constants , + or . + + + If the value is returned, then the log event is dropped + immediately without consulting with the remaining filters. + + + If the value is returned, then the next filter + in the chain is consulted. If there are no more filters in the + chain, then the log event is logged. Thus, in the presence of no + filters, the default behavior is to log all logging events. + + + If the value is returned, then the log + event is logged without consulting the remaining filters. + + + The philosophy of log4net filters is largely inspired from the + Linux ipchains. + + + Nicko Cadell + Gert Driesen + + + + Points to the next filter in the filter chain. + + + + See for more information. + + + + + + Initialize the filter with the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + Typically filter's options become active immediately on set, + however this method must still be called. + + + + + + Decide if the should be logged through an appender. + + The to decide upon + The decision of the filter + + + If the decision is , then the event will be + dropped. If the decision is , then the next + filter, if any, will be invoked. If the decision is then + the event will be logged without consulting with other filters in + the chain. + + + This method is marked abstract and must be implemented + in a subclass. + + + + + + Property to get and set the next filter + + + The next filter in the chain + + + + Filters are typically composed into chains. This property allows the next filter in + the chain to be accessed. + + + + + + Implement this interface to provide customized logging event filtering + + + + Users should implement this interface to implement customized logging + event filtering. Note that and + , the parent class of all standard + appenders, have built-in filtering rules. It is suggested that you + first use and understand the built-in rules before rushing to write + your own custom filters. + + + This abstract class assumes and also imposes that filters be + organized in a linear chain. The + method of each filter is called sequentially, in the order of their + addition to the chain. + + + The method must return one + of the integer constants , + or . + + + If the value is returned, then the log event is dropped + immediately without consulting with the remaining filters. + + + If the value is returned, then the next filter + in the chain is consulted. If there are no more filters in the + chain, then the log event is logged. Thus, in the presence of no + filters, the default behavior is to log all logging events. + + + If the value is returned, then the log + event is logged without consulting the remaining filters. + + + The philosophy of log4net filters is largely inspired from the + Linux ipchains. + + + Nicko Cadell + Gert Driesen + + + + Decide if the logging event should be logged through an appender. + + The LoggingEvent to decide upon + The decision of the filter + + + If the decision is , then the event will be + dropped. If the decision is , then the next + filter, if any, will be invoked. If the decision is then + the event will be logged without consulting with other filters in + the chain. + + + + + + Property to get and set the next filter + + + The next filter in the chain + + + + Filters are typically composed into chains. This property allows the next filter in + the chain to be accessed. + + + + + + This is a very simple filter based on matching. + + + + The filter admits two options and + . If there is an exact match between the value + of the option and the of the + , then the method returns in + case the option value is set + to true, if it is false then + is returned. If the does not match then + the result will be . + + + Nicko Cadell + Gert Driesen + + + + flag to indicate if the filter should on a match + + + + + the to match against + + + + + Default constructor + + + + + when matching + + + + The property is a flag that determines + the behavior when a matching is found. If the + flag is set to true then the filter will the + logging event, otherwise it will the event. + + + The default is true i.e. to the event. + + + + + + The that the filter will match + + + + The level that this filter will attempt to match against the + level. If a match is found then + the result depends on the value of . + + + + + + Tests if the of the logging event matches that of the filter + + the event to filter + see remarks + + + If the of the event matches the level of the + filter then the result of the function depends on the + value of . If it is true then + the function will return , it it is false then it + will return . If the does not match then + the result will be . + + + + + + This is a simple filter based on matching. + + + + The filter admits three options and + that determine the range of priorities that are matched, and + . If there is a match between the range + of priorities and the of the , then the + method returns in case the + option value is set to true, if it is false + then is returned. If there is no match, is returned. + + + Nicko Cadell + Gert Driesen + + + + Flag to indicate the behavior when matching a + + + + + the minimum value to match + + + + + the maximum value to match + + + + + Default constructor + + + + + when matching and + + + + The property is a flag that determines + the behavior when a matching is found. If the + flag is set to true then the filter will the + logging event, otherwise it will the event. + + + The default is true i.e. to the event. + + + + + + Set the minimum matched + + + + The minimum level that this filter will attempt to match against the + level. If a match is found then + the result depends on the value of . + + + + + + Sets the maximum matched + + + + The maximum level that this filter will attempt to match against the + level. If a match is found then + the result depends on the value of . + + + + + + Check if the event should be logged. + + the logging event to check + see remarks + + + If the of the logging event is outside the range + matched by this filter then + is returned. If the is matched then the value of + is checked. If it is true then + is returned, otherwise + is returned. + + + + + + Simple filter to match a string in the event's logger name. + + + + The works very similar to the . It admits two + options and . If the + of the starts + with the value of the option, then the + method returns in + case the option value is set to true, + if it is false then is returned. + + + Daniel Cazzulino + + + + Flag to indicate the behavior when we have a match + + + + + The logger name string to substring match against the event + + + + + Default constructor + + + + + when matching + + + + The property is a flag that determines + the behavior when a matching is found. If the + flag is set to true then the filter will the + logging event, otherwise it will the event. + + + The default is true i.e. to the event. + + + + + + The that the filter will match + + + + This filter will attempt to match this value against logger name in + the following way. The match will be done against the beginning of the + logger name (using ). The match is + case sensitive. If a match is found then + the result depends on the value of . + + + + + + Check if this filter should allow the event to be logged + + the event being logged + see remarks + + + The rendered message is matched against the . + If the equals the beginning of + the incoming () + then a match will have occurred. If no match occurs + this function will return + allowing other filters to check the event. If a match occurs then + the value of is checked. If it is + true then is returned otherwise + is returned. + + + + + + Simple filter to match a keyed string in the + + + + Simple filter to match a keyed string in the + + + As the MDC has been replaced with layered properties the + should be used instead. + + + Nicko Cadell + Gert Driesen + + + + Simple filter to match a string in the + + + + Simple filter to match a string in the + + + As the MDC has been replaced with named stacks stored in the + properties collections the should + be used instead. + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Sets the to "NDC". + + + + + + Simple filter to match a string an event property + + + + Simple filter to match a string in the value for a + specific event property + + + Nicko Cadell + + + + The key to use to lookup the string from the event properties + + + + + Default constructor + + + + + The key to lookup in the event properties and then match against. + + + + The key name to use to lookup in the properties map of the + . The match will be performed against + the value of this property if it exists. + + + + + + Check if this filter should allow the event to be logged + + the event being logged + see remarks + + + The event property for the is matched against + the . + If the occurs as a substring within + the property value then a match will have occurred. If no match occurs + this function will return + allowing other filters to check the event. If a match occurs then + the value of is checked. If it is + true then is returned otherwise + is returned. + + + + + + Simple filter to match a string in the rendered message + + + + Simple filter to match a string in the rendered message + + + Nicko Cadell + Gert Driesen + + + + Flag to indicate the behavior when we have a match + + + + + The string to substring match against the message + + + + + A string regex to match + + + + + A regex object to match (generated from m_stringRegexToMatch) + + + + + Default constructor + + + + + Initialize and precompile the Regex if required + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + when matching or + + + + The property is a flag that determines + the behavior when a matching is found. If the + flag is set to true then the filter will the + logging event, otherwise it will the event. + + + The default is true i.e. to the event. + + + + + + Sets the static string to match + + + + The string that will be substring matched against + the rendered message. If the message contains this + string then the filter will match. If a match is found then + the result depends on the value of . + + + One of or + must be specified. + + + + + + Sets the regular expression to match + + + + The regular expression pattern that will be matched against + the rendered message. If the message matches this + pattern then the filter will match. If a match is found then + the result depends on the value of . + + + One of or + must be specified. + + + + + + Check if this filter should allow the event to be logged + + the event being logged + see remarks + + + The rendered message is matched against the . + If the occurs as a substring within + the message then a match will have occurred. If no match occurs + this function will return + allowing other filters to check the event. If a match occurs then + the value of is checked. If it is + true then is returned otherwise + is returned. + + + + + + The log4net Global Context. + + + + The GlobalContext provides a location for global debugging + information to be stored. + + + The global context has a properties map and these properties can + be included in the output of log messages. The + supports selecting and outputing these properties. + + + By default the log4net:HostName property is set to the name of + the current machine. + + + + + GlobalContext.Properties["hostname"] = Environment.MachineName; + + + + Nicko Cadell + + + + Private Constructor. + + + Uses a private access modifier to prevent instantiation of this class. + + + + + The global properties map. + + + The global properties map. + + + + The global properties map. + + + + + + The global context properties instance + + + + + The ILog interface is use by application to log messages into + the log4net framework. + + + + Use the to obtain logger instances + that implement this interface. The + static method is used to get logger instances. + + + This class contains methods for logging at different levels and also + has properties for determining if those logging levels are + enabled in the current configuration. + + + This interface can be implemented in different ways. This documentation + specifies reasonable behavior that a caller can expect from the actual + implementation, however different implementations reserve the right to + do things differently. + + + Simple example of logging messages + + ILog log = LogManager.GetLogger("application-log"); + + log.Info("Application Start"); + log.Debug("This is a debug message"); + + if (log.IsDebugEnabled) + { + log.Debug("This is another debug message"); + } + + + + + Nicko Cadell + Gert Driesen + + + Log a message object with the level. + + Log a message object with the level. + + The message object to log. + + + This method first checks if this logger is DEBUG + enabled by comparing the level of this logger with the + level. If this logger is + DEBUG enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + Log a message object with the level. + + Logs a message object with the level. + + + + This method first checks if this logger is INFO + enabled by comparing the level of this logger with the + level. If this logger is + INFO enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + The message object to log. + + + + + + Logs a message object with the INFO level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted message string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + Log a message object with the level. + + Log a message object with the level. + + + + This method first checks if this logger is WARN + enabled by comparing the level of this logger with the + level. If this logger is + WARN enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + The message object to log. + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted message string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + Log a message object with the level. + + Logs a message object with the level. + + The message object to log. + + + This method first checks if this logger is ERROR + enabled by comparing the level of this logger with the + level. If this logger is + ERROR enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted message string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + Log a message object with the level. + + Log a message object with the level. + + + + This method first checks if this logger is FATAL + enabled by comparing the level of this logger with the + level. If this logger is + FATAL enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + The message object to log. + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted message string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + + This function is intended to lessen the computational cost of + disabled log debug statements. + + For some ILog interface log, when you write: + + log.Debug("This is entry number: " + i ); + + + You incur the cost constructing the message, string construction and concatenation in + this case, regardless of whether the message is logged or not. + + + If you are worried about speed (who isn't), then you should write: + + + if (log.IsDebugEnabled) + { + log.Debug("This is entry number: " + i ); + } + + + This way you will not incur the cost of parameter + construction if debugging is disabled for log. On + the other hand, if the log is debug enabled, you + will incur the cost of evaluating whether the logger is debug + enabled twice. Once in and once in + the . This is an insignificant overhead + since evaluating a logger takes about 1% of the time it + takes to actually log. This is the preferred style of logging. + + Alternatively if your logger is available statically then the is debug + enabled state can be stored in a static variable like this: + + + private static readonly bool isDebugEnabled = log.IsDebugEnabled; + + + Then when you come to log you can write: + + + if (isDebugEnabled) + { + log.Debug("This is entry number: " + i ); + } + + + This way the debug enabled state is only queried once + when the class is loaded. Using a private static readonly + variable is the most efficient because it is a run time constant + and can be heavily optimized by the JIT compiler. + + + Of course if you use a static readonly variable to + hold the enabled state of the logger then you cannot + change the enabled state at runtime to vary the logging + that is produced. You have to decide if you need absolute + speed or runtime flexibility. + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + For more information see . + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + For more information see . + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + For more information see . + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + For more information see . + + + + + + + + A flexible layout configurable with pattern string that re-evaluates on each call. + + + This class is built on and provides all the + features and capabilities of PatternLayout. PatternLayout is a 'static' class + in that its layout is done once at configuration time. This class will recreate + the layout on each reference. + One important difference between PatternLayout and DynamicPatternLayout is the + treatment of the Header and Footer parameters in the configuration. The Header and Footer + parameters for DynamicPatternLayout must be syntactically in the form of a PatternString, + but should not be marked as type log4net.Util.PatternString. Doing so causes the + pattern to be statically converted at configuration time and causes DynamicPatternLayout + to perform the same as PatternLayout. + Please see for complete documentation. + + <layout type="log4net.Layout.DynamicPatternLayout"> + <param name="Header" value="%newline**** Trace Opened Local: %date{yyyy-MM-dd HH:mm:ss.fff} UTC: %utcdate{yyyy-MM-dd HH:mm:ss.fff} ****%newline" /> + <param name="Footer" value="**** Trace Closed %date{yyyy-MM-dd HH:mm:ss.fff} ****%newline" /> + </layout> + + + + + + The header PatternString + + + + + The footer PatternString + + + + + Constructs a DynamicPatternLayout using the DefaultConversionPattern + + + + The default pattern just produces the application supplied message. + + + + + + Constructs a DynamicPatternLayout using the supplied conversion pattern + + the pattern to use + + + + + + The header for the layout format. + + the layout header + + + The Header text will be appended before any logging events + are formatted and appended. + + The pattern will be formatted on each get operation. + + + + + The footer for the layout format. + + the layout footer + + + The Footer text will be appended after all the logging events + have been formatted and appended. + + The pattern will be formatted on each get operation. + + + + + A Layout that renders only the Exception text from the logging event + + + + A Layout that renders only the Exception text from the logging event. + + + This Layout should only be used with appenders that utilize multiple + layouts (e.g. ). + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Constructs a ExceptionLayout + + + + + + Activate component options + + + + Part of the component activation + framework. + + + This method does nothing as options become effective immediately. + + + + + + Gets the exception text from the logging event + + The TextWriter to write the formatted event to + the event being logged + + + Write the exception string to the . + The exception string is retrieved from . + + + + + + Interface implemented by layout objects + + + + An object is used to format a + as text. The method is called by an + appender to transform the into a string. + + + The layout can also supply and + text that is appender before any events and after all the events respectively. + + + Nicko Cadell + Gert Driesen + + + + Implement this method to create your own layout format. + + The TextWriter to write the formatted event to + The event to format + + + This method is called by an appender to format + the as text and output to a writer. + + + If the caller does not have a and prefers the + event to be formatted as a then the following + code can be used to format the event into a . + + + StringWriter writer = new StringWriter(); + Layout.Format(writer, loggingEvent); + string formattedEvent = writer.ToString(); + + + + + + The content type output by this layout. + + The content type + + + The content type output by this layout. + + + This is a MIME type e.g. "text/plain". + + + + + + The header for the layout format. + + the layout header + + + The Header text will be appended before any logging events + are formatted and appended. + + + + + + The footer for the layout format. + + the layout footer + + + The Footer text will be appended after all the logging events + have been formatted and appended. + + + + + + Flag indicating if this layout handle exceptions + + false if this layout handles exceptions + + + If this layout handles the exception object contained within + , then the layout should return + false. Otherwise, if the layout ignores the exception + object, then the layout should return true. + + + + + + Interface for raw layout objects + + + + Interface used to format a + to an object. + + + This interface should not be confused with the + interface. This interface is used in + only certain specialized situations where a raw object is + required rather than a formatted string. The + is not generally useful than this interface. + + + Nicko Cadell + Gert Driesen + + + + Implement this method to create your own layout format. + + The event to format + returns the formatted event + + + Implement this method to create your own layout format. + + + + + + Adapts any to a + + + + Where an is required this adapter + allows a to be specified. + + + Nicko Cadell + Gert Driesen + + + + The layout to adapt + + + + + Construct a new adapter + + the layout to adapt + + + Create the adapter for the specified . + + + + + + Format the logging event as an object. + + The event to format + returns the formatted event + + + Format the logging event as an object. + + + Uses the object supplied to + the constructor to perform the formatting. + + + + + + Extend this abstract class to create your own log layout format. + + + + This is the base implementation of the + interface. Most layout objects should extend this class. + + + + + + Subclasses must implement the + method. + + + Subclasses should set the in their default + constructor. + + + + Nicko Cadell + Gert Driesen + + + + The header text + + + + See for more information. + + + + + + The footer text + + + + See for more information. + + + + + + Flag indicating if this layout handles exceptions + + + + false if this layout handles exceptions + + + + + + Empty default constructor + + + + Empty default constructor + + + + + + Activate component options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + This method must be implemented by the subclass. + + + + + + Implement this method to create your own layout format. + + The TextWriter to write the formatted event to + The event to format + + + This method is called by an appender to format + the as text. + + + + + + Convenience method for easily formatting the logging event into a string variable. + + + + Creates a new StringWriter instance to store the formatted logging event. + + + + + The content type output by this layout. + + The content type is "text/plain" + + + The content type output by this layout. + + + This base class uses the value "text/plain". + To change this value a subclass must override this + property. + + + + + + The header for the layout format. + + the layout header + + + The Header text will be appended before any logging events + are formatted and appended. + + + + + + The footer for the layout format. + + the layout footer + + + The Footer text will be appended after all the logging events + have been formatted and appended. + + + + + + Flag indicating if this layout handles exceptions + + false if this layout handles exceptions + + + If this layout handles the exception object contained within + , then the layout should return + false. Otherwise, if the layout ignores the exception + object, then the layout should return true. + + + Set this value to override a this default setting. The default + value is true, this layout does not handle the exception. + + + + + + A flexible layout configurable with pattern string. + + + + The goal of this class is to a + as a string. The results + depend on the conversion pattern. + + + The conversion pattern is closely related to the conversion + pattern of the printf function in C. A conversion pattern is + composed of literal text and format control expressions called + conversion specifiers. + + + You are free to insert any literal text within the conversion + pattern. + + + Each conversion specifier starts with a percent sign (%) and is + followed by optional format modifiers and a conversion + pattern name. The conversion pattern name specifies the type of + data, e.g. logger, level, date, thread name. The format + modifiers control such things as field width, padding, left and + right justification. The following is a simple example. + + + Let the conversion pattern be "%-5level [%thread]: %message%newline" and assume + that the log4net environment was set to use a PatternLayout. Then the + statements + + + ILog log = LogManager.GetLogger(typeof(TestApp)); + log.Debug("Message 1"); + log.Warn("Message 2"); + + would yield the output + + DEBUG [main]: Message 1 + WARN [main]: Message 2 + + + Note that there is no explicit separator between text and + conversion specifiers. The pattern parser knows when it has reached + the end of a conversion specifier when it reads a conversion + character. In the example above the conversion specifier + %-5level means the level of the logging event should be left + justified to a width of five characters. + + + The recognized conversion pattern names are: + + + + Conversion Pattern Name + Effect + + + a + Equivalent to appdomain + + + appdomain + + Used to output the friendly name of the AppDomain where the + logging event was generated. + + + + aspnet-cache + + + Used to output all cache items in the case of %aspnet-cache or just one named item if used as %aspnet-cache{key} + + + This pattern is not available for Compact Framework or Client Profile assemblies. + + + + + aspnet-context + + + Used to output all context items in the case of %aspnet-context or just one named item if used as %aspnet-context{key} + + + This pattern is not available for Compact Framework or Client Profile assemblies. + + + + + aspnet-request + + + Used to output all request parameters in the case of %aspnet-request or just one named param if used as %aspnet-request{key} + + + This pattern is not available for Compact Framework or Client Profile assemblies. + + + + + aspnet-session + + + Used to output all session items in the case of %aspnet-session or just one named item if used as %aspnet-session{key} + + + This pattern is not available for Compact Framework or Client Profile assemblies. + + + + + c + Equivalent to logger + + + C + Equivalent to type + + + class + Equivalent to type + + + d + Equivalent to date + + + date + + + Used to output the date of the logging event in the local time zone. + To output the date in universal time use the %utcdate pattern. + The date conversion + specifier may be followed by a date format specifier enclosed + between braces. For example, %date{HH:mm:ss,fff} or + %date{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is + given then ISO8601 format is + assumed (). + + + The date format specifier admits the same syntax as the + time pattern string of the . + + + For better results it is recommended to use the log4net date + formatters. These can be specified using one of the strings + "ABSOLUTE", "DATE" and "ISO8601" for specifying + , + and respectively + . For example, + %date{ISO8601} or %date{ABSOLUTE}. + + + These dedicated date formatters perform significantly + better than . + + + + + exception + + + Used to output the exception passed in with the log message. + + + If an exception object is stored in the logging event + it will be rendered into the pattern output with a + trailing newline. + If there is no exception then nothing will be output + and no trailing newline will be appended. + It is typical to put a newline before the exception + and to have the exception as the last data in the pattern. + + + + + F + Equivalent to file + + + file + + + Used to output the file name where the logging request was + issued. + + + WARNING Generating caller location information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + See the note below on the availability of caller location information. + + + + + identity + + + Used to output the user name for the currently active user + (Principal.Identity.Name). + + + WARNING Generating caller information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + + + l + Equivalent to location + + + L + Equivalent to line + + + location + + + Used to output location information of the caller which generated + the logging event. + + + The location information depends on the CLI implementation but + usually consists of the fully qualified name of the calling + method followed by the callers source the file name and line + number between parentheses. + + + The location information can be very useful. However, its + generation is extremely slow. Its use should be avoided + unless execution speed is not an issue. + + + See the note below on the availability of caller location information. + + + + + level + + + Used to output the level of the logging event. + + + + + line + + + Used to output the line number from where the logging request + was issued. + + + WARNING Generating caller location information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + See the note below on the availability of caller location information. + + + + + logger + + + Used to output the logger of the logging event. The + logger conversion specifier can be optionally followed by + precision specifier, that is a decimal constant in + brackets. + + + If a precision specifier is given, then only the corresponding + number of right most components of the logger name will be + printed. By default the logger name is printed in full. + + + For example, for the logger name "a.b.c" the pattern + %logger{2} will output "b.c". + + + + + m + Equivalent to message + + + M + Equivalent to method + + + message + + + Used to output the application supplied message associated with + the logging event. + + + + + mdc + + + The MDC (old name for the ThreadContext.Properties) is now part of the + combined event properties. This pattern is supported for compatibility + but is equivalent to property. + + + + + method + + + Used to output the method name where the logging request was + issued. + + + WARNING Generating caller location information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + See the note below on the availability of caller location information. + + + + + n + Equivalent to newline + + + newline + + + Outputs the platform dependent line separator character or + characters. + + + This conversion pattern offers the same performance as using + non-portable line separator strings such as "\n", or "\r\n". + Thus, it is the preferred way of specifying a line separator. + + + + + ndc + + + Used to output the NDC (nested diagnostic context) associated + with the thread that generated the logging event. + + + + + p + Equivalent to level + + + P + Equivalent to property + + + properties + Equivalent to property + + + property + + + Used to output the an event specific property. The key to + lookup must be specified within braces and directly following the + pattern specifier, e.g. %property{user} would include the value + from the property that is keyed by the string 'user'. Each property value + that is to be included in the log must be specified separately. + Properties are added to events by loggers or appenders. By default + the log4net:HostName property is set to the name of machine on + which the event was originally logged. + + + If no key is specified, e.g. %property then all the keys and their + values are printed in a comma separated list. + + + The properties of an event are combined from a number of different + contexts. These are listed below in the order in which they are searched. + + + + the event properties + + The event has that can be set. These + properties are specific to this event only. + + + + the thread properties + + The that are set on the current + thread. These properties are shared by all events logged on this thread. + + + + the global properties + + The that are set globally. These + properties are shared by all the threads in the AppDomain. + + + + + + + + r + Equivalent to timestamp + + + stacktrace + + + Used to output the stack trace of the logging event + The stack trace level specifier may be enclosed + between braces. For example, %stacktrace{level}. + If no stack trace level specifier is given then 1 is assumed + + + Output uses the format: + type3.MethodCall3 > type2.MethodCall2 > type1.MethodCall1 + + + This pattern is not available for Compact Framework assemblies. + + + + + stacktracedetail + + + Used to output the stack trace of the logging event + The stack trace level specifier may be enclosed + between braces. For example, %stacktracedetail{level}. + If no stack trace level specifier is given then 1 is assumed + + + Output uses the format: + type3.MethodCall3(type param,...) > type2.MethodCall2(type param,...) > type1.MethodCall1(type param,...) + + + This pattern is not available for Compact Framework assemblies. + + + + + t + Equivalent to thread + + + timestamp + + + Used to output the number of milliseconds elapsed since the start + of the application until the creation of the logging event. + + + + + thread + + + Used to output the name of the thread that generated the + logging event. Uses the thread number if no name is available. + + + + + type + + + Used to output the fully qualified type name of the caller + issuing the logging request. This conversion specifier + can be optionally followed by precision specifier, that + is a decimal constant in brackets. + + + If a precision specifier is given, then only the corresponding + number of right most components of the class name will be + printed. By default the class name is output in fully qualified form. + + + For example, for the class name "log4net.Layout.PatternLayout", the + pattern %type{1} will output "PatternLayout". + + + WARNING Generating the caller class information is + slow. Thus, its use should be avoided unless execution speed is + not an issue. + + + See the note below on the availability of caller location information. + + + + + u + Equivalent to identity + + + username + + + Used to output the WindowsIdentity for the currently + active user. + + + WARNING Generating caller WindowsIdentity information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + + + utcdate + + + Used to output the date of the logging event in universal time. + The date conversion + specifier may be followed by a date format specifier enclosed + between braces. For example, %utcdate{HH:mm:ss,fff} or + %utcdate{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is + given then ISO8601 format is + assumed (). + + + The date format specifier admits the same syntax as the + time pattern string of the . + + + For better results it is recommended to use the log4net date + formatters. These can be specified using one of the strings + "ABSOLUTE", "DATE" and "ISO8601" for specifying + , + and respectively + . For example, + %utcdate{ISO8601} or %utcdate{ABSOLUTE}. + + + These dedicated date formatters perform significantly + better than . + + + + + w + Equivalent to username + + + x + Equivalent to ndc + + + X + Equivalent to mdc + + + % + + + The sequence %% outputs a single percent sign. + + + + + + The single letter patterns are deprecated in favor of the + longer more descriptive pattern names. + + + By default the relevant information is output as is. However, + with the aid of format modifiers it is possible to change the + minimum field width, the maximum field width and justification. + + + The optional format modifier is placed between the percent sign + and the conversion pattern name. + + + The first optional format modifier is the left justification + flag which is just the minus (-) character. Then comes the + optional minimum field width modifier. This is a decimal + constant that represents the minimum number of characters to + output. If the data item requires fewer characters, it is padded on + either the left or the right until the minimum width is + reached. The default is to pad on the left (right justify) but you + can specify right padding with the left justification flag. The + padding character is space. If the data item is larger than the + minimum field width, the field is expanded to accommodate the + data. The value is never truncated. + + + This behavior can be changed using the maximum field + width modifier which is designated by a period followed by a + decimal constant. If the data item is longer than the maximum + field, then the extra characters are removed from the + beginning of the data item and not from the end. For + example, it the maximum field width is eight and the data item is + ten characters long, then the first two characters of the data item + are dropped. This behavior deviates from the printf function in C + where truncation is done from the end. + + + Below are various format modifier examples for the logger + conversion specifier. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Format modifierleft justifyminimum widthmaximum widthcomment
%20loggerfalse20none + + Left pad with spaces if the logger name is less than 20 + characters long. + +
%-20loggertrue20none + + Right pad with spaces if the logger + name is less than 20 characters long. + +
%.30loggerNAnone30 + + Truncate from the beginning if the logger + name is longer than 30 characters. + +
%20.30loggerfalse2030 + + Left pad with spaces if the logger name is shorter than 20 + characters. However, if logger name is longer than 30 characters, + then truncate from the beginning. + +
%-20.30loggertrue2030 + + Right pad with spaces if the logger name is shorter than 20 + characters. However, if logger name is longer than 30 characters, + then truncate from the beginning. + +
+
+ + Note about caller location information.
+ The following patterns %type %file %line %method %location %class %C %F %L %l %M + all generate caller location information. + Location information uses the System.Diagnostics.StackTrace class to generate + a call stack. The caller's information is then extracted from this stack. +
+ + + The System.Diagnostics.StackTrace class is not supported on the + .NET Compact Framework 1.0 therefore caller location information is not + available on that framework. + + + + + The System.Diagnostics.StackTrace class has this to say about Release builds: + + + "StackTrace information will be most informative with Debug build configurations. + By default, Debug builds include debug symbols, while Release builds do not. The + debug symbols contain most of the file, method name, line number, and column + information used in constructing StackFrame and StackTrace objects. StackTrace + might not report as many method calls as expected, due to code transformations + that occur during optimization." + + + This means that in a Release build the caller information may be incomplete or may + not exist at all! Therefore caller location information cannot be relied upon in a Release build. + + + + Additional pattern converters may be registered with a specific + instance using the method. + +
+ + This is a more detailed pattern. + %timestamp [%thread] %level %logger %ndc - %message%newline + + + A similar pattern except that the relative time is + right padded if less than 6 digits, thread name is right padded if + less than 15 characters and truncated if longer and the logger + name is left padded if shorter than 30 characters and truncated if + longer. + %-6timestamp [%15.15thread] %-5level %30.30logger %ndc - %message%newline + + Nicko Cadell + Gert Driesen + Douglas de la Torre + Daniel Cazzulino +
+ + + Default pattern string for log output. + + + + Default pattern string for log output. + Currently set to the string "%message%newline" + which just prints the application supplied message. + + + + + + A detailed conversion pattern + + + + A conversion pattern which includes Time, Thread, Logger, and Nested Context. + Current value is %timestamp [%thread] %level %logger %ndc - %message%newline. + + + + + + Internal map of converter identifiers to converter types. + + + + This static map is overridden by the m_converterRegistry instance map + + + + + + the pattern + + + + + the head of the pattern converter chain + + + + + patterns defined on this PatternLayout only + + + + + Initialize the global registry + + + + Defines the builtin global rules. + + + + + + Constructs a PatternLayout using the DefaultConversionPattern + + + + The default pattern just produces the application supplied message. + + + Note to Inheritors: This constructor calls the virtual method + . If you override this method be + aware that it will be called before your is called constructor. + + + As per the contract the + method must be called after the properties on this object have been + configured. + + + + + + Constructs a PatternLayout using the supplied conversion pattern + + the pattern to use + + + Note to Inheritors: This constructor calls the virtual method + . If you override this method be + aware that it will be called before your is called constructor. + + + When using this constructor the method + need not be called. This may not be the case when using a subclass. + + + + + + The pattern formatting string + + + + The ConversionPattern option. This is the string which + controls formatting and consists of a mix of literal content and + conversion specifiers. + + + + + + Create the pattern parser instance + + the pattern to parse + The that will format the event + + + Creates the used to parse the conversion string. Sets the + global and instance rules on the . + + + + + + Initialize layout options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Produces a formatted string as specified by the conversion pattern. + + the event being logged + The TextWriter to write the formatted event to + + + Parse the using the patter format + specified in the property. + + + + + + Add a converter to this PatternLayout + + the converter info + + + This version of the method is used by the configurator. + Programmatic users should use the alternative method. + + + + + + Add a converter to this PatternLayout + + the name of the conversion pattern for this converter + the type of the converter + + + Add a named pattern converter to this instance. This + converter will be used in the formatting of the event. + This method must be called before . + + + The specified must extend the + type. + + + + + + Write the event appdomain name to the output + + + + Writes the to the output writer. + + + Daniel Cazzulino + Nicko Cadell + + + + Write the event appdomain name to the output + + that will receive the formatted result. + the event being logged + + + Writes the to the output . + + + + + + Converter for items in the ASP.Net Cache. + + + + Outputs an item from the . + + + Ron Grabowski + + + + Write the ASP.Net Cache item to the output + + that will receive the formatted result. + The on which the pattern converter should be executed. + The under which the ASP.Net request is running. + + + Writes out the value of a named property. The property name + should be set in the + property. If no property has been set, all key value pairs from the Cache will + be written to the output. + + + + + + Converter for items in the . + + + + Outputs an item from the . + + + Ron Grabowski + + + + Write the ASP.Net HttpContext item to the output + + that will receive the formatted result. + The on which the pattern converter should be executed. + The under which the ASP.Net request is running. + + + Writes out the value of a named property. The property name + should be set in the + property. + + + + + + Abstract class that provides access to the current HttpContext () that + derived classes need. + + + This class handles the case when HttpContext.Current is null by writing + to the writer. + + Ron Grabowski + + + + Derived pattern converters must override this method in order to + convert conversion specifiers in the correct way. + + that will receive the formatted result. + The on which the pattern converter should be executed. + The under which the ASP.Net request is running. + + + + Converter for items in the ASP.Net Cache. + + + + Outputs an item from the . + + + Ron Grabowski + + + + Write the ASP.Net Cache item to the output + + that will receive the formatted result. + The on which the pattern converter should be executed. + The under which the ASP.Net request is running. + + + Writes out the value of a named property. The property name + should be set in the + property. + + + + + + Converter for items in the ASP.Net Cache. + + + + Outputs an item from the . + + + Ron Grabowski + + + + Write the ASP.Net Cache item to the output + + that will receive the formatted result. + The on which the pattern converter should be executed. + The under which the ASP.Net request is running. + + + Writes out the value of a named property. The property name + should be set in the + property. If no property has been set, all key value pairs from the Session will + be written to the output. + + + + + + Date pattern converter, uses a to format + the date of a . + + + + Render the to the writer as a string. + + + The value of the determines + the formatting of the date. The following values are allowed: + + + Option value + Output + + + ISO8601 + + Uses the formatter. + Formats using the "yyyy-MM-dd HH:mm:ss,fff" pattern. + + + + DATE + + Uses the formatter. + Formats using the "dd MMM yyyy HH:mm:ss,fff" for example, "06 Nov 1994 15:49:37,459". + + + + ABSOLUTE + + Uses the formatter. + Formats using the "HH:mm:ss,yyyy" for example, "15:49:37,459". + + + + other + + Any other pattern string uses the formatter. + This formatter passes the pattern string to the + method. + For details on valid patterns see + DateTimeFormatInfo Class. + + + + + + The is in the local time zone and is rendered in that zone. + To output the time in Universal time see . + + + Nicko Cadell + + + + The used to render the date to a string + + + + The used to render the date to a string + + + + + + Initialize the converter pattern based on the property. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Convert the pattern into the rendered message + + that will receive the formatted result. + the event being logged + + + Pass the to the + for it to render it to the writer. + + + The passed is in the local time zone. + + + + + + The fully qualified type of the DatePatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Write the exception text to the output + + + + If an exception object is stored in the logging event + it will be rendered into the pattern output with a + trailing newline. + + + If there is no exception then nothing will be output + and no trailing newline will be appended. + It is typical to put a newline before the exception + and to have the exception as the last data in the pattern. + + + Nicko Cadell + + + + Default constructor + + + + + Write the exception text to the output + + that will receive the formatted result. + the event being logged + + + If an exception object is stored in the logging event + it will be rendered into the pattern output with a + trailing newline. + + + If there is no exception or the exception property specified + by the Option value does not exist then nothing will be output + and no trailing newline will be appended. + It is typical to put a newline before the exception + and to have the exception as the last data in the pattern. + + + Recognized values for the Option parameter are: + + + + Message + + + Source + + + StackTrace + + + TargetSite + + + HelpLink + + + + + + + Writes the caller location file name to the output + + + + Writes the value of the for + the event to the output writer. + + + Nicko Cadell + + + + Write the caller location file name to the output + + that will receive the formatted result. + the event being logged + + + Writes the value of the for + the to the output . + + + + + + Write the caller location info to the output + + + + Writes the to the output writer. + + + Nicko Cadell + + + + Write the caller location info to the output + + that will receive the formatted result. + the event being logged + + + Writes the to the output writer. + + + + + + Writes the event identity to the output + + + + Writes the value of the to + the output writer. + + + Daniel Cazzulino + Nicko Cadell + + + + Writes the event identity to the output + + that will receive the formatted result. + the event being logged + + + Writes the value of the + to + the output . + + + + + + Write the event level to the output + + + + Writes the display name of the event + to the writer. + + + Nicko Cadell + + + + Write the event level to the output + + that will receive the formatted result. + the event being logged + + + Writes the of the + to the . + + + + + + Write the caller location line number to the output + + + + Writes the value of the for + the event to the output writer. + + + Nicko Cadell + + + + Write the caller location line number to the output + + that will receive the formatted result. + the event being logged + + + Writes the value of the for + the to the output . + + + + + + Converter for logger name + + + + Outputs the of the event. + + + Nicko Cadell + + + + Gets the fully qualified name of the logger + + the event being logged + The fully qualified logger name + + + Returns the of the . + + + + + + Writes the event message to the output + + + + Uses the method + to write out the event message. + + + Nicko Cadell + + + + Writes the event message to the output + + that will receive the formatted result. + the event being logged + + + Uses the method + to write out the event message. + + + + + + Write the method name to the output + + + + Writes the caller location to + the output. + + + Nicko Cadell + + + + Write the method name to the output + + that will receive the formatted result. + the event being logged + + + Writes the caller location to + the output. + + + + + + Converter to output and truncate '.' separated strings + + + + This abstract class supports truncating a '.' separated string + to show a specified number of elements from the right hand side. + This is used to truncate class names that are fully qualified. + + + Subclasses should override the method to + return the fully qualified string. + + + Nicko Cadell + + + + Initialize the converter + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Get the fully qualified string data + + the event being logged + the fully qualified name + + + Overridden by subclasses to get the fully qualified name before the + precision is applied to it. + + + Return the fully qualified '.' (dot/period) separated string. + + + + + + Convert the pattern to the rendered message + + that will receive the formatted result. + the event being logged + + Render the to the precision + specified by the property. + + + + + The fully qualified type of the NamedPatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Converter to include event NDC + + + + Outputs the value of the event property named NDC. + + + The should be used instead. + + + Nicko Cadell + + + + Write the event NDC to the output + + that will receive the formatted result. + the event being logged + + + As the thread context stacks are now stored in named event properties + this converter simply looks up the value of the NDC property. + + + The should be used instead. + + + + + + Abstract class that provides the formatting functionality that + derived classes need. + + + Conversion specifiers in a conversion patterns are parsed to + individual PatternConverters. Each of which is responsible for + converting a logging event in a converter specific manner. + + Nicko Cadell + + + + Initializes a new instance of the class. + + + + + Flag indicating if this converter handles the logging event exception + + false if this converter handles the logging event exception + + + If this converter handles the exception object contained within + , then this property should be set to + false. Otherwise, if the layout ignores the exception + object, then the property should be set to true. + + + Set this value to override a this default setting. The default + value is true, this converter does not handle the exception. + + + + + + Derived pattern converters must override this method in order to + convert conversion specifiers in the correct way. + + that will receive the formatted result. + The on which the pattern converter should be executed. + + + + Derived pattern converters must override this method in order to + convert conversion specifiers in the correct way. + + that will receive the formatted result. + The state object on which the pattern converter should be executed. + + + + Flag indicating if this converter handles exceptions + + + false if this converter handles exceptions + + + + + Property pattern converter + + + + Writes out the value of a named property. The property name + should be set in the + property. + + + If the is set to null + then all the properties are written as key value pairs. + + + Nicko Cadell + + + + Write the property value to the output + + that will receive the formatted result. + the event being logged + + + Writes out the value of a named property. The property name + should be set in the + property. + + + If the is set to null + then all the properties are written as key value pairs. + + + + + + Converter to output the relative time of the event + + + + Converter to output the time of the event relative to the start of the program. + + + Nicko Cadell + + + + Write the relative time to the output + + that will receive the formatted result. + the event being logged + + + Writes out the relative time of the event in milliseconds. + That is the number of milliseconds between the event + and the . + + + + + + Helper method to get the time difference between two DateTime objects + + start time (in the current local time zone) + end time (in the current local time zone) + the time difference in milliseconds + + + + Write the caller stack frames to the output + + + + Writes the to the output writer, using format: + type3.MethodCall3(type param,...) > type2.MethodCall2(type param,...) > type1.MethodCall1(type param,...) + + + Adam Davies + + + + The fully qualified type of the StackTraceDetailPatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Write the caller stack frames to the output + + + + Writes the to the output writer, using format: + type3.MethodCall3 > type2.MethodCall2 > type1.MethodCall1 + + + Michael Cromwell + + + + Initialize the converter + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Write the strack frames to the output + + that will receive the formatted result. + the event being logged + + + Writes the to the output writer. + + + + + + Returns the Name of the method + + + This method was created, so this class could be used as a base class for StackTraceDetailPatternConverter + string + + + + The fully qualified type of the StackTracePatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Converter to include event thread name + + + + Writes the to the output. + + + Nicko Cadell + + + + Write the ThreadName to the output + + that will receive the formatted result. + the event being logged + + + Writes the to the . + + + + + + Pattern converter for the class name + + + + Outputs the of the event. + + + Nicko Cadell + + + + Gets the fully qualified name of the class + + the event being logged + The fully qualified type name for the caller location + + + Returns the of the . + + + + + + Converter to include event user name + + Douglas de la Torre + Nicko Cadell + + + + Convert the pattern to the rendered message + + that will receive the formatted result. + the event being logged + + + + Write the TimeStamp to the output + + + + Date pattern converter, uses a to format + the date of a . + + + Uses a to format the + in Universal time. + + + See the for details on the date pattern syntax. + + + + Nicko Cadell + + + + Write the TimeStamp to the output + + that will receive the formatted result. + the event being logged + + + Pass the to the + for it to render it to the writer. + + + The passed is in the local time zone, this is converted + to Universal time before it is rendered. + + + + + + + The fully qualified type of the UtcDatePatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Type converter for the interface + + + + Used to convert objects to the interface. + Supports converting from the interface to + the interface using the . + + + Nicko Cadell + Gert Driesen + + + + Can the sourceType be converted to an + + the source to be to be converted + true if the source type can be converted to + + + Test if the can be converted to a + . Only is supported + as the . + + + + + + Convert the value to a object + + the value to convert + the object + + + Convert the object to a + object. If the object + is a then the + is used to adapt between the two interfaces, otherwise an + exception is thrown. + + + + + + Extract the value of a property from the + + + + Extract the value of a property from the + + + Nicko Cadell + + + + Constructs a RawPropertyLayout + + + + + The name of the value to lookup in the LoggingEvent Properties collection. + + + Value to lookup in the LoggingEvent Properties collection + + + + String name of the property to lookup in the . + + + + + + Lookup the property for + + The event to format + returns property value + + + Looks up and returns the object value of the property + named . If there is no property defined + with than name then null will be returned. + + + + + + Extract the date from the + + + + Extract the date from the + + + Nicko Cadell + Gert Driesen + + + + Constructs a RawTimeStampLayout + + + + + Gets the as a . + + The event to format + returns the time stamp + + + Gets the as a . + + + The time stamp is in local time. To format the time stamp + in universal time use . + + + + + + Extract the date from the + + + + Extract the date from the + + + Nicko Cadell + Gert Driesen + + + + Constructs a RawUtcTimeStampLayout + + + + + Gets the as a . + + The event to format + returns the time stamp + + + Gets the as a . + + + The time stamp is in universal time. To format the time stamp + in local time use . + + + + + + A very simple layout + + + + SimpleLayout consists of the level of the log statement, + followed by " - " and then the log message itself. For example, + + DEBUG - Hello world + + + + Nicko Cadell + Gert Driesen + + + + Constructs a SimpleLayout + + + + + Initialize layout options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Produces a simple formatted output. + + the event being logged + The TextWriter to write the formatted event to + + + Formats the event as the level of the even, + followed by " - " and then the log message itself. The + output is terminated by a newline. + + + + + + Layout that formats the log events as XML elements. + + + + The output of the consists of a series of + log4net:event elements. It does not output a complete well-formed XML + file. The output is designed to be included as an external entity + in a separate file to form a correct XML file. + + + For example, if abc is the name of the file where + the output goes, then a well-formed XML file would + be: + + + <?xml version="1.0" ?> + + <!DOCTYPE log4net:events SYSTEM "log4net-events.dtd" [<!ENTITY data SYSTEM "abc">]> + + <log4net:events version="1.2" xmlns:log4net="http://logging.apache.org/log4net/schemas/log4net-events-1.2> + &data; + </log4net:events> + + + This approach enforces the independence of the + and the appender where it is embedded. + + + The version attribute helps components to correctly + interpret output generated by . The value of + this attribute should be "1.2" for release 1.2 and later. + + + Alternatively the Header and Footer properties can be + configured to output the correct XML header, open tag and close tag. + When setting the Header and Footer properties it is essential + that the underlying data store not be appendable otherwise the data + will become invalid XML. + + + Nicko Cadell + Gert Driesen + + + + Constructs an XmlLayout + + + + + Constructs an XmlLayout. + + + + The LocationInfo option takes a boolean value. By + default, it is set to false which means there will be no location + information output by this layout. If the the option is set to + true, then the file name and line number of the statement + at the origin of the log statement will be output. + + + If you are embedding this layout within an SmtpAppender + then make sure to set the LocationInfo option of that + appender as well. + + + + + + The prefix to use for all element names + + + + The default prefix is log4net. Set this property + to change the prefix. If the prefix is set to an empty string + then no prefix will be written. + + + + + + Set whether or not to base64 encode the message. + + + + By default the log message will be written as text to the xml + output. This can cause problems when the message contains binary + data. By setting this to true the contents of the message will be + base64 encoded. If this is set then invalid character replacement + (see ) will not be performed + on the log message. + + + + + + Set whether or not to base64 encode the property values. + + + + By default the properties will be written as text to the xml + output. This can cause problems when one or more properties contain + binary data. By setting this to true the values of the properties + will be base64 encoded. If this is set then invalid character replacement + (see ) will not be performed + on the property values. + + + + + + Initialize layout options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + Builds a cache of the element names + + + + + + Does the actual writing of the XML. + + The writer to use to output the event to. + The event to write. + + + Override the base class method + to write the to the . + + + + + + The prefix to use for all generated element names + + + + + Layout that formats the log events as XML elements. + + + + This is an abstract class that must be subclassed by an implementation + to conform to a specific schema. + + + Deriving classes must implement the method. + + + Nicko Cadell + Gert Driesen + + + + Protected constructor to support subclasses + + + + Initializes a new instance of the class + with no location info. + + + + + + Protected constructor to support subclasses + + + + The parameter determines whether + location information will be output by the layout. If + is set to true, then the + file name and line number of the statement at the origin of the log + statement will be output. + + + If you are embedding this layout within an SMTPAppender + then make sure to set the LocationInfo option of that + appender as well. + + + + + + Gets a value indicating whether to include location information in + the XML events. + + + true if location information should be included in the XML + events; otherwise, false. + + + + If is set to true, then the file + name and line number of the statement at the origin of the log + statement will be output. + + + If you are embedding this layout within an SMTPAppender + then make sure to set the LocationInfo option of that + appender as well. + + + + + + The string to replace characters that can not be expressed in XML with. + + + Not all characters may be expressed in XML. This property contains the + string to replace those that can not with. This defaults to a ?. Set it + to the empty string to simply remove offending characters. For more + details on the allowed character ranges see http://www.w3.org/TR/REC-xml/#charsets + Character replacement will occur in the log message, the property names + and the property values. + + + + + + + Initialize layout options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Gets the content type output by this layout. + + + As this is the XML layout, the value is always "text/xml". + + + + As this is the XML layout, the value is always "text/xml". + + + + + + Produces a formatted string. + + The event being logged. + The TextWriter to write the formatted event to + + + Format the and write it to the . + + + This method creates an that writes to the + . The is passed + to the method. Subclasses should override the + method rather than this method. + + + + + + Does the actual writing of the XML. + + The writer to use to output the event to. + The event to write. + + + Subclasses should override this method to format + the as XML. + + + + + + Flag to indicate if location information should be included in + the XML events. + + + + + The string to replace invalid chars with + + + + + Layout that formats the log events as XML elements compatible with the log4j schema + + + + Formats the log events according to the http://logging.apache.org/log4j schema. + + + Nicko Cadell + + + + The 1st of January 1970 in UTC + + + + + Constructs an XMLLayoutSchemaLog4j + + + + + Constructs an XMLLayoutSchemaLog4j. + + + + The LocationInfo option takes a boolean value. By + default, it is set to false which means there will be no location + information output by this layout. If the the option is set to + true, then the file name and line number of the statement + at the origin of the log statement will be output. + + + If you are embedding this layout within an SMTPAppender + then make sure to set the LocationInfo option of that + appender as well. + + + + + + The version of the log4j schema to use. + + + + Only version 1.2 of the log4j schema is supported. + + + + + + Actually do the writing of the xml + + the writer to use + the event to write + + + Generate XML that is compatible with the log4j schema. + + + + + + The log4net Logical Thread Context. + + + + The LogicalThreadContext provides a location for specific debugging + information to be stored. + The LogicalThreadContext properties override any or + properties with the same name. + + + For .NET Standard 1.3 this class uses + System.Threading.AsyncLocal rather than . + + + The Logical Thread Context has a properties map and a stack. + The properties and stack can + be included in the output of log messages. The + supports selecting and outputting these properties. + + + The Logical Thread Context provides a diagnostic context for the current call context. + This is an instrument for distinguishing interleaved log + output from different sources. Log output is typically interleaved + when a server handles multiple clients near-simultaneously. + + + The Logical Thread Context is managed on a per basis. + + + The requires a link time + for the + . + If the calling code does not have this permission then this context will be disabled. + It will not store any property values set on it. + + + Example of using the thread context properties to store a username. + + LogicalThreadContext.Properties["user"] = userName; + log.Info("This log message has a LogicalThreadContext Property called 'user'"); + + + Example of how to push a message into the context stack + + using(LogicalThreadContext.Stacks["LDC"].Push("my context message")) + { + log.Info("This log message has a LogicalThreadContext Stack message that includes 'my context message'"); + + } // at the end of the using block the message is automatically popped + + + + Nicko Cadell + + + + Private Constructor. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + The thread properties map + + + The thread properties map + + + + The LogicalThreadContext properties override any + or properties with the same name. + + + + + + The thread stacks + + + stack map + + + + The logical thread stacks. + + + + + + The thread context properties instance + + + + + The thread context stacks instance + + + + + This class is used by client applications to request logger instances. + + + + This class has static methods that are used by a client to request + a logger instance. The method is + used to retrieve a logger. + + + See the interface for more details. + + + Simple example of logging messages + + ILog log = LogManager.GetLogger("application-log"); + + log.Info("Application Start"); + log.Debug("This is a debug message"); + + if (log.IsDebugEnabled) + { + log.Debug("This is another debug message"); + } + + + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + Uses a private access modifier to prevent instantiation of this class. + + + + Returns the named logger if it exists. + + Returns the named logger if it exists. + + + + If the named logger exists (in the default repository) then it + returns a reference to the logger, otherwise it returns null. + + + The fully qualified logger name to look for. + The logger found, or null if no logger could be found. + + + Get the currently defined loggers. + + Returns all the currently defined loggers in the default repository. + + + The root logger is not included in the returned array. + + All the defined loggers. + + + Get or create a logger. + + Retrieves or creates a named logger. + + + + Retrieves a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + The name of the logger to retrieve. + The logger with the name specified. + + + + Returns the named logger if it exists. + + + + If the named logger exists (in the specified repository) then it + returns a reference to the logger, otherwise it returns + null. + + + The repository to lookup in. + The fully qualified logger name to look for. + + The logger found, or null if the logger doesn't exist in the specified + repository. + + + + + Returns the named logger if it exists. + + + + If the named logger exists (in the repository for the specified assembly) then it + returns a reference to the logger, otherwise it returns + null. + + + The assembly to use to lookup the repository. + The fully qualified logger name to look for. + + The logger, or null if the logger doesn't exist in the specified + assembly's repository. + + + + + Returns all the currently defined loggers in the specified repository. + + The repository to lookup in. + + The root logger is not included in the returned array. + + All the defined loggers. + + + + Returns all the currently defined loggers in the specified assembly's repository. + + The assembly to use to lookup the repository. + + The root logger is not included in the returned array. + + All the defined loggers. + + + + Retrieves or creates a named logger. + + + + Retrieve a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + The repository to lookup in. + The name of the logger to retrieve. + The logger with the name specified. + + + + Retrieves or creates a named logger. + + + + Retrieve a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + The assembly to use to lookup the repository. + The name of the logger to retrieve. + The logger with the name specified. + + + + Shorthand for . + + + Get the logger for the fully qualified name of the type specified. + + The full name of will be used as the name of the logger to retrieve. + The logger with the name specified. + + + + Shorthand for . + + + Gets the logger for the fully qualified name of the type specified. + + The repository to lookup in. + The full name of will be used as the name of the logger to retrieve. + The logger with the name specified. + + + + Shorthand for . + + + Gets the logger for the fully qualified name of the type specified. + + The assembly to use to lookup the repository. + The full name of will be used as the name of the logger to retrieve. + The logger with the name specified. + + + + Shuts down the log4net system. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in all the + default repositories. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + Shutdown a logger repository. + + Shuts down the default repository. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + default repository. + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Shuts down the repository for the repository specified. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + specified. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + The repository to shutdown. + + + + Shuts down the repository specified. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + repository. The repository is looked up using + the specified. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + The assembly to use to lookup the repository. + + + Reset the configuration of a repository + + Resets all values contained in this repository instance to their defaults. + + + + Resets all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set to its default "off" value. + + + + + + Resets all values contained in this repository instance to their defaults. + + + + Reset all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set to its default "off" value. + + + The repository to reset. + + + + Resets all values contained in this repository instance to their defaults. + + + + Reset all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set to its default "off" value. + + + The assembly to use to lookup the repository to reset. + + + Get the logger repository. + + Returns the default instance. + + + + Gets the for the repository specified + by the callers assembly (). + + + The instance for the default repository. + + + + Returns the default instance. + + The default instance. + + + Gets the for the repository specified + by the argument. + + + The repository to lookup in. + + + + Returns the default instance. + + The default instance. + + + Gets the for the repository specified + by the argument. + + + The assembly to use to lookup the repository. + + + Get a logger repository. + + Returns the default instance. + + + + Gets the for the repository specified + by the callers assembly (). + + + The instance for the default repository. + + + + Returns the default instance. + + The default instance. + + + Gets the for the repository specified + by the argument. + + + The repository to lookup in. + + + + Returns the default instance. + + The default instance. + + + Gets the for the repository specified + by the argument. + + + The assembly to use to lookup the repository. + + + Create a domain + + Creates a repository with the specified repository type. + + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The created will be associated with the repository + specified such that a call to will return + the same repository instance. + + + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + Create a logger repository. + + Creates a repository with the specified repository type. + + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + The created will be associated with the repository + specified such that a call to will return + the same repository instance. + + + + + + Creates a repository with the specified name. + + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + Creates the default type of which is a + object. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The name of the repository, this must be unique amongst repositories. + The created for the repository. + The specified repository already exists. + + + + Creates a repository with the specified name. + + + + Creates the default type of which is a + object. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The name of the repository, this must be unique amongst repositories. + The created for the repository. + The specified repository already exists. + + + + Creates a repository with the specified name and repository type. + + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The name of the repository, this must be unique to the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + The specified repository already exists. + + + + Creates a repository with the specified name and repository type. + + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The name of the repository, this must be unique to the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + The specified repository already exists. + + + + Creates a repository for the specified assembly and repository type. + + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + The assembly to use to get the name of the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + + Creates a repository for the specified assembly and repository type. + + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + The assembly to use to get the name of the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + + Gets the list of currently defined repositories. + + + + Get an array of all the objects that have been created. + + + An array of all the known objects. + + + + Flushes logging events buffered in all configured appenders in the default repository. + + The maximum time in milliseconds to wait for logging events from asycnhronous appenders to be flushed. + True if all logging events were flushed successfully, else false. + + + + Looks up the wrapper object for the logger specified. + + The logger to get the wrapper for. + The wrapper for the logger specified. + + + + Looks up the wrapper objects for the loggers specified. + + The loggers to get the wrappers for. + The wrapper objects for the loggers specified. + + + + Create the objects used by + this manager. + + The logger to wrap. + The wrapper for the logger specified. + + + + The wrapper map to use to hold the objects. + + + + + Implementation of Mapped Diagnostic Contexts. + + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + The MDC class is similar to the class except that it is + based on a map instead of a stack. It provides mapped + diagnostic contexts. A Mapped Diagnostic Context, or + MDC in short, is an instrument for distinguishing interleaved log + output from different sources. Log output is typically interleaved + when a server handles multiple clients near-simultaneously. + + + The MDC is managed on a per thread basis. + + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + Uses a private access modifier to prevent instantiation of this class. + + + + + Gets the context value identified by the parameter. + + The key to lookup in the MDC. + The string value held for the key, or a null reference if no corresponding value is found. + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + If the parameter does not look up to a + previously defined context then null will be returned. + + + + + + Add an entry to the MDC + + The key to store the value under. + The value to store. + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + Puts a context value (the parameter) as identified + with the parameter into the current thread's + context map. + + + If a value is already defined for the + specified then the value will be replaced. If the + is specified as null then the key value mapping will be removed. + + + + + + Removes the key value mapping for the key specified. + + The key to remove. + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + Remove the specified entry from this thread's MDC + + + + + + Clear all entries in the MDC + + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + Remove all the entries from this thread's MDC + + + + + + Implementation of Nested Diagnostic Contexts. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + A Nested Diagnostic Context, or NDC in short, is an instrument + to distinguish interleaved log output from different sources. Log + output is typically interleaved when a server handles multiple + clients near-simultaneously. + + + Interleaved log output can still be meaningful if each log entry + from different contexts had a distinctive stamp. This is where NDCs + come into play. + + + Note that NDCs are managed on a per thread basis. The NDC class + is made up of static methods that operate on the context of the + calling thread. + + + How to push a message into the context + + using(NDC.Push("my context message")) + { + ... all log calls will have 'my context message' included ... + + } // at the end of the using block the message is automatically removed + + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + Uses a private access modifier to prevent instantiation of this class. + + + + + Gets the current context depth. + + The current context depth. + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + The number of context values pushed onto the context stack. + + + Used to record the current depth of the context. This can then + be restored using the method. + + + + + + + Clears all the contextual information held on the current thread. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + Clears the stack of NDC data held on the current thread. + + + + + + Creates a clone of the stack of context information. + + A clone of the context info for this thread. + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + The results of this method can be passed to the + method to allow child threads to inherit the context of their + parent thread. + + + + + + Inherits the contextual information from another thread. + + The context stack to inherit. + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + This thread will use the context information from the stack + supplied. This can be used to initialize child threads with + the same contextual information as their parent threads. These + contexts will NOT be shared. Any further contexts that + are pushed onto the stack will not be visible to the other. + Call to obtain a stack to pass to + this method. + + + + + + Removes the top context from the stack. + + + The message in the context that was removed from the top + of the stack. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + Remove the top context from the stack, and return + it to the caller. If the stack is empty then an + empty string (not null) is returned. + + + + + + Pushes a new context message. + + The new context message. + + An that can be used to clean up + the context stack. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + Pushes a new context onto the context stack. An + is returned that can be used to clean up the context stack. This + can be easily combined with the using keyword to scope the + context. + + + Simple example of using the Push method with the using keyword. + + using(log4net.NDC.Push("NDC_Message")) + { + log.Warn("This should have an NDC message"); + } + + + + + + Pushes a new context message. + + The new context message string format. + Arguments to be passed into messageFormat. + + An that can be used to clean up + the context stack. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + Pushes a new context onto the context stack. An + is returned that can be used to clean up the context stack. This + can be easily combined with the using keyword to scope the + context. + + + Simple example of using the Push method with the using keyword. + + var someValue = "ExampleContext" + using(log4net.NDC.PushFormat("NDC_Message {0}", someValue)) + { + log.Warn("This should have an NDC message"); + } + + + + + + Removes the context information for this thread. It is + not required to call this method. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + This method is not implemented. + + + + + + Forces the stack depth to be at most . + + The maximum depth of the stack + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + Forces the stack depth to be at most . + This may truncate the head of the stack. This only affects the + stack in the current thread. Also it does not prevent it from + growing, it only sets the maximum depth at the time of the + call. This can be used to return to a known context depth. + + + + + + The default object Renderer. + + + + The default renderer supports rendering objects and collections to strings. + + + See the method for details of the output. + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Default constructor + + + + + + Render the object to a string + + The map used to lookup renderers + The object to render + The writer to render to + + + Render the object to a string. + + + The parameter is + provided to lookup and render other objects. This is + very useful where contains + nested objects of unknown type. The + method can be used to render these objects. + + + The default renderer supports rendering objects to strings as follows: + + + + Value + Rendered String + + + null + + "(null)" + + + + + + + For a one dimensional array this is the + array type name, an open brace, followed by a comma + separated list of the elements (using the appropriate + renderer), followed by a close brace. + + + For example: int[] {1, 2, 3}. + + + If the array is not one dimensional the + Array.ToString() is returned. + + + + + , & + + + Rendered as an open brace, followed by a comma + separated list of the elements (using the appropriate + renderer), followed by a close brace. + + + For example: {a, b, c}. + + + All collection classes that implement its subclasses, + or generic equivalents all implement the interface. + + + + + + + + Rendered as the key, an equals sign ('='), and the value (using the appropriate + renderer). + + + For example: key=value. + + + + + other + + Object.ToString() + + + + + + + + Render the array argument into a string + + The map used to lookup renderers + the array to render + The writer to render to + + + For a one dimensional array this is the + array type name, an open brace, followed by a comma + separated list of the elements (using the appropriate + renderer), followed by a close brace. For example: + int[] {1, 2, 3}. + + + If the array is not one dimensional the + Array.ToString() is returned. + + + + + + Render the enumerator argument into a string + + The map used to lookup renderers + the enumerator to render + The writer to render to + + + Rendered as an open brace, followed by a comma + separated list of the elements (using the appropriate + renderer), followed by a close brace. For example: + {a, b, c}. + + + + + + Render the DictionaryEntry argument into a string + + The map used to lookup renderers + the DictionaryEntry to render + The writer to render to + + + Render the key, an equals sign ('='), and the value (using the appropriate + renderer). For example: key=value. + + + + + + Implement this interface in order to render objects as strings + + + + Certain types require special case conversion to + string form. This conversion is done by an object renderer. + Object renderers implement the + interface. + + + Nicko Cadell + Gert Driesen + + + + Render the object to a string + + The map used to lookup renderers + The object to render + The writer to render to + + + Render the object to a + string. + + + The parameter is + provided to lookup and render other objects. This is + very useful where contains + nested objects of unknown type. The + method can be used to render these objects. + + + + + + Map class objects to an . + + + + Maintains a mapping between types that require special + rendering and the that + is used to render them. + + + The method is used to render an + object using the appropriate renderers defined in this map. + + + Nicko Cadell + Gert Driesen + + + + Default Constructor + + + + Default constructor. + + + + + + Render using the appropriate renderer. + + the object to render to a string + the object rendered as a string + + + This is a convenience method used to render an object to a string. + The alternative method + should be used when streaming output to a . + + + + + + Render using the appropriate renderer. + + the object to render to a string + The writer to render to + + + Find the appropriate renderer for the type of the + parameter. This is accomplished by calling the + method. Once a renderer is found, it is + applied on the object and the result is returned + as a . + + + + + + Gets the renderer for the specified object type + + the object to lookup the renderer for + the renderer for + + + Gets the renderer for the specified object type. + + + Syntactic sugar method that calls + with the type of the object parameter. + + + + + + Gets the renderer for the specified type + + the type to lookup the renderer for + the renderer for the specified type + + + Returns the renderer for the specified type. + If no specific renderer has been defined the + will be returned. + + + + + + Internal function to recursively search interfaces + + the type to lookup the renderer for + the renderer for the specified type + + + + Get the default renderer instance + + the default renderer + + + Get the default renderer + + + + + + Clear the map of renderers + + + + Clear the custom renderers defined by using + . The + cannot be removed. + + + + + + Register an for . + + the type that will be rendered by + the renderer for + + + Register an object renderer for a specific source type. + This renderer will be returned from a call to + specifying the same as an argument. + + + + + + Interface implemented by logger repository plugins. + + + + Plugins define additional behavior that can be associated + with a . + The held by the + property is used to store the plugins for a repository. + + + The log4net.Config.PluginAttribute can be used to + attach plugins to repositories created using configuration + attributes. + + + Nicko Cadell + Gert Driesen + + + + Gets the name of the plugin. + + + The name of the plugin. + + + + Plugins are stored in the + keyed by name. Each plugin instance attached to a + repository must be a unique name. + + + + + + Attaches the plugin to the specified . + + The that this plugin should be attached to. + + + A plugin may only be attached to a single repository. + + + This method is called when the plugin is attached to the repository. + + + + + + Is called when the plugin is to shutdown. + + + + This method is called to notify the plugin that + it should stop operating and should detach from + the repository. + + + + + + Interface used to create plugins. + + + + Interface used to create a plugin. + + + Nicko Cadell + Gert Driesen + + + + Creates the plugin object. + + the new plugin instance + + + Create and return a new plugin instance. + + + + + + A strongly-typed collection of objects. + + Nicko Cadell + + + + Supports type-safe iteration over a . + + + + + + Gets the current element in the collection. + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Creates a read-only wrapper for a PluginCollection instance. + + list to create a readonly wrapper arround + + A PluginCollection wrapper that is read-only. + + + + + Initializes a new instance of the PluginCollection class + that is empty and has the default initial capacity. + + + + + Initializes a new instance of the PluginCollection class + that has the specified initial capacity. + + + The number of elements that the new PluginCollection is initially capable of storing. + + + + + Initializes a new instance of the PluginCollection class + that contains elements copied from the specified PluginCollection. + + The PluginCollection whose elements are copied to the new collection. + + + + Initializes a new instance of the PluginCollection class + that contains elements copied from the specified array. + + The array whose elements are copied to the new list. + + + + Initializes a new instance of the PluginCollection class + that contains elements copied from the specified collection. + + The collection whose elements are copied to the new list. + + + + Type visible only to our subclasses + Used to access protected constructor + + + + + + A value + + + + + Allow subclasses to avoid our default constructors + + + + + + + Gets the number of elements actually contained in the PluginCollection. + + + + + Copies the entire PluginCollection to a one-dimensional + array. + + The one-dimensional array to copy to. + + + + Copies the entire PluginCollection to a one-dimensional + array, starting at the specified index of the target array. + + The one-dimensional array to copy to. + The zero-based index in at which copying begins. + + + + Gets a value indicating whether access to the collection is synchronized (thread-safe). + + false, because the backing type is an array, which is never thread-safe. + + + + Gets an object that can be used to synchronize access to the collection. + + + An object that can be used to synchronize access to the collection. + + + + + Gets or sets the at the specified index. + + + The at the specified index. + + The zero-based index of the element to get or set. + + is less than zero. + -or- + is equal to or greater than . + + + + + Adds a to the end of the PluginCollection. + + The to be added to the end of the PluginCollection. + The index at which the value has been added. + + + + Removes all elements from the PluginCollection. + + + + + Creates a shallow copy of the . + + A new with a shallow copy of the collection data. + + + + Determines whether a given is in the PluginCollection. + + The to check for. + true if is found in the PluginCollection; otherwise, false. + + + + Returns the zero-based index of the first occurrence of a + in the PluginCollection. + + The to locate in the PluginCollection. + + The zero-based index of the first occurrence of + in the entire PluginCollection, if found; otherwise, -1. + + + + + Inserts an element into the PluginCollection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + is less than zero + -or- + is equal to or greater than . + + + + + Removes the first occurrence of a specific from the PluginCollection. + + The to remove from the PluginCollection. + + The specified was not found in the PluginCollection. + + + + + Removes the element at the specified index of the PluginCollection. + + The zero-based index of the element to remove. + + is less than zero. + -or- + is equal to or greater than . + + + + + Gets a value indicating whether the collection has a fixed size. + + true if the collection has a fixed size; otherwise, false. The default is false. + + + + Gets a value indicating whether the IList is read-only. + + true if the collection is read-only; otherwise, false. The default is false. + + + + Returns an enumerator that can iterate through the PluginCollection. + + An for the entire PluginCollection. + + + + Gets or sets the number of elements the PluginCollection can contain. + + + The number of elements the PluginCollection can contain. + + + + + Adds the elements of another PluginCollection to the current PluginCollection. + + The PluginCollection whose elements should be added to the end of the current PluginCollection. + The new of the PluginCollection. + + + + Adds the elements of a array to the current PluginCollection. + + The array whose elements should be added to the end of the PluginCollection. + The new of the PluginCollection. + + + + Adds the elements of a collection to the current PluginCollection. + + The collection whose elements should be added to the end of the PluginCollection. + The new of the PluginCollection. + + + + Sets the capacity to the actual number of elements. + + + + + is less than zero. + -or- + is equal to or greater than . + + + + + is less than zero. + -or- + is equal to or greater than . + + + + + Supports simple iteration over a . + + + + + + Initializes a new instance of the Enumerator class. + + + + + + Gets the current element in the collection. + + + The current element in the collection. + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + + + + Map of repository plugins. + + + + This class is a name keyed map of the plugins that are + attached to a repository. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + The repository that the plugins should be attached to. + + + Initialize a new instance of the class with a + repository that the plugins should be attached to. + + + + + + Gets a by name. + + The name of the to lookup. + + The from the map with the name specified, or + null if no plugin is found. + + + + Lookup a plugin by name. If the plugin is not found null + will be returned. + + + + + + Gets all possible plugins as a list of objects. + + All possible plugins as a list of objects. + + + Get a collection of all the plugins defined in this map. + + + + + + Adds a to the map. + + The to add to the map. + + + The will be attached to the repository when added. + + + If there already exists a plugin with the same name + attached to the repository then the old plugin will + be and replaced with + the new plugin. + + + + + + Removes a from the map. + + The to remove from the map. + + + Remove a specific plugin from this map. + + + + + + Base implementation of + + + + Default abstract implementation of the + interface. This base class can be used by implementors + of the interface. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + the name of the plugin + + Initializes a new Plugin with the specified name. + + + + + Gets or sets the name of the plugin. + + + The name of the plugin. + + + + Plugins are stored in the + keyed by name. Each plugin instance attached to a + repository must be a unique name. + + + The name of the plugin must not change one the + plugin has been attached to a repository. + + + + + + Attaches this plugin to a . + + The that this plugin should be attached to. + + + A plugin may only be attached to a single repository. + + + This method is called when the plugin is attached to the repository. + + + + + + Is called when the plugin is to shutdown. + + + + This method is called to notify the plugin that + it should stop operating and should detach from + the repository. + + + + + + The repository for this plugin + + + The that this plugin is attached to. + + + + Gets or sets the that this plugin is + attached to. + + + + + + The name of this plugin. + + + + + The repository this plugin is attached to. + + + + + Plugin that listens for events from the + + + + This plugin publishes an instance of + on a specified . This listens for logging events delivered from + a remote . + + + When an event is received it is relogged within the attached repository + as if it had been raised locally. + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Initializes a new instance of the class. + + + The property must be set. + + + + + + Construct with sink Uri. + + The name to publish the sink under in the remoting infrastructure. + See for more details. + + + Initializes a new instance of the class + with specified name. + + + + + + Gets or sets the URI of this sink. + + + The URI of this sink. + + + + This is the name under which the object is marshaled. + + + + + + + Attaches this plugin to a . + + The that this plugin should be attached to. + + + A plugin may only be attached to a single repository. + + + This method is called when the plugin is attached to the repository. + + + + + + Is called when the plugin is to shutdown. + + + + When the plugin is shutdown the remote logging + sink is disconnected. + + + + + + The fully qualified type of the RemoteLoggingServerPlugin class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Delivers objects to a remote sink. + + + + Internal class used to listen for logging events + and deliver them to the local repository. + + + + + + Constructor + + The repository to log to. + + + Initializes a new instance of the for the + specified . + + + + + + Logs the events to the repository. + + The events to log. + + + The events passed are logged to the + + + + + + Obtains a lifetime service object to control the lifetime + policy for this instance. + + null to indicate that this instance should live forever. + + + Obtains a lifetime service object to control the lifetime + policy for this instance. This object should live forever + therefore this implementation returns null. + + + + + + The underlying that events should + be logged to. + + + + + + + + + + + + + + + + + + + + + Default implementation of + + + + This default implementation of the + interface is used to create the default subclass + of the object. + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Initializes a new instance of the class. + + + + + + Create a new instance + + The that will own the . + The name of the . + The instance for the specified name. + + + Create a new instance with the + specified name. + + + Called by the to create + new named instances. + + + If the is null then the root logger + must be returned. + + + + + + Default internal subclass of + + + + This subclass has no additional behavior over the + class but does allow instances + to be created. + + + + + + Construct a new Logger + + the name of the logger + + + Initializes a new instance of the class + with the specified name. + + + + + + Delegate used to handle logger creation event notifications. + + The in which the has been created. + The event args that hold the instance that has been created. + + + Delegate used to handle logger creation event notifications. + + + + + + Provides data for the event. + + + + A event is raised every time a + is created. + + + + + + The created + + + + + Constructor + + The that has been created. + + + Initializes a new instance of the event argument + class,with the specified . + + + + + + Gets the that has been created. + + + The that has been created. + + + + The that has been created. + + + + + + Hierarchical organization of loggers + + + + The casual user should not have to deal with this class + directly. + + + This class is specialized in retrieving loggers by name and + also maintaining the logger hierarchy. Implements the + interface. + + + The structure of the logger hierarchy is maintained by the + method. The hierarchy is such that children + link to their parent but parents do not have any references to their + children. Moreover, loggers can be instantiated in any order, in + particular descendant before ancestor. + + + In case a descendant is created before a particular ancestor, + then it creates a provision node for the ancestor and adds itself + to the provision node. Other descendants of the same ancestor add + themselves to the previously created provision node. + + + Nicko Cadell + Gert Driesen + + + + Event used to notify that a logger has been created. + + + + Event raised when a logger is created. + + + + + + Default constructor + + + + Initializes a new instance of the class. + + + + + + Construct with properties + + The properties to pass to this repository. + + + Initializes a new instance of the class. + + + + + + Construct with a logger factory + + The factory to use to create new logger instances. + + + Initializes a new instance of the class with + the specified . + + + + + + Construct with properties and a logger factory + + The properties to pass to this repository. + The factory to use to create new logger instances. + + + Initializes a new instance of the class with + the specified . + + + + + + Has no appender warning been emitted + + + + Flag to indicate if we have already issued a warning + about not having an appender warning. + + + + + + Get the root of this hierarchy + + + + Get the root of this hierarchy. + + + + + + Gets or sets the default instance. + + The default + + + The logger factory is used to create logger instances. + + + + + + Test if a logger exists + + The name of the logger to lookup + The Logger object with the name specified + + + Check if the named logger exists in the hierarchy. If so return + its reference, otherwise returns null. + + + + + + Returns all the currently defined loggers in the hierarchy as an Array + + All the defined loggers + + + Returns all the currently defined loggers in the hierarchy as an Array. + The root logger is not included in the returned + enumeration. + + + + + + Return a new logger instance named as the first parameter using + the default factory. + + + + Return a new logger instance named as the first parameter using + the default factory. + + + If a logger of that name already exists, then it will be + returned. Otherwise, a new logger will be instantiated and + then linked with its existing ancestors as well as children. + + + The name of the logger to retrieve + The logger object with the name specified + + + + Shutting down a hierarchy will safely close and remove + all appenders in all loggers including the root logger. + + + + Shutting down a hierarchy will safely close and remove + all appenders in all loggers including the root logger. + + + Some appenders need to be closed before the + application exists. Otherwise, pending logging events might be + lost. + + + The Shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Reset all values contained in this hierarchy instance to their default. + + + + Reset all values contained in this hierarchy instance to their + default. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set its default "off" value. + + + Existing loggers are not removed. They are just reset. + + + This method should be used sparingly and with care as it will + block all logging until it is completed. + + + + + + Log the logEvent through this hierarchy. + + the event to log + + + This method should not normally be used to log. + The interface should be used + for routine logging. This interface can be obtained + using the method. + + + The logEvent is delivered to the appropriate logger and + that logger is then responsible for logging the event. + + + + + + Returns all the Appenders that are currently configured + + An array containing all the currently configured appenders + + + Returns all the instances that are currently configured. + All the loggers are searched for appenders. The appenders may also be containers + for appenders and these are also searched for additional loggers. + + + The list returned is unordered but does not contain duplicates. + + + + + + Collect the appenders from an . + The appender may also be a container. + + + + + + + Collect the appenders from an container + + + + + + + Initialize the log4net system using the specified appender + + the appender to use to log all logging events + + + + Initialize the log4net system using the specified appenders + + the appenders to use to log all logging events + + + + Initialize the log4net system using the specified appenders + + the appenders to use to log all logging events + + + This method provides the same functionality as the + method implemented + on this object, but it is protected and therefore can be called by subclasses. + + + + + + Initialize the log4net system using the specified config + + the element containing the root of the config + + + + Initialize the log4net system using the specified config + + the element containing the root of the config + + + This method provides the same functionality as the + method implemented + on this object, but it is protected and therefore can be called by subclasses. + + + + + + Test if this hierarchy is disabled for the specified . + + The level to check against. + + true if the repository is disabled for the level argument, false otherwise. + + + + If this hierarchy has not been configured then this method will + always return true. + + + This method will return true if this repository is + disabled for level object passed as parameter and + false otherwise. + + + See also the property. + + + + + + Clear all logger definitions from the internal hashtable + + + + This call will clear all logger definitions from the internal + hashtable. Invoking this method will irrevocably mess up the + logger hierarchy. + + + You should really know what you are doing before + invoking this method. + + + + + + Return a new logger instance named as the first parameter using + . + + The name of the logger to retrieve + The factory that will make the new logger instance + The logger object with the name specified + + + If a logger of that name already exists, then it will be + returned. Otherwise, a new logger will be instantiated by the + parameter and linked with its existing + ancestors as well as children. + + + + + + Sends a logger creation event to all registered listeners + + The newly created logger + + Raises the logger creation event. + + + + + Updates all the parents of the specified logger + + The logger to update the parents for + + + This method loops through all the potential parents of + . There 3 possible cases: + + + + No entry for the potential parent of exists + + We create a ProvisionNode for this potential + parent and insert in that provision node. + + + + The entry is of type Logger for the potential parent. + + The entry is 's nearest existing parent. We + update 's parent field with this entry. We also break from + he loop because updating our parent's parent is our parent's + responsibility. + + + + The entry is of type ProvisionNode for this potential parent. + + We add to the list of children for this + potential parent. + + + + + + + + Replace a with a in the hierarchy. + + + + + + We update the links for all the children that placed themselves + in the provision node 'pn'. The second argument 'log' is a + reference for the newly created Logger, parent of all the + children in 'pn'. + + + We loop on all the children 'c' in 'pn'. + + + If the child 'c' has been already linked to a child of + 'log' then there is no need to update 'c'. + + + Otherwise, we set log's parent field to c's parent and set + c's parent field to log. + + + + + + Define or redefine a Level using the values in the argument + + the level values + + + Define or redefine a Level using the values in the argument + + + Supports setting levels via the configuration file. + + + + + + A class to hold the value, name and display name for a level + + + + A class to hold the value, name and display name for a level + + + + + + Value of the level + + + + If the value is not set (defaults to -1) the value will be looked + up for the current level with the same name. + + + + + + Name of the level + + + The name of the level + + + + The name of the level. + + + + + + Display name for the level + + + The display name of the level + + + + The display name of the level. + + + + + + Override Object.ToString to return sensible debug info + + string info about this object + + + + Set a Property using the values in the argument + + the property value + + + Set a Property using the values in the argument. + + + Supports setting property values via the configuration file. + + + + + + The fully qualified type of the Hierarchy class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Interface abstracts creation of instances + + + + This interface is used by the to + create new objects. + + + The method is called + to create a named . + + + Implement this interface to create new subclasses of . + + + Nicko Cadell + Gert Driesen + + + + Create a new instance + + The that will own the . + The name of the . + The instance for the specified name. + + + Create a new instance with the + specified name. + + + Called by the to create + new named instances. + + + If the is null then the root logger + must be returned. + + + + + + Implementation of used by + + + + Internal class used to provide implementation of + interface. Applications should use to get + logger instances. + + + This is one of the central classes in the log4net implementation. One of the + distinctive features of log4net are hierarchical loggers and their + evaluation. The organizes the + instances into a rooted tree hierarchy. + + + The class is abstract. Only concrete subclasses of + can be created. The + is used to create instances of this type for the . + + + Nicko Cadell + Gert Driesen + Aspi Havewala + Douglas de la Torre + + + + This constructor created a new instance and + sets its name. + + The name of the . + + + This constructor is protected and designed to be used by + a subclass that is not abstract. + + + Loggers are constructed by + objects. See for the default + logger creator. + + + + + + Gets or sets the parent logger in the hierarchy. + + + The parent logger in the hierarchy. + + + + Part of the Composite pattern that makes the hierarchy. + The hierarchy is parent linked rather than child linked. + + + + + + Gets or sets a value indicating if child loggers inherit their parent's appenders. + + + true if child loggers inherit their parent's appenders. + + + + Additivity is set to true by default, that is children inherit + the appenders of their ancestors by default. If this variable is + set to false then the appenders found in the + ancestors of this logger are not used. However, the children + of this logger will inherit its appenders, unless the children + have their additivity flag set to false too. See + the user manual for more details. + + + + + + Gets the effective level for this logger. + + The nearest level in the logger hierarchy. + + + Starting from this logger, searches the logger hierarchy for a + non-null level and returns it. Otherwise, returns the level of the + root logger. + + The Logger class is designed so that this method executes as + quickly as possible. + + + + + Gets or sets the where this + Logger instance is attached to. + + The hierarchy that this logger belongs to. + + + This logger must be attached to a single . + + + + + + Gets or sets the assigned , if any, for this Logger. + + + The of this logger. + + + + The assigned can be null. + + + + + + Add to the list of appenders of this + Logger instance. + + An appender to add to this logger + + + Add to the list of appenders of this + Logger instance. + + + If is already in the list of + appenders, then it won't be added again. + + + + + + Get the appenders contained in this logger as an + . + + A collection of the appenders in this logger + + + Get the appenders contained in this logger as an + . If no appenders + can be found, then a is returned. + + + + + + Look for the appender named as name + + The name of the appender to lookup + The appender with the name specified, or null. + + + Returns the named appender, or null if the appender is not found. + + + + + + Remove all previously added appenders from this Logger instance. + + + + Remove all previously added appenders from this Logger instance. + + + This is useful when re-reading configuration information. + + + + + + Remove the appender passed as parameter form the list of appenders. + + The appender to remove + The appender removed from the list + + + Remove the appender passed as parameter form the list of appenders. + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + Remove the appender passed as parameter form the list of appenders. + + The name of the appender to remove + The appender removed from the list + + + Remove the named appender passed as parameter form the list of appenders. + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + Gets the logger name. + + + The name of the logger. + + + + The name of this logger + + + + + + This generic form is intended to be used by wrappers. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The level of the message to be logged. + The message object to log. + The exception to log, including its stack trace. + + + Generate a logging event for the specified using + the and . + + + This method must not throw any exception to the caller. + + + + + + This is the most generic printing method that is intended to be used + by wrappers. + + The event being logged. + + + Logs the specified logging event through this logger. + + + This method must not throw any exception to the caller. + + + + + + Checks if this logger is enabled for a given passed as parameter. + + The level to check. + + true if this logger is enabled for level, otherwise false. + + + + Test if this logger is going to log events of the specified . + + + This method must not throw any exception to the caller. + + + + + + Gets the where this + Logger instance is attached to. + + + The that this logger belongs to. + + + + Gets the where this + Logger instance is attached to. + + + + + + Deliver the to the attached appenders. + + The event to log. + + + Call the appenders in the hierarchy starting at + this. If no appenders could be found, emit a + warning. + + + This method calls all the appenders inherited from the + hierarchy circumventing any evaluation of whether to log or not + to log the particular log request. + + + + + + Closes all attached appenders implementing the interface. + + + + Used to ensure that the appenders are correctly shutdown. + + + + + + This is the most generic printing method. This generic form is intended to be used by wrappers + + The level of the message to be logged. + The message object to log. + The exception to log, including its stack trace. + + + Generate a logging event for the specified using + the . + + + + + + Creates a new logging event and logs the event without further checks. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The level of the message to be logged. + The message object to log. + The exception to log, including its stack trace. + + + Generates a logging event and delivers it to the attached + appenders. + + + + + + Creates a new logging event and logs the event without further checks. + + The event being logged. + + + Delivers the logging event to the attached appenders. + + + + + + The fully qualified type of the Logger class. + + + + + The name of this logger. + + + + + The assigned level of this logger. + + + + The level variable need not be + assigned a value in which case it is inherited + form the hierarchy. + + + + + + The parent of this logger. + + + + The parent of this logger. + All loggers have at least one ancestor which is the root logger. + + + + + + Loggers need to know what Hierarchy they are in. + + + + Loggers need to know what Hierarchy they are in. + The hierarchy that this logger is a member of is stored + here. + + + + + + Helper implementation of the interface + + + + + Flag indicating if child loggers inherit their parents appenders + + + + Additivity is set to true by default, that is children inherit + the appenders of their ancestors by default. If this variable is + set to false then the appenders found in the + ancestors of this logger are not used. However, the children + of this logger will inherit its appenders, unless the children + have their additivity flag set to false too. See + the user manual for more details. + + + + + + Lock to protect AppenderAttachedImpl variable m_appenderAttachedImpl + + + + + Used internally to accelerate hash table searches. + + + + Internal class used to improve performance of + string keyed hashtables. + + + The hashcode of the string is cached for reuse. + The string is stored as an interned value. + When comparing two objects for equality + the reference equality of the interned strings is compared. + + + Nicko Cadell + Gert Driesen + + + + Construct key with string name + + + + Initializes a new instance of the class + with the specified name. + + + Stores the hashcode of the string and interns + the string key to optimize comparisons. + + + The Compact Framework 1.0 the + method does not work. On the Compact Framework + the string keys are not interned nor are they + compared by reference. + + + The name of the logger. + + + + Returns a hash code for the current instance. + + A hash code for the current instance. + + + Returns the cached hashcode. + + + + + + Determines whether two instances + are equal. + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + + Compares the references of the interned strings. + + + + + + Provision nodes are used where no logger instance has been specified + + + + instances are used in the + when there is no specified + for that node. + + + A provision node holds a list of child loggers on behalf of + a logger that does not exist. + + + Nicko Cadell + Gert Driesen + + + + Create a new provision node with child node + + A child logger to add to this node. + + + Initializes a new instance of the class + with the specified child logger. + + + + + + The sits at the root of the logger hierarchy tree. + + + + The is a regular except + that it provides several guarantees. + + + First, it cannot be assigned a null + level. Second, since the root logger cannot have a parent, the + property always returns the value of the + level field without walking the hierarchy. + + + Nicko Cadell + Gert Driesen + + + + Construct a + + The level to assign to the root logger. + + + Initializes a new instance of the class with + the specified logging level. + + + The root logger names itself as "root". However, the root + logger cannot be retrieved by name. + + + + + + Gets the assigned level value without walking the logger hierarchy. + + The assigned level value without walking the logger hierarchy. + + + Because the root logger cannot have a parent and its level + must not be null this property just returns the + value of . + + + + + + Gets or sets the assigned for the root logger. + + + The of the root logger. + + + + Setting the level of the root logger to a null reference + may have catastrophic results. We prevent this here. + + + + + + The fully qualified type of the RootLogger class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Initializes the log4net environment using an XML DOM. + + + + Configures a using an XML DOM. + + + Nicko Cadell + Gert Driesen + + + + Construct the configurator for a hierarchy + + The hierarchy to build. + + + Initializes a new instance of the class + with the specified . + + + + + + Configure the hierarchy by parsing a DOM tree of XML elements. + + The root element to parse. + + + Configure the hierarchy by parsing a DOM tree of XML elements. + + + + + + Parse appenders by IDREF. + + The appender ref element. + The instance of the appender that the ref refers to. + + + Parse an XML element that represents an appender and return + the appender. + + + + + + Parses an appender element. + + The appender element. + The appender instance or null when parsing failed. + + + Parse an XML element that represents an appender and return + the appender instance. + + + + + + Parses a logger element. + + The logger element. + + + Parse an XML element that represents a logger. + + + + + + Parses the root logger element. + + The root element. + + + Parse an XML element that represents the root logger. + + + + + + Parses the children of a logger element. + + The category element. + The logger instance. + Flag to indicate if the logger is the root logger. + + + Parse the child elements of a <logger> element. + + + + + + Parses an object renderer. + + The renderer element. + + + Parse an XML element that represents a renderer. + + + + + + Parses a level element. + + The level element. + The logger object to set the level on. + Flag to indicate if the logger is the root logger. + + + Parse an XML element that represents a level. + + + + + + Sets a parameter on an object. + + The parameter element. + The object to set the parameter on. + + The parameter name must correspond to a writable property + on the object. The value of the parameter is a string, + therefore this function will attempt to set a string + property first. If unable to set a string property it + will inspect the property and its argument type. It will + attempt to call a static method called Parse on the + type of the property. This method will take a single + string argument and return a value that can be used to + set the property. + + + + + Test if an element has no attributes or child elements + + the element to inspect + true if the element has any attributes or child elements, false otherwise + + + + Test if a is constructible with Activator.CreateInstance. + + the type to inspect + true if the type is creatable using a default constructor, false otherwise + + + + Look for a method on the that matches the supplied + + the type that has the method + the name of the method + the method info found + + + The method must be a public instance method on the . + The method must be named or "Add" followed by . + The method must take a single parameter. + + + + + + Converts a string value to a target type. + + The type of object to convert the string to. + The string value to use as the value of the object. + + + An object of type with value or + null when the conversion could not be performed. + + + + + + Creates an object as specified in XML. + + The XML element that contains the definition of the object. + The object type to use if not explicitly specified. + The type that the returned object must be or must inherit from. + The object or null + + + Parse an XML element and create an object instance based on the configuration + data. + + + The type of the instance may be specified in the XML. If not + specified then the is used + as the type. However the type is specified it must support the + type. + + + + + + key: appenderName, value: appender. + + + + + The Hierarchy being configured. + + + + + The fully qualified type of the XmlHierarchyConfigurator class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Basic Configurator interface for repositories + + + + Interface used by basic configurator to configure a + with a default . + + + A should implement this interface to support + configuration by the . + + + Nicko Cadell + Gert Driesen + + + + Initialize the repository using the specified appender + + the appender to use to log all logging events + + + Configure the repository to route all logging events to the + specified appender. + + + + + + Initialize the repository using the specified appenders + + the appenders to use to log all logging events + + + Configure the repository to route all logging events to the + specified appenders. + + + + + + Delegate used to handle logger repository shutdown event notifications + + The that is shutting down. + Empty event args + + + Delegate used to handle logger repository shutdown event notifications. + + + + + + Delegate used to handle logger repository configuration reset event notifications + + The that has had its configuration reset. + Empty event args + + + Delegate used to handle logger repository configuration reset event notifications. + + + + + + Delegate used to handle event notifications for logger repository configuration changes. + + The that has had its configuration changed. + Empty event arguments. + + + Delegate used to handle event notifications for logger repository configuration changes. + + + + + + Interface implemented by logger repositories. + + + + This interface is implemented by logger repositories. e.g. + . + + + This interface is used by the + to obtain interfaces. + + + Nicko Cadell + Gert Driesen + + + + The name of the repository + + + The name of the repository + + + + The name of the repository. + + + + + + RendererMap accesses the object renderer map for this repository. + + + RendererMap accesses the object renderer map for this repository. + + + + RendererMap accesses the object renderer map for this repository. + + + The RendererMap holds a mapping between types and + objects. + + + + + + The plugin map for this repository. + + + The plugin map for this repository. + + + + The plugin map holds the instances + that have been attached to this repository. + + + + + + Get the level map for the Repository. + + + + Get the level map for the Repository. + + + The level map defines the mappings between + level names and objects in + this repository. + + + + + + The threshold for all events in this repository + + + The threshold for all events in this repository + + + + The threshold for all events in this repository. + + + + + + Check if the named logger exists in the repository. If so return + its reference, otherwise returns null. + + The name of the logger to lookup + The Logger object with the name specified + + + If the names logger exists it is returned, otherwise + null is returned. + + + + + + Returns all the currently defined loggers as an Array. + + All the defined loggers + + + Returns all the currently defined loggers as an Array. + + + + + + Returns a named logger instance + + The name of the logger to retrieve + The logger object with the name specified + + + Returns a named logger instance. + + + If a logger of that name already exists, then it will be + returned. Otherwise, a new logger will be instantiated and + then linked with its existing ancestors as well as children. + + + + + Shutdown the repository + + + Shutting down a repository will safely close and remove + all appenders in all loggers including the root logger. + + + Some appenders need to be closed before the + application exists. Otherwise, pending logging events might be + lost. + + + The method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Reset the repositories configuration to a default state + + + + Reset all values contained in this instance to their + default state. + + + Existing loggers are not removed. They are just reset. + + + This method should be used sparingly and with care as it will + block all logging until it is completed. + + + + + + Log the through this repository. + + the event to log + + + This method should not normally be used to log. + The interface should be used + for routine logging. This interface can be obtained + using the method. + + + The logEvent is delivered to the appropriate logger and + that logger is then responsible for logging the event. + + + + + + Flag indicates if this repository has been configured. + + + Flag indicates if this repository has been configured. + + + + Flag indicates if this repository has been configured. + + + + + + Collection of internal messages captured during the most + recent configuration process. + + + + + Event to notify that the repository has been shutdown. + + + Event to notify that the repository has been shutdown. + + + + Event raised when the repository has been shutdown. + + + + + + Event to notify that the repository has had its configuration reset. + + + Event to notify that the repository has had its configuration reset. + + + + Event raised when the repository's configuration has been + reset to default. + + + + + + Event to notify that the repository has had its configuration changed. + + + Event to notify that the repository has had its configuration changed. + + + + Event raised when the repository's configuration has been changed. + + + + + + Repository specific properties + + + Repository specific properties + + + + These properties can be specified on a repository specific basis. + + + + + + Returns all the Appenders that are configured as an Array. + + All the Appenders + + + Returns all the Appenders that are configured as an Array. + + + + + + Configure repository using XML + + + + Interface used by Xml configurator to configure a . + + + A should implement this interface to support + configuration by the . + + + Nicko Cadell + Gert Driesen + + + + Initialize the repository using the specified config + + the element containing the root of the config + + + The schema for the XML configuration data is defined by + the implementation. + + + + + + Base implementation of + + + + Default abstract implementation of the interface. + + + Skeleton implementation of the interface. + All types can extend this type. + + + Nicko Cadell + Gert Driesen + + + + Default Constructor + + + + Initializes the repository with default (empty) properties. + + + + + + Construct the repository using specific properties + + the properties to set for this repository + + + Initializes the repository with specified properties. + + + + + + The name of the repository + + + The string name of the repository + + + + The name of this repository. The name is + used to store and lookup the repositories + stored by the . + + + + + + The threshold for all events in this repository + + + The threshold for all events in this repository + + + + The threshold for all events in this repository + + + + + + RendererMap accesses the object renderer map for this repository. + + + RendererMap accesses the object renderer map for this repository. + + + + RendererMap accesses the object renderer map for this repository. + + + The RendererMap holds a mapping between types and + objects. + + + + + + The plugin map for this repository. + + + The plugin map for this repository. + + + + The plugin map holds the instances + that have been attached to this repository. + + + + + + Get the level map for the Repository. + + + + Get the level map for the Repository. + + + The level map defines the mappings between + level names and objects in + this repository. + + + + + + Test if logger exists + + The name of the logger to lookup + The Logger object with the name specified + + + Check if the named logger exists in the repository. If so return + its reference, otherwise returns null. + + + + + + Returns all the currently defined loggers in the repository + + All the defined loggers + + + Returns all the currently defined loggers in the repository as an Array. + + + + + + Return a new logger instance + + The name of the logger to retrieve + The logger object with the name specified + + + Return a new logger instance. + + + If a logger of that name already exists, then it will be + returned. Otherwise, a new logger will be instantiated and + then linked with its existing ancestors as well as children. + + + + + + Shutdown the repository + + + + Shutdown the repository. Can be overridden in a subclass. + This base class implementation notifies the + listeners and all attached plugins of the shutdown event. + + + + + + Reset the repositories configuration to a default state + + + + Reset all values contained in this instance to their + default state. + + + Existing loggers are not removed. They are just reset. + + + This method should be used sparingly and with care as it will + block all logging until it is completed. + + + + + + Log the logEvent through this repository. + + the event to log + + + This method should not normally be used to log. + The interface should be used + for routine logging. This interface can be obtained + using the method. + + + The logEvent is delivered to the appropriate logger and + that logger is then responsible for logging the event. + + + + + + Flag indicates if this repository has been configured. + + + Flag indicates if this repository has been configured. + + + + Flag indicates if this repository has been configured. + + + + + + Contains a list of internal messages captures during the + last configuration. + + + + + Event to notify that the repository has been shutdown. + + + Event to notify that the repository has been shutdown. + + + + Event raised when the repository has been shutdown. + + + + + + Event to notify that the repository has had its configuration reset. + + + Event to notify that the repository has had its configuration reset. + + + + Event raised when the repository's configuration has been + reset to default. + + + + + + Event to notify that the repository has had its configuration changed. + + + Event to notify that the repository has had its configuration changed. + + + + Event raised when the repository's configuration has been changed. + + + + + + Repository specific properties + + + Repository specific properties + + + These properties can be specified on a repository specific basis + + + + + Returns all the Appenders that are configured as an Array. + + All the Appenders + + + Returns all the Appenders that are configured as an Array. + + + + + + The fully qualified type of the LoggerRepositorySkeleton class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Adds an object renderer for a specific class. + + The type that will be rendered by the renderer supplied. + The object renderer used to render the object. + + + Adds an object renderer for a specific class. + + + + + + Notify the registered listeners that the repository is shutting down + + Empty EventArgs + + + Notify any listeners that this repository is shutting down. + + + + + + Notify the registered listeners that the repository has had its configuration reset + + Empty EventArgs + + + Notify any listeners that this repository's configuration has been reset. + + + + + + Notify the registered listeners that the repository has had its configuration changed + + Empty EventArgs + + + Notify any listeners that this repository's configuration has changed. + + + + + + Raise a configuration changed event on this repository + + EventArgs.Empty + + + Applications that programmatically change the configuration of the repository should + raise this event notification to notify listeners. + + + + + + Flushes all configured Appenders that implement . + + The maximum time in milliseconds to wait for logging events from asycnhronous appenders to be flushed, + or to wait indefinitely. + True if all logging events were flushed successfully, else false. + + + + The log4net Thread Context. + + + + The ThreadContext provides a location for thread specific debugging + information to be stored. + The ThreadContext properties override any + properties with the same name. + + + The thread context has a properties map and a stack. + The properties and stack can + be included in the output of log messages. The + supports selecting and outputting these properties. + + + The Thread Context provides a diagnostic context for the current thread. + This is an instrument for distinguishing interleaved log + output from different sources. Log output is typically interleaved + when a server handles multiple clients near-simultaneously. + + + The Thread Context is managed on a per thread basis. + + + Example of using the thread context properties to store a username. + + ThreadContext.Properties["user"] = userName; + log.Info("This log message has a ThreadContext Property called 'user'"); + + + Example of how to push a message into the context stack + + using(ThreadContext.Stacks["NDC"].Push("my context message")) + { + log.Info("This log message has a ThreadContext Stack message that includes 'my context message'"); + + } // at the end of the using block the message is automatically popped + + + + Nicko Cadell + + + + Private Constructor. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + The thread properties map + + + The thread properties map + + + + The ThreadContext properties override any + properties with the same name. + + + + + + The thread stacks + + + stack map + + + + The thread local stacks. + + + + + + The thread context properties instance + + + + + The thread context stacks instance + + + + + A straightforward implementation of the interface. + + + + This is the default implementation of the + interface. Implementors of the interface + should aggregate an instance of this type. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Append on on all attached appenders. + + The event being logged. + The number of appenders called. + + + Calls the method on all + attached appenders. + + + + + + Append on on all attached appenders. + + The array of events being logged. + The number of appenders called. + + + Calls the method on all + attached appenders. + + + + + + Calls the DoAppende method on the with + the objects supplied. + + The appender + The events + + + If the supports the + interface then the will be passed + through using that interface. Otherwise the + objects in the array will be passed one at a time. + + + + + + Attaches an appender. + + The appender to add. + + + If the appender is already in the list it won't be added again. + + + + + + Gets all attached appenders. + + + A collection of attached appenders, or null if there + are no attached appenders. + + + + The read only collection of all currently attached appenders. + + + + + + Gets an attached appender with the specified name. + + The name of the appender to get. + + The appender with the name specified, or null if no appender with the + specified name is found. + + + + Lookup an attached appender by name. + + + + + + Removes all attached appenders. + + + + Removes and closes all attached appenders + + + + + + Removes the specified appender from the list of attached appenders. + + The appender to remove. + The appender removed from the list + + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + Removes the appender with the specified name from the list of appenders. + + The name of the appender to remove. + The appender removed from the list + + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + List of appenders + + + + + Array of appenders, used to cache the m_appenderList + + + + + The fully qualified type of the AppenderAttachedImpl class. + + + Used by the internal logger to record the Type of the + log message. + + + + + This class aggregates several PropertiesDictionary collections together. + + + + Provides a dictionary style lookup over an ordered list of + collections. + + + Nicko Cadell + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Gets the value of a property + + + The value for the property with the specified key + + + + Looks up the value for the specified. + The collections are searched + in the order in which they were added to this collection. The value + returned is the value held by the first collection that contains + the specified key. + + + If none of the collections contain the specified key then + null is returned. + + + + + + Add a Properties Dictionary to this composite collection + + the properties to add + + + Properties dictionaries added first take precedence over dictionaries added + later. + + + + + + Flatten this composite collection into a single properties dictionary + + the flattened dictionary + + + Reduces the collection of ordered dictionaries to a single dictionary + containing the resultant values for the keys. + + + + + + Base class for Context Properties implementations + + + + This class defines a basic property get set accessor + + + Nicko Cadell + + + + Gets or sets the value of a property + + + The value for the property with the specified key + + + + Gets or sets the value of a property + + + + + + Wrapper class used to map converter names to converter types + + + + Pattern converter info class used during configuration by custom + PatternString and PatternLayer converters. + + + + + + default constructor + + + + + Gets or sets the name of the conversion pattern + + + + The name of the pattern in the format string + + + + + + Gets or sets the type of the converter + + + + The value specified must extend the + type. + + + + + + + + + + + + + + + + + Subclass of that maintains a count of + the number of bytes written. + + + + This writer counts the number of bytes written. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + The to actually write to. + The to report errors to. + + + Creates a new instance of the class + with the specified and . + + + + + + Writes a character to the underlying writer and counts the number of bytes written. + + the char to write + + + Overrides implementation of . Counts + the number of bytes written. + + + + + + Writes a buffer to the underlying writer and counts the number of bytes written. + + the buffer to write + the start index to write from + the number of characters to write + + + Overrides implementation of . Counts + the number of bytes written. + + + + + + Writes a string to the output and counts the number of bytes written. + + The string data to write to the output. + + + Overrides implementation of . Counts + the number of bytes written. + + + + + + Gets or sets the total number of bytes written. + + + The total number of bytes written. + + + + Gets or sets the total number of bytes written. + + + + + + Total number of bytes written. + + + + + A fixed size rolling buffer of logging events. + + + + An array backed fixed size leaky bucket. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + The maximum number of logging events in the buffer. + + + Initializes a new instance of the class with + the specified maximum number of buffered logging events. + + + The argument is not a positive integer. + + + + Appends a to the buffer. + + The event to append to the buffer. + The event discarded from the buffer, if the buffer is full, otherwise null. + + + Append an event to the buffer. If the buffer still contains free space then + null is returned. If the buffer is full then an event will be dropped + to make space for the new event, the event dropped is returned. + + + + + + Get and remove the oldest event in the buffer. + + The oldest logging event in the buffer + + + Gets the oldest (first) logging event in the buffer and removes it + from the buffer. + + + + + + Pops all the logging events from the buffer into an array. + + An array of all the logging events in the buffer. + + + Get all the events in the buffer and clear the buffer. + + + + + + Clear the buffer + + + + Clear the buffer of all events. The events in the buffer are lost. + + + + + + Gets the th oldest event currently in the buffer. + + The th oldest event currently in the buffer. + + + If is outside the range 0 to the number of events + currently in the buffer, then null is returned. + + + + + + Gets the maximum size of the buffer. + + The maximum size of the buffer. + + + Gets the maximum size of the buffer + + + + + + Gets the number of logging events in the buffer. + + The number of logging events in the buffer. + + + This number is guaranteed to be in the range 0 to + (inclusive). + + + + + + An always empty . + + + + A singleton implementation of the + interface that always represents an empty collection. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to enforce the singleton pattern. + + + + + + Gets the singleton instance of the empty collection. + + The singleton instance of the empty collection. + + + Gets the singleton instance of the empty collection. + + + + + + Copies the elements of the to an + , starting at a particular Array index. + + The one-dimensional + that is the destination of the elements copied from + . The Array must have zero-based + indexing. + The zero-based index in array at which + copying begins. + + + As the collection is empty no values are copied into the array. + + + + + + Gets a value indicating if access to the is synchronized (thread-safe). + + + true if access to the is synchronized (thread-safe); otherwise, false. + + + + For the this property is always true. + + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + As the collection is empty the is always 0. + + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + As the collection is empty and thread safe and synchronized this instance is also + the object. + + + + + + Returns an enumerator that can iterate through a collection. + + + An that can be used to + iterate through the collection. + + + + As the collection is empty a is returned. + + + + + + The singleton instance of the empty collection. + + + + + An always empty . + + + + A singleton implementation of the + interface that always represents an empty collection. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to enforce the singleton pattern. + + + + + + Gets the singleton instance of the . + + The singleton instance of the . + + + Gets the singleton instance of the . + + + + + + Copies the elements of the to an + , starting at a particular Array index. + + The one-dimensional + that is the destination of the elements copied from + . The Array must have zero-based + indexing. + The zero-based index in array at which + copying begins. + + + As the collection is empty no values are copied into the array. + + + + + + Gets a value indicating if access to the is synchronized (thread-safe). + + + true if access to the is synchronized (thread-safe); otherwise, false. + + + + For the this property is always true. + + + + + + Gets the number of elements contained in the + + + The number of elements contained in the . + + + + As the collection is empty the is always 0. + + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + As the collection is empty and thread safe and synchronized this instance is also + the object. + + + + + + Returns an enumerator that can iterate through a collection. + + + An that can be used to + iterate through the collection. + + + + As the collection is empty a is returned. + + + + + + Adds an element with the provided key and value to the + . + + The to use as the key of the element to add. + The to use as the value of the element to add. + + + As the collection is empty no new values can be added. A + is thrown if this method is called. + + + This dictionary is always empty and cannot be modified. + + + + Removes all elements from the . + + + + As the collection is empty no values can be removed. A + is thrown if this method is called. + + + This dictionary is always empty and cannot be modified. + + + + Determines whether the contains an element + with the specified key. + + The key to locate in the . + false + + + As the collection is empty the method always returns false. + + + + + + Returns an enumerator that can iterate through a collection. + + + An that can be used to + iterate through the collection. + + + + As the collection is empty a is returned. + + + + + + Removes the element with the specified key from the . + + The key of the element to remove. + + + As the collection is empty no values can be removed. A + is thrown if this method is called. + + + This dictionary is always empty and cannot be modified. + + + + Gets a value indicating whether the has a fixed size. + + true + + + As the collection is empty always returns true. + + + + + + Gets a value indicating whether the is read-only. + + true + + + As the collection is empty always returns true. + + + + + + Gets an containing the keys of the . + + An containing the keys of the . + + + As the collection is empty a is returned. + + + + + + Gets an containing the values of the . + + An containing the values of the . + + + As the collection is empty a is returned. + + + + + + Gets or sets the element with the specified key. + + The key of the element to get or set. + null + + + As the collection is empty no values can be looked up or stored. + If the index getter is called then null is returned. + A is thrown if the setter is called. + + + This dictionary is always empty and cannot be modified. + + + + The singleton instance of the empty dictionary. + + + + + Contain the information obtained when parsing formatting modifiers + in conversion modifiers. + + + + Holds the formatting information extracted from the format string by + the . This is used by the + objects when rendering the output. + + + Nicko Cadell + Gert Driesen + + + + Defaut Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + + + Initializes a new instance of the class + with the specified parameters. + + + + + + Gets or sets the minimum value. + + + The minimum value. + + + + Gets or sets the minimum value. + + + + + + Gets or sets the maximum value. + + + The maximum value. + + + + Gets or sets the maximum value. + + + + + + Gets or sets a flag indicating whether left align is enabled + or not. + + + A flag indicating whether left align is enabled or not. + + + + Gets or sets a flag indicating whether left align is enabled or not. + + + + + + Implementation of Properties collection for the + + + + This class implements a properties collection that is thread safe and supports both + storing properties and capturing a read only copy of the current propertied. + + + This class is optimized to the scenario where the properties are read frequently + and are modified infrequently. + + + Nicko Cadell + + + + The read only copy of the properties. + + + + This variable is declared volatile to prevent the compiler and JIT from + reordering reads and writes of this thread performed on different threads. + + + + + + Lock object used to synchronize updates within this instance + + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Gets or sets the value of a property + + + The value for the property with the specified key + + + + Reading the value for a key is faster than setting the value. + When the value is written a new read only copy of + the properties is created. + + + + + + Remove a property from the global context + + the key for the entry to remove + + + Removing an entry from the global context properties is relatively expensive compared + with reading a value. + + + + + + Clear the global context properties + + + + + Get a readonly immutable copy of the properties + + the current global context properties + + + This implementation is fast because the GlobalContextProperties class + stores a readonly copy of the properties. + + + + + + The static class ILogExtensions contains a set of widely used + methods that ease the interaction with the ILog interface implementations. + + + + This class contains methods for logging at different levels and checks the + properties for determining if those logging levels are enabled in the current + configuration. + + + Simple example of logging messages + + using log4net.Util; + + ILog log = LogManager.GetLogger("application-log"); + + log.InfoExt("Application Start"); + log.DebugExt("This is a debug message"); + + + + + + The fully qualified type of the Logger class. + + + + + Log a message object with the level. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + + + This method first checks if this logger is INFO + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is INFO enabled, then it converts + the message object (retrieved by invocation of the provided callback) to a + string by invoking the appropriate . + It then proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a message object with the level. //TODO + + Log a message object with the level. + + The logger on which the message is logged. + The message object to log. + + + This method first checks if this logger is INFO + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is INFO enabled, then it converts + the message object (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Log a message object with the level. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + + + This method first checks if this logger is INFO + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is INFO enabled, then it converts + the message object (retrieved by invocation of the provided callback) to a + string by invoking the appropriate . + It then proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a message object with the level. //TODO + + Log a message object with the level. + + The logger on which the message is logged. + The message object to log. + + + This method first checks if this logger is INFO + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is INFO enabled, then it converts + the message object (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Log a message object with the level. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + + + This method first checks if this logger is WARN + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is WARN enabled, then it converts + the message object (retrieved by invocation of the provided callback) to a + string by invoking the appropriate . + It then proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a message object with the level. //TODO + + Log a message object with the level. + + The logger on which the message is logged. + The message object to log. + + + This method first checks if this logger is WARN + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is WARN enabled, then it converts + the message object (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Log a message object with the level. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + + + This method first checks if this logger is ERROR + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is ERROR enabled, then it converts + the message object (retrieved by invocation of the provided callback) to a + string by invoking the appropriate . + It then proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a message object with the level. //TODO + + Log a message object with the level. + + The logger on which the message is logged. + The message object to log. + + + This method first checks if this logger is ERROR + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is ERROR enabled, then it converts + the message object (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Log a message object with the level. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + + + This method first checks if this logger is FATAL + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is FATAL enabled, then it converts + the message object (retrieved by invocation of the provided callback) to a + string by invoking the appropriate . + It then proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The lambda expression that gets the object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a message object with the level. //TODO + + Log a message object with the level. + + The logger on which the message is logged. + The message object to log. + + + This method first checks if this logger is FATAL + enabled by reading the value property. + This check happens always and does not depend on the + implementation. If this logger is FATAL enabled, then it converts + the message object (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The logger on which the message is logged. + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + The logger on which the message is logged. + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + The logger on which the message is logged. + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Manages a mapping from levels to + + + + Manages an ordered mapping from instances + to subclasses. + + + Nicko Cadell + + + + Default constructor + + + + Initialise a new instance of . + + + + + + Add a to this mapping + + the entry to add + + + If a has previously been added + for the same then that entry will be + overwritten. + + + + + + Lookup the mapping for the specified level + + the level to lookup + the for the level or null if no mapping found + + + Lookup the value for the specified level. Finds the nearest + mapping value for the level that is equal to or less than the + specified. + + + If no mapping could be found then null is returned. + + + + + + Initialize options + + + + Caches the sorted list of in an array + + + + + + An entry in the + + + + This is an abstract base class for types that are stored in the + object. + + + Nicko Cadell + + + + Default protected constructor + + + + Default protected constructor + + + + + + The level that is the key for this mapping + + + The that is the key for this mapping + + + + Get or set the that is the key for this + mapping subclass. + + + + + + Initialize any options defined on this entry + + + + Should be overridden by any classes that need to initialise based on their options + + + + + + Implementation of Properties collection for the + + + + Class implements a collection of properties that is specific to each thread. + The class is not synchronized as each thread has its own . + + + This class stores its properties in a slot on the named + log4net.Util.LogicalThreadContextProperties. + + + For .NET Standard 1.3 this class uses + System.Threading.AsyncLocal rather than . + + + The requires a link time + for the + . + If the calling code does not have this permission then this context will be disabled. + It will not store any property values set on it. + + + Nicko Cadell + + + + Flag used to disable this context if we don't have permission to access the CallContext. + + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Gets or sets the value of a property + + + The value for the property with the specified key + + + + Get or set the property value for the specified. + + + + + + Remove a property + + the key for the entry to remove + + + Remove the value for the specified from the context. + + + + + + Clear all the context properties + + + + Clear all the context properties + + + + + + Get the PropertiesDictionary stored in the LocalDataStoreSlot for this thread. + + create the dictionary if it does not exist, otherwise return null if is does not exist + the properties for this thread + + + The collection returned is only to be used on the calling thread. If the + caller needs to share the collection between different threads then the + caller must clone the collection before doings so. + + + + + + Gets the call context get data. + + The peroperties dictionary stored in the call context + + The method has a + security link demand, therfore we must put the method call in a seperate method + that we can wrap in an exception handler. + + + + + Sets the call context data. + + The properties. + + The method has a + security link demand, therfore we must put the method call in a seperate method + that we can wrap in an exception handler. + + + + + The fully qualified type of the LogicalThreadContextProperties class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Delegate type used for LogicalThreadContextStack's callbacks. + + + + + Implementation of Stack for the + + + + Implementation of Stack for the + + + Nicko Cadell + + + + The stack store. + + + + + The name of this within the + . + + + + + The callback used to let the register a + new instance of a . + + + + + Internal constructor + + + + Initializes a new instance of the class. + + + + + + The number of messages in the stack + + + The current number of messages in the stack + + + + The current number of messages in the stack. That is + the number of times has been called + minus the number of times has been called. + + + + + + Clears all the contextual information held in this stack. + + + + Clears all the contextual information held in this stack. + Only call this if you think that this thread is being reused after + a previous call execution which may not have completed correctly. + You do not need to use this method if you always guarantee to call + the method of the + returned from even in exceptional circumstances, + for example by using the using(log4net.LogicalThreadContext.Stacks["NDC"].Push("Stack_Message")) + syntax. + + + + + + Removes the top context from this stack. + + The message in the context that was removed from the top of this stack. + + + Remove the top context from this stack, and return + it to the caller. If this stack is empty then an + empty string (not ) is returned. + + + + + + Pushes a new context message into this stack. + + The new context message. + + An that can be used to clean up the context stack. + + + + Pushes a new context onto this stack. An + is returned that can be used to clean up this stack. This + can be easily combined with the using keyword to scope the + context. + + + Simple example of using the Push method with the using keyword. + + using(log4net.LogicalThreadContext.Stacks["NDC"].Push("Stack_Message")) + { + log.Warn("This should have an ThreadContext Stack message"); + } + + + + + + Gets the current context information for this stack. + + The current context information. + + + + Gets and sets the internal stack used by this + + The internal storage stack + + + This property is provided only to support backward compatability + of the . Tytpically the internal stack should not + be modified. + + + + + + Gets the current context information for this stack. + + Gets the current context information + + + Gets the current context information for this stack. + + + + + + Get a portable version of this object + + the portable instance of this object + + + Get a cross thread portable version of this object + + + + + + Inner class used to represent a single context frame in the stack. + + + + Inner class used to represent a single context frame in the stack. + + + + + + Constructor + + The message for this context. + The parent context in the chain. + + + Initializes a new instance of the class + with the specified message and parent context. + + + + + + Get the message. + + The message. + + + Get the message. + + + + + + Gets the full text of the context down to the root level. + + + The full text of the context down to the root level. + + + + Gets the full text of the context down to the root level. + + + + + + Struct returned from the method. + + + + This struct implements the and is designed to be used + with the pattern to remove the stack frame at the end of the scope. + + + + + + The depth to trim the stack to when this instance is disposed + + + + + The outer LogicalThreadContextStack. + + + + + Constructor + + The internal stack used by the ThreadContextStack. + The depth to return the stack to when this object is disposed. + + + Initializes a new instance of the class with + the specified stack and return depth. + + + + + + Returns the stack to the correct depth. + + + + Returns the stack to the correct depth. + + + + + + Implementation of Stacks collection for the + + + + Implementation of Stacks collection for the + + + Nicko Cadell + + + + Internal constructor + + + + Initializes a new instance of the class. + + + + + + Gets the named thread context stack + + + The named stack + + + + Gets the named thread context stack + + + + + + The fully qualified type of the ThreadContextStacks class. + + + Used by the internal logger to record the Type of the + log message. + + + + + + + + + + + + Outputs log statements from within the log4net assembly. + + + + Log4net components cannot make log4net logging calls. However, it is + sometimes useful for the user to learn about what log4net is + doing. + + + All log4net internal debug calls go to the standard output stream + whereas internal error messages are sent to the standard error output + stream. + + + Nicko Cadell + Gert Driesen + + + + The event raised when an internal message has been received. + + + + + The Type that generated the internal message. + + + + + The DateTime stamp of when the internal message was received. + + + + + The UTC DateTime stamp of when the internal message was received. + + + + + A string indicating the severity of the internal message. + + + "log4net: ", + "log4net:ERROR ", + "log4net:WARN " + + + + + The internal log message. + + + + + The Exception related to the message. + + + Optional. Will be null if no Exception was passed. + + + + + Formats Prefix, Source, and Message in the same format as the value + sent to Console.Out and Trace.Write. + + + + + + Initializes a new instance of the class. + + + + + + + + + Static constructor that initializes logging by reading + settings from the application configuration file. + + + + The log4net.Internal.Debug application setting + controls internal debugging. This setting should be set + to true to enable debugging. + + + The log4net.Internal.Quiet application setting + suppresses all internal logging including error messages. + This setting should be set to true to enable message + suppression. + + + + + + Gets or sets a value indicating whether log4net internal logging + is enabled or disabled. + + + true if log4net internal logging is enabled, otherwise + false. + + + + When set to true, internal debug level logging will be + displayed. + + + This value can be set by setting the application setting + log4net.Internal.Debug in the application configuration + file. + + + The default value is false, i.e. debugging is + disabled. + + + + + The following example enables internal debugging using the + application configuration file : + + + + + + + + + + + + + Gets or sets a value indicating whether log4net should generate no output + from internal logging, not even for errors. + + + true if log4net should generate no output at all from internal + logging, otherwise false. + + + + When set to true will cause internal logging at all levels to be + suppressed. This means that no warning or error reports will be logged. + This option overrides the setting and + disables all debug also. + + This value can be set by setting the application setting + log4net.Internal.Quiet in the application configuration file. + + + The default value is false, i.e. internal logging is not + disabled. + + + + The following example disables internal logging using the + application configuration file : + + + + + + + + + + + + + + + + + Raises the LogReceived event when an internal messages is received. + + + + + + + + + Test if LogLog.Debug is enabled for output. + + + true if Debug is enabled + + + + Test if LogLog.Debug is enabled for output. + + + + + + Writes log4net internal debug messages to the + standard output stream. + + + The message to log. + + + All internal debug messages are prepended with + the string "log4net: ". + + + + + + Writes log4net internal debug messages to the + standard output stream. + + The Type that generated this message. + The message to log. + An exception to log. + + + All internal debug messages are prepended with + the string "log4net: ". + + + + + + Test if LogLog.Warn is enabled for output. + + + true if Warn is enabled + + + + Test if LogLog.Warn is enabled for output. + + + + + + Writes log4net internal warning messages to the + standard error stream. + + The Type that generated this message. + The message to log. + + + All internal warning messages are prepended with + the string "log4net:WARN ". + + + + + + Writes log4net internal warning messages to the + standard error stream. + + The Type that generated this message. + The message to log. + An exception to log. + + + All internal warning messages are prepended with + the string "log4net:WARN ". + + + + + + Test if LogLog.Error is enabled for output. + + + true if Error is enabled + + + + Test if LogLog.Error is enabled for output. + + + + + + Writes log4net internal error messages to the + standard error stream. + + The Type that generated this message. + The message to log. + + + All internal error messages are prepended with + the string "log4net:ERROR ". + + + + + + Writes log4net internal error messages to the + standard error stream. + + The Type that generated this message. + The message to log. + An exception to log. + + + All internal debug messages are prepended with + the string "log4net:ERROR ". + + + + + + Writes output to the standard output stream. + + The message to log. + + + Writes to both Console.Out and System.Diagnostics.Trace. + Note that the System.Diagnostics.Trace is not supported + on the Compact Framework. + + + If the AppDomain is not configured with a config file then + the call to System.Diagnostics.Trace may fail. This is only + an issue if you are programmatically creating your own AppDomains. + + + + + + Writes output to the standard error stream. + + The message to log. + + + Writes to both Console.Error and System.Diagnostics.Trace. + Note that the System.Diagnostics.Trace is not supported + on the Compact Framework. + + + If the AppDomain is not configured with a config file then + the call to System.Diagnostics.Trace may fail. This is only + an issue if you are programmatically creating your own AppDomains. + + + + + + Default debug level + + + + + In quietMode not even errors generate any output. + + + + + Subscribes to the LogLog.LogReceived event and stores messages + to the supplied IList instance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents a native error code and message. + + + + Represents a Win32 platform native error. + + + Nicko Cadell + Gert Driesen + + + + Create an instance of the class with the specified + error number and message. + + The number of the native error. + The message of the native error. + + + Create an instance of the class with the specified + error number and message. + + + + + + Gets the number of the native error. + + + The number of the native error. + + + + Gets the number of the native error. + + + + + + Gets the message of the native error. + + + The message of the native error. + + + + + Gets the message of the native error. + + + + + Create a new instance of the class for the last Windows error. + + + An instance of the class for the last windows error. + + + + The message for the error number is lookup up using the + native Win32 FormatMessage function. + + + + + + Create a new instance of the class. + + the error number for the native error + + An instance of the class for the specified + error number. + + + + The message for the specified error number is lookup up using the + native Win32 FormatMessage function. + + + + + + Retrieves the message corresponding with a Win32 message identifier. + + Message identifier for the requested message. + + The message corresponding with the specified message identifier. + + + + The message will be searched for in system message-table resource(s) + using the native FormatMessage function. + + + + + + Return error information string + + error information string + + + Return error information string + + + + + + Formats a message string. + + Formatting options, and how to interpret the parameter. + Location of the message definition. + Message identifier for the requested message. + Language identifier for the requested message. + If includes FORMAT_MESSAGE_ALLOCATE_BUFFER, the function allocates a buffer using the LocalAlloc function, and places the pointer to the buffer at the address specified in . + If the FORMAT_MESSAGE_ALLOCATE_BUFFER flag is not set, this parameter specifies the maximum number of TCHARs that can be stored in the output buffer. If FORMAT_MESSAGE_ALLOCATE_BUFFER is set, this parameter specifies the minimum number of TCHARs to allocate for an output buffer. + Pointer to an array of values that are used as insert values in the formatted message. + + + The function requires a message definition as input. The message definition can come from a + buffer passed into the function. It can come from a message table resource in an + already-loaded module. Or the caller can ask the function to search the system's message + table resource(s) for the message definition. The function finds the message definition + in a message table resource based on a message identifier and a language identifier. + The function copies the formatted message text to an output buffer, processing any embedded + insert sequences if requested. + + + To prevent the usage of unsafe code, this stub does not support inserting values in the formatted message. + + + + + If the function succeeds, the return value is the number of TCHARs stored in the output + buffer, excluding the terminating null character. + + + If the function fails, the return value is zero. To get extended error information, + call . + + + + + + An always empty . + + + + A singleton implementation of the over a collection + that is empty and not modifiable. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to enforce the singleton pattern. + + + + + + Gets the singleton instance of the . + + The singleton instance of the . + + + Gets the singleton instance of the . + + + + + + Gets the current object from the enumerator. + + + Throws an because the + never has a current value. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + Test if the enumerator can advance, if so advance. + + false as the cannot advance. + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will always return false. + + + + + + Resets the enumerator back to the start. + + + + As the enumerator is over an empty collection does nothing. + + + + + + Gets the current key from the enumerator. + + + Throws an exception because the + never has a current value. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + Gets the current value from the enumerator. + + The current value from the enumerator. + + Throws an because the + never has a current value. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + Gets the current entry from the enumerator. + + + Throws an because the + never has a current entry. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + The singleton instance of the . + + + + + An always empty . + + + + A singleton implementation of the over a collection + that is empty and not modifiable. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to enforce the singleton pattern. + + + + + + Get the singleton instance of the . + + The singleton instance of the . + + + Gets the singleton instance of the . + + + + + + Gets the current object from the enumerator. + + + Throws an because the + never has a current value. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + Test if the enumerator can advance, if so advance + + false as the cannot advance. + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will always return false. + + + + + + Resets the enumerator back to the start. + + + + As the enumerator is over an empty collection does nothing. + + + + + + The singleton instance of the . + + + + + A SecurityContext used when a SecurityContext is not required + + + + The is a no-op implementation of the + base class. It is used where a + is required but one has not been provided. + + + Nicko Cadell + + + + Singleton instance of + + + + Singleton instance of + + + + + + Private constructor + + + + Private constructor for singleton pattern. + + + + + + Impersonate this SecurityContext + + State supplied by the caller + null + + + No impersonation is done and null is always returned. + + + + + + Implements log4net's default error handling policy which consists + of emitting a message for the first error in an appender and + ignoring all subsequent errors. + + + + The error message is processed using the LogLog sub-system by default. + + + This policy aims at protecting an otherwise working application + from being flooded with error messages when logging fails. + + + Nicko Cadell + Gert Driesen + Ron Grabowski + + + + Default Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + The prefix to use for each message. + + + Initializes a new instance of the class + with the specified prefix. + + + + + + Reset the error handler back to its initial disabled state. + + + + + Log an Error + + The error message. + The exception. + The internal error code. + + + Invokes if and only if this is the first error or the first error after has been called. + + + + + + Log the very first error + + The error message. + The exception. + The internal error code. + + + Sends the error information to 's Error method. + + + + + + Log an Error + + The error message. + The exception. + + + Invokes if and only if this is the first error or the first error after has been called. + + + + + + Log an error + + The error message. + + + Invokes if and only if this is the first error or the first error after has been called. + + + + + + Is error logging enabled + + + + Is error logging enabled. Logging is only enabled for the + first error delivered to the . + + + + + + The date the first error that trigged this error handler occurred, or if it has not been triggered. + + + + + The UTC date the first error that trigged this error handler occured, or if it has not been triggered. + + + + + The message from the first error that trigged this error handler. + + + + + The exception from the first error that trigged this error handler. + + + May be . + + + + + The error code from the first error that trigged this error handler. + + + Defaults to + + + + + The UTC date the error was recorded. + + + + + Flag to indicate if it is the first error + + + + + The message recorded during the first error. + + + + + The exception recorded during the first error. + + + + + The error code recorded during the first error. + + + + + String to prefix each message with + + + + + The fully qualified type of the OnlyOnceErrorHandler class. + + + Used by the internal logger to record the Type of the + log message. + + + + + A convenience class to convert property values to specific types. + + + + Utility functions for converting types and parsing values. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + Converts a string to a value. + + String to convert. + The default value. + The value of . + + + If is "true", then true is returned. + If is "false", then false is returned. + Otherwise, is returned. + + + + + + Parses a file size into a number. + + String to parse. + The default value. + The value of . + + + Parses a file size of the form: number[KB|MB|GB] into a + long value. It is scaled with the appropriate multiplier. + + + is returned when + cannot be converted to a value. + + + + + + Converts a string to an object. + + The target type to convert to. + The string to convert to an object. + + The object converted from a string or null when the + conversion failed. + + + + Converts a string to an object. Uses the converter registry to try + to convert the string value into the specified target type. + + + + + + Checks if there is an appropriate type conversion from the source type to the target type. + + The type to convert from. + The type to convert to. + true if there is a conversion from the source type to the target type. + + Checks if there is an appropriate type conversion from the source type to the target type. + + + + + + + Converts an object to the target type. + + The object to convert to the target type. + The type to convert to. + The converted object. + + + Converts an object to the target type. + + + + + + Instantiates an object given a class name. + + The fully qualified class name of the object to instantiate. + The class to which the new object should belong. + The object to return in case of non-fulfillment. + + An instance of the or + if the object could not be instantiated. + + + + Checks that the is a subclass of + . If that test fails or the object could + not be instantiated, then is returned. + + + + + + Performs variable substitution in string from the + values of keys found in . + + The string on which variable substitution is performed. + The dictionary to use to lookup variables. + The result of the substitutions. + + + The variable substitution delimiters are ${ and }. + + + For example, if props contains key=value, then the call + + + + string s = OptionConverter.SubstituteVariables("Value of key is ${key}."); + + + + will set the variable s to "Value of key is value.". + + + If no value could be found for the specified key, then substitution + defaults to an empty string. + + + For example, if system properties contains no value for the key + "nonExistentKey", then the call + + + + string s = OptionConverter.SubstituteVariables("Value of nonExistentKey is [${nonExistentKey}]"); + + + + will set s to "Value of nonExistentKey is []". + + + An Exception is thrown if contains a start + delimiter "${" which is not balanced by a stop delimiter "}". + + + + + + Converts the string representation of the name or numeric value of one or + more enumerated constants to an equivalent enumerated object. + + The type to convert to. + The enum string value. + If true, ignore case; otherwise, regard case. + An object of type whose value is represented by . + + + + The fully qualified type of the OptionConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Abstract class that provides the formatting functionality that + derived classes need. + + + + Conversion specifiers in a conversion patterns are parsed to + individual PatternConverters. Each of which is responsible for + converting a logging event in a converter specific manner. + + + Nicko Cadell + Gert Driesen + + + + Protected constructor + + + + Initializes a new instance of the class. + + + + + + Get the next pattern converter in the chain + + + the next pattern converter in the chain + + + + Get the next pattern converter in the chain + + + + + + Gets or sets the formatting info for this converter + + + The formatting info for this converter + + + + Gets or sets the formatting info for this converter + + + + + + Gets or sets the option value for this converter + + + The option for this converter + + + + Gets or sets the option value for this converter + + + + + + Evaluate this pattern converter and write the output to a writer. + + that will receive the formatted result. + The state object on which the pattern converter should be executed. + + + Derived pattern converters must override this method in order to + convert conversion specifiers in the appropriate way. + + + + + + Set the next pattern converter in the chains + + the pattern converter that should follow this converter in the chain + the next converter + + + The PatternConverter can merge with its neighbor during this method (or a sub class). + Therefore the return value may or may not be the value of the argument passed in. + + + + + + Write the pattern converter to the writer with appropriate formatting + + that will receive the formatted result. + The state object on which the pattern converter should be executed. + + + This method calls to allow the subclass to perform + appropriate conversion of the pattern converter. If formatting options have + been specified via the then this method will + apply those formattings before writing the output. + + + + + + Fast space padding method. + + to which the spaces will be appended. + The number of spaces to be padded. + + + Fast space padding method. + + + + + + The option string to the converter + + + + + Initial buffer size + + + + + Maximum buffer size before it is recycled + + + + + Write an dictionary to a + + the writer to write to + a to use for object conversion + the value to write to the writer + + + Writes the to a writer in the form: + + + {key1=value1, key2=value2, key3=value3} + + + If the specified + is not null then it is used to render the key and value to text, otherwise + the object's ToString method is called. + + + + + + Write an dictionary to a + + the writer to write to + a to use for object conversion + the value to write to the writer + + + Writes the to a writer in the form: + + + {key1=value1, key2=value2, key3=value3} + + + If the specified + is not null then it is used to render the key and value to text, otherwise + the object's ToString method is called. + + + + + + Write an object to a + + the writer to write to + a to use for object conversion + the value to write to the writer + + + Writes the Object to a writer. If the specified + is not null then it is used to render the object to text, otherwise + the object's ToString method is called. + + + + + + + + + + + Most of the work of the class + is delegated to the PatternParser class. + + + + The PatternParser processes a pattern string and + returns a chain of objects. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + The pattern to parse. + + + Initializes a new instance of the class + with the specified pattern string. + + + + + + Parses the pattern into a chain of pattern converters. + + The head of a chain of pattern converters. + + + Parses the pattern into a chain of pattern converters. + + + + + + Get the converter registry used by this parser + + + The converter registry used by this parser + + + + Get the converter registry used by this parser + + + + + + Build the unified cache of converters from the static and instance maps + + the list of all the converter names + + + Build the unified cache of converters from the static and instance maps + + + + + + Sort strings by length + + + + that orders strings by string length. + The longest strings are placed first + + + + + + Internal method to parse the specified pattern to find specified matches + + the pattern to parse + the converter names to match in the pattern + + + The matches param must be sorted such that longer strings come before shorter ones. + + + + + + Process a parsed literal + + the literal text + + + + Process a parsed converter pattern + + the name of the converter + the optional option for the converter + the formatting info for the converter + + + + Resets the internal state of the parser and adds the specified pattern converter + to the chain. + + The pattern converter to add. + + + + The first pattern converter in the chain + + + + + the last pattern converter in the chain + + + + + The pattern + + + + + Internal map of converter identifiers to converter types + + + + This map overrides the static s_globalRulesRegistry map. + + + + + + The fully qualified type of the PatternParser class. + + + Used by the internal logger to record the Type of the + log message. + + + + + This class implements a patterned string. + + + + This string has embedded patterns that are resolved and expanded + when the string is formatted. + + + This class functions similarly to the + in that it accepts a pattern and renders it to a string. Unlike the + however the PatternString + does not render the properties of a specific but + of the process in general. + + + The recognized conversion pattern names are: + + + + Conversion Pattern Name + Effect + + + appdomain + + + Used to output the friendly name of the current AppDomain. + + + + + appsetting + + + Used to output the value of a specific appSetting key in the application + configuration file. + + + + + date + + + Used to output the current date and time in the local time zone. + To output the date in universal time use the %utcdate pattern. + The date conversion + specifier may be followed by a date format specifier enclosed + between braces. For example, %date{HH:mm:ss,fff} or + %date{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is + given then ISO8601 format is + assumed (). + + + The date format specifier admits the same syntax as the + time pattern string of the . + + + For better results it is recommended to use the log4net date + formatters. These can be specified using one of the strings + "ABSOLUTE", "DATE" and "ISO8601" for specifying + , + and respectively + . For example, + %date{ISO8601} or %date{ABSOLUTE}. + + + These dedicated date formatters perform significantly + better than . + + + + + env + + + Used to output the a specific environment variable. The key to + lookup must be specified within braces and directly following the + pattern specifier, e.g. %env{COMPUTERNAME} would include the value + of the COMPUTERNAME environment variable. + + + The env pattern is not supported on the .NET Compact Framework. + + + + + identity + + + Used to output the user name for the currently active user + (Principal.Identity.Name). + + + + + newline + + + Outputs the platform dependent line separator character or + characters. + + + This conversion pattern name offers the same performance as using + non-portable line separator strings such as "\n", or "\r\n". + Thus, it is the preferred way of specifying a line separator. + + + + + processid + + + Used to output the system process ID for the current process. + + + + + property + + + Used to output a specific context property. The key to + lookup must be specified within braces and directly following the + pattern specifier, e.g. %property{user} would include the value + from the property that is keyed by the string 'user'. Each property value + that is to be included in the log must be specified separately. + Properties are stored in logging contexts. By default + the log4net:HostName property is set to the name of machine on + which the event was originally logged. + + + If no key is specified, e.g. %property then all the keys and their + values are printed in a comma separated list. + + + The properties of an event are combined from a number of different + contexts. These are listed below in the order in which they are searched. + + + + the thread properties + + The that are set on the current + thread. These properties are shared by all events logged on this thread. + + + + the global properties + + The that are set globally. These + properties are shared by all the threads in the AppDomain. + + + + + + + random + + + Used to output a random string of characters. The string is made up of + uppercase letters and numbers. By default the string is 4 characters long. + The length of the string can be specified within braces directly following the + pattern specifier, e.g. %random{8} would output an 8 character string. + + + + + username + + + Used to output the WindowsIdentity for the currently + active user. + + + + + utcdate + + + Used to output the date of the logging event in universal time. + The date conversion + specifier may be followed by a date format specifier enclosed + between braces. For example, %utcdate{HH:mm:ss,fff} or + %utcdate{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is + given then ISO8601 format is + assumed (). + + + The date format specifier admits the same syntax as the + time pattern string of the . + + + For better results it is recommended to use the log4net date + formatters. These can be specified using one of the strings + "ABSOLUTE", "DATE" and "ISO8601" for specifying + , + and respectively + . For example, + %utcdate{ISO8601} or %utcdate{ABSOLUTE}. + + + These dedicated date formatters perform significantly + better than . + + + + + % + + + The sequence %% outputs a single percent sign. + + + + + + Additional pattern converters may be registered with a specific + instance using or + . + + + See the for details on the + format modifiers supported by the patterns. + + + Nicko Cadell + + + + Internal map of converter identifiers to converter types. + + + + + the pattern + + + + + the head of the pattern converter chain + + + + + patterns defined on this PatternString only + + + + + Initialize the global registry + + + + + Default constructor + + + + Initialize a new instance of + + + + + + Constructs a PatternString + + The pattern to use with this PatternString + + + Initialize a new instance of with the pattern specified. + + + + + + Gets or sets the pattern formatting string + + + The pattern formatting string + + + + The ConversionPattern option. This is the string which + controls formatting and consists of a mix of literal content and + conversion specifiers. + + + + + + Initialize object options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Create the used to parse the pattern + + the pattern to parse + The + + + Returns PatternParser used to parse the conversion string. Subclasses + may override this to return a subclass of PatternParser which recognize + custom conversion pattern name. + + + + + + Produces a formatted string as specified by the conversion pattern. + + The TextWriter to write the formatted event to + + + Format the pattern to the . + + + + + + Format the pattern as a string + + the pattern formatted as a string + + + Format the pattern to a string. + + + + + + Add a converter to this PatternString + + the converter info + + + This version of the method is used by the configurator. + Programmatic users should use the alternative method. + + + + + + Add a converter to this PatternString + + the name of the conversion pattern for this converter + the type of the converter + + + Add a converter to this PatternString + + + + + + Write the name of the current AppDomain to the output + + + + Write the name of the current AppDomain to the output writer + + + Nicko Cadell + + + + Write the name of the current AppDomain to the output + + the writer to write to + null, state is not set + + + Writes name of the current AppDomain to the output . + + + + + + AppSetting pattern converter + + + + This pattern converter reads appSettings from the application configuration file. + + + If the is specified then that will be used to + lookup a single appSettings value. If no is specified + then all appSettings will be dumped as a list of key value pairs. + + + A typical use is to specify a base directory for log files, e.g. + + + + + ... + + + ]]> + + + + + + + Write the property value to the output + + that will receive the formatted result. + null, state is not set + + + Writes out the value of a named property. The property name + should be set in the + property. + + + If the is set to null + then all the properties are written as key value pairs. + + + + + + Write the current date to the output + + + + Date pattern converter, uses a to format + the current date and time to the writer as a string. + + + The value of the determines + the formatting of the date. The following values are allowed: + + + Option value + Output + + + ISO8601 + + Uses the formatter. + Formats using the "yyyy-MM-dd HH:mm:ss,fff" pattern. + + + + DATE + + Uses the formatter. + Formats using the "dd MMM yyyy HH:mm:ss,fff" for example, "06 Nov 1994 15:49:37,459". + + + + ABSOLUTE + + Uses the formatter. + Formats using the "HH:mm:ss,fff" for example, "15:49:37,459". + + + + other + + Any other pattern string uses the formatter. + This formatter passes the pattern string to the + method. + For details on valid patterns see + DateTimeFormatInfo Class. + + + + + + The date and time is in the local time zone and is rendered in that zone. + To output the time in Universal time see . + + + Nicko Cadell + + + + The used to render the date to a string + + + + The used to render the date to a string + + + + + + Initialize the converter options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Write the current date to the output + + that will receive the formatted result. + null, state is not set + + + Pass the current date and time to the + for it to render it to the writer. + + + The date and time passed is in the local time zone. + + + + + + The fully qualified type of the DatePatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Write an folder path to the output + + + + Write an special path environment folder path to the output writer. + The value of the determines + the name of the variable to output. + should be a value in the enumeration. + + + Ron Grabowski + + + + Write an special path environment folder path to the output + + the writer to write to + null, state is not set + + + Writes the special path environment folder path to the output . + The name of the special path environment folder path to output must be set + using the + property. + + + + + + The fully qualified type of the EnvironmentFolderPathPatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Write an environment variable to the output + + + + Write an environment variable to the output writer. + The value of the determines + the name of the variable to output. + + + Nicko Cadell + + + + Write an environment variable to the output + + the writer to write to + null, state is not set + + + Writes the environment variable to the output . + The name of the environment variable to output must be set + using the + property. + + + + + + The fully qualified type of the EnvironmentPatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Write the current thread identity to the output + + + + Write the current thread identity to the output writer + + + Nicko Cadell + + + + Write the current thread identity to the output + + the writer to write to + null, state is not set + + + Writes the current thread identity to the output . + + + + + + The fully qualified type of the IdentityPatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Pattern converter for literal string instances in the pattern + + + + Writes the literal string value specified in the + property to + the output. + + + Nicko Cadell + + + + Set the next converter in the chain + + The next pattern converter in the chain + The next pattern converter + + + Special case the building of the pattern converter chain + for instances. Two adjacent + literals in the pattern can be represented by a single combined + pattern converter. This implementation detects when a + is added to the chain + after this converter and combines its value with this converter's + literal value. + + + + + + Write the literal to the output + + the writer to write to + null, not set + + + Override the formatting behavior to ignore the FormattingInfo + because we have a literal instead. + + + Writes the value of + to the output . + + + + + + Convert this pattern into the rendered message + + that will receive the formatted result. + null, not set + + + This method is not used. + + + + + + Writes a newline to the output + + + + Writes the system dependent line terminator to the output. + This behavior can be overridden by setting the : + + + + Option Value + Output + + + DOS + DOS or Windows line terminator "\r\n" + + + UNIX + UNIX line terminator "\n" + + + + Nicko Cadell + + + + Initialize the converter + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Write the current process ID to the output + + + + Write the current process ID to the output writer + + + Nicko Cadell + + + + Write the current process ID to the output + + the writer to write to + null, state is not set + + + Write the current process ID to the output . + + + + + + The fully qualified type of the ProcessIdPatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Property pattern converter + + + + This pattern converter reads the thread and global properties. + The thread properties take priority over global properties. + See for details of the + thread properties. See for + details of the global properties. + + + If the is specified then that will be used to + lookup a single property. If no is specified + then all properties will be dumped as a list of key value pairs. + + + Nicko Cadell + + + + Write the property value to the output + + that will receive the formatted result. + null, state is not set + + + Writes out the value of a named property. The property name + should be set in the + property. + + + If the is set to null + then all the properties are written as key value pairs. + + + + + + A Pattern converter that generates a string of random characters + + + + The converter generates a string of random characters. By default + the string is length 4. This can be changed by setting the + to the string value of the length required. + + + The random characters in the string are limited to uppercase letters + and numbers only. + + + The random number generator used by this class is not cryptographically secure. + + + Nicko Cadell + + + + Shared random number generator + + + + + Length of random string to generate. Default length 4. + + + + + Initialize the converter options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Write a randoim string to the output + + the writer to write to + null, state is not set + + + Write a randoim string to the output . + + + + + + The fully qualified type of the RandomStringPatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Write the current threads username to the output + + + + Write the current threads username to the output writer + + + Nicko Cadell + + + + Write the current threads username to the output + + the writer to write to + null, state is not set + + + Write the current threads username to the output . + + + + + + The fully qualified type of the UserNamePatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Write the UTC date time to the output + + + + Date pattern converter, uses a to format + the current date and time in Universal time. + + + See the for details on the date pattern syntax. + + + + Nicko Cadell + + + + Write the current date and time to the output + + that will receive the formatted result. + null, state is not set + + + Pass the current date and time to the + for it to render it to the writer. + + + The date is in Universal time when it is rendered. + + + + + + + The fully qualified type of the UtcDatePatternConverter class. + + + Used by the internal logger to record the Type of the + log message. + + + + + String keyed object map. + + + + While this collection is serializable only member + objects that are serializable will + be serialized along with this collection. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + properties to copy + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data. + The that contains contextual information about the source or destination. + + + Because this class is sealed the serialization constructor is private. + + + + + + Gets or sets the value of the property with the specified key. + + + The value of the property with the specified key. + + The key of the property to get or set. + + + The property value will only be serialized if it is serializable. + If it cannot be serialized it will be silently ignored if + a serialization operation is performed. + + + + + + Remove the entry with the specified key from this dictionary + + the key for the entry to remove + + + Remove the entry with the specified key from this dictionary + + + + + + See + + an enumerator + + + Returns a over the contest of this collection. + + + + + + See + + the key to remove + + + Remove the entry with the specified key from this dictionary + + + + + + See + + the key to lookup in the collection + true if the collection contains the specified key + + + Test if this collection contains a specified key. + + + + + + Remove all properties from the properties collection + + + + Remove all properties from the properties collection + + + + + + See + + the key + the value to store for the key + + + Store a value for the specified . + + + Thrown if the is not a string + + + + See + + + false + + + + This collection is modifiable. This property always + returns false. + + + + + + See + + + The value for the key specified. + + + + Get or set a value for the specified . + + + Thrown if the is not a string + + + + See + + + + + See + + + + + See + + + + + See + + + + + + + See + + + + + See + + + + + See + + + + + A class to hold the key and data for a property set in the config file + + + + A class to hold the key and data for a property set in the config file + + + + + + Property Key + + + Property Key + + + + Property Key. + + + + + + Property Value + + + Property Value + + + + Property Value. + + + + + + Override Object.ToString to return sensible debug info + + string info about this object + + + + A that ignores the message + + + + This writer is used in special cases where it is necessary + to protect a writer from being closed by a client. + + + Nicko Cadell + + + + Constructor + + the writer to actually write to + + + Create a new ProtectCloseTextWriter using a writer + + + + + + Attach this instance to a different underlying + + the writer to attach to + + + Attach this instance to a different underlying + + + + + + Does not close the underlying output writer. + + + + Does not close the underlying output writer. + This method does nothing. + + + + + + that does not leak exceptions + + + + does not throw exceptions when things go wrong. + Instead, it delegates error handling to its . + + + Nicko Cadell + Gert Driesen + + + + Constructor + + the writer to actually write to + the error handler to report error to + + + Create a new QuietTextWriter using a writer and error handler + + + + + + Gets or sets the error handler that all errors are passed to. + + + The error handler that all errors are passed to. + + + + Gets or sets the error handler that all errors are passed to. + + + + + + Gets a value indicating whether this writer is closed. + + + true if this writer is closed, otherwise false. + + + + Gets a value indicating whether this writer is closed. + + + + + + Writes a character to the underlying writer + + the char to write + + + Writes a character to the underlying writer + + + + + + Writes a buffer to the underlying writer + + the buffer to write + the start index to write from + the number of characters to write + + + Writes a buffer to the underlying writer + + + + + + Writes a string to the output. + + The string data to write to the output. + + + Writes a string to the output. + + + + + + Closes the underlying output writer. + + + + Closes the underlying output writer. + + + + + + The error handler instance to pass all errors to + + + + + Flag to indicate if this writer is closed + + + + + Defines a lock that supports single writers and multiple readers + + + + ReaderWriterLock is used to synchronize access to a resource. + At any given time, it allows either concurrent read access for + multiple threads, or write access for a single thread. In a + situation where a resource is changed infrequently, a + ReaderWriterLock provides better throughput than a simple + one-at-a-time lock, such as . + + + If a platform does not support a System.Threading.ReaderWriterLock + implementation then all readers and writers are serialized. Therefore + the caller must not rely on multiple simultaneous readers. + + + Nicko Cadell + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Acquires a reader lock + + + + blocks if a different thread has the writer + lock, or if at least one thread is waiting for the writer lock. + + + + + + Decrements the lock count + + + + decrements the lock count. When the count + reaches zero, the lock is released. + + + + + + Acquires the writer lock + + + + This method blocks if another thread has a reader lock or writer lock. + + + + + + Decrements the lock count on the writer lock + + + + ReleaseWriterLock decrements the writer lock count. + When the count reaches zero, the writer lock is released. + + + + + + String keyed object map that is read only. + + + + This collection is readonly and cannot be modified. + + + While this collection is serializable only member + objects that are serializable will + be serialized along with this collection. + + + Nicko Cadell + Gert Driesen + + + + The Hashtable used to store the properties data + + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Copy Constructor + + properties to copy + + + Initializes a new instance of the class. + + + + + + Deserialization constructor + + The that holds the serialized object data. + The that contains contextual information about the source or destination. + + + Initializes a new instance of the class + with serialized data. + + + + + + Gets the key names. + + An array of all the keys. + + + Gets the key names. + + + + + + Gets or sets the value of the property with the specified key. + + + The value of the property with the specified key. + + The key of the property to get or set. + + + The property value will only be serialized if it is serializable. + If it cannot be serialized it will be silently ignored if + a serialization operation is performed. + + + + + + Test if the dictionary contains a specified key + + the key to look for + true if the dictionary contains the specified key + + + Test if the dictionary contains a specified key + + + + + + The hashtable used to store the properties + + + The internal collection used to store the properties + + + + The hashtable used to store the properties + + + + + + Serializes this object into the provided. + + The to populate with data. + The destination for this serialization. + + + Serializes this object into the provided. + + + + + + See + + + + + See + + + + + + See + + + + + + + Remove all properties from the properties collection + + + + + See + + + + + + + See + + + + + See + + + + + See + + + + + See + + + + + See + + + + + See + + + + + + + See + + + + + The number of properties in this collection + + + + + See + + + + + See + + + + + A that can be and reused + + + + A that can be and reused. + This uses a single buffer for string operations. + + + Nicko Cadell + + + + Create an instance of + + the format provider to use + + + Create an instance of + + + + + + Override Dispose to prevent closing of writer + + flag + + + Override Dispose to prevent closing of writer + + + + + + Reset this string writer so that it can be reused. + + the maximum buffer capacity before it is trimmed + the default size to make the buffer + + + Reset this string writer so that it can be reused. + The internal buffers are cleared and reset. + + + + + + Utility class for system specific information. + + + + Utility class of static methods for system specific information. + + + Nicko Cadell + Gert Driesen + Alexey Solofnenko + + + + Private constructor to prevent instances. + + + + Only static methods are exposed from this type. + + + + + + Initialize default values for private static fields. + + + + Only static methods are exposed from this type. + + + + + + Gets the system dependent line terminator. + + + The system dependent line terminator. + + + + Gets the system dependent line terminator. + + + + + + Gets the base directory for this . + + The base directory path for the current . + + + Gets the base directory for this . + + + The value returned may be either a local file path or a URI. + + + + + + Gets the path to the configuration file for the current . + + The path to the configuration file for the current . + + + The .NET Compact Framework 1.0 does not have a concept of a configuration + file. For this runtime, we use the entry assembly location as the root for + the configuration file name. + + + The value returned may be either a local file path or a URI. + + + + + + Gets the path to the file that first executed in the current . + + The path to the entry assembly. + + + Gets the path to the file that first executed in the current . + + + + + + Gets the ID of the current thread. + + The ID of the current thread. + + + On the .NET framework, the AppDomain.GetCurrentThreadId method + is used to obtain the thread ID for the current thread. This is the + operating system ID for the thread. + + + On the .NET Compact Framework 1.0 it is not possible to get the + operating system thread ID for the current thread. The native method + GetCurrentThreadId is implemented inline in a header file + and cannot be called. + + + On the .NET Framework 2.0 the Thread.ManagedThreadId is used as this + gives a stable id unrelated to the operating system thread ID which may + change if the runtime is using fibers. + + + + + + Get the host name or machine name for the current machine + + + The hostname or machine name + + + + Get the host name or machine name for the current machine + + + The host name () or + the machine name (Environment.MachineName) for + the current machine, or if neither of these are available + then NOT AVAILABLE is returned. + + + + + + Get this application's friendly name + + + The friendly name of this application as a string + + + + If available the name of the application is retrieved from + the AppDomain using AppDomain.CurrentDomain.FriendlyName. + + + Otherwise the file name of the entry assembly is used. + + + + + + Get the start time for the current process. + + + + This is the time at which the log4net library was loaded into the + AppDomain. Due to reports of a hang in the call to System.Diagnostics.Process.StartTime + this is not the start time for the current process. + + + The log4net library should be loaded by an application early during its + startup, therefore this start time should be a good approximation for + the actual start time. + + + Note that AppDomains may be loaded and unloaded within the + same process without the process terminating, however this start time + will be set per AppDomain. + + + + + + Get the UTC start time for the current process. + + + + This is the UTC time at which the log4net library was loaded into the + AppDomain. Due to reports of a hang in the call to System.Diagnostics.Process.StartTime + this is not the start time for the current process. + + + The log4net library should be loaded by an application early during its + startup, therefore this start time should be a good approximation for + the actual start time. + + + Note that AppDomains may be loaded and unloaded within the + same process without the process terminating, however this start time + will be set per AppDomain. + + + + + + Text to output when a null is encountered. + + + + Use this value to indicate a null has been encountered while + outputting a string representation of an item. + + + The default value is (null). This value can be overridden by specifying + a value for the log4net.NullText appSetting in the application's + .config file. + + + + + + Text to output when an unsupported feature is requested. + + + + Use this value when an unsupported feature is requested. + + + The default value is NOT AVAILABLE. This value can be overridden by specifying + a value for the log4net.NotAvailableText appSetting in the application's + .config file. + + + + + + Gets the assembly location path for the specified assembly. + + The assembly to get the location for. + The location of the assembly. + + + This method does not guarantee to return the correct path + to the assembly. If only tries to give an indication as to + where the assembly was loaded from. + + + + + + Gets the fully qualified name of the , including + the name of the assembly from which the was + loaded. + + The to get the fully qualified name for. + The fully qualified name for the . + + + This is equivalent to the Type.AssemblyQualifiedName property, + but this method works on the .NET Compact Framework 1.0 as well as + the full .NET runtime. + + + + + + Gets the short name of the . + + The to get the name for. + The short name of the . + + + The short name of the assembly is the + without the version, culture, or public key. i.e. it is just the + assembly's file name without the extension. + + + Use this rather than Assembly.GetName().Name because that + is not available on the Compact Framework. + + + Because of a FileIOPermission security demand we cannot do + the obvious Assembly.GetName().Name. We are allowed to get + the of the assembly so we + start from there and strip out just the assembly name. + + + + + + Gets the file name portion of the , including the extension. + + The to get the file name for. + The file name of the assembly. + + + Gets the file name portion of the , including the extension. + + + + + + Loads the type specified in the type string. + + A sibling type to use to load the type. + The name of the type to load. + Flag set to true to throw an exception if the type cannot be loaded. + true to ignore the case of the type name; otherwise, false + The type loaded or null if it could not be loaded. + + + If the type name is fully qualified, i.e. if contains an assembly name in + the type name, the type will be loaded from the system using + . + + + If the type name is not fully qualified, it will be loaded from the assembly + containing the specified relative type. If the type is not found in the assembly + then all the loaded assemblies will be searched for the type. + + + + + + Loads the type specified in the type string. + + The name of the type to load. + Flag set to true to throw an exception if the type cannot be loaded. + true to ignore the case of the type name; otherwise, false + The type loaded or null if it could not be loaded. + + + If the type name is fully qualified, i.e. if contains an assembly name in + the type name, the type will be loaded from the system using + . + + + If the type name is not fully qualified it will be loaded from the + assembly that is directly calling this method. If the type is not found + in the assembly then all the loaded assemblies will be searched for the type. + + + + + + Loads the type specified in the type string. + + An assembly to load the type from. + The name of the type to load. + Flag set to true to throw an exception if the type cannot be loaded. + true to ignore the case of the type name; otherwise, false + The type loaded or null if it could not be loaded. + + + If the type name is fully qualified, i.e. if contains an assembly name in + the type name, the type will be loaded from the system using + . + + + If the type name is not fully qualified it will be loaded from the specified + assembly. If the type is not found in the assembly then all the loaded assemblies + will be searched for the type. + + + + + + Generate a new guid + + A new Guid + + + Generate a new guid + + + + + + Create an + + The name of the parameter that caused the exception + The value of the argument that causes this exception + The message that describes the error + the ArgumentOutOfRangeException object + + + Create a new instance of the class + with a specified error message, the parameter name, and the value + of the argument. + + + The Compact Framework does not support the 3 parameter constructor for the + type. This method provides an + implementation that works for all platforms. + + + + + + Parse a string into an value + + the string to parse + out param where the parsed value is placed + true if the string was able to be parsed into an integer + + + Attempts to parse the string into an integer. If the string cannot + be parsed then this method returns false. The method does not throw an exception. + + + + + + Parse a string into an value + + the string to parse + out param where the parsed value is placed + true if the string was able to be parsed into an integer + + + Attempts to parse the string into an integer. If the string cannot + be parsed then this method returns false. The method does not throw an exception. + + + + + + Parse a string into an value + + the string to parse + out param where the parsed value is placed + true if the string was able to be parsed into an integer + + + Attempts to parse the string into an integer. If the string cannot + be parsed then this method returns false. The method does not throw an exception. + + + + + + Lookup an application setting + + the application settings key to lookup + the value for the key, or null + + + Configuration APIs are not supported under the Compact Framework + + + + + + Convert a path into a fully qualified local file path. + + The path to convert. + The fully qualified path. + + + Converts the path specified to a fully + qualified path. If the path is relative it is + taken as relative from the application base + directory. + + + The path specified must be a local file path, a URI is not supported. + + + + + + Creates a new case-insensitive instance of the class with the default initial capacity. + + A new case-insensitive instance of the class with the default initial capacity + + + The new Hashtable instance uses the default load factor, the CaseInsensitiveHashCodeProvider, and the CaseInsensitiveComparer. + + + + + + Tests two strings for equality, the ignoring case. + + + If the platform permits, culture information is ignored completely (ordinal comparison). + The aim of this method is to provide a fast comparison that deals with null and ignores different casing. + It is not supposed to deal with various, culture-specific habits. + Use it to compare against pure ASCII constants, like keywords etc. + + The one string. + The other string. + true if the strings are equal, false otherwise. + + + + Gets an empty array of types. + + + + The Type.EmptyTypes field is not available on + the .NET Compact Framework 1.0. + + + + + + The fully qualified type of the SystemInfo class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Cache the host name for the current machine + + + + + Cache the application friendly name + + + + + Text to output when a null is encountered. + + + + + Text to output when an unsupported feature is requested. + + + + + Start time for the current process. + + + + + Utility class that represents a format string. + + + + Utility class that represents a format string. + + + Nicko Cadell + + + + Initialise the + + An that supplies culture-specific formatting information. + A containing zero or more format items. + An array containing zero or more objects to format. + + + + Format the string and arguments + + the formatted string + + + + Replaces the format item in a specified with the text equivalent + of the value of a corresponding instance in a specified array. + A specified parameter supplies culture-specific formatting information. + + An that supplies culture-specific formatting information. + A containing zero or more format items. + An array containing zero or more objects to format. + + A copy of format in which the format items have been replaced by the + equivalent of the corresponding instances of in args. + + + + This method does not throw exceptions. If an exception thrown while formatting the result the + exception and arguments are returned in the result string. + + + + + + Process an error during StringFormat + + + + + Dump the contents of an array into a string builder + + + + + Dump an object to a string + + + + + The fully qualified type of the SystemStringFormat class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Adapter that extends and forwards all + messages to an instance of . + + + + Adapter that extends and forwards all + messages to an instance of . + + + Nicko Cadell + + + + The writer to forward messages to + + + + + Create an instance of that forwards all + messages to a . + + The to forward to + + + Create an instance of that forwards all + messages to a . + + + + + + Gets or sets the underlying . + + + The underlying . + + + + Gets or sets the underlying . + + + + + + The Encoding in which the output is written + + + The + + + + The Encoding in which the output is written + + + + + + Gets an object that controls formatting + + + The format provider + + + + Gets an object that controls formatting + + + + + + Gets or sets the line terminator string used by the TextWriter + + + The line terminator to use + + + + Gets or sets the line terminator string used by the TextWriter + + + + + + Closes the writer and releases any system resources associated with the writer + + + + + + + + + Dispose this writer + + flag indicating if we are being disposed + + + Dispose this writer + + + + + + Flushes any buffered output + + + + Clears all buffers for the writer and causes any buffered data to be written + to the underlying device + + + + + + Writes a character to the wrapped TextWriter + + the value to write to the TextWriter + + + Writes a character to the wrapped TextWriter + + + + + + Writes a character buffer to the wrapped TextWriter + + the data buffer + the start index + the number of characters to write + + + Writes a character buffer to the wrapped TextWriter + + + + + + Writes a string to the wrapped TextWriter + + the value to write to the TextWriter + + + Writes a string to the wrapped TextWriter + + + + + + Implementation of Properties collection for the + + + + Class implements a collection of properties that is specific to each thread. + The class is not synchronized as each thread has its own . + + + Nicko Cadell + + + + Each thread will automatically have its instance. + + + + + Internal constructor + + + + Initializes a new instance of the class. + + + + + + Gets or sets the value of a property + + + The value for the property with the specified key + + + + Gets or sets the value of a property + + + + + + Remove a property + + the key for the entry to remove + + + Remove a property + + + + + + Get the keys stored in the properties. + + + Gets the keys stored in the properties. + + a set of the defined keys + + + + Clear all properties + + + + Clear all properties + + + + + + Get the PropertiesDictionary for this thread. + + create the dictionary if it does not exist, otherwise return null if does not exist + the properties for this thread + + + The collection returned is only to be used on the calling thread. If the + caller needs to share the collection between different threads then the + caller must clone the collection before doing so. + + + + + + Implementation of Stack for the + + + + Implementation of Stack for the + + + Nicko Cadell + + + + The stack store. + + + + + Internal constructor + + + + Initializes a new instance of the class. + + + + + + The number of messages in the stack + + + The current number of messages in the stack + + + + The current number of messages in the stack. That is + the number of times has been called + minus the number of times has been called. + + + + + + Clears all the contextual information held in this stack. + + + + Clears all the contextual information held in this stack. + Only call this if you think that this tread is being reused after + a previous call execution which may not have completed correctly. + You do not need to use this method if you always guarantee to call + the method of the + returned from even in exceptional circumstances, + for example by using the using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message")) + syntax. + + + + + + Removes the top context from this stack. + + The message in the context that was removed from the top of this stack. + + + Remove the top context from this stack, and return + it to the caller. If this stack is empty then an + empty string (not ) is returned. + + + + + + Pushes a new context message into this stack. + + The new context message. + + An that can be used to clean up the context stack. + + + + Pushes a new context onto this stack. An + is returned that can be used to clean up this stack. This + can be easily combined with the using keyword to scope the + context. + + + Simple example of using the Push method with the using keyword. + + using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message")) + { + log.Warn("This should have an ThreadContext Stack message"); + } + + + + + + Gets the current context information for this stack. + + The current context information. + + + + Gets and sets the internal stack used by this + + The internal storage stack + + + This property is provided only to support backward compatability + of the . Tytpically the internal stack should not + be modified. + + + + + + Gets the current context information for this stack. + + Gets the current context information + + + Gets the current context information for this stack. + + + + + + Get a portable version of this object + + the portable instance of this object + + + Get a cross thread portable version of this object + + + + + + Inner class used to represent a single context frame in the stack. + + + + Inner class used to represent a single context frame in the stack. + + + + + + Constructor + + The message for this context. + The parent context in the chain. + + + Initializes a new instance of the class + with the specified message and parent context. + + + + + + Get the message. + + The message. + + + Get the message. + + + + + + Gets the full text of the context down to the root level. + + + The full text of the context down to the root level. + + + + Gets the full text of the context down to the root level. + + + + + + Struct returned from the method. + + + + This struct implements the and is designed to be used + with the pattern to remove the stack frame at the end of the scope. + + + + + + The ThreadContextStack internal stack + + + + + The depth to trim the stack to when this instance is disposed + + + + + Constructor + + The internal stack used by the ThreadContextStack. + The depth to return the stack to when this object is disposed. + + + Initializes a new instance of the class with + the specified stack and return depth. + + + + + + Returns the stack to the correct depth. + + + + Returns the stack to the correct depth. + + + + + + Implementation of Stacks collection for the + + + + Implementation of Stacks collection for the + + + Nicko Cadell + + + + Internal constructor + + + + Initializes a new instance of the class. + + + + + + Gets the named thread context stack + + + The named stack + + + + Gets the named thread context stack + + + + + + The fully qualified type of the ThreadContextStacks class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Utility class for transforming strings. + + + + Utility class for transforming strings. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + Write a string to an + + the writer to write to + the string to write + The string to replace non XML compliant chars with + + + The test is escaped either using XML escape entities + or using CDATA sections. + + + + + + Replace invalid XML characters in text string + + the XML text input string + the string to use in place of invalid characters + A string that does not contain invalid XML characters. + + + Certain Unicode code points are not allowed in the XML InfoSet, for + details see: http://www.w3.org/TR/REC-xml/#charsets. + + + This method replaces any illegal characters in the input string + with the mask string specified. + + + + + + Count the number of times that the substring occurs in the text + + the text to search + the substring to find + the number of times the substring occurs in the text + + + The substring is assumed to be non repeating within itself. + + + + + + Characters illegal in XML 1.0 + + + + + Type converter for Boolean. + + + + Supports conversion from string to bool type. + + + + + + Nicko Cadell + Gert Driesen + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Convert the source object to the type supported by this object + + the object to convert + the converted object + + + Uses the method to convert the + argument to a . + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Exception base type for conversion errors. + + + + This type extends . It + does not add any new functionality but does differentiate the + type of exception being thrown. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + A message to include with the exception. + + + Initializes a new instance of the class + with the specified message. + + + + + + Constructor + + A message to include with the exception. + A nested exception to include. + + + Initializes a new instance of the class + with the specified message and inner exception. + + + + + + Serialization constructor + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + Initializes a new instance of the class + with serialized data. + + + + + + Creates a new instance of the class. + + The conversion destination type. + The value to convert. + An instance of the . + + + Creates a new instance of the class. + + + + + + Creates a new instance of the class. + + The conversion destination type. + The value to convert. + A nested exception to include. + An instance of the . + + + Creates a new instance of the class. + + + + + + Register of type converters for specific types. + + + + Maintains a registry of type converters used to convert between + types. + + + Use the and + methods to register new converters. + The and methods + lookup appropriate converters to use. + + + + + Nicko Cadell + Gert Driesen + + + + Private constructor + + + Initializes a new instance of the class. + + + + + Static constructor. + + + + This constructor defines the intrinsic type converters. + + + + + + Adds a converter for a specific type. + + The type being converted to. + The type converter to use to convert to the destination type. + + + Adds a converter instance for a specific type. + + + + + + Adds a converter for a specific type. + + The type being converted to. + The type of the type converter to use to convert to the destination type. + + + Adds a converter for a specific type. + + + + + + Gets the type converter to use to convert values to the destination type. + + The type being converted from. + The type being converted to. + + The type converter instance to use for type conversions or null + if no type converter is found. + + + + Gets the type converter to use to convert values to the destination type. + + + + + + Gets the type converter to use to convert values to the destination type. + + The type being converted to. + + The type converter instance to use for type conversions or null + if no type converter is found. + + + + Gets the type converter to use to convert values to the destination type. + + + + + + Lookups the type converter to use as specified by the attributes on the + destination type. + + The type being converted to. + + The type converter instance to use for type conversions or null + if no type converter is found. + + + + + Creates the instance of the type converter. + + The type of the type converter. + + The type converter instance to use for type conversions or null + if no type converter is found. + + + + The type specified for the type converter must implement + the or interfaces + and must have a public default (no argument) constructor. + + + + + + The fully qualified type of the ConverterRegistry class. + + + Used by the internal logger to record the Type of the + log message. + + + + + Mapping from to type converter. + + + + + Supports conversion from string to type. + + + + Supports conversion from string to type. + + + + + + Nicko Cadell + Gert Driesen + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to an encoding + the encoding + + + Uses the method to + convert the argument to an . + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Interface supported by type converters + + + + This interface supports conversion from arbitrary types + to a single target type. See . + + + Nicko Cadell + Gert Driesen + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Test if the can be converted to the + type supported by this converter. + + + + + + Convert the source object to the type supported by this object + + the object to convert + the converted object + + + Converts the to the type supported + by this converter. + + + + + + Interface supported by type converters + + + + This interface supports conversion from a single type to arbitrary types. + See . + + + Nicko Cadell + + + + Returns whether this converter can convert the object to the specified type + + A Type that represents the type you want to convert to + true if the conversion is possible + + + Test if the type supported by this converter can be converted to the + . + + + + + + Converts the given value object to the specified type, using the arguments + + the object to convert + The Type to convert the value parameter to + the converted object + + + Converts the (which must be of the type supported + by this converter) to the specified.. + + + + + + Supports conversion from string to type. + + + + Supports conversion from string to type. + + + + + Nicko Cadell + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to an IPAddress + the IPAddress + + + Uses the method to convert the + argument to an . + If that fails then the string is resolved as a DNS hostname. + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Valid characters in an IPv4 or IPv6 address string. (Does not support subnets) + + + + + Supports conversion from string to type. + + + + Supports conversion from string to type. + + + The string is used as the + of the . + + + + + + Nicko Cadell + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to a PatternLayout + the PatternLayout + + + Creates and returns a new using + the as the + . + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Convert between string and + + + + Supports conversion from string to type, + and from a type to a string. + + + The string is used as the + of the . + + + + + + Nicko Cadell + + + + Can the target type be converted to the type supported by this object + + A that represents the type you want to convert to + true if the conversion is possible + + + Returns true if the is + assignable from a type. + + + + + + Converts the given value object to the specified type, using the arguments + + the object to convert + The Type to convert the value parameter to + the converted object + + + Uses the method to convert the + argument to a . + + + + The object cannot be converted to the + . To check for this condition use the + method. + + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to a PatternString + the PatternString + + + Creates and returns a new using + the as the + . + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Supports conversion from string to type. + + + + Supports conversion from string to type. + + + + + + Nicko Cadell + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to a Type + the Type + + + Uses the method to convert the + argument to a . + Additional effort is made to locate partially specified types + by searching the loaded assemblies. + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Attribute used to associate a type converter + + + + Class and Interface level attribute that specifies a type converter + to use with the associated type. + + + To associate a type converter with a target type apply a + TypeConverterAttribute to the target type. Specify the + type of the type converter on the attribute. + + + Nicko Cadell + Gert Driesen + + + + The string type name of the type converter + + + + + Default constructor + + + + Default constructor + + + + + + Create a new type converter attribute for the specified type name + + The string type name of the type converter + + + The type specified must implement the + or the interfaces. + + + + + + Create a new type converter attribute for the specified type + + The type of the type converter + + + The type specified must implement the + or the interfaces. + + + + + + The string type name of the type converter + + + The string type name of the type converter + + + + The type specified must implement the + or the interfaces. + + + + + + Impersonate a Windows Account + + + + This impersonates a Windows account. + + + How the impersonation is done depends on the value of . + This allows the context to either impersonate a set of user credentials specified + using username, domain name and password or to revert to the process credentials. + + + + + + The impersonation modes for the + + + + See the property for + details. + + + + + + Impersonate a user using the credentials supplied + + + + + Revert this the thread to the credentials of the process + + + + + Default constructor + + + + Default constructor + + + + + + Gets or sets the impersonation mode for this security context + + + The impersonation mode for this security context + + + + Impersonate either a user with user credentials or + revert this thread to the credentials of the process. + The value is one of the + enum. + + + The default value is + + + When the mode is set to + the user's credentials are established using the + , and + values. + + + When the mode is set to + no other properties need to be set. If the calling thread is + impersonating then it will be reverted back to the process credentials. + + + + + + Gets or sets the Windows username for this security context + + + The Windows username for this security context + + + + This property must be set if + is set to (the default setting). + + + + + + Gets or sets the Windows domain name for this security context + + + The Windows domain name for this security context + + + + The default value for is the local machine name + taken from the property. + + + This property must be set if + is set to (the default setting). + + + + + + Sets the password for the Windows account specified by the and properties. + + + The password for the Windows account specified by the and properties. + + + + This property must be set if + is set to (the default setting). + + + + + + Initialize the SecurityContext based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + The security context will try to Logon the specified user account and + capture a primary token for impersonation. + + + The required , + or properties were not specified. + + + + Impersonate the Windows account specified by the and properties. + + caller provided state + + An instance that will revoke the impersonation of this SecurityContext + + + + Depending on the property either + impersonate a user using credentials supplied or revert + to the process credentials. + + + + + + Create a given the userName, domainName and password. + + the user name + the domain name + the password + the for the account specified + + + Uses the Windows API call LogonUser to get a principal token for the account. This + token is used to initialize the WindowsIdentity. + + + + + + Adds to + + + + Helper class to expose the + through the interface. + + + + + + Constructor + + the impersonation context being wrapped + + + Constructor + + + + + + Revert the impersonation + + + + Revert the impersonation + + + + + diff --git a/JY.Inspection/packages.config b/JY.Inspection/packages.config new file mode 100644 index 0000000..6b0d21a --- /dev/null +++ b/JY.Inspection/packages.config @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JY.Inspection/外观检测.ico b/JY.Inspection/外观检测.ico new file mode 100644 index 0000000..8301a4a Binary files /dev/null and b/JY.Inspection/外观检测.ico differ diff --git a/JY.MES/Entity/CheckBarcodeParam.cs b/JY.MES/Entity/CheckBarcodeParam.cs new file mode 100644 index 0000000..ec65139 --- /dev/null +++ b/JY.MES/Entity/CheckBarcodeParam.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.Entity +{ + /// + /// 检查条码接口参数类 + /// + public class CheckBarcodeParam + { + /// + /// 数据组集合 + /// + public DataIn data { get; set; } + /// + /// 资源编号 + /// + public string resourceNo { get; set; } + + } + public class DataIn + { + /// + /// 系统编号 + /// + public string systemCode { get; set; } + /// + /// 产线编号 + /// + public string houseCode { get; set; } + /// + /// 条码 + /// + public string skuCode { get; set; } + /// + /// 设备号 + /// + public string deviceCode { get; set; } + /// + /// 工序号 + /// + public string processCode { get; set; } + + + /// + /// 状态反馈结果 + /// + public string statusCode { get; set; } + /// + /// 返回说明信息 + /// + public string stautsMessage { get; set; } + } + +} diff --git a/JY.MES/Entity/CheckBarcodeResult.cs b/JY.MES/Entity/CheckBarcodeResult.cs new file mode 100644 index 0000000..1b0ab81 --- /dev/null +++ b/JY.MES/Entity/CheckBarcodeResult.cs @@ -0,0 +1,29 @@ +using JY.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.Entity +{ + + /// + /// 检查条码接口结果类 + /// + public class CheckBarcodeResult : RequestResult + { + /// + /// 返回的数据 + /// + public string data { get; set; } + /// + /// 状态 + /// + public string status { get; set; } + /// + /// code代码 + /// + public int code { get; set; } + } +} diff --git a/JY.MES/Entity/EqpStatusParam.cs b/JY.MES/Entity/EqpStatusParam.cs new file mode 100644 index 0000000..e6856e5 --- /dev/null +++ b/JY.MES/Entity/EqpStatusParam.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.Entity +{ + /// + /// 设备状态上传接口参数类 + /// + public class StatusData + { + /// + /// + /// + public string deviceNo { get; set; } + /// + /// + /// + public string deviceState { get; set; } + /// + /// + /// + public string stateCode { get; set; } + /// + /// + /// + public string createTime { get; set; } + } + + public class EqpStatusParam + { + /// + /// + /// + public StatusData statusdata { get; set; } + /// + /// + /// + public string resourceNo { get; set; } + } + +} diff --git a/JY.MES/Entity/EqpStatusResult.cs b/JY.MES/Entity/EqpStatusResult.cs new file mode 100644 index 0000000..b2722e7 --- /dev/null +++ b/JY.MES/Entity/EqpStatusResult.cs @@ -0,0 +1,28 @@ +using JY.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.Entity +{ + /// + /// 设备状态上传接口结果类 + /// + public class EqpStatusResult : RequestResult + { + /// + /// 返回的数据 + /// + public string data { get; set; } + /// + /// 状态 + /// + public string status { get; set; } + /// + /// code代码 + /// + public int code { get; set; } + } +} diff --git a/JY.MES/Entity/UploadAlarmParam.cs b/JY.MES/Entity/UploadAlarmParam.cs new file mode 100644 index 0000000..51ad517 --- /dev/null +++ b/JY.MES/Entity/UploadAlarmParam.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.Entity +{ + /// + /// 报警数据上传接口参数类 + /// + public class AlarmMesData + { + /// + /// + /// + public string deviceNo { get; set; } + /// + /// + /// + public string alarmCode { get; set; } + /// + /// + /// + public string alarmType { get; set; } + /// + /// + /// + public string alarmName { get; set; } + /// + /// + /// + public string createTime { get; set; } + } + + public class UploadAlarmParam + { + /// + /// + /// + public AlarmMesData alarmMesData { get; set; } + /// + /// + /// + public string resourceNo { get; set; } + } + +} diff --git a/JY.MES/Entity/UploadAlarmResult.cs b/JY.MES/Entity/UploadAlarmResult.cs new file mode 100644 index 0000000..3553da0 --- /dev/null +++ b/JY.MES/Entity/UploadAlarmResult.cs @@ -0,0 +1,28 @@ +using JY.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.Entity +{ + /// + /// 报警数据上传接口结果类 + /// + public class UploadAlarmResult : RequestResult + { + /// + /// 返回的数据 + /// + public string data { get; set; } + /// + /// 状态 + /// + public string status { get; set; } + /// + /// code代码 + /// + public int code { get; set; } + } +} diff --git a/JY.MES/Entity/UploadTestDataParam.cs b/JY.MES/Entity/UploadTestDataParam.cs new file mode 100644 index 0000000..9acd97b --- /dev/null +++ b/JY.MES/Entity/UploadTestDataParam.cs @@ -0,0 +1,421 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.Entity +{ + public class Surface1 + { + /// + /// 检测面1设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class Surface2 + { + /// + /// 检测面1设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class Surface3 + { + /// + /// 检测面1设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class Surface4 + { + /// + /// 检测面1设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class Surface5 + { + /// + /// 检测面1设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class Surface6 + { + /// + /// 检测面1设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class Surface7 + { + /// + /// 检测面1设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class Surface8 + { + /// + /// 检测面1设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class Surface9 + { + /// + /// 检测面1设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class Surface10 + { + /// + /// 检测面1设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class Surface11 + { + /// + /// 检测面1设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class Surface12 + { + /// + /// 检测面1设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class Surface13 + { + /// + /// 检测面1设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class Surface14 + { + /// + /// 检测面1设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class Other + { + /// + /// 其他设备 + /// + public string device { get; set; } + /// + /// + /// + public string checkResult { get; set; } + } + + public class DataItem + { + #region 原来 + /// + /// 进站时间 + /// + public string inStation { get; set; } + /// + /// 出站时间 + /// + public string outStation { get; set; } + /// + /// 外观检测 + /// + public string deviceNo { get; set; } + /// + /// 电芯条码 + /// + public string cellBarCode { get; set; } + /// + /// 检测面1结果 + /// + public Surface1 surface1 { get; set; } + /// + /// 检测面2结果 + /// + public Surface2 surface2 { get; set; } + /// + /// + /// + public Surface3 surface3 { get; set; } + /// + /// + /// + public Surface4 surface4 { get; set; } + /// + /// + /// + public Surface5 surface5 { get; set; } + /// + /// + /// + public Surface6 surface6 { get; set; } + /// + /// + /// + public Surface7 surface7 { get; set; } + /// + /// + /// + public Surface8 surface8 { get; set; } + /// + /// + /// + public Surface9 surface9 { get; set; } + /// + /// + /// + public Surface10 surface10 { get; set; } + /// + /// + /// + public Surface11 surface11 { get; set; } + /// + /// + /// + public Surface12 surface12 { get; set; } + /// + /// + /// + public Surface13 surface13 { get; set; } + /// + /// + /// + public Surface14 surface14 { get; set; } + /// + /// + /// + public Other other { get; set; } + /// + /// 电芯状态 正常:100 异常:231 + /// + public int cellState { get; set; } + /// + /// 错误编码 + /// + public string errorCode { get; set; } + /// + /// 备注 + /// + public string remark { get; set; } + /// + /// 是否复测 1复测 0是正常 + /// + public int retest { get; set; } + /// + /// 班次 + /// + public string workShift { get; set; } + ///// + ///// 工序编码 + ///// + //public string processCode { get; set; } + #endregion + + /// + /// 系统编号 + /// + public string systemCode { get; set; } + /// + /// 产线编号 + /// + public string houseCode { get; set; } + /// + /// 条码 + /// + public string skuCode { get; set; } + /// + /// 设备号 + /// + public string deviceCode { get; set; } + /// + /// 工序号 + /// + public string processCode { get; set; } + /// + /// 电芯结果 + /// + public string testResult { get; set; } + /// + /// ng代码 + /// + public string ngCode { get; set; } + /// + /// 工序数据集 + /// + public string processData { get; set; } + + + + /// + /// 进站时间 + /// + public string inTime { get; set; } + /// + /// 出站时间 + /// + public string outTime { get; set; } + /// + /// 参数判定结果 + /// + public string cspdjg { get; set; } + /// + /// 测试时间 + /// + public string cssj { get; set; } + /// + /// 测试批次 + /// + public string cspc { get; set; } + /// + /// 测试结果 + /// + public string csjg { get; set; } + /// + /// 复测标记 + /// + public string fcbj { get; set; } + /// + /// 复测次数 + /// + public string fccs { get; set; } + /// + /// 复测时间 + /// + public string fcsj { get; set; } + /// + /// 复测原因 + /// + public string fcyy { get; set; } + /// + /// NG原因 + /// + public string ngyy { get; set; } + /// + /// NG时间 + /// + public string ngsj { get; set; } + /// + /// NG位置 + /// + public string ngwz { get; set; } + /// + /// 环境温度 + /// + public string hjwd { get; set; } + /// + /// 环境湿度 + /// + public string hjsd { get; set; } + /// + /// 空气洁净度 + /// + public string kqjjd { get; set; } + + + /// + /// 状态反馈结果 + /// + public string statusCode { get; set; } + /// + /// 返回说明信息 + /// + public string stautsMessage { get; set; } + + } + + /// + /// 电芯出站数据 + /// + public class UploadTestDataParam + { + /// + /// + /// + public List data { get; set; } + /// + /// + /// + public string resourceNo { get; set; } + } + +} diff --git a/JY.MES/Entity/UploadTestDataResult.cs b/JY.MES/Entity/UploadTestDataResult.cs new file mode 100644 index 0000000..37fd21f --- /dev/null +++ b/JY.MES/Entity/UploadTestDataResult.cs @@ -0,0 +1,28 @@ +using JY.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.Entity +{ + /// + /// 测试结果上传接口结果类 + /// + public class UploadTestDataResult : RequestResult + { + /// + /// 返回的数据 + /// + public string data { get; set; } + /// + /// 状态 + /// + public string status { get; set; } + /// + /// code代码 + /// + public int code { get; set; } + } +} diff --git a/JY.MES/FMS/FMS_Alarm.cs b/JY.MES/FMS/FMS_Alarm.cs new file mode 100644 index 0000000..ba05c7f --- /dev/null +++ b/JY.MES/FMS/FMS_Alarm.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.FMS +{ + public class FMS_Alarm + { + /// + /// 系统编号 + /// + public string systemCode { get; set; } + /// + /// 产线编号 + /// + public string houseCode { get; set; } + /// + /// 设备编号 + /// + public string equipNum { get; set; } + /// + /// 库位ID + /// + public string seatId { get; set; } + /// + /// 采集时间 + /// + public string recordDate { get; set; } + /// + /// 唯一标识符号 + /// + public string guid { get; set; } + /// + /// 报警消除时间 + /// + public string alarmEndTime { get; set; } + /// + /// 报警类型 + /// + public string alarmType { get; set; } + /// + /// 报警名称 + /// + public string alarmName { get; set; } + /// + /// 报警开始时间 + /// + public string alarmStartTime { get; set; } + /// + /// 故障代码 + /// + public string faultCode { get; set; } + } +} diff --git a/JY.MES/FMS/FMS_Materialln.cs b/JY.MES/FMS/FMS_Materialln.cs new file mode 100644 index 0000000..665837e --- /dev/null +++ b/JY.MES/FMS/FMS_Materialln.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.FMS +{ + public class FMS_Materialln + { + /// + /// 系统编号 + /// + public string systemCode { get; set; } + /// + /// 产线编号 + /// + public string houseCode { get; set; } + /// + /// 电芯条码 + /// + public string skuCode { get; set; } + /// + /// 设备号 + /// + public string deviceCode { get; set; } + /// + /// 工序号 + /// + public string processCode { get; set; } + } +} diff --git a/JY.MES/FMS/FMS_Status.cs b/JY.MES/FMS/FMS_Status.cs new file mode 100644 index 0000000..b76f3ae --- /dev/null +++ b/JY.MES/FMS/FMS_Status.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.FMS +{ + public class FMS_Status + { + /// + /// 系统编号 + /// + public string systemCode { get; set; } + /// + /// 产线编号 + /// + public string houseCode { get; set; } + /// + /// 设备编号 + /// + public string equipNum { get; set; } + /// + /// 库位ID + /// + public string seatId { get; set; } + /// + /// 采集时间 + /// + public string recordDate { get; set; } + /// + /// 设备状态 + /// + public string statusCode { get; set; } + /// + /// 状态变更时间 + /// + public string uploadTime { get; set; } + /// + /// 唯一标识符号 + /// + public string guid { get; set; } + } +} diff --git a/JY.MES/FMS/MesHelper_EVE.cs b/JY.MES/FMS/MesHelper_EVE.cs new file mode 100644 index 0000000..52b328e --- /dev/null +++ b/JY.MES/FMS/MesHelper_EVE.cs @@ -0,0 +1,529 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + + +namespace JY.MES.FMS +{ + public class MesHelper_EVE + { + /// + /// 接口地址 + /// + public string UserVerifyUrl = "http://10.6.1.155/core/api/public/equipment/base/user/login/verify"; + //public static string InboundUrl = "http://10.6.1.155/core/api/public/in/station/process/true"; + //public string OutboundUrl = "http://10.6.1.155/core/api/public/out/station/process/true"; + public string ProductParamUrl = "http://10.6.1.155/core/api/public/product/process/param/result"; + public string EquipmentStatusUrl = "http://10.6.1.155/core/api/public/eve/pm/eqm/run/status/operation"; + public string AlarmStatusUrl = "http://10.6.1.155/core/api/public/equipment/alarm/currency"; + public string GetRecipeUrl = "http://10.6.1.155/core/api/public/param/set/request"; + public string UnloadRecipeUrl = "http://10.6.1.155/core/api/public/api/public/param/setting/change"; + + + public string 电芯入站 = "http://192.168.1.11:30030/fms/restful/api/v3/process/CheckMaterialStatus"; + public string 电芯出站 = "http://192.168.1.11:30030/fms/restful/api/v3/process/MaterialEX"; + public string 设备状态 = "http://192.168.1.11:30030/fms/restful/api/v3/device/uploadDeviceStatus"; + public string 报警 = "http://192.168.1.11:30030/fms/restful/api/v3/device/uploadDeviceError"; + + + public static string InboundUrl = "http://192.168.1.11:30030/fms/restful/api/v3/process/CheckMaterialStatus"; + public static string OutboundUrl = "http://192.168.1.11:30030/fms/restful/api/v3/process/MaterialEX"; + public static string StatusUrl = "http://192.168.1.11:30030/fms/restful/api/v3/device/uploadDeviceStatus"; + public static string AlarmUrl = "http://192.168.1.11:30030/fms/restful/api/v3/device/uploadDeviceError"; + public static string MateriallnStationeUrl = "http://192.168.1.11:30030/fms/restful/api/v3/inventory/materiallnStatione"; + + /// + /// 超时 + /// + public int _TimeOut = 3000; + /// + /// 凭证 + /// + //public Credentials Credentials { get; set; } + MesRequestAndRespondParam mrrp = new MesRequestAndRespondParam(); + /// + /// 初始标记为false(离线文件标记) + /// + public static bool WriteState { get; set; } = false; + + public static List listSource = new List(); + + ///// + ///// 提交登录窗口填写的信息,登录MES + ///// + ///// + ///// + //public MesRespondParam.MesResult MesPost(T t, int Type) where T : class + //{ + // var Start = DateTime.Now; + // MesRespondParam.MesResult _mesResult = new MesRespondParam.MesResult(); + // try + // { + // //等待7秒,如果超过7秒未收到MES返回消息,视为超时 + // new Task(() => + // { + // if ((DateTime.Now - Start).TotalMilliseconds > 7000) + // { + // _mesResult.code = "-9999"; + // _mesResult.message = "交互超时"; + // _mesResult.success = false; + // } + + // }).Start(); + + // var json = JsonHelper.SerializeObject(t); + + // if (Type == 0) + // { + // Addlo.WriteEorr($@"【向服务端发送信息】: {Convert.ToString(json)}", "测试日志", "入站服务端数据", Type: "UTF-8"); + // } + // else + // { + // SysLog.WriteEorr($@"【向服务端发送信息】: {Convert.ToString(json)}", "测试日志", "出站服务端数据", Type: "UTF-8"); + // } + + // string jsnstr = PostWebRequest(Type == 0 ? 电芯入站 : 电芯出站, json, Type == 0 ? "入站" : "出站"); //request.GetJsonResponse(UserVerifyUrl, JsonHelper.SerializeObject(mParam)); + // _mesResult = JsonHelper.DeserializeJsonToObject(jsnstr); + + // if (Type == 0) + // { + // SysLog.WriteEorr($@"【接收服务端返回信息】: {Convert.ToString(jsnstr)}", "测试日志", "入站服务端数据", Type: "UTF-8"); + // } + // else + // { + // SysLog.WriteEorr($@"【接收服务端返回信息】: {Convert.ToString(jsnstr)}", "测试日志", "出站服务端数据", Type: "UTF-8"); + // } + // } + // catch (Exception ex) + // { + // _mesResult.code = "-404"; + // _mesResult.message = ex.Message; + // _mesResult.success = false; + // } + // return _mesResult; + //} + + /// + /// 容量分档 + /// + /// + /// + public static MesReturnParam.MesResult FMS_MateriallnStatione(FMS_Materialln mParam) + { + MesReturnParam.MesResult _mesResult = new FMS.MesReturnParam.MesResult(); + try + { + string jsnstr = PostWebRequest(MateriallnStationeUrl, Newtonsoft.Json.JsonConvert.SerializeObject(mParam)); + _mesResult = Newtonsoft.Json.JsonConvert.DeserializeObject(jsnstr); + } + catch (Exception ex) + { + _mesResult.statusCode = -9999; + _mesResult.statusMessage = ex.Message; + + } + return _mesResult; + } + + /// + /// 产品进站 + /// + /// + /// + public static MesReturnParam.MesResult MES_Inbound(FMS_In mParam) + { + MesReturnParam.MesResult _mesResult = new FMS.MesReturnParam.MesResult(); + try + { + string jsnstr = PostWebRequest(InboundUrl, Newtonsoft.Json.JsonConvert.SerializeObject(mParam)); + _mesResult = Newtonsoft.Json.JsonConvert.DeserializeObject(jsnstr); + } + catch (Exception ex) + { + _mesResult.statusCode = -9999; + _mesResult.statusMessage = ex.Message; + + } + return _mesResult; + } + /// + /// 产品出站 + /// + /// + /// + public static MesRequestAndRespondParam.MesRespondParam.MesResult MES_Outbound(FMS_Out mParam) + { + MesRequestAndRespondParam.MesRespondParam.MesResult _mesResult = new MesRequestAndRespondParam.MesRespondParam.MesResult(); + string jsnstr = PostWebRequest(OutboundUrl, Newtonsoft.Json.JsonConvert.SerializeObject(mParam)); + + try + { + if (jsnstr.Contains("【链接异常】")) + { + //异常视为离线,如果离线,则将数据保存到本地 + SaveOutlineData(jsnstr); + } + _mesResult = Newtonsoft.Json.JsonConvert.DeserializeObject(jsnstr); + } + catch (Exception ex) + { + _mesResult.statusCode = -9999; + _mesResult.statusMessage = ex.Message; + } + return _mesResult; + } + + + /// + /// 设备状态上传MES + /// + /// + /// + public static MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond MES_Status(FMS_Status mParam) + { + //string jsnstr = PostHelper.HttpPostJsonAPI1(StatusUrl, Newtonsoft.Json.JsonConvert.SerializeObject(mParam)); + //return Newtonsoft.Json.JsonConvert.DeserializeObject(jsnstr); + + MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond _mesResult = new MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond(); + try + { + string jsnstr = PostWebRequest(StatusUrl, Newtonsoft.Json.JsonConvert.SerializeObject(mParam)); + _mesResult = Newtonsoft.Json.JsonConvert.DeserializeObject(jsnstr); + } + catch (Exception ex) + { + _mesResult.code = "-9999"; + _mesResult.message = ex.Message; + _mesResult.success = "失败"; + _mesResult.category = ""; + } + return _mesResult; + } + + /// + /// 报警上传MES + /// + /// + /// + public static MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond MES_Alarm(FMS_Alarm mParam) + { + + //string jsnstr = PostHelper.HttpPostJsonAPI1(AlarmUrl, Newtonsoft.Json.JsonConvert.SerializeObject(mParam)); + //return Newtonsoft.Json.JsonConvert.DeserializeObject(jsnstr); + + MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond _mesResult = new MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond(); + try + { + string jsnstr = PostWebRequest(AlarmUrl, Newtonsoft.Json.JsonConvert.SerializeObject(mParam)); + _mesResult = Newtonsoft.Json.JsonConvert.DeserializeObject(jsnstr); + } + catch (Exception ex) + { + _mesResult.code = "-9999"; + _mesResult.message = ex.Message; + _mesResult.success = "失败"; + _mesResult.category = ""; + } + return _mesResult; + } + + ///// + ///// 加工参数采集 + ///// + ///// + ///// + //public MesRequestAndRespondParam.MesRespondParam.MesResult MES_ProductParaColloctUniversal(MesRequestAndRespondParam.MesRequestParam.ProductDataRequest mParam) + //{ + // MesRequestAndRespondParam.MesRespondParam.MesResult _mesResult = new MesRequestAndRespondParam.MesRespondParam.MesResult(); + // string jsnstPostWebRequestr = (ProductParamUrl, JsonHelper.SerializeObject(mParam)); + + // try + // { + // _mesResult = JsonHelper.DeserializeJsonToObject(jsnstr); + // } + // catch (Exception ex) + // { + // _mesResult.code = "-9999"; + // _mesResult.message = ex.Message; + // _mesResult.success = false; + // } + // return _mesResult; + //} + /// + /// 加工参数采集(手动或离线传入上传内容) + /// + /// + /// + //public MesRequestAndRespondParam.MesRespondParam.MesResult MES_ProductParaColloctUniversal(string JsString) + //{ + // MesRequestAndRespondParam.MesRespondParam.MesResult _mesResult = new MesRequestAndRespondParam.MesRespondParam.MesResult(); + // try + // { + // string jsnstr = JsString; + // _mesResult = JsonHelper.DeserializeJsonToObject(jsnstr); + // } + // catch (Exception ex) + // { + // _mesResult.code = "-9999"; + // _mesResult.message = ex.Message; + // _mesResult.success = false; + // } + // return _mesResult; + + //} + + ///// + ///// 设备状态采集 + ///// + ///// + ///// + //public MesRespondParam.MesResult MES_EquipStatusCollect(MesRequestParam.EquipStatusRequest mParam) + //{ + // MesRespondParam.MesResult _mesResult = new MesRespondParam.MesResult(); + // try + // { + // string jsnstr = PostWebRequest(EquipmentStatusUrl, JsonHelper.SerializeObject(mParam)); + // _mesResult = JsonHelper.DeserializeJsonToObject(jsnstr); + // } + // catch (Exception ex) + // { + // _mesResult.code = "-9999"; + // _mesResult.message = ex.Message; + // _mesResult.success = false; + // } + // return _mesResult; + //} + ///// + ///// 设备报警采集 + ///// + ///// + ///// + //public MesRespondParam.MesResult MES_Alarm(MesRequestParam.AlarmRequest mParam) + //{ + // MesRespondParam.MesResult _mesResult = new MesRespondParam.MesResult(); + // try + // { + // string jsnstr = PostWebRequest(AlarmStatusUrl, JsonHelper.SerializeObject(mParam)); + // _mesResult = JsonHelper.DeserializeJsonToObject(jsnstr); + // } + // catch (Exception ex) + // { + // _mesResult.code = "-9999"; + // _mesResult.message = ex.Message; + // _mesResult.success = false; + // } + // return _mesResult; + //} + /// + /// 配方修改上传 + /// + /// + /// + //public MesRespondParam.MesResult MES_UploadRecipe(MesRequestParam.SetRecipeRequest mParam) + //{ + // MesRespondParam.MesResult _mesResult = new MesRespondParam.MesResult(); + // try + // { + // string jsnstr = PostWebRequest(UnloadRecipeUrl, JsonHelper.SerializeObject(mParam)); + // _mesResult = JsonHelper.DeserializeJsonToObject(jsnstr); + // } + // catch (Exception ex) + // { + // _mesResult.code = "-9999"; + // _mesResult.message = ex.Message; + // _mesResult.success = false; + // } + // return _mesResult; + //} + ///// + ///// 配方下载 + ///// + ///// + ///// + //public MesRespondParam.GetRecipeRespond MES_GetRecipe(MesRequestParam.GetRecipeRequest mParam) + //{ + // MesRespondParam.GetRecipeRespond _mesResult = new MesRespondParam.GetRecipeRespond(); + // try + // { + // string jsnstr = PostWebRequest(GetRecipeUrl, JsonHelper.SerializeObject(mParam)); + // _mesResult = JsonHelper.DeserializeJsonToObject(jsnstr); + // } + // catch (Exception ex) + // { + // _mesResult.code = "-9999"; + // _mesResult.message = ex.Message; + // _mesResult.success = false; + // } + // return _mesResult; + //} + #region 公共 + + + /// + /// Post数据接口 + /// + /// 接口地址 + /// 提交json数据 + /// 编码方式(Encoding.UTF8) + /// + public static string PostWebRequest(string postUrl, string paramData, string SockAction = "") + { + string responseContent = string.Empty; + try + { + string TypeName = string.Empty; + if (SockAction.Contains("入站")) + { + TypeName = "入站操作"; + } + else + { + TypeName = "出站操作"; + } + + byte[] byteArray = Encoding.UTF8.GetBytes(paramData); //转化 + HttpWebRequest webReq = (HttpWebRequest)WebRequest.Create(new Uri(postUrl)); + //webReq.Timeout = _TimeOut; + webReq.Method = "POST"; + webReq.ContentType = "application/json;charset=UTF-8"; + //webReq.ContentType = "application/x-www-form-urlencoded;charset=UTF-8"; + //webReq.ContentLength = byteArray.Length; + if (SockAction.Length > 0) + webReq.Headers.Add("SOAPAction", SockAction); + //if (this.Credentials != null) + { + //(2)设置Headers Authorization + webReq.Headers.Add("Authorization", "Basic " /*+ Convert.ToBase64String(Encoding.UTF8.GetBytes($"{Credentials.UserName}:{Credentials.Password}"))*/); + } + //webReq.CookieContainer = new CookieContainer(); + //webReq.ContentType = "application/json;"; + + ////(1)设置请求Credentials + //CredentialCache credentialCache = new CredentialCache(); + //credentialCache.Add(new Uri("接口地址"), "Basic", new NetworkCredential("用户名", "密码")); + //webReq.Credentials = credentialCache; + + using (Stream reqStream = webReq.GetRequestStream()) + { + StreamWriter mySwrite = new StreamWriter(reqStream, Encoding.GetEncoding("UTF-8")); + mySwrite.Write(paramData);//写入参数 + mySwrite.Close(); + } + + using (HttpWebResponse response = (HttpWebResponse)webReq.GetResponse()) + { + var code = response.StatusCode.ToString(); + + //在这里对接收到的页面内容进行处理 + using (StreamReader sr = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("UTF-8"))) + { + responseContent = sr.ReadToEnd().ToString(); + } + } + } + catch (WebException ex) + { + //SysLog.WriteEorr("【操作异常】:" + ex.Message.ToString() + "---------" + ex.StackTrace.ToString(), "测试日志", "服务端数据"); + return ex.Message + "【链接异常】"; + } + //catch ( Exception ex) + //{ + // return "连接远程服务器出错"; ; + //} + return responseContent; + } + /// + /// + /// + /// 目标url + /// 要发送的post字符串 + /// 接收后返回值 + public string PostXML(string url, string strPost) + { + + string result = string.Empty; + //生成文件流 + byte[] buffer = Encoding.UTF8.GetBytes(strPost); + //向流中写字符串 + StreamWriter mywriter = null; + //根据url创建请求对象 + HttpWebRequest objrequest = (HttpWebRequest)WebRequest.Create(url); + + //设置发送方式 + objrequest.Method = "POST"; + //提交长度 + objrequest.ContentLength = buffer.Length; + //发送内容格式 + objrequest.ContentType = "text/xml;charset=UTF-8"; + objrequest.Timeout = _TimeOut; + try + { + mywriter = new StreamWriter(objrequest.GetRequestStream()); + mywriter.Write(strPost); + mywriter.Close(); + HttpWebResponse objresponse; + + try + { + //读取服务器返回信息 + objresponse = (HttpWebResponse)objrequest.GetResponse(); + + } + catch (WebException EX) + { + + objresponse = (HttpWebResponse)EX.Response; + + } + using (StreamReader sr = new StreamReader(objresponse.GetResponseStream())) + { + result = sr.ReadToEnd(); + sr.Close(); + } + } + catch (Exception ex) + { + result = "发送文件流失败!"; + + } + + return result; + } + #endregion + + + + /// + /// 当MES离线时,保存上传数据(MrLin) + /// + /// + private static void SaveOutlineData(string requestJson) + { + //每次创建一个新的文件文本 + string logSite = $@"D:\MESData\ErrData{DateTime.Now.ToString("ffffff")}.txt"; + try + { + WriteState = false; + //防止重复数据存入本地的判断 + if (!listSource.Contains(requestJson)) + { + //SysLog.WriteContext(requestJson, logSite); + //写入记录之后将数据存入到本地结合,防止重复数据存入到本地文件 + listSource.Add(requestJson); + } + + //文件写完标记 + WriteState = true; + } + catch (Exception err) + { + //string str = SysLog.ReadContext(logSite) + "\r\n" + ""; + WriteState = true; + } + } + } +} diff --git a/JY.MES/FMS/MesRequestAndRespondParam.cs b/JY.MES/FMS/MesRequestAndRespondParam.cs new file mode 100644 index 0000000..fbecf3c --- /dev/null +++ b/JY.MES/FMS/MesRequestAndRespondParam.cs @@ -0,0 +1,564 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.FMS +{ + public class MesRequestAndRespondParam + { + /// + /// MES请求对象 + /// + public class MesRequestParam + { + #region 登录 + /// + /// 操作员登录参数 + /// + public class UserVerifyRequest + { + /// + /// :站点;必填 + /// + public string siteCode { get; set; } + /// + /// :设备;必填 + /// + public string equipNum { get; set; } + /// + /// 产线编号 + /// + public string lineCode { get; set; } + /// + /// :用户;必填 + /// + public string userName { get; set; } + /// + /// :密码;必填 + /// + public string passWord { get; set; } + } + + #endregion + + #region 进站 + + /// + /// 产品进站信息 + /// + public class InStationRequest + { + /// + /// 系统编号(上位机代号);必填 + /// + public string systemCode { get; set; } + /// + /// 产线编号 + /// + public string houseCode { get; set; } + /// + /// :设备号;必填 + /// + public string deviceCode { get; set; } + /// + /// :工序号;必填 + /// + public string processCode { get; set; } + /// + /// :工序号;必填 + /// + public string skuCode { get; set; } + /// + /// :电芯结果;必填 + /// + public string testResult { get; set; } + /// + /// :NG代码;必填 + /// + public string ngCode { get; set; } + /// + /// :工序数据集;必填 + /// + public string processData { get; set; } + + + } + + #endregion + + #region 出站 + /// 产品出站参数 + /// + public class OutStationRequest + { + /// + /// + /// :站点;必填 + /// + public string siteCode { get; set; } + /// + /// 产线编号 + /// + public string lineCode { get; set; } + /// + /// :设备;必填 + /// + public string equipNum { get; set; } + /// + /// :用户;必填 + /// + public string userName { get; set; } + /// + ///工单生成的物料号 + /// + public string materialCode { get; set; } + /// + /// :生产类型;(非必输) + /// + public string productType { get; set; } + /// + /// :完工数量;(非必输) + /// + public string completeQty { get; set; } + /// + /// 托盘码 + /// + public string containerCode { get; set; } + /// + /// 1:通用出站(默认);2:其他待定; + /// + public int type { get; set; } = 1; + + /// + /// 产品信息结构体 + /// + public List assembleLineList; + + + } + + /// + /// 出站产品信息结构体 + /// + public struct OutStationVO1 + { + /// + /// 产品条码 + /// + public string identification { get; set; } + /// + /// 质量状态 + /// + public string qualityStatus { get; set; } + /// + /// 关联条码:组装段超声焊专用,其他工序可为空 + /// + public string qrCode { get; set; } + /// + /// NG错误信息:质量状态OK不返回,质量状态NG返回具体报错消息 + /// + public string ngMessage { get; set; } + } + #endregion + + #region 产品加工参数 + /// + /// 产品结果参数:单进单出 + /// + public class ProductDataRequest + { + public string equipNum { get; set; } + public string type { get; set; } + public string payload { get; set; } + } + public class payloadDD + { + /// + /// 工厂 + /// + public string siteCode { get; set; } + /// + /// 产线 + /// + public string lineCode { get; set; } + /// + /// 物料 + /// + public string materialCode { get; set; } + /// + /// 用户 + /// + public string userName { get; set; } + /// + /// 小车号 + /// + public string carCode { get; set; } + /// + /// 采集时间 + /// + public string recordDate { get; set; } + /// + /// 条码数量 + /// + public int qty { get; set; } + /// + /// 托盘码 + /// + public string containerCode { get; set; } + public identificationParaDD identification { get; set; } + public List tagDataVOList { get; set; } + } + + public class identificationParaDD + { + /// + /// 条码 + /// + public string identification { get; set; } + /// + /// 质量状态Y/N + /// + public string qualityStatus { get; set; } + } + public class tagDataVOPara + { + public string tagCode { get; set; } = "0"; + public string tagValue { get; set; } = "0"; + public string tagTime { get; set; } + /// + /// 采集项判断结果(Y/N) + /// + public string tagCalculateResult { get; set; } + } + #endregion + + #region 设备状态 + + /// + /// 设备状态参数 + /// + public class EquipStatusRequest + { + /// + /// :站点;必填 + /// + public string siteCode { get; set; } + public string lineCode { get; set; } + /// + /// :设备;必填 + /// + public string equipNum { get; set; } + /// + /// :登录账号 + /// + public string userName { get; set; } + public string materialCode { get; set; } + /// + /// 采集时间(2019-09-11 13:13:13)(非必输) + /// + public string recordDate { get; set; } + /// + /// 设备状态 + /// + public string statusCode { get; set; } + + /// + /// 状态变更时间 + /// + public string uploadTime { get; set; } + /// + /// 故障代码(行,可以不传,可以多条,只有设备状态为故障时才需要传输) + /// + public List faultCodeList { get; set; } + } + + /// + /// 设备运行状态 + /// + + public struct faultCodes + { + public string faultCode { get; set; } + } + + #endregion + + #region 报警状态 + public class AlarmRequest + { + /// + /// :站点;必填 + /// + public string siteCode { get; set; } + public string lineCode { get; set; } + /// + /// :设备;必填 + /// + public string equipNum { get; set; } + /// + /// :登录账号 + /// + public string userName { get; set; } + public string materialCode { get; set; } + /// + /// 采集时间(2019-09-11 13:13:13)(非必输) + /// + public string recordDate { get; set; } + /// + /// 唯一标识符号 + /// + public string guid { get; set; } + public List alarmLineList { get; set; } + } + public struct AlarmLineList + { + /// + /// 报警消除时间 + /// + public string alarmEndTime { get; set; } + /// + /// 报警类型 + /// + public string alarmType { get; set; } + /// + /// 报警名称 + /// + public string alarmName { get; set; } + /// + /// 报警开始时间 + /// + public string alarmStartTime { get; set; } + /// + /// 故障代码 + /// + public string faultCode { get; set; } + } + + #endregion + + #region 配方参数修改 + /// + /// 参数修改 + /// + public class SetRecipeRequest + { + public string siteCode { get; set; } + public string lineCode { get; set; } + public string equipNum { get; set; } + public string userName { get; set; } + public string materialCode { get; set; } + /// + /// 变更时间 + /// + public string changeTime { get; set; } + /// + /// 数据组编码 + /// + public string tagGroupCode { get; set; } + /// + /// 数据组描述 + /// + public string tagGroupDescription { get; set; } + /// + /// 数据项数组 + /// + public List tagList { get; set; } + } + /// + /// 配方数据项数组对象 + /// + public struct tagList + { + /// + /// 数据项编码 + /// + public string tagCode { get; set; } + /// + /// 变更前计量单位 + /// + public string unitBefore { get; set; } + /// + /// 变更前标准值 + /// + public string standardValueBefore { get; set; } + /// + /// 变更前符合值 + /// + public string trueValueBefore { get; set; } + /// + /// 变更前不符合值 + /// + public string falseValueBefore { get; set; } + /// + /// 变更前最小值 + /// + public double minValueBefore { get; set; } + /// + /// 变更前最大值 + /// + public double maxValueBefore { get; set; } + /// + /// 变更后计量单位 + /// + public string unitAfter { get; set; } + /// + /// 变更后标准值 + /// + public string standardValueAfter { get; set; } + /// + /// 变更后符合值 + /// + public string trueValueAfter { get; set; } + /// + /// 变更后不符合值 + /// + public string falseValueAfter { get; set; } + /// + /// 变更后最小值 + /// + public double minValueAfter { get; set; } + /// + /// 变更后最大值 + /// + public double maxValueAfter { get; set; } + } + + #endregion + + #region 配方请求 + /// + /// 配方请求 + /// + public class GetRecipeRequest + { + public string siteCode { get; set; } + public string lineCode { get; set; } + public string equipNum { get; set; } + public string userName { get; set; } + public string materialCode { get; set; } + } + + #endregion + + } + /// + /// MES返回对象 + /// + public class MesRespondParam + { + #region 通用返回 + /// + /// Mes返回信息对象{"statusCode":0,"statusMessage": "该设备111找不到,请检查!"} + /// + public class MesResult + { + /// + /// 返回信息代码 0:成功 + /// + public int statusCode { get; set; } + /// + /// 返回信息 + /// + public string statusMessage { get; set; } + + } + #endregion + + #region 设备状态数据返回 + /// + /// 设备状态MES返回参数 + /// + public class GetRecipeRespond + { + /// + /// 错误代码 + /// + public string code { get; set; } + /// + /// 成功标识 + /// + public string success { get; set; } + /// + /// 数据处理消息 + /// + public string message { get; set; } + /// + /// 报错消息类型 + /// + public string category { get; set; } + + } + + #region 屏蔽 + public struct rows + { + /// + /// 数据组编码 + /// + public string tagGroupCode { get; set; } + /// + /// 数据组描述 + /// + public string tagGroupDescription { get; set; } + /// + /// 数据项数组 + /// + public List tagList { get; set; } + + } + public struct tagList + { + /// + /// 数据项编码 + /// + public string tagCode { get; set; } + /// + /// 数据项描述 + /// + public string tagDescription { get; set; } + /// + /// 数据项备注 + /// + public string tagRemark { get; set; } + /// + /// 数据类型 + /// + public string valueType { get; set; } + /// + /// 计量单位 + /// + public string unit { get; set; } + /// + /// 符合值 + /// + public double trueValue { get; set; } + /// + /// 不符合值 + /// + public double falseValue { get; set; } + /// + /// 最小值 + /// + public double minValue { get; set; } + /// + /// 最大值 + /// + public double maxValue { get; set; } + /// + /// 标准值 + /// + public double standardValue { get; set; } + + } + + #endregion + + #endregion + } + + + + } +} diff --git a/JY.MES/FMS/MesReturnParam.cs b/JY.MES/FMS/MesReturnParam.cs new file mode 100644 index 0000000..4c196d9 --- /dev/null +++ b/JY.MES/FMS/MesReturnParam.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.FMS +{ + public class MesReturnParam + { + public class MesResult + { + /// + /// 返回信息代码 0:成功 + /// + public int statusCode { get; set; } + /// + /// 返回信息 + /// + public string statusMessage { get; set; } + + } + } +} diff --git a/JY.MES/FMS/Model/FMS_In.cs b/JY.MES/FMS/Model/FMS_In.cs new file mode 100644 index 0000000..d3c01d3 --- /dev/null +++ b/JY.MES/FMS/Model/FMS_In.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.FMS +{ + public class FMS_In + { + /// + /// 系统编号 + /// + public string systemCode { get; set; } + /// + /// 产线编号 + /// + public string houseCode { get; set; } + /// + /// 电芯条码 + /// + public string skuCode { get; set; } + /// + /// 设备号 + /// + public string deviceCode { get; set; } + /// + /// 工序号 + /// + public string processCode { get; set; } + } +} diff --git a/JY.MES/FMS/Model/FMS_Out.cs b/JY.MES/FMS/Model/FMS_Out.cs new file mode 100644 index 0000000..6e34d11 --- /dev/null +++ b/JY.MES/FMS/Model/FMS_Out.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.FMS +{ + public class FMS_Out + { + public string systemCode { get; set; } + public string houseCode { get; set; } + public string skuCode { get; set; } + public string deviceCode { get; set; } + public string processCode { get; set; } + public string testResult { get; set; } + public string ngCode { get; set; } + public processData processData { get; set; } + + } + + public class processData + { + /// + /// 结果 + /// + public string testResult { get; set; } + + /// + /// 进站时间;必填 + /// + public string inTime { get; set; } + /// + /// 出站时间;必填 + /// + public string outTime { get; set; } + /// + /// 参数判定结果;必填 + /// + public string cspdjg { get; set; } + /// + /// 测试时间;必填 + /// + public string cssj { get; set; } + /// + /// 测试批次;必填 + /// + public string cspc { get; set; } + /// + /// 测试结果;必填 + /// + public string csjg { get; set; } + /// + /// 复测标记;必填 + /// + public string fcbj { get; set; } + /// + /// 复测次数;必填 + /// + public string fccs { get; set; } + /// + /// 复测时间;必填 + /// + public string fcsj { get; set; } + /// + /// 复测原因;必填 + /// + public string fcyy { get; set; } + /// + /// NG原因;必填 + /// + public string ngyy { get; set; } + /// + /// NG时间;必填 + /// + public string ngsj { get; set; } + /// + /// NG位置;必填 + /// + public string ngwz { get; set; } + /// + /// 环境温度;必填 + /// + public string hjwd { get; set; } + /// + /// 环境湿度;必填 + /// + public string hjsd { get; set; } + /// + /// 空气洁净度;必填 + /// + public string kqjjd { get; set; } + /// + /// 班次 + /// + public string workShift { get; set; } + + + } + +} diff --git a/JY.MES/JY.MES.csproj b/JY.MES/JY.MES.csproj new file mode 100644 index 0000000..62328a7 --- /dev/null +++ b/JY.MES/JY.MES.csproj @@ -0,0 +1,87 @@ + + + + + Debug + AnyCPU + {168C8644-3975-450D-94D2-29D21C135C16} + Library + Properties + JY.MES + JY.MES + v4.8 + 512 + true + + + + true + full + false + ..\..\..\..\JY.Inspection\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {F7DB3A93-FCA2-479B-8B2E-380116AAE9FC} + JY.Model + + + + + + + \ No newline at end of file diff --git a/JY.MES/MES/GradingParam.cs b/JY.MES/MES/GradingParam.cs new file mode 100644 index 0000000..9e64911 --- /dev/null +++ b/JY.MES/MES/GradingParam.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.MES +{ + /// + /// 获取电池竖表采集项值 分档查询 + /// + public class GradingParam + { + /// + /// 工厂代码 + /// + public string siteCode { get; set; } + /// + /// 产线名称 + /// + public string lineCode { get; set; } + /// + /// 设备编码 + /// + public string equipCode { get; set; } + /// + /// 物料编码 + /// + public string materialCode { get; set; } + + /// + /// 采集时间 + /// + public string recordDate { get; set; } + /// + /// 条码数量 + /// + public int qty { get; set; } + + /// + /// 操作员 + /// + public string userName { get; set; } + /// + /// 托盘码 + /// + public string containerCode { get; set; } + /// + /// 条码数组 + /// + public List materiallotCodeList { get; set; } + } + + +} diff --git a/JY.MES/MES/ProductResultParameters.cs b/JY.MES/MES/ProductResultParameters.cs new file mode 100644 index 0000000..56cbf93 --- /dev/null +++ b/JY.MES/MES/ProductResultParameters.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.MES +{ + /// + /// 结果加工参数 + /// + public class ProductResultParameters + { + /// + /// 设备编号 + /// + public string equipNum { get; set; } + /// + /// 类型 单进整出:DZ 整进整出:ZZ 单进单出:DD 未传时默认按照ZZ进行数据解析 + /// + public string type { get; set; } + /// + /// 设备数据 + /// + public string payload { get; set; } + } + + public class Payload + { + /// + /// 工厂代码 + /// + public string siteCode { get; set; } + /// + /// 产线编号 + /// + public string lineCode { get; set; } + /// + /// 员工账号 + /// + public string userName { get; set; } + /// + /// 物料编码 工单产成品物料号 + /// + public string materialCode { get; set; } + /// + /// 小车号 装载电池的小车编号 + /// + public string carCode { get; set; } + /// + /// 补录 是否属于补录数据(BL=补录,JS=及时上传) + /// + public string collection { get; set; } + /// + /// 采集时间 数据的采集时间 + /// + public string recordDate { get; set; } + /// + /// 条码数量 传入条码的个数 + /// + public int qty { get; set; } + /// + /// 装载电池的托盘编号 + /// + public string containerCode { get; set; } + /// + /// 条码对象 + /// + public IdentificationItem identification { get; set; } + /// + /// 采集数组 + /// + public List tagDataVOList { get; set; } + } + + /// + /// 条码对象 + /// + public class IdentificationItem + { + /// + /// 条码 + /// + public string identification { get; set; } + /// + /// 质量状态 各产品所有参数的整体判断结果(Y/N) + /// + public string qualityStatus { get; set; } + + } + + /// + /// 采集对象 + /// + public class TagDataVOListItem + { + /// + /// 设备每个采集项规定的编号 + /// + public string tagCode { get; set; } + /// + /// 采集值 + /// + public string tagValue { get; set; } + /// + /// 采集项采集时间 + /// + public string tagTime { get; set; } + /// + /// 各产品所有参数的整体判断结果(Y/N) + /// + public string tagCalculateResult { get; set; } + /// + /// 采集项描述 + /// + public string tagRemark { get; set; } + } +} diff --git a/JY.MES/MES/ReqArrivalStation.cs b/JY.MES/MES/ReqArrivalStation.cs new file mode 100644 index 0000000..7a526f7 --- /dev/null +++ b/JY.MES/MES/ReqArrivalStation.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.MES +{ + /// + /// 产品进站信息 + /// + + public class ReqArrivalStation + { + /// + /// 工厂代码 + /// + public string SiteCode { get; set; } + + /// + /// 产线编号 + /// + public string LineCode { get; set; } + + /// + /// 设备编号 + /// + public string EquipNum { get; set; } + + /// + /// 物料编码 + /// + public string MaterialCode { get; set; } + + /// + /// 员工账号 + /// + public string UserName { get; set; } + + /// + /// 成品条码 + /// + public string Identification { get; set; } + + /// + /// 产品类型 + /// + public string ProductType { get; set; } + } +} diff --git a/JY.MES/MES/ReqExitStation.cs b/JY.MES/MES/ReqExitStation.cs new file mode 100644 index 0000000..83c64a2 --- /dev/null +++ b/JY.MES/MES/ReqExitStation.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.MES +{ + /// + /// 产品出站 + /// + public class ReqExitStation + { + /// + /// 工厂代码 + /// + public string SiteCode { get; set; } + + /// + /// 产线编号 + /// + public string LineCode { get; set; } + + /// + /// 设备编号 + /// + public string EquipNum { get; set; } + + /// + /// 员工账号 + /// + public string UserName { get; set; } + + /// + /// 托盘码,没有托盘码可为空;A22超声波终焊作为顶盖码; + /// + public string ContainerCode { get; set; } + + /// + /// 行信息 + /// + public List AssembleLineList { get; set; } + } + + public class AssembleLine + { + /// + /// 产品条码,A22超声波终焊作为蓝胶码; + /// + public string Identification { get; set; } + + /// + /// 质量状态 + /// + public string QualityStatus { get; set; } + + /// + /// 关联条码,组装段超声焊专用,其他工序可为空 + /// + public string QrCode { get; set; } + + /// + /// NG编码,质量状态OK不返回,质量状态NG返回具体报错编码 + /// + public string[] NgCode { get; set; } + + /// + /// NG错误信息,质量状态OK不返回,质量状态NG返回具体报错消息 + /// + public string NgMessage { get; set; } + } +} diff --git a/JY.MES/MES/RespArrivalStation.cs b/JY.MES/MES/RespArrivalStation.cs new file mode 100644 index 0000000..9e2752c --- /dev/null +++ b/JY.MES/MES/RespArrivalStation.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.MES +{ + /// + /// 产品进站响应信息 + /// + public class RespArrivalStation + { + /// + /// 错误代码,成功不返回 + /// + public string Code { get; set; } + + /// + /// 成功标识,false失败 true 成功 + /// + public bool Success { get; set; } + + /// + /// 数据处理消息,成功不返回 + /// + public string Message { get; set; } + + /// + /// 报错消息类型 A:停线、B:排出、C:忽略(需警示) + /// + public string Category { get; set; } + } +} diff --git a/JY.MES/MES/RespExitStation.cs b/JY.MES/MES/RespExitStation.cs new file mode 100644 index 0000000..bf8738c --- /dev/null +++ b/JY.MES/MES/RespExitStation.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.MES.MES +{ + /// + /// 产品出站响应信息 + /// + public sealed class RespExitStation : RespArrivalStation + { + } +} diff --git a/JY.MES/MESApiHelper.cs b/JY.MES/MESApiHelper.cs new file mode 100644 index 0000000..3d0fb0d --- /dev/null +++ b/JY.MES/MESApiHelper.cs @@ -0,0 +1,41 @@ +using JY.MES.Entity; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Runtime.Serialization.Json; +using System.Text; +using System.Threading.Tasks; +using System.Web.Script.Serialization; + +namespace JY.MES +{ + /// + /// MES接口类 + /// + public class MESApiHelper + { + public static string HttpPostJsonAPI(string url, string strJosnData, double MesRequestTime) + { + MesResponse mesResponse = new MesResponse(); + try + { + StringContent stringContent = new StringContent(strJosnData, Encoding.UTF8, "application/json"); + return new HttpClient() + { + Timeout = TimeSpan.FromSeconds(MesRequestTime) + }.PostAsync(url, (HttpContent)stringContent).Result.Content.ReadAsStringAsync().Result; + } + catch (Exception ex) + { + mesResponse.success = false; + mesResponse.message = $"massage:[{ex.InnerException}],mes: [MES反馈超时或无法访间MES服务器]"; + mesResponse.error = 99; + return JsonConvert.SerializeObject(mesResponse); + } + } + } +} diff --git a/JY.MES/MesResponse.cs b/JY.MES/MesResponse.cs new file mode 100644 index 0000000..cc37939 --- /dev/null +++ b/JY.MES/MesResponse.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static JY.MES.FMS.MesRequestAndRespondParam.MesRespondParam; + +namespace JY.MES +{ + public class MesResponse + { + /// + /// 异常代码(0:正常 9:解析异常 99:MES反馈超时或无法访问MES服务器) + /// + public int error { get; set; } + /// + /// 数据处理消息 成功不返回 + /// + public string message { get; set; } + + + /// + /// 错误代码 错误代码,成功不返回 + /// + public string code { get; set; } + /// + /// 报错消息类型 A=停线,B=排出,C=忽略(需警示) + /// + public string category { get; set; } + + + /// + /// 条码及档位结果信息 + /// + public List rows { get; set; } + /// + /// 成功标识 + /// + public bool success { get; set; } + /// + /// rows列表中数据总条数 + /// + public int total { get; set; } + + public class rowsListItem + { + /// + /// 电池条码 + /// + public string identification { get; set; } + /// + /// 电池等级 + /// + public string level { get; set; } + /// + /// 电池挡位 + /// + public string rank { get; set; } + + public object passage { get; set; } + public object message { get; set; } + } + } + +} diff --git a/JY.MES/Properties/AssemblyInfo.cs b/JY.MES/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..754b26e --- /dev/null +++ b/JY.MES/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("JY.MES")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("JY.MES")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("168c8644-3975-450d-94d2-29d21c135c16")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/JY.MES/app.config b/JY.MES/app.config new file mode 100644 index 0000000..e473418 --- /dev/null +++ b/JY.MES/app.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JY.MES/packages.config b/JY.MES/packages.config new file mode 100644 index 0000000..0f3393f --- /dev/null +++ b/JY.MES/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/JY.Model/BL.Entity/Chart24HourData.cs b/JY.Model/BL.Entity/Chart24HourData.cs new file mode 100644 index 0000000..1854518 --- /dev/null +++ b/JY.Model/BL.Entity/Chart24HourData.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model +{ + /// + /// 24小时统计表数据 + /// + public class Chart24HourData + { + /// + /// 优率 + /// + public string DisplayTime { get; set; } + /// + /// 产出数 + /// + public int ProdIn { set; get; } + /// + /// 投入数 + /// + public int ProdOut { set; get; } + /// + /// 不良数量 + /// + public int ProdNg { set; get; } + /// + /// 优率 + /// + public string OKRatio { get; set; } + } +} diff --git a/JY.Model/BL.Entity/RequestResult.cs b/JY.Model/BL.Entity/RequestResult.cs new file mode 100644 index 0000000..2141d0d --- /dev/null +++ b/JY.Model/BL.Entity/RequestResult.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model +{ + /// + /// 执行结果 + /// + public class RequestResult + { + /// + /// 是否执行成功 + /// + public bool IsSuccess { get; set; } = true; + /// + /// 返回消息 + /// + public string Msg { get; set; } + } + + /// + /// 执行结果Entity,带返回值 + /// + /// + public class RequestResult : RequestResult + { + public T Result { get; set; } + } + + + /// + /// 执行结果List,带返回值 + /// + /// + public class RequestResultList : RequestResult + { + public List Result { get; set; } + } +} diff --git a/JY.Model/DB.Entity/AbnormalVoice.cs b/JY.Model/DB.Entity/AbnormalVoice.cs new file mode 100644 index 0000000..fd1ea3f --- /dev/null +++ b/JY.Model/DB.Entity/AbnormalVoice.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model +{ + /// + /// 工位报警数据 + /// + public class AbnormalVoice + { + /// + /// ID + /// + public int ID { get; set; } + /// + /// 工位编码 + /// + public string Code { get; set; } + /// + /// 播报内容 + /// + public string Remark { get; set; } + + } +} diff --git a/JY.Model/DB.Entity/AlarmData.cs b/JY.Model/DB.Entity/AlarmData.cs new file mode 100644 index 0000000..e74a9c3 --- /dev/null +++ b/JY.Model/DB.Entity/AlarmData.cs @@ -0,0 +1,73 @@ +using SqlSugar; +using System; + +namespace JY.Model +{ + [SugarTable("tb_alarm")] + /// + /// 工位报警数据 + /// + public class AlarmData + { + /// + /// 报警唯一标识符 + /// + [SugarColumn(IsPrimaryKey = true, ColumnName = "AlarmGuid")] + public string AlarmGuid { get; set; } + + /// + /// 报警地址 + /// + [SugarColumn(ColumnName = "PLCAdress")] + public string PLCAdress { get; set; } + + /// + /// 报警内容 + /// + [SugarColumn(ColumnName = "AlarmContent")] + public string AlarmContent { get; set; } + + /// + /// 报警代码 + /// + [SugarColumn(ColumnName = "AlarmCode")] + public string AlarmCode { get; set; } + + /// + /// 报警类型 停机报警/非停机报警 + /// + [SugarColumn(ColumnName = "AlarmType")] + public string AlarmType { get; set; } + + /// + /// 报警开始时间 + /// + [SugarColumn(ColumnName = "StartTime")] + public DateTime StartTime { get; set; } + + /// + /// 报警消除时间 + /// + [SugarColumn(ColumnName = "EndTime")] + public DateTime EndTime { get; set; } + + /// + /// 报警描述 + /// + [SugarColumn(ColumnName = "AlarmDesc")] + public string AlarmDesc { get; set; } + + + /// + /// 报警状态 传1或0,1是开始报警,0结束报警 + /// + [SugarColumn(ColumnName = "AlarmState")] + public string AlarmState { get; set; } + + /// + /// 更新状态 + /// + [SugarColumn(ColumnName = "Flag")] + public int Flag { get; set; } + } +} diff --git a/JY.Model/DB.Entity/BlankingData.cs b/JY.Model/DB.Entity/BlankingData.cs new file mode 100644 index 0000000..f4fb354 --- /dev/null +++ b/JY.Model/DB.Entity/BlankingData.cs @@ -0,0 +1,200 @@ +using CsvHelper.Configuration.Attributes; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model +{ + /// + /// 下料数据 + /// + [SugarTable("BlankingData")] + public class BlankingData + { + [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "ID")] + [Name("ID")] + public int ID { set; get; } + /// + /// 通道 + /// + /// + [SugarColumn(ColumnName = "TD")] + [Name("通道")] + public int TD { set; get; } + /// + /// 班次 + /// + /// + [SugarColumn(ColumnName = "WorkShift")] + [Name("班次")] + public string WorkShift { set; get; } + /// + /// 入站条码 + /// + [SugarColumn(ColumnName = "ArrivalBarCode")] + [Name("入站条码")] + public string ArrivalBarCode { set; get; } + /// + /// 出站条码 + /// + /// + [SugarColumn(ColumnName = "DepartureBarCode")] + [Name("出站条码")] + public string DepartureBarCode { set; get; } + + /// + /// 条码对比 + /// + [SugarColumn(ColumnName = "TMDB")] + [Name("条码对比")] + public string TMDB { get; set; } + + /// + /// 出站时间 + /// + [SugarColumn(ColumnName = "OutTime")] + [Name("出站时间")] + public string OutTime { set; get; } + + /// + /// 正面(2W/3W) + /// + [SugarColumn(ColumnName = "CCD1")] + [Name("正面(2W/3W)")] + public string CCD1 { set; get; } + + /// + /// 反面(2W/3W)结果1 + /// + [SugarColumn(ColumnName = "CCD2")] + [Name("反面(2W/3W)结果1")] + public string CCD2 { set; get; } + + /// + /// 左侧面(2W/3W)结果1 + /// + [SugarColumn(ColumnName = "CCD3")] + [Name("左侧面(2W/3W)结果1")] + public string CCD3 { set; get; } + + /// + /// 右侧面(2W/3W)结果1 + /// + [Name("右侧面(2W/3W)结果1")] + [SugarColumn(ColumnName = "CCD4")] + public string CCD4 { set; get; } + + /// + /// 顶面(2W/3W)结果1 + /// + [SugarColumn(ColumnName = "CCD5")] + [Name("顶面(2W/3W)结果1")] + public string CCD5 { set; get; } + + /// + /// 底面(2W/3W)结果1 + /// + [SugarColumn(ColumnName = "CCD6")] + [Name("底面(2W/3W)结果1")] + public string CCD6 { set; get; } + + /// + /// 底WE1结果1 + /// + [SugarColumn(ColumnName = "CCD7")] + [Name("底WE1结果1")] + public string CCD7 { set; get; } + /// + /// 底WE1结果1 + /// + [Name("底WE2结果1")] + [SugarColumn(ColumnName = "CCD8")] + public string CCD8 { set; get; } + /// + /// 底WE3结果1 + /// + [Name("底WE3结果1")] + public string CCD9 { set; get; } + /// + /// 底WE4结果1 + /// + [Name("底WE4结果1")] + [SugarColumn(ColumnName = "CCD10")] + public string CCD10 { set; get; } + /// + /// 中ME1结果1 + /// + [Name("中ME1结果1")] + [SugarColumn(ColumnName = "CCD11")] + public string CCD11 { set; get; } + /// + /// 中ME2结果1 + /// + [Name("中ME2结果1")] + [SugarColumn(ColumnName = "CCD12")] + public string CCD12 { set; get; } + /// + /// 中ME3结果1 + /// + [Name("中ME3结果1")] + [SugarColumn(ColumnName = "CCD13")] + public string CCD13 { set; get; } + /// + /// 中ME4结果1 + /// + [Name("中ME4结果1")] + [SugarColumn(ColumnName = "CCD14")] + public string CCD14 { set; get; } + /// + /// 极柱(POS/NEG)结果1 + /// + [Name("极柱(POS/NEG)结果1")] + [SugarColumn(ColumnName = "CCD15")] + public string CCD15 { set; get; } + /// + /// 防爆阀(PRO)结果1 + /// + [Name("防爆阀(PRO)结果1")] + [SugarColumn(ColumnName = "CCD16")] + public string CCD16 { set; get; } + /// + /// 综合结果 + /// + /// + [Name("综合结果")] + [SugarColumn(ColumnName = "Result")] + public string Result { set; get; } + + /// + /// 备注 + /// + /// + [Name("备注")] + [SugarColumn(ColumnName = "Remark")] + public string Remark { set; get; } + /// + /// 上传状态 + /// + /// + [Name("上传状态")] + [SugarColumn(ColumnName = "Flag")] + public int Flag { set; get; } + + /// + /// 通道Group + /// + /// + [Name("通道Group")] + [SugarColumn(ColumnName = "TDGroup")] + public int TDGroup { set; get; } + + /// + /// CCD列表(依据采集项参照表添加) + /// + [SugarColumn(IsIgnore = true)] + public Dictionary PLCValDic { get; set; } = new Dictionary(); + } +} diff --git a/JY.Model/DB.Entity/CamInfor.cs b/JY.Model/DB.Entity/CamInfor.cs new file mode 100644 index 0000000..b7ad34f --- /dev/null +++ b/JY.Model/DB.Entity/CamInfor.cs @@ -0,0 +1,130 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model +{ + public class CamInfor + { + /// + /// 通道 + /// + public int TD { set; get; } + /// + /// 条码 + /// + public string BarCode { set; get; } + /// + /// 电池结束时间 + /// + public string CreateTime { set; get; } + public string CCD15 { set; get; } + /// + /// CCD16 + /// + public string CCD16 { set; get; } + /// + /// CCD17 + /// + public string CCD17 { set; get; } + /// + /// CCD18 + /// + public string CCD18 { set; get; } + /// + /// CCD19 + /// + public string CCD19 { set; get; } + /// + ///CCD20 + /// + public string CCD20 { set; get; } + /// + /// CCD21 + /// + public string CCD21 { set; get; } + /// + /// CCD22 + /// + public string CCD22 { set; get; } + /// + /// CCD23 + /// + public string CCD23 { set; get; } + /// + /// CCD24 + /// + public string CCD24 { set; get; } + /// + /// CCD11 + /// + public string CCD25 { set; get; } + /// + /// CCD12 + /// + public string CCD26 { set; get; } + /// + /// CCD13 + /// + public string CCD27 { set; get; } + /// + /// CCD13 + /// + public string CCD28 { set; get; } + /// + ///CCD6 + /// + public string CCD29 { set; get; } + /// + /// CCD7 + /// + public string CCD30 { set; get; } + /// + /// CCD8 + /// + public string CCD31 { set; get; } + /// + /// CCD9 + /// + public string CCD32 { set; get; } + /// + /// CCD10 + /// + public string CCD33 { set; get; } + /// + /// CCD11 + /// + public string CCD34 { set; get; } + /// + /// CCD12 + /// + public string CCD35 { set; get; } + /// + /// CCD13 + /// + public string CCD36 { set; get; } + /// + /// CCD13 + /// + public string CCD37 { set; get; } + + /// + /// CCD13 + /// + public string CCD38 { set; get; } + public string Result { set; get; } + + /// + /// 备注 + /// + public string Remark { set; get; } + /// + /// 上传状态 + /// + public int Flag { set; get; } + + + } +} diff --git a/JY.Model/DB.Entity/ChartDataType.cs b/JY.Model/DB.Entity/ChartDataType.cs new file mode 100644 index 0000000..94e3ce9 --- /dev/null +++ b/JY.Model/DB.Entity/ChartDataType.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model +{ + /// + /// 不良統計 + /// + public class ChartDataType + { + /// + /// 數據類型 + /// + public string DataType { get; set; } + /// + /// 數量 + /// + public int DataCount { get; set; } + } +} diff --git a/JY.Model/DB.Entity/FeedingData.cs b/JY.Model/DB.Entity/FeedingData.cs new file mode 100644 index 0000000..d631a56 --- /dev/null +++ b/JY.Model/DB.Entity/FeedingData.cs @@ -0,0 +1,45 @@ +using CsvHelper.Configuration.Attributes; +using SqlSugar; +using System; + +namespace JY.Model +{ + /// + /// 上料数据 + /// + [SugarTable("FeedingData")] + public class FeedingData + { + [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "ID")] + [Name("ID")] + public int ID { set; get; } + + [SugarColumn(ColumnName = "TD")] + [Name("通道")] + public int TD { set; get; } + + [SugarColumn(ColumnName = "BarCode")] + [Name("条码")] + public string BarCode { set; get; } + + [SugarColumn(ColumnName = "CreateTime")] + [Name("时间")] + public string CreateTime { set; get; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + + [SugarColumn(ColumnName = "Result")] + [Name("结果")] + public string Result { set; get; } + + [SugarColumn(ColumnName = "Remark")] + [Name("备注")] + public string Remark { set; get; } + + [SugarColumn(ColumnName = "Flag")] + [Name("上传状态")] + public int Flag { set; get; } + + [SugarColumn(ColumnName = "TDGroup")] + [Name("通道Group")] + public int TDGroup { set; get; } + } +} diff --git a/JY.Model/DB.Entity/HourprodEntity.cs b/JY.Model/DB.Entity/HourprodEntity.cs new file mode 100644 index 0000000..c34fcdb --- /dev/null +++ b/JY.Model/DB.Entity/HourprodEntity.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace JY.Model +{ + /// + /// 每两小时产能 + /// + public class HourprodEntity + { + /// + /// 当前时间 yyyy-MM-dd + /// + public string FDate { set; get; } + /// + /// 当前小时 + /// + public int FHour { set; get; } + /// + /// 产出数 + /// + public int ProdIn { set; get; } + /// + /// 投入数 + /// + public int ProdOut { set; get; } + /// + /// 时间 yyyy-MM-dd HH:mm:ss + /// + public string TestTime { set; get; } + } +} diff --git a/JY.Model/DB.Entity/PLCConfigBase.cs b/JY.Model/DB.Entity/PLCConfigBase.cs new file mode 100644 index 0000000..6e35d6f --- /dev/null +++ b/JY.Model/DB.Entity/PLCConfigBase.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model +{ + public class PLCConfigBase + { + /// + /// 自增Id + /// + public int Id { get; set; } + /// + /// PLC地址/PLC变更说明 + /// + public string PLCAddress { get; set; } + /// + /// PLC地址说明 + /// + public string PLCRemark { get; set; } + /// + /// 地址排序 + /// + public int OrderNum { get; set; } + } +} diff --git a/JY.Model/DB.Entity/PLCConfigPara.cs b/JY.Model/DB.Entity/PLCConfigPara.cs new file mode 100644 index 0000000..8cdb63b --- /dev/null +++ b/JY.Model/DB.Entity/PLCConfigPara.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model +{ + public class PLCConfigPara + { + /// + /// 自增Id + /// + public int Id { get; set; } + /// + /// 产品型号 + /// + public string ModelName { get; set; } + /// + /// PLC地址/PLC变更说明 + /// + public string PLCAddress { get; set; } + /// + /// 参数值 + /// + public int PLCValue { get; set; } + /// + /// 更新时间 + /// + public DateTime UpdateData { get; set; } + + /// + /// PLC地址说明 --附加信息,写入忽略 + /// + public string PLCRemark { get; set; } + /// + /// 地址排序 --附加信息,写入忽略 + /// + public int OrderNum { get; set; } + } +} diff --git a/JY.Model/DB.Entity/ParaRange.cs b/JY.Model/DB.Entity/ParaRange.cs new file mode 100644 index 0000000..ee9094e --- /dev/null +++ b/JY.Model/DB.Entity/ParaRange.cs @@ -0,0 +1,175 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model +{ + public class ParaRange + { + #region 参数上下限 + /// + /// 条码长度 + /// + public int CodeLenth { set; get; } + /// + /// 电压上限 + /// + public decimal VolMax { set; get; } + /// + /// 电压下限 + /// + public decimal VolMin { set; get; } + /// + /// 内阻上限 + /// + public decimal IMPMax { set; get; } + /// + /// 内阻下限 + /// + public decimal IMPMin { set; get; } + /// + /// K值上限 + /// + public decimal KvalueMax { set; get; } + /// + /// K值下限 + /// + public decimal KvalueMin { set; get; } + /// + /// 边电压上限 + /// + public decimal BvolMax { set; get; } + /// + /// 边电压下限 + /// + public decimal BvolMin { set; get; } + + /// + /// 厚度上限 + /// + public decimal TicknessMax { set; get; } + /// + /// 厚度下限 + /// + public decimal TicknessMin { set; get; } + /// + /// 长度上限 + /// + public decimal LengthMax { set; get; } + /// + /// 长度下限 + /// + public decimal LengthMin { set; get; } + /// + /// 宽度上限 + /// + public decimal WideMax { set; get; } + /// + /// 宽度下限 + /// + public decimal WideMin { set; get; } + /// + /// 极边距上限 + /// + public decimal LMDistanceMax { set; get; } + /// + /// 极边距下限 + /// + public decimal LMDistanceMin { set; get; } + /// + /// 极耳中心距上限 + /// + public decimal LCDistanceMax { set; get; } + /// + /// 极耳中心距下限 + /// + public decimal LCDistanceMin { set; get; }//边电压数据异常1 + + #endregion + + #region 不良通道 + /// + /// 良品通道 + /// + public int GoodChannel { set; get; } + /// + /// 扫码不良通道 + /// + public int sanNG { set; get; } + /// + /// 电压不良通道 + /// + public int volNG { set; get; } + /// + /// 内阻不良通道 + /// + public int resNG { set; get; } + /// + /// K值不良通道 + /// + public int kvalueNG { set; get; } + /// + // 边电压不良通道 + /// + public int BvolNG { set; get; } + /// + /// 长度不良通道 + /// + public int LenthNG { set; get; } + /// + /// 宽度不良通道 + /// + public int WideNG { set; get; } + /// + /// 极边距不良通道 + /// + public int LMDistanceNG { set; get; } + /// + /// 中心距不良通道 + /// + public int LCDistanceNG { set; get; } + /// + /// 厚度不良 + /// + public int TicknessNG { set; get; } + /// + /// MES其他不良 + /// + public int MESOtherNG { set; get; } + + #endregion + + #region 功能选定 + /// + /// 是否验证条码 + /// + public bool IsBarcode { set; get; } + /// + /// 是否验证边电压 + /// + public bool IsIVTest { set; get; } + /// + /// 是否验证长度 + /// + public bool IsLenth { set; get; } + /// + /// 是否验证宽度 + /// + public bool IsWide { set; get; } + /// + /// 是否验证极边距 + /// + public bool IsLMDistance { set; get; } + /// + /// 是否验证中心距 + /// + public bool IsLCDistance { set; get; } + /// + /// 是否验证厚度 + /// + public bool IsThickness { set; get; } + #endregion + } +} diff --git a/JY.Model/DB.Entity/ProductModel.cs b/JY.Model/DB.Entity/ProductModel.cs new file mode 100644 index 0000000..4bbc15d --- /dev/null +++ b/JY.Model/DB.Entity/ProductModel.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model +{ + public class ProductModel + { + /// + /// 自增Id + /// + public int Id { get; set; } + /// + /// 产品型号 + /// + public string ModelName { get; set; } + /// + /// 备注 + /// + public string Remark { get; set; } + } +} diff --git a/JY.Model/DB.Entity/ProductPara.cs b/JY.Model/DB.Entity/ProductPara.cs new file mode 100644 index 0000000..bdb9877 --- /dev/null +++ b/JY.Model/DB.Entity/ProductPara.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model +{ + public class ProductPara + { + + /// + /// 自增Id + /// + public int Id { get; set; } + /// + /// 产品型号 + /// + public string ModelName { get; set; } + /// + /// 参数名称 + /// + public string ParaName { get; set; } + /// + /// 参数值 + /// + public string ParaValue { get; set; } + /// + /// 更新时间 + /// + public DateTime UpdateTime { get; set; } + /// + /// 备注 + /// + public string Remark { get; set; } + } +} diff --git a/JY.Model/DB.Entity/ProductParaBase.cs b/JY.Model/DB.Entity/ProductParaBase.cs new file mode 100644 index 0000000..0d639f2 --- /dev/null +++ b/JY.Model/DB.Entity/ProductParaBase.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model +{ + public class ProductParaBase + { + /// + /// 自增Id + /// + public int Id { get; set; } + /// + /// 产品参数名称 + /// + public string ParaName { get; set; } + /// + /// 备注 + /// + public string Remark { get; set; } + } +} diff --git a/JY.Model/DB.Entity/SystemConfig.cs b/JY.Model/DB.Entity/SystemConfig.cs new file mode 100644 index 0000000..f620ef5 --- /dev/null +++ b/JY.Model/DB.Entity/SystemConfig.cs @@ -0,0 +1,110 @@ +using JY.Model.Excel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model +{ + public class SystemConfig + { + #region MES使用 + /// + /// 工厂代码 + /// + public string siteCode { get; set; } + /// + ///产线名称 + /// + public string lineCode { get; set; } + /// + /// 设备编码 + /// + public string equipCode { get; set; } + /// + /// 物料编码 + /// + public string materialCode { get; set; } + + /// + /// 产品型号 + /// + public string productType { get; set; } + + /// + /// 分档查询接口地址 + /// + public string GradingMesUrl = "http://10.17.128.206/core/api/public/eve/pm/eqm/grading"; + + /// + /// 结果加工参数接口地址 + /// + public string ResultProcessMesUrl = "http://10.17.128.205/core/api/public/product/process/param/new/result"; + + /// + /// 产品进站接口地址 + /// + public string StationArrivalUrl = "http://127.0.0.1"; + + /// + /// 产品出站接口地址 + /// + public string StationExitUrl = "http://127.0.0.1"; + + public List CollectItemCfgList { get; set; } = new List(); + + #endregion + + #region 分档使用 + /// + /// 档位一 + /// + public string Grading1 = ""; + /// + /// 档位一 + /// + public string Grading2 = ""; + /// + /// 档位一 + /// + public string Grading3 = ""; + /// + /// 档位一 + /// + public string Grading4 = ""; + + + + #endregion + + /// + /// MES上传超时时间 + /// + public double MesRequestTime = 2; + /// + /// 权限时间 + /// + public int LoginTime = 0; + + /// + /// 是否上传MES + /// + public bool isUpMes { get; set; } + + /// + /// 员工账号 + /// + public string userName = ""; + + + + + + + + + + + } +} diff --git a/JY.Model/DB.Entity/TrayTestEntry.cs b/JY.Model/DB.Entity/TrayTestEntry.cs new file mode 100644 index 0000000..bd6946a --- /dev/null +++ b/JY.Model/DB.Entity/TrayTestEntry.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model +{ + public class TrayTestEntry + { + + /// + /// 托盘ID + /// + public string TrayID { set; get; } + /// + /// 进托盘时间 + /// + public string TrayDate { set; get; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + /// + /// 托盘验证结果 + /// + public string TrayResult { set; get; } + /// + /// 托盘验证备注 + /// + public string TrayRemark { set; get; } + /// + /// 上传状态 + /// + public int Flag { set; get; } + } +} diff --git a/JY.Model/Excel/CollectItemCfg.cs b/JY.Model/Excel/CollectItemCfg.cs new file mode 100644 index 0000000..392ab36 --- /dev/null +++ b/JY.Model/Excel/CollectItemCfg.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Model.Excel +{ + public class CollectItemCfg + { + [Description("PLC相对地址")] + public int? PLCRelAddress { get; set; } + + [Description("PLC采集数据含义")] + public string PLCItemName { get; set; } + + [Description("上位机属性名")] + public string HCPropName { get; set; } + + [Description("Mes采集项编码")] + public string MesItemCode { get; set; } + + [Description("Mes采集项描述")] + public string MesItemName { get; set; } + + [Description("是否启用")] + public string IsEnableStr { get; set; } + + public bool IsEnable + { + get => IsEnableStr == "Y"; + } + } +} diff --git a/JY.Model/JY.Model.csproj b/JY.Model/JY.Model.csproj new file mode 100644 index 0000000..4256fb6 --- /dev/null +++ b/JY.Model/JY.Model.csproj @@ -0,0 +1,96 @@ + + + + + Debug + AnyCPU + {F7DB3A93-FCA2-479B-8B2E-380116AAE9FC} + Library + Properties + JY.Model + JY.Model + v4.8 + 512 + true + + + + true + full + false + ..\..\..\..\JY.Inspection\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\CsvHelper.30.0.1\lib\net45\CsvHelper.dll + + + ..\packages\SqlSugar.5.1.4.207\lib\SqlSugar.dll + + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JY.Model/Properties/AssemblyInfo.cs b/JY.Model/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a634ade --- /dev/null +++ b/JY.Model/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("JY.Model")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("JY.Model")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("f7db3a93-fca2-479b-8b2e-380116aae9fc")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/JY.Model/app.config b/JY.Model/app.config new file mode 100644 index 0000000..e473418 --- /dev/null +++ b/JY.Model/app.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JY.Model/packages.config b/JY.Model/packages.config new file mode 100644 index 0000000..156ad2a --- /dev/null +++ b/JY.Model/packages.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/JY.Utility/CSVHelper.cs b/JY.Utility/CSVHelper.cs new file mode 100644 index 0000000..46a3ad4 --- /dev/null +++ b/JY.Utility/CSVHelper.cs @@ -0,0 +1,39 @@ +using CsvHelper; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Utility +{ + public class CSVHelper + { + /// + /// 读取CSV文件 + /// + /// csv文件名 + /// + public static List ReadCSV(string fileName, string strSeparator = "\t") + { + if (!File.Exists(fileName)) return null; + //Nuget获取CsvHelper + using (var reader = new StreamReader(fileName)) + { + var cfg = new CsvHelper.Configuration.CsvConfiguration(CultureInfo.InvariantCulture) + { + Mode = CsvMode.Escape, + Escape = '\\', + Delimiter = strSeparator//设置分隔符号 + }; + using (var csv = new CsvReader(reader, cfg)) + { + var list = csv.GetRecords().ToList(); + return list; + } + } + } + } +} diff --git a/JY.Utility/ChartHelper.cs b/JY.Utility/ChartHelper.cs new file mode 100644 index 0000000..9719750 --- /dev/null +++ b/JY.Utility/ChartHelper.cs @@ -0,0 +1,132 @@ +using System.Drawing; +using System.Windows.Forms.DataVisualization.Charting; + +namespace JY.Utility +{ + public class ChartHelper + { + + /// + /// Name:添加序列 + /// + /// + /// 图表对象 + /// 序列名称 + /// 图表类型 + /// 颜色 + /// 标记点颜色 + /// 是否显示数值 + public static void AddSeries(Chart chart, string seriesName, SeriesChartType chartType, Color color, Color markColor, bool showValue = false) + { + chart.Series.Add(seriesName); + chart.Series[seriesName].ChartType = chartType; + chart.Series[seriesName].Color = color; + if (showValue) + { + chart.Series[seriesName].IsValueShownAsLabel = true; + chart.Series[seriesName].MarkerStyle = MarkerStyle.Circle; + chart.Series[seriesName].MarkerColor = markColor; + chart.Series[seriesName].LabelForeColor = color; + chart.Series[seriesName].LabelAngle = -90; + } + } + + /// + /// Name:设置标题 + /// + /// + /// 图表对象 + /// 图表名称 + public static void SetTitle(Chart chart, string chartName, Font font, Docking docking, Color foreColor) + { + chart.Titles.Add(chartName); + chart.Titles[0].Font = font; + chart.Titles[0].Docking = docking; + chart.Titles[0].ForeColor = foreColor; + } + + /// + /// Name:设置样式 + /// 2019-04-23 14:04 + /// + /// 图表对象 + /// 背景颜色 + /// 字体颜色 + public static void SetStyle(Chart chart, Color backColor, Color foreColor) + { + chart.BackColor = backColor; + chart.ChartAreas[0].BackColor = backColor; + chart.ForeColor = Color.Red; + } + + /// + /// Name:设置图例 + /// Author: + /// + /// 图表对象 + /// 停靠位置 + /// 对齐方式 + /// 背景颜色 + /// 字体颜色 + public static void SetLegend(Chart chart, Docking docking, StringAlignment align, Color backColor, Color foreColor) + { + chart.Legends[0].Docking = docking; + chart.Legends[0].Alignment = align; + chart.Legends[0].BackColor = backColor; + chart.Legends[0].ForeColor = foreColor; + } + + /// + /// Name:设置XY轴 + /// Author: + /// + /// 图表对象 + /// X轴标题 + /// Y轴标题 + /// 坐标轴标题对齐方式 + /// 坐标轴字体颜色 + /// 坐标轴颜色 + /// 坐标轴箭头样式 + /// X轴的间距 + /// Y轴的间距 + public static void SetXY(Chart chart, string xTitle, string yTitle, StringAlignment align, Color foreColor, Color lineColor, AxisArrowStyle arrowStyle, double xInterval, double yInterval) + { + //chart.ChartAreas[0].AxisX.Title = xTitle; + //chart.ChartAreas[0].AxisY.Title = yTitle; + //chart.ChartAreas[0].AxisX.TitleAlignment = align; + //chart.ChartAreas[0].AxisY.TitleAlignment = align; + chart.ChartAreas[0].AxisX.TitleForeColor = foreColor; + chart.ChartAreas[0].AxisY.TitleForeColor = foreColor; + chart.ChartAreas[0].AxisX.LabelStyle = new LabelStyle() { ForeColor = foreColor }; + chart.ChartAreas[0].AxisY.LabelStyle = new LabelStyle() { ForeColor = foreColor }; + chart.ChartAreas[0].AxisX.LineColor = lineColor; + chart.ChartAreas[0].AxisY.LineColor = lineColor; + chart.ChartAreas[0].AxisY.LabelStyle.ForeColor = lineColor; + chart.ChartAreas[0].AxisX.LabelStyle.ForeColor = lineColor; + + + chart.ChartAreas[0].AxisX.ArrowStyle = arrowStyle; + chart.ChartAreas[0].AxisY.ArrowStyle = arrowStyle; + chart.ChartAreas[0].AxisX.Interval = xInterval; + // chart.ChartAreas[0].AxisY.Interval = yInterval; + } + + /// + /// Name:设置网格 + /// Author: + /// + /// 图表对象 + /// 网格线颜色 + /// X轴网格的间距 + /// Y轴网格的间距 + public static void SetMajorGrid(Chart chart, Color lineColor, double xInterval, double yInterval) + { + chart.ChartAreas[0].AxisX.MajorGrid.LineColor = lineColor; + chart.ChartAreas[0].AxisY.MajorGrid.LineColor = lineColor; + chart.ChartAreas[0].AxisX.MajorGrid.Interval = xInterval; + chart.ChartAreas[0].AxisY.MajorGrid.Interval = yInterval; + } + + + } +} diff --git a/JY.Utility/ConvertHelper.cs b/JY.Utility/ConvertHelper.cs new file mode 100644 index 0000000..ef0b10b --- /dev/null +++ b/JY.Utility/ConvertHelper.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Utility +{ + public class ConvertHelper + { + /// + /// DateTime转long + /// + /// + /// + public static long DateTimeToLong(DateTime dt) + { + DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); + TimeSpan toNow = dt.Subtract(dtStart); + long timeStamp = toNow.Ticks; + timeStamp = long.Parse(timeStamp.ToString().Substring(0, timeStamp.ToString().Length - 4)); + return timeStamp; + } + + /// + /// 字符串转数字 + /// + /// + /// + public static Decimal StringToDecimal(string strData) + { + Decimal dData = 0.0M; + try + { + if (strData.ToUpper().Contains("E")) + { + dData = Convert.ToDecimal(Decimal.Parse(strData.ToString(), System.Globalization.NumberStyles.Float).ToString("f4")); + } + else + { + dData = Convert.ToDecimal(Decimal.Parse(strData).ToString("f4")); + } + if (dData > 10000000000) + { + return 0.00M; + } + + } + catch + { } + return dData; + } + } +} diff --git a/JY.Utility/CustomAttributeHelper.cs b/JY.Utility/CustomAttributeHelper.cs new file mode 100644 index 0000000..173f05b --- /dev/null +++ b/JY.Utility/CustomAttributeHelper.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace JY.Utility +{ + public static class CustomAttributeHelper + { + /// + /// Cache Data + /// + private static readonly Dictionary Cache = new Dictionary(); + + /// + /// 获取CustomAttribute Value + /// + /// Attribute的子类型 + /// 头部标有CustomAttribute类的类型 + /// 取Attribute具体哪个属性值的匿名函数 + /// 返回Attribute的值,没有则返回null + public static string GetCustomAttributeValue(this Type sourceType, Func attributeValueAction) where T : Attribute + { + return GetAttributeValue(sourceType, attributeValueAction, null); + } + + /// + /// 获取CustomAttribute Value + /// + /// Attribute的子类型 + /// 头部标有CustomAttribute类的类型 + /// 取Attribute具体哪个属性值的匿名函数 + /// field name或property name + /// 返回Attribute的值,没有则返回null + public static string GetCustomAttributeValue(this Type sourceType, Func attributeValueAction, + string name) where T : Attribute + { + return GetAttributeValue(sourceType, attributeValueAction, name); + } + + private static string GetAttributeValue(Type sourceType, Func attributeValueAction, + string name) where T : Attribute + { + var key = BuildKey(sourceType, name); + if (!Cache.ContainsKey(key)) + { + CacheAttributeValue(sourceType, attributeValueAction, name); + } + + return Cache[key]; + } + + /// + /// 缓存Attribute Value + /// + private static void CacheAttributeValue(Type type, + Func attributeValueAction, string name) + { + var key = BuildKey(type, name); + + var value = GetValue(type, attributeValueAction, name); + + lock (key + "_attributeValueLockKey") + { + if (!Cache.ContainsKey(key)) + { + Cache[key] = value; + } + } + } + + private static string GetValue(Type type, + Func attributeValueAction, string name) + { + object attribute = null; + if (string.IsNullOrEmpty(name)) + { + attribute = + type.GetCustomAttributes(typeof(T), false).FirstOrDefault(); + } + else + { + var propertyInfo = type.GetProperty(name); + if (propertyInfo != null) + { + attribute = + propertyInfo.GetCustomAttributes(typeof(T), false).FirstOrDefault(); + } + + var fieldInfo = type.GetField(name); + if (fieldInfo != null) + { + attribute = fieldInfo.GetCustomAttributes(typeof(T), false).FirstOrDefault(); + } + } + + return attribute == null ? null : attributeValueAction((T)attribute); + } + + /// + /// 缓存Collection Name Key + /// + private static string BuildKey(Type type, string name) + { + if (string.IsNullOrEmpty(name)) + { + return type.FullName; + } + + return type.FullName + "." + name; + } + } +} diff --git a/JY.Utility/DataList.cs b/JY.Utility/DataList.cs new file mode 100644 index 0000000..0ffbf7d --- /dev/null +++ b/JY.Utility/DataList.cs @@ -0,0 +1,99 @@ +namespace JY.Utility +{ + public class DataList + { + private string g1; + private string g2; + private string g3; + private string g4; + private string g5; + private string g6; + private string g7; + private string g8; + + + public string G1 + { + get + { + return g1; + } + set + { + g1 = value; + } + } + + public string G2 + { + get + { + return g2; + } + set + { + g2 = value; + } + } + + public string G3 + { + get + { + return g3; + } + set + { + g3 = value; + } + } + + public string G4 + { + get + { + return g4; + } + set + { + g4 = value; + } + } + + public string G5 + { + get + { + return g5; + } + set + { + g5 = value; + } + } + + public string G6 + { + get + { + return g6; + } + set + { + g6 = value; + } + } + + public string G7 + { + get + { + return g7; + } + set + { + g7 = value; + } + } + } +} diff --git a/JY.Utility/EPPlusExcelHelper.cs b/JY.Utility/EPPlusExcelHelper.cs new file mode 100644 index 0000000..6b984a5 --- /dev/null +++ b/JY.Utility/EPPlusExcelHelper.cs @@ -0,0 +1,379 @@ +using OfficeOpenXml; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Data; +using System.Text; +using System.Threading.Tasks; +using System.Drawing.Drawing2D; +using System.ComponentModel; +using OfficeOpenXml.Style; + +namespace JY.Utility +{ + public class EPPlusExcelHelper : IDisposable + { + public ExcelPackage ExcelPackage { get; private set; } + private Stream fs; + + public EPPlusExcelHelper(string filePath) + { + if (File.Exists(filePath)) + { + var file = new FileInfo(filePath); + ExcelPackage = new ExcelPackage(file); + } + else + { + fs = File.Create(filePath); + ExcelPackage = new ExcelPackage(fs); + + } + } + /// + /// 将List集合导出到Excel中 + /// + /// + /// + /// + public void ExportList(IEnumerable list, string sheetName = "") + { + if (string.IsNullOrEmpty(sheetName)) + { + sheetName = ExcelPackage.File.Name; + } + AppendSheetToWorkBook(list, sheetName); + Save(); + } + + /// + /// 将List集合导出到Excel中 + /// + /// + /// + /// + public void ExportDataTable(string strFileName,DataTable dt) + { + AppendSheetToWorkBook(strFileName,dt); + Save(); + } + + /// + /// 获取sheet,没有则创建 + /// + /// + /// + public ExcelWorksheet GetOrAddSheet(string sheetName) + { + ExcelWorksheet ws = ExcelPackage.Workbook.Worksheets.FirstOrDefault(i => i.Name == sheetName); + if (ws == null) + { + ws = ExcelPackage.Workbook.Worksheets.Add(sheetName); + } + return ws; + } + + /// + /// DataTable数据导出到Excel(xlsx) + /// + /// ExcelPackage + /// 数据源 + public void AppendSheetToWorkBook(string strFileName,DataTable sourceTable) + { + AppendSheetToWorkBook(strFileName,sourceTable, true); + } + + /// + /// DataTable数据导出到Excel(xlsx) + /// + /// ExcelPackage + /// 数据源 + /// 是否删除同名的sheet + public void AppendSheetToWorkBook(string strFileName,DataTable sourceTable, bool isDeleteSameNameSheet) + { + //创建worksheet + ExcelWorksheet ws = AddSheet(strFileName, isDeleteSameNameSheet); + //ExcelWorksheet ws = AddSheet(sourceTable.TableName, isDeleteSameNameSheet); + //从单元格A1开始,将数据表加载到工作表中。第1行输出列名 + ws.Cells["A1"].LoadFromDataTable(sourceTable, true); + //格式化Row + FromatRow(sourceTable.Rows.Count, sourceTable.Columns.Count, ws); + } + + + /// + /// 删除指定的sheet + /// + /// + /// + public void DeleteSheet(string sheetName) + { + var sheet = ExcelPackage.Workbook.Worksheets.FirstOrDefault(i => i.Name == sheetName); + if (sheet != null) + { + ExcelPackage.Workbook.Worksheets.Delete(sheet); + } + } + + /// + /// 导出列表到excel,已存在同名sheet将删除已存在的 + /// + /// + /// + /// 数据源 + /// sheet名称 + public void AppendSheetToWorkBook(IEnumerable list, string sheetName) + { + AppendSheetToWorkBook(list, sheetName, true); + } + + /// + /// 导出列表到excel,已存在同名sheet将删除已存在的 + /// + /// + /// + /// 数据源 + /// sheet名称 + /// 是否删除已存在的同名sheet,false时将重命名导出的sheet + public void AppendSheetToWorkBook(IEnumerable list, string sheetName, bool isDeleteSameNameSheet) + { + ExcelWorksheet ws = AddSheet(sheetName, isDeleteSameNameSheet); + ws.Cells["A1"].LoadFromCollection(list, true); + } + + /// + /// 添加文字图片 + /// + /// + /// 要转换成图片的文字 + public void AddPicture(string sheetName, string msg) + { + Bitmap img = GetPictureString(msg); + + var sheet = GetOrAddSheet(sheetName); + var picName = "92FF5CFE-2C1D-4A6B-92C6-661BDB9ED016"; + var pic = sheet.Drawings.FirstOrDefault(i => i.Name == picName); + if (pic != null) + { + sheet.Drawings.Remove(pic); + } + pic = sheet.Drawings.AddPicture(picName, msg); + + pic.SetPosition(3, 0, 6, 0); + } + + /// + /// 文字绘制图片 + /// + /// + /// + private static Bitmap GetPictureString(string msg) + { + var msgs = msg.Split(new string[] { System.Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); + var maxLenght = msgs.Max(i => i.Length); + var rowCount = msgs.Count(); + var rowHeight = 23; + var fontWidth = 17; + var img = new Bitmap(maxLenght * fontWidth, rowCount * rowHeight); + using (Graphics g = Graphics.FromImage(img)) + { + g.Clear(Color.White); + Font font = new Font("Arial", 12, (FontStyle.Bold)); + LinearGradientBrush brush = new LinearGradientBrush(new Rectangle(0, 0, img.Width, img.Height), Color.Blue, Color.DarkRed, 1.2f, true); + + for (int i = 0; i < msgs.Count(); i++) + { + g.DrawString(msgs[i], font, brush, 3, 2 + rowHeight * i); + } + } + return img; + } + + /// + /// List转DataTable + /// + /// + /// + /// + public DataTable ListToDataTable(IEnumerable data) + { + PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(typeof(T)); + DataTable dataTable = new DataTable(); + for (int i = 0; i < properties.Count; i++) + { + PropertyDescriptor property = properties[i]; + dataTable.Columns.Add(property.Name, Nullable.GetUnderlyingType(property.PropertyType) ?? property.PropertyType); + } + object[] values = new object[properties.Count]; + foreach (T item in data) + { + for (int i = 0; i < values.Length; i++) + { + values[i] = properties[i].GetValue(item); + } + + dataTable.Rows.Add(values); + } + return dataTable; + } + + /// + /// 插入行 + /// + /// + /// 行类容,一个单元格一个对象 + /// 插入位置,起始位置为1 + public void InsertValues(string sheetName, List values, int rowIndex) + { + var sheet = GetOrAddSheet(sheetName); + sheet.InsertRow(rowIndex, 1); + int i = 1; + foreach (var item in values) + { + sheet.SetValue(rowIndex, i, item); + i++; + } + } + + /// + /// 保存修改 + /// + public void Save() + { + try + { + ExcelPackage.Save(); + ExcelPackage.Stream.Close(); + } + catch (Exception ex) + { + throw ex; + } + + } + + /// + /// 添加Sheet到ExcelPackage + /// + /// ExcelPackage + /// sheet名称 + /// 如果存在同名的sheet是否删除 + /// + private ExcelWorksheet AddSheet(string sheetName, bool isDeleteSameNameSheet) + { + if (isDeleteSameNameSheet) + { + DeleteSheet(sheetName); + } + else + { + while (ExcelPackage.Workbook.Worksheets.Any(i => i.Name == sheetName)) + { + sheetName = sheetName + "(1)"; + } + } + + ExcelWorksheet ws = ExcelPackage.Workbook.Worksheets.Add(sheetName); + return ws; + } + + private void FromatRow(int rowCount, int colCount, ExcelWorksheet ws) + { + ExcelBorderStyle borderStyle = ExcelBorderStyle.Thin; + Color borderColor = Color.FromArgb(155, 155, 155); + + using (ExcelRange rng = ws.Cells[1, 1, rowCount + 1, colCount]) + { + rng.Style.Font.Name = "宋体"; + rng.Style.Font.Size = 10; + rng.Style.Fill.PatternType = ExcelFillStyle.Solid; //设置图案的背景为Solid + rng.Style.Fill.BackgroundColor.SetColor(Color.FromArgb(255, 255, 255)); + + rng.Style.Border.Top.Style = borderStyle; + rng.Style.Border.Top.Color.SetColor(borderColor); + + rng.Style.Border.Bottom.Style = borderStyle; + rng.Style.Border.Bottom.Color.SetColor(borderColor); + + rng.Style.Border.Right.Style = borderStyle; + rng.Style.Border.Right.Color.SetColor(borderColor); + } + + // 格式化标题行 + using (ExcelRange rng = ws.Cells[1, 1, 1, colCount]) + { + rng.Style.Font.Bold = true; + rng.Style.HorizontalAlignment = ExcelHorizontalAlignment.Center; + rng.Style.Fill.BackgroundColor.SetColor(Color.FromArgb(234, 241, 246)); + rng.Style.Font.Color.SetColor(Color.FromArgb(51, 51, 51)); + } + } + + /// + /// + /// 导入Excel(EPPlus只支持.xlsx) + /// + /// 第几个Sheet + /// + public DataTable ImportExcel(int sheetindex = 1) + { + DataSet ds = new DataSet(); + using (ExcelWorksheet worksheet = ExcelPackage.Workbook.Worksheets[sheetindex]) + { + if (worksheet.Dimension == null) + { + return null; + } + DataTable table = new DataTable(worksheet.Name); + for (int rowNum = 1; rowNum <= worksheet.Dimension.End.Row; rowNum++) + { + + #region 创建列 + if (table.Columns.Count == 0) + { + #region 第一行数据作为表头 + for (int columnNum = 1; columnNum <= worksheet.Dimension.End.Column; columnNum++) + { + table.Columns.Add(worksheet.Cells[rowNum, columnNum].Value.ToString().Trim(), typeof(string)); + } + continue; + #endregion + } + #endregion + + #region 新增行 + DataRow dr = table.NewRow(); + for (int columnNum = 1; columnNum <= table.Columns.Count; columnNum++) + { + if (worksheet.Cells[rowNum, columnNum].Value==null) + { + dr[columnNum - 1] =string.Empty; + } + else + { + dr[columnNum - 1] = worksheet.Cells[rowNum, columnNum].Value.ToString().Trim(); + } + + } + table.Rows.Add(dr); + #endregion + } + return table; + } + + } + + public void Dispose() + { + ExcelPackage.Dispose(); + if (fs != null) + { + fs.Dispose(); + fs.Close(); + } + } + } + +} diff --git a/JY.Utility/ExcelImporter.cs b/JY.Utility/ExcelImporter.cs new file mode 100644 index 0000000..b0bba52 --- /dev/null +++ b/JY.Utility/ExcelImporter.cs @@ -0,0 +1,92 @@ +using OfficeOpenXml; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using System.Linq; + +namespace JY.Utility +{ + public static class ExcelImporter + { + public static List Import(string filePath, string sheetName = "Sheet1") where T : new() + { + // 设置 LicenseContext(非商业用途) + ExcelPackage.License.SetNonCommercialPersonal("EVE"); + + if (!File.Exists(filePath)) + { + throw new FileNotFoundException("Excel文件不存在", filePath); + } + + var result = new List(); + var fileInfo = new FileInfo(filePath); + + using (var package = new ExcelPackage(fileInfo)) + { + var worksheet = package.Workbook.Worksheets.FirstOrDefault(w => w.Name.Equals(sheetName, StringComparison.OrdinalIgnoreCase)); + if (worksheet == null) + { + throw new ArgumentException($"指定的工作表 '{sheetName}' 不存在"); + } + + if (worksheet.Dimension == null) + { + return result; + } + + var dimension = worksheet.Dimension; + var headers = new Dictionary(StringComparer.OrdinalIgnoreCase); + + for (int col = dimension.Start.Column; col <= dimension.End.Column; col++) + { + var headerValue = worksheet.Cells[1, col].Value?.ToString().Trim(); + if (!string.IsNullOrEmpty(headerValue)) + { + headers[headerValue] = col; + } + } + + var properties = TypeDescriptor.GetProperties(typeof(T)); + + for (int row = dimension.Start.Row + 1; row <= dimension.End.Row; row++) + { + var item = new T(); + bool hasData = false; + + foreach (PropertyDescriptor property in properties) + { + if (headers.TryGetValue(property.Description, out int col)) + { + var cellValue = worksheet.Cells[row, col].Value; + + if (cellValue != null) + { + hasData = true; + var stringValue = cellValue.ToString().Trim(); + + try + { + var targetType = Nullable.GetUnderlyingType(property.PropertyType) ?? property.PropertyType; + var convertedValue = Convert.ChangeType(stringValue, targetType); + property.SetValue(item, convertedValue); + } + catch + { + property.SetValue(item, null); + } + } + } + } + + if (hasData) + { + result.Add(item); + } + } + } + + return result; + } + } +} diff --git a/JY.Utility/IniFileHelper.cs b/JY.Utility/IniFileHelper.cs new file mode 100644 index 0000000..a908546 --- /dev/null +++ b/JY.Utility/IniFileHelper.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace JY.Utility +{ + public class IniFileHelper + { + private static string iniFilePath = "ComConfig.ini"; + + [DllImport("kernel32")] + private static extern long WritePrivateProfileString(string section, string key, string val, string filePath); + + [DllImport("kernel32")] + private static extern long GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath); + + public static string ReadIniData(string Section, string Key) + { + try + { + if (File.Exists(iniFilePath)) + { + StringBuilder temp = new StringBuilder(1024); + GetPrivateProfileString(Section, Key, "", temp, 1024, iniFilePath); + return temp.ToString(); + } + MessageBox.Show("节点:" + Section + ",键名:" + Key + ":读取配置文件错误!"); + return null; + } + catch + { + throw; + } + } + + public static bool WriteIniData(string Section, string Key, string Value) + { + try + { + if (File.Exists(iniFilePath)) + { + if (WritePrivateProfileString(Section, Key, Value, iniFilePath) == 0L) + { + return false; + } + return true; + } + File.Create(iniFilePath).Close(); + if (WritePrivateProfileString(Section, Key, Value, iniFilePath) == 0L) + { + return false; + } + return true; + } + catch + { + throw; + } + } + + public static void CreateIniFile(string StartupPath, string AppName) + { + iniFilePath = StartupPath + AppName; + if (!Directory.Exists(StartupPath)) + { + Directory.CreateDirectory(StartupPath); + } + if (!File.Exists(iniFilePath)) + { + File.Create(iniFilePath).Close(); + } + } + } +} diff --git a/JY.Utility/JY.Utility.csproj b/JY.Utility/JY.Utility.csproj new file mode 100644 index 0000000..73418e6 --- /dev/null +++ b/JY.Utility/JY.Utility.csproj @@ -0,0 +1,126 @@ + + + + + Debug + AnyCPU + {76DE07E0-9E97-44AB-8148-01B44C5C1ADD} + Library + Properties + JY.Utility + JY.Utility + v4.8 + 512 + true + + + + true + full + false + ..\..\..\..\JY.Inspection\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Portable.BouncyCastle.1.8.9\lib\net40\BouncyCastle.Crypto.dll + + + ..\packages\CsvHelper.30.0.1\lib\net47\CsvHelper.dll + + + ..\packages\EPPlus.8.0.8\lib\net462\EPPlus.dll + + + ..\packages\EPPlus.Interfaces.8.0.0\lib\net462\EPPlus.Interfaces.dll + + + ..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll + + + ..\packages\log4net.2.0.13\lib\net45\log4net.dll + + + ..\packages\Microsoft.IO.RecyclableMemoryStream.3.0.1\lib\netstandard2.0\Microsoft.IO.RecyclableMemoryStream.dll + + + ..\packages\NPOI.2.5.5\lib\net45\NPOI.dll + + + ..\packages\NPOI.2.5.5\lib\net45\NPOI.OOXML.dll + + + ..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXml4Net.dll + + + ..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXmlFormats.dll + + + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.ComponentModel.Annotations.5.0.0\lib\net461\System.ComponentModel.Annotations.dll + + + + + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + + ..\packages\System.Security.Cryptography.Xml.8.0.2\lib\net462\System.Security.Cryptography.Xml.dll + + + ..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JY.Utility/JY.Utility.csproj.user b/JY.Utility/JY.Utility.csproj.user new file mode 100644 index 0000000..c10e84b --- /dev/null +++ b/JY.Utility/JY.Utility.csproj.user @@ -0,0 +1,6 @@ + + + + ProjectFiles + + \ No newline at end of file diff --git a/JY.Utility/LogHelper.cs b/JY.Utility/LogHelper.cs new file mode 100644 index 0000000..5b5063e --- /dev/null +++ b/JY.Utility/LogHelper.cs @@ -0,0 +1,389 @@ +using System; +using System.Diagnostics; +using System.IO; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Xml; +using log4net; +using log4net.Appender; +using log4net.Config; + +namespace JY.Utility +{ + /// + /// LogHelper 用来记录系统的日志,包括异常等. + /// + public static class LogHelper + { + private static readonly ILog log; + + /// + /// + public static bool DebugMode = false; + + #region 构造函数 + + /// + /// 构造函数 + /// + static LogHelper() + { + var repository = LogManager.CreateRepository("NETCoreRepository"); + var c = XmlConfigurator.Configure(repository, new FileInfo("Log4net.config")); + log = LogManager.GetLogger(repository.Name, "Test"); + RunClearJob(); + } + + #endregion + + #region 清除过期日志 + + /// + /// 启动清除过期日志线程 + /// + private static void RunClearJob() + { + Task.Run(() => + { + try + { + while (true) + { + ClearOverdue(); + WriteLine("清除log4net过期日志"); + //24小时清一次 + Thread.Sleep(1000 * 60 * 60 * 24); + } + } + catch (Exception e) + { + WriteException(e); + } + }); + } + + /// + /// 定期清除过期日志 + /// + private static void ClearOverdue() + { + var days = 7; + if (File.Exists("Log4net.config")) + { + try + { + XmlDocument doc = new XmlDocument(); + doc.Load(@"Log4net.config"); + var node = doc.SelectSingleNode("/configuration/log4net"); + days = Convert.ToInt32(node.Attributes["OverdueDays"].Value); + } + catch + { + // ignored + } + } + + + var apps = log.Logger.Repository.GetAppenders(); + if (apps.Length <= 0) + { + return; + } + + var now = DateTime.UtcNow.AddDays(-days); + foreach (var item in apps) + { + if (item is RollingFileAppender roll) + { + var dir = Path.GetDirectoryName(roll.File); + var files = Directory.GetFiles(dir, "*.log.*"); + //var sample = "log.txt2017-10-23.txt"; + + foreach (var filePath in files) + { + var file = new FileInfo(filePath); + if (file.CreationTime < now || file.LastWriteTime < now) + { + try + { + file.Delete(); + } + catch (Exception) + { + + } + } + } + } + } + } + + #endregion + + + #region 公布的写日志函数 + + /// + /// 记录一条日志信息。注意:在记录时该程序会自动在左侧增加一格日期。 + /// + /// 字符串的组成格式 + /// 参数 + public static void WriteLine(string strFormat, params object[] args) + { + try + { + log.Info($"{string.Format(strFormat, args)}"); + } + catch (Exception exp) + { + Trace.WriteLine("LOG ERROR: " + exp.Message); + } + } + + /// + /// 记录一条日志信息。注意:在记录时该程序会自动在左侧增加一格日期。 + /// + /// 字符串的组成格式 + public static void WriteLine(string strLog) + { + try + { + Debug.Assert(strLog != null); + log.Info($"{strLog}"); + } + catch (Exception exp) + { + Trace.WriteLine("LOG ERROR: " + exp.Message); + } + } + + /// + /// 记录一条错误日志信息。注意:在记录时该程序会自动在左侧增加一格日期。 + /// + /// + public static void WriteErrorLine(string strLog) + { + try + { + Debug.Assert(strLog != null); + log.Error($"{strLog}"); + } + catch (Exception exp) + { + Trace.WriteLine("LOG ERROR: " + exp.Message); + } + } + + /// + /// 记录一条日志信息。注意:在记录时该程序会自动在左侧增加一格日期。 + /// + /// 字符串的组成格式 + public static void WriteDebugLine(string strLog) + { + try + { + Debug.Assert(strLog != null); + log.Debug($"{strLog}"); + } + catch (Exception exp) + { + Trace.WriteLine("LOG ERROR: " + exp.Message); + } + } + + + /// + /// 记录异常(在调试模式) + /// + /// + public static void WriteDebugException(Exception exp) + { + WriteDebugException(exp, null); + } + + + /// + /// 记录异常(在调试模式) + /// + /// + /// + /// + public static void WriteDebugException(Exception exp, string strFormat, params object[] args) + { + try + { + Debug.Assert(exp != null); + var sb = new StringBuilder(); + + + sb.AppendFormat("[{0}] DEBUG 找到 [{1}] 异常: {2}\r\n", DateTime.Now.ToString("HH:mm:ss"), + exp.GetType().Name, exp.Message); + + // 附加信息 + if (strFormat != null) sb.AppendFormat(" Annex : {0}\r\n", string.Format(strFormat, args)); + + // 调试信息 + sb.AppendFormat(" Source : {0}\r\n", exp.Source); + sb.AppendFormat(" Time : {0}\r\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); + sb.AppendFormat(" OS/VER : {0} {1}\r\n", Environment.OSVersion.Platform, + Environment.OSVersion.Version); + sb.AppendFormat(" Thread : {0}\r\n", Thread.CurrentThread.Name); + + // 栈信息 + sb.AppendFormat(" Stack : {0}\r\n", exp.StackTrace); + + // 内部异常, 最多5级 + var inner = exp.InnerException; + for (var i = 0; i < 5 && inner != null; i++) + { + // 显示内部异常 + sb.AppendFormat(" ----- InnerException ---------------------------\r\n"); + sb.AppendFormat(" ExceptionType: {0}\r\n", inner.GetType().Name); + sb.AppendFormat(" Message: {0}\r\n", inner.Message); + sb.AppendFormat(" Stack : {0}\r\n", inner.StackTrace); + + // 获取异常的内部异常 + inner = inner.InnerException; + } + + log.Error(sb.ToString()); + } + catch (Exception ex) + { + Trace.WriteLine("LOG ERROR: " + ex.Message); + } + } + + + /// + /// 记录下该异常 + /// + /// 需要记录的异常对象 + public static void WriteException(Exception exp) + { + WriteException(exp, null); + } + + + /// + /// 记录下该异常 + /// + /// 异常对象 + /// 附加信息格式字符串,如果不需要,则该参数为 null + /// 参数 + public static void WriteException(Exception exp, string strFormat, params object[] args) + { + try + { + Debug.Assert(exp != null); + var sb = new StringBuilder(); + + { + sb.AppendFormat("[{0}] 找到 [{1}] 异常: {2}\r\n", DateTime.Now.ToString("HH:mm:ss"), exp.GetType().Name, + exp.Message); + + // 附加信息 + if (strFormat != null) sb.AppendFormat(" Annex : {0}\r\n", string.Format(strFormat, args)); + + // 调试信息 + sb.AppendFormat(" Source : {0}\r\n", exp.Source); + sb.AppendFormat(" Time : {0}\r\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); + sb.AppendFormat(" OS/VER : {0} {1}\r\n", Environment.OSVersion.Platform, + Environment.OSVersion.Version); + sb.AppendFormat(" Thread : {0}\r\n", Thread.CurrentThread.Name); + + // 栈信息 + sb.AppendFormat(" Stack : {0}\r\n", exp.StackTrace); + + // 内部异常, 最多5级 + var inner = exp.InnerException; + for (var i = 0; i < 5 && inner != null; i++) + { + // 显示内部异常 + sb.AppendFormat(" ----- InnerException ---------------------------\r\n"); + sb.AppendFormat(" ExceptionType: {0}\r\n", inner.GetType().Name); + sb.AppendFormat(" Message: {0}\r\n", inner.Message); + sb.AppendFormat(" Stack : {0}\r\n", inner.StackTrace); + + // 获取异常的内部异常 + inner = inner.InnerException; + } + + log.Error(sb.ToString()); + } + } + catch (Exception ex) + { + Trace.WriteLine("LOG ERROR: " + ex.Message); + } + } + + + /// + /// Dump 一个对象 + /// + /// + public static void WriteObject(object obj) + { + try + { + var sb = new StringBuilder(); + if (obj == null) + { + sb.AppendLine("-- The object is null\r\n"); + } + else + { + sb.AppendFormat("[{0}] {1} has {2} property\r\n", + DateTime.Now, obj.GetType().Name, obj.GetType().GetProperties().Length); + + var pis = obj.GetType().GetProperties(); + var iMaxLength = 0; + foreach (var pi in pis) + if (pi.CanRead && !pi.IsSpecialName) + iMaxLength = Math.Max(pi.Name.Length, iMaxLength); + + foreach (var pi in pis) + if (pi.CanRead && !pi.IsSpecialName) + sb.AppendFormat(" {0} - {1}\r\n", pi.Name.PadRight(iMaxLength, ' '), + pi.GetValue(obj, null)); + } + } + catch (Exception exp) + { + Trace.WriteLine("LOG ERROR: " + exp.Message); + } + } + + #endregion + + + /// + /// 错误日志带异常 + /// + /// + /// + public static void Error(string message,Exception ex) + { + ILog log = LogManager.GetLogger("Error"); + if (log.IsErrorEnabled) + { + log.Error(message,ex); + } + } + + // + /// 错误日志不带异常 + /// + /// 错误日志 + public static void Error(string message) + { + ILog log = LogManager.GetLogger("Error"); + if (log.IsErrorEnabled) + { + log.Error(message); + } + } + } +} \ No newline at end of file diff --git a/JY.Utility/OpenOfficeXML.cs b/JY.Utility/OpenOfficeXML.cs new file mode 100644 index 0000000..735a5c8 --- /dev/null +++ b/JY.Utility/OpenOfficeXML.cs @@ -0,0 +1,259 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.IO; +using System.Windows.Forms; +using NPOI.HSSF.UserModel; +using NPOI.SS.UserModel; +using OfficeOpenXml; + +namespace JY.Utility +{ + public class OpenOfficeXML + { + /// + /// EPPlusToExcel + /// + /// 数据集合 + /// Excel文件名 + public static void Out_CeLiang(List _D, string strFileName) + { + using (OfficeOpenXml.ExcelPackage package = new OfficeOpenXml.ExcelPackage(new FileInfo(strFileName))) + { + string TableName = DateTime.Now.ToString("yyyy-MM-dd"); + ExcelWorksheet worksheet = package.Workbook.Worksheets.Add(TableName); + #region 绘制列头 + worksheet.Cells[1, 1].Value = "不良项目"; + worksheet.Cells[1, 2].Value = "数量"; + //worksheet.Cells[1, 3].Value = "规格3"; + //worksheet.Cells[1, 4, 1, 5].Value = "合并单元格"; + //worksheet.Cells[1, 4, 1, 5].Merge = true; + #endregion + + #region 数据行 + int i = 1; + foreach (DataList Item in _D) + { + worksheet.Cells[i + 1, 1].Value = Item.G1; + worksheet.Cells[i + 1, 2].Value = Item.G2; + //worksheet.Cells[i + 1, 3].Value = Item.G3; + //worksheet.Cells[i + 1, 4, i + 1, 5].Value = Item.G4; + //worksheet.Cells[i + 1, 4, i + 1, 5].Merge = true; + i++; + } + #endregion + + if (false == System.IO.Directory.Exists(System.AppDomain.CurrentDomain.BaseDirectory + @"Excel\")) + System.IO.Directory.CreateDirectory(System.AppDomain.CurrentDomain.BaseDirectory + @"Excel\"); + package.Save(); + } + } + + public static void Out_TimeCeLiang(List _D, string strFileName) + { + using (OfficeOpenXml.ExcelPackage package = new OfficeOpenXml.ExcelPackage(new FileInfo(strFileName))) + { + string TableName = DateTime.Now.ToString("yyyy-MM-dd"); + ExcelWorksheet worksheet = package.Workbook.Worksheets.Add(TableName); + #region 绘制列头 + worksheet.Cells[1, 1].Value = "不良项目"; + worksheet.Cells[1, 2].Value = "数量"; + //worksheet.Cells[1, 3].Value = "规格3"; + //worksheet.Cells[1, 4, 1, 5].Value = "合并单元格"; + //worksheet.Cells[1, 4, 1, 5].Merge = true; + #endregion + + #region 数据行 + int i = 1; + foreach (DataList Item in _D) + { + worksheet.Cells[i + 1, 1].Value = Item.G1; + worksheet.Cells[i + 1, 2].Value = Item.G2; + //worksheet.Cells[i + 1, 3].Value = Item.G3; + //worksheet.Cells[i + 1, 4, i + 1, 5].Value = Item.G4; + //worksheet.Cells[i + 1, 4, i + 1, 5].Merge = true; + i++; + } + #endregion + + if (false == System.IO.Directory.Exists(System.AppDomain.CurrentDomain.BaseDirectory + @"Excel\")) + System.IO.Directory.CreateDirectory(System.AppDomain.CurrentDomain.BaseDirectory + @"Excel\"); + package.Save(); + } + } + + /// + /// ExportExcel(使用NPOI的方式) + /// + /// + public static int ExportExcel(DataTable DT, string selectDate, ref string strErr) + { + strErr = ""; + try + { + if (DT == null & DT.Rows.Count <= 0) + { + strErr = "请先查询统计数据后再执行导出操作!"; + return 1; + } + + string strFilePath = ""; + HSSFWorkbook hssfworkbookDown; + string modelExlPath = Application.StartupPath + "\\EmailTemplate\\Model.xls"; + if (File.Exists(modelExlPath) == false) //模板不存在 + { + strErr = "程序根目录下EmailTemplate文件夹内找不到导出模板文件!"; + return 2; + } + + using (FileStream file = new FileStream(modelExlPath, FileMode.Open, FileAccess.Read)) + { + hssfworkbookDown = new HSSFWorkbook(file); + file.Close(); + } + + WriterExcel(hssfworkbookDown, 0, DT); + string filename = selectDate + ".xls"; + strFilePath = Application.StartupPath + "\\Temp\\TEEnrollmentForm"; + if (Directory.Exists(strFilePath) == false) + { + Directory.CreateDirectory(strFilePath); + } + + strFilePath = strFilePath + "\\\\" + filename; + FileStream files = new FileStream(strFilePath, FileMode.Create); + hssfworkbookDown.Write(files); + files.Close(); + if (File.Exists(strFilePath) == false) //附件生成失败 + { + strErr = "生成EXCEL文件失败"; + return 3; + } + strErr = strFilePath; + return 4; + } + catch (Exception ex) + { + strErr = ex.Message; + } + return 0; + } + + /// + /// WriterExcel + /// + /// + /// + /// + public static void WriterExcel(HSSFWorkbook hssfworkbookDown, int sheetIndex, DataTable DT) + { + try + { + + #region 设置单元格样式 + + //字体 + HSSFFont fontS9 = (HSSFFont)hssfworkbookDown.CreateFont(); + fontS9.FontName = "Arial"; + fontS9.FontHeightInPoints = 10; + fontS9.Boldweight = (short)NPOI.SS.UserModel.FontBoldWeight.Normal; + //表格 + ICellStyle TableS9 = (ICellStyle)hssfworkbookDown.CreateCellStyle(); + TableS9.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + TableS9.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + TableS9.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + TableS9.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + TableS9.WrapText = true; + TableS9.SetFont(fontS9); + + #endregion + + HSSFSheet sheet = (HSSFSheet)hssfworkbookDown.GetSheetAt(sheetIndex); + hssfworkbookDown.SetSheetHidden(sheetIndex, false); + hssfworkbookDown.SetActiveSheet(sheetIndex); + + int n = 2; //因为模板有表头,所以从第2行开始写 + for (int j = 0; j < DT.Columns.Count; j++) + { + HSSFRow dataRow = (HSSFRow)sheet.CreateRow(j + n); + //string cv = DT.Columns[j].Caption; + //string strDepID = DT.Rows[j]["序号"].ToString().Trim(); + //dataRow.CreateCell(0); + //dataRow.Cells[0].SetCellValue(strDepID == "" ? DT.Rows[j]["日期"].ToString() : ""); + + dataRow.CreateCell(0); + dataRow.Cells[0].SetCellValue(DT.Rows[j]["日期"].ToString()); + dataRow.CreateCell(1); + dataRow.Cells[1].SetCellValue(DT.Rows[j]["班次"].ToString()); + dataRow.CreateCell(2); + dataRow.Cells[2].SetCellValue(DT.Rows[j]["班别"].ToString()); + dataRow.CreateCell(3); + dataRow.Cells[3].SetCellValue(DT.Rows[j]["工单号"].ToString()); + dataRow.CreateCell(4); + dataRow.Cells[4].SetCellValue(DT.Rows[j]["客户名称"].ToString()); + dataRow.CreateCell(5); + dataRow.Cells[5].SetCellValue(DT.Rows[j]["投入总数"].ToString()); + dataRow.CreateCell(6); + dataRow.Cells[6].SetCellValue(DT.Rows[j]["良品总数"].ToString()); + dataRow.CreateCell(7); + dataRow.Cells[7].SetCellValue(DT.Rows[j]["不良总数"].ToString()); + dataRow.CreateCell(8); + dataRow.Cells[8].SetCellValue(DT.Rows[j]["不良率"].ToString()); + dataRow.CreateCell(9); + dataRow.Cells[9].SetCellValue(DT.Rows[j]["质量缺陷"].ToString()); + dataRow.CreateCell(10); + dataRow.Cells[10].SetCellValue(DT.Rows[j]["非质量缺陷"].ToString()); + dataRow.CreateCell(11); + dataRow.Cells[11].SetCellValue(DT.Rows[j]["其他不良"].ToString()); + dataRow.CreateCell(12); + dataRow.Cells[12].SetCellValue(DT.Rows[j]["侧面不良"].ToString()); + dataRow.CreateCell(13); + dataRow.Cells[13].SetCellValue(DT.Rows[j]["正极不良"].ToString()); + dataRow.CreateCell(14); + dataRow.Cells[14].SetCellValue(DT.Rows[j]["负极不良"].ToString()); + dataRow.CreateCell(15); + dataRow.Cells[15].SetCellValue(DT.Rows[j]["重合不良"].ToString()); + dataRow.CreateCell(16); + dataRow.Cells[16].SetCellValue(DT.Rows[j]["喷码不良"].ToString()); + dataRow.CreateCell(17); + dataRow.Cells[17].SetCellValue(DT.Rows[j]["侧面凹坑鼓包、变形"].ToString()); + dataRow.CreateCell(18); + dataRow.Cells[18].SetCellValue(DT.Rows[j]["侧面脏污漏液"].ToString()); + dataRow.CreateCell(19); + dataRow.Cells[19].SetCellValue(DT.Rows[j]["侧面凸点、划痕、破皮、膜内异物"].ToString()); + dataRow.CreateCell(20); + dataRow.Cells[20].SetCellValue(DT.Rows[j]["正极面垫不良多放、漏放"].ToString()); + dataRow.CreateCell(21); + dataRow.Cells[21].SetCellValue(DT.Rows[j]["正极套膜不良含热缩不良、破损、褶皱、面垫翘起"].ToString()); + dataRow.CreateCell(22); + dataRow.Cells[22].SetCellValue(DT.Rows[j]["正极套膜脏污"].ToString()); + dataRow.CreateCell(23); + dataRow.Cells[23].SetCellValue(DT.Rows[j]["盖帽不良含漏液、盖帽脏污氧化生锈,划痕,变形"].ToString()); + dataRow.CreateCell(24); + dataRow.Cells[24].SetCellValue(DT.Rows[j]["负极套膜尺寸不良"].ToString()); + dataRow.CreateCell(25); + dataRow.Cells[25].SetCellValue(DT.Rows[j]["负极套膜不良含套膜褶皱变形、破损、褶皱"].ToString()); + dataRow.CreateCell(26); + dataRow.Cells[26].SetCellValue(DT.Rows[j]["负极套膜脏污"].ToString()); + dataRow.CreateCell(27); + dataRow.Cells[27].SetCellValue(DT.Rows[j]["底部不良含漏液、脏污、氧化生锈、划痕、变形"].ToString()); + dataRow.CreateCell(28); + dataRow.Cells[28].SetCellValue(DT.Rows[j]["操作员"].ToString()); + + + //for (int i = 0; i <= 2; i++) //循环列,添加样式 + //{ + // dataRow.Cells[i].CellStyle = TableS9; + //} + } + + //设定第一行,第一列的单元格选中 + sheet.SetActiveCell(0, 0); + } + catch (Exception ex) + { + //WriteLog(ex.ToString()); + } + } + } +} diff --git a/JY.Utility/Properties/AssemblyInfo.cs b/JY.Utility/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..74d0281 --- /dev/null +++ b/JY.Utility/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("JY.Utility")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("JY.Utility")] +[assembly: AssemblyCopyright("Copyright © 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("76de07e0-9e97-44ab-8148-01b44c5c1add")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/JY.Utility/TxtHelper.cs b/JY.Utility/TxtHelper.cs new file mode 100644 index 0000000..bacf928 --- /dev/null +++ b/JY.Utility/TxtHelper.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace JY.Utility +{ + public class TxtHelper + { + static ReaderWriterLockSlim sucessLogWriteLockSlim = new ReaderWriterLockSlim(); + + /// + /// 写入TEXT文本 + /// + /// 文件名 + /// 内容 + /// 保存结果 + public static bool WriteTxt(string fullName, string content) + { + FileStream fs = null; + StreamWriter sw = null; + + try + { + string directory = fullName.Substring(0, fullName.LastIndexOf('\\')); + if (!Directory.Exists(directory)) + { + Directory.CreateDirectory(directory); + } + + sucessLogWriteLockSlim.EnterWriteLock();//加锁防止抢占 + if (!File.Exists(fullName)) + { + fs = new FileStream(fullName, FileMode.Create, FileAccess.Write); + sw = new StreamWriter(fs, Encoding.UTF8); + } + else + { + fs = new FileStream(fullName, FileMode.Append, FileAccess.Write); + sw = new StreamWriter(fs, Encoding.UTF8); + } + + sw.WriteLine(content); + + sw.Close(); + fs.Close(); + + return true; + } + catch (Exception ex) + { + sw?.Close(); + fs?.Close(); + + } + finally + { + sucessLogWriteLockSlim.ExitWriteLock(); + } + + return false; + } + + } +} diff --git a/JY.Utility/app.config b/JY.Utility/app.config new file mode 100644 index 0000000..fb45d0e --- /dev/null +++ b/JY.Utility/app.config @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JY.Utility/packages.config b/JY.Utility/packages.config new file mode 100644 index 0000000..dfb4291 --- /dev/null +++ b/JY.Utility/packages.config @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PLCCommunication/App.config b/PLCCommunication/App.config new file mode 100644 index 0000000..4bfa005 --- /dev/null +++ b/PLCCommunication/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/PLCCommunication/Common/DemoUtils.cs b/PLCCommunication/Common/DemoUtils.cs new file mode 100644 index 0000000..2581cfc --- /dev/null +++ b/PLCCommunication/Common/DemoUtils.cs @@ -0,0 +1,103 @@ +using HslCommunication; +using HslCommunication.BasicFramework; +using HslCommunication.Core; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace PLCCommunication +{ + public class DemoUtils + { + public static readonly string IpAddressInputWrong = "IpAddress input wrong"; + + public static readonly string PortInputWrong = "Port input wrong"; + + public static readonly string SlotInputWrong = "Slot input wrong"; + + public static readonly string BaudRateInputWrong = "Baud rate input wrong"; + + public static readonly string DataBitsInputWrong = "Data bit input wrong"; + + public static readonly string StopBitInputWrong = "Stop bit input wrong"; + + public static void ReadResultRender(OperateResult result, string address, TextBox textBox) + { + if (result.IsSuccess) + { + textBox.AppendText(DateTime.Now.ToString("[HH:mm:ss] ") + $"[{address}] {result.Content}{Environment.NewLine}"); + return; + } + MessageBox.Show(DateTime.Now.ToString("[HH:mm:ss] ") + "[" + address + "] Read Failed " + Environment.NewLine + "Reason:" + result.ToMessageShowString()); + } + + public static void ReadResultRender(OperateResult result, string address, TextBox textBox) + { + string resTemp = string.Empty; + if (result.IsSuccess) + { + for (int i = 0; i < result.Content.Length; i++) + { + resTemp = string.Concat(resTemp, result.Content[i], ","); + } + string Result = resTemp.Substring(0, resTemp.Length - 1); + textBox.AppendText(DateTime.Now.ToString("[HH:mm:ss] ") + "[" + address + "] " + Result + Environment.NewLine); + } + else + { + MessageBox.Show(DateTime.Now.ToString("[HH:mm:ss] ") + "[" + address + "] Read Failed " + Environment.NewLine + "Reason:" + result.ToMessageShowString()); + } + } + + public static void WriteResultRender(OperateResult result, string address) + { + if (result.IsSuccess) + { + MessageBox.Show(DateTime.Now.ToString("[HH:mm:ss] ") + "[" + address + "] Write Success"); + return; + } + MessageBox.Show(DateTime.Now.ToString("[HH:mm:ss] ") + "[" + address + "] Write Failed " + Environment.NewLine + " Reason:" + result.ToMessageShowString()); + } + + public static void WriteResultRender(Func write, string address) + { + try + { + OperateResult result = write(); + if (result.IsSuccess) + { + MessageBox.Show(DateTime.Now.ToString("[HH:mm:ss] ") + "[" + address + "] Write Success"); + return; + } + MessageBox.Show(DateTime.Now.ToString("[HH:mm:ss] ") + "[" + address + "] Write Failed " + Environment.NewLine + " Reason:" + result.ToMessageShowString()); + } + catch (Exception ex) + { + MessageBox.Show("Data for writting is not corrent: " + ex.Message); + } + } + + public static void BulkReadRenderResult(IReadWriteNet readWrite, TextBox addTextBox, TextBox lengthTextBox, TextBox resultTextBox) + { + try + { + OperateResult read = readWrite.Read(addTextBox.Text, ushort.Parse(lengthTextBox.Text)); + if (read.IsSuccess) + { + resultTextBox.Text = "Result:" + SoftBasic.ByteToHexString(read.Content); + } + else + { + MessageBox.Show("Read Failed:" + read.ToMessageShowString()); + } + } + catch (Exception ex) + { + MessageBox.Show("Read Failed:" + ex.Message); + } + } + } +} diff --git a/PLCCommunication/Common/IniHelper.cs b/PLCCommunication/Common/IniHelper.cs new file mode 100644 index 0000000..a2db5cb --- /dev/null +++ b/PLCCommunication/Common/IniHelper.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace PLCCommunication +{ + public class IniHelper + { + public string path; + public IniHelper(string INIPath) + { + path = INIPath; + } + [DllImport("kernel32", CharSet = CharSet.Unicode)] + private static extern long WritePrivateProfileString(string section, string key, string val, string filePath); + + [DllImport("kernel32", CharSet = CharSet.Unicode)] + private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath); + + [DllImport("kernel32", CharSet = CharSet.Unicode)] + private static extern int GetPrivateProfileString(string section, string key, string defVal, byte[] retVal, int size, string filePath); + public void IniWriteValue(string Section, string Key, string Value) + { + WritePrivateProfileString(Section, Key, Value, path); + } + public string IniReadValue(string Section, string Key) + { + try + { + StringBuilder temp = new StringBuilder(255); + int i = GetPrivateProfileString(Section, Key, "", temp, 255, path); + return temp.ToString(); + } + catch (Exception) + { + return null; + } + } + public byte[] IniReadValues(string section, string key) + { + byte[] temp = new byte[255]; + int i = GetPrivateProfileString(section, key, "", temp, 255, path); + return temp; + } + + public void ClearAllSection() + { + IniWriteValue(null, null, null); + } + + public void ClearSection(string Section) + { + IniWriteValue(Section, null, null); + } + } + +} diff --git a/PLCCommunication/Entity/DataFormatType.cs b/PLCCommunication/Entity/DataFormatType.cs new file mode 100644 index 0000000..ae69433 --- /dev/null +++ b/PLCCommunication/Entity/DataFormatType.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PLCCommunication +{ + public enum DataFormatType + { + /// + /// 按照顺序排序 + /// + ABCD, + /// + /// 按照单字反转 + /// + BADC, + /// + /// 按照双字反转 + /// + CDAB, + /// + /// 按照倒序排序 + /// + DCBA + } +} + diff --git a/PLCCommunication/Entity/PLCConfig.cs b/PLCCommunication/Entity/PLCConfig.cs new file mode 100644 index 0000000..3477665 --- /dev/null +++ b/PLCCommunication/Entity/PLCConfig.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PLCCommunication +{ + [Serializable] + public class PLCConfig + { + /// + /// + /// + public int Index; + /// + /// PLC IP地址 + /// + public string IP; + /// + /// PLC端口号 + /// + public int Port; + /// + /// + /// + public int JobCount; + /// + /// 是否启用心跳消息 + /// + public bool HeartBeat; + /// + /// 心跳设置地址 + /// + public string HeartAddr; + /// + /// 扫描间隔时间 + /// + public int ScanTime; + /// + /// 上位机的节点地址,假如你的电脑的Ip地址为192.168.1.30,那么这个值就是30 + /// + public int SA1; + /// + /// PLC的插槽号,通常都为0 + /// + public int Solt; + /// + /// 如果设置为True,当数据读取失败的时候,会自动变更当前的SA1值,会选择自动增加,但不会和DA1一致,本值需要在对象实例化之后立即设置。 + /// + public bool ChangeSA1; + /// + /// 获取或设置在解析字符串的时候是否将字节按照字单位反转,获取或设置数据解析的格式,可选ABCD, BADC,CDAB,DCBA格式 + /// + public int DataFormat; + + public List lstTgrParams; + } +} diff --git a/PLCCommunication/Entity/TriggerParams.cs b/PLCCommunication/Entity/TriggerParams.cs new file mode 100644 index 0000000..24ddf38 --- /dev/null +++ b/PLCCommunication/Entity/TriggerParams.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PLCCommunication +{ + public class TriggerParams + { + public int Index; + + public string ThreadName; + + public string TriggerAddr; + + public string TriggerCmd; + + public VarType TriggerType; + + public string ResultAddr; + + public VarType ResultType; + + public bool IsRead; + + public string ReadAddr; + + public int ReadLength; + + public VarType ReadType; + } +} diff --git a/PLCCommunication/Entity/VarType.cs b/PLCCommunication/Entity/VarType.cs new file mode 100644 index 0000000..6045d55 --- /dev/null +++ b/PLCCommunication/Entity/VarType.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PLCCommunication +{ + public enum VarType + { + Bit, + Short, + Int, + Float, + String, + Byte + } + + +} diff --git a/PLCCommunication/FrmOmronPLCCom.Designer.cs b/PLCCommunication/FrmOmronPLCCom.Designer.cs new file mode 100644 index 0000000..a4ca8fa --- /dev/null +++ b/PLCCommunication/FrmOmronPLCCom.Designer.cs @@ -0,0 +1,86 @@ + +namespace PLCCommunication +{ + partial class FrmOmronPLCCom + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 窗体设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.tabCt_MePlcUI = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabCt_MePlcUI.SuspendLayout(); + this.SuspendLayout(); + // + // tabCt_MePlcUI + // + this.tabCt_MePlcUI.Controls.Add(this.tabPage1); + this.tabCt_MePlcUI.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabCt_MePlcUI.ItemSize = new System.Drawing.Size(85, 28); + this.tabCt_MePlcUI.Location = new System.Drawing.Point(0, 0); + this.tabCt_MePlcUI.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.tabCt_MePlcUI.Name = "tabCt_MePlcUI"; + this.tabCt_MePlcUI.SelectedIndex = 0; + this.tabCt_MePlcUI.Size = new System.Drawing.Size(1828, 974); + this.tabCt_MePlcUI.SizeMode = System.Windows.Forms.TabSizeMode.Fixed; + this.tabCt_MePlcUI.TabIndex = 1; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 32); + this.tabPage1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.tabPage1.Size = new System.Drawing.Size(1820, 938); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "1#通讯块"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // FrmOmronPLCCom + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(1828, 974); + this.Controls.Add(this.tabCt_MePlcUI); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.MaximizeBox = false; + this.Name = "FrmOmronPLCCom"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "欧姆龙PLC通讯"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmOmronPLCCom_FormClosing); + this.tabCt_MePlcUI.ResumeLayout(false); + this.ResumeLayout(false); + + } + + + #endregion + private System.Windows.Forms.TabControl tabCt_MePlcUI; + private System.Windows.Forms.TabPage tabPage1; + + } +} + diff --git a/PLCCommunication/FrmOmronPLCCom.cs b/PLCCommunication/FrmOmronPLCCom.cs new file mode 100644 index 0000000..a7ab8c1 --- /dev/null +++ b/PLCCommunication/FrmOmronPLCCom.cs @@ -0,0 +1,217 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace PLCCommunication +{ + public partial class FrmOmronPLCCom : Form + { + /// + /// 定义MelsecPLCUI自定义控件List集合 + /// + public List lstMcUI = new List(); + /// + /// 配置文件实体类 + /// + private List lstPLCConfig = new List(); + /// + /// PLC读取寄存器配置文件 + /// + private string ConfigPath = Path.Combine(System.Windows.Forms.Application.StartupPath, "Config\\PlcConfig.ini"); + + /// + /// 加载lstMcUI窗口次数 + /// + private int ComCount; + + public FrmOmronPLCCom(string path) + { + InitializeComponent(); + ConfigPath = path; + ComCount = int.Parse(new IniHelper(ConfigPath).IniReadValue("SystemConfig", "ComCount")); + ReadPlcConfig(ComCount); + LoadUI(ComCount); + } + + + /// + /// 读取配置文件 + /// + /// + public void ReadPlcConfig(int Count) + { + try + { + for (int j = 0; j < Count; j++) + { + PLCConfig plcConfig = new PLCConfig(); + plcConfig.Index = j + 1; + plcConfig.IP = new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", "IP"); + plcConfig.Port = int.Parse(new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", "Port")); + plcConfig.JobCount = int.Parse(new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", "JobCount")); + plcConfig.HeartBeat = bool.Parse(new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", "HeartBeat")); + plcConfig.HeartAddr = new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", "HeartAddr"); + plcConfig.ScanTime = int.Parse(new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", "ScanTime")); + plcConfig.Solt = int.Parse(new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", "Solt")); + List lstTgrParamsTemp = new List(); + for (int i = 0; i < plcConfig.JobCount; i++) + { + TriggerParams trigger = new TriggerParams(); + trigger.Index = i + 1; + trigger.ThreadName=new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", i + 1 + "#ThreadName"); + trigger.TriggerAddr = new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", i + 1 + "#RecvAddr"); + string recvType = new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", i + 1 + "#RecvType"); + trigger.TriggerType = (VarType)Enum.Parse(typeof(VarType), recvType, false); + string bb = new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", i + 1 + "#IsRead"); + + if (bb == "True") + { + trigger.IsRead = true; + } + else + { + trigger.IsRead = false; + } + + trigger.ReadAddr = new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", i + 1 + "#ReadAddr"); + trigger.ReadLength =Convert.ToInt16(new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", i + 1 + "#ReadLength")); + string readType = new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", i + 1 + "#ReadType"); + trigger.ReadType = (VarType)Enum.Parse(typeof(VarType), readType, false); + trigger.TriggerCmd = new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", i + 1 + "#TriggerCmd"); + trigger.ResultAddr = new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", i + 1 + "#WriteAddr"); + string writeype = new IniHelper(ConfigPath).IniReadValue(plcConfig.Index + "#PLCParameter", i + 1 + "#WriteType"); + trigger.ResultType = (VarType)Enum.Parse(typeof(VarType), writeype, false); + lstTgrParamsTemp.Add(trigger); + } + plcConfig.lstTgrParams = lstTgrParamsTemp; + lstPLCConfig.Add(plcConfig); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + + + /// + /// 加载MelsecPLCUI窗口 + /// + /// + public void LoadUI(int Count) + { + tabCt_MePlcUI.TabPages.Clear(); + for (int i = 0; i < Count; i++) + { + tabCt_MePlcUI.TabPages.Add(i + 1 + "#通讯模块"); + Panel panelUI = new Panel(); + panelUI.Dock = DockStyle.Fill; + tabCt_MePlcUI.TabPages[i].Controls.Add(panelUI); + OmronPLCUI plcUI = new OmronPLCUI(lstPLCConfig[i]); + plcUI.Dock = DockStyle.Fill; + plcUI.SaveParamsEvent += plcUI_SaveParamsEvent; + lstMcUI.Add(plcUI); + panelUI.Controls.Add(plcUI); + } + } + + + #region 参数保存 + /// + /// 循环保存参数 + /// + /// + /// + private void plcUI_SaveParamsEvent(int plcIndex, int trgIndex) + { + if (trgIndex == 0) + { + for (int i = 0; i < lstMcUI[plcIndex - 1].JobCount; i++) + { + SaveTrgParam(plcIndex, i + 1, lstMcUI[plcIndex - 1].lstTrgUI[i].TrgParams); + } + SavePLCParam(plcIndex); + } + else + { + SaveTrgParam(plcIndex, trgIndex, lstMcUI[plcIndex - 1].lstTrgUI[trgIndex - 1].TrgParams); + } + } + /// + /// 界面设置参数写入到配置文件 + /// + /// + /// + /// + public void SaveTrgParam(int plcIndex, int trgIndex, TriggerParams triggerParams) + { + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", trgIndex + "#RecvAddr", triggerParams.TriggerAddr); + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", trgIndex + "#RecvType", triggerParams.TriggerType.ToString()); + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", trgIndex + "#WriteAddr", triggerParams.ResultAddr); + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", trgIndex + "#WriteType", triggerParams.ResultType.ToString()); + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", trgIndex + "#TriggerCmd", triggerParams.TriggerCmd); + if (triggerParams.IsRead) + { + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", trgIndex + "#IsRead", "True"); + } + else + { + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", trgIndex + "#IsRead", "False"); + } + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", trgIndex + "#IsRead", triggerParams.IsRead==true?"True":"False"); + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", trgIndex + "#ReadAddr", triggerParams.ReadAddr); + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", trgIndex + "#ReadType", triggerParams.ReadType.ToString()); + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", trgIndex + "#ReadLength", triggerParams.ReadLength.ToString()); + } + + /// + /// + /// + /// + public void SavePLCParam(int plcIndex) + { + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", "Index", lstMcUI[plcIndex - 1].PlcConfig.Index.ToString()); + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", "IP", lstMcUI[plcIndex - 1].PlcConfig.IP.ToString()); + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", "Port", lstMcUI[plcIndex - 1].PlcConfig.Port.ToString()); + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", "JobCount", lstMcUI[plcIndex - 1].PlcConfig.JobCount.ToString()); + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", "HeartBeat", lstMcUI[plcIndex - 1].PlcConfig.HeartBeat.ToString()); + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", "HeartAddr", lstMcUI[plcIndex - 1].PlcConfig.HeartAddr.ToString()); + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", "ScanTime", lstMcUI[plcIndex - 1].PlcConfig.ScanTime.ToString()); + new IniHelper(ConfigPath).IniWriteValue(plcIndex + "#PLCParameter", "Solt", lstMcUI[plcIndex - 1].PlcConfig.Solt.ToString()); + } + + #endregion + + /// + /// 关闭lstMcUI窗口 + /// + public void ShutDown() + { + for (int i = 0; i < ComCount; i++) + { + if (lstMcUI[i] != null) + { + lstMcUI[i].Shutdown(); + } + } + } + + /// + /// 关闭本窗口 + /// + /// + /// + private void FrmOmronPLCCom_FormClosing(object sender, FormClosingEventArgs e) + { + this.Visible = false; + e.Cancel = true; + } + } +} diff --git a/PLCCommunication/FrmOmronPLCCom.resx b/PLCCommunication/FrmOmronPLCCom.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/PLCCommunication/FrmOmronPLCCom.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/PLCCommunication/OmronPLCUI.Designer.cs b/PLCCommunication/OmronPLCUI.Designer.cs new file mode 100644 index 0000000..5cb15b4 --- /dev/null +++ b/PLCCommunication/OmronPLCUI.Designer.cs @@ -0,0 +1,848 @@ + +using System.Windows.Forms; + +namespace PLCCommunication +{ + partial class OmronPLCUI + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OmronPLCUI)); + this.label2 = new System.Windows.Forms.Label(); + this.txtReadTestLength = new System.Windows.Forms.TextBox(); + this.txtWriteValue = new System.Windows.Forms.TextBox(); + this.cbTest = new System.Windows.Forms.CheckBox(); + this.label9 = new System.Windows.Forms.Label(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.lstResWrite = new System.Windows.Forms.ListView(); + this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.imageList1 = new System.Windows.Forms.ImageList(this.components); + this.lstSend = new System.Windows.Forms.ListView(); + this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.btnClearRecv = new System.Windows.Forms.Button(); + this.cbDispCurrent = new System.Windows.Forms.CheckBox(); + this.lstTrgCmd = new System.Windows.Forms.ListView(); + this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.lstRecv = new System.Windows.Forms.ListView(); + this.InfoTime = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.InfoContent = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.button1 = new System.Windows.Forms.Button(); + this.txtReadResultTest = new System.Windows.Forms.TextBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.txtSolt = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.btnStart = new System.Windows.Forms.Button(); + this.btnSaveConfig = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.txtPort = new System.Windows.Forms.TextBox(); + this.label26 = new System.Windows.Forms.Label(); + this.txtIP = new System.Windows.Forms.TextBox(); + this.label27 = new System.Windows.Forms.Label(); + this.BtnDisConnect = new System.Windows.Forms.Button(); + this.BtnConnect = new System.Windows.Forms.Button(); + this.PanelTest = new System.Windows.Forms.Panel(); + this.lblTip = new System.Windows.Forms.Label(); + this.BtnWriteTest = new System.Windows.Forms.Button(); + this.label7 = new System.Windows.Forms.Label(); + this.cboReadType = new System.Windows.Forms.ComboBox(); + this.txtReadAddrTest = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.BtnReadTest = new System.Windows.Forms.Button(); + this.gb_RWTest = new System.Windows.Forms.GroupBox(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label3 = new System.Windows.Forms.Label(); + this.txtHeartAddr = new System.Windows.Forms.TextBox(); + this.cbHeartBeat = new System.Windows.Forms.CheckBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.tabConTrgUI = new System.Windows.Forms.TabControl(); + this.skinTabPage1 = new System.Windows.Forms.TabPage(); + this.skinTabPage2 = new System.Windows.Forms.TabPage(); + this.lblConnectStatus = new System.Windows.Forms.PictureBox(); + this.groupBox3.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.panel1.SuspendLayout(); + this.PanelTest.SuspendLayout(); + this.gb_RWTest.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.tabConTrgUI.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.lblConnectStatus)).BeginInit(); + this.SuspendLayout(); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(8, 198); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(89, 20); + this.label2.TabIndex = 24; + this.label2.Text = "写入值:"; + // + // txtReadTestLength + // + this.txtReadTestLength.Font = new System.Drawing.Font("黑体", 12.75F); + this.txtReadTestLength.Location = new System.Drawing.Point(505, 124); + this.txtReadTestLength.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtReadTestLength.Name = "txtReadTestLength"; + this.txtReadTestLength.Size = new System.Drawing.Size(153, 32); + this.txtReadTestLength.TabIndex = 22; + this.txtReadTestLength.Text = "1"; + // + // txtWriteValue + // + this.txtWriteValue.Font = new System.Drawing.Font("宋体", 12F); + this.txtWriteValue.Location = new System.Drawing.Point(111, 194); + this.txtWriteValue.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtWriteValue.Name = "txtWriteValue"; + this.txtWriteValue.Size = new System.Drawing.Size(357, 30); + this.txtWriteValue.TabIndex = 23; + this.txtWriteValue.Text = "1"; + // + // cbTest + // + this.cbTest.AutoSize = true; + this.cbTest.Location = new System.Drawing.Point(156, 0); + this.cbTest.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.cbTest.Name = "cbTest"; + this.cbTest.Size = new System.Drawing.Size(66, 21); + this.cbTest.TabIndex = 13; + this.cbTest.Text = "测试"; + this.cbTest.UseVisualStyleBackColor = true; + this.cbTest.CheckedChanged += new System.EventHandler(this.cbTest_CheckedChanged); + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(501, 88); + this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(120, 22); + this.label9.TabIndex = 25; + this.label9.Text = "读取长度:"; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.lstResWrite); + this.groupBox3.Controls.Add(this.lstSend); + this.groupBox3.Font = new System.Drawing.Font("黑体", 10F); + this.groupBox3.Location = new System.Drawing.Point(727, 372); + this.groupBox3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox3.Size = new System.Drawing.Size(1085, 474); + this.groupBox3.TabIndex = 18; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "发送显示"; + // + // lstResWrite + // + this.lstResWrite.BackColor = System.Drawing.SystemColors.Control; + this.lstResWrite.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader5, + this.columnHeader6}); + this.lstResWrite.Font = new System.Drawing.Font("宋体", 9F); + this.lstResWrite.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.lstResWrite.HideSelection = false; + this.lstResWrite.Location = new System.Drawing.Point(516, 16); + this.lstResWrite.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.lstResWrite.Name = "lstResWrite"; + this.lstResWrite.Size = new System.Drawing.Size(551, 449); + this.lstResWrite.SmallImageList = this.imageList1; + this.lstResWrite.TabIndex = 23; + this.lstResWrite.UseCompatibleStateImageBehavior = false; + this.lstResWrite.View = System.Windows.Forms.View.Details; + // + // columnHeader5 + // + this.columnHeader5.Width = 220; + // + // columnHeader6 + // + this.columnHeader6.Width = 600; + // + // imageList1 + // + this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); + this.imageList1.TransparentColor = System.Drawing.Color.Transparent; + this.imageList1.Images.SetKeyName(0, "info.png"); + this.imageList1.Images.SetKeyName(1, "error.png"); + // + // lstSend + // + this.lstSend.BackColor = System.Drawing.SystemColors.Control; + this.lstSend.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2}); + this.lstSend.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lstSend.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.lstSend.HideSelection = false; + this.lstSend.Location = new System.Drawing.Point(3, 16); + this.lstSend.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.lstSend.Name = "lstSend"; + this.lstSend.Size = new System.Drawing.Size(504, 449); + this.lstSend.SmallImageList = this.imageList1; + this.lstSend.TabIndex = 22; + this.lstSend.UseCompatibleStateImageBehavior = false; + this.lstSend.View = System.Windows.Forms.View.Details; + // + // columnHeader1 + // + this.columnHeader1.Width = 220; + // + // columnHeader2 + // + this.columnHeader2.Width = 400; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.btnClearRecv); + this.groupBox2.Controls.Add(this.cbDispCurrent); + this.groupBox2.Controls.Add(this.lstTrgCmd); + this.groupBox2.Controls.Add(this.lstRecv); + this.groupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.groupBox2.Font = new System.Drawing.Font("黑体", 10F); + this.groupBox2.Location = new System.Drawing.Point(727, 71); + this.groupBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox2.Size = new System.Drawing.Size(1085, 294); + this.groupBox2.TabIndex = 17; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "接收显示"; + // + // btnClearRecv + // + this.btnClearRecv.BackColor = System.Drawing.SystemColors.ControlDark; + this.btnClearRecv.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnClearRecv.Font = new System.Drawing.Font("黑体", 9F); + this.btnClearRecv.Location = new System.Drawing.Point(257, -4); + this.btnClearRecv.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnClearRecv.Name = "btnClearRecv"; + this.btnClearRecv.Size = new System.Drawing.Size(104, 28); + this.btnClearRecv.TabIndex = 22; + this.btnClearRecv.Text = "清空接收"; + this.btnClearRecv.UseVisualStyleBackColor = false; + this.btnClearRecv.Click += new System.EventHandler(this.btnClearRecv_Click); + // + // cbDispCurrent + // + this.cbDispCurrent.AutoSize = true; + this.cbDispCurrent.Location = new System.Drawing.Point(115, 0); + this.cbDispCurrent.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.cbDispCurrent.Name = "cbDispCurrent"; + this.cbDispCurrent.Size = new System.Drawing.Size(102, 21); + this.cbDispCurrent.TabIndex = 23; + this.cbDispCurrent.Text = "显示实时"; + this.cbDispCurrent.UseVisualStyleBackColor = true; + this.cbDispCurrent.CheckedChanged += new System.EventHandler(this.cbDispCurrent_CheckedChanged); + // + // lstTrgCmd + // + this.lstTrgCmd.BackColor = System.Drawing.SystemColors.Control; + this.lstTrgCmd.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader3, + this.columnHeader4}); + this.lstTrgCmd.Font = new System.Drawing.Font("宋体", 9F); + this.lstTrgCmd.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.lstTrgCmd.HideSelection = false; + this.lstTrgCmd.Location = new System.Drawing.Point(515, 28); + this.lstTrgCmd.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.lstTrgCmd.Name = "lstTrgCmd"; + this.lstTrgCmd.Size = new System.Drawing.Size(561, 258); + this.lstTrgCmd.SmallImageList = this.imageList1; + this.lstTrgCmd.TabIndex = 22; + this.lstTrgCmd.UseCompatibleStateImageBehavior = false; + this.lstTrgCmd.View = System.Windows.Forms.View.Details; + // + // columnHeader3 + // + this.columnHeader3.Width = 220; + // + // columnHeader4 + // + this.columnHeader4.Width = 600; + // + // lstRecv + // + this.lstRecv.BackColor = System.Drawing.SystemColors.Control; + this.lstRecv.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.InfoTime, + this.InfoContent}); + this.lstRecv.Font = new System.Drawing.Font("宋体", 9F); + this.lstRecv.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.lstRecv.HideSelection = false; + this.lstRecv.Location = new System.Drawing.Point(8, 28); + this.lstRecv.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.lstRecv.Name = "lstRecv"; + this.lstRecv.Size = new System.Drawing.Size(499, 258); + this.lstRecv.SmallImageList = this.imageList1; + this.lstRecv.TabIndex = 21; + this.lstRecv.UseCompatibleStateImageBehavior = false; + this.lstRecv.View = System.Windows.Forms.View.Details; + // + // InfoTime + // + this.InfoTime.Width = 220; + // + // InfoContent + // + this.InfoContent.Width = 400; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(1004, 0); + this.button1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(139, 44); + this.button1.TabIndex = 34; + this.button1.Text = "启动"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Visible = false; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // txtReadResultTest + // + this.txtReadResultTest.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtReadResultTest.Location = new System.Drawing.Point(111, 54); + this.txtReadResultTest.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtReadResultTest.Multiline = true; + this.txtReadResultTest.Name = "txtReadResultTest"; + this.txtReadResultTest.Size = new System.Drawing.Size(365, 105); + this.txtReadResultTest.TabIndex = 19; + // + // panel1 + // + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.lblConnectStatus); + this.panel1.Controls.Add(this.button1); + this.panel1.Controls.Add(this.txtSolt); + this.panel1.Controls.Add(this.label4); + this.panel1.Controls.Add(this.btnStart); + this.panel1.Controls.Add(this.btnSaveConfig); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.txtPort); + this.panel1.Controls.Add(this.label26); + this.panel1.Controls.Add(this.txtIP); + this.panel1.Controls.Add(this.label27); + this.panel1.Controls.Add(this.BtnDisConnect); + this.panel1.Controls.Add(this.BtnConnect); + this.panel1.Font = new System.Drawing.Font("宋体", 9F); + this.panel1.Location = new System.Drawing.Point(16, 5); + this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(1795, 56); + this.panel1.TabIndex = 15; + // + // txtSolt + // + this.txtSolt.Font = new System.Drawing.Font("黑体", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtSolt.Location = new System.Drawing.Point(508, 15); + this.txtSolt.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtSolt.Name = "txtSolt"; + this.txtSolt.Size = new System.Drawing.Size(71, 32); + this.txtSolt.TabIndex = 26; + this.txtSolt.Text = "0"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("黑体", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label4.Location = new System.Drawing.Point(417, 20); + this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(76, 22); + this.label4.TabIndex = 25; + this.label4.Text = "Solt:"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnStart + // + this.btnStart.Font = new System.Drawing.Font("黑体", 12.75F); + this.btnStart.Location = new System.Drawing.Point(787, 5); + this.btnStart.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnStart.Name = "btnStart"; + this.btnStart.Size = new System.Drawing.Size(127, 44); + this.btnStart.TabIndex = 24; + this.btnStart.Text = "启动"; + this.btnStart.UseVisualStyleBackColor = true; + this.btnStart.Click += new System.EventHandler(this.btnStart_Click); + // + // btnSaveConfig + // + this.btnSaveConfig.Font = new System.Drawing.Font("黑体", 12.75F); + this.btnSaveConfig.Location = new System.Drawing.Point(617, 5); + this.btnSaveConfig.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnSaveConfig.Name = "btnSaveConfig"; + this.btnSaveConfig.Size = new System.Drawing.Size(127, 44); + this.btnSaveConfig.TabIndex = 23; + this.btnSaveConfig.Text = "保存配置"; + this.btnSaveConfig.UseVisualStyleBackColor = true; + this.btnSaveConfig.Click += new System.EventHandler(this.btnSaveConfig_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("黑体", 10F); + this.label1.Location = new System.Drawing.Point(1169, 15); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(98, 17); + this.label1.TabIndex = 20; + this.label1.Text = "连接状态:"; + // + // txtPort + // + this.txtPort.Font = new System.Drawing.Font("黑体", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtPort.Location = new System.Drawing.Point(319, 15); + this.txtPort.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtPort.Name = "txtPort"; + this.txtPort.Size = new System.Drawing.Size(71, 32); + this.txtPort.TabIndex = 19; + this.txtPort.Text = "44818"; + // + // label26 + // + this.label26.AutoSize = true; + this.label26.Font = new System.Drawing.Font("黑体", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label26.Location = new System.Drawing.Point(252, 22); + this.label26.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(76, 22); + this.label26.TabIndex = 18; + this.label26.Text = "端口:"; + // + // txtIP + // + this.txtIP.Font = new System.Drawing.Font("黑体", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtIP.Location = new System.Drawing.Point(84, 15); + this.txtIP.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtIP.Name = "txtIP"; + this.txtIP.Size = new System.Drawing.Size(159, 32); + this.txtIP.TabIndex = 17; + this.txtIP.Text = "192.168.1.50"; + // + // label27 + // + this.label27.AutoSize = true; + this.label27.Font = new System.Drawing.Font("黑体", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label27.Location = new System.Drawing.Point(0, 20); + this.label27.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(98, 22); + this.label27.TabIndex = 16; + this.label27.Text = "IP地址:"; + this.label27.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // BtnDisConnect + // + this.BtnDisConnect.Enabled = false; + this.BtnDisConnect.Font = new System.Drawing.Font("黑体", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.BtnDisConnect.Location = new System.Drawing.Point(1611, 4); + this.BtnDisConnect.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.BtnDisConnect.Name = "BtnDisConnect"; + this.BtnDisConnect.Size = new System.Drawing.Size(127, 44); + this.BtnDisConnect.TabIndex = 5; + this.BtnDisConnect.Text = "断开连接"; + this.BtnDisConnect.UseVisualStyleBackColor = true; + this.BtnDisConnect.Click += new System.EventHandler(this.BtnDisConnect_Click); + // + // BtnConnect + // + this.BtnConnect.Font = new System.Drawing.Font("黑体", 12.75F); + this.BtnConnect.Location = new System.Drawing.Point(1459, 4); + this.BtnConnect.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.BtnConnect.Name = "BtnConnect"; + this.BtnConnect.Size = new System.Drawing.Size(127, 44); + this.BtnConnect.TabIndex = 4; + this.BtnConnect.Text = "开始连接"; + this.BtnConnect.UseVisualStyleBackColor = true; + this.BtnConnect.Click += new System.EventHandler(this.BtnConnect_Click); + // + // PanelTest + // + this.PanelTest.Controls.Add(this.txtWriteValue); + this.PanelTest.Controls.Add(this.lblTip); + this.PanelTest.Controls.Add(this.label9); + this.PanelTest.Controls.Add(this.label2); + this.PanelTest.Controls.Add(this.txtReadTestLength); + this.PanelTest.Controls.Add(this.txtReadResultTest); + this.PanelTest.Controls.Add(this.BtnWriteTest); + this.PanelTest.Controls.Add(this.label7); + this.PanelTest.Controls.Add(this.cboReadType); + this.PanelTest.Controls.Add(this.txtReadAddrTest); + this.PanelTest.Controls.Add(this.label6); + this.PanelTest.Controls.Add(this.BtnReadTest); + this.PanelTest.Font = new System.Drawing.Font("黑体", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.PanelTest.Location = new System.Drawing.Point(8, 36); + this.PanelTest.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.PanelTest.Name = "PanelTest"; + this.PanelTest.Size = new System.Drawing.Size(681, 246); + this.PanelTest.TabIndex = 1; + // + // lblTip + // + this.lblTip.AutoSize = true; + this.lblTip.Location = new System.Drawing.Point(108, 169); + this.lblTip.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblTip.Name = "lblTip"; + this.lblTip.Size = new System.Drawing.Size(252, 22); + this.lblTip.TabIndex = 26; + this.lblTip.Text = "(多个写入时用\',\'隔开)"; + // + // BtnWriteTest + // + this.BtnWriteTest.Location = new System.Drawing.Point(500, 194); + this.BtnWriteTest.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.BtnWriteTest.Name = "BtnWriteTest"; + this.BtnWriteTest.Size = new System.Drawing.Size(160, 38); + this.BtnWriteTest.TabIndex = 21; + this.BtnWriteTest.Text = "写入"; + this.BtnWriteTest.UseVisualStyleBackColor = true; + this.BtnWriteTest.Click += new System.EventHandler(this.BtnWriteTest_Click); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("黑体", 12F); + this.label7.Location = new System.Drawing.Point(23, 64); + this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(69, 20); + this.label7.TabIndex = 18; + this.label7.Text = "结果:"; + // + // cboReadType + // + this.cboReadType.FormattingEnabled = true; + this.cboReadType.Location = new System.Drawing.Point(316, 14); + this.cboReadType.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.cboReadType.Name = "cboReadType"; + this.cboReadType.Size = new System.Drawing.Size(160, 29); + this.cboReadType.TabIndex = 17; + // + // txtReadAddrTest + // + this.txtReadAddrTest.Font = new System.Drawing.Font("黑体", 12.75F); + this.txtReadAddrTest.Location = new System.Drawing.Point(112, 14); + this.txtReadAddrTest.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtReadAddrTest.Name = "txtReadAddrTest"; + this.txtReadAddrTest.Size = new System.Drawing.Size(175, 32); + this.txtReadAddrTest.TabIndex = 16; + this.txtReadAddrTest.Text = "W1000"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("黑体", 12F); + this.label6.Location = new System.Drawing.Point(23, 16); + this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(69, 20); + this.label6.TabIndex = 15; + this.label6.Text = "地址:"; + // + // BtnReadTest + // + this.BtnReadTest.Font = new System.Drawing.Font("黑体", 12.75F); + this.BtnReadTest.Location = new System.Drawing.Point(505, 8); + this.BtnReadTest.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.BtnReadTest.Name = "BtnReadTest"; + this.BtnReadTest.Size = new System.Drawing.Size(159, 39); + this.BtnReadTest.TabIndex = 20; + this.BtnReadTest.Text = "读取"; + this.BtnReadTest.UseVisualStyleBackColor = true; + this.BtnReadTest.Click += new System.EventHandler(this.BtnReadTest_Click); + // + // gb_RWTest + // + this.gb_RWTest.Controls.Add(this.PanelTest); + this.gb_RWTest.Controls.Add(this.cbTest); + this.gb_RWTest.Font = new System.Drawing.Font("黑体", 10F); + this.gb_RWTest.Location = new System.Drawing.Point(16, 70); + this.gb_RWTest.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.gb_RWTest.Name = "gb_RWTest"; + this.gb_RWTest.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.gb_RWTest.Size = new System.Drawing.Size(703, 295); + this.gb_RWTest.TabIndex = 16; + this.gb_RWTest.TabStop = false; + this.gb_RWTest.Text = "读写测试"; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.label3); + this.groupBox4.Controls.Add(this.txtHeartAddr); + this.groupBox4.Controls.Add(this.cbHeartBeat); + this.groupBox4.Font = new System.Drawing.Font("黑体", 10F); + this.groupBox4.Location = new System.Drawing.Point(16, 781); + this.groupBox4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox4.Size = new System.Drawing.Size(703, 65); + this.groupBox4.TabIndex = 20; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "心跳包设置"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("黑体", 10F); + this.label3.Location = new System.Drawing.Point(44, 31); + this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(116, 17); + this.label3.TabIndex = 25; + this.label3.Text = "心跳包地址:"; + // + // txtHeartAddr + // + this.txtHeartAddr.Font = new System.Drawing.Font("黑体", 12.75F); + this.txtHeartAddr.Location = new System.Drawing.Point(173, 24); + this.txtHeartAddr.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtHeartAddr.Name = "txtHeartAddr"; + this.txtHeartAddr.Size = new System.Drawing.Size(149, 32); + this.txtHeartAddr.TabIndex = 24; + this.txtHeartAddr.Text = "W100"; + this.txtHeartAddr.TextChanged += new System.EventHandler(this.txtHeartAddr_TextChanged); + // + // cbHeartBeat + // + this.cbHeartBeat.AutoSize = true; + this.cbHeartBeat.Location = new System.Drawing.Point(347, 29); + this.cbHeartBeat.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.cbHeartBeat.Name = "cbHeartBeat"; + this.cbHeartBeat.Size = new System.Drawing.Size(66, 21); + this.cbHeartBeat.TabIndex = 0; + this.cbHeartBeat.Text = "启用"; + this.cbHeartBeat.UseVisualStyleBackColor = true; + this.cbHeartBeat.CheckedChanged += new System.EventHandler(this.cbHeartBeat_CheckedChanged); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.tabConTrgUI); + this.groupBox1.Font = new System.Drawing.Font("黑体", 10F); + this.groupBox1.Location = new System.Drawing.Point(16, 372); + this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox1.Size = new System.Drawing.Size(703, 399); + this.groupBox1.TabIndex = 21; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "参数设置"; + // + // tabConTrgUI + // + this.tabConTrgUI.Controls.Add(this.skinTabPage1); + this.tabConTrgUI.Controls.Add(this.skinTabPage2); + this.tabConTrgUI.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabConTrgUI.Font = new System.Drawing.Font("宋体", 9F); + this.tabConTrgUI.ItemSize = new System.Drawing.Size(85, 28); + this.tabConTrgUI.Location = new System.Drawing.Point(4, 24); + this.tabConTrgUI.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.tabConTrgUI.Name = "tabConTrgUI"; + this.tabConTrgUI.SelectedIndex = 0; + this.tabConTrgUI.Size = new System.Drawing.Size(695, 371); + this.tabConTrgUI.SizeMode = System.Windows.Forms.TabSizeMode.Fixed; + this.tabConTrgUI.TabIndex = 0; + // + // skinTabPage1 + // + this.skinTabPage1.BackColor = System.Drawing.Color.White; + this.skinTabPage1.Dock = System.Windows.Forms.DockStyle.Fill; + this.skinTabPage1.Font = new System.Drawing.Font("宋体", 9F); + this.skinTabPage1.Location = new System.Drawing.Point(4, 32); + this.skinTabPage1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.skinTabPage1.Name = "skinTabPage1"; + this.skinTabPage1.Size = new System.Drawing.Size(687, 335); + this.skinTabPage1.TabIndex = 0; + this.skinTabPage1.Text = "skinTabPage1"; + // + // skinTabPage2 + // + this.skinTabPage2.BackColor = System.Drawing.Color.White; + this.skinTabPage2.Dock = System.Windows.Forms.DockStyle.Fill; + this.skinTabPage2.Font = new System.Drawing.Font("宋体", 9F); + this.skinTabPage2.Location = new System.Drawing.Point(4, 32); + this.skinTabPage2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.skinTabPage2.Name = "skinTabPage2"; + this.skinTabPage2.Size = new System.Drawing.Size(687, 335); + this.skinTabPage2.TabIndex = 1; + this.skinTabPage2.Text = "skinTabPage2"; + // + // lblConnectStatus + // + this.lblConnectStatus.Image = global::PLCCommunication.Properties.Resources.red; + this.lblConnectStatus.Location = new System.Drawing.Point(1294, 3); + this.lblConnectStatus.Name = "lblConnectStatus"; + this.lblConnectStatus.Size = new System.Drawing.Size(50, 50); + this.lblConnectStatus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.lblConnectStatus.TabIndex = 35; + this.lblConnectStatus.TabStop = false; + // + // OmronPLCUI + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox4); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.panel1); + this.Controls.Add(this.gb_RWTest); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Name = "OmronPLCUI"; + this.Size = new System.Drawing.Size(1819, 856); + this.Load += new System.EventHandler(this.MelsecPLCUI_Load); + this.groupBox3.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.PanelTest.ResumeLayout(false); + this.PanelTest.PerformLayout(); + this.gb_RWTest.ResumeLayout(false); + this.gb_RWTest.PerformLayout(); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.tabConTrgUI.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.lblConnectStatus)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private Label label2; + + private TextBox txtReadTestLength; + + private TextBox txtWriteValue; + + private CheckBox cbTest; + + private Label label9; + + private GroupBox groupBox3; + + private GroupBox groupBox2; + + private TextBox txtReadResultTest; + + private Panel panel1; + + private TextBox txtPort; + + private Label label26; + + private TextBox txtIP; + + private Label label27; + + private Button BtnDisConnect; + + private Button BtnConnect; + + private Panel PanelTest; + + private Button BtnWriteTest; + + private Label label7; + + private ComboBox cboReadType; + + private TextBox txtReadAddrTest; + + private Label label6; + + private Button BtnReadTest; + + private GroupBox gb_RWTest; + + private Label label1; + + private GroupBox groupBox4; + + private Label label3; + + private TextBox txtHeartAddr; + + private CheckBox cbHeartBeat; + + private ListView lstSend; + + private ColumnHeader columnHeader1; + + private ColumnHeader columnHeader2; + + private ListView lstRecv; + + private ColumnHeader InfoTime; + + private ColumnHeader InfoContent; + + private ImageList imageList1; + + private Button btnClearRecv; + + private Label lblTip; + + private GroupBox groupBox1; + + private Button btnSaveConfig; + + private ListView lstTrgCmd; + + private ColumnHeader columnHeader3; + + private ColumnHeader columnHeader4; + + private ListView lstResWrite; + + private ColumnHeader columnHeader5; + + private ColumnHeader columnHeader6; + + private CheckBox cbDispCurrent; + + public Button btnStart; + private System.Windows.Forms.TabControl tabConTrgUI; + private System.Windows.Forms.TabPage skinTabPage1; + private System.Windows.Forms.TabPage skinTabPage2; + public Button button1; + private TextBox txtSolt; + private Label label4; + private PictureBox lblConnectStatus; + } +} diff --git a/PLCCommunication/OmronPLCUI.cs b/PLCCommunication/OmronPLCUI.cs new file mode 100644 index 0000000..f2f526b --- /dev/null +++ b/PLCCommunication/OmronPLCUI.cs @@ -0,0 +1,1472 @@ +using HslCommunication; +using HslCommunication.Profinet.Omron; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace PLCCommunication +{ + + // 摘要: + // 欧姆龙PLC通讯类,采用Fins-Tcp通信协议实现,支持的地址信息参见api文档信息。 + // Omron PLC communication class is implemented using Fins-Tcp communication protocol. + // For the supported address information, please refer to the api document information. + // + // 言论: + // 实例化之后,使用之前,需要初始化三个参数信息,具体见三个参数的说明:HslCommunication.Profinet.Omron.OmronFinsNet.SA1,HslCommunication.Profinet.Omron.OmronFinsNet.DA1,HslCommunication.Profinet.Omron.OmronFinsNet.DA2 + // 第二个需要注意的是,当网络异常掉线时,无法立即连接上PLC,PLC对于当前的节点进行拒绝,如果想要支持在断线后的快速连接,就需要将 HslCommunication.Profinet.Omron.OmronFinsNet.IsChangeSA1AfterReadFailed设置为True,详细的可以参考 + // HslCommunication.Profinet.Omron.OmronFinsNet.IsChangeSA1AfterReadFailed + // 如果在测试的时候报错误码64,经网友 上海-Lex 指点,是因为PLC中产生了报警,如伺服报警,模块错误等产生的,但是数据还是能正常读到的,屏蔽64报警或清除plc错误可解决 + // 地址支持的列表如下: + // 地址名称 – 地址代号 – 示例 – 地址进制 – 字操作 – 位操作 – 备注 – + // DM Area – D – D100,D200 – 10 – √ – √ – – + // CIO Area – C – C100,C200 – 10 – √ – √ – – + // Work Area – W – W100,W200 – 10 – √ – √ – – + // Holding Bit Area – H – H100,H200 – 10 – √ – √ – – + // Auxiliary Bit Area – A – A100,A200 – 10 – √ – √ – – + // EM Area – E – E0.0,EF.200,E10.100 – 10 – √ – √ – – + + public partial class OmronPLCUI : UserControl + { + /// + /// 批量读取PLC数据委托 + /// + /// + /// + /// + public delegate void ReceiveHandler(int Index, string msg, OperateResult resByte); + public event ReceiveHandler ReceiveEvent; + + + /// + /// 读取PLC心跳消息状态至主窗口委托 + /// + /// + public delegate void UpHeartBeatHandler(bool b); + public event UpHeartBeatHandler UpHeartBeatEvent; + + /// + /// 保存配置事件委托 + /// + /// + /// + public delegate void SaveParamsHandler(int plcIndex, int trgIndex); + public event SaveParamsHandler SaveParamsEvent; + + public int Index; + /// + /// 欧姆龙Fins协议 + /// + public HslCommunication.Profinet.Omron.OmronCipNet omronCipNet = null; + /// + /// 是否链接PLC + /// + private bool _isConnected = false; + /// + /// 是否开启心跳消息 + /// + private bool _heartBeat = false; + /// + /// 断线后是否更换SA1的值 + /// + private bool _changesa1 = false; + /// + /// 心跳消息寄存器地址 + /// + private string _heartAddr = "100"; + /// + /// + /// + public Dictionary dicJobToTrgParams = new Dictionary(); + /// + /// + /// + public List lstTrgUI = new List(); + /// + /// + /// + public List lstTgrParams = new List(); + /// + /// + /// + public PLCConfig PlcConfig = new PLCConfig(); + /// + /// + /// + public CancellationTokenSource mCTSRecv = new CancellationTokenSource(); + public CancellationTokenSource mCTSHeart = new CancellationTokenSource(); + private ManualResetEvent resetEventRecv = new ManualResetEvent(true); + private ManualResetEvent resetEventHeart = new ManualResetEvent(true); + + /// + /// + /// + public bool IsConnected + { + get + { + return _isConnected; + } + set + { + _isConnected = value; + if (_isConnected) + { + //lblConnectStatus.ForeColor = Color.Green; + lblConnectStatus.Image = Properties.Resources.green; + + } + else + { + lblConnectStatus.Image = Properties.Resources.red; + } + } + } + + /// + /// + /// + public bool IsRun { get; set; } = false; + /// + /// + /// + private string CurrentTime => DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss:fff"); + + public bool HeartBeat + { + get + { + return _heartBeat; + } + set + { + _heartBeat = value; + } + } + + public bool ChangeSA1 + { + get + { + return _changesa1; + } + set + { + _changesa1 = value; + } + } + + + public string HeartAddr + { + get + { + return _heartAddr; + } + set + { + _heartAddr = value; + txtHeartAddr.Text = value.ToString(); + } + } + + /// + /// 读取PLC数据线程等待时间 + /// + public int ScanTime { get; set; } = 100; + public int JobCount { get; set; } + /// + /// PLCIP地址 + /// + public string IP { get; set; } + /// + /// PLC端口 + /// + public int Port { get; set; } + public bool DispCurrent { get; set; } = false; + + + + public OmronPLCUI() + { + InitializeComponent(); + omronCipNet = new OmronCipNet(); + omronCipNet.ConnectTimeOut = 2000; + PanelTest.Enabled = false; + } + + public OmronPLCUI(PLCConfig plcConfig) + : this() + { + PlcConfig = plcConfig; + Index = plcConfig.Index; + IP = plcConfig.IP; + Port = plcConfig.Port; + JobCount = plcConfig.JobCount; + ScanTime = plcConfig.ScanTime; + HeartBeat = plcConfig.HeartBeat; + ChangeSA1 = plcConfig.ChangeSA1; + lstTgrParams = plcConfig.lstTgrParams; + _heartAddr = plcConfig.HeartAddr; + + InitialTiggerModule(lstTgrParams); + cboReadType.DataSource = Enum.GetNames(typeof(VarType)); + cboReadType.SelectedIndex = 0; + if (HeartBeat) + { + cbHeartBeat.Checked = true; + } + else + { + cbHeartBeat.Checked = false; + } + + txtIP.Text = PlcConfig.IP.Trim(); + txtPort.Text = PlcConfig.Port.ToString(); + txtHeartAddr.Text = PlcConfig.HeartAddr; + txtSolt.Text = PlcConfig.Solt.ToString(); + InitialAndConnect(); + Task HeartTask = Task.Factory.StartNew(delegate { CheckHeart(); }, mCTSHeart.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default); + if (!IsRun) + { + resetEventRecv.Reset(); + } + SetStyle(ControlStyles.UserPaint, true); + SetStyle(ControlStyles.AllPaintingInWmPaint, true); + SetStyle(ControlStyles.DoubleBuffer, true); + } + + + private void MelsecPLCUI_Load(object sender, EventArgs e) + { + List ipv4_ips = GetLocalIpAddress("InterNetwork");//获取ipv4类型的ip + //string da = ipv4_ips[0].LastIndexOf('.')-1; + } + + + //List ips = GetLocalIpAddress("");//获取本地所有ip + //List ipv4_ips = GetLocalIpAddress("InterNetwork");//获取ipv4类型的ip + //List ipv6_ips = GetLocalIpAddress("InterNetworkV6");//获取ipv6类型的ip + + /// + /// 获取本机所有ip地址 + /// + /// "InterNetwork":ipv4地址,"InterNetworkV6":ipv6地址 + /// ip地址集合 + public static List GetLocalIpAddress(string netType) + { + string hostName = Dns.GetHostName(); //获取主机名称 + IPAddress[] addresses = Dns.GetHostAddresses(hostName); //解析主机IP地址 + + List IPList = new List(); + if (netType == string.Empty) + { + for (int i = 0; i < addresses.Length; i++) + { + IPList.Add(addresses[i].ToString()); + } + } + else + { + //AddressFamily.InterNetwork表示此IP为IPv4, + //AddressFamily.InterNetworkV6表示此地址为IPv6类型 + for (int i = 0; i < addresses.Length; i++) + { + if (addresses[i].AddressFamily.ToString() == netType) + { + if (addresses[i].ToString().Contains("192")) + { + IPList.Add(addresses[i].ToString()); + } + + } + } + } + return IPList; + } + + public void InitialTiggerModule(List lstTrgParams) + { + tabConTrgUI.TabPages.Clear(); + for (int i = 0; i < lstTrgParams.Count; i++) + { + TriggerUI triggerUI = new TriggerUI(lstTrgParams[i]); + tabConTrgUI.TabPages.Add(lstTrgParams[i].ThreadName); + Panel panel = new Panel(); + tabConTrgUI.TabPages[i].Controls.Add(panel); + panel.Dock = DockStyle.Fill; + panel.Controls.Add(triggerUI); + triggerUI.Dock = DockStyle.Fill; + triggerUI.TrgParamChangeEvent += TriggerUI_TrgParamChangeEvent; + lstTrgUI.Add(triggerUI); + } + + } + + private void TriggerUI_TrgParamChangeEvent(int tgrIndex) + { + OnSaveParams(Index, tgrIndex); + } + + public bool Connect() + { + if (!IPAddress.TryParse(txtIP.Text, out IPAddress address)) + { + AddLog(lstRecv, 1, "PLCIP地址格式不正确"); + return false; + } + if (!int.TryParse(txtPort.Text, out int port)) + { + AddLog(lstRecv, 1, "端口号格式不正确"); + return false; + } + if (!byte.TryParse(txtSolt.Text, out byte solt)) + { + AddLog(lstRecv, 1, "PLC插槽号设置错误!"); + return false; + } + string str = ""; + omronCipNet.IpAddress = address.ToString(); + omronCipNet.Port = port; + omronCipNet.Slot = solt; + omronCipNet.ConnectClose(); + try + { + omronCipNet.ConnectTimeOut = 2000; + OperateResult connect = omronCipNet.ConnectServer(); + if (connect.IsSuccess) + { + IsConnected = true; + BtnDisConnect.Enabled = true; + BtnConnect.Enabled = false; + str = StringResources.Language.ConnectedSuccess; + AddLog(lstRecv, 0, StringResources.Language.ConnectedSuccess); + return true; + } + else + { + IsConnected = false; + str = StringResources.Language.ConnectedFailed; + AddLog(lstRecv,1, StringResources.Language.ConnectedFailed); + } + + } + catch (Exception ex) + { + str = ex.Message; + IsConnected = false; + AddLog(lstRecv, 1, ex.Message); + } + //LogManagerControl.AddLog($"{str}", LogAddtype.local, Logtype.Message); + return false; + } + + /// + /// 对PLC进行链接 + /// + /// + /// + private void BtnConnect_Click(object sender, EventArgs e) + { + Connect(); + } + + /// + /// 与LC断开链接 + /// + /// + /// + private void BtnDisConnect_Click(object sender, EventArgs e) + { + ConnectClose(); + } + + /// + /// 断开PLC的链接 + /// + public void ConnectClose() + { + omronCipNet.ConnectClose(); + BtnDisConnect.Enabled = false; + BtnConnect.Enabled = true; + lblConnectStatus.Image = Properties.Resources.red; + IsConnected = false; + AddLog(lstRecv, 0, "断开连接"); + } + + + /// + /// 界面测试复选框 + /// + /// + /// + private void cbTest_CheckedChanged(object sender, EventArgs e) + { + if (cbTest.Checked) + { + PanelTest.Enabled = true; + } + else + { + PanelTest.Enabled = false; + } + } + + + /// + /// 读取PLC数据 + /// + /// + /// + private void BtnReadTest_Click(object sender, EventArgs e) + { + if (!IsConnected) + { + AddLog(lstRecv, 1, "未连接到PLC,请检查连接状态"); + return; + } + if (txtReadAddrTest.Text.Trim() == "") + { + AddLog(lstRecv, 1, "读取地址不能为空"); + return; + } + if (txtReadTestLength.Text.Trim() == "") + { + AddLog(lstRecv, 1, "读取长度不能为空"); + return; + } + try + { + + switch ((VarType)Enum.Parse(typeof(VarType), cboReadType.SelectedItem.ToString(), false)) + { + case VarType.Bit: + DemoUtils.ReadResultRender(omronCipNet.ReadBool(txtReadAddrTest.Text, ushort.Parse(txtReadTestLength.Text.Trim())), txtReadAddrTest.Text, txtReadResultTest); + break; + case VarType.Short: + DemoUtils.ReadResultRender(omronCipNet.ReadInt16(txtReadAddrTest.Text, ushort.Parse(txtReadTestLength.Text.Trim())), txtReadAddrTest.Text, txtReadResultTest); + break; + case VarType.Int: + DemoUtils.ReadResultRender(omronCipNet.ReadInt32(txtReadAddrTest.Text, ushort.Parse(txtReadTestLength.Text.Trim())), txtReadAddrTest.Text, txtReadResultTest); + break; + case VarType.Float: + DemoUtils.ReadResultRender(omronCipNet.ReadFloat(txtReadAddrTest.Text, ushort.Parse(txtReadTestLength.Text.Trim())), txtReadAddrTest.Text, txtReadResultTest); + break; + case VarType.String: + DemoUtils.ReadResultRender(omronCipNet.ReadString(txtReadAddrTest.Text, ushort.Parse(txtReadTestLength.Text.Trim())), txtReadAddrTest.Text, txtReadResultTest); + break; + case VarType.Byte: + DemoUtils.ReadResultRender(omronCipNet.Read(txtReadAddrTest.Text, ushort.Parse(txtReadTestLength.Text.Trim())), txtReadAddrTest.Text, txtReadResultTest); + break; + } + } + catch (Exception ex) + { + AddLog(lstRecv, 1, "读取失败,请检查地址类型或连接状态" + ex.Message); + } + } + + /// + /// 写入PLC数据 + /// + /// + /// + private void BtnWriteTest_Click(object sender, EventArgs e) + { + if (!IsConnected) + { + AddLog(lstRecv, 1, "未连接到PLC,请检查连接状态"); + return; + } + if (txtReadAddrTest.Text.Trim() == "") + { + AddLog(lstRecv, 1, "写入地址不能位空"); + return; + } + if (txtReadTestLength.Text.Trim() == "") + { + AddLog(lstRecv, 1, "写入长度不能为空"); + return; + } + try + { + VarType varType = (VarType)Enum.Parse(typeof(VarType), cboReadType.SelectedItem.ToString(), false); + switch (varType) + { + case VarType.Bit: + { + string type = txtWriteValue.Text.Trim().Substring(0, 1); + if (type != "D" && type != "W") + { + MessageBox.Show("暂只支持D,W存储区"); + break; + } + bool[] boolArray = GetBoolArray(txtWriteValue.Text.Trim()); + DemoUtils.WriteResultRender(() => omronCipNet.Write(txtReadAddrTest.Text.Trim(), boolArray), txtReadAddrTest.Text.Trim()); + break; + } + case VarType.Short: + { + short[] shortArray = GetShortArray(txtWriteValue.Text.Trim()); + DemoUtils.WriteResultRender(() => omronCipNet.Write(txtReadAddrTest.Text.Trim(), shortArray), txtReadAddrTest.Text.Trim()); + break; + } + case VarType.Int: + { + int[] intArray = GetIntArray(txtWriteValue.Text.Trim()); + DemoUtils.WriteResultRender(() => omronCipNet.Write(txtReadAddrTest.Text.Trim(), intArray), txtReadAddrTest.Text.Trim()); + break; + } + case VarType.Float: + { + float[] floatArray = GetFloatArray(txtWriteValue.Text.Trim()); + DemoUtils.WriteResultRender(() => omronCipNet.Write(txtReadAddrTest.Text.Trim(), floatArray), txtReadAddrTest.Text.Trim()); + break; + } + case VarType.Byte: + { + DemoUtils.WriteResultRender(() => omronCipNet.Write(txtReadAddrTest.Text.Trim(), txtWriteValue.Text.Trim()), txtReadAddrTest.Text.Trim()); + break; + } + case VarType.String: + { + DemoUtils.WriteResultRender(() => omronCipNet.Write(txtReadAddrTest.Text.Trim(), txtWriteValue.Text.Trim()), txtReadAddrTest.Text.Trim()); + break; + } + } + } + catch (Exception ex) + { + AddLog(lstRecv, 1, "写入失败,请检查地址类型或连接状态" + ex.Message); + } + } + + /// + /// 开启 + /// + public void InitialAndConnect() + { + Task RecvTask = Task.Factory.StartNew(delegate { GetMelsecValue(); }, mCTSRecv.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default); + } + + + /// + /// 链接PLC状态 + /// + /// + public void OmronStart(bool status) + { + if (status) + { + resetEventRecv.Set(); + } + else + { + resetEventRecv.Reset(); + } + } + + /// + /// 循环读取PLC数据 + /// + private void GetMelsecValue() + { + while (true) + { + if (mCTSRecv.Token.IsCancellationRequested) + { + return; + } + resetEventRecv.WaitOne(); + if (IsRun) + { + if (IsConnected) + { + OperateResult resByte = null; + for (int i = 0; i < JobCount; i++) + { + StringBuilder res = new StringBuilder(string.Empty); + switch (lstTrgUI[i].TrgParams.TriggerType) + { + case VarType.Bit: + res.Append(omronCipNet.ReadBool(lstTrgUI[i].TrgParams.TriggerAddr).Content.ToString()); + break; + case VarType.Short: + res.Append(omronCipNet.ReadInt16(lstTrgUI[i].TrgParams.TriggerAddr).Content.ToString()); + break; + case VarType.Int: + res.Append(omronCipNet.ReadInt32(lstTrgUI[i].TrgParams.TriggerAddr).Content.ToString()); + break; + case VarType.Float: + res.Append(omronCipNet.ReadFloat(lstTrgUI[i].TrgParams.TriggerAddr).Content.ToString()); + break; + case VarType.String: + res.Append(omronCipNet.ReadString(lstTrgUI[i].TrgParams.TriggerAddr, Convert.ToUInt16(txtReadTestLength.Text.Trim())).Content.ToString()); + break; + case VarType.Byte: + resByte = omronCipNet.Read(lstTrgUI[i].TrgParams.TriggerAddr, Convert.ToUInt16(txtReadTestLength.Text.Trim())); + res.Append(HslCommunication.BasicFramework.SoftBasic.ByteToHexString(resByte.Content)); + break; + } + if (lstTrgUI[i].TrgParams.IsRead) + { + resByte = omronCipNet.Read(lstTrgUI[i].TrgParams.ReadAddr, Convert.ToUInt16(lstTrgUI[i].TrgParams.ReadLength)); + //res.Append(HslCommunication.BasicFramework.SoftBasic.ByteToHexString(resByte.Content)); + } + if (DispCurrent) + { + AddLog(lstRecv, 0, lstTrgUI[i].TrgParams.TriggerAddr + "-->" + res.ToString()); + } + if (res.ToString() == lstTrgUI[i].TrgParams.TriggerCmd) + { + AddLog(lstTrgCmd, 0, $"{lstTrgUI[i].TrgParams.TriggerAddr}-->{res}"); + } + OnReceive(i + 1, res.ToString(), resByte); + Thread.Sleep(5); + } + Thread.Sleep(ScanTime); + } + else if (HeartBeat) + { + Thread.Sleep(5000); + if (!IPAddress.TryParse(txtIP.Text, out IPAddress address)) + { + AddLog(lstRecv, 1, "PLCIP地址格式不正确"); + return; + } + if (!int.TryParse(txtPort.Text, out int port)) + { + AddLog(lstRecv, 1, "端口号格式不正确"); + return; + } + if (!byte.TryParse(txtSolt.Text, out byte solt)) + { + AddLog(lstRecv, 1, "PLC单元设置错误"); + break; + } + omronCipNet.IpAddress = address.ToString(); + omronCipNet.Port = port; + omronCipNet.Slot = solt; + omronCipNet.ConnectTimeOut = 2000; + OperateResult connect = omronCipNet.ConnectServer(); + if (connect.IsSuccess) + { + Invoke((Action)delegate + { + IsConnected = true; + BtnDisConnect.Enabled = true; + BtnConnect.Enabled = false; + lblConnectStatus.Image = Properties.Resources.red; + }); + } + } + else + { + Thread.Sleep(10000); + } + } + else + { + Thread.Sleep(2000); + } + } + AddLog(lstRecv, 1, "端口号格式不正确"); + } + + /// + /// 心跳消息 + /// + private void CheckHeart() + { + while (!mCTSHeart.Token.IsCancellationRequested) + { + if (IsRun) + { + if (HeartBeat) + { + try + { + Thread.Sleep(1000); + OperateResult result = omronCipNet.Write(HeartAddr, (short)1); + if (result.IsSuccess) + { + OnUpHeartBeat(true); + AddLog(lstSend, 0, $"心跳 {txtHeartAddr.Text}-> {1}"); + continue; + } + Invoke((Action)delegate + { + OnUpHeartBeat(false); + IsConnected = false; + BtnConnect.Enabled = true; + BtnDisConnect.Enabled = false; + //lblConnectStatus.IsFlash = false; + //lblConnectStatus.LedStatus = false; + + }); + AddLog(lstSend, 2, $"心跳 {txtHeartAddr.Text}-> {1}失败"); + } + catch (Exception ex) + { + Invoke((Action)delegate + { + OnUpHeartBeat(false); + IsConnected = false; + BtnConnect.Enabled = true; + BtnDisConnect.Enabled = false; + //lblConnectStatus.IsFlash = false; + //lblConnectStatus.LedStatus = false; + + }); + AddLog(lstSend, 2, ex.Message); + } + } + else + { + Thread.Sleep(1000); + } + } + } + } + + /// + /// 对PLC某寄存器清零 + /// + /// + /// + public void ClearReg(string iAddr, VarType varType) + { + string type = iAddr.Substring(0, 1); + if (type != "D" && type != "W") + { + AddLog(lstSend, 2, "暂只支持D,W存储区"); + return; + } + switch (varType) + { + case VarType.Bit: + omronCipNet.Write(iAddr, false); + break; + case VarType.Float: + omronCipNet.Write(iAddr, 0f); + break; + case VarType.Short: + omronCipNet.Write(iAddr, (short)0); + break; + case VarType.Int: + omronCipNet.Write(iAddr, 0); + break; + case VarType.String: + omronCipNet.Write(iAddr, 0); + break; + } + } + + /// + ///读取BOOL值 + /// + /// + /// + public bool ReadBoolDReg(string iAddr) + { + bool result = false; + try + { + string type = iAddr.Substring(0, 1); + if (type != "D" && type != "W") + { + AddLog(lstSend, 2, "暂只支持D,W存储区"); + } + else if (IsConnected) + { + result = omronCipNet.ReadBool(iAddr).Content; + AddLog(lstResWrite, 0, $"{iAddr} --> {result.ToString()}"); + } + } + catch (Exception ex) + { + AddLog(lstResWrite, 2, $"{iAddr} --> {ex.Message}"); + } + return result; + } + + /// + ///读取String值 + /// + /// + /// + public string ReadStringDReg(string iAddr) + { + string result = ""; + try + { + string type = iAddr.Substring(0, 1); + if (type != "D" && type != "W") + { + AddLog(lstSend, 2, "暂只支持D,W存储区"); + } + else if (IsConnected) + { + result = omronCipNet.ReadString(iAddr).Content; + AddLog(lstResWrite, 0, $"{iAddr} --> {result}"); + } + } + catch (Exception ex) + { + AddLog(lstResWrite, 2, $"{iAddr} --> {ex.Message}"); + } + return result; + } + + /// + /// 读取16位整数 + /// + /// + /// + public short ReadshortDReg(string iAddr) + { + short result = 0; + try + { + string type = iAddr.Substring(0, 1); + if (type != "D" && type != "W") + { + AddLog(lstSend, 2, "暂只支持D,W存储区"); + } + else if (IsConnected) + { + result = omronCipNet.ReadInt16(iAddr).Content; + AddLog(lstResWrite, 0, $"{iAddr} --> {result.ToString()}"); + } + } + catch (Exception ex) + { + AddLog(lstResWrite, 2, $"{iAddr} --> {ex.Message}"); + } + return result; + } + + /// + /// 读取32位整数 + /// + /// + /// + public int ReadIntDReg(string iAddr) + { + int result = 0; + try + { + string type = iAddr.Substring(0, 1); + if (type != "D" && type != "W" && type != "H") + { + AddLog(lstSend, 2, "暂只支持D,W存储区"); + } + else if (IsConnected) + { + result = omronCipNet.ReadInt32(iAddr).Content; + AddLog(lstResWrite, 0, $"{iAddr} --> {result.ToString()}"); + } + } + catch (Exception ex) + { + AddLog(lstResWrite, 2, $"{iAddr} --> {ex.Message}"); + } + return result; + } + + /// + /// 读取浮点数 + /// + /// + /// + public float ReadFloatDReg(string iAddr) + { + float result = 0; + try + { + string type = iAddr.Substring(0, 1); + if (type != "D" && type != "W" && type != "H") + { + AddLog(lstSend, 2, "暂只支持D,W存储区"); + } + else if (IsConnected) + { + result = omronCipNet.ReadFloat(iAddr).Content; + AddLog(lstResWrite, 0, $"{iAddr} --> {result.ToString()}"); + } + } + catch (Exception ex) + { + AddLog(lstResWrite, 2, $"{iAddr} --> {ex.Message}"); + } + + return result; + } + + /// + /// 读取byte + /// + /// 数据地址 + /// 读取长度 + /// + public byte[] Readbyte(string iAddr, ushort lenght) + { + byte[] result = null; + try + { + //string type = iAddr.Substring(0, 1); + //if (type != "D" && type != "R") + //{ + // AddLog(lstSend, 2, "暂只支持D,R存储区"); + //} + if (IsConnected) + { + result = omronCipNet.Read(iAddr, lenght).Content; + AddLog(lstResWrite, 0, $"{iAddr} --> {result.ToString()}"); + } + } + catch (Exception ex) + { + AddLog(lstResWrite, 2, $"{iAddr} --> {ex.Message}"); + } + + return result; + } + + /// + /// 写入byte数组 + /// + /// + /// + public void WriteDReg(string iAddr, byte[] Value) + { + string type = iAddr.Substring(0, 1); + if (type != "D" && type != "W") + { + AddLog(lstSend, 2, "暂只支持D,W存储区"); + } + else if (IsConnected) + { + + OperateResult result = omronCipNet.Write(iAddr, Value); + //OperateResult result = omronCipNet.WriteTag(iAddr,210, Value); + if (result.IsSuccess) + { + AddLog(lstResWrite, 0, $"{iAddr} --> {Value}"); + } + else + { + AddLog(lstResWrite, 2, $"{iAddr} --> {Value}"); + } + } + } + public void WriteDReg(string iAddr, float Value) + { + string type = iAddr.Substring(0, 1); + if (type != "D" && type != "W") + { + AddLog(lstSend, 2, "暂只支持D,W存储区"); + } + else if (IsConnected) + { + + OperateResult result = omronCipNet.Write(iAddr, Value); + //OperateResult result = omronCipNet.WriteTag(iAddr,210, Value); + if (result.IsSuccess) + { + AddLog(lstResWrite, 0, $"{iAddr} --> {Value}"); + } + else + { + AddLog(lstResWrite, 2, $"{iAddr} --> {Value}"); + } + } + } + + /// + /// 写入单个int类型数据 + /// + /// + /// + public void WriteDReg(string iAddr, string Value) + { + string type = iAddr.Substring(0, 1); + if (type != "D" && type != "W") + { + AddLog(lstSend, 2, "暂只支持D,W存储区"); + } + else if (IsConnected) + { + OperateResult result = omronCipNet.Write(iAddr, Value); + if (result.IsSuccess) + { + AddLog(lstResWrite, 0, $"{iAddr} --> {Value}"); + } + else + { + AddLog(lstResWrite, 2, $"{iAddr} --> {Value}"); + } + } + } + + + /// + /// 写入单个int类型数据 + /// + /// + /// + public void WriteDReg(string iAddr, int Value) + { + string type = iAddr.Substring(0, 1); + if (type != "D" && type != "W") + { + AddLog(lstSend, 2, "暂只支持D,W存储区"); + } + else if (IsConnected) + { + OperateResult result = omronCipNet.Write(iAddr, Value); + if (result.IsSuccess) + { + AddLog(lstResWrite, 0, $"{iAddr} --> {Value}"); + } + else + { + AddLog(lstResWrite, 2, $"{iAddr} --> {Value}"); + } + } + } + + /// + /// 批量写入int类型数据 + /// + /// + /// + public void WriteDReg(string iAddr, int[] Value) + { + string type = iAddr.Substring(0, 1); + if (type != "D" && type != "W") + { + AddLog(lstSend, 2, "暂只支持D,W存储区"); + } + else if (IsConnected) + { + OperateResult result = omronCipNet.Write(iAddr, Value); + if (result.IsSuccess) + { + AddLog(lstResWrite, 0, $"{iAddr} --> {Value}"); + } + else + { + AddLog(lstResWrite, 2, $"{iAddr} --> {Value}"); + } + } + } + + /// + /// 批量写入ushort类型数据 + /// + /// + /// + public void WriteDReg(string iAddr, short[] Value) + { + string type = iAddr.Substring(0, 1); + if (type != "D" && type != "W") + { + AddLog(lstSend, 2, "暂只支持D,W存储区"); + } + else if (IsConnected) + { + OperateResult result = omronCipNet.Write(iAddr, Value); + if (result.IsSuccess) + { + for (int i = 0; i < Value.Length; i++) + { + AddLog(lstResWrite, 0, $"{iAddr} --> {Value[i]}"); + } + + } + else + { + for (int i = 0; i < Value.Length; i++) + { + AddLog(lstResWrite, 2, $"{iAddr} --> {Value[i]}"); + } + } + } + } + + + + /// + /// 写入单个Short类型数据 + /// + /// + /// + public void WriteDReg(string iAddr, short Value) + { + string type = iAddr.Substring(0, 1); + if (type != "D" && type != "W") + { + AddLog(lstSend, 2, "暂只支持D,W存储区"); + } + else if (IsConnected) + { + OperateResult result = omronCipNet.Write(iAddr, Value); + if (result.IsSuccess) + { + AddLog(lstResWrite, 0, $"{iAddr} --> {Value}"); + } + else + { + AddLog(lstResWrite, 2, $"{iAddr} --> {Value}"); + } + } + } + + /// + /// 写BOOL + /// + /// + /// + public void WriteDReg(string iAddr, bool Value) + { + string type = iAddr.Substring(0, 1); + if (type != "D" && type != "W") + { + AddLog(lstSend, 2, "暂只支持D,W存储区"); + } + else if (IsConnected) + { + OperateResult result = omronCipNet.Write(iAddr, Value); + if (result.IsSuccess) + { + AddLog(lstResWrite, 0, $"{iAddr} --> {Value}"); + } + else + { + AddLog(lstResWrite, 2, $"{iAddr} --> {Value}"); + } + } + } + + /// + /// 是否启用心跳消息 + /// + /// + /// + private void cbHeartBeat_CheckedChanged(object sender, EventArgs e) + { + if (cbHeartBeat.Checked) + { + HeartBeat = true; + } + else + { + HeartBeat = false; + } + } + + + /// + /// 保存配置 + /// + /// + /// + private void btnSaveConfig_Click(object sender, EventArgs e) + { + try + { + PlcConfig.Index = Index; + PlcConfig.IP = txtIP.Text.Trim(); + PlcConfig.Port = Convert.ToInt32(txtPort.Text.Trim()); + PlcConfig.HeartBeat = cbHeartBeat.Checked; + PlcConfig.HeartAddr = txtHeartAddr.Text.Trim(); + PlcConfig.JobCount = JobCount; + PlcConfig.ScanTime = ScanTime; + PlcConfig.Solt= Convert.ToInt32(txtSolt.Text.Trim()); + OnSaveParams(Index, 0); + AddLog(lstRecv, 0, "保存参数成功"); + } + catch (Exception ex) + { + AddLog(lstRecv, 1, "保存参数失败" + ex.Message); + } + } + + /// + /// 日志显示 + /// + /// + /// + /// + private void AddLog(ListView lstView, int type, string info) + { + ListViewItem lst = new ListViewItem(" " + CurrentTime, type); + lst.SubItems.Add(info); + if (base.InvokeRequired) + { + Invoke((Action)delegate + { + lstView.Items.Insert(0, lst); + if (lstView.Items.Count > 2000) + { + lstView.Items.Clear(); + } + }); + } + else + { + if (lstView.Items.Count > 2000) + { + lstView.Items.Clear(); + } + lstView.Items.Insert(0, lst); + } + } + + /// + /// + /// + /// + /// + private bool[] GetBoolArray(string val) + { + try + { + List Result = new List(); + if (val.Contains(',')) + { + string[] str = Regex.Split(val, ",", RegexOptions.IgnoreCase); + string[] array = str; + foreach (string item in array) + { + Result.Add(item.ToLower() == "true" || item.ToLower() == "1"); + } + } + else + { + Result.Add(val.ToLower() == "true" || val.ToLower() == "1"); + } + return Result.ToArray(); + } + catch (Exception) + { + return null; + } + } + + private short[] GetShortArray(string val) + { + try + { + List Result = new List(); + if (val.Contains(',')) + { + string[] str = Regex.Split(val, ",", RegexOptions.IgnoreCase); + string[] array = str; + foreach (string item in array) + { + Result.Add(Convert.ToInt16(item)); + } + } + else + { + Result.Add(Convert.ToInt16(val)); + } + return Result.ToArray(); + } + catch (Exception) + { + return null; + } + } + + private int[] GetIntArray(string val) + { + try + { + List Result = new List(); + if (val.Contains(',')) + { + string[] str = Regex.Split(val, ",", RegexOptions.IgnoreCase); + string[] array = str; + foreach (string item in array) + { + Result.Add(Convert.ToInt32(item)); + } + } + else + { + Result.Add(Convert.ToInt32(val)); + } + return Result.ToArray(); + } + catch (Exception) + { + return null; + } + } + + private float[] GetFloatArray(string val) + { + try + { + List Result = new List(); + if (val.Contains(',')) + { + string[] str = Regex.Split(val, ",", RegexOptions.IgnoreCase); + string[] array = str; + foreach (string item in array) + { + Result.Add(Convert.ToSingle(item)); + } + } + else + { + Result.Add(Convert.ToSingle(val)); + } + return Result.ToArray(); + } + catch (Exception) + { + return null; + } + } + + /// + /// 清除消息 + /// + /// + /// + private void btnClearRecv_Click(object sender, EventArgs e) + { + lstRecv.Items.Clear(); + } + + /// + /// 数据接受委托事件 + /// + /// + /// + /// + public void OnReceive(int Index, string msg, OperateResult resByte) + { + if (this.ReceiveEvent != null) + { + this.ReceiveEvent(Index, msg, resByte); + } + } + + /// + /// 心跳消息委托事件 + /// + /// + public void OnUpHeartBeat(bool b) + { + if (this.UpHeartBeatEvent != null) + { + this.UpHeartBeatEvent(b); + } + } + + /// + /// 保存信息委托事件 + /// + /// + /// + public void OnSaveParams(int plcIndex, int trgIndex) + { + if (this.SaveParamsEvent != null) + { + this.SaveParamsEvent(plcIndex, trgIndex); + } + } + + /// + /// 关闭读取PLC数据 + /// + public void Shutdown() + { + if (omronCipNet != null) + { + try + { + mCTSRecv.Cancel(); + mCTSHeart.Cancel(); + } + catch (Exception) + { + } + } + } + + /// + /// 链接PLC开始启动 + /// + /// + /// + private void btnStart_Click(object sender, EventArgs e) + { + if (!IsRun) + { + Connect(); + OmronStart(true); + IsRun = true; + btnStart.Text = "停止"; + } + else + { + ConnectClose(); + OmronStart(false); + IsRun = false; + btnStart.Text = "启动"; + } + } + + /// + /// + /// + /// + /// + private void cbDispCurrent_CheckedChanged(object sender, EventArgs e) + { + if (cbDispCurrent.Checked) + { + DispCurrent = true; + } + else + { + DispCurrent = false; + } + } + + /// + /// 心跳消息赋值 + /// + /// + /// + private void txtHeartAddr_TextChanged(object sender, EventArgs e) + { + _heartAddr = txtHeartAddr.Text; + } + + private void button1_Click(object sender, EventArgs e) + { + //OperateResult operateResult = omron_finsnet.ReadCpuUnitData(); + //if (operateResult.IsSuccess) + //{ + // txtReadResultTest.Text = operateResult.Content.ToJsonString(); + //} + //else + //{ + // MessageBox.Show("read failed:" + operateResult.Message); + //} + } + } +} diff --git a/PLCCommunication/OmronPLCUI.resx b/PLCCommunication/OmronPLCUI.resx new file mode 100644 index 0000000..6bb0a8d --- /dev/null +++ b/PLCCommunication/OmronPLCUI.resx @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAo + CQAAAk1TRnQBSQFMAgEBAgEAAUgBAAFIAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA + AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 + AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA + AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm + AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM + AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA + ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BM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Af8BFgMlAQcgAAHy + CZcBeAH0AfAClwHyARoDJQH0AQAB/wIWAf8BAAH0AyUBGiAAAf8BngyXAZ4C/wFNAiUBFgH0ARYCJQEW + AfQBFgIlAU0B/yEAAfIMlwHyAgABmQwlAZkjAAyXBAAMJSUAAQgBwAaXAcABCAYAAfMBTQYlAU0B8ycA + Af8B8gEIAngBCAHyAf8IAAH/ARoBBwJNAQcBGgH/JAABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEA + AQEFAAGAFwAD/wEAAfABDwHwAQ8EAAHgAQcB4AEHBAABwAEDAcABAwQAAYABAQGAAQEOAAEEASAGAAEC + AUAGAAEBAYAGAAEBAYAGAAECAUAGAAEEASAMAAGAAQEBgAEBBAABwAEDAcABAwQAAeABBwHgAQcEAAHw + AQ8B8AEPBAAL + + + + 32 + + \ No newline at end of file diff --git a/PLCCommunication/PLCCommunication.csproj b/PLCCommunication/PLCCommunication.csproj new file mode 100644 index 0000000..123bc06 --- /dev/null +++ b/PLCCommunication/PLCCommunication.csproj @@ -0,0 +1,118 @@ + + + + + Debug + AnyCPU + {796C9DFE-1D66-4921-B998-C5FCF15C2983} + WinExe + PLCCommunication + PLCCommunication + v4.8 + 512 + true + true + + + + AnyCPU + true + full + false + ..\..\..\..\JY.Inspection\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\JY.Inspection\Lib\HslCommunication.dll + + + + + + + + + + + + + + + + + + + + + + Form + + + FrmOmronPLCCom.cs + + + UserControl + + + OmronPLCUI.cs + + + + + UserControl + + + TriggerUI.cs + + + FrmOmronPLCCom.cs + + + OmronPLCUI.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + TriggerUI.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + \ No newline at end of file diff --git a/PLCCommunication/PLCCommunication.csproj.user b/PLCCommunication/PLCCommunication.csproj.user new file mode 100644 index 0000000..c10e84b --- /dev/null +++ b/PLCCommunication/PLCCommunication.csproj.user @@ -0,0 +1,6 @@ + + + + ProjectFiles + + \ No newline at end of file diff --git a/PLCCommunication/Program.cs b/PLCCommunication/Program.cs new file mode 100644 index 0000000..39ceee8 --- /dev/null +++ b/PLCCommunication/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace PLCCommunication +{ + static class Program + { + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form()); + } + } +} diff --git a/PLCCommunication/Properties/AssemblyInfo.cs b/PLCCommunication/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0f80c53 --- /dev/null +++ b/PLCCommunication/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("PLCCommunication")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("PLCCommunication")] +[assembly: AssemblyCopyright("Copyright © 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("796c9dfe-1d66-4921-b998-c5fcf15c2983")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/PLCCommunication/Properties/Resources.Designer.cs b/PLCCommunication/Properties/Resources.Designer.cs new file mode 100644 index 0000000..ccf4ef3 --- /dev/null +++ b/PLCCommunication/Properties/Resources.Designer.cs @@ -0,0 +1,83 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace PLCCommunication.Properties { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.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() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [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("PLCCommunication.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap green { + get { + object obj = ResourceManager.GetObject("green", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap red { + get { + object obj = ResourceManager.GetObject("red", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/PLCCommunication/Properties/Resources.resx b/PLCCommunication/Properties/Resources.resx new file mode 100644 index 0000000..a647b1d --- /dev/null +++ b/PLCCommunication/Properties/Resources.resx @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/PLCCommunication/Properties/Settings.Designer.cs b/PLCCommunication/Properties/Settings.Designer.cs new file mode 100644 index 0000000..92e0219 --- /dev/null +++ b/PLCCommunication/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace PLCCommunication.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.11.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; + } + } + } +} diff --git a/PLCCommunication/Properties/Settings.settings b/PLCCommunication/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/PLCCommunication/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/PLCCommunication/Resources/green.png b/PLCCommunication/Resources/green.png new file mode 100644 index 0000000..7abdd5f Binary files /dev/null and b/PLCCommunication/Resources/green.png differ diff --git a/PLCCommunication/Resources/red.png b/PLCCommunication/Resources/red.png new file mode 100644 index 0000000..c05a90a Binary files /dev/null and b/PLCCommunication/Resources/red.png differ diff --git a/PLCCommunication/TriggerUI.Designer.cs b/PLCCommunication/TriggerUI.Designer.cs new file mode 100644 index 0000000..74d1078 --- /dev/null +++ b/PLCCommunication/TriggerUI.Designer.cs @@ -0,0 +1,297 @@ + +using System.Windows.Forms; + +namespace PLCCommunication +{ + partial class TriggerUI + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.label8 = new System.Windows.Forms.Label(); + this.cbo_WriteType = new System.Windows.Forms.ComboBox(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.txtResultAddr = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.txtReadLength = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.txtReadAddr = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.cbIsRead = new System.Windows.Forms.CheckBox(); + this.cboReadType = new System.Windows.Forms.ComboBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.cboTriggerType = new System.Windows.Forms.ComboBox(); + this.txtTriggerAddr = new System.Windows.Forms.TextBox(); + this.txtTrrigerCommand = new System.Windows.Forms.TextBox(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("黑体", 12.75F); + this.label8.Location = new System.Drawing.Point(6, 53); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(98, 17); + this.label8.TabIndex = 50; + this.label8.Text = "触发指令:"; + // + // cbo_WriteType + // + this.cbo_WriteType.Font = new System.Drawing.Font("黑体", 12.75F); + this.cbo_WriteType.FormattingEnabled = true; + this.cbo_WriteType.Location = new System.Drawing.Point(373, 81); + this.cbo_WriteType.Name = "cbo_WriteType"; + this.cbo_WriteType.Size = new System.Drawing.Size(101, 25); + this.cbo_WriteType.TabIndex = 49; + this.cbo_WriteType.SelectedIndexChanged += new System.EventHandler(this.cbo_WriteType_SelectedIndexChanged); + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("黑体", 12.75F); + this.label11.Location = new System.Drawing.Point(276, 84); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(98, 17); + this.label11.TabIndex = 48; + this.label11.Text = "写入类型:"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Font = new System.Drawing.Font("黑体", 12.75F); + this.label10.Location = new System.Drawing.Point(277, 22); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(98, 17); + this.label10.TabIndex = 47; + this.label10.Text = "接收类型:"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("黑体", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(6, 23); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(134, 17); + this.label5.TabIndex = 44; + this.label5.Text = "接收触发地址:"; + // + // txtResultAddr + // + this.txtResultAddr.Font = new System.Drawing.Font("黑体", 12.75F); + this.txtResultAddr.Location = new System.Drawing.Point(170, 81); + this.txtResultAddr.Name = "txtResultAddr"; + this.txtResultAddr.Size = new System.Drawing.Size(97, 27); + this.txtResultAddr.TabIndex = 43; + this.txtResultAddr.Text = "D4960"; + this.txtResultAddr.TextChanged += new System.EventHandler(this.txtResultAddr_TextChanged); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("黑体", 12.75F); + this.label4.Location = new System.Drawing.Point(6, 85); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(170, 17); + this.label4.TabIndex = 42; + this.label4.Text = "结果写入起始地址:"; + // + // txtReadLength + // + this.txtReadLength.Font = new System.Drawing.Font("黑体", 12.75F); + this.txtReadLength.Location = new System.Drawing.Point(177, 49); + this.txtReadLength.Name = "txtReadLength"; + this.txtReadLength.Size = new System.Drawing.Size(45, 27); + this.txtReadLength.TabIndex = 56; + this.txtReadLength.Text = "1"; + this.txtReadLength.TextChanged += new System.EventHandler(this.txtReadLength_TextChanged); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("黑体", 10F); + this.label1.Location = new System.Drawing.Point(162, 29); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(63, 14); + this.label1.TabIndex = 55; + this.label1.Text = "接收长度"; + // + // txtReadAddr + // + this.txtReadAddr.Font = new System.Drawing.Font("黑体", 12.75F); + this.txtReadAddr.Location = new System.Drawing.Point(36, 49); + this.txtReadAddr.Name = "txtReadAddr"; + this.txtReadAddr.Size = new System.Drawing.Size(97, 27); + this.txtReadAddr.TabIndex = 53; + this.txtReadAddr.Text = "D4610"; + this.txtReadAddr.TextChanged += new System.EventHandler(this.txtReadAddr_TextChanged); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("黑体", 10F); + this.label3.Location = new System.Drawing.Point(293, 29); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(63, 14); + this.label3.TabIndex = 58; + this.label3.Text = "接收类型"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("黑体", 10F); + this.label2.Location = new System.Drawing.Point(11, 29); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(119, 14); + this.label2.TabIndex = 52; + this.label2.Text = "批量读取起始地址"; + // + // cbIsRead + // + this.cbIsRead.AutoSize = true; + this.cbIsRead.Font = new System.Drawing.Font("黑体", 10F); + this.cbIsRead.Location = new System.Drawing.Point(406, 49); + this.cbIsRead.Name = "cbIsRead"; + this.cbIsRead.Size = new System.Drawing.Size(54, 18); + this.cbIsRead.TabIndex = 59; + this.cbIsRead.Text = "启用"; + this.cbIsRead.UseVisualStyleBackColor = true; + this.cbIsRead.CheckedChanged += new System.EventHandler(this.cbIsRead_CheckedChanged); + // + // cboReadType + // + this.cboReadType.Font = new System.Drawing.Font("黑体", 12.75F); + this.cboReadType.FormattingEnabled = true; + this.cboReadType.Location = new System.Drawing.Point(283, 51); + this.cboReadType.Name = "cboReadType"; + this.cboReadType.Size = new System.Drawing.Size(94, 25); + this.cboReadType.TabIndex = 57; + this.cboReadType.SelectedIndexChanged += new System.EventHandler(this.cboReadType_SelectedIndexChanged); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.cboReadType); + this.groupBox1.Controls.Add(this.cbIsRead); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.txtReadAddr); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.txtReadLength); + this.groupBox1.Font = new System.Drawing.Font("黑体", 12.75F); + this.groupBox1.Location = new System.Drawing.Point(14, 148); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(477, 86); + this.groupBox1.TabIndex = 60; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "批量读取PLC数据"; + // + // cboTriggerType + // + this.cboTriggerType.Font = new System.Drawing.Font("黑体", 12.75F); + this.cboTriggerType.FormattingEnabled = true; + this.cboTriggerType.Location = new System.Drawing.Point(373, 19); + this.cboTriggerType.Name = "cboTriggerType"; + this.cboTriggerType.Size = new System.Drawing.Size(101, 25); + this.cboTriggerType.TabIndex = 46; + this.cboTriggerType.SelectedIndexChanged += new System.EventHandler(this.cboTriggerType_SelectedIndexChanged); + // + // txtTriggerAddr + // + this.txtTriggerAddr.Font = new System.Drawing.Font("黑体", 12.75F); + this.txtTriggerAddr.Location = new System.Drawing.Point(170, 19); + this.txtTriggerAddr.Name = "txtTriggerAddr"; + this.txtTriggerAddr.Size = new System.Drawing.Size(97, 27); + this.txtTriggerAddr.TabIndex = 45; + this.txtTriggerAddr.Text = "D4610"; + this.txtTriggerAddr.TextChanged += new System.EventHandler(this.txtTriggerAddr_TextChanged); + // + // txtTrrigerCommand + // + this.txtTrrigerCommand.Font = new System.Drawing.Font("黑体", 12.75F); + this.txtTrrigerCommand.Location = new System.Drawing.Point(170, 50); + this.txtTrrigerCommand.Name = "txtTrrigerCommand"; + this.txtTrrigerCommand.Size = new System.Drawing.Size(97, 27); + this.txtTrrigerCommand.TabIndex = 51; + this.txtTrrigerCommand.Text = "1"; + this.txtTrrigerCommand.TextChanged += new System.EventHandler(this.txtTrrigerCommand_TextChanged); + // + // TriggerUI + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.Controls.Add(this.cboTriggerType); + this.Controls.Add(this.txtTrrigerCommand); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.label8); + this.Controls.Add(this.cbo_WriteType); + this.Controls.Add(this.label11); + this.Controls.Add(this.label10); + this.Controls.Add(this.txtTriggerAddr); + this.Controls.Add(this.label5); + this.Controls.Add(this.txtResultAddr); + this.Controls.Add(this.label4); + this.Name = "TriggerUI"; + this.Size = new System.Drawing.Size(513, 244); + this.Load += new System.EventHandler(this.TriggerUI_Load); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private Label label8; + + private ComboBox cbo_WriteType; + + private Label label11; + + private Label label10; + + private Label label5; + + private TextBox txtResultAddr; + + private Label label4; + private TextBox txtReadLength; + private Label label1; + private TextBox txtReadAddr; + private Label label3; + private Label label2; + private CheckBox cbIsRead; + private ComboBox cboReadType; + private GroupBox groupBox1; + private ComboBox cboTriggerType; + private TextBox txtTriggerAddr; + private TextBox txtTrrigerCommand; + } +} diff --git a/PLCCommunication/TriggerUI.cs b/PLCCommunication/TriggerUI.cs new file mode 100644 index 0000000..4e0e6dc --- /dev/null +++ b/PLCCommunication/TriggerUI.cs @@ -0,0 +1,120 @@ + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace PLCCommunication +{ + public partial class TriggerUI : UserControl + { + public delegate void TrgParamChangeHandler(int Index); + + public TriggerParams TrgParams = new TriggerParams(); + + public event TrgParamChangeHandler TrgParamChangeEvent; + + public TriggerUI() + { + InitializeComponent(); + } + + public TriggerUI(TriggerParams _trgParam) + { + InitializeComponent(); + cbo_WriteType.DataSource = Enum.GetNames(typeof(VarType)); + cboTriggerType.DataSource = Enum.GetNames(typeof(VarType)); + cboReadType.DataSource = Enum.GetNames(typeof(VarType)); + TrgParams = _trgParam; + } + + private void TriggerUI_Load(object sender, EventArgs e) + { + txtResultAddr.Text = TrgParams.ResultAddr; + txtTriggerAddr.Text = TrgParams.TriggerAddr; + txtTrrigerCommand.Text = TrgParams.TriggerCmd; + txtReadAddr.Text = TrgParams.ReadAddr; + txtReadLength.Text =TrgParams.ReadLength.ToString(); + cboReadType.Text = TrgParams.ReadType.ToString(); + cbo_WriteType.Text = TrgParams.ResultType.ToString(); + cboTriggerType.Text = TrgParams.TriggerType.ToString(); + cbIsRead.Checked = TrgParams.IsRead; + } + + private void cbo_WriteType_SelectedIndexChanged(object sender, EventArgs e) + { + TrgParams.ResultType = (VarType)Enum.Parse(typeof(VarType), cbo_WriteType.SelectedItem.ToString(), false); + OnTrgParamChange(TrgParams.Index); + } + + private void cboTriggerType_SelectedIndexChanged(object sender, EventArgs e) + { + TrgParams.TriggerType = (VarType)Enum.Parse(typeof(VarType), cboTriggerType.SelectedItem.ToString(), false); + OnTrgParamChange(TrgParams.Index); + } + + private void txtResultAddr_TextChanged(object sender, EventArgs e) + { + TrgParams.ResultAddr = txtResultAddr.Text; + OnTrgParamChange(TrgParams.Index); + } + + private void txtTriggerAddr_TextChanged(object sender, EventArgs e) + { + TrgParams.TriggerAddr = txtTriggerAddr.Text; + OnTrgParamChange(TrgParams.Index); + } + + private void txtTrrigerCommand_TextChanged(object sender, EventArgs e) + { + TrgParams.TriggerCmd = txtTrrigerCommand.Text; + OnTrgParamChange(TrgParams.Index); + } + + public void OnTrgParamChange(int Index) + { + if (this.TrgParamChangeEvent != null) + { + this.TrgParamChangeEvent(Index); + } + } + + private void txtReadAddr_TextChanged(object sender, EventArgs e) + { + TrgParams.ReadAddr = txtReadAddr.Text; + OnTrgParamChange(TrgParams.Index); + } + + private void txtReadLength_TextChanged(object sender, EventArgs e) + { + TrgParams.ReadLength =int.Parse( txtReadLength.Text.Trim()); + OnTrgParamChange(TrgParams.Index); + } + + private void cboReadType_SelectedIndexChanged(object sender, EventArgs e) + { + TrgParams.ReadType = (VarType)Enum.Parse(typeof(VarType), cboReadType.SelectedItem.ToString(), false); + OnTrgParamChange(TrgParams.Index); + } + + private void cbIsRead_CheckedChanged(object sender, EventArgs e) + { + if (cbIsRead.Checked) + { + TrgParams.IsRead = true; + + } + else + { + TrgParams.IsRead = false; + } + + OnTrgParamChange(TrgParams.Index); + } + } +} diff --git a/PLCCommunication/TriggerUI.resx b/PLCCommunication/TriggerUI.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/PLCCommunication/TriggerUI.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..d89c5a6 --- /dev/null +++ b/README.en.md @@ -0,0 +1,36 @@ +# 1319上位机 + +#### Description +{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} + +#### Software Architecture +Software architecture description + +#### Installation + +1. xxxx +2. xxxx +3. xxxx + +#### Instructions + +1. xxxx +2. xxxx +3. xxxx + +#### Contribution + +1. Fork the repository +2. Create Feat_xxx branch +3. Commit your code +4. Create Pull Request + + +#### Gitee Feature + +1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md +2. Gitee blog [blog.gitee.com](https://blog.gitee.com) +3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) +4. The most valuable open source project [GVP](https://gitee.com/gvp) +5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) +6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md new file mode 100644 index 0000000..314fb18 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# 1319上位机 + +#### 介绍 +{**以下是 Gitee 平台说明,您可以替换此简介** +Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 +无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} + +#### 软件架构 +软件架构说明 + + +#### 安装教程 + +1. xxxx +2. xxxx +3. xxxx + +#### 使用说明 + +1. xxxx +2. xxxx +3. xxxx + +#### 参与贡献 + +1. Fork 本仓库 +2. 新建 Feat_xxx 分支 +3. 提交代码 +4. 新建 Pull Request + + +#### 特技 + +1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md +2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) +3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 +4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 +5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) +6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/S1270.sln b/S1270.sln new file mode 100644 index 0000000..a34129d --- /dev/null +++ b/S1270.sln @@ -0,0 +1,149 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29403.142 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JY.Model", "JY.Model\JY.Model.csproj", "{F7DB3A93-FCA2-479B-8B2E-380116AAE9FC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JY.DAL", "JY.DAL\JY.DAL.csproj", "{D5889580-58F9-467E-87D3-EFA37A300E67}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JY.Inspection", "JY.Inspection\JY.Inspection.csproj", "{607AF967-65F7-483E-8BD9-2D92AD17D151}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JY.Utility", "JY.Utility\JY.Utility.csproj", "{76DE07E0-9E97-44AB-8148-01B44C5C1ADD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JY.Control", "JY.Control\JY.Control.csproj", "{01A2AA2C-9B80-41AA-9F47-3CB67E60AF24}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PLCCommunication", "PLCCommunication\PLCCommunication.csproj", "{796C9DFE-1D66-4921-B998-C5FCF15C2983}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleCommunication", "SimpleServer\SimpleCommunication.csproj", "{D73FAE32-AAA3-4A51-BB0A-F1A5DC5A7260}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SocketHelper", "SocketHelper\SocketHelper.csproj", "{2E9AC112-75CC-4FB6-B058-F9C7424514EF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JY.MES", "JY.MES\JY.MES.csproj", "{168C8644-3975-450D-94D2-29D21C135C16}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F7DB3A93-FCA2-479B-8B2E-380116AAE9FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7DB3A93-FCA2-479B-8B2E-380116AAE9FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7DB3A93-FCA2-479B-8B2E-380116AAE9FC}.Debug|x64.ActiveCfg = Debug|Any CPU + {F7DB3A93-FCA2-479B-8B2E-380116AAE9FC}.Debug|x64.Build.0 = Debug|Any CPU + {F7DB3A93-FCA2-479B-8B2E-380116AAE9FC}.Debug|x86.ActiveCfg = Debug|Any CPU + {F7DB3A93-FCA2-479B-8B2E-380116AAE9FC}.Debug|x86.Build.0 = Debug|Any CPU + {F7DB3A93-FCA2-479B-8B2E-380116AAE9FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7DB3A93-FCA2-479B-8B2E-380116AAE9FC}.Release|Any CPU.Build.0 = Release|Any CPU + {F7DB3A93-FCA2-479B-8B2E-380116AAE9FC}.Release|x64.ActiveCfg = Release|Any CPU + {F7DB3A93-FCA2-479B-8B2E-380116AAE9FC}.Release|x64.Build.0 = Release|Any CPU + {F7DB3A93-FCA2-479B-8B2E-380116AAE9FC}.Release|x86.ActiveCfg = Release|Any CPU + {F7DB3A93-FCA2-479B-8B2E-380116AAE9FC}.Release|x86.Build.0 = Release|Any CPU + {D5889580-58F9-467E-87D3-EFA37A300E67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D5889580-58F9-467E-87D3-EFA37A300E67}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5889580-58F9-467E-87D3-EFA37A300E67}.Debug|x64.ActiveCfg = Debug|Any CPU + {D5889580-58F9-467E-87D3-EFA37A300E67}.Debug|x64.Build.0 = Debug|Any CPU + {D5889580-58F9-467E-87D3-EFA37A300E67}.Debug|x86.ActiveCfg = Debug|Any CPU + {D5889580-58F9-467E-87D3-EFA37A300E67}.Debug|x86.Build.0 = Debug|Any CPU + {D5889580-58F9-467E-87D3-EFA37A300E67}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D5889580-58F9-467E-87D3-EFA37A300E67}.Release|Any CPU.Build.0 = Release|Any CPU + {D5889580-58F9-467E-87D3-EFA37A300E67}.Release|x64.ActiveCfg = Release|Any CPU + {D5889580-58F9-467E-87D3-EFA37A300E67}.Release|x64.Build.0 = Release|Any CPU + {D5889580-58F9-467E-87D3-EFA37A300E67}.Release|x86.ActiveCfg = Release|Any CPU + {D5889580-58F9-467E-87D3-EFA37A300E67}.Release|x86.Build.0 = Release|Any CPU + {607AF967-65F7-483E-8BD9-2D92AD17D151}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {607AF967-65F7-483E-8BD9-2D92AD17D151}.Debug|Any CPU.Build.0 = Debug|Any CPU + {607AF967-65F7-483E-8BD9-2D92AD17D151}.Debug|x64.ActiveCfg = Debug|Any CPU + {607AF967-65F7-483E-8BD9-2D92AD17D151}.Debug|x64.Build.0 = Debug|Any CPU + {607AF967-65F7-483E-8BD9-2D92AD17D151}.Debug|x86.ActiveCfg = Debug|Any CPU + {607AF967-65F7-483E-8BD9-2D92AD17D151}.Debug|x86.Build.0 = Debug|Any CPU + {607AF967-65F7-483E-8BD9-2D92AD17D151}.Release|Any CPU.ActiveCfg = Release|Any CPU + {607AF967-65F7-483E-8BD9-2D92AD17D151}.Release|Any CPU.Build.0 = Release|Any CPU + {607AF967-65F7-483E-8BD9-2D92AD17D151}.Release|x64.ActiveCfg = Release|Any CPU + {607AF967-65F7-483E-8BD9-2D92AD17D151}.Release|x64.Build.0 = Release|Any CPU + {607AF967-65F7-483E-8BD9-2D92AD17D151}.Release|x86.ActiveCfg = Release|Any CPU + {607AF967-65F7-483E-8BD9-2D92AD17D151}.Release|x86.Build.0 = Release|Any CPU + {76DE07E0-9E97-44AB-8148-01B44C5C1ADD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {76DE07E0-9E97-44AB-8148-01B44C5C1ADD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {76DE07E0-9E97-44AB-8148-01B44C5C1ADD}.Debug|x64.ActiveCfg = Debug|Any CPU + {76DE07E0-9E97-44AB-8148-01B44C5C1ADD}.Debug|x64.Build.0 = Debug|Any CPU + {76DE07E0-9E97-44AB-8148-01B44C5C1ADD}.Debug|x86.ActiveCfg = Debug|Any CPU + {76DE07E0-9E97-44AB-8148-01B44C5C1ADD}.Debug|x86.Build.0 = Debug|Any CPU + {76DE07E0-9E97-44AB-8148-01B44C5C1ADD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {76DE07E0-9E97-44AB-8148-01B44C5C1ADD}.Release|Any CPU.Build.0 = Release|Any CPU + {76DE07E0-9E97-44AB-8148-01B44C5C1ADD}.Release|x64.ActiveCfg = Release|Any CPU + {76DE07E0-9E97-44AB-8148-01B44C5C1ADD}.Release|x64.Build.0 = Release|Any CPU + {76DE07E0-9E97-44AB-8148-01B44C5C1ADD}.Release|x86.ActiveCfg = Release|Any CPU + {76DE07E0-9E97-44AB-8148-01B44C5C1ADD}.Release|x86.Build.0 = Release|Any CPU + {01A2AA2C-9B80-41AA-9F47-3CB67E60AF24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {01A2AA2C-9B80-41AA-9F47-3CB67E60AF24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01A2AA2C-9B80-41AA-9F47-3CB67E60AF24}.Debug|x64.ActiveCfg = Debug|Any CPU + {01A2AA2C-9B80-41AA-9F47-3CB67E60AF24}.Debug|x64.Build.0 = Debug|Any CPU + {01A2AA2C-9B80-41AA-9F47-3CB67E60AF24}.Debug|x86.ActiveCfg = Debug|Any CPU + {01A2AA2C-9B80-41AA-9F47-3CB67E60AF24}.Debug|x86.Build.0 = Debug|Any CPU + {01A2AA2C-9B80-41AA-9F47-3CB67E60AF24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {01A2AA2C-9B80-41AA-9F47-3CB67E60AF24}.Release|Any CPU.Build.0 = Release|Any CPU + {01A2AA2C-9B80-41AA-9F47-3CB67E60AF24}.Release|x64.ActiveCfg = Release|Any CPU + {01A2AA2C-9B80-41AA-9F47-3CB67E60AF24}.Release|x64.Build.0 = Release|Any CPU + {01A2AA2C-9B80-41AA-9F47-3CB67E60AF24}.Release|x86.ActiveCfg = Release|Any CPU + {01A2AA2C-9B80-41AA-9F47-3CB67E60AF24}.Release|x86.Build.0 = Release|Any CPU + {796C9DFE-1D66-4921-B998-C5FCF15C2983}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {796C9DFE-1D66-4921-B998-C5FCF15C2983}.Debug|Any CPU.Build.0 = Debug|Any CPU + {796C9DFE-1D66-4921-B998-C5FCF15C2983}.Debug|x64.ActiveCfg = Debug|Any CPU + {796C9DFE-1D66-4921-B998-C5FCF15C2983}.Debug|x64.Build.0 = Debug|Any CPU + {796C9DFE-1D66-4921-B998-C5FCF15C2983}.Debug|x86.ActiveCfg = Debug|Any CPU + {796C9DFE-1D66-4921-B998-C5FCF15C2983}.Debug|x86.Build.0 = Debug|Any CPU + {796C9DFE-1D66-4921-B998-C5FCF15C2983}.Release|Any CPU.ActiveCfg = Release|Any CPU + {796C9DFE-1D66-4921-B998-C5FCF15C2983}.Release|Any CPU.Build.0 = Release|Any CPU + {796C9DFE-1D66-4921-B998-C5FCF15C2983}.Release|x64.ActiveCfg = Release|Any CPU + {796C9DFE-1D66-4921-B998-C5FCF15C2983}.Release|x64.Build.0 = Release|Any CPU + {796C9DFE-1D66-4921-B998-C5FCF15C2983}.Release|x86.ActiveCfg = Release|Any CPU + {796C9DFE-1D66-4921-B998-C5FCF15C2983}.Release|x86.Build.0 = Release|Any CPU + {D73FAE32-AAA3-4A51-BB0A-F1A5DC5A7260}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D73FAE32-AAA3-4A51-BB0A-F1A5DC5A7260}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D73FAE32-AAA3-4A51-BB0A-F1A5DC5A7260}.Debug|x64.ActiveCfg = Debug|x64 + {D73FAE32-AAA3-4A51-BB0A-F1A5DC5A7260}.Debug|x64.Build.0 = Debug|x64 + {D73FAE32-AAA3-4A51-BB0A-F1A5DC5A7260}.Debug|x86.ActiveCfg = Debug|x86 + {D73FAE32-AAA3-4A51-BB0A-F1A5DC5A7260}.Debug|x86.Build.0 = Debug|x86 + {D73FAE32-AAA3-4A51-BB0A-F1A5DC5A7260}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D73FAE32-AAA3-4A51-BB0A-F1A5DC5A7260}.Release|Any CPU.Build.0 = Release|Any CPU + {D73FAE32-AAA3-4A51-BB0A-F1A5DC5A7260}.Release|x64.ActiveCfg = Release|x64 + {D73FAE32-AAA3-4A51-BB0A-F1A5DC5A7260}.Release|x64.Build.0 = Release|x64 + {D73FAE32-AAA3-4A51-BB0A-F1A5DC5A7260}.Release|x86.ActiveCfg = Release|x86 + {D73FAE32-AAA3-4A51-BB0A-F1A5DC5A7260}.Release|x86.Build.0 = Release|x86 + {2E9AC112-75CC-4FB6-B058-F9C7424514EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2E9AC112-75CC-4FB6-B058-F9C7424514EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2E9AC112-75CC-4FB6-B058-F9C7424514EF}.Debug|x64.ActiveCfg = Debug|Any CPU + {2E9AC112-75CC-4FB6-B058-F9C7424514EF}.Debug|x64.Build.0 = Debug|Any CPU + {2E9AC112-75CC-4FB6-B058-F9C7424514EF}.Debug|x86.ActiveCfg = Debug|Any CPU + {2E9AC112-75CC-4FB6-B058-F9C7424514EF}.Debug|x86.Build.0 = Debug|Any CPU + {2E9AC112-75CC-4FB6-B058-F9C7424514EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2E9AC112-75CC-4FB6-B058-F9C7424514EF}.Release|Any CPU.Build.0 = Release|Any CPU + {2E9AC112-75CC-4FB6-B058-F9C7424514EF}.Release|x64.ActiveCfg = Release|Any CPU + {2E9AC112-75CC-4FB6-B058-F9C7424514EF}.Release|x64.Build.0 = Release|Any CPU + {2E9AC112-75CC-4FB6-B058-F9C7424514EF}.Release|x86.ActiveCfg = Release|Any CPU + {2E9AC112-75CC-4FB6-B058-F9C7424514EF}.Release|x86.Build.0 = Release|Any CPU + {168C8644-3975-450D-94D2-29D21C135C16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {168C8644-3975-450D-94D2-29D21C135C16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {168C8644-3975-450D-94D2-29D21C135C16}.Debug|x64.ActiveCfg = Debug|Any CPU + {168C8644-3975-450D-94D2-29D21C135C16}.Debug|x64.Build.0 = Debug|Any CPU + {168C8644-3975-450D-94D2-29D21C135C16}.Debug|x86.ActiveCfg = Debug|Any CPU + {168C8644-3975-450D-94D2-29D21C135C16}.Debug|x86.Build.0 = Debug|Any CPU + {168C8644-3975-450D-94D2-29D21C135C16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {168C8644-3975-450D-94D2-29D21C135C16}.Release|Any CPU.Build.0 = Release|Any CPU + {168C8644-3975-450D-94D2-29D21C135C16}.Release|x64.ActiveCfg = Release|Any CPU + {168C8644-3975-450D-94D2-29D21C135C16}.Release|x64.Build.0 = Release|Any CPU + {168C8644-3975-450D-94D2-29D21C135C16}.Release|x86.ActiveCfg = Release|Any CPU + {168C8644-3975-450D-94D2-29D21C135C16}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DCC8281F-06BE-4262-A133-ECB6FAB4EF4C} + EndGlobalSection +EndGlobal diff --git a/SimpleServer/Client.cs b/SimpleServer/Client.cs new file mode 100644 index 0000000..dd851a9 --- /dev/null +++ b/SimpleServer/Client.cs @@ -0,0 +1,279 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Net.Sockets; +using System.Net; +using System.Windows.Forms; + +namespace SimpleCommunication +{ + public class Client : IDisposable + { + #region DataMember & Ctor + public TcpClient tcpclient; + private NetworkStream netstream; + public string IP; + public string Port; + private byte[] readBytes; + private object tcpClientLock = new object();//锁TcpClient;Dispose之后就不允许EndRead,远程连接断开以后,就不允许再调用Dispose + private bool closed = false;//包括本地主动断开和远程断开 + + //在事务处理结束后才触发下列事件 + public event DlgNoParam ConnectFailEvent; + public event DlgOneParam NewClientEvent; + public event DlgOneParam RecvMsgEvent; + public event DlgOneParam RemoteDisconnectEvent; + public event DlgNoParam LocalDisconnectEvent; + /// + /// 客户端是否链接 + /// + public bool IsConnected => (tcpclient != null && tcpclient.Connected) ? true : false; + /// + /// 服务的client的构造函数 + /// + /// + public Client(TcpClient tcpclient) + { + this.tcpclient = tcpclient; + readBytes = new byte[tcpclient.ReceiveBufferSize];//接收数据的缓冲区大小,如果太小一段数据会多次接收完成 + netstream = tcpclient.GetStream();//如果远程客户端断开一样可以获得netstream + } + + /// + /// 客户端client的构造函数 + /// + public Client() + { + } + #endregion + + #region 数据收发 + + /// + /// 在建立连接的情况下发送消息 + /// + /// + /// + public bool SendMsg(string msg) + { + bool result = false; + try + { + if (netstream != null) + { + if (!string.IsNullOrEmpty(msg)) + { + byte[] buff = Encoding.Default.GetBytes(msg); + netstream.Write(buff, 0, buff.Length); + + + result = true; + } + } + } + catch (Exception ex) + { + throw ex; + } + return result; + } + + + + + /// + /// 服务的接收到客户端连接后最先做的操作之一,客户端接收数据线程起始 + /// + /// + public bool BeginRead() + { + bool result = false; + try + { + IP = (tcpclient.Client.RemoteEndPoint as IPEndPoint).Address.ToString(); + Port = (tcpclient.Client.RemoteEndPoint as IPEndPoint).Port.ToString(); + if (NewClientEvent != null) + { + NewClientEvent(IP + " " + Port); + } + netstream.BeginRead(readBytes, 0, readBytes.Length, EndRead, null);//如果远程客户端断开这句话一样可以执行 + result = true; + } + catch + { + throw; + } + return result; + } + + /// + /// 有互斥资源 + /// 接收数据,远程连接断开,远程程序关闭,本地连接断开,都会按顺序调用进来;因为连接关闭后不再调用BeginRead + /// 服务器listener.stop时不会进入这个函数,客户端照样通讯,服务端只是不能接收新连接而已 + /// + /// + private void EndRead(IAsyncResult ar) + { + lock (tcpClientLock) + { + if (!closed)//如果本地主动断开就不会进入 + { + try + { + string recvStr = ""; + int count = netstream.EndRead(ar); + if (count > 0) + { + recvStr = Encoding.Default.GetString(readBytes, 0, count); + recvStr = DateTime.Now.ToString("HH:mm:ss") + " [" + IP + " " + Port + "] :\n" + recvStr + "\n"; + if (RecvMsgEvent != null) + { + RecvMsgEvent(recvStr); + } + readBytes = new byte[tcpclient.ReceiveBufferSize]; + netstream.BeginRead(readBytes, 0, readBytes.Length, EndRead, null); + } + else//远程客户端主动断开 + { + LocalClientClose(); + } + } + catch (Exception ex) + { + if (ex.Message.Contains("无法从传输连接中读取数据: 远程主机强迫关闭了一个现有的连接")) + { + LocalClientClose(); + } + else + { + LocalClientClose(); + } + } + } + } + } + + #endregion + + #region 客户端连接和关闭 + + /// + /// 客户端的client连接服务器 + /// + /// + /// + /// + public bool Connect(ComboBox Server_IP, TextBox txtPort) + { + bool result = false; + try + { + + if (!string.IsNullOrEmpty(Server_IP.Text) && !string.IsNullOrEmpty(txtPort.Text)) + { + IP = Server_IP.Text.Trim(); + Port = txtPort.Text.Trim(); + IPAddress ipAddress = IPAddress.Parse(IP); + IPEndPoint point = new IPEndPoint(ipAddress, int.Parse(Port)); + tcpclient = new TcpClient(AddressFamily.InterNetwork); + readBytes = new byte[tcpclient.ReceiveBufferSize]; + tcpclient.Connect(point); + + netstream = tcpclient.GetStream(); + BeginRead(); + closed = false; + result = true; + } + } + catch (Exception ex) + { + if (ex.Message.Contains("由于目标计算机积极拒绝")) + { + if (ConnectFailEvent != null) + { + ConnectFailEvent(); + } + } + else + { + } + } + return result; + } + + /// + /// 远程连接断开后(点关闭断开,程序退出断开)本地连接处理 + /// + public void LocalClientClose() + { + closed = true; + DisposeEx(); + if (RemoteDisconnectEvent != null) + { + string param = IP + " " + Port; + if (RemoteDisconnectEvent != null) + { + RemoteDisconnectEvent(param); + } + } + } + + /// + /// 有互斥资源 + /// 在已连接条件下关闭本地连接和资源释放时调用 + /// + public void Dispose() + { + lock (tcpClientLock) + { + if (!closed) + { + closed = true; + DisposeEx(); + if (LocalDisconnectEvent != null) + { + LocalDisconnectEvent(); + } + } + } + } + + /// + /// 由Dispose和LocalClientClose调用 + /// + private void DisposeEx() + { + if (netstream != null) + { + netstream.Dispose(); + netstream = null; + } + if (tcpclient != null) + { + tcpclient.Close(); + tcpclient = null; + } + } + + #endregion + } + + /// <数据结构类> + /// 数据结构类 + /// + public class StateObject + { + //客户端Socket + public Socket workSocket = null; + //接收数据大小 + public const int BufferSize = 64; + // 声明接收数据 + public byte[] buffer = new byte[BufferSize]; + // 接收数据的内容 + public StringBuilder sb = new StringBuilder(); + /// + /// 通信方网络地址 + /// + public EndPoint SEndPoint; + } +} diff --git a/SimpleServer/ComConfig.cs b/SimpleServer/ComConfig.cs new file mode 100644 index 0000000..0168702 --- /dev/null +++ b/SimpleServer/ComConfig.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SimpleCommunication +{ + public class ComConfig + { + /// + /// 通讯块数量 + /// + public int Index; + /// + /// 是否自动链接 + /// + public bool Auto_Connect; + /// + /// 链接类型,0为服务端,1为客户端 + /// + public int Connect_Typt; + /// + /// PLC IP地址 + /// + public string TCP_IP; + /// + /// PLC端口号 + /// + public int TCP_Port; + /// + /// 串口名 + /// + public string COM_Port; + /// + /// 串口波特率 + /// + public int COM_BaudRate; + /// + /// 串口校验 + /// + public string COM_Parity; + /// + /// 串口数据位 + /// + public int COM_DataBit; + /// + /// 串口停止位 + /// + public int COM_StopBit; + /// + /// 是否启用心跳消息 + /// + public bool HeartBeat; + /// + /// 心跳设置地址 + /// + public string HeartText; + /// + /// 扫描间隔时间 + /// + public int HeartTime; + + + /// + /// 触发模块数量 + /// + public int JobCount; + /// + /// 结束符号 + /// + public int Endsymbol; + + //public List lstTgrParams; + } +} diff --git a/SimpleServer/CommonHelper.cs b/SimpleServer/CommonHelper.cs new file mode 100644 index 0000000..d3dc8dd --- /dev/null +++ b/SimpleServer/CommonHelper.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SimpleCommunication +{ + public delegate void DlgOneParam(T param); + public delegate void DlgNoParam(); + + public class CommonHelper + { + } +} diff --git a/SimpleServer/CommunUI.Designer.cs b/SimpleServer/CommunUI.Designer.cs new file mode 100644 index 0000000..cf53a5d --- /dev/null +++ b/SimpleServer/CommunUI.Designer.cs @@ -0,0 +1,907 @@ +namespace SimpleCommunication +{ + partial class CommunUI + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.info_Lab = new System.Windows.Forms.Label(); + this.txtRecv = new System.Windows.Forms.RichTextBox(); + this.txtLog = new System.Windows.Forms.TextBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.lbl_sendNum = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.receive_CheckBox = new System.Windows.Forms.CheckBox(); + this.lbl_receiveNum = new System.Windows.Forms.Label(); + this.btnClear = new System.Windows.Forms.LinkLabel(); + this.com_GroupBox = new System.Windows.Forms.GroupBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.stopBits_Box = new System.Windows.Forms.ComboBox(); + this.baudRate_Box = new System.Windows.Forms.ComboBox(); + this.label11 = new System.Windows.Forms.Label(); + this.parity_Box = new System.Windows.Forms.ComboBox(); + this.label12 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.comPort_Box = new System.Windows.Forms.ComboBox(); + this.dataBits_Box = new System.Windows.Forms.ComboBox(); + this.tcp_GroupBox = new System.Windows.Forms.GroupBox(); + this.tbIP = new System.Windows.Forms.ComboBox(); + this.tbPort = new System.Windows.Forms.TextBox(); + this.label31 = new System.Windows.Forms.Label(); + this.label33 = new System.Windows.Forms.Label(); + this.tcpType_Box = new System.Windows.Forms.ComboBox(); + this.label29 = new System.Windows.Forms.Label(); + this.tcpBtn_Panel = new System.Windows.Forms.Panel(); + this.reloadtcp_Btn = new System.Windows.Forms.Button(); + this.btnStart = new System.Windows.Forms.Button(); + this.btnDisconnect = new System.Windows.Forms.Button(); + this.btnClose = new System.Windows.Forms.Button(); + this.comBtn_Panel = new System.Windows.Forms.Panel(); + this.reloadCOM_Btn = new System.Windows.Forms.Button(); + this.com_Btn = new System.Windows.Forms.Button(); + this.panel3 = new System.Windows.Forms.Panel(); + this.Server_GroupBox = new System.Windows.Forms.GroupBox(); + this.lbOnline = new System.Windows.Forms.ListBox(); + this.info_GroupBox = new System.Windows.Forms.GroupBox(); + this.txtSend = new System.Windows.Forms.RichTextBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.sendTest_CheckBox = new System.Windows.Forms.CheckBox(); + this.send_CheckBox = new System.Windows.Forms.CheckBox(); + this.sendTest_CheckCRLF = new System.Windows.Forms.CheckBox(); + this.btnSend = new System.Windows.Forms.Button(); + this.panel4 = new System.Windows.Forms.Panel(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.txtIntervalTime = new System.Windows.Forms.TextBox(); + this.cmbEndSymbol = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.pgeAuto_CheckBox = new System.Windows.Forms.CheckBox(); + this.txtHeartData = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.saveSetting_Btn = new System.Windows.Forms.Button(); + this.Auto_CheckBox = new System.Windows.Forms.CheckBox(); + this.tmHeart = new System.Windows.Forms.Timer(this.components); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.groupBox2.SuspendLayout(); + this.com_GroupBox.SuspendLayout(); + this.tcp_GroupBox.SuspendLayout(); + this.tcpBtn_Panel.SuspendLayout(); + this.comBtn_Panel.SuspendLayout(); + this.panel3.SuspendLayout(); + this.Server_GroupBox.SuspendLayout(); + this.info_GroupBox.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.panel4.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // info_Lab + // + this.info_Lab.BackColor = System.Drawing.Color.Red; + this.info_Lab.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.info_Lab.ForeColor = System.Drawing.Color.White; + this.info_Lab.Location = new System.Drawing.Point(475, 0); + this.info_Lab.Name = "info_Lab"; + this.info_Lab.Size = new System.Drawing.Size(438, 33); + this.info_Lab.TabIndex = 103; + this.info_Lab.Text = "未连接"; + this.info_Lab.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // txtRecv + // + this.txtRecv.BackColor = System.Drawing.SystemColors.Window; + this.txtRecv.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtRecv.Location = new System.Drawing.Point(3, 17); + this.txtRecv.Name = "txtRecv"; + this.txtRecv.ReadOnly = true; + this.txtRecv.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; + this.txtRecv.Size = new System.Drawing.Size(467, 337); + this.txtRecv.TabIndex = 104; + this.txtRecv.Text = ""; + // + // txtLog + // + this.txtLog.BackColor = System.Drawing.SystemColors.Window; + this.txtLog.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtLog.Location = new System.Drawing.Point(3, 16); + this.txtLog.Multiline = true; + this.txtLog.Name = "txtLog"; + this.txtLog.ReadOnly = true; + this.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.txtLog.Size = new System.Drawing.Size(257, 163); + this.txtLog.TabIndex = 105; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.lbl_sendNum); + this.groupBox2.Controls.Add(this.txtRecv); + this.groupBox2.Controls.Add(this.label9); + this.groupBox2.Controls.Add(this.label5); + this.groupBox2.Controls.Add(this.receive_CheckBox); + this.groupBox2.Controls.Add(this.lbl_receiveNum); + this.groupBox2.Controls.Add(this.btnClear); + this.groupBox2.Location = new System.Drawing.Point(0, 3); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(473, 357); + this.groupBox2.TabIndex = 107; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "接收文本"; + // + // lbl_sendNum + // + this.lbl_sendNum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.lbl_sendNum.AutoSize = true; + this.lbl_sendNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbl_sendNum.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + this.lbl_sendNum.Location = new System.Drawing.Point(291, 0); + this.lbl_sendNum.Name = "lbl_sendNum"; + this.lbl_sendNum.Size = new System.Drawing.Size(15, 17); + this.lbl_sendNum.TabIndex = 222; + this.lbl_sendNum.Text = "0"; + // + // label9 + // + this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + this.label9.Location = new System.Drawing.Point(319, -3); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(79, 20); + this.label9.TabIndex = 219; + this.label9.Text = "接收次数:"; + // + // label5 + // + this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + this.label5.Location = new System.Drawing.Point(213, -3); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(79, 20); + this.label5.TabIndex = 221; + this.label5.Text = "发送次数:"; + // + // receive_CheckBox + // + this.receive_CheckBox.AutoSize = true; + this.receive_CheckBox.BackColor = System.Drawing.SystemColors.Control; + this.receive_CheckBox.Location = new System.Drawing.Point(79, 0); + this.receive_CheckBox.Name = "receive_CheckBox"; + this.receive_CheckBox.Size = new System.Drawing.Size(126, 16); + this.receive_CheckBox.TabIndex = 217; + this.receive_CheckBox.Text = "十六进制显示(Hex)"; + this.receive_CheckBox.UseVisualStyleBackColor = false; + // + // lbl_receiveNum + // + this.lbl_receiveNum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.lbl_receiveNum.AutoSize = true; + this.lbl_receiveNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbl_receiveNum.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + this.lbl_receiveNum.Location = new System.Drawing.Point(402, 0); + this.lbl_receiveNum.Name = "lbl_receiveNum"; + this.lbl_receiveNum.Size = new System.Drawing.Size(15, 17); + this.lbl_receiveNum.TabIndex = 220; + this.lbl_receiveNum.Text = "0"; + // + // btnClear + // + this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnClear.AutoSize = true; + this.btnClear.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnClear.Location = new System.Drawing.Point(436, -3); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(37, 20); + this.btnClear.TabIndex = 218; + this.btnClear.TabStop = true; + this.btnClear.Text = "清空"; + this.btnClear.Click += new System.EventHandler(this.btnClear_Click); + // + // com_GroupBox + // + this.com_GroupBox.Controls.Add(this.label2); + this.com_GroupBox.Controls.Add(this.label8); + this.com_GroupBox.Controls.Add(this.stopBits_Box); + this.com_GroupBox.Controls.Add(this.baudRate_Box); + this.com_GroupBox.Controls.Add(this.label11); + this.com_GroupBox.Controls.Add(this.parity_Box); + this.com_GroupBox.Controls.Add(this.label12); + this.com_GroupBox.Controls.Add(this.label13); + this.com_GroupBox.Controls.Add(this.comPort_Box); + this.com_GroupBox.Controls.Add(this.dataBits_Box); + this.com_GroupBox.Location = new System.Drawing.Point(475, 74); + this.com_GroupBox.Name = "com_GroupBox"; + this.com_GroupBox.Size = new System.Drawing.Size(202, 147); + this.com_GroupBox.TabIndex = 109; + this.com_GroupBox.TabStop = false; + this.com_GroupBox.Text = "串口设置"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(9, 23); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(63, 14); + this.label2.TabIndex = 3; + this.label2.Text = "端口号:"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label8.Location = new System.Drawing.Point(9, 68); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(63, 14); + this.label8.TabIndex = 11; + this.label8.Text = "校验位:"; + // + // stopBits_Box + // + this.stopBits_Box.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.stopBits_Box.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.stopBits_Box.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.stopBits_Box.FormattingEnabled = true; + this.stopBits_Box.Items.AddRange(new object[] { + "1", + "2"}); + this.stopBits_Box.Location = new System.Drawing.Point(81, 117); + this.stopBits_Box.Name = "stopBits_Box"; + this.stopBits_Box.Size = new System.Drawing.Size(115, 21); + this.stopBits_Box.TabIndex = 8; + // + // baudRate_Box + // + this.baudRate_Box.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.baudRate_Box.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.baudRate_Box.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.baudRate_Box.FormattingEnabled = true; + this.baudRate_Box.Items.AddRange(new object[] { + "9600", + "14400", + "19200", + "38400", + "56000", + "57600", + "115200"}); + this.baudRate_Box.Location = new System.Drawing.Point(81, 44); + this.baudRate_Box.Name = "baudRate_Box"; + this.baudRate_Box.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.baudRate_Box.Size = new System.Drawing.Size(115, 21); + this.baudRate_Box.TabIndex = 4; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.Location = new System.Drawing.Point(9, 93); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(63, 14); + this.label11.TabIndex = 7; + this.label11.Text = "数据位:"; + // + // parity_Box + // + this.parity_Box.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.parity_Box.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.parity_Box.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.parity_Box.FormattingEnabled = true; + this.parity_Box.Items.AddRange(new object[] { + "None", + "Odd", + "Even", + "Mark", + "Space"}); + this.parity_Box.Location = new System.Drawing.Point(81, 68); + this.parity_Box.Name = "parity_Box"; + this.parity_Box.Size = new System.Drawing.Size(115, 21); + this.parity_Box.TabIndex = 10; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(9, 44); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(63, 14); + this.label12.TabIndex = 5; + this.label12.Text = "波特率:"; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label13.Location = new System.Drawing.Point(9, 118); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(63, 14); + this.label13.TabIndex = 9; + this.label13.Text = "停止位:"; + // + // comPort_Box + // + this.comPort_Box.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comPort_Box.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.comPort_Box.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comPort_Box.FormattingEnabled = true; + this.comPort_Box.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.comPort_Box.Location = new System.Drawing.Point(81, 21); + this.comPort_Box.Name = "comPort_Box"; + this.comPort_Box.Size = new System.Drawing.Size(115, 21); + this.comPort_Box.TabIndex = 10; + // + // dataBits_Box + // + this.dataBits_Box.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.dataBits_Box.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.dataBits_Box.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dataBits_Box.FormattingEnabled = true; + this.dataBits_Box.Items.AddRange(new object[] { + "8", + "7", + "6", + "5"}); + this.dataBits_Box.Location = new System.Drawing.Point(81, 93); + this.dataBits_Box.Name = "dataBits_Box"; + this.dataBits_Box.Size = new System.Drawing.Size(115, 21); + this.dataBits_Box.TabIndex = 6; + // + // tcp_GroupBox + // + this.tcp_GroupBox.BackColor = System.Drawing.Color.Transparent; + this.tcp_GroupBox.Controls.Add(this.tbIP); + this.tcp_GroupBox.Controls.Add(this.tbPort); + this.tcp_GroupBox.Controls.Add(this.label31); + this.tcp_GroupBox.Controls.Add(this.label33); + this.tcp_GroupBox.Location = new System.Drawing.Point(696, 74); + this.tcp_GroupBox.Name = "tcp_GroupBox"; + this.tcp_GroupBox.Size = new System.Drawing.Size(213, 89); + this.tcp_GroupBox.TabIndex = 108; + this.tcp_GroupBox.TabStop = false; + this.tcp_GroupBox.Text = "TCP设置"; + // + // tbIP + // + this.tbIP.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.tbIP.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.tbIP.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tbIP.FormattingEnabled = true; + this.tbIP.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.tbIP.Location = new System.Drawing.Point(61, 24); + this.tbIP.Name = "tbIP"; + this.tbIP.Size = new System.Drawing.Size(146, 21); + this.tbIP.TabIndex = 39; + // + // tbPort + // + this.tbPort.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tbPort.Location = new System.Drawing.Point(61, 51); + this.tbPort.Name = "tbPort"; + this.tbPort.Size = new System.Drawing.Size(146, 23); + this.tbPort.TabIndex = 38; + this.tbPort.Text = "7100"; + // + // label31 + // + this.label31.AutoSize = true; + this.label31.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label31.Location = new System.Drawing.Point(8, 58); + this.label31.Name = "label31"; + this.label31.Size = new System.Drawing.Size(63, 14); + this.label31.TabIndex = 11; + this.label31.Text = "端口号:"; + // + // label33 + // + this.label33.AutoSize = true; + this.label33.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label33.Location = new System.Drawing.Point(8, 27); + this.label33.Name = "label33"; + this.label33.Size = new System.Drawing.Size(63, 14); + this.label33.TabIndex = 5; + this.label33.Text = "IP地址:"; + // + // tcpType_Box + // + this.tcpType_Box.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.tcpType_Box.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.tcpType_Box.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tcpType_Box.FormattingEnabled = true; + this.tcpType_Box.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.tcpType_Box.Items.AddRange(new object[] { + "串口(COM)", + "服务器(Server)", + "客户端(Client)", + "串口(COM)/客户端(Client)"}); + this.tcpType_Box.Location = new System.Drawing.Point(556, 41); + this.tcpType_Box.Name = "tcpType_Box"; + this.tcpType_Box.Size = new System.Drawing.Size(153, 21); + this.tcpType_Box.TabIndex = 111; + this.tcpType_Box.SelectedIndexChanged += new System.EventHandler(this.tcpType_Box_SelectedIndexChanged); + // + // label29 + // + this.label29.AutoSize = true; + this.label29.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label29.Location = new System.Drawing.Point(482, 44); + this.label29.Name = "label29"; + this.label29.Size = new System.Drawing.Size(77, 14); + this.label29.TabIndex = 110; + this.label29.Text = "链接类型:"; + // + // tcpBtn_Panel + // + this.tcpBtn_Panel.Controls.Add(this.reloadtcp_Btn); + this.tcpBtn_Panel.Controls.Add(this.btnStart); + this.tcpBtn_Panel.Controls.Add(this.btnDisconnect); + this.tcpBtn_Panel.Controls.Add(this.btnClose); + this.tcpBtn_Panel.Location = new System.Drawing.Point(696, 191); + this.tcpBtn_Panel.Name = "tcpBtn_Panel"; + this.tcpBtn_Panel.Size = new System.Drawing.Size(217, 62); + this.tcpBtn_Panel.TabIndex = 110; + // + // reloadtcp_Btn + // + this.reloadtcp_Btn.Location = new System.Drawing.Point(116, 9); + this.reloadtcp_Btn.Name = "reloadtcp_Btn"; + this.reloadtcp_Btn.Size = new System.Drawing.Size(75, 23); + this.reloadtcp_Btn.TabIndex = 117; + this.reloadtcp_Btn.Text = "刷新网口"; + this.reloadtcp_Btn.UseVisualStyleBackColor = true; + this.reloadtcp_Btn.Click += new System.EventHandler(this.reloadtcp_Btn_Click); + // + // btnStart + // + this.btnStart.Location = new System.Drawing.Point(9, 9); + this.btnStart.Name = "btnStart"; + this.btnStart.Size = new System.Drawing.Size(75, 23); + this.btnStart.TabIndex = 111; + this.btnStart.Text = "启动服务器"; + this.btnStart.UseVisualStyleBackColor = true; + this.btnStart.Click += new System.EventHandler(this.btnStart_Click); + // + // btnDisconnect + // + this.btnDisconnect.Location = new System.Drawing.Point(115, 38); + this.btnDisconnect.Name = "btnDisconnect"; + this.btnDisconnect.Size = new System.Drawing.Size(76, 23); + this.btnDisconnect.TabIndex = 113; + this.btnDisconnect.Text = "关闭连接"; + this.btnDisconnect.UseVisualStyleBackColor = true; + this.btnDisconnect.Click += new System.EventHandler(this.btnDisconnect_Click); + // + // btnClose + // + this.btnClose.Location = new System.Drawing.Point(9, 35); + this.btnClose.Name = "btnClose"; + this.btnClose.Size = new System.Drawing.Size(75, 23); + this.btnClose.TabIndex = 112; + this.btnClose.Text = "关闭服务器"; + this.btnClose.UseVisualStyleBackColor = true; + this.btnClose.Click += new System.EventHandler(this.btnClose_Click); + // + // comBtn_Panel + // + this.comBtn_Panel.Controls.Add(this.reloadCOM_Btn); + this.comBtn_Panel.Controls.Add(this.com_Btn); + this.comBtn_Panel.Location = new System.Drawing.Point(477, 224); + this.comBtn_Panel.Name = "comBtn_Panel"; + this.comBtn_Panel.Size = new System.Drawing.Size(200, 29); + this.comBtn_Panel.TabIndex = 114; + // + // reloadCOM_Btn + // + this.reloadCOM_Btn.Location = new System.Drawing.Point(106, 3); + this.reloadCOM_Btn.Name = "reloadCOM_Btn"; + this.reloadCOM_Btn.Size = new System.Drawing.Size(75, 23); + this.reloadCOM_Btn.TabIndex = 116; + this.reloadCOM_Btn.Text = "刷新串口"; + this.reloadCOM_Btn.UseVisualStyleBackColor = true; + this.reloadCOM_Btn.Click += new System.EventHandler(this.reloadCOM_Btn_Click); + // + // com_Btn + // + this.com_Btn.ForeColor = System.Drawing.Color.Black; + this.com_Btn.Location = new System.Drawing.Point(16, 3); + this.com_Btn.Name = "com_Btn"; + this.com_Btn.Size = new System.Drawing.Size(75, 23); + this.com_Btn.TabIndex = 115; + this.com_Btn.Text = "打开串口"; + this.com_Btn.UseVisualStyleBackColor = true; + this.com_Btn.Click += new System.EventHandler(this.com_Btn_Click); + // + // panel3 + // + this.panel3.Controls.Add(this.Server_GroupBox); + this.panel3.Controls.Add(this.info_GroupBox); + this.panel3.Location = new System.Drawing.Point(477, 327); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(436, 185); + this.panel3.TabIndex = 115; + // + // Server_GroupBox + // + this.Server_GroupBox.Controls.Add(this.lbOnline); + this.Server_GroupBox.Location = new System.Drawing.Point(269, 1); + this.Server_GroupBox.Name = "Server_GroupBox"; + this.Server_GroupBox.Size = new System.Drawing.Size(167, 181); + this.Server_GroupBox.TabIndex = 106; + this.Server_GroupBox.TabStop = false; + this.Server_GroupBox.Text = "客户端在线列表"; + // + // lbOnline + // + this.lbOnline.BackColor = System.Drawing.SystemColors.Control; + this.lbOnline.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbOnline.FormattingEnabled = true; + this.lbOnline.ItemHeight = 12; + this.lbOnline.Location = new System.Drawing.Point(3, 17); + this.lbOnline.Name = "lbOnline"; + this.lbOnline.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple; + this.lbOnline.Size = new System.Drawing.Size(161, 161); + this.lbOnline.TabIndex = 106; + // + // info_GroupBox + // + this.info_GroupBox.Controls.Add(this.txtLog); + this.info_GroupBox.Location = new System.Drawing.Point(3, 2); + this.info_GroupBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.info_GroupBox.Name = "info_GroupBox"; + this.info_GroupBox.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.info_GroupBox.Size = new System.Drawing.Size(263, 181); + this.info_GroupBox.TabIndex = 103; + this.info_GroupBox.TabStop = false; + this.info_GroupBox.Text = "通讯日志信息"; + // + // txtSend + // + this.txtSend.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtSend.Location = new System.Drawing.Point(3, 17); + this.txtSend.Name = "txtSend"; + this.txtSend.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; + this.txtSend.Size = new System.Drawing.Size(461, 100); + this.txtSend.TabIndex = 116; + this.txtSend.Text = ""; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.sendTest_CheckBox); + this.groupBox1.Controls.Add(this.send_CheckBox); + this.groupBox1.Controls.Add(this.txtSend); + this.groupBox1.Controls.Add(this.sendTest_CheckCRLF); + this.groupBox1.Location = new System.Drawing.Point(3, 366); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(467, 120); + this.groupBox1.TabIndex = 117; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "发送文本"; + // + // sendTest_CheckBox + // + this.sendTest_CheckBox.AutoSize = true; + this.sendTest_CheckBox.BackColor = System.Drawing.SystemColors.Control; + this.sendTest_CheckBox.Location = new System.Drawing.Point(69, 0); + this.sendTest_CheckBox.Name = "sendTest_CheckBox"; + this.sendTest_CheckBox.Size = new System.Drawing.Size(48, 16); + this.sendTest_CheckBox.TabIndex = 118; + this.sendTest_CheckBox.Text = "测试"; + this.sendTest_CheckBox.UseVisualStyleBackColor = false; + // + // send_CheckBox + // + this.send_CheckBox.AutoSize = true; + this.send_CheckBox.BackColor = System.Drawing.SystemColors.Control; + this.send_CheckBox.Location = new System.Drawing.Point(136, 0); + this.send_CheckBox.Name = "send_CheckBox"; + this.send_CheckBox.Size = new System.Drawing.Size(126, 16); + this.send_CheckBox.TabIndex = 117; + this.send_CheckBox.Text = "十六进制发送(Hex)"; + this.send_CheckBox.UseVisualStyleBackColor = false; + // + // sendTest_CheckCRLF + // + this.sendTest_CheckCRLF.AutoSize = true; + this.sendTest_CheckCRLF.BackColor = System.Drawing.SystemColors.Control; + this.sendTest_CheckCRLF.Location = new System.Drawing.Point(396, -1); + this.sendTest_CheckCRLF.Name = "sendTest_CheckCRLF"; + this.sendTest_CheckCRLF.Size = new System.Drawing.Size(72, 16); + this.sendTest_CheckCRLF.TabIndex = 119; + this.sendTest_CheckCRLF.Text = "增加CRLF"; + this.sendTest_CheckCRLF.UseVisualStyleBackColor = false; + // + // btnSend + // + this.btnSend.Location = new System.Drawing.Point(380, 489); + this.btnSend.Name = "btnSend"; + this.btnSend.Size = new System.Drawing.Size(75, 23); + this.btnSend.TabIndex = 118; + this.btnSend.Text = "发送"; + this.btnSend.UseVisualStyleBackColor = true; + this.btnSend.Click += new System.EventHandler(this.btnSend_Click); + // + // panel4 + // + this.panel4.Controls.Add(this.groupBox3); + this.panel4.Location = new System.Drawing.Point(480, 258); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(433, 65); + this.panel4.TabIndex = 119; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.txtIntervalTime); + this.groupBox3.Controls.Add(this.cmbEndSymbol); + this.groupBox3.Controls.Add(this.label1); + this.groupBox3.Controls.Add(this.label4); + this.groupBox3.Controls.Add(this.label6); + this.groupBox3.Controls.Add(this.pgeAuto_CheckBox); + this.groupBox3.Controls.Add(this.txtHeartData); + this.groupBox3.Controls.Add(this.label3); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(0, 0); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(433, 65); + this.groupBox3.TabIndex = 108; + this.groupBox3.TabStop = false; + // + // txtIntervalTime + // + this.txtIntervalTime.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtIntervalTime.Location = new System.Drawing.Point(144, 32); + this.txtIntervalTime.Name = "txtIntervalTime"; + this.txtIntervalTime.Size = new System.Drawing.Size(47, 23); + this.txtIntervalTime.TabIndex = 122; + this.txtIntervalTime.Text = "1000"; + // + // cmbEndSymbol + // + this.cmbEndSymbol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbEndSymbol.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.cmbEndSymbol.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cmbEndSymbol.FormattingEnabled = true; + this.cmbEndSymbol.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.cmbEndSymbol.Items.AddRange(new object[] { + "无", + "CRLF(\\r\\n)", + "LF(\\n)", + "CR(\\r)"}); + this.cmbEndSymbol.Location = new System.Drawing.Point(311, 31); + this.cmbEndSymbol.Name = "cmbEndSymbol"; + this.cmbEndSymbol.Size = new System.Drawing.Size(112, 21); + this.cmbEndSymbol.TabIndex = 12; + this.cmbEndSymbol.SelectedIndexChanged += new System.EventHandler(this.cmbEndSymbol_SelectedIndexChanged); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(258, 34); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(63, 14); + this.label1.TabIndex = 12; + this.label1.Text = "结束符:"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label4.Location = new System.Drawing.Point(197, 38); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(21, 14); + this.label4.TabIndex = 123; + this.label4.Text = "ms"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label6.Location = new System.Drawing.Point(142, 18); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(65, 12); + this.label6.TabIndex = 121; + this.label6.Text = "间隔时间:"; + // + // pgeAuto_CheckBox + // + this.pgeAuto_CheckBox.AutoSize = true; + this.pgeAuto_CheckBox.BackColor = System.Drawing.SystemColors.Control; + this.pgeAuto_CheckBox.Location = new System.Drawing.Point(8, 0); + this.pgeAuto_CheckBox.Name = "pgeAuto_CheckBox"; + this.pgeAuto_CheckBox.Size = new System.Drawing.Size(96, 16); + this.pgeAuto_CheckBox.TabIndex = 120; + this.pgeAuto_CheckBox.Text = "启用连续发送"; + this.pgeAuto_CheckBox.UseVisualStyleBackColor = false; + // + // txtHeartData + // + this.txtHeartData.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtHeartData.Location = new System.Drawing.Point(18, 34); + this.txtHeartData.Name = "txtHeartData"; + this.txtHeartData.Size = new System.Drawing.Size(99, 23); + this.txtHeartData.TabIndex = 41; + this.txtHeartData.Text = "1"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.Location = new System.Drawing.Point(17, 17); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(65, 12); + this.label3.TabIndex = 40; + this.label3.Text = "发送内容:"; + // + // saveSetting_Btn + // + this.saveSetting_Btn.Enabled = false; + this.saveSetting_Btn.Location = new System.Drawing.Point(817, 41); + this.saveSetting_Btn.Name = "saveSetting_Btn"; + this.saveSetting_Btn.Size = new System.Drawing.Size(70, 22); + this.saveSetting_Btn.TabIndex = 106; + this.saveSetting_Btn.Text = "参数保存"; + this.saveSetting_Btn.UseVisualStyleBackColor = true; + this.saveSetting_Btn.Click += new System.EventHandler(this.saveSetting_Btn_Click); + // + // Auto_CheckBox + // + this.Auto_CheckBox.AutoSize = true; + this.Auto_CheckBox.Enabled = false; + this.Auto_CheckBox.Location = new System.Drawing.Point(732, 44); + this.Auto_CheckBox.Name = "Auto_CheckBox"; + this.Auto_CheckBox.Size = new System.Drawing.Size(72, 16); + this.Auto_CheckBox.TabIndex = 107; + this.Auto_CheckBox.Text = "自动联机"; + this.Auto_CheckBox.UseVisualStyleBackColor = true; + // + // tmHeart + // + this.tmHeart.Enabled = true; + this.tmHeart.Tick += new System.EventHandler(this.tmHeart_Tick); + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Enabled = false; + this.checkBox1.Location = new System.Drawing.Point(696, 169); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(108, 16); + this.checkBox1.TabIndex = 109; + this.checkBox1.Text = "客户端断线重连"; + this.checkBox1.UseVisualStyleBackColor = true; + // + // CommunUI + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.checkBox1); + this.Controls.Add(this.saveSetting_Btn); + this.Controls.Add(this.Auto_CheckBox); + this.Controls.Add(this.tcpType_Box); + this.Controls.Add(this.panel4); + this.Controls.Add(this.label29); + this.Controls.Add(this.btnSend); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.panel3); + this.Controls.Add(this.comBtn_Panel); + this.Controls.Add(this.tcpBtn_Panel); + this.Controls.Add(this.com_GroupBox); + this.Controls.Add(this.tcp_GroupBox); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.info_Lab); + this.Name = "CommunUI"; + this.Size = new System.Drawing.Size(916, 518); + this.Load += new System.EventHandler(this.CommunUI_Load); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.com_GroupBox.ResumeLayout(false); + this.com_GroupBox.PerformLayout(); + this.tcp_GroupBox.ResumeLayout(false); + this.tcp_GroupBox.PerformLayout(); + this.tcpBtn_Panel.ResumeLayout(false); + this.comBtn_Panel.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.Server_GroupBox.ResumeLayout(false); + this.info_GroupBox.ResumeLayout(false); + this.info_GroupBox.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.panel4.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + public System.Windows.Forms.Label info_Lab; + private System.Windows.Forms.RichTextBox txtRecv; + private System.Windows.Forms.TextBox txtLog; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.GroupBox com_GroupBox; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label8; + internal System.Windows.Forms.ComboBox stopBits_Box; + internal System.Windows.Forms.ComboBox baudRate_Box; + private System.Windows.Forms.Label label11; + internal System.Windows.Forms.ComboBox parity_Box; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label13; + internal System.Windows.Forms.ComboBox comPort_Box; + internal System.Windows.Forms.ComboBox dataBits_Box; + private System.Windows.Forms.GroupBox tcp_GroupBox; + internal System.Windows.Forms.ComboBox tbIP; + internal System.Windows.Forms.TextBox tbPort; + private System.Windows.Forms.Label label31; + private System.Windows.Forms.Label label33; + internal System.Windows.Forms.Label lbl_sendNum; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.CheckBox receive_CheckBox; + internal System.Windows.Forms.Label lbl_receiveNum; + private System.Windows.Forms.LinkLabel btnClear; + internal System.Windows.Forms.ComboBox tcpType_Box; + private System.Windows.Forms.Label label29; + private System.Windows.Forms.Panel tcpBtn_Panel; + private System.Windows.Forms.Panel comBtn_Panel; + public System.Windows.Forms.Panel panel3; + public System.Windows.Forms.GroupBox Server_GroupBox; + private System.Windows.Forms.ListBox lbOnline; + public System.Windows.Forms.GroupBox info_GroupBox; + private System.Windows.Forms.RichTextBox txtSend; + private System.Windows.Forms.GroupBox groupBox1; + internal System.Windows.Forms.CheckBox sendTest_CheckCRLF; + internal System.Windows.Forms.CheckBox sendTest_CheckBox; + internal System.Windows.Forms.CheckBox send_CheckBox; + private System.Windows.Forms.Button btnSend; + private System.Windows.Forms.Panel panel4; + internal System.Windows.Forms.ComboBox cmbEndSymbol; + private System.Windows.Forms.Label label1; + internal System.Windows.Forms.Button saveSetting_Btn; + internal System.Windows.Forms.CheckBox Auto_CheckBox; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label label4; + internal System.Windows.Forms.TextBox txtIntervalTime; + private System.Windows.Forms.Label label6; + internal System.Windows.Forms.CheckBox pgeAuto_CheckBox; + internal System.Windows.Forms.TextBox txtHeartData; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Timer tmHeart; + public System.Windows.Forms.Button btnStart; + public System.Windows.Forms.Button reloadCOM_Btn; + public System.Windows.Forms.Button com_Btn; + internal System.Windows.Forms.CheckBox checkBox1; + internal System.Windows.Forms.Button btnClose; + internal System.Windows.Forms.Button btnDisconnect; + internal System.Windows.Forms.Button reloadtcp_Btn; + } +} diff --git a/SimpleServer/CommunUI.cs b/SimpleServer/CommunUI.cs new file mode 100644 index 0000000..9e52dfc --- /dev/null +++ b/SimpleServer/CommunUI.cs @@ -0,0 +1,1384 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using System.Threading; +using System.Net; +using System.Net.Sockets; +using System.IO.Ports; + +namespace SimpleCommunication +{ + public partial class CommunUI : UserControl + { + /// + /// 保存委托 + /// + /// + /// + public delegate void SaveParamsHandler(int plcIndex, int trgIndex); + public event SaveParamsHandler SaveParamsEvent; + /// + /// 通讯接收数据委托 + /// + /// + public delegate void TCPCOMRecvMsgHandle(StringBox msgBox); + public TCPCOMRecvMsgHandle TcoComRecvMsgEvent; + /// + /// 常规数据信息委托 + /// + /// + public delegate void TCPCOMInfoMsgHandle(StringBox msgBox); + public TCPCOMInfoMsgHandle TcoComInfoMsgEvent; + + /// + /// 串口 + /// + public Serial comSerial; + /// + /// TCP服务端 + /// + public Server tcpServer; + /// + /// TCP客户端 + /// + public Client tcpClient; + /// + /// Com通讯类型 + /// + public bool com; + /// + /// TCP服务端类型 + /// + public bool server; + /// + /// TCP客户端类型 + /// + public bool client; + /// + /// 服务端创建事件成功 + /// + public bool ServerCreatedSuccessfully = false; + /// + ///客户端创建事件成功 + /// + public bool ClientCreatedSuccessfully = false; + /// + /// 串口端创建事件成功 + /// + public bool comSerialCreatedSuccessfully = false; + /// + /// 结束符号 + /// + public string Endsymbol; + /// + /// 是否链接成功 + /// + public bool IsConnected => (com || server || client) ? true : false; + /// + /// 通讯类型 + /// + public int type { get; private set; } + /// + /// 选择服务端,选择Combox类型0 + /// + private bool isServer => tcpType_Box.SelectedIndex == 1; + + public int JobCount { get; set; } + /// + /// 发送次数 + /// + public int SendCount = 0; + /// + /// 接收次数 + /// + public int RecvCount = 0; + /// + /// 参数 + /// + public ComConfig ComConfig = new ComConfig(); + /// + /// 页面 + /// + public TabPage[] tgrPage = new TabPage[10]; + + public int Index; + public bool receiveHexShow; + public bool SendHexShow; + + /// + /// 构造函数 + /// + public CommunUI() + { + InitializeComponent(); + comSerial = new Serial(); + tcpServer = new Server(); + tcpClient = new Client(); + LocalIP(tbIP); + comSerial.LoadComSerial(comPort_Box); + SetStyle(ControlStyles.UserPaint, true); + SetStyle(ControlStyles.AllPaintingInWmPaint, true); + SetStyle(ControlStyles.DoubleBuffer, true); + + } + + public CommunUI(ComConfig comConfig) + : this() + { + ComConfig = comConfig; + Index = ComConfig.Index; + JobCount = ComConfig.JobCount; + txtHeartData.Text = ComConfig.HeartText; + txtIntervalTime.Text = ComConfig.HeartTime.ToString(); + tcpType_Box.SelectedIndex = ComConfig.Connect_Typt; + tbPort.Text = ComConfig.TCP_Port.ToString(); + baudRate_Box.Text = ComConfig.COM_BaudRate.ToString(); + parity_Box.Text = ComConfig.COM_Parity.ToString(); + dataBits_Box.Text = ComConfig.COM_DataBit.ToString(); + stopBits_Box.Text = ComConfig.COM_StopBit.ToString(); + cmbEndSymbol.SelectedIndex = ComConfig.Endsymbol; + + if (ComConfig.Connect_Typt == 0)//串口 + { + //type = 0; + server = false; + client = false; + com = true; + ServerDlgSubscribe(0, true); + comSerialCreatedSuccessfully = true; + + + } + else if (ComConfig.Connect_Typt == 1) //服务器 + { + //type = 1; + server = true; + client = false; + com = false; + btnStart.Text = "启动服务器"; + btnDisconnect.Text = "关闭链接"; + btnClose.Enabled = true; + ServerDlgSubscribe(1, true); + ServerCreatedSuccessfully = true; + } + else if (ComConfig.Connect_Typt == 2) //客户端 + { + //type = 2; + server = false; + client = true; + com = false; + btnStart.Text = "链接服务"; + btnDisconnect.Text = "断开链接"; + btnClose.Enabled = false; + ServerDlgSubscribe(2, true); + ClientCreatedSuccessfully = true; + } + else + { + server = true; + com = true; + ServerDlgSubscribe(0, true); + comSerialCreatedSuccessfully = true; + btnStart.Text = "链接服务"; + btnDisconnect.Text = "断开链接"; + btnClose.Enabled = false; + ServerDlgSubscribe(2, true); + ClientCreatedSuccessfully = true; + } + } + + #region 界面事件处理 + /// + /// 界面Loadsh + /// + /// + /// + private void CommunUI_Load(object sender, EventArgs e) + { + + } + + private void com_Btn_Click(object sender, EventArgs e) + { + COMOpen(); + } + + public void COMOpen() + { + + if (!comSerial.IsOpen) + { + StopBits stopBits = StopBits.None; + string text = stopBits_Box.Text; + if (!(text == "1")) + { + if (text == "2") + { + stopBits = StopBits.Two; + } + } + else + { + stopBits = StopBits.One; + } + if (comPort_Box.Text != "") + { + comSerial.OpenSerialPort(comPort_Box.Text, int.Parse(baudRate_Box.SelectedItem.ToString()), (Parity)parity_Box.SelectedIndex, int.Parse(dataBits_Box.SelectedItem.ToString()), stopBits); + Thread.Sleep(50); + if (comSerial.IsOpen) + { + if (!comSerialCreatedSuccessfully) + { + ServerDlgSubscribe(2, true); + comSerialCreatedSuccessfully = true; + } + + //LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", comSerial.getUserPortName(), " <--> 串口已打开!\r\n")); + info_Lab.Text = "串口:" + comSerial.getUserPortName(); + info_Lab.BackColor = Color.Green; + tcpBtn_Panel.Enabled = false; + com_Btn.Text = "关闭串口"; + com_Btn.BackColor = Color.Green; + com_GroupBox.Enabled = false; + tcp_GroupBox.Enabled = false; + tcpType_Box.Enabled = false; + saveSetting_Btn.Enabled = true; + Auto_CheckBox.Enabled = true; + pgeAuto_CheckBox.Enabled = true; + } + } + else + { + MessageBox.Show("打开串口失败,无法获取串口!"); + } + } + else + { + comSerial.CloseSeriaPort(); + Thread.Sleep(50); + if (!comSerial.IsOpen) + { + if (comSerialCreatedSuccessfully) + { + ServerDlgSubscribe(2, false); + comSerialCreatedSuccessfully = false; + } + + + info_Lab.Text = "未连接"; + info_Lab.Text = "未连接"; + info_Lab.BackColor = Color.Red; + tcpBtn_Panel.Enabled = true; + saveSetting_Btn.Enabled = false; + Auto_CheckBox.Enabled = false; + pgeAuto_CheckBox.Enabled = false; + com_Btn.Text = "打开串口"; + com_Btn.BackColor = Color.Transparent; + com_GroupBox.Enabled = true; + tcp_GroupBox.Enabled = true; + tcpType_Box.Enabled = true; + //com = false; + + + } + } + + } + + /// + /// 开启服务器链接 + /// + /// + /// + public void btnStart_Click(object sender, EventArgs e) + { + TCPOpen(); + } + + public void TCPOpen() + { + if (isServer) + { + //if (tcpServer.IsConnected) + //{ + // try + // { + // tcpServer.DisconnectClient(); + // } + // catch + // { + // } + // LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", tcpServer.listener.Server.LocalEndPoint, " <--> 服务器已关闭!\r\n")); + // tcpServer.Dispose(); + // Thread.Sleep(200); + // if (!tcpServer.IsConnected) + // { + // if (ServerCreatedSuccessfully) + // { + // ServerDlgSubscribe(0, false); + // ServerCreatedSuccessfully = false; + // } + + // info_Lab.Text = "未连接"; + // info_Lab.BackColor = Color.Red; + // btnStart.Text = "连接网口"; + // btnStart.ForeColor = Color.Black; + // btnStart.BackColor = Color.Transparent; + // com_GroupBox.Enabled = true; + // tcp_GroupBox.Enabled = true; + // comBtn_Panel.Enabled = true; + // saveSetting_Btn.Enabled = false; + // Auto_CheckBox.Enabled = false; + // pgeAuto_CheckBox.Enabled = false; + // tcpType_Box.Enabled = false; + // //server = false; + // type = tcpType_Box.SelectedIndex; + // } + //} + //else + //{ + + tcpServer.Start(tbIP, tbPort); + Thread.Sleep(50); + if (tcpServer.IsConnected) + { + if (!ServerCreatedSuccessfully) + { + ServerDlgSubscribe(0, true); + ServerCreatedSuccessfully = true; + } + ModifyShowsByServerState(true); + Thread acceptClientThread = new Thread(BeginAcceptClient); + acceptClientThread.IsBackground = true; + acceptClientThread.Start(); + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", tcpServer.listener.Server.LocalEndPoint, " <--> 服务器已打开!\r\n")); + info_Lab.Text = "服务器:" + tcpServer.listener.Server.LocalEndPoint.ToString(); + info_Lab.BackColor = Color.Green; + btnStart.Text = "断开网口"; + btnStart.ForeColor = Color.White; + btnStart.BackColor = Color.Green; + com_GroupBox.Enabled = false; + tcp_GroupBox.Enabled = false; + comBtn_Panel.Enabled = false; + saveSetting_Btn.Enabled = true; + Auto_CheckBox.Enabled = true; + pgeAuto_CheckBox.Enabled = true; + tcpType_Box.Enabled = false; + type = tcpType_Box.SelectedIndex; + } + } + else if (!tcpClient.IsConnected) + { + info_Lab.Text = "未连接"; + info_Lab.BackColor = Color.Red; + btnStart.Text = "连接网口"; + com_GroupBox.Enabled = true; + tcp_GroupBox.Enabled = true; + comBtn_Panel.Enabled = true; + saveSetting_Btn.Enabled = false; + Auto_CheckBox.Enabled = false; + pgeAuto_CheckBox.Enabled = false; + tcpType_Box.Enabled = true; + tcpClient.Connect(tbIP, tbPort); + Thread.Sleep(20); + if (tcpClient.IsConnected) + { + if (!ClientCreatedSuccessfully) + { + ServerDlgSubscribe(2, true); + ClientCreatedSuccessfully = true; + } + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", tcpClient.tcpclient.Client.LocalEndPoint, " <--> 已连接服务器!\r\n")); + btnStart.Text = "断开网口"; + btnStart.ForeColor = Color.White; + btnStart.BackColor = Color.Green; + info_Lab.Text = "客户端:" + tcpClient.tcpclient.Client.LocalEndPoint.ToString(); + info_Lab.BackColor = Color.Green; + com_GroupBox.Enabled = false; + tcp_GroupBox.Enabled = false; + comBtn_Panel.Enabled = false; + saveSetting_Btn.Enabled = true; + Auto_CheckBox.Enabled = true; + pgeAuto_CheckBox.Enabled = true; + tcpType_Box.Enabled = false; + type = tcpType_Box.SelectedIndex; + } + } + else + { + try + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", tcpClient.tcpclient.Client.LocalEndPoint, " <--> 与服务器断开!\r\n")); + tcpClient.Dispose(); + } + catch + { + } + Thread.Sleep(50); + if (ClientCreatedSuccessfully) + { + ServerDlgSubscribe(1, false); + ClientCreatedSuccessfully = false; + } + + info_Lab.Text = "未连接"; + info_Lab.BackColor = Color.Red; + btnStart.Text = "连接网口"; + btnStart.ForeColor = Color.Black; + btnStart.BackColor = Color.Transparent; + com_GroupBox.Enabled = true; + tcp_GroupBox.Enabled = true; + comBtn_Panel.Enabled = true; + saveSetting_Btn.Enabled = false; + Auto_CheckBox.Enabled = false; + pgeAuto_CheckBox.Enabled = false; + tcpType_Box.Enabled = false; + type = tcpType_Box.SelectedIndex; + } + + } + + + private void tcpType_Box_SelectedIndexChanged(object sender, EventArgs e) + { + if (tcpType_Box.SelectedIndex > 0) + { + tbIP.DropDownStyle = ComboBoxStyle.DropDown; + } + else + { + tbIP.DropDownStyle = ComboBoxStyle.DropDownList; + } + } + + private void cmbEndSymbol_SelectedIndexChanged(object sender, EventArgs e) + { + switch (cmbEndSymbol.SelectedIndex) + { + case 0://无 + Endsymbol = string.Empty; + break; + case 1://CRLF(\r\n) + Endsymbol = "\r\n"; + break; + case 2://LF(\n) + Endsymbol = "\n"; + break; + default://CR(\r) + Endsymbol = "\r"; + break; + } + + } + + + /// + /// 调用发送数据 + /// + /// + /// + public void SendResult(string str) + { + try + { + if (!sendTest_CheckBox.Checked && str != null) + { + if (com && !server && !client) + { + comSerial.SendString(str); + } + if (server && !com && !client && tcpServer != null) + { + tcpServer.SendMsg(str); + } + if (client && !com && !server) + { + tcpClient.SendMsg(str); + } + } + } + catch (Exception ex) + { + throw ex; + } + } + + public string SendReturnResult(string str) + { + string text = ""; + try + { + if (!sendTest_CheckBox.Checked && str != null) + { + if (com && !server && !client) + { + text = comSerial.SendReturnData(str); + } + if (server && !com && !client && tcpServer != null) + { + tcpServer.SendMsg(str); + } + if (client && !com && !server) + { + tcpClient.SendMsg(str); + } + } + } + catch (Exception ex) + { + throw ex; + } + return text; + } + + + private void tmHeart_Tick(object sender, EventArgs e) + { + int num = Convert.ToInt32(txtIntervalTime.Text); + if (num > 0) + { + tmHeart.Interval = Convert.ToInt32(txtIntervalTime.Text); + } + KeepAlive(); + } + + public void KeepAlive() + { + if (this.InvokeRequired) + { + BeginInvoke(new Action(KeepAlive)); + } + else if (IsConnected && pgeAuto_CheckBox.Checked && txtHeartData.Text != "") + { + if (com && !server && !client) + { + comSerial.SendString(txtHeartData.Text); + } + if (server && !com && !client) + { + tcpServer.SendMsg(txtHeartData.Text); + } + if (client && !com && !server) + { + tcpClient.SendMsg(txtHeartData.Text); + } + } + } + + /// + /// 刷新网口 + /// + /// + /// + private void reloadtcp_Btn_Click(object sender, EventArgs e) + { + LocalIP(tbIP); + } + + /// + /// 刷新串口 + /// + /// + /// + private void reloadCOM_Btn_Click(object sender, EventArgs e) + { + comSerial.LoadComSerial(comPort_Box); + } + + private void saveSetting_Btn_Click(object sender, EventArgs e) + { + try + { + ComConfig.Index = Index; + ComConfig.JobCount = JobCount; + ComConfig.TCP_IP = tbIP.Text.Trim(); + ComConfig.TCP_Port = Convert.ToInt32(tbPort.Text.Trim()); + ComConfig.HeartBeat = pgeAuto_CheckBox.Checked; + ComConfig.HeartText = txtHeartData.Text.Trim(); + ComConfig.HeartTime = Convert.ToInt32(txtIntervalTime.Text.Trim()); + ComConfig.COM_Port = comPort_Box.Text.Trim(); + ComConfig.COM_BaudRate = Convert.ToInt32(baudRate_Box.Text.Trim()); + ComConfig.COM_DataBit = Convert.ToInt32(dataBits_Box.Text.Trim()); + ComConfig.COM_Parity = parity_Box.Text.Trim(); + ComConfig.COM_StopBit = Convert.ToInt32(stopBits_Box.Text.Trim()); + ComConfig.Endsymbol = cmbEndSymbol.SelectedIndex; + OnSaveParams(Index, 0); + LogRecord("保存参数成功"); + } + catch (Exception ex) + { + //AddLog(lstRecv, 2, "保存参数失败" + ex.Message); + } + } + + /// + /// 保存信息委托事件 + /// + /// + /// + public void OnSaveParams(int plcIndex, int trgIndex) + { + if (this.SaveParamsEvent != null) + { + this.SaveParamsEvent(plcIndex, trgIndex); + } + } + + + public void btnClose_Click(object sender, EventArgs e) + { + if (isServer) + { + if (tcpServer.ServerClose()) + { + ModifyShowsByServerState(false); + } + if (ServerCreatedSuccessfully) + { + ServerDlgSubscribe(0, false); + ServerCreatedSuccessfully = false; + } + info_Lab.Text = "未连接"; + info_Lab.BackColor = Color.Red; + btnStart.Text = "连接网口"; + btnStart.ForeColor = Color.Black; + btnStart.BackColor = Color.Transparent; + com_GroupBox.Enabled = true; + tcp_GroupBox.Enabled = true; + comBtn_Panel.Enabled = true; + saveSetting_Btn.Enabled = false; + Auto_CheckBox.Enabled = false; + pgeAuto_CheckBox.Enabled = false; + tcpType_Box.Enabled = false; + tcpServer.DisconnectClient(); + } + else + { + tcpClient.LocalClientClose(); + ModifyShowsByServerState(false); + if (ClientCreatedSuccessfully) + { + ServerDlgSubscribe(1, false); + ClientCreatedSuccessfully = false; + } + info_Lab.Text = "未连接"; + info_Lab.BackColor = Color.Red; + btnStart.Text = "连接网口"; + btnStart.ForeColor = Color.Black; + btnStart.BackColor = Color.Transparent; + com_GroupBox.Enabled = true; + tcp_GroupBox.Enabled = true; + comBtn_Panel.Enabled = true; + saveSetting_Btn.Enabled = false; + Auto_CheckBox.Enabled = false; + pgeAuto_CheckBox.Enabled = false; + tcpType_Box.Enabled = false; + + } + + } + + private void btnClear_Click(object sender, EventArgs e) + { + this.txtRecv.Clear(); + } + + private void btnSend_Click(object sender, EventArgs e) + { + SendCount++; + ShowCount(SendCount, true); + string msg = this.txtSend.Text.Trim(); + if (!string.IsNullOrEmpty(msg)) + { + if (com && !server && !client) + { + comSerial.SendString($"{msg}{Endsymbol}"); + msg = DateTime.Now.ToString("HH:mm:ss") + " [本机] :\r\n" + msg + "\r\n"; + this.txtSend.Clear(); + AppendText($"串口{comSerial.getUserPortName()} --> {msg}"); + + } + if (server && !com && !client) + { + if (tcpServer.listener != null && tcpServer.currentClient.tcpclient.Connected) + { + tcpServer.SendMsg(msg + Endsymbol); + msg = DateTime.Now.ToString("HH:mm:ss") + " [本机] :\r\n" + msg + "\r\n"; + this.txtSend.Clear(); + AppendText($"服务端 --> {msg}"); + } + else + { + msg = DateTime.Now.ToString("HH:mm:ss") + " [本机] :\r\n未链接客户端,无法发送消息!\r\n"; + AppendText($"服务端 --> {msg}"); + } + + } + if (client && !com && !server) + { + + tcpClient.SendMsg($"{msg}{Endsymbol}"); + msg = DateTime.Now.ToString("HH:mm:ss ") + "本机 :\r\n" + msg + "\r\n"; + this.txtSend.Text = string.Empty; + AppendText($"客户端 --> {msg}"); + } + } + else + { + MessageBox.Show("数据为空!"); + } + } + + private void btnDisconnect_Click(object sender, EventArgs e) + { + if (isServer) + { + tcpServer.DisconnectClient(); + info_Lab.Text = "未连接"; + info_Lab.BackColor = Color.Red; + btnStart.Text = "连接网口"; + btnStart.ForeColor = Color.Black; + btnStart.BackColor = Color.Transparent; + com_GroupBox.Enabled = true; + tcp_GroupBox.Enabled = true; + comBtn_Panel.Enabled = true; + saveSetting_Btn.Enabled = false; + Auto_CheckBox.Enabled = false; + pgeAuto_CheckBox.Enabled = false; + tcpType_Box.Enabled = true; + ServerDlgSubscribe(0, false); + } + else if (client) + { + tcpClient.Dispose(); + info_Lab.Text = "未连接"; + info_Lab.BackColor = Color.Red; + btnStart.Text = "连接网口"; + btnStart.ForeColor = Color.Black; + btnStart.BackColor = Color.Transparent; + com_GroupBox.Enabled = true; + tcp_GroupBox.Enabled = true; + comBtn_Panel.Enabled = true; + saveSetting_Btn.Enabled = false; + Auto_CheckBox.Enabled = false; + pgeAuto_CheckBox.Enabled = false; + tcpType_Box.Enabled = true; + ServerDlgSubscribe(1, false); + } + //else + //{ + // comSerial.CloseSeriaPort(); + // ServerDlgSubscribe(2, false); + //} + + } + + private void ServerForm_FormClosing(object sender, FormClosingEventArgs e) + { + if (isServer) + { + ServerDlgSubscribe(0, false); + } + else if (client) + { + ServerDlgSubscribe(1, false); + } + else + { + ServerDlgSubscribe(2, false); + } + + } + + private void ServerForm_Load(object sender, EventArgs e) + { + //ModifyShowsByServerState(false); + //ModifyShowsByClientState(false); + } + #endregion + + #region 界面逻辑函数 + + + /// + /// 获取本地电脑IP地址 + /// + /// + public void LocalIP(ComboBox ipStr) + { + ipStr.Items.Clear(); + string hostName = Dns.GetHostName(); + IPHostEntry hostEntry = Dns.GetHostEntry(hostName); + IPAddress[] addressList = hostEntry.AddressList; + foreach (IPAddress iPAddress in addressList) + { + if (iPAddress.AddressFamily == AddressFamily.InterNetwork) + { + ipStr.Items.Add(iPAddress.ToString()); + } + } + if (ipStr.Items.Count != 0) + { + ipStr.Text = ipStr.Items[0].ToString(); + } + } + /// + /// 根据监听状态修改界面显示 + /// ServerForm_Load,点击启用服务器,关闭服务器按钮后调用 + /// + /// + private void ModifyShowsByServerState(bool serverStart) + { + //this.btnStart.Enabled = !serverStart; + //this.btnClose.Enabled = serverStart; + } + + /// + /// 根据连接状态修改界面显示 + /// ServerForm_Load,Server_NewClientEvent,Server_RemoteDisconnectEvent,Server_LocalDisconnectEvent调用到 + /// + /// + private void ModifyShowsByClientState(bool clientConnect) + { + this.btnSend.Enabled = clientConnect; + this.btnDisconnect.Enabled = clientConnect; + } + + private string splitSymbols = "\r\n\r\n"; + /// + /// 日志记录 + /// + /// + private void LogRecord(string content) + { + this.txtLog.AppendText(content + splitSymbols); + } + + private void ControlsChange(bool connect) + { + this.btnStart.Enabled = !connect; + this.btnDisconnect.Enabled = connect; + this.btnClear.Enabled = true; + this.btnSend.Enabled = connect; + if (connect) + { + this.Text = "客户端(已连接)"; + } + else + { + this.Text = "客户端(未连接)"; + } + } + + /// + /// 将收文或发文字符串处理后加入文本接收区 + /// + /// + private void AppendText(string param) + { + int index1 = this.txtRecv.Text.Length; + int length1 = param.IndexOf("\r\n"); + int index2 = index1 + length1 + 2; + int length2 = param.Length - length1 - 2; + this.txtRecv.AppendText(param); + this.txtRecv.Select(index1, length1); + this.txtRecv.SelectionColor = Color.Green; + this.txtRecv.Select(index2, length2); + this.txtRecv.SelectionColor = Color.Black; + this.txtRecv.Select(this.txtRecv.Text.Length, 0); + if (index1 > 1000) + { + txtRecv.Clear(); + } + this.txtRecv.Focus(); + } + + /// + /// 发送接收次数 + /// + /// + /// + public void ShowCount(int SendCount, bool sor) + { + this.Invoke((EventHandler)(delegate + { + + if (sor) + { + lbl_sendNum.Text = SendCount.ToString(); + } + else + { + lbl_receiveNum.Text = SendCount.ToString(); + } + })); + } + + /// + /// 日志消息显示 + /// + /// + private void OnInfoMsg(StringBox msgBox) + { + if (TcoComInfoMsgEvent != null) + { + TcoComInfoMsgEvent(msgBox); + } + } + + /// + /// 接收消息 + /// + /// + private void OnRcvMsg(StringBox msgBox) + { + if (msgBox.str != "" && TcoComRecvMsgEvent != null) + { + TcoComRecvMsgEvent(msgBox); + } + } + + #endregion + + #region 业务逻辑处理 + /// + /// 监听启动之后,线程中启动连接接收 + /// + private void BeginAcceptClient() + { + tcpServer.BeginAcceptClient(); + } + + /// + /// 在构造函数和ServerForm_FormClosing里调用 + /// + /// + private void ServerDlgSubscribe(int tyepe, bool add) + { + switch (tyepe) + { + case 0://串口 + if (add) + { + comSerial.ComOpenEvent += new DlgNoParam(Com_OpenSerialEvent); + comSerial.SendMsgEvent += new DlgOneParam(Com_SendMsgEvent); + comSerial.RecvMsgEvent += new DlgOneParam(Com_RecvMsgEvent); + comSerial.ComDisconnectEvent += new DlgNoParam(Com_ComDisconnectEvent); + + } + else + { + comSerial.ComOpenEvent -= new DlgNoParam(Com_OpenSerialEvent); + comSerial.SendMsgEvent -= new DlgOneParam(Com_SendMsgEvent); + comSerial.RecvMsgEvent -= new DlgOneParam(Com_RecvMsgEvent); + comSerial.ComDisconnectEvent -= new DlgNoParam(Com_ComDisconnectEvent); + } + break; + case 1://服务端 + if (add) + { + tcpServer.ServerStartEvent += new DlgNoParam(Server_ServerStartEvent); + tcpServer.ServerCloseEvent += new DlgNoParam(Server_ServerCloseEvent); + tcpServer.NewClientEvent += new DlgOneParam(Server_NewClientEvent); + tcpServer.RecvMsgEvent += new DlgOneParam(Server_RecvMsgEvent); + tcpServer.RemoteDisconnectEvent += new DlgOneParam(Server_RemoteDisconnectEvent); + tcpServer.LocalDisconnectEvent += new DlgNoParam(Server_LocalDisconnectEvent); + } + else + { + tcpServer.ServerStartEvent -= new DlgNoParam(Server_ServerStartEvent); + tcpServer.ServerCloseEvent -= new DlgNoParam(Server_ServerCloseEvent); + tcpServer.NewClientEvent -= new DlgOneParam(Server_NewClientEvent); + tcpServer.RecvMsgEvent -= new DlgOneParam(Server_RecvMsgEvent); + tcpServer.RemoteDisconnectEvent -= new DlgOneParam(Server_RemoteDisconnectEvent); + tcpServer.LocalDisconnectEvent -= new DlgNoParam(Server_LocalDisconnectEvent); + } + + break; + case 2://客户端 + if (add) + { + tcpClient.ConnectFailEvent += new DlgNoParam(Client_ConnectFailEvent); + tcpClient.NewClientEvent += new DlgOneParam(Client_NewClientEvent); + tcpClient.RecvMsgEvent += new DlgOneParam(Client_RecvMsgEvent); + tcpClient.RemoteDisconnectEvent += new DlgOneParam(Client_RemoteDisconnectEvent); + tcpClient.LocalDisconnectEvent += new DlgNoParam(Client_LocalDisconnectEvent); + } + else + { + tcpClient.ConnectFailEvent -= new DlgNoParam(Client_ConnectFailEvent); + tcpClient.NewClientEvent -= new DlgOneParam(Client_NewClientEvent); + tcpClient.RecvMsgEvent -= new DlgOneParam(Client_RecvMsgEvent); + tcpClient.RemoteDisconnectEvent -= new DlgOneParam(Client_RemoteDisconnectEvent); + tcpClient.LocalDisconnectEvent -= new DlgNoParam(Client_LocalDisconnectEvent); + } + break; + + default: + + break; + } + } + #endregion + + #region 服务端下层事件处理 + public void Server_ServerStartEvent() + { + StringBox stringBox = new StringBox(); + + if (this.InvokeRequired) + { + this.BeginInvoke(new ThreadStart(delegate () + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "服务器已启动...")); + + })); + } + else + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "服务器已启动...")); + } + stringBox.ID = "1"; + stringBox.str = string.Concat(tcpServer.listener.Server.LocalEndPoint.ToString(),"<-->TCP服务器已启动..."); + OnInfoMsg(stringBox); + } + + public void Server_ServerCloseEvent() + { + StringBox stringBox = new StringBox(); + + if (this.InvokeRequired) + { + this.BeginInvoke(new ThreadStart(delegate () + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "服务器已关闭...")); + + })); + } + else + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "服务器已关闭...")); + + } + stringBox.ID = "2"; + stringBox.str = string.Concat(tcpServer.listener.Server.LocalEndPoint.ToString(), "<-->TCP服务器已关闭..."); + OnInfoMsg(stringBox); + } + + public void Server_NewClientEvent(string param) + { + StringBox stringBox = new StringBox(); + + if (this.InvokeRequired) + { + this.BeginInvoke(new ThreadStart(delegate () + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "接收到客户端连接: ",param)); + + ModifyShowsByClientState(true); + })); + } + else + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "接收到客户端连接: ", param)); + ModifyShowsByClientState(true); + } + stringBox.ID = "1"; + stringBox.str = string.Concat("接收到客户端连接: ", param); + OnInfoMsg(stringBox); + } + + public void Server_RecvMsgEvent(string param) + { + StringBox stringBox = new StringBox(); + if (this.InvokeRequired) + { + this.BeginInvoke(new ThreadStart(delegate () + { + AppendText(param); + })); + } + else + { + AppendText(param); + } + stringBox.str = param; + OnRcvMsg(stringBox); + } + + public void Server_RemoteDisconnectEvent(string param) + { + StringBox stringBox = new StringBox(); + if (this.InvokeRequired) + { + this.BeginInvoke(new ThreadStart(delegate () + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "远程客户端断开连接: ", param)); + ModifyShowsByClientState(false); + })); + } + else + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "远程客户端断开连接: ", param)); + ModifyShowsByClientState(false); + } + stringBox.ID = "2"; + stringBox.str = string.Concat("远程客户端断开连接: ", param); + OnInfoMsg(stringBox); + } + + public void Server_LocalDisconnectEvent() + { + StringBox stringBox = new StringBox(); + if (this.InvokeRequired) + { + this.BeginInvoke(new ThreadStart(delegate () + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "本地主动关闭远程客户端连接")); + + ModifyShowsByClientState(false); + })); + } + else + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "本地主动关闭远程客户端连接")); + ModifyShowsByClientState(false); + } + stringBox.ID = "2"; + stringBox.str = string.Concat("本地主动关闭远程客户端连接"); + OnInfoMsg(stringBox); + } + + #endregion + + #region 客户端下层事件处理 + public void Client_ConnectFailEvent() + { + StringBox stringBox = new StringBox(); + if (this.InvokeRequired) + { + this.BeginInvoke(new ThreadStart(delegate () + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "无法连接上指定服务器")); + })); + } + else + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "无法连接上指定服务器")); + + } + stringBox.ID = "2"; + stringBox.str = string.Concat("本地客户端无法连接上指定服务器"); + OnInfoMsg(stringBox); + } + + public void Client_NewClientEvent(string param) + { + StringBox stringBox = new StringBox(); + if (this.InvokeRequired) + { + this.BeginInvoke(new ThreadStart(delegate () + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "链接:", param, " 服务端成功")); + ControlsChange(true); + })); + } + else + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "链接:", param, " 服务端成功")); + ControlsChange(true); + } + stringBox.ID = "1"; + stringBox.str = string.Concat("链接:", param, " 服务端成功"); + OnInfoMsg(stringBox); + } + + public void Client_RecvMsgEvent(string param) + { + if (!string.IsNullOrEmpty(param)) + { + StringBox stringBox = new StringBox(); + if (this.InvokeRequired) + { + this.BeginInvoke(new System.Threading.ThreadStart(delegate () + { + AppendText(param); + })); + } + else + { + AppendText(param); + } + stringBox.str = param; + OnRcvMsg(stringBox); + } + } + + public void Client_RemoteDisconnectEvent(string param) + { + StringBox stringBox = new StringBox(); + if (this.InvokeRequired) + { + this.BeginInvoke(new System.Threading.ThreadStart(delegate () + { + info_Lab.Text = "未连接"; + info_Lab.BackColor = Color.Red; + btnStart.Text = "连接网口"; + btnStart.ForeColor = Color.Black; + btnStart.BackColor = Color.Transparent; + com_GroupBox.Enabled = true; + tcp_GroupBox.Enabled = true; + comBtn_Panel.Enabled = true; + saveSetting_Btn.Enabled = false; + Auto_CheckBox.Enabled = false; + pgeAuto_CheckBox.Enabled = false; + tcpType_Box.Enabled = true; + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n","服务端:" ,param," 关闭服务")); + ControlsChange(false); + })); + } + else + { + info_Lab.Text = "未连接"; + info_Lab.BackColor = Color.Red; + btnStart.Text = "连接网口"; + btnStart.ForeColor = Color.Black; + btnStart.BackColor = Color.Transparent; + com_GroupBox.Enabled = true; + tcp_GroupBox.Enabled = true; + comBtn_Panel.Enabled = true; + saveSetting_Btn.Enabled = false; + Auto_CheckBox.Enabled = false; + pgeAuto_CheckBox.Enabled = false; + tcpType_Box.Enabled = true; + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "服务端:", param, " 关闭服务")); + ControlsChange(false); + } + + stringBox.ID = "2"; + stringBox.str = string.Concat("服务端:", param, " 关闭服务"); + OnInfoMsg(stringBox); + } + + public void Client_LocalDisconnectEvent() + { + StringBox stringBox = new StringBox(); + if (this.InvokeRequired) + { + this.BeginInvoke(new System.Threading.ThreadStart(delegate () + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "本地客户端关闭服务")); + ControlsChange(false); + })); + } + else + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", "本地客户端关闭服务")); + ControlsChange(false); + } + stringBox.ID = "2"; + stringBox.str = string.Concat("本地客户端关闭服务"); + OnInfoMsg(stringBox); + } + + #endregion + + #region 串口下层事件处理 + /// + /// 串口打开事件 + /// + public void Com_OpenSerialEvent() + { + StringBox stringBox = new StringBox(); + if (this.InvokeRequired) + { + this.BeginInvoke(new ThreadStart(delegate () + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", comSerial.getUserPortName(), " <--> 串口已打开!\r\n")); + + })); + } + else + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", comSerial.getUserPortName(), " <--> 串口已打开!\r\n")); + + } + stringBox.ID = "1"; + stringBox.str = string.Concat(comSerial.getUserPortName(), " <--> 串口已打开!"); + OnInfoMsg(stringBox); + } + + /// + /// 串口关闭事件 + /// + public void Com_ComDisconnectEvent() + { + StringBox stringBox = new StringBox(); + if (this.InvokeRequired) + { + this.BeginInvoke(new ThreadStart(delegate () + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", comSerial.getUserPortName(), " <--> 串口已关闭!\r\n")); + + })); + } + else + { + LogRecord(string.Concat("【", DateTime.Now.ToString("HH:mm:ss.fff"), "】\r\n", comSerial.getUserPortName(), " <--> 串口已关闭!\r\n")); + + } + + stringBox.ID = "2"; + stringBox.str = string.Concat(comSerial.getUserPortName(), " <--> 串口已打开!"); + OnInfoMsg(stringBox); + } + + /// + /// 串口发送事件 + /// + /// + public void Com_SendMsgEvent(string param) + { + if (this.InvokeRequired) + { + this.BeginInvoke(new ThreadStart(delegate () + { + AppendText(param); + })); + } + else + { + AppendText(param); + } + } + + /// + /// 串口接收事件 + /// + /// + public void Com_RecvMsgEvent(string param) + { + StringBox stringBox = new StringBox(); + if (this.InvokeRequired) + { + this.BeginInvoke(new ThreadStart(delegate () + { + AppendText(param); + })); + } + else + { + AppendText(param); + } + stringBox.str = param; + OnRcvMsg(stringBox); + } + #endregion + + + } +} diff --git a/SimpleServer/CommunUI.resx b/SimpleServer/CommunUI.resx new file mode 100644 index 0000000..1cdb731 --- /dev/null +++ b/SimpleServer/CommunUI.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/SimpleServer/FrmCommunication.Designer.cs b/SimpleServer/FrmCommunication.Designer.cs new file mode 100644 index 0000000..920d3f9 --- /dev/null +++ b/SimpleServer/FrmCommunication.Designer.cs @@ -0,0 +1,93 @@ +namespace SimpleCommunication +{ + partial class FrmCommunication + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.tabCt_ComUI = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.tabCt_ComUI.SuspendLayout(); + this.SuspendLayout(); + // + // tabCt_ComUI + // + this.tabCt_ComUI.Controls.Add(this.tabPage1); + this.tabCt_ComUI.Controls.Add(this.tabPage2); + this.tabCt_ComUI.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabCt_ComUI.Location = new System.Drawing.Point(0, 0); + this.tabCt_ComUI.Name = "tabCt_ComUI"; + this.tabCt_ComUI.SelectedIndex = 0; + this.tabCt_ComUI.Size = new System.Drawing.Size(921, 548); + this.tabCt_ComUI.TabIndex = 0; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.tabPage1.Size = new System.Drawing.Size(913, 522); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.tabPage2.Size = new System.Drawing.Size(913, 522); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // FrmCommunication + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(921, 548); + this.Controls.Add(this.tabCt_ComUI); + this.DoubleBuffered = true; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FrmCommunication"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "TCP/IP_Com通讯"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmCommunication_FormClosing); + this.Load += new System.EventHandler(this.Form1_Load); + this.tabCt_ComUI.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TabControl tabCt_ComUI; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + } +} \ No newline at end of file diff --git a/SimpleServer/FrmCommunication.cs b/SimpleServer/FrmCommunication.cs new file mode 100644 index 0000000..706060b --- /dev/null +++ b/SimpleServer/FrmCommunication.cs @@ -0,0 +1,238 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace SimpleCommunication +{ + public partial class FrmCommunication : Form + { + public List lstComPage = new List(); + private int ComCount; + /// + /// 定义MelsecPLCUI自定义控件List集合 + /// + public List lstUI = new List(); + + /// + /// 配置文件实体类 + /// + private List lstComConfig = new List(); + /// + /// PLC读取寄存器配置文件 + /// + private string ConfigPath = Path.Combine(System.Windows.Forms.Application.StartupPath, "Config\\ComConfig.ini"); + + + public FrmCommunication() + { + InitializeComponent(); + //ConfigPath = path; + //ComCount = int.Parse(new IniHelper(ConfigPath).IniReadValue("SystemConfig", "ComCount")); + ComCount = 1; + ReadPlcConfig(ComCount); + LoadUI(ComCount); + } + + + + + public void ReadPlcConfig(int Count) + { + try + { + for (int j = 0; j < Count; j++) + { + ComConfig comConfig = new ComConfig(); + comConfig.Index = j + 1; + comConfig.Auto_Connect = bool.Parse(new IniHelper(ConfigPath).IniReadValue(comConfig.Index + "#COMMUNICATION_SETTING", "Auto_Connect")); + comConfig.Connect_Typt = int.Parse(new IniHelper(ConfigPath).IniReadValue(comConfig.Index + "#COMMUNICATION_SETTING", "Connect_Typt")); + + comConfig.TCP_IP = new IniHelper(ConfigPath).IniReadValue(comConfig.Index + "#COMMUNICATION_SETTING", "TCP_IP"); + comConfig.TCP_Port = int.Parse(new IniHelper(ConfigPath).IniReadValue(comConfig.Index + "#COMMUNICATION_SETTING", "TCP_Port")); + comConfig.HeartBeat = bool.Parse(new IniHelper(ConfigPath).IniReadValue(comConfig.Index + "#COMMUNICATION_SETTING", "HeartBeat")); + comConfig.HeartText = new IniHelper(ConfigPath).IniReadValue(comConfig.Index + "#COMMUNICATION_SETTING", "HeartText"); + comConfig.HeartTime = int.Parse(new IniHelper(ConfigPath).IniReadValue(comConfig.Index + "#COMMUNICATION_SETTING", "HeartTime")); + + comConfig.COM_Port = new IniHelper(ConfigPath).IniReadValue(comConfig.Index + "#COMMUNICATION_SETTING", "COM_Port"); + comConfig.COM_BaudRate = int.Parse(new IniHelper(ConfigPath).IniReadValue(comConfig.Index + "#COMMUNICATION_SETTING", "COM_BaudRate")); + comConfig.COM_Parity = new IniHelper(ConfigPath).IniReadValue(comConfig.Index + "#COMMUNICATION_SETTING", "COM_Parity"); + comConfig.COM_DataBit = int.Parse(new IniHelper(ConfigPath).IniReadValue(comConfig.Index + "#COMMUNICATION_SETTING", "COM_DataBit")); + comConfig.COM_StopBit = int.Parse(new IniHelper(ConfigPath).IniReadValue(comConfig.Index + "#COMMUNICATION_SETTING", "COM_StopBit")); + + comConfig.Endsymbol = int.Parse(new IniHelper(ConfigPath).IniReadValue(comConfig.Index + "#COMMUNICATION_SETTING", "Endsymbol")); + lstComConfig.Add(comConfig); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + + + /// + /// 加载MelsecPLCUI窗口 + /// + /// + public void LoadUI(int Count) + { + tabCt_ComUI.TabPages.Clear(); + for (int i = 0; i < Count; i++) + { + tabCt_ComUI.TabPages.Add(i + 1 + "#通讯模块"); + Panel panelUI = new Panel(); + panelUI.Dock = DockStyle.Fill; + tabCt_ComUI.TabPages[i].Controls.Add(panelUI); + CommunUI plcUI = new CommunUI(lstComConfig[i]); + plcUI.Dock = DockStyle.Fill; + plcUI.SaveParamsEvent += plcUI_SaveParamsEvent; + lstUI.Add(plcUI); + panelUI.Controls.Add(plcUI); + LoadIni(i); + } + } + + + /// + /// 循环保存参数 + /// + /// + /// + private void plcUI_SaveParamsEvent(int comIndex, int trgIndex) + { + if (trgIndex == 0) + { + for (int i = 0; i < comIndex; i++) + { + SaveComParam(comIndex); + + } + + } + } + + + + /// + /// + /// + /// TCP_Typt + public void SaveComParam(int comIndex) + { + new IniHelper(ConfigPath).IniWriteValue(comIndex + "#COMMUNICATION_SETTING", "Tgr_Count", lstUI[comIndex - 1].ComConfig.Index.ToString()); + new IniHelper(ConfigPath).IniWriteValue(comIndex + "#COMMUNICATION_SETTING", "Auto_Connect", lstUI[comIndex - 1].ComConfig.Auto_Connect.ToString()); + new IniHelper(ConfigPath).IniWriteValue(comIndex + "#COMMUNICATION_SETTING", "Connect_Typt", lstUI[comIndex - 1].ComConfig.Connect_Typt.ToString()); + new IniHelper(ConfigPath).IniWriteValue(comIndex + "#COMMUNICATION_SETTING", "TCP_IP", lstUI[comIndex - 1].ComConfig.TCP_IP.ToString()); + new IniHelper(ConfigPath).IniWriteValue(comIndex + "#COMMUNICATION_SETTING", "TCP_Port", lstUI[comIndex - 1].ComConfig.TCP_Port.ToString()); + new IniHelper(ConfigPath).IniWriteValue(comIndex + "#COMMUNICATION_SETTING", "HeartBeat", lstUI[comIndex - 1].ComConfig.HeartBeat.ToString()); + new IniHelper(ConfigPath).IniWriteValue(comIndex + "#COMMUNICATION_SETTING", "HeartText", lstUI[comIndex - 1].ComConfig.HeartText.ToString()); + new IniHelper(ConfigPath).IniWriteValue(comIndex + "#COMMUNICATION_SETTING", "HeartTime", lstUI[comIndex - 1].ComConfig.HeartTime.ToString()); + new IniHelper(ConfigPath).IniWriteValue(comIndex + "#COMMUNICATION_SETTING", "COM_Port", lstUI[comIndex - 1].ComConfig.COM_Port.ToString()); + new IniHelper(ConfigPath).IniWriteValue(comIndex + "#COMMUNICATION_SETTING", "COM_StopBit", lstUI[comIndex - 1].ComConfig.COM_StopBit.ToString()); + new IniHelper(ConfigPath).IniWriteValue(comIndex + "#COMMUNICATION_SETTING", "COM_BaudRate", lstUI[comIndex - 1].ComConfig.COM_BaudRate.ToString()); + new IniHelper(ConfigPath).IniWriteValue(comIndex + "#COMMUNICATION_SETTING", "COM_Parity", lstUI[comIndex - 1].ComConfig.COM_Parity.ToString()); + new IniHelper(ConfigPath).IniWriteValue(comIndex + "#COMMUNICATION_SETTING", "COM_DataBit", lstUI[comIndex - 1].ComConfig.COM_DataBit.ToString()); + new IniHelper(ConfigPath).IniWriteValue(comIndex + "#COMMUNICATION_SETTING", "Endsymbol", lstUI[comIndex - 1].ComConfig.Endsymbol.ToString()); + } + + private void Form1_Load(object sender, EventArgs e) + { + + } + + private void LoadIni(int comIndex) + { + + lstUI[comIndex].txtHeartData.Text = new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "HeartText"); + lstUI[comIndex].txtIntervalTime.Text = new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "HeartTime"); + lstUI[comIndex].pgeAuto_CheckBox.Checked = ((new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "HeartBeat") == "True") ? true : false); + lstUI[comIndex].cmbEndSymbol.SelectedIndex = Convert.ToInt32(new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "Endsymbol")); + if (new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "Auto_Connect") == "True") + { + lstUI[comIndex].Auto_CheckBox.Checked = true; + //串口 + if (Convert.ToInt32(new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "Connect_Typt")) == 0) + { + lstUI[comIndex].Server_GroupBox.Visible = false; + lstUI[comIndex].info_GroupBox.Dock = DockStyle.Fill; + lstUI[comIndex].tcpType_Box.SelectedIndex = Convert.ToInt32(new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "Connect_Typt")); + lstUI[comIndex].comPort_Box.Items.Clear(); + lstUI[comIndex].comPort_Box.Items.Add(new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "COM_Port")); + lstUI[comIndex].comPort_Box.Text = lstUI[comIndex].comPort_Box.Items[0].ToString(); + lstUI[comIndex].baudRate_Box.Text = new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "COM_BaudRate"); + lstUI[comIndex].parity_Box.Text = new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "COM_Parity"); + lstUI[comIndex].dataBits_Box.Text = new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "COM_DataBit"); + lstUI[comIndex].stopBits_Box.Text = new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "COM_StopBit"); + lstUI[comIndex].COMOpen(); + } + //服务端 + else if (Convert.ToInt32(new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "Connect_Typt")) == 1) + { + lstUI[comIndex].tcpType_Box.SelectedIndex = Convert.ToInt32(new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "Connect_Typt")); + lstUI[comIndex].tbIP.Items.Clear(); + lstUI[comIndex].tbIP.Items.Add(new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "TCP_IP")); + lstUI[comIndex].tbIP.Text = lstUI[comIndex].tbIP.Items[0].ToString(); + lstUI[comIndex].tbPort.Text = new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "TCP_Port"); + //lstUI[comIndex].TCPOpen(); + } + //客户端 + else if (Convert.ToInt32(new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "Connect_Typt")) == 2) + { + lstUI[comIndex].Server_GroupBox.Visible = false; + lstUI[comIndex].info_GroupBox.Dock = DockStyle.Fill; + lstUI[comIndex].tcpType_Box.SelectedIndex = Convert.ToInt32(new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "Connect_Typt")); + lstUI[comIndex].tbIP.Items.Clear(); + lstUI[comIndex].tbIP.Items.Add(new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "TCP_IP")); + lstUI[comIndex].tbIP.Text = lstUI[comIndex].tbIP.Items[0].ToString(); + lstUI[comIndex].tbPort.Text = new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "TCP_Port"); + //lstUI[comIndex].TCPOpen(); + } + else + { + //串口 + lstUI[comIndex].Server_GroupBox.Visible = false; + lstUI[comIndex].info_GroupBox.Dock = DockStyle.Fill; + lstUI[comIndex].tcpType_Box.SelectedIndex = Convert.ToInt32(new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "Connect_Typt")); + lstUI[comIndex].comPort_Box.Items.Clear(); + lstUI[comIndex].comPort_Box.Items.Add(new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "COM_Port")); + lstUI[comIndex].comPort_Box.Text = lstUI[comIndex].comPort_Box.Items[0].ToString(); + lstUI[comIndex].baudRate_Box.Text = new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "COM_BaudRate"); + lstUI[comIndex].parity_Box.Text = new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "COM_Parity"); + lstUI[comIndex].dataBits_Box.Text = new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "COM_DataBit"); + lstUI[comIndex].stopBits_Box.Text = new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "COM_StopBit"); + lstUI[comIndex].COMOpen(); + + //客户端 + lstUI[comIndex].Server_GroupBox.Visible = false; + lstUI[comIndex].info_GroupBox.Dock = DockStyle.Fill; + lstUI[comIndex].tcpType_Box.SelectedIndex = Convert.ToInt32(new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "Connect_Typt")); + lstUI[comIndex].tbIP.Items.Clear(); + lstUI[comIndex].tbIP.Items.Add(new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "TCP_IP")); + lstUI[comIndex].tbIP.Text = lstUI[comIndex].tbIP.Items[0].ToString(); + lstUI[comIndex].tbPort.Text = new IniHelper(ConfigPath).IniReadValue((comIndex + 1) + "#COMMUNICATION_SETTING", "TCP_Port"); + //lstUI[comIndex].TCPOpen(); + } + } + else + { + lstUI[comIndex].Auto_CheckBox.Checked = false; + lstUI[comIndex].comSerial.LoadComSerial(lstUI[comIndex].comPort_Box); + lstUI[comIndex].LocalIP(lstUI[comIndex].tbIP); + } + } + + + private void FrmCommunication_FormClosing(object sender, FormClosingEventArgs e) + { + this.Visible = false; + e.Cancel = true; + } + } +} diff --git a/SimpleServer/FrmCommunication.resx b/SimpleServer/FrmCommunication.resx new file mode 100644 index 0000000..61bc649 --- /dev/null +++ b/SimpleServer/FrmCommunication.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + \ No newline at end of file diff --git a/SimpleServer/IniHelper.cs b/SimpleServer/IniHelper.cs new file mode 100644 index 0000000..b31fd05 --- /dev/null +++ b/SimpleServer/IniHelper.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace SimpleCommunication +{ + public class IniHelper + { + public string path; + public IniHelper(string INIPath) + { + path = INIPath; + } + [DllImport("kernel32", CharSet = CharSet.Unicode)] + private static extern long WritePrivateProfileString(string section, string key, string val, string filePath); + + [DllImport("kernel32", CharSet = CharSet.Unicode)] + private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath); + + [DllImport("kernel32", CharSet = CharSet.Unicode)] + private static extern int GetPrivateProfileString(string section, string key, string defVal, byte[] retVal, int size, string filePath); + public void IniWriteValue(string Section, string Key, string Value) + { + WritePrivateProfileString(Section, Key, Value, path); + } + public string IniReadValue(string Section, string Key) + { + try + { + StringBuilder temp = new StringBuilder(255); + int i = GetPrivateProfileString(Section, Key, "", temp, 255, path); + return temp.ToString(); + } + catch (Exception) + { + return null; + } + } + public byte[] IniReadValues(string section, string key) + { + byte[] temp = new byte[255]; + int i = GetPrivateProfileString(section, key, "", temp, 255, path); + return temp; + } + + public void ClearAllSection() + { + IniWriteValue(null, null, null); + } + + public void ClearSection(string Section) + { + IniWriteValue(Section, null, null); + } + } +} diff --git a/SimpleServer/LogHelper.cs b/SimpleServer/LogHelper.cs new file mode 100644 index 0000000..a0e85b7 --- /dev/null +++ b/SimpleServer/LogHelper.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.IO; + +namespace SimpleCommunication +{ + public class LogHelper : IDisposable + { + private static LogHelper logHelper; + private static object singleLock = new object(); + private string logPath = Path.Combine(System.Environment.CurrentDirectory, "Log.txt"); + private string spaceSymbols = "\r\n\r\n--------------------------------------------\r\n\r\n"; + private byte[] spaceSymbolsBytes; + private FileStream fileStream; + + private LogHelper() + { + } + + public static LogHelper GetInstance() + { + if (logHelper == null) + { + lock (singleLock) + { + if (logHelper == null) + { + logHelper = new LogHelper(); + } + } + } + return logHelper; + } + + public void SetLogPath(string logPath) + { + this.logPath = Path.Combine(logPath, "Log.txt"); + } + + public void Init() + { + fileStream = new FileStream(logPath, FileMode.OpenOrCreate, FileAccess.ReadWrite); + spaceSymbolsBytes = Encoding.Default.GetBytes(spaceSymbols); + } + + public void SetSpaceSymbols(string spaceSymbols) + { + this.spaceSymbols = spaceSymbols; + this.spaceSymbolsBytes = Encoding.Default.GetBytes(spaceSymbols); + } + + public void Log(string content) + { + if (!string.IsNullOrEmpty(content)) + { + fileStream.Seek(0, SeekOrigin.End); + byte[] bytes = Encoding.Default.GetBytes(content); + fileStream.Write(bytes, 0, bytes.Length); + fileStream.Write(spaceSymbolsBytes, 0, spaceSymbolsBytes.Length); + fileStream.Flush(); + } + } + + public void Dispose() + { + if (fileStream != null) + { + fileStream.Dispose(); + } + } + } +} diff --git a/SimpleServer/Program.cs b/SimpleServer/Program.cs new file mode 100644 index 0000000..db4455e --- /dev/null +++ b/SimpleServer/Program.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; +using System.Threading; + +namespace SimpleCommunication +{ + static class Program + { + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main() + { + LogHelper.GetInstance().Init(); + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); + Application.Run(new FrmCommunication()); + + LogHelper.GetInstance().Dispose(); + } + + static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) + { + LogHelper.GetInstance().Log(e.Exception.Message); + } + } +} diff --git a/SimpleServer/Properties/AssemblyInfo.cs b/SimpleServer/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b749d0a --- /dev/null +++ b/SimpleServer/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("SimpleCommunication")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SimpleCommunication")] +[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("4a5ff5e4-13bc-4f97-b59f-a6fb5123c026")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 内部版本号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SimpleServer/Properties/Resources.Designer.cs b/SimpleServer/Properties/Resources.Designer.cs new file mode 100644 index 0000000..33c0265 --- /dev/null +++ b/SimpleServer/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace SimpleCommunication.Properties { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.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() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [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("SimpleCommunication.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/SimpleServer/Properties/Resources.resx b/SimpleServer/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/SimpleServer/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SimpleServer/Properties/Settings.Designer.cs b/SimpleServer/Properties/Settings.Designer.cs new file mode 100644 index 0000000..6cdd99b --- /dev/null +++ b/SimpleServer/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace SimpleCommunication.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.11.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; + } + } + } +} diff --git a/SimpleServer/Properties/Settings.settings b/SimpleServer/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/SimpleServer/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/SimpleServer/Serial.cs b/SimpleServer/Serial.cs new file mode 100644 index 0000000..048bc1c --- /dev/null +++ b/SimpleServer/Serial.cs @@ -0,0 +1,239 @@ +using System; +using System.Collections.Generic; +using System.IO.Ports; +using System.Linq; +using System.Runtime.Remoting.Messaging; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace SimpleCommunication +{ + + public class Serial : IDisposable + { + #region DataMember & Ctor + public SerialPort serialPort; + private string[] port; + public SerialPort Comm { get; private set; } + private List list = new List(4096); + + //在事务处理结束后才触发下列事件 + public event DlgNoParam ComOpenEvent; + public event DlgOneParam RecvMsgEvent; + public event DlgOneParam SendMsgEvent; + public event DlgNoParam ComDisconnectEvent; + + public bool IsOpen => (serialPort != null && serialPort.IsOpen) ? true : false; + + + + public Serial() + { + serialPort = new SerialPort(); + } + #endregion + + /// + /// 获取窗口名 + /// + /// + public string getUserPortName() + { + return serialPort.PortName; + } + + /// + /// 加载串口 + /// + /// + public void LoadComSerial(ComboBox ComPort) + { + ComPort.Items.Clear(); + list.Clear(); + if (!IsOpen) + { + port = SerialPort.GetPortNames(); + for (int i = 0; i < port.Count(); i++) + { + try + { + SerialPort serialPort = new SerialPort(port[i]); + serialPort.Open(); + serialPort.Close(); + list.Add(port[i]); + } + catch + { + } + } + port = list.ToArray(); + Array.Sort(port); + ComboBox.ObjectCollection items = ComPort.Items; + object[] items2 = port; + items.AddRange(items2); + if (port.Length != 0) + { + ComPort.Text = port[0]; + } + } + else + { + ComPort.Text = getUserPortName(); + } + } + /// + /// 打开串口 + /// + /// + /// + /// + /// + /// + public void OpenSerialPort(string portName, int baudRate, Parity parity, int dataBits, StopBits stopBits) + { + serialPort.PortName = portName; + serialPort.BaudRate = baudRate; + serialPort.Parity = parity; + serialPort.DataBits = dataBits; + serialPort.StopBits = stopBits; + try + { + serialPort.ReadBufferSize = 4096; + serialPort.DataReceived += ComReceived; + serialPort.Open(); + if (ComOpenEvent != null) + { + ComOpenEvent(); + } + } + catch (Exception) + { + MessageBox.Show("串口被占用,请重新选择!"); + } + } + + /// + /// 关闭串口 + /// + public void CloseSeriaPort() + { + serialPort.DataReceived -= ComReceived; + serialPort.Close(); + } + + /// + /// + /// + /// + /// + private void ComReceived(object sender, SerialDataReceivedEventArgs e) + { + try + { + if (serialPort.IsOpen) + { + string text = ""; + Thread.Sleep(50); + int length = serialPort.BytesToRead; + byte[] data = new byte[length]; + serialPort.Read(data, 0, length); + //对串口接收数据的处理,可对data进行解析 + string data1 = string.Empty; + for (int i = 0; i < length; i++) + { + data1 += Convert.ToString(data[i], 16).ToUpper(); + //data.AppendText(str.Length == 1 ? "0" + str + " " : str + " ");//将接收到的数据以十六进制显示到文本框内 + } + + //int bytesToRead = serialPort.BytesToRead; + //string data = string.Empty; + //while (serialPort.BytesToRead > 0) + //{ + // data += serialPort.ReadExisting(); //数据读取,直到读完缓冲区数据 + //} + + //for (int i = 0; i < bytesToRead; i++) + //{ + // int utf = serialPort.ReadByte(); + // //text = serialPort.ReadTo("\r"); + // string text2 = char.ConvertFromUtf32(utf); + // text += text2; + //} + + if (this.RecvMsgEvent != null) + { + this.RecvMsgEvent(data1); + } + } + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + } + } + + + /// + /// 同步发送返回数据 + /// + /// + /// + public string SendReturnData(string str) + { + string text = ""; + try + { + if (serialPort.IsOpen) + { + serialPort.Write(str); + Thread.Sleep(100); + text = serialPort.ReadTo("\r"); + } + } + catch (Exception ex) + { + + } + return text; + } + + /// + /// 发送字符串 + /// + /// + public void SendString(string str) + { + try + { + serialPort.Write(str); + if (this.SendMsgEvent != null) + { + this.SendMsgEvent(str); + } + } + catch (Exception ex) + { + //MessageBox.Show(ex.ToString()); + } + } + + + /// + /// + /// 在已连接条件下关闭本地连接和资源释放时调用 + /// + public void Dispose() + { + if (serialPort != null&& serialPort.IsOpen) + { + CloseSeriaPort(); + if (this.ComDisconnectEvent != null) + { + this.ComDisconnectEvent(); + } + } + } + } +} diff --git a/SimpleServer/Server.cs b/SimpleServer/Server.cs new file mode 100644 index 0000000..e734c1d --- /dev/null +++ b/SimpleServer/Server.cs @@ -0,0 +1,272 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Net.Sockets; +using System.Threading; +using System.Net; +using SimpleCommunication; +using System.Windows.Forms; + +namespace SimpleCommunication +{ + public class Server : IDisposable + { + #region DataMember + public TcpListener listener; + public Client currentClient; + + private object listenerLock = new object();//锁TcpListener;在BeginAcceptClient,EndAcceptClient,ServerClose这3函数使用;ServerClose之后不能再调用BeginAcceptClient,EndAcceptClient + /// + /// 服务器是否启用监听 + /// + public bool serverStart = false; + + private EventWaitHandle eventWaitHdl = new EventWaitHandle(false, EventResetMode.ManualReset); + + //在事务处理结束后才触发下列事件 + public event DlgNoParam ServerStartEvent; + public event DlgNoParam ServerCloseEvent; + public event DlgOneParam NewClientEvent; + public event DlgOneParam RecvMsgEvent; + public event DlgNoParam LocalDisconnectEvent; + public event DlgOneParam RemoteDisconnectEvent; + + public bool IsConnected => (listener != null && serverStart) ? true : false; + #endregion + + #region 服务器监听启动关闭和连接接收 + public bool Start(ComboBox Server_IP, TextBox txtPort, int maxClient = 10) + { + bool result = false; + try + { + if (!string.IsNullOrEmpty(Server_IP.Text) && !string.IsNullOrEmpty(txtPort.Text)) + { + if (Convert.ToInt32(txtPort.Text) > 1024) + { + IPAddress ipAddr = IPAddress.Parse(Server_IP.Text); + IPEndPoint point = new IPEndPoint(ipAddr, Convert.ToInt32(txtPort.Text)); + listener = new TcpListener(point); + listener.Start(); + result = true; + serverStart = true; + if (ServerStartEvent != null) + { + ServerStartEvent(); + } + } + } + } + catch(Exception ex) + { + throw ex; + } + return result; + } + + /// + /// 有互斥资源 + /// 接收连接主入口,监听启动后调用和每次接收到连接后调用 + /// + public void BeginAcceptClient() + { + try + { + while (true) + { + eventWaitHdl.Reset(); + lock (listenerLock) + { + if (serverStart) + { + listener.BeginAcceptTcpClient(EndAcceptClient, null); + } + else + { + return; + } + } + eventWaitHdl.WaitOne(); + } + } + catch + { + + } + } + + /// + /// 有互斥资源 + /// 接收到客户端连接时调用到,关闭listener时也调用到 + /// + /// + private void EndAcceptClient(IAsyncResult ar) + { + try + { + TcpClient tcpclient = null; + lock (listenerLock) + { + if (serverStart) + { + tcpclient = listener.EndAcceptTcpClient(ar);//在这句话之前或者client.BeginRead之前断掉远程客户端都没事,tcpclient都不为null + } + } + eventWaitHdl.Set(); + if (tcpclient != null)//listener.stop后tcpclient == null,不会进入下面代码 + { + InitClient(tcpclient); + } + } + catch + { + + } + } + + /// + /// 有互斥资源 + /// 在listener监听状态下关闭listener时调用,资源释放时调用 + /// + /// + public bool ServerClose() + { + bool result = false; + try + { + lock (listenerLock) + { + if (serverStart) + { + serverStart = false; + listener.Stop(); + result = true; + if (ServerCloseEvent != null) + { + ServerCloseEvent(); + } + } + } + } + catch + { + + } + return result; + } + #endregion + + #region Client相关操作 + private void InitClient(TcpClient tcpclient) + { + currentClient = new Client(tcpclient); + ClientDlgSubscribe(true); + currentClient.BeginRead();//即使在这之前服务器断开,该函数返回值也等于1 + } + + /// + /// InitClient,CurrentClient_LocalDisconnectEvent,Client_DisconnectEvent调用到 + /// 在事务处理结束后调用到 + /// + /// + public void ClientDlgSubscribe(bool add) + { + if (add) + { + currentClient.NewClientEvent += new DlgOneParam(Client_NewClientEvent); + currentClient.RecvMsgEvent += new DlgOneParam(Client_RecvMsgEvent); + currentClient.RemoteDisconnectEvent += new DlgOneParam(Client_DisconnectEvent); + currentClient.LocalDisconnectEvent += new DlgNoParam(CurrentClient_LocalDisconnectEvent); + } + else + { + currentClient.NewClientEvent -= new DlgOneParam(Client_NewClientEvent); + currentClient.RecvMsgEvent -= new DlgOneParam(Client_RecvMsgEvent); + currentClient.RemoteDisconnectEvent -= new DlgOneParam(Client_DisconnectEvent); + currentClient.LocalDisconnectEvent -= new DlgNoParam(CurrentClient_LocalDisconnectEvent); + } + } + + public bool SendMsg(string msg) + { + bool result = false; + try + { + if (currentClient.SendMsg(msg)) + { + result = true; + } + } + catch + { + + } + return result; + } + + /// + /// 客户端连接情况下断开连接时调用,释放资源时调用 + /// + /// + public bool DisconnectClient() + { + bool result = false; + try + { + if (currentClient != null) + { + currentClient.Dispose(); + result = true; + } + } + catch + { + + } + return result; + } + + public void Client_NewClientEvent(string param) + { + if (NewClientEvent != null) + { + NewClientEvent(param); + } + } + + public void Client_RecvMsgEvent(string param) + { + if (RecvMsgEvent != null) + { + RecvMsgEvent(param); + } + } + + public void Client_DisconnectEvent(string param) + { + ClientDlgSubscribe(false); + if (RemoteDisconnectEvent != null) + { + RemoteDisconnectEvent(param); + } + } + + public void CurrentClient_LocalDisconnectEvent() + { + ClientDlgSubscribe(false); + if (LocalDisconnectEvent != null) + { + LocalDisconnectEvent(); + } + } + #endregion + + #region 资源释放 + public void Dispose() + { + ServerClose(); + DisconnectClient(); + } + #endregion + } +} diff --git a/SimpleServer/SimpleCommunication.csproj b/SimpleServer/SimpleCommunication.csproj new file mode 100644 index 0000000..e57d91c --- /dev/null +++ b/SimpleServer/SimpleCommunication.csproj @@ -0,0 +1,147 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {D73FAE32-AAA3-4A51-BB0A-F1A5DC5A7260} + WinExe + Properties + SimpleCommunication + SimpleCommunication + v4.8 + 512 + + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + 7.3 + prompt + MinimumRecommendedRules.ruleset + false + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + 7.3 + prompt + MinimumRecommendedRules.ruleset + false + + + true + ..\..\..\..\JY.Inspection\ + DEBUG;TRACE + full + AnyCPU + 7.3 + prompt + MinimumRecommendedRules.ruleset + + + bin\Release\ + TRACE + true + pdbonly + AnyCPU + 7.3 + prompt + MinimumRecommendedRules.ruleset + + + + + + + + + + + + + + + Form + + + FrmCommunication.cs + + + + + + + + + UserControl + + + CommunUI.cs + + + + FrmCommunication.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + CommunUI.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + \ No newline at end of file diff --git a/SimpleServer/SimpleCommunication.csproj.user b/SimpleServer/SimpleCommunication.csproj.user new file mode 100644 index 0000000..c10e84b --- /dev/null +++ b/SimpleServer/SimpleCommunication.csproj.user @@ -0,0 +1,6 @@ + + + + ProjectFiles + + \ No newline at end of file diff --git a/SimpleServer/StringBox.cs b/SimpleServer/StringBox.cs new file mode 100644 index 0000000..6af643a --- /dev/null +++ b/SimpleServer/StringBox.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Sockets; +using System.Text; +using System.Threading.Tasks; + +namespace SimpleCommunication +{ + public class StringBox + { + public string str = null; + + public string ID = null; + + public int isConnetMsg = 0; + } +} diff --git a/SimpleServer/app.config b/SimpleServer/app.config new file mode 100644 index 0000000..3e0e37c --- /dev/null +++ b/SimpleServer/app.config @@ -0,0 +1,3 @@ + + + diff --git a/SocketHelper/DelegateHelper.cs b/SocketHelper/DelegateHelper.cs new file mode 100644 index 0000000..94cb0ce --- /dev/null +++ b/SocketHelper/DelegateHelper.cs @@ -0,0 +1,37 @@ +/******************************************************************** + * * + * * Copyright (C) 2013-? Corporation All rights reserved. + * * 作者: BinGoo QQ:315567586 + * * 请尊重作者劳动成果,请保留以上作者信息,禁止用于商业活动。 + * * + * * 创建时间:2014-08-05 + * * 说明: + * * +********************************************************************/ +namespace SocketHelper +{ + public class DelegateHelper + { + #region 委托方法 + /// + /// 接收数据委托方法 + /// + public static SocketReadCallBack SocketReceive; + /// + /// 接收数据的委托 + /// + /// + public delegate void SocketReadCallBack(string msg); + + /// + /// 接收信息委托方法 + /// + public static SocketReadInfoCallBack SocketInfo; + /// + /// 接收数据的委托 + /// + /// + public delegate void SocketReadInfoCallBack(string msg); + #endregion + } +} diff --git a/SocketHelper/Properties/AssemblyInfo.cs b/SocketHelper/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..55c5ac1 --- /dev/null +++ b/SocketHelper/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("SocketHelper")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SocketHelper")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("0bbfb4a9-e262-4bbc-a53c-bd61b56c7cf9")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SocketHelper/SocketHelper.csproj b/SocketHelper/SocketHelper.csproj new file mode 100644 index 0000000..5b2c5f4 --- /dev/null +++ b/SocketHelper/SocketHelper.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {2E9AC112-75CC-4FB6-B058-F9C7424514EF} + Library + Properties + SocketHelper + SocketHelper + v4.8 + 512 + + + + true + full + false + ..\..\..\..\JY.Inspection\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SocketHelper/TCPClient.cs b/SocketHelper/TCPClient.cs new file mode 100644 index 0000000..b19ae6f --- /dev/null +++ b/SocketHelper/TCPClient.cs @@ -0,0 +1,256 @@ + +using System; +using System.Net; +using System.Net.Sockets; +using System.Text; +using System.Threading; + +namespace SocketHelper +{ + public class TCPClient + { + #region 属性 + private string _serverip; + /// + /// 服务端IP + /// + public string ServerIp + { + set { _serverip = value; } + get { return _serverip; } + } + private int _serverport; + /// + /// 服务端监听端口 + /// + public int ServerPort + { + set { _serverport = value; } + get { return _serverport; } + } + private TcpClient _tcpclient = null; + /// + /// TcpClient客户端 + /// + public TcpClient Tcpclient + { + set { _tcpclient = value; } + get { return _tcpclient; } + } + private Thread _tcpthread = null; + /// + /// Tcp客户端连接线程 + /// + public Thread Tcpthread + { + set { _tcpthread = value; } + get { return _tcpthread; } + } + private bool _isStarttcpthreading = false; + /// + /// 是否启动Tcp连接线程 + /// + public bool IsStartTcpthreading + { + set { _isStarttcpthreading = value; } + get { return _isStarttcpthreading; } + } + private bool _isclosed; + /// + /// 连接是否关闭 + /// + public bool Isclosed + { + set { _isclosed = value; } + get { return _isclosed; } + } + private string _receivestr; + /// + /// 接收Socket数据包 缓存字符串 + /// + public string Receivestr + { + set { _receivestr = value; } + get { return _receivestr; } + } + /// + /// 重连次数 + /// + private int _reConectedCount = 0; + public int ReConectedCount { + get { return _reConectedCount; } + set { _reConectedCount = value; } + } + + #endregion + #region 方法 + /// + /// 十六进制字字符串转为节数组 + /// + /// + /// + public static byte[] StringToHexByteArray(string s) + { + s = s.Replace(" ", ""); + if ((s.Length % 2) != 0) + s += " "; + byte[] returnBytes = new byte[s.Length / 2]; + for (int i = 0; i < returnBytes.Length; i++) + returnBytes[i] = Convert.ToByte(s.Substring(i * 2, 2), 16); + return returnBytes; + } + /// + /// 启动连接Socket服务器 + /// + public void StartConnection() + { + try + { + Isclosed = false; + CreateTcpClient(); + } + catch (Exception ex) + { + //LogHelper.WriteLog(ex.Message); + DelegateHelper.SocketInfo("错误信息:" + ex.Message); + } + } + /// + /// 创建线程连接 + /// + private void CreateTcpClient() + { + if (Isclosed) + return; + + Tcpclient = new TcpClient(); + Tcpthread = new Thread(StartTcpThread); + IsStartTcpthreading = true; + Tcpthread.Start(); + } + /// + /// 线程接收Socket上传的数据 + /// + private void StartTcpThread() + { + byte[] receivebyte = new byte[128]; + int bytelen; + try + { + while (IsStartTcpthreading) + { + if (!Tcpclient.Connected) + { + try + { + if (ReConectedCount != 0) + { + DelegateHelper.SocketInfo(string.Format("正在第{0}次重新连接FMS服务器... ...", ReConectedCount)); + } + else + { + DelegateHelper.SocketInfo("正在连接FMS服务器... ..."); + } + Tcpclient.Connect(IPAddress.Parse(ServerIp), ServerPort); + DelegateHelper.SocketInfo("已连接FMS服务器"); + + } + catch + { + //连接失败 + ReConectedCount++; + IsStartTcpthreading = false; + Thread.Sleep(3000); + continue; + } + } + bytelen = Tcpclient.Client.Receive(receivebyte); + // 连接断开 + if (bytelen == 0) + { + DelegateHelper.SocketInfo("与服务器断开连接... ..."); + ReConectedCount = 1; + IsStartTcpthreading = false; + continue; + } + Receivestr = ASCIIEncoding.Default.GetString(receivebyte, 0, bytelen); + if (Receivestr.Trim() != "") + { + //接收数据 + DelegateHelper.SocketReceive(Receivestr); + } + } + CreateTcpClient(); + } + catch (Exception ex) + { + // 异常退出时、需要重新连接 + CreateTcpClient(); + DelegateHelper.SocketInfo("错误信息:" + ex.Message); + } + } + /// + /// 发送Socket消息 + /// + /// + public void SendCommand(string cmdstr) + { + try + { + //byte[] _out=Encoding.GetEncoding("GBK").GetBytes(cmdstr); + byte[] _out = Encoding.Default.GetBytes(cmdstr); + Tcpclient.Client.Send(_out); + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 发送Socket消息 + /// + /// + public void SendCommand(byte[] byteMsg) + { + try + { + Tcpclient.Client.Send(byteMsg); + } + catch (Exception ex) + { + DelegateHelper.SocketInfo("错误信息:" + ex.Message); + } + } + #endregion + + public void Close() + { + try + { + if (Tcpclient.Client.Connected) + { + Tcpclient.Client.Close(); + Tcpclient.Client.Disconnect(true); + } + + } + catch (Exception ex) + { + DelegateHelper.SocketInfo("错误信息:" + ex.Message); + } + } + + #region 构造函数 + /// + /// 初始化TCPClient类 + /// + /// 服务端IP + /// 监听端口 + public TCPClient(string ip, int port) + { + ServerIp = ip; + ServerPort = port; + } + #endregion + } +} diff --git a/数据库/S1319.sql b/数据库/S1319.sql new file mode 100644 index 0000000..e5b7cac Binary files /dev/null and b/数据库/S1319.sql differ