SVN r1148
SVN-Revision: r1148
This commit is contained in:
@@ -34,6 +34,7 @@ using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Lskj.Main.Control
|
||||
@@ -457,6 +458,22 @@ namespace Lskj.Main.Control
|
||||
{
|
||||
this.lbUserName.Text = ERPInfo.Instance.UserName;
|
||||
|
||||
if (this.lbUserName.Width+ this.lbUserName.Left-2> button6.Left)
|
||||
{
|
||||
//右上角用户名特殊处理
|
||||
this.lbUserName.Text = this.lbUserName.Text.Substring(0, 2) + "...";
|
||||
ToolTip toolTip = new ToolTip
|
||||
{
|
||||
InitialDelay = 100, // 鼠标悬浮后延迟显示时间(毫秒)
|
||||
ReshowDelay = 500, // 连续悬浮不同控件时的延迟
|
||||
ShowAlways = true, // 始终显示提示
|
||||
UseAnimation = true, // 显示动画效果
|
||||
UseFading = true, // 淡入淡出效果
|
||||
AutoPopDelay = 1000000 // 提示框自动消失时间(毫秒)
|
||||
};
|
||||
toolTip.SetToolTip(this.lbUserName, ERPInfo.Instance.UserName);
|
||||
}
|
||||
|
||||
this.tsmi_userName.Text = LanguageTranslation.Translatable ? LanguageTranslation.GetTranslatedText("用户名") + ":" + ERPInfo.Instance.UserName : "用户名:" + ERPInfo.Instance.UserName;
|
||||
this.tsmi_account_book.Text = LanguageTranslation.Translatable ? LanguageTranslation.GetTranslatedText("账套") + ":" + ERPInfo.Instance.AccountBook : "账套:" + ERPInfo.Instance.AccountBook;
|
||||
this.tsmi_version.Text = string.Format("Version:{0}", Assembly.GetExecutingAssembly().GetName().Version + "");
|
||||
|
||||
@@ -746,8 +746,8 @@ namespace Lskj.Main
|
||||
break;
|
||||
case -1: // 登录失败
|
||||
default:
|
||||
ErrorLogText = string.Format("登录用户Id:{0}\r\n登录用户名称:{1}\r\n输入密码:{2}", userId, userName, password);
|
||||
LogUtil.WriteDebug("", "登录失败", ErrorLogText, "");
|
||||
//ErrorLogText = string.Format("登录用户Id:{0}\r\n登录用户名称:{1}\r\n输入密码:{2}", userId, userName, password);
|
||||
//LogUtil.WriteDebug("", "登录失败", ErrorLogText, "");
|
||||
MessageUtil.Show(ResourceKeys.LoginFault);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ using System.Reflection;
|
||||
using System.IO;
|
||||
using Lskj.Control.BrowserSetting;
|
||||
using Microsoft.Win32;
|
||||
using System.Resources;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Lskj.Main
|
||||
{
|
||||
@@ -26,12 +28,15 @@ namespace Lskj.Main
|
||||
//private static extern bool SetProcessDpiAwarenessContext(IntPtr dpiContext);
|
||||
|
||||
//private static readonly IntPtr DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 = new IntPtr(-4);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 应用程序的主入口点。
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
||||
//SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
|
||||
CefRuntime.Load();//cef浏览器模块设置加载
|
||||
var mainArgs = new CefMainArgs(args);
|
||||
@@ -81,6 +86,7 @@ namespace Lskj.Main
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageUtil.Show(ex);
|
||||
LogHelper.Instance.WriteError(ex);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -113,6 +119,9 @@ namespace Lskj.Main
|
||||
commandLine.AppendSwitch("resources-dir-path", path);
|
||||
commandLine.AppendSwitch("locales-dir-path", Path.Combine(path, "locales"));
|
||||
|
||||
commandLine.AppendSwitch("ignore-certificate-errors", "1");
|
||||
commandLine.AppendSwitch("allow-running-insecure-content", "1");
|
||||
|
||||
//如果注册表中CefMultithreading不为1,并且根目录中不存在BrowserMultithreading.txt"文件,就是单线程模式
|
||||
//只要有一个条件满足就是多线程模式
|
||||
if (!BrowserMultithreading() && !File.Exists(PubUtil.AbsolutelyPath + "BrowserMultithreading.txt"))
|
||||
@@ -146,7 +155,9 @@ namespace Lskj.Main
|
||||
/// <param name="e">The <see cref="ThreadExceptionEventArgs"/> instance containing the event data.</param>
|
||||
static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
|
||||
{
|
||||
MessageUtil.Show(e.Exception);
|
||||
// 获取异常对象
|
||||
Exception ex = e.Exception;
|
||||
MessageUtil.Show(ex);
|
||||
LogHelper.Instance.WriteError(e.Exception);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user