static ServerInfo() { try { strServer = OperatorFile.GetIniFileString("DataBase", "Server", "", Environment.CurrentDirectory + "\\AmbleAppServer.ini"); } catch (Exception ex) { Logger.Error(ex.Message); MessageBox.Show("Please check the AmbleAppServer.ini file."); } try { ChannelServices.RegisterChannel(new TcpClientChannel(), false); dbinfo = (DatabaseInfo)Activator.GetObject(typeof(DatabaseInfo), "tcp://" + strServer + ":1111/DatabaseInfo"); userId = DesOp.DecryptDES(dbinfo.GetDbUser()); password = DesOp.DecryptDES(dbinfo.GetDbPassword()); } catch (Exception ex) { Logger.Error(ex.Message); Logger.Error(ex.StackTrace); // MessageBox.Show("Can not Connected to the Server---------, Please contact the Admin."); } }
public static string GetPassword() { return DesOp.DecryptDES(OperatorFile.GetIniFileString("Login", "Pwd", "", file)); }