diff --git a/插件库/Lskj.Main/FrmLogin.Designer.cs b/插件库/Lskj.Main/FrmLogin.Designer.cs index c4f89b3..9376938 100644 --- a/插件库/Lskj.Main/FrmLogin.Designer.cs +++ b/插件库/Lskj.Main/FrmLogin.Designer.cs @@ -48,6 +48,7 @@ this.language = new DevExpress.XtraEditors.ComboBoxEdit(); this.forgetPwd = new DevExpress.XtraEditors.PictureEdit(); this.toolTip = new System.Windows.Forms.ToolTip(); + this.checkPwd = new DevExpress.XtraEditors.PictureEdit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.chkUpdate.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.chkClient.Properties)).BeginInit(); @@ -62,6 +63,7 @@ ((System.ComponentModel.ISupportInitialize)(this.lueUserName.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.language.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.forgetPwd.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkPwd.Properties)).BeginInit(); this.SuspendLayout(); // // lblCopyright @@ -285,7 +287,7 @@ this.forgetPwd.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.forgetPwd.Cursor = System.Windows.Forms.Cursors.Hand; this.forgetPwd.EditValue = global::Lskj.Main.Properties.Resources.忘记密码; - this.forgetPwd.Location = new System.Drawing.Point(584, 257); + this.forgetPwd.Location = new System.Drawing.Point(601, 258); this.forgetPwd.Name = "forgetPwd"; this.forgetPwd.Properties.AllowFocused = false; this.forgetPwd.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; @@ -304,12 +306,29 @@ this.toolTip.ReshowDelay = 100; this.toolTip.ShowAlways = true; // + // checkPwd + // + this.checkPwd.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.checkPwd.Cursor = System.Windows.Forms.Cursors.Hand; + this.checkPwd.EditValue = global::Lskj.Main.Properties.Resources.密码显示; + this.checkPwd.Location = new System.Drawing.Point(579, 258); + this.checkPwd.Name = "checkPwd"; + this.checkPwd.Properties.AllowFocused = false; + this.checkPwd.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; + this.checkPwd.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Zoom; + this.checkPwd.Size = new System.Drawing.Size(21, 21); + this.checkPwd.TabIndex = 52; + this.toolTip.SetToolTip(this.checkPwd, "显示密码"); + this.checkPwd.Visible = false; + this.checkPwd.Click += new System.EventHandler(this.OnCheckPwdClick); + // // FrmLogin // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackgroundImage = global::Lskj.Main.Properties.Resources.newlogin; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.ClientSize = new System.Drawing.Size(664, 451); + this.Controls.Add(this.checkPwd); this.Controls.Add(this.forgetPwd); this.Controls.Add(this.language); this.Controls.Add(this.upDateTimeLab); @@ -351,6 +370,7 @@ ((System.ComponentModel.ISupportInitialize)(this.lueUserName.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.language.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.forgetPwd.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkPwd.Properties)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -360,4 +380,5 @@ private System.Windows.Forms.Label lblCopyright; private System.Windows.Forms.PictureBox pictureBox1; - private \ No newline at end of file + private System.Windows.Forms.Label btnSetConfig; + private DevE \ No newline at end of file diff --git a/插件库/Lskj.Main/FrmLogin.cs b/插件库/Lskj.Main/FrmLogin.cs index e7fb217..845cb68 100644 --- a/插件库/Lskj.Main/FrmLogin.cs +++ b/插件库/Lskj.Main/FrmLogin.cs @@ -68,6 +68,8 @@ namespace Lskj.Main (?=.*[^a-zA-Z0-9]) #必须包含符号 .{8,18} #至少8个字符,最多18个字符 ", RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace); + + private bool isPlaintextPwd; public FrmLogin() { InitializeComponent(); @@ -258,6 +260,7 @@ namespace Lskj.Main BaseImpl.HasExistsColumn("P_EmployeeTab", "useLanguage", "nvarchar(50)"); arg = " ,useLanguage"; } + //if (BaseImpl.HasExistsColumn("P_EmployeeTab", "DefaultLedger")) // arg += ",DefaultLedger"; BaseImpl.HasExistsColumn("P_SystemTab", "LoginPopupFlag", "int"); @@ -351,9 +354,16 @@ namespace Lskj.Main MessageUtil.Show(ResourceKeys.UpdateAddressIsNull); return; } + string verDesp = string.Empty; + if (BaseImpl.HasExistsTable("p_ErpProUpdateInfo")) + { + string sqlValue = "select top 1 verDesp from p_ErpProUpdateInfo order by updateDate desc"; + verDesp = SqlHelper.ExecuteString("verDesp", sqlValue); + + } bool isUpdateSucess = false; - IAutoUpdater updater = new AutoUpdater(SystemInfo.Instance.UpdateAddress, true); + IAutoUpdater updater = new AutoUpdater(SystemInfo.Instance.UpdateAddress, true,false, verDesp); try { updater.Update(); @@ -1087,6 +1097,10 @@ namespace Lskj.Main { this.forgetPwd.Visible = true;//允许修改密码 } + if (SystemInfo.Instance.ViewPwd) + { + this.checkPwd.Visible = true;//查看密码明文 + } if (SystemInfo.Instance.AutomaticUpdates) { this.chkUpdate.Checked = true; @@ -1838,4 +1852,19 @@ namespace Lskj.Main /// /// 忘记密码点击时 /// - /// + /// + private void OnForgetPwdClick(object sender, EventArgs e) + { + using (BaseForm baseForm = new BaseForm()) + { + FrmWebBrowser frmWebBrowser = new FrmWebBrowser(); + frmWebBrowser.Dock = DockStyle.Fill; + baseForm.Controls.Add(frmWebBrowser); + baseForm.Text = "忘记密码"; + baseForm.Size = new Size(1000, 600); + string forgetPwdUrl = ""; + if (SystemInfo.Instance.OAUrl.EndsWith("/")) + { + forgetPwdUrl = $"{SystemInfo.Instance.OAUrl}lserp_v8/index.html?verify=1"; + } \ No newline at end of file diff --git a/插件库/Lskj.Main/Properties/AssemblyInfo.cs b/插件库/Lskj.Main/Properties/AssemblyInfo.cs index 7750808..3dfbf3f 100644 --- a/插件库/Lskj.Main/Properties/AssemblyInfo.cs +++ b/插件库/Lskj.Main/Properties/AssemblyInfo.cs @@ -7,30 +7,4 @@ using System.Runtime.InteropServices; // 与程序集关联的信息。 [assembly: AssemblyTitle("ERP")] [assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ERP")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// 将 ComVisible 设置为 false 使此程序集中的类型 -// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, -// 则将该类型上的 ComVisible 特性设置为 true。 -[assembly: ComVisible(false)] - -// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID -[assembly: Guid("22c63826-6925-4285-b0f5-e568cbef0d1a")] - -// 程序集的版本信息由下面四个值组成: -// -// 主版本 -// 次版本 -// 内部版本号 -// 修订号 -// -// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, -// 方法是按如下所示使用“*”: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.3.6.90")] -[assembly: AssemblyFileVersion("1.3.6.90")] +[assembly \ No newline at end of file diff --git a/插件库/Lskj.Main/Properties/Resources.Designer.cs b/插件库/Lskj.Main/Properties/Resources.Designer.cs index 8df25ac..d9c7fb1 100644 --- a/插件库/Lskj.Main/Properties/Resources.Designer.cs +++ b/插件库/Lskj.Main/Properties/Resources.Designer.cs @@ -1170,6 +1170,26 @@ namespace Lskj.Main.Properties { } } + /// + /// 查找 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 类型的本地化资源。 / \ No newline at end of file