diff --git a/插件库/Lskj.Main/FrmLogin.cs b/插件库/Lskj.Main/FrmLogin.cs index 845cb68..1104b26 100644 --- a/插件库/Lskj.Main/FrmLogin.cs +++ b/插件库/Lskj.Main/FrmLogin.cs @@ -1180,6 +1180,21 @@ namespace Lskj.Main this.SetLanguage(); this.SetLedgers(); this.SetUsers(); + + //弹出提示框 + if (SystemInfo.Instance.LoginAnnouncement) + { + if (BaseImpl.HasExistsTable("p_ErpProUpdateInfo")&& BaseImpl.HasExistsColumn("p_ErpProUpdateInfo", "AnnouncementDisplay")) + { + bool result = "1".Equals(BaseImpl.GetResult("select 1 from p_ErpProUpdateInfo where AnnouncementDisplay=1 order by updateDate desc") + ""); + if (result) + { + FrmAnnouncement frmAnnouncement = new FrmAnnouncement(); + frmAnnouncement.ShowDialog(); + } + } + } + } catch (Exception ex) { diff --git a/插件库/Lskj.Main/FrmMain.cs b/插件库/Lskj.Main/FrmMain.cs index 9ab6d0d..d05e1e5 100644 --- a/插件库/Lskj.Main/FrmMain.cs +++ b/插件库/Lskj.Main/FrmMain.cs @@ -447,6 +447,12 @@ namespace Lskj.Main { try { + if (this.WindowState == FormWindowState.Normal) + { + EnsureFormInCurrentScreen(); + //Screen screen = Screen.FromControl(this); + //this.MaximumSize = screen.WorkingArea.Size; + } this.WindowState = this.WindowState == FormWindowState.Normal ? FormWindowState.Maximized : FormWindowState.Normal; if (this.WindowState == FormWindowState.Maximized) { @@ -585,6 +591,10 @@ namespace Lskj.Main base.OnMouseUp(e); _isMouseDown = false; //this.Focus(); + if (this.WindowState == FormWindowState.Normal) + { + EnsureFormInCurrentScreen(); + } this.mainPanelControlEx.pic_search.Focus();//点击界面失去焦点 } catch (Exception ex) @@ -677,4 +687,49 @@ namespace Lskj.Main public uint dwActiveProcessorMask; public uint dwNumberOfProcessors; public uint dwProcessorType; - public uint dwAllocationGra \ No newline at end of file + public uint dwAllocationGranularity; + public uint dwProcessorLevel; + public uint dwProcessorRevision; + } + //定义内存的信息结构 + [StructLayout(LayoutKind.Sequential)] + public struct MEMORY_INFO + { + public uint dwLength; + public uint dwMemoryLoad; + public uint dwTotalPhys; + public uint dwAvailPhys; + public uint dwTotalPageFile; + public uint dwAvailPageFile; + public uint dwTotalVirtual; + public uint dwAvailVirtual; + } + //定义系统时间的信息结构 + [StructLayout(LayoutKind.Sequential)] + public struct SYSTEMTIME_INFO + { + public ushort wYear; + public ushort wMonth; + public ushort wDayOfWeek; + public ushort wDay; + public ushort wHour; + public ushort wMinute; + public ushort wSecond; + public ushort wMilliseconds; + } + + + /// + /// 多屏时设置程序大小 + /// + private void EnsureFormInCurrentScreen() + { + if (this.WindowState != FormWindowState.Normal) + { + return; + } + + Screen screen = Screen.FromPoint(System.Windows.Forms.Control.MousePosition); + Rectangle workingArea = screen.WorkingArea; + + \ No newline at end of file diff --git a/插件库/Lskj.Main/Program.cs b/插件库/Lskj.Main/Program.cs index 83950db..8818712 100644 --- a/插件库/Lskj.Main/Program.cs +++ b/插件库/Lskj.Main/Program.cs @@ -38,7 +38,6 @@ namespace Lskj.Main [STAThread] static void Main(string[] args) { - //SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2); CefRuntime.Load();//cef浏览器模块设置加载 var mainArgs = new CefMainArgs(args); @@ -62,7 +61,7 @@ namespace Lskj.Main try { // 汉化DevExpress界面 - Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh-CH"); + Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh-CN"); // 设置皮肤 BonusSkins.Register(); SkinManager.EnableFormSkins(); @@ -223,36 +222,4 @@ namespace Lskj.Main } using (var key = Registry.CurrentUser.CreateSubKey(@"Software\Classes\lserp\shell\open\command")) { - key.SetValue("", $"\"{exePath}\" \"%1\""); - } - } - - 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; - } - } - } -} + key.SetValu \ No newline at end of file diff --git a/插件库/Lskj.Main/Resources/密码不显示.png b/插件库/Lskj.Main/Resources/密码不显示.png new file mode 100644 index 0000000..a18a79a Binary files /dev/null and b/插件库/Lskj.Main/Resources/密码不显示.png differ diff --git a/插件库/Lskj.Main/Resources/密码显示.png b/插件库/Lskj.Main/Resources/密码显示.png new file mode 100644 index 0000000..d8619c2 Binary files /dev/null and b/插件库/Lskj.Main/Resources/密码显示.png differ