public void loadLevel(int artefactId) { Artefact selectedArtefact = SharedInfo.getCurrGame().getCollection().getArtefactById(artefactId); SharedInfo.getCurrGame().setCurrentArtefact(selectedArtefact); Application.LoadLevel(levelToLoad); }
// Use this for initialization void Start() { string currText; string currButton; string currTitle; game = SharedInfo.getCurrGame(); if (game.getCollectionStatus().getTotalCollected() != game.getCollection().getTotal()) { currText = introText; currButton = introButton; currTitle = introTitle; } else { currText = endText; currButton = endButton; currTitle = endTitle; } GameObject.Find("IntroEndPanel").GetComponentsInChildren <Text>()[0].text = currTitle; GameObject.Find("IntroEndPanel").GetComponentsInChildren <Text>()[1].text = currText; GameObject.Find("IntroEndPanel").GetComponentInChildren <Button>().GetComponentInChildren <Text>().text = currButton; }
public void AssessmentOrderRequest(string clientCode, string providerKey, string custNum, string reqID, string empNum, string uri, string lastName, string firstName, string email) { var info = new SharedInfo { ClientCode = clientCode, // "001", ProviderKey = providerKey, //"abcdef", CustomerNumber = custNum, // "Coke", RequisitionId = reqID //"test01" - Assessment id }; var order = new AssessmentOrder { EmployeeNumber = empNum, // "1", CallBackUri = uri, //"http://*****:*****@andrew.cmu.edu" }; var xml = GenerateAssessmentOrderRequestXml(info, order); PostXmlData("http://localhost:5001/SelectServer/ReceiveXmlData", xml); }
public string GenerateAcknowledgementResponseXml(SharedInfo info, Acknowledgement acknowledgement1, Acknowledgement acknowledgement2, bool flag) { var compiler = new Compiler(); if (flag) { compiler.AddKey("ClientCode", info.ClientCode) .AddKey("ProviderKey", info.ProviderKey) .AddKey("ReceiptId", info.ReceiptId) .AddKey("CustomerNumber", info.CustomerNumber) .AddKey("AssessmentUrl", acknowledgement1.AssessmentUrl) .AddKey("Description", acknowledgement1.Description) .AddKey("Status", acknowledgement1.Status) .AddKey("StatusDate", acknowledgement1.StatusDate); } else { compiler.AddKey("ClientCode", info.ClientCode) .AddKey("ProviderKey", info.ProviderKey) .AddKey("ReceiptId", info.ReceiptId) .AddKey("CustomerNumber", info.CustomerNumber) .AddKey("AssessmentUrl", acknowledgement2.AssessmentUrl) .AddKey("Description", acknowledgement2.Description) .AddKey("Status", acknowledgement2.Status) .AddKey("StatusDate", acknowledgement2.StatusDate); } var path = Directory.GetCurrentDirectory() + "/Controllers/Requests/AcknowledgementTemplate.xml"; var result = compiler.CompileXml(path); return(result); }
public void SendAcknowledgementResponse(string ClientCode, string ProviderKey, string CustomerNumber, bool flag) { var info = new SharedInfo { ClientCode = ClientCode, ProviderKey = ProviderKey, CustomerNumber = CustomerNumber, ReceiptId = "receipt0001" }; var acknowledgement1 = new Acknowledgement() { AssessmentUrl = "http://assessment_url/", Description = "Assessment descriptions" // Not sending status if not started }; var acknowledgement2 = new Acknowledgement() { Status = "80", //0-100 StatusDate = "Noverber 15, 2017" // Not sending status if not started }; var xml = GenerateAcknowledgementResponseXml(info, acknowledgement1, acknowledgement2, flag); PostXmlData("http://localhost:5001/Request/GetAcknowledgementResponse", xml); }
public ConfigurationFixture() { //var jsonConfig = File.ReadAllText(@"nugetviz.json"); //var nugetConfig = new Settings(System.Environment.CurrentDirectory, "NuGet.config"); SharedInfo.Create(System.Environment.CurrentDirectory); //JsonConvert.DeserializeObject<AppConfig>(jsonConfig), nugetConfig); }
public void RestartGame() { gameIsPaused = false; Time.timeScale = 1; SharedInfo.RestartInfo(); ZoneManager.LoadZone(0); }
// Use this for initialization void Start() { game = SharedInfo.getCurrGame(); updateArtefactButtons(); updateWonButton(); }
private void OnTrackingLost() { // pop up stop appearing only if OK was pressed, not when it desappear for tracking lost if (GameObject.Find("InfoPanel-ARartefact") != null) { GameObject.Find("InfoPanel-ARartefact").GetComponent <SceneStatusManager>().setShowPopUp(false); // After it has been seen, set to unseen again as untill the OK button is pressed, the pop-up // should keep appering SharedInfo.getSceneStatus().setUnvisited("ARartefact"); //GameObject.Find("InfoPanel-ARartefact").GetComponent<SceneStatusManager>().UpdateOnce(); } Renderer[] rendererComponents = GetComponentsInChildren <Renderer>(true); Collider[] colliderComponents = GetComponentsInChildren <Collider>(true); // Disable rendering: foreach (Renderer component in rendererComponents) { component.enabled = false; } // Disable colliders: foreach (Collider component in colliderComponents) { component.enabled = false; } //Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " lost"); }
private void LoginButton_Click(object sender, RoutedEventArgs e) { // Přihlášení do systému if (SharedInfo.ServerAddress == "localhost") { try { SharedInfo.RememberOnIPAndPort(); } catch { } } if (!ClientNetworkManager.connectToServer(new Address(SharedInfo.ServerAddress, SharedInfo.Port))) { MessageBox.Show("Nepodařilo se připojit k serveru", "Chyba", MessageBoxButton.OK, MessageBoxImage.Error); } else { if (passwordBox.Password.Length == 0 || usernameTextBox.Text.Length == 0) //kontrola dat { MessageBox.Show("Heslo nebo jméno nemůže být prázdné.", "Login", MessageBoxButton.OK, MessageBoxImage.Information); } else { ClientNetworkManager.sendPacketToServer(new LoginDataPacket(usernameTextBox.Text, passwordBox.Password)); // data se pošlou serveru ClientNetworkManager.pollSynchronizedPackets(); // přijmeme data od serveru - vyhodnocení switch (SharedInfo.userType) { case 1: // Přihlášení bylo úspěšné jako čtenář ClientScreenReaderMain newWindowR = new ClientScreenReaderMain(); newWindowR.Show(); windowClosing = true; this.Close(); break; case 2: // Přihlášení bylo úspěšné jako knihovník ClientScreenManagerMain newWindowA = new ClientScreenManagerMain(); newWindowA.Show(); windowClosing = true; this.Close(); break; case 3: MessageBox.Show("Špatné heslo pro uživatele '" + usernameTextBox.Text + "'.", "Chyba", MessageBoxButton.OK, MessageBoxImage.Error); break; case 4: MessageBox.Show("Uživatel '" + usernameTextBox.Text + "' neexistuje.", "Chyba", MessageBoxButton.OK, MessageBoxImage.Error); break; default: MessageBox.Show("Neznámá chyba při přihašování.", "Chyba", MessageBoxButton.OK, MessageBoxImage.Error); break; } } } }
void Start() { game = SharedInfo.getCurrGame(); draggingArtefact = false; isFirstTime = false; waiting = false; startPoint = transform.position; }
public FeedbackNegocio( SharedInfo sharedInfo, IFeedbackService feedbackService ) { this._sharedInfo = sharedInfo; this._feedbackService = feedbackService; }
public CompraNegocio(ICompraService compraService, IUsuarioRecomendacaoService usuarioRecomendacaoService, SharedInfo sharedInfo ) { this._compraService = compraService; this._usuarioRecomendacaoService = usuarioRecomendacaoService; this.sharedInfo = sharedInfo; }
private void windowClose(object sender, EventArgs e) { // zajišťuje odpojení od serveru (pouze pokud opravdu vypínáme) if (!windowClosing) { ClientNetworkManager.disconnect(); SharedInfo.reset(); } windowClosing = false; }
// Use this for initialization void Start() { game = SharedInfo.getCurrGame(); artefactId = game.getCollectionStatus().getNextToCollect(); nextArtefactToCollect = game.getCollection().getArtefactById(artefactId); GameObject.Find("CluePanel").GetComponentsInChildren <Text>()[0].text = getTitleFromNumber(nextArtefactToCollect.getId() + 1); GameObject.Find("CluePanel").GetComponentsInChildren <Text>()[1].text = nextArtefactToCollect.getClue(); }
void Start() { game = SharedInfo.getCurrGame(); // hide all artefact which are not the current one updateActiveArtefact(); // set the content for the current artefact updateStoryPanelContent(); }
void Start() { game = SharedInfo.getCurrGame(); mTrackableBehaviour = GetComponent <TrackableBehaviour>(); if (mTrackableBehaviour) { mTrackableBehaviour.RegisterTrackableEventHandler(this); } }
public void IntroEndloadLevel() { // Not finished if (SharedInfo.getCurrGame().getCollection().getTotal() != SharedInfo.getCurrGame().getCollectionStatus().getTotalCollected()) { Application.LoadLevel("Clue"); } else { Application.LoadLevel("Menu"); } }
public void loadLevel() { if (levelToLoad == "Quit") { Application.Quit(); } else { SharedInfo.getCurrGame().resetGame(); Application.LoadLevel(levelToLoad); } }
public void UpdateOnce() { sceneStatus = SharedInfo.getSceneStatus(); if (sceneStatus.isVisited(currLevel)) { infoPanel.SetActive(false); } else { infoPanel.SetActive(true); SharedInfo.getSceneStatus().setVisited(currLevel); } }
private string GenerateAssessmentStatusRequest(SharedInfo info) { var compiler = new Compiler() .AddKey("ClientCode", info.ClientCode) .AddKey("ProviderKey", info.ProviderKey) .AddKey("CustomerNumber", info.CustomerNumber) .AddKey("ReceiptId", info.ReceiptId); var path = Directory.GetCurrentDirectory() + "/Controllers/Requests/AssessmentStatusTemplate.xml"; var result = compiler.CompileXml(path); return(result); }
internal static async Task <ReleaseResponse?> GetLatestRelease(bool stable = true) { Uri request = new($"{SharedInfo.GithubReleaseURL}{(stable ? "/latest" : "?per_page=1")}"); if (stable) { return(await GetReleaseFromURL(request).ConfigureAwait(false)); } ImmutableList <ReleaseResponse>?response = await GetReleasesFromURL(request).ConfigureAwait(false); return(response?.FirstOrDefault()); }
public void SendAssessmentStatusRequest() { var info = new SharedInfo { ClientCode = "001", ProviderKey = "abcdef", CustomerNumber = "00001", ReceiptId = "receipt0001" }; var xml = GenerateAssessmentStatusRequest(info); PostXmlData("http://localhost:5001/SelectServer/ReceiveXmlData", xml); }
public EventoNegocio(IEventoCrudService eventoCrudService, IEventoRecomendacaoService eventoRecomendacaoService, IUsuarioRecomendacaoService usuarioRecomendacaoService, IVisitaService visitaService, IEventoRecomendacaoPyService eventoRecomendacaoPy, ITextoRecomendacaoService textoRecomendacaoService, SharedInfo sharedInfo) { this._eventoCrudService = eventoCrudService; this._eventoRecomendacaoService = eventoRecomendacaoService; this._usuarioRecomendacaoService = usuarioRecomendacaoService; this._visitaService = visitaService; this._eventoRecomendacaoPy = eventoRecomendacaoPy; this._textoRecomendacaoService = textoRecomendacaoService; this.sharedInfo = sharedInfo; }
private string GenerateAssessmentOrderRequestXml(SharedInfo info, AssessmentOrder order) { var compiler = new Compiler() .AddKey("ClientCode", info.ClientCode) .AddKey("ProviderKey", info.ProviderKey) .AddKey("CustomerNumber", info.CustomerNumber) .AddKey("RequisitionId", info.RequisitionId) .AddKey("EmployeeNumber", order.EmployeeNumber) // same to UniqueIdentifier .AddKey("CallBackUri", order.CallBackUri) .AddKey("Requestor", order.Requestor) .AddKey("LastName", order.LastName) .AddKey("FirstName", order.FirstName) .AddKey("CandidateEmail", order.CandidateEmail); var path = Directory.GetCurrentDirectory() + "/Controllers/Requests/AssessmentOrderTemplate.xml"; var result = compiler.CompileXml(path); return(result); }
void Start() { game = SharedInfo.getCurrGame(); won = (game.getCollection().getTotal() == game.getCollectionStatus().getTotalCollected()); isJustCollected = game.isArtefactJustCollected(); if (isJustCollected && !won) { levelToGo = "Clue"; if (game.getCurrentArtefact().getId() == 0) // Only for Anubis { SharedInfo.getSceneStatus().setUnvisited("AfterCollection"); } } else { levelToGo = "Collection"; } }
// Use this for initialization void Start() { game = SharedInfo.getCurrGame(); won = (game.getCollection().getTotal() == game.getCollectionStatus().getTotalCollected()); string statusMessage = game.getCollectionStatus().getTotalCollected() + " out of " + game.getCollection().getTotal() + "\n artefacts collected"; string wonMessage = ""; string continueButtonText = "Continue"; if (won) { // Update status message wonMessage = "You Won!"; continueButtonText = "Go to Collection"; // Create particle effect Transform containerTransform = GameObject.Find("Container").gameObject.transform; effect = (Transform)Instantiate(particlesEffect, containerTransform.position, containerTransform.rotation); } GameObject.Find("GameStatus").GetComponentInChildren <Text> ().text = statusMessage; GameObject.Find("WonMessage").GetComponentInChildren <Text> ().text = wonMessage; GameObject.Find("ContinueButton").GetComponentInChildren <Text> ().text = continueButtonText; }
// Use this for initialization void Start() { game = SharedInfo.getCurrGame(); spriteDown = Resources.Load <Sprite>("Sprites/Layout/down"); spriteUp = Resources.Load <Sprite>("Sprites/Layout/up"); lastOrientation = getDeviceOrientation(); if (isPanelUp()) { currSprite = spriteDown; } else { currSprite = spriteUp; } // Everytime the screen is loaded, unless it is the time when the artefact has just been collected, keep the panel down. if (!game.isArtefactJustCollected() && isPanelUp()) { buttonClicked = true; // Simulate the click button to move the button down } }
public async Task <IActionResult> Delete(int?id) { if (id == null) { return(NotFound()); } Contract contract = await _db.Contracts.FirstOrDefaultAsync(m => m.ContractsId == id); if (contract == null) { return(NotFound()); } SharedInfo sharedInfo = await _db.SharedInfo.Where(x => x.SharedInfoId == contract.SharedInfoId).FirstOrDefaultAsync(); _db.SharedInfo.Remove(contract.SharedInfo); _db.Contracts.Remove(contract); await _db.SaveChangesAsync(User.GetLoggedInUserName()); TempData["Success"] = "Rámcová smlouva odstraněna"; return(RedirectToAction(nameof(Index))); }
public void setVisited() { SharedInfo.getSceneStatus().setVisited(currLevel); }
public ActionResult Logout() { //standard logout _authenticationService.SignOut(); SharedInfo _SharedInfo = new SharedInfo(); #region Modify code to use SharedInfo class instead of cookie :By Rachna singh on 23/Sep/2013. // string _cookiePrefix = _config.GetStringValueFromConfig("cookiePrefix", "NewspaperARCHIVE.com"); //if ((Request.Cookies[_cookiePrefix + ".Validation"] != null && Request.Cookies[_cookiePrefix + ".Validation"].HasKeys)) //{ // int UserId = _common.GetIntegerValue(Na.Core.Helpers.SecureNPASecurity.Encryption.DecryptText(_common.GetStringValue(Request.Cookies[_cookiePrefix + ".Validation"].Values["userid"], "")), 0); // _userService.RemoveUserSession(UserId); //} if (_SharedInfo.LoggedInUserInfo.User.UserId > 0) { int UserId = _SharedInfo.LoggedInUserInfo.User.UserId; _userService.RemoveUserSession(UserId); } #endregion ExpireCookie(); Session.Abandon(); // return RedirectToAction("Index", "Homev5"); return Redirect(Na.Core.Configuration.NaConfig.Url.DomainUrl.ToString()); }
// // GET: /Login/ public ActionResult Index() { var model = new LoginModel(); model.forgotMessage = string.Empty; model.loginMessage = string.Empty; model.ReturnUrl = string.Empty; if (!string.IsNullOrWhiteSpace(Request.QueryString["ReturnUrl"])) { model.ReturnUrl = Request.QueryString["ReturnUrl"]; } if (string.IsNullOrWhiteSpace(model.ReturnUrl)) { if (!string.IsNullOrWhiteSpace(_common.GetStringValue(Request.UrlReferrer, ""))) { model.ReturnUrl = _common.GetStringValue(Request.UrlReferrer, ""); } } //************************ Added By Rakesh on 15 July 2013 to Implement the Remember Me Functionality ********* var CheckASPXAUTHCookie = GetCookieValue(FormsAuthentication.FormsCookieName); if (CheckASPXAUTHCookie != "") { var LoginCredentials = FormsAuthentication.Decrypt(CheckASPXAUTHCookie); // By Rakesh-II GetCookeValuesForNextLogin(LoginCredentials.UserData, model); // update credentials in Model var LastReturnPath = ""; /* if last return path is null then get the value from model.ReturnUrl as returned from some * other page & afer validatin we need to show that respective page eg : my account Controller page*/ if (!string.IsNullOrWhiteSpace(Request.QueryString["RequestURL"])) { LastReturnPath = Request.QueryString["RequestURL"]; model.ReturnUrl = LastReturnPath; } else { LastReturnPath = model.ReturnUrl;//Na.Core.Configuration.NaConfig.Url.DomainUrl + "/" + model.ReturnUrl; } // added by Rachna/S on 6 feb 2014 to reduce the time taken on Login hit SharedInfo _sharedInfo = new SharedInfo(); int iUserID = _sharedInfo.LoggedInUserInfo.User.UserId; if (iUserID <= 0) { Reset(model, model.ReturnUrl); // this has to be run only when no user is loggined and try to hit login action } // Below is returend true user validated Successfully , if not then check existance of cookie and set(lbloginIfValidateFromCookie) this to false if (lbloginIfValidateFromCookie == true) { /* * If referrer or last returnurl contains login in then we need to redirect it to the myaccount page * By Vishant Garg 29-08-2013SSSS */ if (!String.IsNullOrEmpty(LastReturnPath) && !LastReturnPath.ToLower().Contains("login")) return Redirect(LastReturnPath); else return Redirect(Na.Core.Configuration.NaConfig.Url.DomainUrl + "/myaccount"); //if (!string.IsNullOrEmpty(LastReturnPath)) // return Redirect(LastReturnPath); } } // ************************* End of Changes ************************** return View(model); }