SVN r1105
SVN-Revision: r1105
This commit is contained in:
@@ -338,6 +338,7 @@ namespace Lskj.Main.Control
|
||||
this.label2.Visible = false;
|
||||
}
|
||||
if (!SystemInfo.Instance.RefreshNotify) this.SetNotifys();
|
||||
|
||||
this.SetHostEntry();
|
||||
// 解析dns
|
||||
new Thread(MainImpl.DnsHostEntry).Start();
|
||||
@@ -1669,7 +1670,7 @@ namespace Lskj.Main.Control
|
||||
if (!isMore)
|
||||
{
|
||||
more = new ToolStripMenuItem();
|
||||
more.Text = "更多";
|
||||
more.Text = Business.Impl.LanguageTranslation.Translatable ? Business.Impl.LanguageTranslation.GetTranslatedText("更多") : "更多";
|
||||
more.Font = new Font("微软雅黑", 12);
|
||||
more.BackColor = Color.Transparent;
|
||||
more.ForeColor = Color.White;
|
||||
@@ -1760,7 +1761,7 @@ namespace Lskj.Main.Control
|
||||
if (!isMore)
|
||||
{
|
||||
more = new ToolStripMenuItem();
|
||||
more.Text = "更多";
|
||||
more.Text = Business.Impl.LanguageTranslation.Translatable ? Business.Impl.LanguageTranslation.GetTranslatedText("更多") : "更多";
|
||||
more.Font = new Font("微软雅黑", 12);
|
||||
more.BackColor = Color.Transparent;
|
||||
more.ForeColor = Color.White;
|
||||
@@ -4560,4 +4561,17 @@ namespace Lskj.Main.Control
|
||||
{
|
||||
bottomLayoutPanel.RowStyles[i].Height = 25;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 判断是不是数值
|
||||
/// </summary>
|
||||
/// <param name="oText"></param>
|
||||
/// <returns></returns>
|
||||
private bool IsNumberic(string oText)
|
||||
{
|
||||
@@ -9,6 +9,7 @@ using System.Windows.Forms;
|
||||
using Lskj.Control;
|
||||
using Lskj.Business.Impl;
|
||||
using Lskj.Util;
|
||||
using Lskj.Business;
|
||||
|
||||
namespace Lskj.Main.Control
|
||||
{
|
||||
@@ -58,24 +59,4 @@ namespace Lskj.Main.Control
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
private void OnMouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private voi
|
||||
@@ -72,6 +72,7 @@ namespace Lskj.Main
|
||||
if (DBConfig.Instance.IsInternalNetwork)
|
||||
{
|
||||
this.radioWithin.Checked = true;
|
||||
if (DBConfig.Instance.ServerName.Equals(DBConfig.Instance.InternalNetworkAddress)) this.txtServerName.Text = DBConfig.Instance.ExternalNetworkAddress;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Generated
+3
-4
@@ -28,7 +28,6 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmLogin));
|
||||
this.lblCopyright = new System.Windows.Forms.Label();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
@@ -48,7 +47,7 @@
|
||||
this.upDateTimeLab = new System.Windows.Forms.Label();
|
||||
this.language = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
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.chkUpdate.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chkClient.Properties)).BeginInit();
|
||||
@@ -294,6 +293,7 @@
|
||||
this.forgetPwd.Size = new System.Drawing.Size(21, 21);
|
||||
this.forgetPwd.TabIndex = 51;
|
||||
this.toolTip.SetToolTip(this.forgetPwd, "忘记密码");
|
||||
this.forgetPwd.Visible = false;
|
||||
this.forgetPwd.Click += new System.EventHandler(this.OnForgetPwdClick);
|
||||
//
|
||||
// toolTip
|
||||
@@ -306,8 +306,7 @@
|
||||
//
|
||||
// FrmLogin
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
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);
|
||||
|
||||
@@ -678,7 +678,11 @@ namespace Lskj.Main
|
||||
|
||||
ERPInfo.Instance.LanguageName = this.language.Text;
|
||||
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参数
|
||||
@@ -694,6 +698,9 @@ namespace Lskj.Main
|
||||
DialogResult result = frmPassword.ShowDialog();
|
||||
isStartMain = result == DialogResult.OK;
|
||||
}
|
||||
//清空临时文件
|
||||
PubUtil.ClearFilesInDirectory(PubUtil.ImageDownloadPath);
|
||||
|
||||
if (isStartMain)
|
||||
{
|
||||
// 检查自动升级
|
||||
|
||||
Generated
+2
-30
@@ -28,9 +28,8 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
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.SuspendLayout();
|
||||
//
|
||||
@@ -43,36 +42,9 @@
|
||||
//
|
||||
this.mainPanelControlEx.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.mainPanelControlEx.Location = new System.Drawing.Point(0, 0);
|
||||
this.mainPanelControlEx.Margin = new System.Windows.Forms.Padding(4);
|
||||
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;
|
||||
//
|
||||
// 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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Generated
+1
-23
@@ -59,6 +59,7 @@
|
||||
//
|
||||
this.pl_bg.BackColor = System.Drawing.Color.Transparent;
|
||||
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.panelControl4);
|
||||
this.pl_bg.Controls.Add(this.plTop);
|
||||
@@ -239,27 +240,4 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -75,6 +75,16 @@ namespace Lskj.Main
|
||||
public FrmSubSystem()
|
||||
{
|
||||
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>
|
||||
/// <para>说明:窗口加载</para>
|
||||
@@ -97,6 +107,15 @@ namespace Lskj.Main
|
||||
|
||||
this.pictureEdit1.Properties.ContextMenu = new ContextMenu();//把菜单类赋格控件
|
||||
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);//如果有自定义别的背景,就拿自定义的
|
||||
if (this.pictureEdit1.Image != Resources.sub_tip_backgound)
|
||||
{
|
||||
@@ -670,31 +689,4 @@ namespace Lskj.Main
|
||||
/// <summary>
|
||||
/// <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
|
||||
}
|
||||
}
|
||||
/// <para
|
||||
@@ -56,6 +56,7 @@ namespace Lskj.Main.Model
|
||||
public static string BsName;
|
||||
public static string BsUrl;
|
||||
public static int isAwaitTime = 10;
|
||||
public static int RefreshTime = 0;
|
||||
/// <summary>
|
||||
/// 默认下载地址
|
||||
/// </summary>
|
||||
@@ -112,13 +113,13 @@ namespace Lskj.Main.Model
|
||||
if (isStart)
|
||||
{
|
||||
// Delphi数据库连接检查
|
||||
//if (DelphiHelper.Delphi_Init(new StringBuilder(DBConfig.Instance.GetDelphiConnection(DBConfig.Instance.dephiConnection))) == 0)
|
||||
//{
|
||||
// MessageUtil.Show(ResourceKeys.UnConnectServer + "[By Delphi]");
|
||||
// SplashForm.HideForm();
|
||||
// RunConfigForm();
|
||||
// return;
|
||||
//}
|
||||
if (DelphiHelper.Delphi_Init(new StringBuilder(DBConfig.Instance.GetDelphiConnection(DBConfig.Instance.dephiConnection))) == 0)
|
||||
{
|
||||
MessageUtil.Show(ResourceKeys.UnConnectServer + "[By Delphi]");
|
||||
SplashForm.HideForm();
|
||||
RunConfigForm();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
SplashForm.HideForm();
|
||||
@@ -161,6 +162,7 @@ namespace Lskj.Main.Model
|
||||
{
|
||||
WhenConstraintLogin();
|
||||
LockApplication();
|
||||
if (SystemInfo.Instance.SubscriptRefreshTime > 0 && !SystemInfo.Instance.RefreshNotify)RefreshSubscript();
|
||||
if (_frmMain != null)
|
||||
{
|
||||
if (ERPInfo.Instance.WatermarkForm != null)
|
||||
@@ -1002,6 +1004,50 @@ namespace Lskj.Main.Model
|
||||
});
|
||||
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>
|
||||
/// url加密
|
||||
/// </summary>
|
||||
@@ -1045,33 +1091,4 @@ 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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user