SVN r1105

SVN-Revision: r1105
This commit is contained in:
cyf
2026-01-30 07:51:20 +00:00
parent 47cf35aa28
commit 0027b1714e
9 changed files with 4671 additions and 4710 deletions
File diff suppressed because it is too large Load Diff
+2 -21
View File
@@ -9,6 +9,7 @@ using System.Windows.Forms;
using Lskj.Control; using Lskj.Control;
using Lskj.Business.Impl; using Lskj.Business.Impl;
using Lskj.Util; using Lskj.Util;
using Lskj.Business;
namespace Lskj.Main.Control namespace Lskj.Main.Control
{ {
@@ -58,24 +59,4 @@ namespace Lskj.Main.Control
MessageUtil.Show(Message, ex.Message); MessageUtil.Show(Message, ex.Message);
} }
} }
private void OnMouseClick(object sender, MouseEventArgs e) private voi
{
try
{
DevExpress.XtraEditors.SimpleButton btn = (DevExpress.XtraEditors.SimpleButton)sender;
this.Hide();
if (MessageUtil.Show("更改分辨率将退回至主界面\r\n是否继续?", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
Lskj.Control.Model.AutoSizeChange.value = Convert.ToDouble(btn.Tag);
IniHelper.Write(string.Format("DefaultControlScaling_{0}", "Save"), btn.Tag.ToString());
_clickEvent(this, e);
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
}
}
+1
View File
@@ -72,6 +72,7 @@ namespace Lskj.Main
if (DBConfig.Instance.IsInternalNetwork) if (DBConfig.Instance.IsInternalNetwork)
{ {
this.radioWithin.Checked = true; this.radioWithin.Checked = true;
if (DBConfig.Instance.ServerName.Equals(DBConfig.Instance.InternalNetworkAddress)) this.txtServerName.Text = DBConfig.Instance.ExternalNetworkAddress;
} }
else else
{ {
+3 -4
View File
@@ -28,7 +28,6 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmLogin)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmLogin));
this.lblCopyright = new System.Windows.Forms.Label(); this.lblCopyright = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox();
@@ -48,7 +47,7 @@
this.upDateTimeLab = new System.Windows.Forms.Label(); this.upDateTimeLab = new System.Windows.Forms.Label();
this.language = new DevExpress.XtraEditors.ComboBoxEdit(); this.language = new DevExpress.XtraEditors.ComboBoxEdit();
this.forgetPwd = new DevExpress.XtraEditors.PictureEdit(); this.forgetPwd = new DevExpress.XtraEditors.PictureEdit();
this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.toolTip = new System.Windows.Forms.ToolTip();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.chkUpdate.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.chkUpdate.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.chkClient.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.chkClient.Properties)).BeginInit();
@@ -294,6 +293,7 @@
this.forgetPwd.Size = new System.Drawing.Size(21, 21); this.forgetPwd.Size = new System.Drawing.Size(21, 21);
this.forgetPwd.TabIndex = 51; this.forgetPwd.TabIndex = 51;
this.toolTip.SetToolTip(this.forgetPwd, "忘记密码"); this.toolTip.SetToolTip(this.forgetPwd, "忘记密码");
this.forgetPwd.Visible = false;
this.forgetPwd.Click += new System.EventHandler(this.OnForgetPwdClick); this.forgetPwd.Click += new System.EventHandler(this.OnForgetPwdClick);
// //
// toolTip // toolTip
@@ -306,8 +306,7 @@
// //
// FrmLogin // FrmLogin
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackgroundImage = global::Lskj.Main.Properties.Resources.newlogin; this.BackgroundImage = global::Lskj.Main.Properties.Resources.newlogin;
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ClientSize = new System.Drawing.Size(664, 451); this.ClientSize = new System.Drawing.Size(664, 451);
+9 -2
View File
@@ -444,7 +444,7 @@ namespace Lskj.Main
string userName = lueUserName.Text.Trim(); string userName = lueUserName.Text.Trim();
string password = txtPassword.Text.Trim(); string password = txtPassword.Text.Trim();
string LoginAccount = string.Empty; string LoginAccount = string.Empty;
string ErrorLogText= string.Empty;//日志记录信息 string ErrorLogText = string.Empty;//日志记录信息
// 设置登录用户信息 // 设置登录用户信息
bool isConstraint = chkLogin.Checked; bool isConstraint = chkLogin.Checked;
if (string.IsNullOrWhiteSpace(userName)) if (string.IsNullOrWhiteSpace(userName))
@@ -678,7 +678,11 @@ namespace Lskj.Main
ERPInfo.Instance.LanguageName = this.language.Text; ERPInfo.Instance.LanguageName = this.language.Text;
LanguageTranslation.GetLanguageComparisonTable();//获取翻译表数据 LanguageTranslation.GetLanguageComparisonTable();//获取翻译表数据
if (!string.IsNullOrWhiteSpace(ERPInfo.Instance.LanguageName)&& !ERPInfo.Instance.LanguageName.Equals("中文"))Localizer.Active = new XtraLocalizer(); if (!string.IsNullOrWhiteSpace(ERPInfo.Instance.LanguageName) && !ERPInfo.Instance.LanguageName.Equals("中文"))
{
Localizer.Active = new XtraLocalizer();
DevExpress.XtraGrid.Localization.GridLocalizer.Active = new XtraGridLocalizer();
}
this.SetDelphiDllParams(); // 设置调用delphi参数 this.SetDelphiDllParams(); // 设置调用delphi参数
@@ -694,6 +698,9 @@ namespace Lskj.Main
DialogResult result = frmPassword.ShowDialog(); DialogResult result = frmPassword.ShowDialog();
isStartMain = result == DialogResult.OK; isStartMain = result == DialogResult.OK;
} }
//清空临时文件
PubUtil.ClearFilesInDirectory(PubUtil.ImageDownloadPath);
if (isStartMain) if (isStartMain)
{ {
// 检查自动升级 // 检查自动升级
+3 -31
View File
@@ -28,9 +28,8 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
this.TheMemoryTest = new System.Windows.Forms.Timer(this.components); this.TheMemoryTest = new System.Windows.Forms.Timer();
this.mainPanelControlEx = new Lskj.Main.Control.MainPanelControlEx(); this.mainPanelControlEx = new Lskj.Main.Control.MainPanelControlEx();
this.SuspendLayout(); this.SuspendLayout();
// //
@@ -43,36 +42,9 @@
// //
this.mainPanelControlEx.Dock = System.Windows.Forms.DockStyle.Fill; this.mainPanelControlEx.Dock = System.Windows.Forms.DockStyle.Fill;
this.mainPanelControlEx.Location = new System.Drawing.Point(0, 0); this.mainPanelControlEx.Location = new System.Drawing.Point(0, 0);
this.mainPanelControlEx.Margin = new System.Windows.Forms.Padding(4);
this.mainPanelControlEx.Name = "mainPanelControlEx"; this.mainPanelControlEx.Name = "mainPanelControlEx";
this.mainPanelControlEx.Size = new System.Drawing.Size(1700, 870); this.mainPanelControlEx.Size = new System.Drawing.Size(1275, 696);
this.mainPanelControlEx.TabIndex = 0; this.mainPanelControlEx.TabIndex = 0;
// //
// FrmMain // FrmMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1700, 870);
this.Controls.Add(this.mainPanelControlEx);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MaximizeBox = false;
this.Name = "FrmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "用户登录";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.FrmMain_Load);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OnClickKeyboard);
this.ResumeLayout(false);
}
#endregion
public Control.MainPanelControlEx mainPanelControlEx;
private System.Windows.Forms.Timer TheMemoryTest;
}
}
+2 -24
View File
@@ -59,6 +59,7 @@
// //
this.pl_bg.BackColor = System.Drawing.Color.Transparent; this.pl_bg.BackColor = System.Drawing.Color.Transparent;
this.pl_bg.BackgroundImage = global::Lskj.Main.Properties.Resources.sub_backgroud; this.pl_bg.BackgroundImage = global::Lskj.Main.Properties.Resources.sub_backgroud;
this.pl_bg.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.pl_bg.Controls.Add(this.plSubPages); this.pl_bg.Controls.Add(this.plSubPages);
this.pl_bg.Controls.Add(this.panelControl4); this.pl_bg.Controls.Add(this.panelControl4);
this.pl_bg.Controls.Add(this.plTop); this.pl_bg.Controls.Add(this.plTop);
@@ -239,27 +240,4 @@
this.panelControl6.ResumeLayout(false); this.panelControl6.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureEdit1.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureEdit1.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.plTop)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.plTop)).EndInit();
this.plTop.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.plBottom)).EndInit();
this.plBottom.ResumeLayout(false);
this.plBottom.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel pl_bg;
private DevExpress.XtraEditors.PanelControl plSubPages;
private DevExpress.XtraEditors.PanelControl panelControl4;
private DevExpress.XtraEditors.PanelControl plSubMenus;
private DevExpress.XtraEditors.PanelControl panelControl6;
private System.Windows.Forms.RichTextBox rtbTip;
private DevExpress.XtraEditors.PictureEdit pictureEdit1;
private DevExpress.XtraEditors.PanelControl plBottom;
private System.Windows.Forms.Label lblTip;
private DevExpress.XtraEditors.PanelControl plTop;
private System.Windows.Forms.Button btnMin;
private System.Windows.Forms.Button btnColse;
}
}
+20 -28
View File
@@ -75,6 +75,16 @@ namespace Lskj.Main
public FrmSubSystem() public FrmSubSystem()
{ {
InitializeComponent(); InitializeComponent();
//if (this.pl_bg != null && !(this.pl_bg is BackgroundPanel))
//{
// this.pl_bg = new BackgroundPanel();
// this.pl_bg.Dock = DockStyle.Fill;
// this.pl_bg.Name = "pl_bg";
// this.Controls.Add(this.pl_bg);
// // 确保pl_bg在最底层,不遮挡其他控件
// this.pl_bg.SendToBack();
//}
} }
/// <summary> /// <summary>
/// <para>说明:窗口加载</para> /// <para>说明:窗口加载</para>
@@ -97,6 +107,15 @@ namespace Lskj.Main
this.pictureEdit1.Properties.ContextMenu = new ContextMenu();//把菜单类赋格控件 this.pictureEdit1.Properties.ContextMenu = new ContextMenu();//把菜单类赋格控件
this.pl_bg.BackgroundImage = BitMapHelper.getBitmap(BitMapEnum.submenubg);//本地拿到自带背景 this.pl_bg.BackgroundImage = BitMapHelper.getBitmap(BitMapEnum.submenubg);//本地拿到自带背景
//pl_bg.BackgroundImageCustom = BitMapHelper.getBitmap(BitMapEnum.submenubg);
//if (this.pl_bg is BackgroundPanel)
//{
// // 从本地获取背景位图并设置到自定义属性
// (pl_bg as BackgroundPanel).BackgroundImageCustom = BitMapHelper.getBitmap(BitMapEnum.submenubg);
//}
this.pictureEdit1.Image = BitMapHelper.getBitmap(BitMapEnum.submenubg_tip);//如果有自定义别的背景,就拿自定义的 this.pictureEdit1.Image = BitMapHelper.getBitmap(BitMapEnum.submenubg_tip);//如果有自定义别的背景,就拿自定义的
if (this.pictureEdit1.Image != Resources.sub_tip_backgound) if (this.pictureEdit1.Image != Resources.sub_tip_backgound)
{ {
@@ -670,31 +689,4 @@ namespace Lskj.Main
/// <summary> /// <summary>
/// <para>说明:鼠标移动</para> /// <para>说明:鼠标移动</para>
/// <para>创建人:龚宇超</para> /// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-08-14 </para> /// <para
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs"/> instance containing the event data.</param>
private void plTop_MouseMove(object sender, MouseEventArgs e)
{
try
{
base.OnMouseMove(e);
if (_isMouseDown && e.Button == MouseButtons.Left)
{
this.Location = new Point(Location.X + (e.X - _mousePostion.X), Location.Y + (e.Y - _mousePostion.Y));
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
#endregion
}
}
+54 -37
View File
@@ -56,6 +56,7 @@ namespace Lskj.Main.Model
public static string BsName; public static string BsName;
public static string BsUrl; public static string BsUrl;
public static int isAwaitTime = 10; public static int isAwaitTime = 10;
public static int RefreshTime = 0;
/// <summary> /// <summary>
/// 默认下载地址 /// 默认下载地址
/// </summary> /// </summary>
@@ -112,13 +113,13 @@ namespace Lskj.Main.Model
if (isStart) if (isStart)
{ {
// Delphi数据库连接检查 // Delphi数据库连接检查
//if (DelphiHelper.Delphi_Init(new StringBuilder(DBConfig.Instance.GetDelphiConnection(DBConfig.Instance.dephiConnection))) == 0) if (DelphiHelper.Delphi_Init(new StringBuilder(DBConfig.Instance.GetDelphiConnection(DBConfig.Instance.dephiConnection))) == 0)
//{ {
// MessageUtil.Show(ResourceKeys.UnConnectServer + "[By Delphi]"); MessageUtil.Show(ResourceKeys.UnConnectServer + "[By Delphi]");
// SplashForm.HideForm(); SplashForm.HideForm();
// RunConfigForm(); RunConfigForm();
// return; return;
//} }
SplashForm.HideForm(); SplashForm.HideForm();
@@ -161,6 +162,7 @@ namespace Lskj.Main.Model
{ {
WhenConstraintLogin(); WhenConstraintLogin();
LockApplication(); LockApplication();
if (SystemInfo.Instance.SubscriptRefreshTime > 0 && !SystemInfo.Instance.RefreshNotify)RefreshSubscript();
if (_frmMain != null) if (_frmMain != null)
{ {
if (ERPInfo.Instance.WatermarkForm != null) if (ERPInfo.Instance.WatermarkForm != null)
@@ -1002,6 +1004,50 @@ namespace Lskj.Main.Model
}); });
thread.Start(); thread.Start();
} }
/// <summary>
/// 刷新数量角标
/// </summary>
private static void RefreshSubscript()
{
Thread thread = new Thread(() =>
{
while (SystemInfo.Instance.SubscriptRefreshTime > 0)
{
if (RefreshTime >= SystemInfo.Instance.SubscriptRefreshTime)
{
RefreshTime = 0;
if (_frmMain != null && _frmMain.Visible == true)
{
XtraTabPage tabPage = _frmMain.mainPanelControlEx.tabMain.SelectedTabPage;
if (tabPage.TabIndex == 0)
{
if (!SystemInfo.Instance.RefreshNotify)
{
Thread threadnew = new Thread(_frmMain.mainPanelControlEx.RefreshSubscript);
threadnew.IsBackground = true;
threadnew.Start();
}
}
}
}
RefreshTime += 1;
Thread.Sleep(60000);
}
});
thread.Start();
}
/// <summary> /// <summary>
/// url加密 /// url加密
/// </summary> /// </summary>
@@ -1045,33 +1091,4 @@ namespace Lskj.Main.Model
{ {
DateTime dateTime = DateTime.Now.AddDays(1); DateTime dateTime = DateTime.Now.AddDays(1);
DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
long timestamp = (dateTime.Ticks - epoch.Ticks) / TimeSpan.TicksPerSecond;
pms.Add("exp", timestamp);
}
return $"{urlParams[0]}?pms={HttpUtility.UrlEncode(hasEn ? Lskj.Web.Core.Util.safety.AESUtil.Encrypt(JSON.Encode(pms), enVal) : Lskj.Web.Core.Util.safety.AESUtil.MobileEncrypt(JSON.Encode(pms)))}&{qpLS.SJoin("&")}";
}
return url;
}
/// <summary>
/// 退出主程序,进入登录界面
/// </summary>
public static void ReLogin()
{
if (_frmMain != null)
{
if (ERPInfo.Instance.WatermarkForm != null)
{
ERPInfo.Instance.WatermarkForm.Close();
ERPInfo.Instance.WatermarkForm.Dispose();
}
_frmMain.Close();
_frmMain.Dispose();
_frmMain = null;
}
StartForm();
}
}
}