[성현모] CPXV2 Init
This commit is contained in:
284
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/Commons.cs
Normal file
284
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/Commons.cs
Normal file
@ -0,0 +1,284 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using SystemX.Net.Platform.Common.ExtensionMethods;
|
||||
|
||||
using static SystemX.Product.ALIS.UI.Commons;
|
||||
|
||||
namespace SystemX.Product.ALIS.UI
|
||||
{
|
||||
public class AccessLevelAlarm : EventArgs
|
||||
{
|
||||
public AccessLevelAlarm(LoginAccessLevel CurrentAccessLevel, bool bLoginState)
|
||||
{
|
||||
this.CurrentLevel = CurrentAccessLevel;
|
||||
|
||||
this.GetLoginState = bLoginState;
|
||||
}
|
||||
|
||||
public LoginAccessLevel CurrentLevel { get; private set; }
|
||||
|
||||
public bool GetLoginState { get; private set; }
|
||||
}
|
||||
|
||||
public static class Commons
|
||||
{
|
||||
static public bool DEBUG_MODE = false;
|
||||
|
||||
public enum eLookUpOption
|
||||
{
|
||||
CompareToSame = 0,
|
||||
StartWith,
|
||||
EndWith,
|
||||
ContainWith
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum LoginAccessLevel
|
||||
{
|
||||
None = 0x01,
|
||||
Basic = 0x02,
|
||||
Admin = 0x04
|
||||
}
|
||||
|
||||
public static bool IsValidEmail(string email)
|
||||
{
|
||||
bool valid = Regex.IsMatch(email, @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?");
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
||||
public static bool CheckGateLetter(char letter)
|
||||
{
|
||||
Regex engRegex = new Regex(@"[A-Z]");
|
||||
|
||||
return engRegex.IsMatch(letter.ToString());
|
||||
}
|
||||
|
||||
public static byte[] ConvertHexStringToByte(string convertString)
|
||||
{
|
||||
byte[] convertArr = new byte[convertString.Length / 2];
|
||||
|
||||
for (int i = 0; i < convertArr.Length; i++)
|
||||
{
|
||||
convertArr[i] = Convert.ToByte(convertString.Substring(i * 2, 2), 16);
|
||||
}
|
||||
|
||||
return convertArr;
|
||||
}
|
||||
|
||||
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
static extern int memcmp(byte[] b1, byte[] b2, long count);
|
||||
|
||||
public static bool ByteArrayCompare(byte[] b1, byte[] b2)
|
||||
{
|
||||
if (b1 == null || b2 == null)
|
||||
return false;
|
||||
|
||||
// Validate buffers are the same length.
|
||||
// This also ensures that the count does not exceed the length of either buffer.
|
||||
return b1.Length == b2.Length && memcmp(b1, b2, b1.Length) == 0;
|
||||
}
|
||||
|
||||
public static T ConvertTextToTryValue<T>(string strText, object objFailValue)
|
||||
{
|
||||
object obj;
|
||||
obj = typeof(T);
|
||||
|
||||
int iGetValue = 0;
|
||||
uint uiGetValue = 0;
|
||||
double dGetValue = 0;
|
||||
|
||||
if (obj.ToString().IndexOf("Int") >= 0)
|
||||
{
|
||||
if (!int.TryParse(strText, out iGetValue))
|
||||
obj = objFailValue;
|
||||
else
|
||||
obj = iGetValue;
|
||||
}
|
||||
if (obj.ToString().IndexOf("UInt") >= 0)
|
||||
{
|
||||
if (!uint.TryParse(strText, out uiGetValue))
|
||||
obj = objFailValue;
|
||||
else
|
||||
obj = uiGetValue;
|
||||
}
|
||||
else if (obj.ToString().IndexOf("Double") >= 0)
|
||||
{
|
||||
if (!double.TryParse(strText, out dGetValue))
|
||||
obj = objFailValue;
|
||||
else
|
||||
obj = dGetValue;
|
||||
}
|
||||
|
||||
return (T)Convert.ChangeType(obj, typeof(T));
|
||||
}
|
||||
|
||||
public class INICtrl
|
||||
{
|
||||
public static int MAX_INFORMATION = 10;
|
||||
|
||||
protected static int FILE_ATTRIBUTE_HIDDEN = 2;
|
||||
|
||||
[DllImport("kernel32")]
|
||||
protected static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
|
||||
[DllImport("kernel32")]
|
||||
protected static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
|
||||
[DllImport("kernel32")]
|
||||
protected static extern int SetFileAttributes(string lpFileName, int dwFileAttributes);
|
||||
|
||||
public virtual void SetValue(string Section, string Key, string Value, string path = "")
|
||||
{
|
||||
WritePrivateProfileString(Section, Key, Value, path);
|
||||
}
|
||||
|
||||
public virtual string GetValue(string Section, string Key, string Default, string path = "")
|
||||
{
|
||||
StringBuilder temp = new StringBuilder(255);
|
||||
int i = GetPrivateProfileString(Section, Key, Default, temp, 255, path);
|
||||
if (temp != null && temp.Length > 0) return temp.ToString();
|
||||
else return Default;
|
||||
}
|
||||
}
|
||||
|
||||
public class ConnectInfoINICtrl : INICtrl
|
||||
{
|
||||
private static string ConnectHistoryINIPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\ConnectConfig_PTS.ini"; //@"C:\ConnectConfig_PTS.ini"; //Application.StartupPath + @"\ConnectConfig_PTS.ini";
|
||||
|
||||
public ConnectInfoINICtrl()
|
||||
{
|
||||
if (File.Exists(ConnectHistoryINIPath) == false)
|
||||
{
|
||||
using (File.Create(ConnectHistoryINIPath)) { }
|
||||
|
||||
SetFileAttributes(ConnectHistoryINIPath, FILE_ATTRIBUTE_HIDDEN);
|
||||
|
||||
SetValue("LastestConnect", "Info", "");
|
||||
}
|
||||
}
|
||||
|
||||
public void SetLastestConnectInfo(string strSuccessInfo)
|
||||
{
|
||||
string strSetUpperText = strSuccessInfo.ToUpper();
|
||||
|
||||
if (strSuccessInfo.CompareTo("") == 0 ||
|
||||
strSuccessInfo.CompareTo("127.0.0.1") == 0 ||
|
||||
strSetUpperText.CompareTo("LOCALHOST") == 0 ||
|
||||
strSuccessInfo.IndexOf("If you do not enter the ip, will be connected to the local area.") >= 0)
|
||||
return;
|
||||
|
||||
SetValue("LastestConnect", "Info", strSuccessInfo);
|
||||
|
||||
string[] strInfoSet = new string[MAX_INFORMATION];
|
||||
|
||||
for (int i = 0; i < MAX_INFORMATION; i++)
|
||||
strInfoSet[i] = GetValue("HistoryConnect" + i.ToString(), "Info", "");
|
||||
|
||||
int? findIdx = strInfoSet.FindIndex(x => x == strSuccessInfo);
|
||||
|
||||
if (findIdx == null)
|
||||
{
|
||||
for (int i = MAX_INFORMATION - 1; i > 0; i--)
|
||||
{
|
||||
if (i > 0)
|
||||
strInfoSet[i] = strInfoSet[i - 1];
|
||||
}
|
||||
|
||||
strInfoSet[0] = strSuccessInfo;
|
||||
|
||||
for (int i = 0; i < MAX_INFORMATION; i++)
|
||||
SetValue("HistoryConnect" + i.ToString(), "Info", strInfoSet[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetValue(string Section, string Key, string Value, string path = "")
|
||||
{
|
||||
if (path.Length <= 0)
|
||||
path = ConnectHistoryINIPath;
|
||||
|
||||
WritePrivateProfileString(Section, Key, Value, path);
|
||||
}
|
||||
|
||||
public override string GetValue(string Section, string Key, string Default, string path = "")
|
||||
{
|
||||
if (path.Length <= 0)
|
||||
path = ConnectHistoryINIPath;
|
||||
|
||||
StringBuilder temp = new StringBuilder(255);
|
||||
int i = GetPrivateProfileString(Section, Key, Default, temp, 255, path);
|
||||
if (temp != null && temp.Length > 0) return temp.ToString();
|
||||
else return Default;
|
||||
}
|
||||
}
|
||||
|
||||
public class LoginInfoINICtrl : INICtrl
|
||||
{
|
||||
private static string LoginHistoryINIPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\LoginConfig.ini";
|
||||
|
||||
public LoginInfoINICtrl()
|
||||
{
|
||||
if (File.Exists(LoginHistoryINIPath) == false)
|
||||
{
|
||||
using (File.Create(LoginHistoryINIPath)) { }
|
||||
|
||||
SetFileAttributes(LoginHistoryINIPath, FILE_ATTRIBUTE_HIDDEN);
|
||||
|
||||
SetValue("LastestLogin", "Info", "");
|
||||
}
|
||||
}
|
||||
|
||||
public void SetLastestLoginInfo(string strSuccessInfo)
|
||||
{
|
||||
SetValue("LastestLogin", "Info", strSuccessInfo);
|
||||
|
||||
string[] strInfoSet = new string[MAX_INFORMATION];
|
||||
|
||||
for (int i = 0; i < MAX_INFORMATION; i++)
|
||||
strInfoSet[i] = GetValue("HistoryLogin" + i.ToString(), "Info", "");
|
||||
|
||||
int? findIdx = strInfoSet.FindIndex(x => x == strSuccessInfo);
|
||||
|
||||
if (findIdx == null)
|
||||
{
|
||||
for (int i = MAX_INFORMATION - 1; i > 0; i--)
|
||||
{
|
||||
if (i > 0)
|
||||
strInfoSet[i] = strInfoSet[i - 1];
|
||||
}
|
||||
|
||||
strInfoSet[0] = strSuccessInfo;
|
||||
|
||||
for (int i = 0; i < MAX_INFORMATION; i++)
|
||||
SetValue("HistoryLogin" + i.ToString(), "Info", strInfoSet[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetValue(string Section, string Key, string Value, string path = "")
|
||||
{
|
||||
if (path.Length <= 0)
|
||||
path = LoginHistoryINIPath;
|
||||
|
||||
WritePrivateProfileString(Section, Key, Value, path);
|
||||
}
|
||||
|
||||
public override string GetValue(string Section, string Key, string Default, string path = "")
|
||||
{
|
||||
if (path.Length <= 0)
|
||||
path = LoginHistoryINIPath;
|
||||
|
||||
StringBuilder temp = new StringBuilder(255);
|
||||
int i = GetPrivateProfileString(Section, Key, Default, temp, 255, path);
|
||||
if (temp != null && temp.Length > 0) return temp.ToString();
|
||||
else return Default;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
245
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/ConnectForm.Designer.cs
generated
Normal file
245
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/ConnectForm.Designer.cs
generated
Normal file
@ -0,0 +1,245 @@
|
||||
|
||||
namespace SystemX.Product.ALIS.UI.Subs
|
||||
{
|
||||
partial class ConnectForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConnectForm));
|
||||
this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.simpleButtonOK = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.simpleButtonAdvanced = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.panelAdvanced = new System.Windows.Forms.Panel();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.maskedTextBoxPW = new System.Windows.Forms.MaskedTextBox();
|
||||
this.maskedTextBoxUID = new System.Windows.Forms.MaskedTextBox();
|
||||
this.maskedTextBoxCN = new System.Windows.Forms.MaskedTextBox();
|
||||
this.maskedComboIP = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panelAdvanced.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.maskedComboIP.Properties)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// labelControl1
|
||||
//
|
||||
this.labelControl1.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.labelControl1.Appearance.Font = new System.Drawing.Font("Arial Black", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelControl1.Appearance.ForeColor = System.Drawing.Color.Black;
|
||||
this.labelControl1.Appearance.Options.UseBackColor = true;
|
||||
this.labelControl1.Appearance.Options.UseFont = true;
|
||||
this.labelControl1.Appearance.Options.UseForeColor = true;
|
||||
this.labelControl1.AutoEllipsis = true;
|
||||
this.labelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||
this.labelControl1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.labelControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.labelControl1.Name = "labelControl1";
|
||||
this.labelControl1.Size = new System.Drawing.Size(156, 23);
|
||||
this.labelControl1.TabIndex = 2;
|
||||
this.labelControl1.Text = "Input - IP Address";
|
||||
//
|
||||
// simpleButtonOK
|
||||
//
|
||||
this.simpleButtonOK.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.simpleButtonOK.Appearance.Options.UseFont = true;
|
||||
this.simpleButtonOK.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.simpleButtonOK.Location = new System.Drawing.Point(323, 0);
|
||||
this.simpleButtonOK.Name = "simpleButtonOK";
|
||||
this.simpleButtonOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.simpleButtonOK.TabIndex = 2;
|
||||
this.simpleButtonOK.Text = "OK";
|
||||
this.simpleButtonOK.Click += new System.EventHandler(this.simpleButtonOK_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel1.Controls.Add(this.simpleButtonAdvanced);
|
||||
this.panel1.Controls.Add(this.simpleButtonOK);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 245);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(398, 23);
|
||||
this.panel1.TabIndex = 5;
|
||||
//
|
||||
// simpleButtonAdvanced
|
||||
//
|
||||
this.simpleButtonAdvanced.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.simpleButtonAdvanced.Appearance.Options.UseFont = true;
|
||||
this.simpleButtonAdvanced.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.simpleButtonAdvanced.Location = new System.Drawing.Point(0, 0);
|
||||
this.simpleButtonAdvanced.Name = "simpleButtonAdvanced";
|
||||
this.simpleButtonAdvanced.Size = new System.Drawing.Size(75, 23);
|
||||
this.simpleButtonAdvanced.TabIndex = 3;
|
||||
this.simpleButtonAdvanced.Text = "Advanced";
|
||||
this.simpleButtonAdvanced.Click += new System.EventHandler(this.simpleButtonAdvanced_Click);
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 23);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(398, 15);
|
||||
this.panel2.TabIndex = 6;
|
||||
//
|
||||
// panelAdvanced
|
||||
//
|
||||
this.panelAdvanced.BackColor = System.Drawing.Color.Silver;
|
||||
this.panelAdvanced.Controls.Add(this.label3);
|
||||
this.panelAdvanced.Controls.Add(this.label2);
|
||||
this.panelAdvanced.Controls.Add(this.label1);
|
||||
this.panelAdvanced.Controls.Add(this.maskedTextBoxPW);
|
||||
this.panelAdvanced.Controls.Add(this.maskedTextBoxUID);
|
||||
this.panelAdvanced.Controls.Add(this.maskedTextBoxCN);
|
||||
this.panelAdvanced.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panelAdvanced.Location = new System.Drawing.Point(0, 159);
|
||||
this.panelAdvanced.Name = "panelAdvanced";
|
||||
this.panelAdvanced.Size = new System.Drawing.Size(398, 86);
|
||||
this.panelAdvanced.TabIndex = 7;
|
||||
this.panelAdvanced.Visible = false;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(88, 60);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(68, 16);
|
||||
this.label3.TabIndex = 9;
|
||||
this.label3.Text = "Password";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(103, 33);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(53, 16);
|
||||
this.label2.TabIndex = 8;
|
||||
this.label2.Text = "User ID";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(61, 6);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(95, 16);
|
||||
this.label1.TabIndex = 7;
|
||||
this.label1.Text = "Catalog Name";
|
||||
//
|
||||
// maskedTextBoxPW
|
||||
//
|
||||
this.maskedTextBoxPW.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.maskedTextBoxPW.Location = new System.Drawing.Point(186, 57);
|
||||
this.maskedTextBoxPW.Name = "maskedTextBoxPW";
|
||||
this.maskedTextBoxPW.PasswordChar = '*';
|
||||
this.maskedTextBoxPW.Size = new System.Drawing.Size(209, 21);
|
||||
this.maskedTextBoxPW.TabIndex = 6;
|
||||
this.maskedTextBoxPW.Text = "Kefico!@34";
|
||||
this.maskedTextBoxPW.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.maskedTextBoxPW.UseSystemPasswordChar = true;
|
||||
//
|
||||
// maskedTextBoxUID
|
||||
//
|
||||
this.maskedTextBoxUID.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.maskedTextBoxUID.Location = new System.Drawing.Point(186, 30);
|
||||
this.maskedTextBoxUID.Name = "maskedTextBoxUID";
|
||||
this.maskedTextBoxUID.Size = new System.Drawing.Size(209, 21);
|
||||
this.maskedTextBoxUID.TabIndex = 5;
|
||||
this.maskedTextBoxUID.Text = "Alis";
|
||||
this.maskedTextBoxUID.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// maskedTextBoxCN
|
||||
//
|
||||
this.maskedTextBoxCN.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.maskedTextBoxCN.Location = new System.Drawing.Point(186, 3);
|
||||
this.maskedTextBoxCN.Name = "maskedTextBoxCN";
|
||||
this.maskedTextBoxCN.Size = new System.Drawing.Size(209, 21);
|
||||
this.maskedTextBoxCN.TabIndex = 4;
|
||||
this.maskedTextBoxCN.Text = "CPX";
|
||||
this.maskedTextBoxCN.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// maskedComboIP
|
||||
//
|
||||
this.maskedComboIP.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.maskedComboIP.EditValue = "If you do not enter the ip, will be connected to the local area.";
|
||||
this.maskedComboIP.Location = new System.Drawing.Point(0, 38);
|
||||
this.maskedComboIP.Name = "maskedComboIP";
|
||||
this.maskedComboIP.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.maskedComboIP.Size = new System.Drawing.Size(398, 22);
|
||||
this.maskedComboIP.TabIndex = 9;
|
||||
this.maskedComboIP.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.maskedComboIP_PreviewKeyDown);
|
||||
//
|
||||
// ConnectForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackgroundImageLayoutStore = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.BackgroundImageStore = global::SystemX.Product.PTS.Properties.Resources.IpAddress;
|
||||
this.ClientSize = new System.Drawing.Size(398, 268);
|
||||
this.Controls.Add(this.maskedComboIP);
|
||||
this.Controls.Add(this.panelAdvanced);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.labelControl1);
|
||||
this.IconOptions.Icon = ((System.Drawing.Icon)(resources.GetObject("ConnectForm.IconOptions.Icon")));
|
||||
this.IconOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("ConnectForm.IconOptions.SvgImage")));
|
||||
this.MaximumSize = new System.Drawing.Size(400, 300);
|
||||
this.MinimumSize = new System.Drawing.Size(400, 300);
|
||||
this.Name = "ConnectForm";
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Connect CP-ALIS";
|
||||
this.TopMost = true;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ConnectForm_FormClosing);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panelAdvanced.ResumeLayout(false);
|
||||
this.panelAdvanced.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.maskedComboIP.Properties)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private DevExpress.XtraEditors.LabelControl labelControl1;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButtonOK;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Panel panelAdvanced;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.MaskedTextBox maskedTextBoxPW;
|
||||
private System.Windows.Forms.MaskedTextBox maskedTextBoxUID;
|
||||
private System.Windows.Forms.MaskedTextBox maskedTextBoxCN;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButtonAdvanced;
|
||||
private DevExpress.XtraEditors.ComboBoxEdit maskedComboIP;
|
||||
}
|
||||
}
|
||||
202
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/ConnectForm.cs
Normal file
202
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/ConnectForm.cs
Normal file
@ -0,0 +1,202 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using DataBaseConnection.Control;
|
||||
|
||||
using DevExpress.XtraBars.Docking;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
using SystemX.Product.ALIS.Interface;
|
||||
using static SystemX.Product.ALIS.UI.Commons;
|
||||
|
||||
namespace SystemX.Product.ALIS.UI.Subs
|
||||
{
|
||||
public partial class ConnectForm : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
private IDataController ctrlDB;
|
||||
|
||||
public string strInputText;
|
||||
|
||||
private string strSetConnIPAddress;
|
||||
public string strGetConnIPAddress { get { return strSetConnIPAddress; } private set { strSetConnIPAddress = value; } }
|
||||
|
||||
private int nSetConnPort;
|
||||
public int nGetConnPort { get { return nSetConnPort; } private set { nSetConnPort = value; } }
|
||||
//
|
||||
private string strSetConnCN;
|
||||
public string strGetConnCN { get { return strSetConnCN; } private set { strSetConnCN = value; } }
|
||||
|
||||
private string strSetConnUID;
|
||||
public string strGetConnUID { get { return strSetConnUID; } private set { strSetConnUID = value; } }
|
||||
|
||||
private string strSetConnPW;
|
||||
public string strGetConnPW { get { return strSetConnPW; } private set { strSetConnPW = value; } }
|
||||
|
||||
public ConnectForm(IDataController ctrlDB)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.MinimumSize = new Size(400, 120);
|
||||
this.MaximumSize = new Size(400, 120);
|
||||
|
||||
this.ctrlDB = ctrlDB;
|
||||
|
||||
maskedTextBoxCN.Text = DatabaseConnControl.CatalogName;
|
||||
maskedTextBoxUID.Text = DatabaseConnControl.CatalogConnUID;
|
||||
maskedTextBoxPW.Text = DatabaseConnControl.CatalogConnPW;
|
||||
|
||||
//maskedTextBoxIP.Mask = "###.###.###.###";
|
||||
//maskedTextBoxIP.ValidatingType = typeof(System.Net.IPAddress);
|
||||
|
||||
this.BringToFront();
|
||||
this.Focus();
|
||||
|
||||
DialogResult = DialogResult.None;
|
||||
|
||||
ConnectInfoINICtrl CCtrl = new ConnectInfoINICtrl();
|
||||
string strGetConnectInfo = CCtrl.GetValue("LastestConnect", "Info", "");
|
||||
|
||||
if (strGetConnectInfo.Length > 0)
|
||||
maskedComboIP.Text = strGetConnectInfo;
|
||||
|
||||
for (int i = 0; i < INICtrl.MAX_INFORMATION; i++)
|
||||
{
|
||||
string strGetInfo = CCtrl.GetValue("HistoryConnect" + i.ToString(), "Info", "");
|
||||
|
||||
if(strGetInfo.Length > 0)
|
||||
maskedComboIP.Properties.Items.Add(strGetInfo);
|
||||
}
|
||||
}
|
||||
|
||||
private void InvaildIPAlarm()
|
||||
{
|
||||
MessageBox.Show("Invalid IP. Enter it in the normal format. (An empty string or [localhost] will attempt to connect to the local server.)", "[SystemX.Product.ALIS.UI]", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
|
||||
private void simpleButtonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
IPAddress getIPAddress = null;
|
||||
|
||||
string strGetText = maskedComboIP.Text;
|
||||
string[] strGetSplitCommaText = strGetText.Split(',');
|
||||
string[] strGetSplitDotText = strGetText.Split('.');
|
||||
|
||||
strGetConnIPAddress = string.Empty;
|
||||
|
||||
nGetConnPort = DatabaseConnControl.CatalogConnPort;
|
||||
|
||||
strGetConnCN = maskedTextBoxCN.Text;
|
||||
strGetConnUID = maskedTextBoxUID.Text;
|
||||
strGetConnPW = maskedTextBoxPW.Text;
|
||||
|
||||
strInputText = maskedComboIP.Text;
|
||||
|
||||
if (IPAddress.TryParse(maskedComboIP.Text, out getIPAddress) == false)
|
||||
{
|
||||
if (strGetSplitCommaText.Length == 2)
|
||||
{
|
||||
string strGetIP = strGetSplitCommaText[0];
|
||||
string strGetPort = strGetSplitCommaText[1];
|
||||
|
||||
int nGetPort = int.MaxValue;
|
||||
|
||||
if (IPAddress.TryParse(strGetIP, out getIPAddress) &&
|
||||
int.TryParse(strGetPort, out nGetPort))
|
||||
{
|
||||
strGetConnIPAddress = strGetIP;
|
||||
|
||||
nGetConnPort = nGetPort;
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
string strGetUpperText = maskedComboIP.Text.ToUpper();
|
||||
|
||||
if (maskedComboIP.Text.Length == 0)
|
||||
DialogResult = DialogResult.Ignore;
|
||||
else if (strGetUpperText.CompareTo("LOCALHOST") == 0)
|
||||
DialogResult = DialogResult.Ignore;
|
||||
else if (maskedComboIP.Text.CompareTo("If you do not enter the ip, will be connected to the local area.") == 0)
|
||||
DialogResult = DialogResult.Ignore;
|
||||
else
|
||||
{
|
||||
maskedComboIP.Text = "";
|
||||
|
||||
InvaildIPAlarm();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strGetSplitDotText.Length == 4)
|
||||
{
|
||||
strGetConnIPAddress = maskedComboIP.Text;
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
maskedComboIP.Text = "";
|
||||
|
||||
InvaildIPAlarm();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ConnectForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (DialogResult == DialogResult.None)
|
||||
DialogResult = DialogResult.Abort;
|
||||
|
||||
/*if (maskedTextBoxIP.Text.Length == 0)
|
||||
DialogResult = DialogResult.Cancel;
|
||||
else if (maskedTextBoxIP.Text.CompareTo("localhost") == 0)
|
||||
DialogResult = DialogResult.Cancel;
|
||||
else if (maskedTextBoxIP.Text.CompareTo("If you do not enter the ip, will be connected to the local area.") == 0)
|
||||
DialogResult = DialogResult.Cancel;
|
||||
else
|
||||
{
|
||||
e.Cancel = true;
|
||||
|
||||
if (IPAddress.TryParse(maskedTextBoxIP.Text, out IPAddress))
|
||||
e.Cancel = false;
|
||||
}*/
|
||||
}
|
||||
|
||||
private void simpleButtonAdvanced_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (panelAdvanced.Visible == false)
|
||||
{
|
||||
this.MinimumSize = new Size(400, 200);
|
||||
this.MaximumSize = new Size(400, 200);
|
||||
|
||||
panelAdvanced.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
panelAdvanced.Visible = false;
|
||||
|
||||
this.MaximumSize = new Size(400, 120);
|
||||
this.MinimumSize = new Size(400, 120);
|
||||
}
|
||||
}
|
||||
|
||||
private void maskedComboIP_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
if (maskedComboIP.Text.CompareTo("If you do not enter the ip, will be connected to the local area.") == 0)
|
||||
maskedComboIP.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
1804
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/ConnectForm.resx
Normal file
1804
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/ConnectForm.resx
Normal file
File diff suppressed because it is too large
Load Diff
214
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/InputCopyReleaseNoForm.Designer.cs
generated
Normal file
214
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/InputCopyReleaseNoForm.Designer.cs
generated
Normal file
@ -0,0 +1,214 @@
|
||||
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
namespace SystemX.Product.ALIS.UI.Subs
|
||||
{
|
||||
partial class InputCopyReleaseNoForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InputCopyReleaseNoForm));
|
||||
this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.simpleButtonOK = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.textBoxProductNo = new System.Windows.Forms.TextBox();
|
||||
this.labelControlInfo2 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.labelControlInfo3 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.labelControlInfo4 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.labelControlInfo5 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// labelControl1
|
||||
//
|
||||
this.labelControl1.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.labelControl1.Appearance.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelControl1.Appearance.ForeColor = System.Drawing.Color.White;
|
||||
this.labelControl1.Appearance.Options.UseBackColor = true;
|
||||
this.labelControl1.Appearance.Options.UseFont = true;
|
||||
this.labelControl1.Appearance.Options.UseForeColor = true;
|
||||
this.labelControl1.AutoEllipsis = true;
|
||||
this.labelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||
this.labelControl1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.labelControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.labelControl1.Name = "labelControl1";
|
||||
this.labelControl1.Size = new System.Drawing.Size(149, 19);
|
||||
this.labelControl1.TabIndex = 2;
|
||||
this.labelControl1.Text = "Input Product Number";
|
||||
//
|
||||
// simpleButtonOK
|
||||
//
|
||||
this.simpleButtonOK.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.simpleButtonOK.Appearance.Options.UseFont = true;
|
||||
this.simpleButtonOK.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.simpleButtonOK.Location = new System.Drawing.Point(332, 0);
|
||||
this.simpleButtonOK.Name = "simpleButtonOK";
|
||||
this.simpleButtonOK.Size = new System.Drawing.Size(66, 22);
|
||||
this.simpleButtonOK.TabIndex = 2;
|
||||
this.simpleButtonOK.Text = "OK";
|
||||
this.simpleButtonOK.Click += new System.EventHandler(this.simpleButtonOK_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel1.Controls.Add(this.simpleButtonOK);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 146);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(398, 22);
|
||||
this.panel1.TabIndex = 5;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 19);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(398, 14);
|
||||
this.panel2.TabIndex = 6;
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
this.panel3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel3.Controls.Add(this.textBoxProductNo);
|
||||
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel3.Location = new System.Drawing.Point(0, 33);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(398, 22);
|
||||
this.panel3.TabIndex = 9;
|
||||
//
|
||||
// textBoxProductNo
|
||||
//
|
||||
this.textBoxProductNo.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.textBoxProductNo.Location = new System.Drawing.Point(0, 0);
|
||||
this.textBoxProductNo.Name = "textBoxProductNo";
|
||||
this.textBoxProductNo.Size = new System.Drawing.Size(398, 22);
|
||||
this.textBoxProductNo.TabIndex = 0;
|
||||
//
|
||||
// labelControlInfo2
|
||||
//
|
||||
this.labelControlInfo2.Appearance.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelControlInfo2.Appearance.Options.UseFont = true;
|
||||
this.labelControlInfo2.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.labelControlInfo2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.labelControlInfo2.Location = new System.Drawing.Point(0, 55);
|
||||
this.labelControlInfo2.Name = "labelControlInfo2";
|
||||
this.labelControlInfo2.Size = new System.Drawing.Size(398, 16);
|
||||
this.labelControlInfo2.TabIndex = 10;
|
||||
this.labelControlInfo2.Text = "-";
|
||||
//
|
||||
// labelControlInfo3
|
||||
//
|
||||
this.labelControlInfo3.Appearance.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelControlInfo3.Appearance.Options.UseFont = true;
|
||||
this.labelControlInfo3.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.labelControlInfo3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.labelControlInfo3.Location = new System.Drawing.Point(0, 71);
|
||||
this.labelControlInfo3.Name = "labelControlInfo3";
|
||||
this.labelControlInfo3.Size = new System.Drawing.Size(398, 16);
|
||||
this.labelControlInfo3.TabIndex = 11;
|
||||
this.labelControlInfo3.Text = "-";
|
||||
//
|
||||
// labelControlInfo4
|
||||
//
|
||||
this.labelControlInfo4.Appearance.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelControlInfo4.Appearance.Options.UseFont = true;
|
||||
this.labelControlInfo4.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.labelControlInfo4.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.labelControlInfo4.Location = new System.Drawing.Point(0, 87);
|
||||
this.labelControlInfo4.Name = "labelControlInfo4";
|
||||
this.labelControlInfo4.Size = new System.Drawing.Size(398, 16);
|
||||
this.labelControlInfo4.TabIndex = 12;
|
||||
this.labelControlInfo4.Text = "-";
|
||||
//
|
||||
// labelControlInfo5
|
||||
//
|
||||
this.labelControlInfo5.Appearance.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelControlInfo5.Appearance.Options.UseFont = true;
|
||||
this.labelControlInfo5.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.labelControlInfo5.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.labelControlInfo5.Location = new System.Drawing.Point(0, 103);
|
||||
this.labelControlInfo5.Name = "labelControlInfo5";
|
||||
this.labelControlInfo5.Size = new System.Drawing.Size(398, 16);
|
||||
this.labelControlInfo5.TabIndex = 13;
|
||||
this.labelControlInfo5.Text = "-";
|
||||
//
|
||||
// InputCopyReleaseNoForm
|
||||
//
|
||||
this.Appearance.BackColor = System.Drawing.Color.Black;
|
||||
this.Appearance.ForeColor = System.Drawing.Color.White;
|
||||
this.Appearance.Options.UseBackColor = true;
|
||||
this.Appearance.Options.UseFont = true;
|
||||
this.Appearance.Options.UseForeColor = true;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(398, 168);
|
||||
this.Controls.Add(this.labelControlInfo5);
|
||||
this.Controls.Add(this.labelControlInfo4);
|
||||
this.Controls.Add(this.labelControlInfo3);
|
||||
this.Controls.Add(this.labelControlInfo2);
|
||||
this.Controls.Add(this.panel3);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.labelControl1);
|
||||
this.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.IconOptions.Icon = ((System.Drawing.Icon)(resources.GetObject("InputCopyReleaseNoForm.IconOptions.Icon")));
|
||||
this.IconOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("InputCopyReleaseNoForm.IconOptions.SvgImage")));
|
||||
this.MaximumSize = new System.Drawing.Size(400, 200);
|
||||
this.MinimumSize = new System.Drawing.Size(400, 200);
|
||||
this.Name = "InputCopyReleaseNoForm";
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Input ...";
|
||||
this.TopMost = true;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ConnectForm_FormClosing);
|
||||
this.Shown += new System.EventHandler(this.SelectTestListForm_Shown);
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.InputCopyReleaseNoForm_KeyDown);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel3.ResumeLayout(false);
|
||||
this.panel3.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private DevExpress.XtraEditors.LabelControl labelControl1;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButtonOK;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private LabelControl labelControlInfo2;
|
||||
private LabelControl labelControlInfo3;
|
||||
private LabelControl labelControlInfo4;
|
||||
private LabelControl labelControlInfo5;
|
||||
private System.Windows.Forms.TextBox textBoxProductNo;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
using DevExpress.XtraBars.Docking;
|
||||
using DevExpress.XtraEditors;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using SystemX.Product.ALIS.Interface;
|
||||
|
||||
namespace SystemX.Product.ALIS.UI.Subs
|
||||
{
|
||||
public partial class InputCopyReleaseNoForm : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
private IDataController ctrlDB;
|
||||
|
||||
public string strProdNoP;
|
||||
public string strTestType;
|
||||
public string strVersion;
|
||||
public string strProdCode;
|
||||
|
||||
public string strInputProductNo;
|
||||
|
||||
public InputCopyReleaseNoForm(IDataController ctrlDB)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.ctrlDB = ctrlDB;
|
||||
|
||||
this.BringToFront();
|
||||
this.Focus();
|
||||
|
||||
DialogResult = DialogResult.None;
|
||||
|
||||
this.KeyPreview = true;
|
||||
|
||||
this.ActiveControl = textBoxProductNo;
|
||||
|
||||
textBoxProductNo.Focus();
|
||||
}
|
||||
|
||||
private void simpleButtonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
strInputProductNo = textBoxProductNo.Text;
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void ConnectForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (DialogResult == DialogResult.None)
|
||||
DialogResult = DialogResult.Abort;
|
||||
}
|
||||
|
||||
private void SelectTestListForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
labelControlInfo2.Text = "P_ProdNo(Variant) : " + strProdNoP;
|
||||
labelControlInfo3.Text = "Test Type : " + strTestType;
|
||||
labelControlInfo4.Text = "Version : " + strVersion;
|
||||
labelControlInfo5.Text = "Production Code : " + strProdCode;
|
||||
}
|
||||
|
||||
private void InputCopyReleaseNoForm_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
DialogResult = DialogResult.Abort;
|
||||
}
|
||||
}
|
||||
}
|
||||
1841
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/InputCopyReleaseNoForm.resx
Normal file
1841
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/InputCopyReleaseNoForm.resx
Normal file
File diff suppressed because it is too large
Load Diff
190
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/LoginForm.Designer.cs
generated
Normal file
190
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/LoginForm.Designer.cs
generated
Normal file
@ -0,0 +1,190 @@
|
||||
|
||||
namespace SystemX.Product.ALIS.UI.Subs
|
||||
{
|
||||
partial class LoginForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginForm));
|
||||
this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.labelControl2 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.btnLogin = new System.Windows.Forms.Button();
|
||||
this.labelAlarm = new System.Windows.Forms.Label();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.txtUserId = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.txtPassword = new System.Windows.Forms.MaskedTextBox();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtUserId.Properties)).BeginInit();
|
||||
this.panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// labelControl1
|
||||
//
|
||||
this.labelControl1.Appearance.BackColor = System.Drawing.Color.White;
|
||||
this.labelControl1.Appearance.Font = new System.Drawing.Font("Arial Black", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelControl1.Appearance.ForeColor = System.Drawing.Color.MidnightBlue;
|
||||
this.labelControl1.Appearance.Options.UseBackColor = true;
|
||||
this.labelControl1.Appearance.Options.UseFont = true;
|
||||
this.labelControl1.Appearance.Options.UseForeColor = true;
|
||||
this.labelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Style3D;
|
||||
this.labelControl1.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.labelControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.labelControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.labelControl1.Name = "labelControl1";
|
||||
this.labelControl1.Size = new System.Drawing.Size(52, 21);
|
||||
this.labelControl1.TabIndex = 2;
|
||||
this.labelControl1.Text = "User ID";
|
||||
//
|
||||
// labelControl2
|
||||
//
|
||||
this.labelControl2.Appearance.BackColor = System.Drawing.Color.White;
|
||||
this.labelControl2.Appearance.Font = new System.Drawing.Font("Arial Black", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelControl2.Appearance.ForeColor = System.Drawing.Color.MidnightBlue;
|
||||
this.labelControl2.Appearance.Options.UseBackColor = true;
|
||||
this.labelControl2.Appearance.Options.UseFont = true;
|
||||
this.labelControl2.Appearance.Options.UseForeColor = true;
|
||||
this.labelControl2.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Style3D;
|
||||
this.labelControl2.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.labelControl2.Location = new System.Drawing.Point(0, 0);
|
||||
this.labelControl2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.labelControl2.Name = "labelControl2";
|
||||
this.labelControl2.Size = new System.Drawing.Size(67, 21);
|
||||
this.labelControl2.TabIndex = 4;
|
||||
this.labelControl2.Text = "Password";
|
||||
//
|
||||
// btnLogin
|
||||
//
|
||||
this.btnLogin.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.btnLogin.Font = new System.Drawing.Font("Arial Black", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnLogin.Location = new System.Drawing.Point(0, 86);
|
||||
this.btnLogin.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnLogin.Name = "btnLogin";
|
||||
this.btnLogin.Size = new System.Drawing.Size(298, 32);
|
||||
this.btnLogin.TabIndex = 3;
|
||||
this.btnLogin.Text = "Login";
|
||||
this.btnLogin.UseVisualStyleBackColor = true;
|
||||
this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
|
||||
//
|
||||
// labelAlarm
|
||||
//
|
||||
this.labelAlarm.BackColor = System.Drawing.Color.LightGray;
|
||||
this.labelAlarm.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.labelAlarm.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelAlarm.Location = new System.Drawing.Point(0, 54);
|
||||
this.labelAlarm.Name = "labelAlarm";
|
||||
this.labelAlarm.Size = new System.Drawing.Size(298, 32);
|
||||
this.labelAlarm.TabIndex = 6;
|
||||
this.labelAlarm.Text = "-";
|
||||
this.labelAlarm.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.labelAlarm.Visible = false;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel1.Controls.Add(this.txtUserId);
|
||||
this.panel1.Controls.Add(this.labelControl1);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(298, 25);
|
||||
this.panel1.TabIndex = 7;
|
||||
//
|
||||
// txtUserId
|
||||
//
|
||||
this.txtUserId.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.txtUserId.Location = new System.Drawing.Point(52, 0);
|
||||
this.txtUserId.Name = "txtUserId";
|
||||
this.txtUserId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.txtUserId.Size = new System.Drawing.Size(246, 22);
|
||||
this.txtUserId.TabIndex = 3;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel2.Controls.Add(this.txtPassword);
|
||||
this.panel2.Controls.Add(this.labelControl2);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 25);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(298, 25);
|
||||
this.panel2.TabIndex = 8;
|
||||
//
|
||||
// txtPassword
|
||||
//
|
||||
this.txtPassword.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.txtPassword.Location = new System.Drawing.Point(67, 0);
|
||||
this.txtPassword.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.txtPassword.Name = "txtPassword";
|
||||
this.txtPassword.PasswordChar = '*';
|
||||
this.txtPassword.Size = new System.Drawing.Size(231, 21);
|
||||
this.txtPassword.TabIndex = 2;
|
||||
this.txtPassword.UseSystemPasswordChar = true;
|
||||
//
|
||||
// LoginForm
|
||||
//
|
||||
this.Appearance.Options.UseFont = true;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackgroundImageLayoutStore = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.BackgroundImageStore = global::SystemX.Product.PTS.Properties.Resources.Password;
|
||||
this.ClientSize = new System.Drawing.Size(298, 118);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.labelAlarm);
|
||||
this.Controls.Add(this.btnLogin);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.IconOptions.Icon = ((System.Drawing.Icon)(resources.GetObject("LoginForm.IconOptions.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.MaximumSize = new System.Drawing.Size(300, 150);
|
||||
this.MinimumSize = new System.Drawing.Size(300, 130);
|
||||
this.Name = "LoginForm";
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Login";
|
||||
this.TopMost = true;
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtUserId.Properties)).EndInit();
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel2.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private DevExpress.XtraEditors.LabelControl labelControl1;
|
||||
private DevExpress.XtraEditors.LabelControl labelControl2;
|
||||
private System.Windows.Forms.Button btnLogin;
|
||||
private System.Windows.Forms.Label labelAlarm;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.MaskedTextBox txtPassword;
|
||||
private DevExpress.XtraEditors.ComboBoxEdit txtUserId;
|
||||
}
|
||||
}
|
||||
116
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/LoginForm.cs
Normal file
116
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/LoginForm.cs
Normal file
@ -0,0 +1,116 @@
|
||||
using DevExpress.XtraEditors;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using SystemX.Product.ALIS.Interface;
|
||||
using static SystemX.Product.ALIS.UI.Commons;
|
||||
|
||||
namespace SystemX.Product.ALIS.UI.Subs
|
||||
{
|
||||
public partial class LoginForm : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
private IDataController ctrlDB;
|
||||
|
||||
private DataSet ds = new DataSet();
|
||||
private DataTable dt = new DataTable();
|
||||
|
||||
public string UserID { internal set; get; }
|
||||
public string UserName { internal set; get; }
|
||||
public string UserDept { internal set; get; }
|
||||
public string UserEmail { internal set; get; }
|
||||
public string UserComment { internal set; get; }
|
||||
public string UserPassword { internal set; get; }
|
||||
|
||||
public LoginForm(IDataController ctrlDB)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.ctrlDB = ctrlDB;
|
||||
|
||||
this.Focus();
|
||||
this.BringToFront();
|
||||
|
||||
this.ActiveControl = txtUserId;
|
||||
|
||||
txtUserId.Focus();
|
||||
|
||||
LoginInfoINICtrl LCtrl = new LoginInfoINICtrl();
|
||||
string strGetConnectInfo = LCtrl.GetValue("LastestLogin", "Info", "");
|
||||
|
||||
if (strGetConnectInfo.Length > 0)
|
||||
{
|
||||
txtUserId.Text = strGetConnectInfo;
|
||||
|
||||
this.ActiveControl = txtPassword;
|
||||
}
|
||||
|
||||
for (int i = 0; i < INICtrl.MAX_INFORMATION; i++)
|
||||
{
|
||||
string strGetInfo = LCtrl.GetValue("HistoryLogin" + i.ToString(), "Info", "");
|
||||
|
||||
if (strGetInfo.Length > 0)
|
||||
txtUserId.Properties.Items.Add(strGetInfo);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnLogin_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DialogResult = DialogResult.None;
|
||||
|
||||
SqlDataReader dr = null;
|
||||
|
||||
try
|
||||
{
|
||||
ctrlDB.GetConnSqlCmd().CommandText = "SELECT * FROM STAT_User WHERE UserID = '" + txtUserId.Text + "' AND Password = '" + txtPassword.Text + "';";
|
||||
dr = ctrlDB.GetConnSqlCmd().ExecuteReader();
|
||||
|
||||
if (dr != null)
|
||||
{
|
||||
DataSet ds = new DataSet();
|
||||
DataTable dt = new DataTable();
|
||||
|
||||
int iFieldCnt = dr.FieldCount;
|
||||
int iRecordsAffectedCnt = dr.RecordsAffected;
|
||||
bool bHasRow = dr.HasRows;
|
||||
|
||||
dt.Load(dr);
|
||||
ds.Tables.Add(dt);
|
||||
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
UserID = dt.Rows[0]["UserID"].ToString();
|
||||
UserName = dt.Rows[0]["Name"].ToString();
|
||||
UserDept = dt.Rows[0]["Dept"].ToString();
|
||||
UserEmail = dt.Rows[0]["Email"].ToString();
|
||||
UserComment = dt.Rows[0]["Comment"].ToString();
|
||||
UserPassword = dt.Rows[0]["Password"].ToString();
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (dr != null)
|
||||
dr.Close();
|
||||
}
|
||||
|
||||
if (this.DialogResult == DialogResult.None)
|
||||
{
|
||||
this.MaximumSize = new Size(300, 180);
|
||||
this.MinimumSize = new Size(300, 180);
|
||||
this.Size = new Size(300, 180);
|
||||
|
||||
labelAlarm.Visible = true;
|
||||
labelAlarm.Text = "User information does not match or\r\n the password is incorrect.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1787
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/LoginForm.resx
Normal file
1787
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/LoginForm.resx
Normal file
File diff suppressed because it is too large
Load Diff
237
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/SelectTestListForm.Designer.cs
generated
Normal file
237
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/SelectTestListForm.Designer.cs
generated
Normal file
@ -0,0 +1,237 @@
|
||||
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
namespace SystemX.Product.ALIS.UI.Subs
|
||||
{
|
||||
partial class SelectTestListForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SelectTestListForm));
|
||||
this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.simpleButtonOK = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.labelControlInfo1 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.comboBoxEditVersionList = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.labelControlInfo2 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.labelControlInfo3 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.labelControlInfo4 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.labelControlInfo5 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.comboBoxEditVersionList.Properties)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// labelControl1
|
||||
//
|
||||
this.labelControl1.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.labelControl1.Appearance.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelControl1.Appearance.ForeColor = System.Drawing.Color.White;
|
||||
this.labelControl1.Appearance.Options.UseBackColor = true;
|
||||
this.labelControl1.Appearance.Options.UseFont = true;
|
||||
this.labelControl1.Appearance.Options.UseForeColor = true;
|
||||
this.labelControl1.AutoEllipsis = true;
|
||||
this.labelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||
this.labelControl1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.labelControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.labelControl1.Name = "labelControl1";
|
||||
this.labelControl1.Size = new System.Drawing.Size(162, 19);
|
||||
this.labelControl1.TabIndex = 2;
|
||||
this.labelControl1.Text = "Select Test-List Version";
|
||||
//
|
||||
// simpleButtonOK
|
||||
//
|
||||
this.simpleButtonOK.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.simpleButtonOK.Appearance.Options.UseFont = true;
|
||||
this.simpleButtonOK.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.simpleButtonOK.Location = new System.Drawing.Point(332, 0);
|
||||
this.simpleButtonOK.Name = "simpleButtonOK";
|
||||
this.simpleButtonOK.Size = new System.Drawing.Size(66, 22);
|
||||
this.simpleButtonOK.TabIndex = 2;
|
||||
this.simpleButtonOK.Text = "OK";
|
||||
this.simpleButtonOK.Click += new System.EventHandler(this.simpleButtonOK_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel1.Controls.Add(this.simpleButtonOK);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 146);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(398, 22);
|
||||
this.panel1.TabIndex = 5;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 19);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(398, 14);
|
||||
this.panel2.TabIndex = 6;
|
||||
//
|
||||
// labelControlInfo1
|
||||
//
|
||||
this.labelControlInfo1.Appearance.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelControlInfo1.Appearance.Options.UseFont = true;
|
||||
this.labelControlInfo1.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.labelControlInfo1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.labelControlInfo1.Location = new System.Drawing.Point(0, 33);
|
||||
this.labelControlInfo1.Name = "labelControlInfo1";
|
||||
this.labelControlInfo1.Size = new System.Drawing.Size(398, 16);
|
||||
this.labelControlInfo1.TabIndex = 8;
|
||||
this.labelControlInfo1.Text = "-";
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
this.panel3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel3.Controls.Add(this.comboBoxEditVersionList);
|
||||
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel3.Location = new System.Drawing.Point(0, 49);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(398, 22);
|
||||
this.panel3.TabIndex = 9;
|
||||
//
|
||||
// comboBoxEditVersionList
|
||||
//
|
||||
this.comboBoxEditVersionList.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.comboBoxEditVersionList.EditValue = "";
|
||||
this.comboBoxEditVersionList.Location = new System.Drawing.Point(0, 0);
|
||||
this.comboBoxEditVersionList.Name = "comboBoxEditVersionList";
|
||||
this.comboBoxEditVersionList.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.UltraFlat;
|
||||
this.comboBoxEditVersionList.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.comboBoxEditVersionList.Properties.ImmediatePopup = true;
|
||||
this.comboBoxEditVersionList.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
|
||||
this.comboBoxEditVersionList.Size = new System.Drawing.Size(398, 22);
|
||||
this.comboBoxEditVersionList.TabIndex = 1;
|
||||
//
|
||||
// labelControlInfo2
|
||||
//
|
||||
this.labelControlInfo2.Appearance.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelControlInfo2.Appearance.Options.UseFont = true;
|
||||
this.labelControlInfo2.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.labelControlInfo2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.labelControlInfo2.Location = new System.Drawing.Point(0, 71);
|
||||
this.labelControlInfo2.Name = "labelControlInfo2";
|
||||
this.labelControlInfo2.Size = new System.Drawing.Size(398, 16);
|
||||
this.labelControlInfo2.TabIndex = 10;
|
||||
this.labelControlInfo2.Text = "-";
|
||||
//
|
||||
// labelControlInfo3
|
||||
//
|
||||
this.labelControlInfo3.Appearance.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelControlInfo3.Appearance.Options.UseFont = true;
|
||||
this.labelControlInfo3.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.labelControlInfo3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.labelControlInfo3.Location = new System.Drawing.Point(0, 87);
|
||||
this.labelControlInfo3.Name = "labelControlInfo3";
|
||||
this.labelControlInfo3.Size = new System.Drawing.Size(398, 16);
|
||||
this.labelControlInfo3.TabIndex = 11;
|
||||
this.labelControlInfo3.Text = "-";
|
||||
//
|
||||
// labelControlInfo4
|
||||
//
|
||||
this.labelControlInfo4.Appearance.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelControlInfo4.Appearance.Options.UseFont = true;
|
||||
this.labelControlInfo4.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.labelControlInfo4.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.labelControlInfo4.Location = new System.Drawing.Point(0, 103);
|
||||
this.labelControlInfo4.Name = "labelControlInfo4";
|
||||
this.labelControlInfo4.Size = new System.Drawing.Size(398, 16);
|
||||
this.labelControlInfo4.TabIndex = 12;
|
||||
this.labelControlInfo4.Text = "-";
|
||||
//
|
||||
// labelControlInfo5
|
||||
//
|
||||
this.labelControlInfo5.Appearance.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelControlInfo5.Appearance.Options.UseFont = true;
|
||||
this.labelControlInfo5.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.labelControlInfo5.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.labelControlInfo5.Location = new System.Drawing.Point(0, 119);
|
||||
this.labelControlInfo5.Name = "labelControlInfo5";
|
||||
this.labelControlInfo5.Size = new System.Drawing.Size(398, 16);
|
||||
this.labelControlInfo5.TabIndex = 13;
|
||||
this.labelControlInfo5.Text = "-";
|
||||
//
|
||||
// SelectTestListForm
|
||||
//
|
||||
this.Appearance.BackColor = System.Drawing.Color.Black;
|
||||
this.Appearance.ForeColor = System.Drawing.Color.White;
|
||||
this.Appearance.Options.UseBackColor = true;
|
||||
this.Appearance.Options.UseFont = true;
|
||||
this.Appearance.Options.UseForeColor = true;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(398, 168);
|
||||
this.Controls.Add(this.labelControlInfo5);
|
||||
this.Controls.Add(this.labelControlInfo4);
|
||||
this.Controls.Add(this.labelControlInfo3);
|
||||
this.Controls.Add(this.labelControlInfo2);
|
||||
this.Controls.Add(this.panel3);
|
||||
this.Controls.Add(this.labelControlInfo1);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.labelControl1);
|
||||
this.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.IconOptions.Icon = ((System.Drawing.Icon)(resources.GetObject("SelectTestListForm.IconOptions.Icon")));
|
||||
this.IconOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("SelectTestListForm.IconOptions.SvgImage")));
|
||||
this.MaximumSize = new System.Drawing.Size(400, 200);
|
||||
this.MinimumSize = new System.Drawing.Size(400, 200);
|
||||
this.Name = "SelectTestListForm";
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Select ...";
|
||||
this.TopMost = true;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ConnectForm_FormClosing);
|
||||
this.Shown += new System.EventHandler(this.SelectTestListForm_Shown);
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SelectTestListForm_KeyDown);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel3.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.comboBoxEditVersionList.Properties)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private DevExpress.XtraEditors.LabelControl labelControl1;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButtonOK;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
|
||||
private ComboBoxEdit comboBoxEditVersionList;
|
||||
private LabelControl labelControlInfo1;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private LabelControl labelControlInfo2;
|
||||
private LabelControl labelControlInfo3;
|
||||
private LabelControl labelControlInfo4;
|
||||
private LabelControl labelControlInfo5;
|
||||
}
|
||||
}
|
||||
119
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/SelectTestListForm.cs
Normal file
119
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/SelectTestListForm.cs
Normal file
@ -0,0 +1,119 @@
|
||||
using DevExpress.XtraBars.Docking;
|
||||
using DevExpress.XtraEditors;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using SystemX.Product.ALIS.Interface;
|
||||
using static SystemX.Product.ALIS.UI.View.ViewCfg;
|
||||
|
||||
namespace SystemX.Product.ALIS.UI.Subs
|
||||
{
|
||||
public partial class SelectTestListForm : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
private eSelectType SelectOpenType;
|
||||
|
||||
private IDataController ctrlDB;
|
||||
|
||||
private int nSelectedItem;
|
||||
|
||||
private string strSelectedItem;
|
||||
|
||||
public string strNo;
|
||||
public string strProdNo;
|
||||
public string strName;
|
||||
public string strTestType;
|
||||
public string strVersion;
|
||||
public string strProdCode;
|
||||
public string strFileName;
|
||||
|
||||
public int nSelectedIndex { get { return nSelectedItem; } private set { nSelectedItem = value; } }
|
||||
|
||||
public string nSelectedVersion { get { return strSelectedItem; } private set { strSelectedItem = value; } }
|
||||
|
||||
public SelectTestListForm(eSelectType eSelect, IDataController ctrlDB, int nMaxStepVersion, bool bLimitRelease = false)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
SelectOpenType = eSelect;
|
||||
|
||||
this.ctrlDB = ctrlDB;
|
||||
|
||||
this.BringToFront();
|
||||
|
||||
this.Focus();
|
||||
|
||||
comboBoxEditVersionList.Properties.Items.Add("Select Version ...");
|
||||
|
||||
if (bLimitRelease == false)
|
||||
{
|
||||
for (int i = nMaxStepVersion; i >= nMaxStepVersion - 10 && i >= 0; i--)
|
||||
comboBoxEditVersionList.Properties.Items.Add(i.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
comboBoxEditVersionList.Properties.Items.Add("View VRFY Release");
|
||||
|
||||
for (int i = nMaxStepVersion; i >= 0; i--)
|
||||
comboBoxEditVersionList.Properties.Items.Add(i.ToString());
|
||||
}
|
||||
|
||||
comboBoxEditVersionList.SelectedIndex = 0;
|
||||
|
||||
DialogResult = DialogResult.None;
|
||||
|
||||
this.KeyPreview = true;
|
||||
}
|
||||
|
||||
private void simpleButtonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (comboBoxEditVersionList.SelectedIndex > 0)
|
||||
{
|
||||
nSelectedIndex = comboBoxEditVersionList.SelectedIndex;
|
||||
|
||||
nSelectedVersion = comboBoxEditVersionList.SelectedItem.ToString();
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
}
|
||||
|
||||
private void ConnectForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (DialogResult == DialogResult.None)
|
||||
DialogResult = DialogResult.Abort;
|
||||
}
|
||||
|
||||
private void SelectTestListForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
labelControlInfo1.Text = "No : " + strNo;
|
||||
|
||||
if (SelectOpenType == eSelectType.TestListFile)
|
||||
{
|
||||
//labelControl1.Text = "Select Test-List Version [" + strName + "]";
|
||||
labelControl1.Text = "Select Test-List Version [" + strFileName + "]";
|
||||
|
||||
labelControlInfo2.Text = "File Name : " + strFileName;
|
||||
}
|
||||
else if (SelectOpenType == eSelectType.TestListVariant)
|
||||
labelControlInfo2.Text = "P_ProdNo : " + strProdNo;
|
||||
|
||||
labelControlInfo3.Text = "Test Type : " + strTestType;
|
||||
labelControlInfo4.Text = "Version : " + strVersion;
|
||||
labelControlInfo5.Text = "Production Code : " + strProdCode;
|
||||
}
|
||||
|
||||
private void SelectTestListForm_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if(e.KeyCode == Keys.Escape)
|
||||
DialogResult = DialogResult.Abort;
|
||||
}
|
||||
}
|
||||
}
|
||||
1841
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/SelectTestListForm.resx
Normal file
1841
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/SelectTestListForm.resx
Normal file
File diff suppressed because it is too large
Load Diff
124
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/WaitProgressForm.Designer.cs
generated
Normal file
124
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/WaitProgressForm.Designer.cs
generated
Normal file
@ -0,0 +1,124 @@
|
||||
|
||||
namespace SystemX.Product.ALIS.UI.Subs
|
||||
{
|
||||
partial class WaitProgressForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.progressPanel1 = new DevExpress.XtraWaitForm.ProgressPanel();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.progressBarWait = new System.Windows.Forms.ProgressBar();
|
||||
this.labelSub = new System.Windows.Forms.Label();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// progressPanel1
|
||||
//
|
||||
this.progressPanel1.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.progressPanel1.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.progressPanel1.Appearance.Options.UseBackColor = true;
|
||||
this.progressPanel1.Appearance.Options.UseFont = true;
|
||||
this.progressPanel1.AppearanceCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
|
||||
this.progressPanel1.AppearanceCaption.Options.UseFont = true;
|
||||
this.progressPanel1.AppearanceDescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
||||
this.progressPanel1.AppearanceDescription.Options.UseFont = true;
|
||||
this.progressPanel1.Description = "";
|
||||
this.progressPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.progressPanel1.ImageHorzOffset = 20;
|
||||
this.progressPanel1.Location = new System.Drawing.Point(0, 6);
|
||||
this.progressPanel1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.progressPanel1.Name = "progressPanel1";
|
||||
this.progressPanel1.Size = new System.Drawing.Size(287, 24);
|
||||
this.progressPanel1.TabIndex = 0;
|
||||
this.progressPanel1.Text = "progressPanel1";
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.AutoSize = true;
|
||||
this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.tableLayoutPanel1.ColumnCount = 1;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.progressPanel1, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.progressBarWait, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelSub, 0, 2);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.tableLayoutPanel1.RowCount = 3;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(287, 67);
|
||||
this.tableLayoutPanel1.TabIndex = 1;
|
||||
//
|
||||
// progressBarWait
|
||||
//
|
||||
this.progressBarWait.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.progressBarWait.Location = new System.Drawing.Point(3, 36);
|
||||
this.progressBarWait.Name = "progressBarWait";
|
||||
this.progressBarWait.Size = new System.Drawing.Size(281, 6);
|
||||
this.progressBarWait.TabIndex = 1;
|
||||
this.progressBarWait.Visible = false;
|
||||
//
|
||||
// labelSub
|
||||
//
|
||||
this.labelSub.AutoSize = true;
|
||||
this.labelSub.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.labelSub.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelSub.Location = new System.Drawing.Point(3, 45);
|
||||
this.labelSub.Name = "labelSub";
|
||||
this.labelSub.Size = new System.Drawing.Size(281, 19);
|
||||
this.labelSub.TabIndex = 2;
|
||||
this.labelSub.Text = "Processing ...";
|
||||
this.labelSub.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// WaitProgressForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.ClientSize = new System.Drawing.Size(287, 67);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Name = "WaitProgressForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraWaitForm.ProgressPanel progressPanel1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.ProgressBar progressBarWait;
|
||||
private System.Windows.Forms.Label labelSub;
|
||||
}
|
||||
}
|
||||
66
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/WaitProgressForm.cs
Normal file
66
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/WaitProgressForm.cs
Normal file
@ -0,0 +1,66 @@
|
||||
using DevExpress.XtraWaitForm;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace SystemX.Product.ALIS.UI.Subs
|
||||
{
|
||||
public partial class WaitProgressForm : WaitForm
|
||||
{
|
||||
public WaitProgressForm(bool bVisibleProgress = false)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.progressPanel1.AutoHeight = true;
|
||||
|
||||
if (bVisibleProgress)
|
||||
progressBarWait.Visible = true;
|
||||
}
|
||||
|
||||
#region Overrides
|
||||
|
||||
public override void SetCaption(string caption)
|
||||
{
|
||||
base.SetCaption(caption);
|
||||
|
||||
this.progressPanel1.Caption = caption;
|
||||
}
|
||||
public override void SetDescription(string description)
|
||||
{
|
||||
base.SetDescription(description);
|
||||
|
||||
this.progressPanel1.Description = description;
|
||||
}
|
||||
public override void ProcessCommand(Enum cmd, object arg)
|
||||
{
|
||||
base.ProcessCommand(cmd, arg);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void setDescription(string sText)
|
||||
{
|
||||
//this.SetDescription(sText);
|
||||
|
||||
this.labelSub.Text = sText;
|
||||
}
|
||||
|
||||
public void SetProgressMax(int nValue)
|
||||
{
|
||||
progressBarWait.Maximum = nValue;
|
||||
}
|
||||
|
||||
public void SetProgressValue(int nValue)
|
||||
{
|
||||
progressBarWait.Value = nValue;
|
||||
}
|
||||
|
||||
public enum WaitFormCommand
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
120
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/WaitProgressForm.resx
Normal file
120
CPXV2 PTS/SystemX.Product.CP.PTS/UI/Subs/WaitProgressForm.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Reference in New Issue
Block a user