/// <summary> /// Trả về Rislink Connection /// </summary> public static void GetRisLinkConnection() { var rislinkPath = Config.GetValueFromKey("rislinkpath"); string rislinkConfigFilename; if (!rislinkPath.EndsWith(".config")) rislinkConfigFilename = rislinkPath + Path.DirectorySeparatorChar + "App.config"; else rislinkConfigFilename = rislinkPath; if (!File.Exists(rislinkConfigFilename)) return; var risConfig = new Config(rislinkConfigFilename); var serverName = risConfig.GetValueFromKey("risservername"); var dataBaseName = risConfig.GetValueFromKey("risdatabase"); var userName = risConfig.GetValueFromKey("risusername"); var password = risConfig.GetValueFromKey("rispassword"); var connectionstring = string.Empty; connectionstring = connectionstring + "Data Source=" + serverName + ";"; connectionstring = connectionstring + "Initial Catalog=" + dataBaseName + ";"; connectionstring = connectionstring + "User ID=" + userName + ";"; connectionstring = connectionstring + "Password="******";"; globalVariables.SqlConnectionString = connectionstring; Utility.InitSubSonic(globalVariables.SqlConnectionString, "ORM"); }
private void StartService() { //System.Threading.Thread.Sleep(5000); var config = new Config(); //Get Log parameters string logIp = config.GetValueFromKey("logip"); string logPort = config.GetValueFromKey("logport"); VBLogger.InitLogger(logIp, logPort); VBLogger.LogInfo("Getting Parameters"); DicomScpHelper.GetRisLinkConnection(); VBLogger.LogInfo("Getting Parameters success"); _aeTitle = DicomScpHelper.GetAeTitle(); _port = DicomScpHelper.GetPort(); _storeLocation = DicomScpHelper.GetstoreLocation(); VietBaIT.CommonLibrary.globalVariables.MaKieuDV = DicomScpHelper.GetMaKieuDv(); StorageScp.StorageLocation = _storeLocation; StorageScp.StartListening(_aeTitle, _port); }
private void LoadRislinkConfig(string rislinkConfigFilename) { _risConfig = new Config(rislinkConfigFilename); txtWLDelayTime.Text = _risConfig.GetValueFromKey("wldelaytime"); txtWLServerAETitle.Text = _risConfig.GetValueFromKey("wlserveraetitle"); txtWLPort.Text = _risConfig.GetValueFromKey("wlserverport"); txtRisServerName.Text = _risConfig.GetValueFromKey("risservername"); txtRisDataBase.Text = _risConfig.GetValueFromKey("risdatabase"); txtRisUserName.Text = _risConfig.GetValueFromKey("risusername"); txtRisPassword.Text = _risConfig.GetValueFromKey("rispassword"); }
private void LoadPrinterConfig(string prnConfigFilename) { _prnConfig = new Config(prnConfigFilename); txtPrinterIP.Text = _prnConfig.GetValueFromKey("prnpaddress"); numTimeout.Value = Convert.ToDecimal(_prnConfig.GetValueFromKey("prndelaytime")); txtPrinterAETitle.Text = _prnConfig.GetValueFromKey("prnaetitle"); txtPrinterPort.Text = _prnConfig.GetValueFromKey("prnport"); }
private void SaveRisLinkConfig() { _risConfig = new Config(rislinkConfigFilename); _risConfig.SetValueForKey("wldelaytime", txtWLDelayTime.Text); _risConfig.SetValueForKey("wlserverport", txtWLPort.Text); _risConfig.SetValueForKey("wlserveraetitle", txtWLServerAETitle.Text); _risConfig.SetValueForKey("risservername", txtRisServerName.Text); _risConfig.SetValueForKey("risdatabase", txtRisDataBase.Text); _risConfig.SetValueForKey("risusername", txtRisUserName.Text); _risConfig.SetValueForKey("rispassword", txtRisPassword.Text); _risConfig.SaveConfig(); }