SVN r1002
SVN-Revision: r1002
This commit is contained in:
@@ -3524,6 +3524,12 @@ namespace Lskj.Main.Control
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
string menuId = lueUserName.EditValue;
|
string menuId = lueUserName.EditValue;
|
||||||
|
|
||||||
|
if (lueUserName._popup.GridViewObj.GetFocusedDataRow()==null)
|
||||||
|
{
|
||||||
|
menuId = "";
|
||||||
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(menuId))
|
if (!string.IsNullOrEmpty(menuId))
|
||||||
{
|
{
|
||||||
DataRow[] rowItems = this._allMenus.Select("MenuId=" + menuId);
|
DataRow[] rowItems = this._allMenus.Select("MenuId=" + menuId);
|
||||||
@@ -3743,14 +3749,14 @@ namespace Lskj.Main.Control
|
|||||||
DBConfig.Instance.ServerName = serverIP;
|
DBConfig.Instance.ServerName = serverIP;
|
||||||
DBConfig.Instance.DataBase = dbName;
|
DBConfig.Instance.DataBase = dbName;
|
||||||
DBConfig.Instance.IsInternalNetwork = isInternal;
|
DBConfig.Instance.IsInternalNetwork = isInternal;
|
||||||
if (!DBConfig.Instance.CreateConnection())
|
if (!DBConfig.Instance.CreateConnection(DBConfig.Instance.Connection))
|
||||||
{
|
{
|
||||||
MessageUtil.Show(ResourceKeys.ServerAddressFault);
|
MessageUtil.Show(ResourceKeys.ServerAddressFault);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (DelphiHelper.Delphi_Init(new StringBuilder(DBConfig.Instance.GetDelphiConnection())) == 0)
|
if (DelphiHelper.Delphi_Init(new StringBuilder(DBConfig.Instance.GetDelphiConnection(DBConfig.Instance.dephiConnection))) == 0)
|
||||||
{
|
{
|
||||||
MessageUtil.Show(ResourceKeys.UnConnectServer + "[By Delphi]");
|
MessageUtil.Show(ResourceKeys.UnConnectServer + "[By Delphi]");
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -191,6 +191,8 @@ namespace Lskj.Main
|
|||||||
DBConfig.Instance.InternalNetworkAddress = internalNetworkAddress;
|
DBConfig.Instance.InternalNetworkAddress = internalNetworkAddress;
|
||||||
DBConfig.Instance.IsInternalNetwork = internalNetwork;
|
DBConfig.Instance.IsInternalNetwork = internalNetwork;
|
||||||
DBConfig.Instance.ExternalNetworkAddress = externalNetworkAddress;
|
DBConfig.Instance.ExternalNetworkAddress = externalNetworkAddress;
|
||||||
|
DBConfig.Instance.Connection = "";
|
||||||
|
DBConfig.Instance.dephiConnection = "";
|
||||||
|
|
||||||
// 测试数据库连接
|
// 测试数据库连接
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -113,11 +113,14 @@ namespace Lskj.Main
|
|||||||
{
|
{
|
||||||
if (DBConfig.Instance.CreateConnection())
|
if (DBConfig.Instance.CreateConnection())
|
||||||
{
|
{
|
||||||
|
DBConfig.Instance.Connection = "";
|
||||||
|
|
||||||
if (DelphiHelper.Delphi_Init(new StringBuilder(DBConfig.Instance.GetDelphiConnection())) == 0)
|
if (DelphiHelper.Delphi_Init(new StringBuilder(DBConfig.Instance.GetDelphiConnection())) == 0)
|
||||||
{
|
{
|
||||||
MessageUtil.Show(ResourceKeys.UnConnectServer + "[By Delphi]");
|
MessageUtil.Show(ResourceKeys.UnConnectServer + "[By Delphi]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
DBConfig.Instance.dephiConnection = "";
|
||||||
DBConfig.Instance.WriteConfig();
|
DBConfig.Instance.WriteConfig();
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
IniHelper.Write("SystemResources.ini", "FrmConfigFlag", "0");
|
IniHelper.Write("SystemResources.ini", "FrmConfigFlag", "0");
|
||||||
@@ -140,33 +143,4 @@ namespace Lskj.Main
|
|||||||
if (this.frmConfigBtn.Checked)
|
if (this.frmConfigBtn.Checked)
|
||||||
{
|
{
|
||||||
this.Hide();
|
this.Hide();
|
||||||
FrmConfig frmConfig = new FrmConfig();
|
|
||||||
dialogResult = frmConfig.ShowDialog();
|
|
||||||
if (dialogResult == DialogResult.OK)
|
|
||||||
{
|
|
||||||
IniHelper.Write("SystemResources.ini", "FrmConfigFlag", "0");
|
|
||||||
}
|
|
||||||
this.Show();
|
|
||||||
}
|
|
||||||
else if (this.frmConfigLocalBtn.Checked)
|
|
||||||
{
|
|
||||||
this.Hide();
|
|
||||||
FrmConfigLocal frmConfigLocal = new FrmConfigLocal();
|
|
||||||
dialogResult = frmConfigLocal.ShowDialog();
|
|
||||||
if (dialogResult == DialogResult.OK)
|
|
||||||
{
|
|
||||||
IniHelper.Write("SystemResources.ini", "FrmConfigFlag", "1");
|
|
||||||
}
|
|
||||||
this.Show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dialogResult = DialogResult.Cancel;
|
|
||||||
}
|
|
||||||
if (dialogResult == DialogResult.OK)
|
|
||||||
{
|
|
||||||
this.DialogResult = dialogResult;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1078,13 +1078,6 @@ namespace Lskj.Main
|
|||||||
{
|
{
|
||||||
this.chkNotice.Checked = true;
|
this.chkNotice.Checked = true;
|
||||||
}
|
}
|
||||||
if (SystemInfo.Instance.HiddenIntelligentClient)
|
|
||||||
{
|
|
||||||
this.chkClient.Visible = false;
|
|
||||||
this.pictureBox1.Location = new Point(this.chkNotice.Location.X, this.pictureBox1.Location.Y);
|
|
||||||
this.btnSetConfig.Location = new Point(this.pictureBox1.Location.X + this.pictureBox1.Width, this.pictureBox1.Location.Y);
|
|
||||||
this.chkNotice.Location = this.chkClient.Location;
|
|
||||||
}
|
|
||||||
if (SystemInfo.Instance.StartMessageBox)
|
if (SystemInfo.Instance.StartMessageBox)
|
||||||
{
|
{
|
||||||
this.chkNotice.Checked = true;
|
this.chkNotice.Checked = true;
|
||||||
@@ -1096,6 +1089,42 @@ namespace Lskj.Main
|
|||||||
this.chkRemPwd.Enabled = false;//记住密码禁止修改
|
this.chkRemPwd.Enabled = false;//记住密码禁止修改
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (SystemInfo.Instance.HiddenIntelligentClient|| SystemInfo.Instance.HiddenNotification || SystemInfo.Instance.HiddenServerSetting)
|
||||||
|
{
|
||||||
|
List<System.Windows.Forms.Control> controls = new List<System.Windows.Forms.Control>();
|
||||||
|
//隐藏 智能客户端
|
||||||
|
if (SystemInfo.Instance.HiddenIntelligentClient)
|
||||||
|
{
|
||||||
|
this.chkClient.Visible = false;
|
||||||
|
}
|
||||||
|
//隐藏 消息通知
|
||||||
|
if (SystemInfo.Instance.HiddenNotification)
|
||||||
|
{
|
||||||
|
this.chkNotice.Checked = false;
|
||||||
|
this.chkNotice.Visible = false;
|
||||||
|
}
|
||||||
|
//隐藏 设置服务器
|
||||||
|
if (SystemInfo.Instance.HiddenServerSetting)
|
||||||
|
{
|
||||||
|
this.pictureBox1.Visible = false;
|
||||||
|
this.btnSetConfig.Visible = false;
|
||||||
|
}
|
||||||
|
int X = this.chkUpdate.Location.X + this.chkUpdate.Width + 10;
|
||||||
|
//controls.Add(this.chkUpdate);
|
||||||
|
controls.Add(this.chkClient);
|
||||||
|
controls.Add(this.chkNotice);
|
||||||
|
controls.Add(this.pictureBox1);
|
||||||
|
foreach (System.Windows.Forms.Control item in controls)
|
||||||
|
{
|
||||||
|
if (item.Visible)
|
||||||
|
{
|
||||||
|
item.Location = new Point(X, item.Location.Y);
|
||||||
|
X= item.Location.X + item.Width + 10;
|
||||||
|
if (item is PictureBox) this.btnSetConfig.Location = new Point(item.Location.X + item.Width, this.btnSetConfig.Location.Y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.BackgroundImage = BitMapHelper.getBitmap(BitMapEnum.loginbg);
|
this.BackgroundImage = BitMapHelper.getBitmap(BitMapEnum.loginbg);
|
||||||
this.lblCopyright.Text = string.IsNullOrEmpty(SystemInfo.Instance.CopyRight) ? this.lblCopyright.Text : SystemInfo.Instance.CopyRight;
|
this.lblCopyright.Text = string.IsNullOrEmpty(SystemInfo.Instance.CopyRight) ? this.lblCopyright.Text : SystemInfo.Instance.CopyRight;
|
||||||
@@ -1623,12 +1652,13 @@ namespace Lskj.Main
|
|||||||
if (!string.IsNullOrEmpty(UserName) && !SystemInfo.Instance.DisableRememberPassword)
|
if (!string.IsNullOrEmpty(UserName) && !SystemInfo.Instance.DisableRememberPassword)
|
||||||
{
|
{
|
||||||
string[] PwdState = AESUtil.Decrypt(IniHelper.Read(DBConfig.Instance.ServerName + UserName)).Split('^');
|
string[] PwdState = AESUtil.Decrypt(IniHelper.Read(DBConfig.Instance.ServerName + UserName)).Split('^');
|
||||||
if (PwdState.Count() == 2)
|
if (PwdState.Count() >= 2)
|
||||||
{
|
{
|
||||||
chkRemPwd.Checked = Convert.ToBoolean(PwdState[0]);
|
chkRemPwd.Checked = Convert.ToBoolean(PwdState[0]);
|
||||||
if (chkRemPwd.Checked)
|
if (chkRemPwd.Checked)
|
||||||
{
|
{
|
||||||
this.txtPassword.Text = PwdState[1];
|
this.txtPassword.Text = PwdState[1];
|
||||||
|
if(PwdState.Count() > 2) this.txtPassword.Text=string.Join("^", PwdState.Skip(1));
|
||||||
isClear = false;
|
isClear = false;
|
||||||
this.lueUserName.Text = UserName;
|
this.lueUserName.Text = UserName;
|
||||||
this.txtPassword.Focus();
|
this.txtPassword.Focus();
|
||||||
|
|||||||
Reference in New Issue
Block a user