SVN r1192
SVN-Revision: r1192
This commit is contained in:
@@ -1180,6 +1180,21 @@ namespace Lskj.Main
|
|||||||
this.SetLanguage();
|
this.SetLanguage();
|
||||||
this.SetLedgers();
|
this.SetLedgers();
|
||||||
this.SetUsers();
|
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)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -447,6 +447,12 @@ namespace Lskj.Main
|
|||||||
{
|
{
|
||||||
try
|
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;
|
this.WindowState = this.WindowState == FormWindowState.Normal ? FormWindowState.Maximized : FormWindowState.Normal;
|
||||||
if (this.WindowState == FormWindowState.Maximized)
|
if (this.WindowState == FormWindowState.Maximized)
|
||||||
{
|
{
|
||||||
@@ -585,6 +591,10 @@ namespace Lskj.Main
|
|||||||
base.OnMouseUp(e);
|
base.OnMouseUp(e);
|
||||||
_isMouseDown = false;
|
_isMouseDown = false;
|
||||||
//this.Focus();
|
//this.Focus();
|
||||||
|
if (this.WindowState == FormWindowState.Normal)
|
||||||
|
{
|
||||||
|
EnsureFormInCurrentScreen();
|
||||||
|
}
|
||||||
this.mainPanelControlEx.pic_search.Focus();//点击界面失去焦点
|
this.mainPanelControlEx.pic_search.Focus();//点击界面失去焦点
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -677,4 +687,49 @@ namespace Lskj.Main
|
|||||||
public uint dwActiveProcessorMask;
|
public uint dwActiveProcessorMask;
|
||||||
public uint dwNumberOfProcessors;
|
public uint dwNumberOfProcessors;
|
||||||
public uint dwProcessorType;
|
public uint dwProcessorType;
|
||||||
public uint dwAllocationGra
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 多屏时设置程序大小
|
||||||
|
/// </summary>
|
||||||
|
private void EnsureFormInCurrentScreen()
|
||||||
|
{
|
||||||
|
if (this.WindowState != FormWindowState.Normal)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Screen screen = Screen.FromPoint(System.Windows.Forms.Control.MousePosition);
|
||||||
|
Rectangle workingArea = screen.WorkingArea;
|
||||||
|
|
||||||
|
|
||||||
@@ -38,7 +38,6 @@ namespace Lskj.Main
|
|||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
|
||||||
//SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
|
//SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
|
||||||
CefRuntime.Load();//cef浏览器模块设置加载
|
CefRuntime.Load();//cef浏览器模块设置加载
|
||||||
var mainArgs = new CefMainArgs(args);
|
var mainArgs = new CefMainArgs(args);
|
||||||
@@ -62,7 +61,7 @@ namespace Lskj.Main
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 汉化DevExpress界面
|
// 汉化DevExpress界面
|
||||||
Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh-CH");
|
Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh-CN");
|
||||||
// 设置皮肤
|
// 设置皮肤
|
||||||
BonusSkins.Register();
|
BonusSkins.Register();
|
||||||
SkinManager.EnableFormSkins();
|
SkinManager.EnableFormSkins();
|
||||||
@@ -223,36 +222,4 @@ namespace Lskj.Main
|
|||||||
}
|
}
|
||||||
using (var key = Registry.CurrentUser.CreateSubKey(@"Software\Classes\lserp\shell\open\command"))
|
using (var key = Registry.CurrentUser.CreateSubKey(@"Software\Classes\lserp\shell\open\command"))
|
||||||
{
|
{
|
||||||
key.SetValue("", $"\"{exePath}\" \"%1\"");
|
key.SetValu
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Reference in New Issue
Block a user