lu
2025-05-10 7dd1bef6eb9f5f3b3d50599415fb42c2a5fa1c6e
DevApp/Gs.DevApp/DevFrm/FrmLogin.cs
@@ -51,7 +51,6 @@
                txtUser.Focus();
                return;
            }
            if (string.IsNullOrEmpty(txtPwd.Text.Trim()))
            {
                MsgHelper.Warning("密码不能为空!");
@@ -90,7 +89,7 @@
            catch (Exception ex)
            {
                DialogResult = DialogResult.Cancel;
                MsgHelper.Warning("提示:" + ex.Message);
                MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
@@ -110,7 +109,7 @@
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        /// <summary>
@@ -133,12 +132,14 @@
                DevExpress.XtraEditors.WindowsFormsSettings.DefaultMenuFont = new System.Drawing.Font(ary[0], _ft);
                DevExpress.XtraEditors.WindowsFormsSettings.DefaultPrintFont = new System.Drawing.Font(ary[0], _ft);
                #endregion
            }
            catch (Exception)
            catch (Exception ex)
            {
                MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        #region 自动更新
        private void _autoUpdate()
        {
            _version = ConfigurationManager.AppSettings["Version"];
@@ -146,7 +147,6 @@
            AutoUpdater.Start(ConfigurationManager.AppSettings["AutoUpdaterXml"]);
            AutoUpdater.CheckForUpdateEvent += AutoUpdater_CheckForUpdateEvent;
        }
        private void AutoUpdater_CheckForUpdateEvent(UpdateInfoEventArgs args)
        {
            if (args == null || string.IsNullOrEmpty(args.DownloadURL))
@@ -156,12 +156,10 @@
                Application.Exit();
                return;
            }
            if (!args.IsUpdateAvailable)
            {
                return;
            }
            var _strMsg =
                string.Format(
                    $@"有新版本 {args.CurrentVersion} 可用,您使用的是 {args.InstalledVersion}版本,这是必需的更新,按“是(Y)”开始更新应用程序。");
@@ -171,7 +169,6 @@
                Application.Exit();
                return;
            }
            try
            {
                if (AutoUpdater.DownloadUpdate(args))
@@ -193,7 +190,6 @@
                        config.Save(ConfigurationSaveMode.Modified);
                        ConfigurationManager.RefreshSection("appSettings");
                    }
                    Application.Exit();
                }
                else
@@ -211,6 +207,13 @@
            }
        }
        #endregion
        /// <summary>
        /// 读取mac
        /// </summary>
        /// <returns></returns>
        private string GetMacAddress()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();