提交当前本机整理版本

This commit is contained in:
cyf
2026-07-02 10:11:39 +00:00
parent c10a5d64c7
commit aacefa24f8
822 changed files with 196665 additions and 14263 deletions
+36 -1
View File
@@ -1,4 +1,39 @@
namespace Lskj.Main.Control
{
partial
partial class BackgroundPanel
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
this.ResumeLayout(false);
}
#endregion
}
}
+25 -1
View File
@@ -46,4 +46,28 @@ namespace Lskj.Main.Control
// 1. 计算等比缩放比例(以Panel的ClientSize为基准)
float scaleX = (float)this.ClientSize.Width / _originalBackgroundImage.Width;
float scaleY = (float)this.ClientSize.Height / _originalBackgroundImage.Height;
float scale = Math.Min(scaleX, sc
float scale = Math.Min(scaleX, scaleY); // 取较小值,避免图片超出Panel
// 2. 计算图片绘制的位置(居中显示)
int newWidth = (int)(_originalBackgroundImage.Width * scale);
int newHeight = (int)(_originalBackgroundImage.Height * scale);
int x = (this.ClientSize.Width - newWidth) / 2;
int y = (this.ClientSize.Height - newHeight) / 2;
// 3. 高质量绘制图片(抗锯齿、高清缩放)
e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
e.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
e.Graphics.DrawImage(_originalBackgroundImage, new Rectangle(x, y, newWidth, newHeight));
}
// Panel大小变化时触发重绘
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
Invalidate(); // 标记控件需要重绘
}
}
}
+27 -1
View File
@@ -53,4 +53,30 @@
this.lbl_mark_num.AutoSize = true;
this.lbl_mark_num.BackColor = System.Drawing.Color.Red;
this.lbl_mark_num.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbl_mark_num.Fore
this.lbl_mark_num.ForeColor = System.Drawing.Color.White;
this.lbl_mark_num.Location = new System.Drawing.Point(3, 6);
this.lbl_mark_num.Name = "lbl_mark_num";
this.lbl_mark_num.Size = new System.Drawing.Size(19, 12);
this.lbl_mark_num.TabIndex = 6;
this.lbl_mark_num.Text = "99";
this.lbl_mark_num.Visible = false;
//
// CornerLab
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.lbl_mark_num);
this.Controls.Add(this.cb_mark);
this.Name = "CornerLab";
this.Size = new System.Drawing.Size(24, 24);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.MenuItem_Paint);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private Lskj.Control.CircleButton cb_mark;
private System.Windows.Forms.Label lbl_mark_num;
}
}
+26 -1
View File
@@ -72,4 +72,29 @@ namespace Lskj.Main.Control
this.whiteLab.BackColor = System.Drawing.Color.White;
this.whiteLab.Dock = System.Windows.Forms.DockStyle.Left;
this.whiteLab.Location = new System.Drawing.Point(0, 0);
this.whiteLab.Nam
this.whiteLab.Name = "whiteLab";
this.whiteLab.Size = new System.Drawing.Size(20, 26);
this.whiteLab.TabIndex = 1;
//
// GroupControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.menuMainPanel);
this.Controls.Add(this.topTipsPanel);
this.Margin = new System.Windows.Forms.Padding(0);
this.Name = "GroupControl";
this.Padding = new System.Windows.Forms.Padding(0, 16, 0, 0);
this.Size = new System.Drawing.Size(757, 323);
this.topTipsPanel.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel topTipsPanel;
private System.Windows.Forms.Label tipsLab;
private System.Windows.Forms.Panel menuMainPanel;
private System.Windows.Forms.Label whiteLab;
}
}
Binary file not shown.
+25 -1
View File
@@ -197,4 +197,28 @@ namespace Lskj.Main.Control
this.Margin = new System.Windows.Forms.Padding(0);
this.Name = "GroupPage";
this.Size = new System.Drawing.Size(803, 576);
this.allPanel.ResumeLayout(fals
this.allPanel.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panelSplit.ResumeLayout(false);
this.topTipsPanel.ResumeLayout(false);
this.collectPanel.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel allPanel;
private System.Windows.Forms.Panel allMenuPanel;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label allTipsLab;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Panel panelSplit;
private System.Windows.Forms.Label labelSplit;
private System.Windows.Forms.Label labelSplitTop;
private System.Windows.Forms.Panel topTipsPanel;
private System.Windows.Forms.Label collectTipsLab;
private System.Windows.Forms.Label whiteLab;
private System.Windows.Forms.Panel collectMenuPanel;
private System.Windows.Forms.Panel collectPanel;
}
}
Binary file not shown.
+20 -1
View File
@@ -1276,4 +1276,23 @@
private System.Windows.Forms.Panel pl_center_main_bottom_right_main;
private System.Windows.Forms.Panel panel6;
private System.Windows.Forms.Label lblShortcutset;
private System.Windows.
private System.Windows.Forms.FlowLayoutPanel pl_center_main_middle_FlowLayout;
private System.Windows.Forms.Label lblMenuTitle2;
private AwaitScreenControl awaitScreenControl;
private System.Windows.Forms.Panel pl_center_left;
private System.Windows.Forms.Panel allPanel;
private System.Windows.Forms.Panel allMenuPanel;
private System.Windows.Forms.Panel botTipsPanel;
private System.Windows.Forms.Label allTipsLab;
private System.Windows.Forms.Panel panelSplit;
private System.Windows.Forms.Label labelSplit;
private System.Windows.Forms.Label labelSplitTop;
private System.Windows.Forms.Panel collectPanel;
private System.Windows.Forms.Panel topTipsPanel;
private System.Windows.Forms.Label collectTipsLab;
private System.Windows.Forms.Panel collectMenuPanel;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label whiteLab;
private TreeViewCustom tv_left;
}
}
File diff suppressed because it is too large Load Diff
+29 -1
View File
@@ -73,4 +73,32 @@
this.cb_mark.ForeColor = System.Drawing.Color.White;
this.cb_mark.ImageHover = null;
this.cb_mark.ImageNormal = null;
this.cb_mark.Location = new System.Drawing.Point(75
this.cb_mark.Location = new System.Drawing.Point(75, 6);
this.cb_mark.Name = "cb_mark";
this.cb_mark.Number = 0;
this.cb_mark.Radius = 10;
this.cb_mark.TabIndex = 4;
this.cb_mark.UseVisualStyleBackColor = false;
this.cb_mark.Visible = false;
//
// Menu_Item
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.cb_mark);
this.Controls.Add(this.btn_item_img);
this.Controls.Add(this.btn_item_title);
this.Name = "Menu_Item";
this.Size = new System.Drawing.Size(110, 127);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btn_item_img;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.Label btn_item_title;
private Lskj.Control.CircleButton cb_mark;
}
}
+27 -1
View File
@@ -203,4 +203,30 @@ namespace Lskj.Main.Control
System.Drawing.Drawing2D.GraphicsPath oPath = new System.Drawing.Drawing2D.GraphicsPath();
int x = 0;
int y = 0;
int thisWi
int thisWidth = this.Width;
int thisHeight = this.Height;
int angle = _radius;
if (angle > 0)
{
System.Drawing.Graphics g = CreateGraphics();
oPath.AddArc(x, y, angle, angle, 180, 90); // 左上角
oPath.AddArc(thisWidth - angle, y, angle, angle, 270, 90); // 右上角
oPath.AddArc(thisWidth - angle, thisHeight - angle, angle, angle, 0, 90); // 右下角
oPath.AddArc(x, thisHeight - angle, angle, angle, 90, 90); // 左下角
oPath.CloseAllFigures();
Region = new System.Drawing.Region(oPath);
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
}
}
+25 -1
View File
@@ -86,4 +86,28 @@
// Menu_ItemNew
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.Controls.Add(this.badgeDot);
this.Controls.Add(this.btn_icon);
this.Controls.Add(this.badgeNum);
this.Controls.Add(this.lbl_title);
this.Controls.Add(this.lbl_sub);
this.DoubleBuffered = true;
this.Margin = new System.Windows.Forms.Padding(0);
this.Name = "Menu_ItemNew";
this.Size = new System.Drawing.Size(240, 70);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.Button btn_icon;
private Lskj.Control.CircleButton badgeDot;
private System.Windows.Forms.Label badgeNum;
private System.Windows.Forms.Label lbl_title;
private System.Windows.Forms.Label lbl_sub;
}
}
+29 -1
View File
@@ -119,4 +119,32 @@ namespace Lskj.Main.Control
if (ClientRectangle.Contains(PointToClient(System.Windows.Forms.Control.MousePosition))) return;
_isHover = false;
//BackColor = _normalBack;
btn_icon.BackgroundImage = _imgDefault;
this.BackgroundImage = null;
Invalidate();
Update();
}
private void BindHover(System.Windows.Forms.Control ctl)
{
ctl.MouseEnter += HoverEnter;
ctl.MouseLeave += HoverLeave;
}
/* ===== 角标定位 ===== */
protected override void OnResize(EventArgs e)
{ base.OnResize(e); RepositionBadge(); }
private void RepositionBadge()
{
if (!badgeDot.Visible) return;
const int SAFE = 2; // 距离边缘 2px
//badgeDot.Location = new Point(
// Math.Min(btn_icon.Right - badgeDot.Width / 2, Width - badgeDot.Width - SAFE),
// Math.Max(btn_icon.Top - badgeDot.Height / 2, SAFE));
/* 数字已 Dock/Size 居中,无需再调位置,但保证层级 */
badgeDot.BringToFront();
badgeNum.BringToFront();
}
}
}
+22 -1
View File
@@ -59,4 +59,25 @@ namespace Lskj.Main.Control
MessageUtil.Show(Message, ex.Message);
}
}
private voi
private void OnMouseClick(object sender, MouseEventArgs e)
{
try
{
DevExpress.XtraEditors.SimpleButton btn = (DevExpress.XtraEditors.SimpleButton)sender;
this.Hide();
string text = !string.IsNullOrWhiteSpace(SystemInfo.Instance.ResSwitchingPrompt) ? SystemInfo.Instance.ResSwitchingPrompt : "更改分辨率将退回至主界面\r\n是否继续?";
if (MessageUtil.Show(text, 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);
}
}
}
}
+27 -1
View File
@@ -67,4 +67,30 @@ namespace Lskj.Main.Control
// label
//
this.label.Dock = System.Windows.Forms.DockStyle.Fill;
thi
this.label.Location = new System.Drawing.Point(41, 0);
this.label.Name = "label";
this.label.Size = new System.Drawing.Size(121, 42);
this.label.TabIndex = 5;
this.label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// SimpleControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoSize = true;
this.Controls.Add(this.label);
this.Controls.Add(this.circleButton);
this.Controls.Add(this.picBox);
this.Name = "SimpleControl";
this.Size = new System.Drawing.Size(204, 42);
((System.ComponentModel.ISupportInitialize)(this.picBox)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.PictureBox picBox;
private Lskj.Control.CircleButton circleButton;
private System.Windows.Forms.Label label;
}
}
Binary file not shown.
+24 -1
View File
@@ -191,4 +191,27 @@
this.Name = "FrmConfig";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "数据库连接配置";
this.Load += new Syste
this.Load += new System.EventHandler(this.FrmConfig_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private DevExpress.XtraEditors.LabelControl labelControl2;
private DevExpress.XtraEditors.SimpleButton btnConnect;
private System.Windows.Forms.TextBox txtDBName;
private System.Windows.Forms.TextBox txtServerName;
private DevExpress.XtraEditors.SimpleButton btnSave;
private DevExpress.XtraEditors.SimpleButton btnExit;
private System.Windows.Forms.TextBox txtServerNameInternal;
private System.Windows.Forms.RadioButton radioOutside;
private System.Windows.Forms.RadioButton radioWithin;
private System.Windows.Forms.ComboBox serverType;
private DevExpress.XtraEditors.LabelControl labelControl1;
}
}
+31 -1
View File
@@ -207,4 +207,34 @@ namespace Lskj.Main
{
if (!DBConfig.Instance.ServerType.Equals("达梦数据库"))
{
if (DelphiHelper.Delphi_Init(new StringBuilder(DBConfig.Instance.Get
if (DelphiHelper.Delphi_Init(new StringBuilder(DBConfig.Instance.GetDelphiConnection())) == 0)
{
MessageUtil.Show(ResourceKeys.UnConnectServer + "[By Delphi]");
return;
}
}
if (isSave)
{
DBConfig.Instance.WriteConfig();
this.DialogResult = DialogResult.OK;
this.Close();
}
else
{
MessageUtil.Show(ResourceKeys.ConnectSuccess);
}
}
else
{
MessageUtil.Show(ResourceKeys.ConnectFault);
}
//IniHelper.Write("SystemResources.ini", "FrmConfigFlag", "0");
}
catch (Exception)
{
MessageUtil.Show(ResourceKeys.ConnectFault);
}
}
}
}
+31 -1
View File
@@ -255,4 +255,34 @@ namespace Lskj.Main
DBConfig.Instance.WriteConfig("LocalLastIP", this.txtIP.Text);
DBConfig.Instance.WriteConfig("LocalLastPort", this.txtPort.Text);
DBConfig.Instance.WriteConfig("LocalLastPortName", this.txtZTName.Text);
t
this.DialogResult = DialogResult.OK;
this.Close();
}
else
{
MessageUtil.Show("请设置账套名!");
}
}
else
{
MessageUtil.Show(ResourceKeys.ConnectSuccess);
}
}
else
{
MessageUtil.Show(ResourceKeys.ConnectFault);
}
}
else
{
MessageUtil.Show(ResourceKeys.ConnectFault);
}
//IniHelper.Write("SystemResources.ini", "FrmConfigFlag", "1");
}
catch (Exception)
{
MessageUtil.Show(ResourceKeys.ConnectFault);
}
}
}
}
+30 -1
View File
@@ -150,4 +150,33 @@ namespace Lskj.Main
if (this.frmConfigBtn.Checked)
{
this.Hide();
FrmConfig frmConfig = new FrmConfig();
dialogResult = frmConfig.ShowDialog();
if (dialogResult == DialogResult.OK)
{
IniHelper.Write("SystemResources.ini", "FrmConfigFlag", "0");
}
this.Show();
}
else if (this.frmConfigLocalBtn.Checked)
{
this.Hide();
FrmConfigLocal frmConfigLocal = new FrmConfigLocal();
dialogResult = frmConfigLocal.ShowDialog();
if (dialogResult == DialogResult.OK)
{
IniHelper.Write("SystemResources.ini", "FrmConfigFlag", "1");
}
this.Show();
}
else
{
dialogResult = DialogResult.Cancel;
}
if (dialogResult == DialogResult.OK)
{
this.DialogResult = dialogResult;
}
}
}
}
+19 -1
View File
@@ -381,4 +381,22 @@
private System.Windows.Forms.Label lblCopyright;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label btnSetConfig;
private DevE
private DevExpress.XtraEditors.CheckEdit chkUpdate;
private DevExpress.XtraEditors.CheckEdit chkClient;
private DevExpress.XtraEditors.CheckEdit chkLogin;
private DevExpress.XtraEditors.TextEdit txtPassword;
private System.Windows.Forms.Button btnColse;
private DevExpress.XtraEditors.ComboBoxEdit cbLedger;
private Lskj.Control.AutoGridLookUp lueUserName;
private DevExpress.XtraGrid.Views.Grid.GridView autoGridLookUpEdit1View;
private DevExpress.XtraEditors.CheckEdit chkNotice;
private System.Windows.Forms.Panel plTop;
private System.Windows.Forms.PictureBox btnLogin;
private DevExpress.XtraEditors.CheckEdit chkRemPwd;
private System.Windows.Forms.Label upDateTimeLab;
private DevExpress.XtraEditors.ComboBoxEdit language;
private DevExpress.XtraEditors.PictureEdit forgetPwd;
private System.Windows.Forms.ToolTip toolTip;
private DevExpress.XtraEditors.PictureEdit checkPwd;
}
}
+37 -7
View File
@@ -264,9 +264,10 @@ namespace Lskj.Main
}
if (!string.IsNullOrWhiteSpace(SystemInfo.Instance.LoginUsername))
if (!string.IsNullOrWhiteSpace(SystemInfo.Instance.LoginUsername)&& BaseImpl.HasExistsColumn("P_EmployeeTab", SystemInfo.Instance.LoginUsername))
{
this.DisplayName= SystemInfo.Instance.LoginUsername;
arg+= " ,"+ this.DisplayName;
}
//if (BaseImpl.HasExistsColumn("P_EmployeeTab", "DefaultLedger"))
@@ -274,7 +275,7 @@ namespace Lskj.Main
BaseImpl.HasExistsColumn("P_SystemTab", "LoginPopupFlag", "int");
lueUserName.Focus();
lueUserName.ValueField = lueUserName.ValueMember = "UserId";
lueUserName.TextMember = "UserName";
lueUserName.TextMember = this.DisplayName;
lueUserName.SourceSQL = string.Format("select EmployeeId UserId,LoginAccount UserCode,EmployeeName UserName {0} from P_EmployeeTab WHERE sign=0 and UseFlag=1", arg);
if (SystemInfo.Instance.DisplayUserCode)
@@ -291,7 +292,7 @@ namespace Lskj.Main
lueUserName.AutoShowPopup = "1".Equals(BaseImpl.GetResult("SELECT LoginPopupFlag FROM P_SystemTab") + "");
DataRow[] rowItems = _userTable.Select(" UserName = '" + DBConfig.Instance.LoginName + "'");
DataRow[] rowItems = _userTable.Select(" "+ DisplayName + " = '" + DBConfig.Instance.LoginName + "'");
DataRow[] rowItemsUserCode = _userTable.Select(" UserCode = '" + DBConfig.Instance.LoginName + "'");
if (rowItems != null && rowItems.Length > 0)
{
@@ -515,7 +516,7 @@ namespace Lskj.Main
MessageUtil.Show(responseinfo.msg);
return isLoginSucess;
}
DataRow[] drRows = table.Select("UserName='" + userName + "' or UserCode='" + userName + "'");//找到所有UserNAme或UserCode为xxx的用户
DataRow[] drRows = table.Select(""+DisplayName+"='" + userName + "' or UserCode='" + userName + "'");//找到所有UserNAme或UserCode为xxx的用户
if ((drRows == null) || (drRows.Count() < 1))
{
MessageUtil.Show(ResourceKeys.NameOrPasswordError);
@@ -1694,7 +1695,7 @@ namespace Lskj.Main
if (this.language.Visible)
{
DataTable dataTable = this.lueUserName.DataSource as DataTable;
DataRow[] array = dataTable.Select("UserName='" + UserName + "'");
DataRow[] array = dataTable.Select(""+DisplayName+"='" + UserName + "'");
DataRow dataRow = array.Length > 0 ? array[0] : null;
if (dataRow != null && !string.IsNullOrWhiteSpace(dataRow["useLanguage"] + ""))
{
@@ -1724,7 +1725,7 @@ namespace Lskj.Main
if (SystemInfo.Instance.AccountSwitchingRestrictions > 0)
{
DataTable dataTable = this.lueUserName.DataSource as DataTable;
DataRow[] array = dataTable.Select("UserName='" + UserName + "'");
DataRow[] array = dataTable.Select("" + DisplayName + "='" + UserName + "'");
DataRow dataRow = array.Length > 0 ? array[0] : null;
if (dataRow != null)
{
@@ -1890,4 +1891,33 @@ namespace Lskj.Main
if (SystemInfo.Instance.OAUrl.EndsWith("/"))
{
forgetPwdUrl = $"{SystemInfo.Instance.OAUrl}lserp_v8/index.html?verify=1";
}
}
else
{
forgetPwdUrl = $"{SystemInfo.Instance.OAUrl}/lserp_v8/index.html?verify=1";
}
frmWebBrowser.FrmLoad(forgetPwdUrl, 1, false);
baseForm.ShowDialog();
}
}
private void OnCheckPwdClick(object sender, EventArgs e)
{
if (isPlaintextPwd)
{
//加密
txtPassword.Properties.PasswordChar = '*';
checkPwd.Image = Properties.Resources.; // 睁眼图标
toolTip.SetToolTip(checkPwd, "显示密码");
}
else
{
//明文显示
txtPassword.Properties.PasswordChar = '\0';
checkPwd.Image = Properties.Resources.; // 睁眼图标
toolTip.SetToolTip(checkPwd, "隐藏密码");
}
isPlaintextPwd = !isPlaintextPwd;
}
}
}
+25 -1
View File
@@ -47,4 +47,28 @@
this.mainPanelControlEx.TabIndex = 0;
//
// FrmMain
//
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1275, 696);
this.Controls.Add(this.mainPanelControlEx);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
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;
}
}
+44 -1
View File
@@ -755,4 +755,47 @@ namespace Lskj.Main
Screen screen = Screen.FromPoint(System.Windows.Forms.Control.MousePosition);
Rectangle workingArea = screen.WorkingArea;
int width = this.Width;
int height = this.Height;
if (width > workingArea.Width)
{
width = workingArea.Width;
}
if (height > workingArea.Height)
{
height = workingArea.Height;
}
int left = this.Left;
int top = this.Top;
if (left < workingArea.Left)
{
left = workingArea.Left;
}
if (top < workingArea.Top)
{
top = workingArea.Top;
}
if (left + width > workingArea.Right)
{
left = workingArea.Right - width;
}
if (top + height > workingArea.Bottom)
{
top = workingArea.Bottom - height;
}
this.MaximumSize = workingArea.Size;
this.Bounds = new Rectangle(left, top, width, height);
}
}
}
+32 -1
View File
@@ -131,4 +131,35 @@ namespace Lskj.Main
ERPInfo.Instance.Password = SHAHelper.EncryptPassword(pass_after);
ERPInfo.Instance.InPassWord = pass_after;
MainImpl.RecordPassword(pass_after);
this.
this.DialogResult = DialogResult.OK;
break;
}
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show("修改密码出错!" + Message);
}
}
/// <summary>
/// <para>说明:取消修改</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-08-12 </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="EventArgs"/> instance containing the event data.</param>
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
+24 -1
View File
@@ -240,4 +240,27 @@
this.panelControl6.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureEdit1.Properties)).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;
}
}
+28 -1
View File
@@ -689,4 +689,31 @@ namespace Lskj.Main
/// <summary>
/// <para>说明:鼠标移动</para>
/// <para>创建人:龚宇超</para>
/// <para
/// <para>创建日期:2017-08-14 </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
}
}
+26 -1
View File
@@ -638,4 +638,29 @@ namespace Lskj.Main
ADUtil.ADPwd = SystemInfo.Instance.ADPwd;
if (string.IsNullOrEmpty(ADUtil.ADPath))
{
//responseinfo.msg = "AD域配置不正确,请检
//responseinfo.msg = "AD域配置不正确,请检查!";
return false;
}
}
if (ADUtil.ADLogin == true)
{
LoginResult result = ADUtil.LoginByAccount(LoginAccount, Pwd);
responseinfo.success = true;
if (result != LoginResult.LOGIN_USER_OK)
{
responseinfo.success = false;
switch (result)
{
case LoginResult.LOGIN_USER_ACCOUNT_INACTIVE: responseinfo.msg = "登录失败,用户账号被禁用!"; break;
case LoginResult.LOGIN_USER_PASSWORD_INCORRECT: responseinfo.msg = "登录失败,用户密码不正确!"; break;
case LoginResult.LOGIN_USER_DOESNT_EXIST: responseinfo.msg = "登录失败,用户不存在!"; break;
}
return false;
}
return true;
}
return false;
}
}
}
+32 -1
View File
@@ -128,4 +128,35 @@ namespace Lskj.Main
//Manager.ReStartMain(true);
break;
case 2: // 旧密码不正确.
Messag
MessageUtil.Show(ResourceKeys.OldPasswordFault);
break;
}
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show("修改密码出错!" + Message);
}
}
/// <summary>
/// <para>说明:退出修改</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-08-15 </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="EventArgs"/> instance containing the event data.</param>
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
+35 -1
View File
@@ -227,4 +227,38 @@ namespace Lskj.Main
// for (int i = 30; i < this.Height - 40; i=i+200)
// {
// for (int j = 40; j < this.Width - 40; j = j + 250)
// {
// graphicsText.DrawString(content, new Font("宋体", 15, FontStyle.Bold), brush, new PointF(j,i), format, -30f);
// }
// }
// e.Graphics.TranslateTransform(x, y);
// e.Graphics.RotateTransform(-20f);
//}
e.Graphics.ResetTransform();
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
//MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
/// 鼠标穿透水印操作下方
/// </summary>
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x00000020; // 设置 WS_EX_TRANSPARENT 样式
return cp;
}
}
}
}
-2
View File
@@ -571,11 +571,9 @@
</PostBuildEvent>
</PropertyGroup>
<!--添加大内存处理-->
<!--
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="&quot;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\editbin.exe&quot; /largeaddressaware &quot;$(TargetPath)&quot;" />
</Target>
-->
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
+30 -1
View File
@@ -1093,4 +1093,33 @@ namespace Lskj.Main.Model
{
DateTime dateTime = DateTime.Now.AddDays(1);
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();
}
}
}
+35 -1
View File
@@ -227,4 +227,38 @@ namespace Lskj.Main
key.SetValue("", $"\"{exePath}\" \"%1\"");
}
}
catch (Exception ex
catch (Exception ex)
{
}
}
private static void Unregister()
{
Registry.CurrentUser.DeleteSubKeyTree(@"Software\Classes\lserp", false);
}
#endregion
//public static Form GetForm()
//{
// Form X = new CEFdemo.Form1();
// return X;
//}
public class Messager : IMessageFilter
{
public bool PreFilterMessage(ref Message m)
{
//如果检测到有鼠标或则键盘的消息,则使计数为0.....
if (m.Msg == 0x0200 || m.Msg == 0x0201 || m.Msg == 0x0204 || m.Msg == 0x0207)
{
Manager.isAwaitTime = 0;
}
if (m.Msg == 0x0100 && m.WParam != new IntPtr(0x0000001b) && Lskj.Model.ERPInfo.Instance.IsExecute)
{
return true;
}
return false;
}
}
}
}
+27 -1
View File
@@ -7,4 +7,30 @@ using System.Runtime.InteropServices;
// 与程序集关联的信息。
[assembly: AssemblyTitle("ERP")]
[assembly: AssemblyDescription("")]
[assembly
[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.7.00")]
[assembly: AssemblyFileVersion("1.3.7.00")]
+29 -1
View File
@@ -1192,4 +1192,32 @@ namespace Lskj.Main.Properties {
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/
/// </summary>
internal static System.Drawing.Bitmap {
get {
object obj = ResourceManager.GetObject("小红点", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap {
get {
object obj = ResourceManager.GetObject("忘记密码", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap {
get {
object obj = ResourceManager.GetObject("登录", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}
@@ -0,0 +1,5 @@
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.GridLookUpEdit, DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB