SVN r1032
SVN-Revision: r1032
This commit is contained in:
+16
-14
@@ -31,9 +31,10 @@ namespace Lskj.Notice
|
|||||||
private Icon blank = Resources.blank;
|
private Icon blank = Resources.blank;
|
||||||
private Icon striped = Resources.logo;
|
private Icon striped = Resources.logo;
|
||||||
private bool mouseinform = false;
|
private bool mouseinform = false;
|
||||||
|
private bool runForm = false;
|
||||||
|
|
||||||
private int LastRowCount;//上一次记录的行数
|
private int LastRowCount;//上一次记录的行数
|
||||||
private bool FirstEntry=true;//是否是第一次进入
|
private bool FirstEntry = true;//是否是第一次进入
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 语言设置,设置后为true
|
/// 语言设置,设置后为true
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -149,7 +150,7 @@ namespace Lskj.Notice
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
string sqlStr = string.Empty;
|
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;
|
int rowCount = data == null ? 0 : data.Rows.Count;
|
||||||
@@ -248,8 +249,7 @@ namespace Lskj.Notice
|
|||||||
string[] args = defaultArgs.Concat(menuArgs).ToArray();
|
string[] args = defaultArgs.Concat(menuArgs).ToArray();
|
||||||
IForm form = FormHelper.LoadDllForm(dllName, args);
|
IForm form = FormHelper.LoadDllForm(dllName, args);
|
||||||
if (dllName.Equals("miniblink.dll")) form.SubForm.WindowState = FormWindowState.Maximized;
|
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();
|
DialogResult result = form.SubForm.ShowDialog();
|
||||||
if (result != DialogResult.OK && ("1".Equals(rowItem["messid"] + "") || "2".Equals(rowItem["messid"] + "")))
|
if (result != DialogResult.OK && ("1".Equals(rowItem["messid"] + "") || "2".Equals(rowItem["messid"] + "")))
|
||||||
{
|
{
|
||||||
@@ -260,12 +260,12 @@ namespace Lskj.Notice
|
|||||||
//return;
|
//return;
|
||||||
NoticeImpl.UpeNoticeData(rowItem, isCustomNotice);
|
NoticeImpl.UpeNoticeData(rowItem, isCustomNotice);
|
||||||
string sqlStr = string.Empty;
|
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;
|
int rowCount = data == null ? 0 : data.Rows.Count;
|
||||||
this.gridControlEx.DataSource = data;
|
this.gridControlEx.DataSource = data;
|
||||||
this.Text = "您有" + rowCount + "条任务需要处理(提示:双击即可处理).";
|
this.Text = "您有" + rowCount + "条任务需要处理(提示:双击即可处理).";
|
||||||
}
|
}
|
||||||
|
form.SubForm.Dispose();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -316,7 +316,7 @@ namespace Lskj.Notice
|
|||||||
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);
|
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 = "中文";
|
if (string.IsNullOrWhiteSpace(this.Language)) this.Language = "中文";
|
||||||
ERPInfo.Instance.LanguageName = this.Language;
|
ERPInfo.Instance.LanguageName = this.Language;
|
||||||
this.LanguageSettings = true;
|
this.LanguageSettings = true;
|
||||||
@@ -332,7 +332,7 @@ namespace Lskj.Notice
|
|||||||
this.tsmiFlicker.Checked = DBConfig.Instance.NoticeFlicker;
|
this.tsmiFlicker.Checked = DBConfig.Instance.NoticeFlicker;
|
||||||
this.tsmiShowWindow.Checked = DBConfig.Instance.NoticeShowWindow;
|
this.tsmiShowWindow.Checked = DBConfig.Instance.NoticeShowWindow;
|
||||||
string sqlStr = string.Empty;
|
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;
|
int rowCount = data == null ? 0 : data.Rows.Count;
|
||||||
this.gridControlEx.DataSource = data;
|
this.gridControlEx.DataSource = data;
|
||||||
this.Text = "您有" + rowCount + "条任务需要处理(提示:双击即可处理).";
|
this.Text = "您有" + rowCount + "条任务需要处理(提示:双击即可处理).";
|
||||||
@@ -370,7 +370,7 @@ namespace Lskj.Notice
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!mouseinform)
|
if (!mouseinform && !runForm)
|
||||||
{
|
{
|
||||||
this.ReloadGridData();
|
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>
|
/// <param name="e">The <see cref="DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs"/> instance containing the event data.</param>
|
||||||
void OnGridViewDoubleClick(object sender, EventArgs e)
|
void OnGridViewDoubleClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
runForm = true;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DataRow rowItem = this.gridView.GetFocusedDataRow();
|
DataRow rowItem = this.gridView.GetFocusedDataRow();
|
||||||
@@ -403,9 +404,9 @@ namespace Lskj.Notice
|
|||||||
//设置第一次点击时间
|
//设置第一次点击时间
|
||||||
if (rowItem.Table.Columns.Contains("FirstViewTime"))
|
if (rowItem.Table.Columns.Contains("FirstViewTime"))
|
||||||
{
|
{
|
||||||
string tableName = rowItem["TableName"]+"";
|
string tableName = rowItem["TableName"] + "";
|
||||||
string id= rowItem["id"]+"";
|
string id = rowItem["id"] + "";
|
||||||
if (tableName.Equals("p_systemMessageTab")&&string.IsNullOrWhiteSpace(rowItem["FirstViewTime"] + ""))
|
if (tableName.Equals("p_systemMessageTab") && string.IsNullOrWhiteSpace(rowItem["FirstViewTime"] + ""))
|
||||||
{
|
{
|
||||||
NoticeImpl.UpeNoticeData(tableName, id);
|
NoticeImpl.UpeNoticeData(tableName, id);
|
||||||
}
|
}
|
||||||
@@ -422,7 +423,7 @@ namespace Lskj.Notice
|
|||||||
{
|
{
|
||||||
NoticeImpl.UpeNoticeData(rowItem);
|
NoticeImpl.UpeNoticeData(rowItem);
|
||||||
string sqlStr = string.Empty;
|
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;
|
int rowCount = data == null ? 0 : data.Rows.Count;
|
||||||
this.gridControlEx.DataSource = data;
|
this.gridControlEx.DataSource = data;
|
||||||
this.Text = "您有" + rowCount + "条任务需要处理(提示:双击即可处理).";
|
this.Text = "您有" + rowCount + "条任务需要处理(提示:双击即可处理).";
|
||||||
@@ -439,6 +440,7 @@ namespace Lskj.Notice
|
|||||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||||
MessageUtil.Show(Message);
|
MessageUtil.Show(Message);
|
||||||
}
|
}
|
||||||
|
runForm = false;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>说明:最小化到托盘</para>
|
/// <para>说明:最小化到托盘</para>
|
||||||
@@ -697,7 +699,7 @@ namespace Lskj.Notice
|
|||||||
{
|
{
|
||||||
NoticeImpl.UpeNoticeData("1");
|
NoticeImpl.UpeNoticeData("1");
|
||||||
string sqlStr = string.Empty;
|
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;
|
int rowCount = data == null ? 0 : data.Rows.Count;
|
||||||
this.gridControlEx.DataSource = data;
|
this.gridControlEx.DataSource = data;
|
||||||
this.Text = "您有" + rowCount + "条任务需要处理(提示:双击即可处理).";
|
this.Text = "您有" + rowCount + "条任务需要处理(提示:双击即可处理).";
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Lskj.Notice
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
CefRuntime.Load();//cef浏览器模块设置加载
|
CefRuntime.Load();//cef浏览器模块设置加载
|
||||||
var mainArgs = new CefMainArgs(args);
|
var mainArgs = new CefMainArgs(args);
|
||||||
var app = new DemoApp();
|
var app = new DemoApp();
|
||||||
@@ -99,29 +99,4 @@ namespace Lskj.Notice
|
|||||||
class SingleApplication
|
class SingleApplication
|
||||||
{
|
{
|
||||||
[DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
|
[DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
|
||||||
private static extern IntPtr OpenMutex(uint dwDesiredAccess, int bInheritHandle, string lpName);
|
private static extern IntPtr OpenMutex(
|
||||||
[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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user