protected override void OnLoad(EventArgs e) { base.OnLoad(e); SuperKey = ApplicationCommon.GetSuperKey(); SetId = ApplicationCommon.GetSetId(); if (!string.IsNullOrEmpty(SuperKey)) { var lstEntityKeys = ApplicationCommon.GetSuperKeyDetails(PrimaryEntity.Value(), SuperKey); foreach (var entityKey in lstEntityKeys) { AddDetailControl(false, entityKey); if (string.IsNullOrEmpty(DeleteIds)) { DeleteIds = entityKey.ToString(); } else { DeleteIds += ", " + entityKey.ToString(); } } } else if (SetId != 0) { AddDetailControl(true, SetId); DeleteIds = SetId.ToString(); } ShowAuditHistory(true); }
protected override void OnInit(EventArgs e) { try { base.OnInit(e); SuperKey = ApplicationCommon.GetSuperKey(); SetId = ApplicationCommon.GetSetId(); var detailsControlPath = "~/Shared/Configuration/UserPreferenceKey/Controls/Details.ascx"; if (!string.IsNullOrEmpty(SuperKey)) { var data = new SuperKeyDetailDataModel(); data.SuperKeyId = Convert.ToInt32(SuperKey); // Change System Entity Type data.SystemEntityTypeId = (int)Framework.Components.DataAccess.SystemEntity.UserPreferenceKey; var dt = Framework.Components.Core.SuperKeyDetailDataManager.Search(data, SessionVariables.RequestProfile); if (dt != null && dt.Rows.Count > 0) { foreach (System.Data.DataRow dr in dt.Rows) { var key = Convert.ToInt32(dr[SuperKeyDetailDataModel.DataColumns.EntityKey]); if (string.IsNullOrEmpty(DeleteIds)) { DeleteIds = key.ToString(); } else { DeleteIds += "," + key.ToString(); } var detailsControl = (Controls.Details)Page.LoadControl(detailsControlPath); detailsControl.SetId = key; detailsControl.BorderClass = ApplicationCommon.DetailsBorderClassName; plcDetailsList.Controls.Add(detailsControl); plcDetailsList.Controls.Add(new LiteralControl("<br />")); chkVisible.Checked = detailsControl.IsHistoryVisible; } } } else if (SetId != 0) { DeleteIds = SetId.ToString(); var detailsControl = (Controls.Details)Page.LoadControl(detailsControlPath); detailsControl.SetId = SetId; plcDetailsList.Controls.Add(detailsControl); chkVisible.Checked = detailsControl.IsHistoryVisible; } } catch (Exception ex) { Response.Write(ex.Message); } }
public override IValue Serialize() => new Dictionary(new Dictionary <IKey, IValue> { [(Text)"equipped"] = equipped.Serialize(), [(Text)"level"] = level.Serialize(), [(Text)"stat"] = Stat.Serialize(), [(Text)"set_id"] = SetId.Serialize(), [(Text)"spine_resource_path"] = SpineResourcePath.Serialize(), }.Union((Dictionary)base.Serialize()));
public override IValue Serialize() { #pragma warning disable LAA1002 var dict = new Dictionary(new Dictionary <IKey, IValue> { [(Text)LegacyEquippedKey] = equipped.Serialize(), [(Text)LegacyLevelKey] = level.Serialize(), [(Text)LegacyStatKey] = Stat.Serialize(), [(Text)LegacySetIdKey] = SetId.Serialize(), [(Text)LegacySpineResourcePathKey] = SpineResourcePath.Serialize(), }.Union((Dictionary)base.Serialize())); if (optionCountFromCombination > 0) { dict = dict.SetItem(OptionCountFromCombinationKey, optionCountFromCombination.Serialize()); } return(dict); #pragma warning restore LAA1002 }
public void VerificaInput(InputField input) { SetId inputAtual = input.GetComponent <SetId>(); Debug.Log("Meu ID é = " + inputAtual.Id); Debug.Log("entrada: " + inputs[inputAtual.Id].text); Debug.Log("reposta: " + resp[inputAtual.Id]); //TODO: CONVERTER TODA A ENTRADA P MINUSCULO if (resp[inputAtual.Id].Equals(inputs[inputAtual.Id].text)) { //Debug.Log("resposta certa"); //inputs[inputAtual.Id].image.color = new Color32(69, 202, 35, 255); //cor verde _acertos[inputAtual.Id] = 1; } else { //Debug.Log("resposta errada"); // inputs[inputAtual.Id].image.color = new Color32(202, 41, 49, 255);//cor vermelha _acertos[inputAtual.Id] = 0; } VerficaAcertos(); }
public void OnDrop(PointerEventData eventData) { if (eventData.pointerDrag.gameObject != null) { setId = eventData.pointerDrag.gameObject.GetComponent <SetId>(); mObj = eventData.pointerDrag.gameObject.GetComponent <MoveObject>(); if (Id == setId.id) { ControllerNewAssociation.Instance.CorrectSong.Play(); eventData.pointerDrag.gameObject.GetComponent <RectTransform>().DOMove(transform.position, 0.3f).SetEase(Ease.OutCubic).Play(); eventData.pointerDrag.gameObject.GetComponent <CanvasGroup>().blocksRaycasts = false; eventData.pointerDrag.gameObject.GetComponent <CanvasGroup>().interactable = false; ControllerNewAssociation.Instance.checkQtd++; } else { eventData.pointerDrag.gameObject.GetComponent <RectTransform>().DOMove(mObj.posinit, 0.3f).SetEase(Ease.OutCubic).Play(); } } }
public void SetaTabela() { System.IO.StreamReader file = new System.IO.StreamReader(pathTable); for (int i = 0; i < colunas.Length; i++) { colunas[i].text = ""; } while ((line = file.ReadLine()) != null) { if (endGame) { endGame.SetActive(false); } // Debug.Log("oque?" + line); if (line == "NOVA TABELA VERDADE") //verifica se é um tabela { line = file.ReadLine(); _tableNumber = Convert(line[0]); // pega o numero dessa tabela e convert p int if (_tableNumber == counter) //instruçoes de leitura aqui // Debug.Log("Tabela " + tableNumber); { line = file.ReadLine(); //pega expressao expressao.text = line; expr = SplitString(line); //separa expr pra associar uma coluna da tabela a uma variavel line = file.ReadLine(); //pega num de linhas da tabela _numLinhas = Convert(line[0]); //Debug.Log(numLinhas); Debug.Log(expr); double totalDeLinhas = Math.Pow(2, System.Convert.ToDouble(_numLinhas)); _acertos = new int[System.Convert.ToInt32(totalDeLinhas)]; Debug.Log(totalDeLinhas); for (int i = 0; i < totalDeLinhas; i++) //a partir da conta do total de linhas pega tdas as linhas { line = file.ReadLine(); //linha da tabela inputs[i] = Instantiate(inputPrefab, new Vector3(0, -75.5f - (85f * i), 0), Quaternion.identity); //seta novo input em sua coordenada inputs[i].transform.SetParent(_resultadoTransform, false); //seta como child de Resultados SetId inputScript = inputs[i].GetComponent <SetId>(); //busca script pra setar o id de cada input inputScript.Id = i; inputs[i].characterLimit = 1; //seta limite de caracteres como apenas 1 if (_vars > _numLinhas) { expr2 = KnowWhatIterate(expr, i); foreach (var item in expr2) { if (item.Contains("-")) { colunas[(_convertColunas[item].GetHashCode() - 5)].text += line[_count] + "\n"; //escreve a linha da tabela no postivo if (line[_count] == 'V') // nega a linha da tabela e escreve no negativo { colunas[_convertColunas[item].GetHashCode()].text += 'F' + "\n"; } else { colunas[_convertColunas[item].GetHashCode()].text += 'V' + "\n"; } _count += 2; } else { colunas[_convertColunas[item].GetHashCode()].text += line[_count] + "\n"; _count += 2; } } _count = 0; } else { foreach (var item in expr) //associa cada coluna da tabela a uma variavel e printa na tela { if (item != null) { if (item.Contains("-")) { colunas[(_convertColunas[item].GetHashCode() - 5)].text += line[_count] + "\n"; //escreve a linha da tabela no postivo if (line[_count] == 'V') // nega a linha da tabela e escreve no negativo { colunas[_convertColunas[item].GetHashCode()].text += 'F' + "\n"; } else { colunas[_convertColunas[item].GetHashCode()].text += 'V' + "\n"; } _count += 2; } else { colunas[_convertColunas[item].GetHashCode()].text += line[_count] + "\n"; _count += 2; } } } _count = 0; } } file.ReadLine(); //lê o espaço entre a tabela e as respostas resps = file.ReadLine(); resp = SplitString(resps); //separa o vetor de respostas p associar aos inputs counter++; break; } } if ((line = file.ReadLine()) == null) //vai para algum lugar, fim do arquivo de tabelas** { TimeScript timer = time.GetComponent <TimeScript>(); _tempos[userCount] = timer.EndGame();// Debug.Log("atualiza text"); for (int i = 0; i < _tempos.Length; i++) { if (_users[i] != null) //Debug.Log("USERS " + users[i] + "TEMPOS " + tempos[i]); { userTable.text += String.Format("{0,-12}{1,24}\n", _users[i], _tempos[i] + " segundos"); } } endFile.SetActive(true); //Debug.Log("não tem mais tabela"); file.DiscardBufferedData(); //line = file.ReadLine(); //path = ""; //pathTable = "/Assets/NewAdds/"; // file.BaseStream.Seek(0, System.IO.SeekOrigin.Begin); } } }
public string BindHeader(string title, ClinicalDocument clinicalDoc, Factory hl7factory, ICS realmCode) { string docheader = String.Empty; header = new CCDAHeader(); realmCode_code = new RealmCode(); typeId = new TypeId(); templateId = new TemplateId(); id = new Id(); code = new Code(); effectiveTime = new EffectiveTime(); confidentialityCode = new ConfidentialityCode(); languageCode = new LanguageCode(); setId = new SetId(); versionNumber = new VersionNumber(); header.Id = id; header.languageCode = languageCode; header.realmCode = realmCode_code; header.code = code; header.effectiveTime = effectiveTime; header.confidentialityCode = confidentialityCode; header.setId = setId; header.versionNumber = versionNumber; header.TemplateId = templateId; header.typeId = typeId; header.title = title; realmCode = hl7factory.CreateCS(); realmCode = hl7factory.CreateCS(); realmCode.Code = header.realmCode.code; clinicalDoc.RealmCode.Add(realmCode); // Manage Clinical Report Header //Manage TypeId clinicalDoc.TypeId.Root = header.typeId.root; clinicalDoc.TypeId.Extension = header.typeId.extension; //END //Manage template Id clinicalDoc.TemplateId.Append().Root = header.TemplateId.root; //END //Manage Header Id clinicalDoc.Id.Init(header.Id.root, header.Id.extension); //END //Manage Header Code clinicalDoc.Code.Code = header.code.code; clinicalDoc.Code.CodeSystemName = header.code.codeSystemName; clinicalDoc.Code.DisplayName = header.code.displayName; clinicalDoc.Code.CodeSystem = header.code.codeSystem; //END //Manage Header Title clinicalDoc.Title.Text = header.title; //END //Manage Header Effective Date clinicalDoc.EffectiveTime.AsDateTime = Convert.ToDateTime(header.effectiveTime.value); //END //Manage Header Confidencial Code clinicalDoc.ConfidentialityCode.Code = header.confidentialityCode.code; clinicalDoc.ConfidentialityCode.CodeSystem = header.confidentialityCode.codeSystem; //END //Manage Header Language Code clinicalDoc.LanguageCode.Code = header.languageCode.code; //END //Manage Header SetId clinicalDoc.SetId.Root = header.setId.root; clinicalDoc.SetId.Extension = header.setId.extension; //END //Manage Header Version clinicalDoc.VersionNumber.Value = header.versionNumber.value; //END //END //docheader = "<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet type='text/xsl' href='CDA.xsl'?>"+clinicalDoc.Xml; docheader = clinicalDoc.Xml; return(docheader.ToString()); }
public override int GetHashCode() { return((SetId.ToString() + "|" + Language).GetHashCode()); }