SVN r1032
SVN-Revision: r1032
This commit is contained in:
+25
-23
@@ -31,9 +31,10 @@ namespace Lskj.Notice
|
||||
private Icon blank = Resources.blank;
|
||||
private Icon striped = Resources.logo;
|
||||
private bool mouseinform = false;
|
||||
private bool runForm = false;
|
||||
|
||||
private int LastRowCount;//上一次记录的行数
|
||||
private bool FirstEntry=true;//是否是第一次进入
|
||||
private bool FirstEntry = true;//是否是第一次进入
|
||||
/// <summary>
|
||||
/// 语言设置,设置后为true
|
||||
/// </summary>
|
||||
@@ -141,23 +142,23 @@ namespace Lskj.Notice
|
||||
ERPInfo.Instance.LanguageName = this.Language;
|
||||
this.LanguageSettings = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
string sqlStr = string.Empty;
|
||||
DataTable data = NoticeImpl.GetNoticeData2(ERPInfo.Instance.UserId,out sqlStr);
|
||||
DataTable data = NoticeImpl.GetNoticeData2(ERPInfo.Instance.UserId, out sqlStr);
|
||||
|
||||
|
||||
|
||||
int rowCount = data == null ? 0 : data.Rows.Count;
|
||||
|
||||
this.gridControlEx.DataSource = data;
|
||||
this.Text = "您有" + rowCount + "条任务需要处理(提示:双击即可处理).";
|
||||
|
||||
|
||||
|
||||
|
||||
if (rowCount > 0)
|
||||
{
|
||||
@@ -167,7 +168,7 @@ namespace Lskj.Notice
|
||||
this.NormalShowForm();
|
||||
}
|
||||
// 开启、关闭新消息闪烁
|
||||
if (FirstEntry)
|
||||
if (FirstEntry)
|
||||
{
|
||||
this.blinkTimer.Enabled = this.tsmiFlicker.Checked;
|
||||
FirstEntry = false;
|
||||
@@ -248,8 +249,7 @@ namespace Lskj.Notice
|
||||
string[] args = defaultArgs.Concat(menuArgs).ToArray();
|
||||
IForm form = FormHelper.LoadDllForm(dllName, args);
|
||||
if (dllName.Equals("miniblink.dll")) form.SubForm.WindowState = FormWindowState.Maximized;
|
||||
if (dllName.Equals("lskj.pubmoduledetail.dll")|| dllName.Equals("lskj.pubbill.dll")) form.SubForm.WindowState = FormWindowState.Maximized;//默认全部最大化
|
||||
|
||||
if (dllName.Equals("lskj.pubmoduledetail.dll") || dllName.Equals("lskj.pubbill.dll")) form.SubForm.WindowState = FormWindowState.Maximized;//默认全部最大化
|
||||
DialogResult result = form.SubForm.ShowDialog();
|
||||
if (result != DialogResult.OK && ("1".Equals(rowItem["messid"] + "") || "2".Equals(rowItem["messid"] + "")))
|
||||
{
|
||||
@@ -260,12 +260,12 @@ namespace Lskj.Notice
|
||||
//return;
|
||||
NoticeImpl.UpeNoticeData(rowItem, isCustomNotice);
|
||||
string sqlStr = string.Empty;
|
||||
DataTable data = NoticeImpl.GetNoticeData2(ERPInfo.Instance.UserId,out sqlStr);
|
||||
DataTable data = NoticeImpl.GetNoticeData2(ERPInfo.Instance.UserId, out sqlStr);
|
||||
int rowCount = data == null ? 0 : data.Rows.Count;
|
||||
this.gridControlEx.DataSource = data;
|
||||
this.Text = "您有" + rowCount + "条任务需要处理(提示:双击即可处理).";
|
||||
}
|
||||
|
||||
form.SubForm.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -313,16 +313,16 @@ namespace Lskj.Notice
|
||||
//判断是否存在多语种的情况
|
||||
if (BaseImpl.HasExistsColumn("P_EmployeeTab", "useLanguage"))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(ERPInfo.Instance.UserId))
|
||||
if (!string.IsNullOrWhiteSpace(ERPInfo.Instance.UserId))
|
||||
{
|
||||
string sql = string.Format("select useLanguage from P_EmployeeTab where EmployeeId='{0}'", ERPInfo.Instance.UserId);
|
||||
this.Language = SqlHelper.ExecuteScalar(sql)+"";
|
||||
this.Language = SqlHelper.ExecuteScalar(sql) + "";
|
||||
if (string.IsNullOrWhiteSpace(this.Language)) this.Language = "中文";
|
||||
ERPInfo.Instance.LanguageName = this.Language;
|
||||
this.LanguageSettings = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
this.LanguageSettings = true;
|
||||
this.Language = "中文";
|
||||
@@ -332,7 +332,7 @@ namespace Lskj.Notice
|
||||
this.tsmiFlicker.Checked = DBConfig.Instance.NoticeFlicker;
|
||||
this.tsmiShowWindow.Checked = DBConfig.Instance.NoticeShowWindow;
|
||||
string sqlStr = string.Empty;
|
||||
DataTable data = NoticeImpl.GetNoticeData2(ERPInfo.Instance.UserId,out sqlStr);
|
||||
DataTable data = NoticeImpl.GetNoticeData2(ERPInfo.Instance.UserId, out sqlStr);
|
||||
int rowCount = data == null ? 0 : data.Rows.Count;
|
||||
this.gridControlEx.DataSource = data;
|
||||
this.Text = "您有" + rowCount + "条任务需要处理(提示:双击即可处理).";
|
||||
@@ -370,7 +370,7 @@ namespace Lskj.Notice
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!mouseinform)
|
||||
if (!mouseinform && !runForm)
|
||||
{
|
||||
this.ReloadGridData();
|
||||
}
|
||||
@@ -394,6 +394,7 @@ namespace Lskj.Notice
|
||||
/// <param name="e">The <see cref="DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs"/> instance containing the event data.</param>
|
||||
void OnGridViewDoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
runForm = true;
|
||||
try
|
||||
{
|
||||
DataRow rowItem = this.gridView.GetFocusedDataRow();
|
||||
@@ -401,15 +402,15 @@ namespace Lskj.Notice
|
||||
if (rowItem != null)
|
||||
{
|
||||
//设置第一次点击时间
|
||||
if (rowItem.Table.Columns.Contains("FirstViewTime"))
|
||||
if (rowItem.Table.Columns.Contains("FirstViewTime"))
|
||||
{
|
||||
string tableName = rowItem["TableName"]+"";
|
||||
string id= rowItem["id"]+"";
|
||||
if (tableName.Equals("p_systemMessageTab")&&string.IsNullOrWhiteSpace(rowItem["FirstViewTime"] + ""))
|
||||
string tableName = rowItem["TableName"] + "";
|
||||
string id = rowItem["id"] + "";
|
||||
if (tableName.Equals("p_systemMessageTab") && string.IsNullOrWhiteSpace(rowItem["FirstViewTime"] + ""))
|
||||
{
|
||||
NoticeImpl.UpeNoticeData(tableName, id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -422,7 +423,7 @@ namespace Lskj.Notice
|
||||
{
|
||||
NoticeImpl.UpeNoticeData(rowItem);
|
||||
string sqlStr = string.Empty;
|
||||
DataTable data = NoticeImpl.GetNoticeData2(ERPInfo.Instance.UserId,out sqlStr);
|
||||
DataTable data = NoticeImpl.GetNoticeData2(ERPInfo.Instance.UserId, out sqlStr);
|
||||
int rowCount = data == null ? 0 : data.Rows.Count;
|
||||
this.gridControlEx.DataSource = data;
|
||||
this.Text = "您有" + rowCount + "条任务需要处理(提示:双击即可处理).";
|
||||
@@ -439,6 +440,7 @@ namespace Lskj.Notice
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message);
|
||||
}
|
||||
runForm = false;
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:最小化到托盘</para>
|
||||
@@ -697,7 +699,7 @@ namespace Lskj.Notice
|
||||
{
|
||||
NoticeImpl.UpeNoticeData("1");
|
||||
string sqlStr = string.Empty;
|
||||
DataTable data = NoticeImpl.GetNoticeData2(ERPInfo.Instance.UserId,out sqlStr);
|
||||
DataTable data = NoticeImpl.GetNoticeData2(ERPInfo.Instance.UserId, out sqlStr);
|
||||
int rowCount = data == null ? 0 : data.Rows.Count;
|
||||
this.gridControlEx.DataSource = data;
|
||||
this.Text = "您有" + rowCount + "条任务需要处理(提示:双击即可处理).";
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Lskj.Notice
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
{
|
||||
CefRuntime.Load();//cef浏览器模块设置加载
|
||||
var mainArgs = new CefMainArgs(args);
|
||||
var app = new DemoApp();
|
||||
@@ -99,29 +99,4 @@ namespace Lskj.Notice
|
||||
class SingleApplication
|
||||
{
|
||||
[DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
|
||||
private static extern IntPtr OpenMutex(uint dwDesiredAccess, int bInheritHandle, string lpName);
|
||||
[DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
|
||||
private static extern IntPtr CreateMutex(IntPtr lpMutexAttributes, int bInitialOwner, string lpName);
|
||||
|
||||
public static bool IsRunning(string appID)
|
||||
{
|
||||
bool running = false;
|
||||
if (OpenMutex(0x1F0001, 0, appID) == IntPtr.Zero)
|
||||
{
|
||||
CreateMutex(IntPtr.Zero, 0, appID);
|
||||
running = true;
|
||||
}
|
||||
return running;
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class DemoApp : CefApp
|
||||
{
|
||||
protected override void OnBeforeCommandLineProcessing(string processType, CefCommandLine commandLine)
|
||||
{
|
||||
commandLine.AppendSwitch("ppapi-flash-version", "28.0.0.137");
|
||||
commandLine.AppendSwitch("ppapi-flash-path", @"D:\测试\LSERP\Debug\pepflashplayer.dll");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private static extern IntPtr OpenMutex(
|
||||
Reference in New Issue
Block a user