ConfigurationForm - allow user use Printer

This commit is contained in:
DucDangAnh 2020-07-20 14:48:48 +07:00
parent fd96643412
commit 89e766714a
2 changed files with 48 additions and 2 deletions

View File

@ -39,6 +39,8 @@
this.lblAllowAutoOpenDoorIn = new System.Windows.Forms.Label();
this.txtDoorDeviceControlAccessIP = new System.Windows.Forms.TextBox();
this.lblDoorDeviceControlAccessIP = new System.Windows.Forms.Label();
this.lblAllowUsePrinter = new System.Windows.Forms.Label();
this.chkAllowUsePrinter = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// txtDoorDeviceControlAccessIPStatus
@ -79,11 +81,12 @@
this.btnSaveSettings.TabIndex = 6;
this.btnSaveSettings.Text = "Lưu";
this.btnSaveSettings.UseVisualStyleBackColor = true;
this.btnSaveSettings.Click += new System.EventHandler(this.btnSaveSettings_Click);
//
// chkAllowChangeROIRect
//
this.chkAllowChangeROIRect.AutoSize = true;
this.chkAllowChangeROIRect.Location = new System.Drawing.Point(252, 67);
this.chkAllowChangeROIRect.Location = new System.Drawing.Point(252, 97);
this.chkAllowChangeROIRect.Name = "chkAllowChangeROIRect";
this.chkAllowChangeROIRect.Size = new System.Drawing.Size(72, 17);
this.chkAllowChangeROIRect.TabIndex = 5;
@ -113,7 +116,7 @@
// lblAllowChangeROIRect
//
this.lblAllowChangeROIRect.AutoSize = true;
this.lblAllowChangeROIRect.Location = new System.Drawing.Point(11, 68);
this.lblAllowChangeROIRect.Location = new System.Drawing.Point(11, 98);
this.lblAllowChangeROIRect.Name = "lblAllowChangeROIRect";
this.lblAllowChangeROIRect.Size = new System.Drawing.Size(211, 13);
this.lblAllowChangeROIRect.TabIndex = 9;
@ -144,6 +147,25 @@
this.lblDoorDeviceControlAccessIP.TabIndex = 7;
this.lblDoorDeviceControlAccessIP.Text = "IP Thiết bị mở cửa:";
//
// lblAllowUsePrinter
//
this.lblAllowUsePrinter.AutoSize = true;
this.lblAllowUsePrinter.Location = new System.Drawing.Point(11, 67);
this.lblAllowUsePrinter.Name = "lblAllowUsePrinter";
this.lblAllowUsePrinter.Size = new System.Drawing.Size(83, 13);
this.lblAllowUsePrinter.TabIndex = 9;
this.lblAllowUsePrinter.Text = "Sử dụng máy in:";
//
// chkAllowUsePrinter
//
this.chkAllowUsePrinter.AutoSize = true;
this.chkAllowUsePrinter.Location = new System.Drawing.Point(141, 66);
this.chkAllowUsePrinter.Name = "chkAllowUsePrinter";
this.chkAllowUsePrinter.Size = new System.Drawing.Size(66, 17);
this.chkAllowUsePrinter.TabIndex = 5;
this.chkAllowUsePrinter.Text = "Sử dụng";
this.chkAllowUsePrinter.UseVisualStyleBackColor = true;
//
// ConfigurationForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -153,9 +175,11 @@
this.Controls.Add(this.btnCheckDoorDeviceControlAccessIP);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.btnSaveSettings);
this.Controls.Add(this.chkAllowUsePrinter);
this.Controls.Add(this.chkAllowChangeROIRect);
this.Controls.Add(this.chkAllowAutoDoorOut);
this.Controls.Add(this.chkAllowAutoDoorIn);
this.Controls.Add(this.lblAllowUsePrinter);
this.Controls.Add(this.lblAllowChangeROIRect);
this.Controls.Add(this.lblAllowAutoOpenDoorIn);
this.Controls.Add(this.txtDoorDeviceControlAccessIP);
@ -166,6 +190,7 @@
this.Name = "ConfigurationForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Cấu hình ứng dụng";
this.Load += new System.EventHandler(this.ConfigurationForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
@ -184,5 +209,7 @@
private System.Windows.Forms.Label lblAllowAutoOpenDoorIn;
private System.Windows.Forms.TextBox txtDoorDeviceControlAccessIP;
private System.Windows.Forms.Label lblDoorDeviceControlAccessIP;
private System.Windows.Forms.Label lblAllowUsePrinter;
private System.Windows.Forms.CheckBox chkAllowUsePrinter;
}
}

View File

@ -1,10 +1,13 @@
using System;
using System.Configuration;
using System.Windows.Forms;
namespace AIParkingApplication
{
public partial class ConfigurationForm : Form
{
private string doorAccessControlDeviceIP;
public ConfigurationForm()
{
InitializeComponent();
@ -14,5 +17,21 @@ namespace AIParkingApplication
{
Close();
}
private void btnSaveSettings_Click(object sender, EventArgs e)
{
}
private void ConfigurationForm_Load(object sender, EventArgs e)
{
}
private void LoadConfiguration()
{
doorAccessControlDeviceIP = ConfigurationManager.AppSettings["DOOR_ACCESS_DEVICE_CONTROL_IP"].Trim();
}
}
}