|
|
@@ -14,6 +14,7 @@ using System.IO;
|
|
|
using System.Reflection;
|
|
|
using System.Threading;
|
|
|
using System.Windows.Forms;
|
|
|
+using System.Runtime.InteropServices;
|
|
|
|
|
|
using Dongke.IBOSS.PRD.Basics.BaseResources;
|
|
|
using Dongke.IBOSS.PRD.Basics.Library;
|
|
|
@@ -21,276 +22,302 @@ using Dongke.IBOSS.PRD.Client.CommonModule;
|
|
|
using Dongke.IBOSS.PRD.Client.DataModels;
|
|
|
using Dongke.IBOSS.PRD.WCF.DataModels;
|
|
|
using Dongke.IBOSS.PRD.WCF.Proxys;
|
|
|
+using Timer = System.Windows.Forms.Timer;
|
|
|
+using Wongoing.Basic;
|
|
|
|
|
|
namespace Dongke.IBOSS.PRD.Client
|
|
|
{
|
|
|
- /// <summary>
|
|
|
- /// 系统启动主程序
|
|
|
- /// </summary>
|
|
|
- static class Program
|
|
|
- {
|
|
|
- #region 成员变量
|
|
|
+ /// <summary>
|
|
|
+ /// 系统启动主程序
|
|
|
+ /// </summary>
|
|
|
+ static class Program
|
|
|
+ {
|
|
|
+ #region 成员变量
|
|
|
|
|
|
- // 系统登录窗体
|
|
|
- private static F_SYS_0101 _frmLogin = null;
|
|
|
- // 主窗体title
|
|
|
- private static string _mainFormTitle = null;
|
|
|
- private static string _loginFormTitle = null;
|
|
|
- private static FileVersionInfo _info = null;
|
|
|
- // 程序是否已经登录
|
|
|
- private static bool _isLogin = false;
|
|
|
- // 配置文件的全路径
|
|
|
- private static string _iniFilePath = LocalPath.RootPath + Constant.INI_FILE_NAME;
|
|
|
+ // 系统登录窗体
|
|
|
+ private static F_SYS_0101 _frmLogin = null;
|
|
|
+ // 主窗体title
|
|
|
+ private static string _mainFormTitle = null;
|
|
|
+ private static string _loginFormTitle = null;
|
|
|
+ private static FileVersionInfo _info = null;
|
|
|
+ // 程序是否已经登录
|
|
|
+ private static bool _isLogin = false;
|
|
|
+ // 配置文件的全路径
|
|
|
+ private static string _iniFilePath = LocalPath.RootPath + Constant.INI_FILE_NAME;
|
|
|
|
|
|
- #endregion
|
|
|
+ #endregion
|
|
|
|
|
|
- #region 属性
|
|
|
+ #region 属性
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 已经登录标识
|
|
|
- /// </summary>
|
|
|
- internal static bool IsLogin
|
|
|
- {
|
|
|
- get
|
|
|
- {
|
|
|
- return _isLogin;
|
|
|
- }
|
|
|
- set
|
|
|
- {
|
|
|
- _isLogin = value;
|
|
|
- }
|
|
|
- }
|
|
|
+ /// <summary>
|
|
|
+ /// 已经登录标识
|
|
|
+ /// </summary>
|
|
|
+ internal static bool IsLogin
|
|
|
+ {
|
|
|
+ get
|
|
|
+ {
|
|
|
+ return _isLogin;
|
|
|
+ }
|
|
|
+ set
|
|
|
+ {
|
|
|
+ _isLogin = value;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- #endregion
|
|
|
+ #endregion
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 应用程序的主入口点。
|
|
|
- /// </summary>
|
|
|
- [STAThread]
|
|
|
- static void Main(string[] args)
|
|
|
- {
|
|
|
- Curtain.Log.Logger.DefaultLogDirectory = LocalPath.LogRootPath;
|
|
|
+ /// <summary>
|
|
|
+ /// 应用程序的主入口点。
|
|
|
+ /// </summary>
|
|
|
+ [STAThread]
|
|
|
+ static void Main(string[] args)
|
|
|
+ {
|
|
|
+ Curtain.Log.Logger.DefaultLogDirectory = LocalPath.LogRootPath;
|
|
|
|
|
|
- // 检查程序是否已经在运行中
|
|
|
- bool isCreatedNew = true;
|
|
|
- Mutex ibossMutex = null;
|
|
|
- //#if DEBUG
|
|
|
- //#else
|
|
|
- // string ibossMutexName = SystemAPI.UserName + "-iboss.mes-";
|
|
|
- // ibossMutex = new Mutex(true, ibossMutexName, out isCreatedNew);
|
|
|
- //#endif
|
|
|
- // 取得程序的版本
|
|
|
- _info = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
|
|
|
- _mainFormTitle = Constant.M_SYSTEM_NAME + " - " + Constant.M_SYSTEM_CHINESE_SERIES + " - ver " + _info.FileVersion;
|
|
|
- _loginFormTitle = Constant.M_SYSTEM_CHINESE_NAME + " - ver " + _info.FileVersion;
|
|
|
+ // 检查程序是否已经在运行中
|
|
|
+ bool isCreatedNew = true;
|
|
|
+ Mutex ibossMutex = null;
|
|
|
+ //#if DEBUG
|
|
|
+ //#else
|
|
|
+ // string ibossMutexName = SystemAPI.UserName + "-iboss.mes-";
|
|
|
+ // ibossMutex = new Mutex(true, ibossMutexName, out isCreatedNew);
|
|
|
+ //#endif
|
|
|
+ // 取得程序的版本
|
|
|
+ _info = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
|
|
|
+ _mainFormTitle = Constant.M_SYSTEM_NAME + " - " + Constant.M_SYSTEM_CHINESE_SERIES + " - ver " + _info.FileVersion;
|
|
|
+ _loginFormTitle = Constant.M_SYSTEM_CHINESE_NAME + " - ver " + _info.FileVersion;
|
|
|
|
|
|
- if (isCreatedNew)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- Application.EnableVisualStyles();
|
|
|
- Application.SetCompatibleTextRenderingDefault(false);
|
|
|
+ if (isCreatedNew)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ Application.EnableVisualStyles();
|
|
|
+ Application.SetCompatibleTextRenderingDefault(false);
|
|
|
|
|
|
- Application.ThreadException += Application_ThreadException;
|
|
|
+ Application.ThreadException += Application_ThreadException;
|
|
|
|
|
|
- {
|
|
|
- // 更新自动更新程序
|
|
|
- if (Directory.Exists(LocalPath.InstallerDownloadPath))
|
|
|
- {
|
|
|
- string[] downFiles = Directory.GetFiles(LocalPath.InstallerDownloadPath);
|
|
|
- if (downFiles.Length > 0)
|
|
|
- {
|
|
|
- if (args != null)
|
|
|
- {
|
|
|
- System.Threading.Thread.Sleep(3000);
|
|
|
- }
|
|
|
- try
|
|
|
- {
|
|
|
- foreach (string name in downFiles)
|
|
|
- {
|
|
|
- string filename = Path.GetFileName(name);
|
|
|
- if (filename.StartsWith("AutoUpgrade")
|
|
|
- || "SharpZipLib.dll".Equals(filename))
|
|
|
- {
|
|
|
- string localFile = System.Environment.CurrentDirectory + @"\" + filename;
|
|
|
+ {
|
|
|
+ // 更新自动更新程序
|
|
|
+ if (Directory.Exists(LocalPath.InstallerDownloadPath))
|
|
|
+ {
|
|
|
+ string[] downFiles = Directory.GetFiles(LocalPath.InstallerDownloadPath);
|
|
|
+ if (downFiles.Length > 0)
|
|
|
+ {
|
|
|
+ if (args != null)
|
|
|
+ {
|
|
|
+ System.Threading.Thread.Sleep(3000);
|
|
|
+ }
|
|
|
+ try
|
|
|
+ {
|
|
|
+ foreach (string name in downFiles)
|
|
|
+ {
|
|
|
+ string filename = Path.GetFileName(name);
|
|
|
+ if (filename.StartsWith("AutoUpgrade")
|
|
|
+ || "SharpZipLib.dll".Equals(filename))
|
|
|
+ {
|
|
|
+ string localFile = System.Environment.CurrentDirectory + @"\" + filename;
|
|
|
|
|
|
- if (File.Exists(localFile))
|
|
|
- {
|
|
|
- File.Delete(localFile);
|
|
|
- }
|
|
|
- File.Copy(name, localFile);
|
|
|
- File.Delete(name);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- File.Delete(name);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- Curtain.Log.Logger.Error(ex);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- // 系统登录
|
|
|
- Login(args);
|
|
|
- if (_isLogin)
|
|
|
- {
|
|
|
- //#if DEBUG
|
|
|
- // 如果升级版本发布错误,导致客户端都不能升级了。
|
|
|
- // 主程序
|
|
|
- //using (F_SYS_0201 main = new F_SYS_0201())
|
|
|
- //{
|
|
|
- // main.Text = _mainFormTitle;
|
|
|
- // Application.Run(main);
|
|
|
- //}
|
|
|
- //#else
|
|
|
- // 自动更新
|
|
|
- NeedUpgradeResultEntity needUpgradeInfo = DKIBOSSPRDProxy.Service.IsNeedUpgrade(_info.FileVersion);
|
|
|
+ if (File.Exists(localFile))
|
|
|
+ {
|
|
|
+ File.Delete(localFile);
|
|
|
+ }
|
|
|
+ File.Copy(name, localFile);
|
|
|
+ File.Delete(name);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ File.Delete(name);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ Curtain.Log.Logger.Error(ex);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 系统登录
|
|
|
+ Login(args);
|
|
|
+ if (_isLogin)
|
|
|
+ {
|
|
|
+ //#if DEBUG
|
|
|
+ // 如果升级版本发布错误,导致客户端都不能升级了。
|
|
|
+ // 主程序
|
|
|
+ //using (F_SYS_0201 main = new F_SYS_0201())
|
|
|
+ //{
|
|
|
+ // main.Text = _mainFormTitle;
|
|
|
+ // Application.Run(main);
|
|
|
+ //}
|
|
|
+ //#else
|
|
|
+ // 自动更新
|
|
|
+ NeedUpgradeResultEntity needUpgradeInfo = DKIBOSSPRDProxy.Service.IsNeedUpgrade(_info.FileVersion);
|
|
|
|
|
|
- if (needUpgradeInfo.UpgradeState)
|
|
|
- {
|
|
|
- MessageBox.Show("检测到服务器上有最新版本,需要自动更新。",
|
|
|
- Messages.MSG_TITLE_I01,
|
|
|
- MessageBoxButtons.OK,
|
|
|
- MessageBoxIcon.Information);
|
|
|
+ #region 版本到期提示 2023-05-26 fenglinyong ADD start
|
|
|
+ //查询后台授权标识
|
|
|
+ //EMPOWERMENTFLAG授权(1:提示授权到期,2:不提示)
|
|
|
+ ClientRequestEntity cre = new ClientRequestEntity();
|
|
|
+ cre.NameSpace = "EMPOWERMENTFLAG";
|
|
|
+ cre.Name = "EMPOWERMENTFLAG";
|
|
|
+ ServiceResultEntity sre = SystemModuleProxy.Service.DoRequest(cre);
|
|
|
+ if (sre.Status == Basics.BaseResources.Constant.ServiceResultStatus.Success)
|
|
|
+ {
|
|
|
+ if (sre.Data != null && sre.Data.Tables.Count > 0 && sre.Data.Tables[0].Rows.Count > 0)
|
|
|
+ {
|
|
|
+ if (sre.Data.Tables[0].Rows[0]["EMPOWERMENTFLAG"].ToString() == "1")
|
|
|
+ {
|
|
|
+ MessageBoxTimeOut.Show(sre.Data.Tables[0].Rows[0]["SHOWINFO"].ToString(), "提示", 3000);
|
|
|
+ //MessageBox.Show(sre.Data.Tables[0].Rows[0]["SHOWINFO"].ToString(),
|
|
|
+ //Messages.MSG_TITLE_I01,
|
|
|
+ //MessageBoxButtons.OK,
|
|
|
+ //MessageBoxIcon.Information);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- needUpgradeInfo.GradeInfo =
|
|
|
- string.Format("本地程序版本:{0}\r\n最新程序版本:{1}",
|
|
|
- _info.FileVersion, needUpgradeInfo.ServerVersion);
|
|
|
+ #endregion 2023-05-26 fenglinyong ADD END
|
|
|
|
|
|
- // 如果有提示信息提示,没有就跳过
|
|
|
- if (!string.IsNullOrEmpty(needUpgradeInfo.GradeInfo))
|
|
|
- {
|
|
|
- F_SYS_0103 frmAutoUpgradeInfo = new F_SYS_0103(needUpgradeInfo.GradeInfo);
|
|
|
- DialogResult dialogResult = frmAutoUpgradeInfo.ShowDialog();
|
|
|
- if (dialogResult != DialogResult.OK)
|
|
|
- {
|
|
|
- Application.Exit();
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- Application.Exit();
|
|
|
- //Process.Start("AutoUpgrade.exe");
|
|
|
- Process.Start(System.AppDomain.CurrentDomain.BaseDirectory + "AutoUpgrade.exe", "IBOSSPRD.exe " + _frmLogin.Password);
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- Application.Exit();
|
|
|
- //Process.Start("AutoUpgrade.exe");
|
|
|
- Process.Start(System.AppDomain.CurrentDomain.BaseDirectory + "AutoUpgrade.exe", "IBOSSPRD.exe " + _frmLogin.Password);
|
|
|
- }
|
|
|
- }
|
|
|
- // 如果有提示信息,不能连接服务器
|
|
|
- else if (!string.IsNullOrEmpty(needUpgradeInfo.GradeInfo))
|
|
|
- {
|
|
|
- MessageBox.Show(needUpgradeInfo.GradeInfo,
|
|
|
- Messages.MSG_TITLE_I01,
|
|
|
- MessageBoxButtons.OK,
|
|
|
- MessageBoxIcon.Warning);
|
|
|
- Application.Exit();
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- // 主程序
|
|
|
- using (F_SYS_0201 main = new F_SYS_0201())
|
|
|
- {
|
|
|
- main.Text = _mainFormTitle;
|
|
|
- Application.Run(main);
|
|
|
- }
|
|
|
- }
|
|
|
- //#endif
|
|
|
- }
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- // 对异常进行共通处理
|
|
|
- ExceptionManager.HandleEventException("Program.cs", "Main()", Messages.MSG_TITLE_E01, ex);
|
|
|
- }
|
|
|
- finally
|
|
|
- {
|
|
|
- if (_isLogin)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- // 退出系统
|
|
|
- DKIBOSSPRDProxy.Service.Logout(LogInUserInfo.CurrentUser.UserID);
|
|
|
- }
|
|
|
- catch { }
|
|
|
- }
|
|
|
- if (ibossMutex != null)
|
|
|
- {
|
|
|
- ibossMutex.Close();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- IntPtr iptWndMain = Utility.FindWindow(null, _mainFormTitle);
|
|
|
- if (iptWndMain == IntPtr.Zero)
|
|
|
- {
|
|
|
- IntPtr iptWndLogin = Utility.FindWindow(null, _loginFormTitle);
|
|
|
- if (iptWndLogin != IntPtr.Zero)
|
|
|
- {
|
|
|
- Utility.WakeupWindow(iptWndLogin);
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- Utility.WakeupWindow(iptWndMain);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ if (needUpgradeInfo.UpgradeState)
|
|
|
+ {
|
|
|
+ MessageBox.Show("检测到服务器上有最新版本,需要自动更新。",
|
|
|
+ Messages.MSG_TITLE_I01,
|
|
|
+ MessageBoxButtons.OK,
|
|
|
+ MessageBoxIcon.Information);
|
|
|
|
|
|
- static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
|
|
|
- {
|
|
|
- //throw new NotImplementedException();
|
|
|
- ExceptionManager.HandleEventException(
|
|
|
- "Program.cs",
|
|
|
- "Application_ThreadException()",
|
|
|
- Messages.MSG_TITLE_E01,
|
|
|
- e.Exception);
|
|
|
- }
|
|
|
+ needUpgradeInfo.GradeInfo =
|
|
|
+ string.Format("本地程序版本:{0}\r\n最新程序版本:{1}",
|
|
|
+ _info.FileVersion, needUpgradeInfo.ServerVersion);
|
|
|
|
|
|
- #region 私有方法
|
|
|
+ // 如果有提示信息提示,没有就跳过
|
|
|
+ if (!string.IsNullOrEmpty(needUpgradeInfo.GradeInfo))
|
|
|
+ {
|
|
|
+ F_SYS_0103 frmAutoUpgradeInfo = new F_SYS_0103(needUpgradeInfo.GradeInfo);
|
|
|
+ DialogResult dialogResult = frmAutoUpgradeInfo.ShowDialog();
|
|
|
+ if (dialogResult != DialogResult.OK)
|
|
|
+ {
|
|
|
+ Application.Exit();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Application.Exit();
|
|
|
+ //Process.Start("AutoUpgrade.exe");
|
|
|
+ Process.Start(System.AppDomain.CurrentDomain.BaseDirectory + "AutoUpgrade.exe", "IBOSSPRD.exe " + _frmLogin.Password);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Application.Exit();
|
|
|
+ //Process.Start("AutoUpgrade.exe");
|
|
|
+ Process.Start(System.AppDomain.CurrentDomain.BaseDirectory + "AutoUpgrade.exe", "IBOSSPRD.exe " + _frmLogin.Password);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 如果有提示信息,不能连接服务器
|
|
|
+ else if (!string.IsNullOrEmpty(needUpgradeInfo.GradeInfo))
|
|
|
+ {
|
|
|
+ MessageBox.Show(needUpgradeInfo.GradeInfo,
|
|
|
+ Messages.MSG_TITLE_I01,
|
|
|
+ MessageBoxButtons.OK,
|
|
|
+ MessageBoxIcon.Warning);
|
|
|
+ Application.Exit();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // 主程序
|
|
|
+ using (F_SYS_0201 main = new F_SYS_0201())
|
|
|
+ {
|
|
|
+ main.Text = _mainFormTitle;
|
|
|
+ Application.Run(main);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //#endif
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ // 对异常进行共通处理
|
|
|
+ ExceptionManager.HandleEventException("Program.cs", "Main()", Messages.MSG_TITLE_E01, ex);
|
|
|
+ }
|
|
|
+ finally
|
|
|
+ {
|
|
|
+ if (_isLogin)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ // 退出系统
|
|
|
+ DKIBOSSPRDProxy.Service.Logout(LogInUserInfo.CurrentUser.UserID);
|
|
|
+ }
|
|
|
+ catch { }
|
|
|
+ }
|
|
|
+ if (ibossMutex != null)
|
|
|
+ {
|
|
|
+ ibossMutex.Close();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ IntPtr iptWndMain = Utility.FindWindow(null, _mainFormTitle);
|
|
|
+ if (iptWndMain == IntPtr.Zero)
|
|
|
+ {
|
|
|
+ IntPtr iptWndLogin = Utility.FindWindow(null, _loginFormTitle);
|
|
|
+ if (iptWndLogin != IntPtr.Zero)
|
|
|
+ {
|
|
|
+ Utility.WakeupWindow(iptWndLogin);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Utility.WakeupWindow(iptWndMain);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 调取系统登录页面进行登录验证
|
|
|
- /// </summary>
|
|
|
- /// <returns></returns>
|
|
|
- private static bool Login(string[] args)
|
|
|
- {
|
|
|
- _frmLogin = new F_SYS_0101();
|
|
|
- _frmLogin.Text = _loginFormTitle;
|
|
|
- if (args != null)
|
|
|
- {
|
|
|
- int argsLength = args.Length;
|
|
|
- if (argsLength == 1)
|
|
|
- {
|
|
|
- if ("IsChangedUser" == args[0])
|
|
|
- {
|
|
|
- _frmLogin.IsChangedUser = true;
|
|
|
- }
|
|
|
- }
|
|
|
- if (argsLength == 2)
|
|
|
- {
|
|
|
- if ("IBOSSPRD.exe" == args[0])
|
|
|
- {
|
|
|
- _frmLogin.Password = args[1];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- DialogResult dialogResult = _frmLogin.ShowDialog();
|
|
|
- if (dialogResult == DialogResult.OK)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- return false;
|
|
|
- }
|
|
|
+ static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
|
|
|
+ {
|
|
|
+ //throw new NotImplementedException();
|
|
|
+ ExceptionManager.HandleEventException(
|
|
|
+ "Program.cs",
|
|
|
+ "Application_ThreadException()",
|
|
|
+ Messages.MSG_TITLE_E01,
|
|
|
+ e.Exception);
|
|
|
+ }
|
|
|
|
|
|
- #endregion
|
|
|
- }
|
|
|
+ #region 私有方法
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 调取系统登录页面进行登录验证
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private static bool Login(string[] args)
|
|
|
+ {
|
|
|
+ _frmLogin = new F_SYS_0101();
|
|
|
+ _frmLogin.Text = _loginFormTitle;
|
|
|
+ if (args != null)
|
|
|
+ {
|
|
|
+ int argsLength = args.Length;
|
|
|
+ if (argsLength == 1)
|
|
|
+ {
|
|
|
+ if ("IsChangedUser" == args[0])
|
|
|
+ {
|
|
|
+ _frmLogin.IsChangedUser = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (argsLength == 2)
|
|
|
+ {
|
|
|
+ if ("IBOSSPRD.exe" == args[0])
|
|
|
+ {
|
|
|
+ _frmLogin.Password = args[1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ DialogResult dialogResult = _frmLogin.ShowDialog();
|
|
|
+ if (dialogResult == DialogResult.OK)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
}
|