private void Awake() { stateful = GetComponent <Stateful>(); objectBehaviour = GetComponent <ObjectBehaviour>(); integrity = GetComponent <Integrity>(); spriteHandler = GetComponentInChildren <SpriteHandler>(); }
private void SetColumnOptions() { this.valueSelectColumns.Clear(); DataItemModel fromTable = this.uxTableName.SelectedItem.To <DataItemModel>(); if (fromTable == null) { return; } this.valueSelectColumns.Add(new DataItemModel { DisplayValue = Constants.None, ItemKey = Constants.None }); foreach (DataItemModel tableColumn in Integrity.GetColumnsForTable(fromTable.DisplayValue).OrderBy(t => t.DisplayValue)) { DataItemModel optionColumn = new DataItemModel { DisplayValue = $"{fromTable.DisplayValue}.{tableColumn.DisplayValue}", ItemKey = $"{fromTable.DisplayValue}.{tableColumn.DisplayValue}" }; this.valueSelectColumns.Add(optionColumn); } }
private void ShowAddColumn() { try { ColumnObjectModel column = new ColumnObjectModel { Column_Id = int.MaxValue }; ColumnsEdit columnEdit = new ColumnsEdit(column, this.Table.TableName); bool?result = columnEdit.ShowDialog(); if (result == null || !result.Value) { return; } column.HasModelChanged = false; // This is to clear the model changes values. Especialy for new column creation this.Table.Columns = this.Table.Columns.Add(columnEdit.Column); Integrity.MapColumn(column, this.Table.TableName); if (column.IsForeignkey) { this.ForeignKeyColumnAdded?.Invoke(this, column); } this.TableColumnChanged?.Invoke(this, column); } catch (Exception err) { MessageBox.Show(err.GetFullExceptionMessage()); } }
private void Awake() { integrity = GetComponent <Integrity>(); integrity.OnBurnUpServer += OnBurnUpServer; meatSteakPrefab = Resources.Load <GameObject>("Meat Steak"); registerTile = GetComponent <RegisterTile>(); }
/// <summary> /// Turns this body part into ash while protecting items inside of that cannot be ashed. /// </summary> private void AshBodyPart() { if (currentBurnDamageLevel >= TraumaDamageLevel.CRITICAL) { if (this.BodyPartType == BodyPartType.Chest || this.BodyPartType == BodyPartType.Head) { return; //TODO is temporary weighting on Trauma discussion } IEnumerable <ItemSlot> internalItemList = OrganStorage.GetItemSlots(); foreach (ItemSlot item in internalItemList) { Integrity itemObject = item.ItemObject.OrNull()?.GetComponent <Integrity>(); if (itemObject != null) //Incase this is an empty slot { if (itemObject.Resistances.FireProof || itemObject.Resistances.Indestructable) { Inventory.ServerDrop(item); } } } _ = Spawn.ServerPrefab(OrganStorage.AshPrefab, HealthMaster.RegisterTile.WorldPosition); HealthMaster.DismemberBodyPart(this); _ = Despawn.ServerSingle(gameObject); } }
private void RemoveGenerator(GameObject generatorToRemove, Integrity generatorIntegrity = null, bool removeConnected = true) { foreach (var generator in connectedGenerator.ToArray()) { if (generator.Value.Item1 != generatorToRemove.gameObject) { continue; } InternalRemoveGenerator(generatorToRemove, generator.Key); if (generatorIntegrity == null) { generatorIntegrity = generatorToRemove.GetComponent <Integrity>(); } connectedGenerator.Remove(generator.Key); generatorIntegrity.OnWillDestroyServer.RemoveListener(OnConnectedDestroy); if (removeConnected) { //Tell connected generator to remove us generatorToRemove.GetComponent <FieldGenerator>().RemoveGenerator(gameObject, removeConnected: false); } break; } }
private void AddSelectFromColumnOption(string selectedValue, int desiredIndex) { DataItemModel fromTable = this.uxFromTable.SelectedItem.To <DataItemModel>(); bool haveChild = desiredIndex < this.uxSelectColumnsStack.Children.Count; ComboBoxTool resultBox = haveChild ? this.uxSelectColumnsStack.Children[desiredIndex].To <ComboBoxTool>() : new ComboBoxTool(); if (!haveChild) { resultBox.Items.Add(new DataItemModel { DisplayValue = Constants.None, ItemKey = Constants.None }); foreach (DataItemModel tableColumn in Integrity.GetColumnsForTable(fromTable.DisplayValue).OrderBy(t => t.DisplayValue)) { DataItemModel optionColumn = new DataItemModel { DisplayValue = $"{fromTable.DisplayValue}.{tableColumn.DisplayValue}", ItemKey = $"{fromTable.DisplayValue}.{tableColumn.DisplayValue}" }; resultBox.Items.Add(optionColumn); } resultBox.SelectionChanged += this.SelectColumnChanged; this.uxSelectColumnsStack.Children.Add(resultBox); } resultBox.SelectedValue = selectedValue; }
private void DataBaseTypeLink() { this.uxRelationName.Content = Integrity.BuildForeighKeyName(this.SelectedParentTable.ItemKey.ToString(), this.SelectedChildTable.ItemKey.ToString()); foreach (ColumnObjectModel keyColumn in Integrity.GetObjectModel(this.SelectedParentTable.ItemKey.ToString()).Where(pk => pk.InPrimaryKey)) { ComboBoxTool parentBox = new ComboBoxTool(); ComboBoxTool childBox = new ComboBoxTool(); parentBox.Name = $"{parentComboName}{this.uxParentColumns.Children.Count}"; childBox.Name = $"{childComboName}{this.uxChildColumns.Children.Count}"; parentBox.Items.Add(new DataItemModel { DisplayValue = keyColumn.ColumnName, ItemKey = keyColumn.ColumnName }); foreach (DataItemModel item in Integrity.GetColumnsForTable(this.SelectedChildTable.ItemKey.ToString())) { childBox.Items.Add(item); } parentBox.SelectedValue = keyColumn.ColumnName; this.uxParentColumns.Children.Add(parentBox); this.uxChildColumns.Children.Add(childBox); } }
private void Awake() { gunSlot = GetComponent <ItemStorage>().GetIndexedItemSlot(0); stateful = GetComponent <Stateful>(); objectBehaviour = GetComponent <ObjectBehaviour>(); integrity = GetComponent <Integrity>(); }
public DamageInfo(float damage, AttackType attackType, DamageType damageType, Integrity attackedIntegrity) { DamageType = damageType; Damage = damage; AttackType = attackType; AttackedIntegrity = attackedIntegrity; }
public static string DropForeignKey(string integrityDropString) { IScripting scriptor = Scripting.CreateClass(); string[] keySplit = integrityDropString.Split(new string[] { "||" }, StringSplitOptions.RemoveEmptyEntries); return(scripting.DropForeignKey(Integrity.GetTableSchema(keySplit[0]), keySplit[0], keySplit[1])); }
private void Awake() { registerTile = GetComponent <RegisterTile>(); integrity = GetComponent <Integrity>(); wrenchSecurable = GetComponent <WrenchSecurable>(); spriteHandler = GetComponentInChildren <SpriteHandler>(); directional = GetComponent <Directional>(); }
private void Awake() { spriteHandler = GetComponentInChildren <SpriteHandler>(); objectBehaviour = GetComponent <ObjectBehaviour>(); registerTile = GetComponent <RegisterTile>(); objectAttributes = GetComponent <ObjectAttributes>(); integrity = GetComponent <Integrity>(); }
public ItemCopyer(IPersister persister, Navigator navigator, Integrity.IIntegrityManager integrity, IVersionManager versions, ContentVersionRepository versionRepository) { this.persister = persister; this.navigator = navigator; this.integrity = integrity; this.versions = versions; this.versionRepository = versionRepository; }
public void IntegrityIdentityFileWrongSignature() { ReadData dataTest = new ReadData("beidpkcs11.dll"); Integrity integrityTest = new Integrity(); byte[] idFile = dataTest.GetIdFile(); byte[] idSignatureFile = dataTest.GetAddressSignatureFile(); byte[] certificateRRN = dataTest.GetCertificateRNFile(); Assert.False(integrityTest.Verify(idFile, idSignatureFile, certificateRRN)); }
private void Awake() { spriteRenderer = GetComponentInChildren <SpriteRenderer>(); APCConnectionHandler = GetComponent <APCPoweredDevice>(); power = GetComponent <APCPoweredDevice>(); registerTile = GetComponent <RegisterTile>(); integrity = GetComponent <Integrity>(); integrity.OnApplyDamage.AddListener(OnDamageReceived); }
private void Awake() { if (currentState != TeslaCoilState.Grounding) { moduleSupplyingDevice = GetComponent <ModuleSupplyingDevice>(); } wrenchSecurable = GetComponent <WrenchSecurable>(); integrity = GetComponent <Integrity>(); }
private void Awake() { registerTile = GetComponent <RegisterTile>(); itemStorage = GetComponent <ItemStorage>(); apcPoweredDevice = GetComponent <APCPoweredDevice>(); integrity = GetComponent <Integrity>(); accessRestrictions = GetComponent <AccessRestrictions>(); lineRenderer = GetComponentInChildren <LineRenderer>(); }
private void EnsureInit() { if (isInit) { return; } if (mLightRendererObject == null) { mLightRendererObject = LightSpriteBuilder.BuildDefault(gameObject, new Color(0, 0, 0, 0), 12); } if (spriteRenderer == null) { spriteRenderer = GetComponentInChildren <SpriteRenderer>(); } if (spriteRendererLightOn == null) { spriteRendererLightOn = GetComponentsInChildren <SpriteRenderer>().Length > 1 ? GetComponentsInChildren <SpriteRenderer>()[1] : GetComponentsInChildren <SpriteRenderer>()[0]; } if (lightSprite == null) { lightSprite = mLightRendererObject.GetComponent <LightSprite>(); } if (emergencyLightAnimator == null) { emergencyLightAnimator = GetComponent <EmergencyLightAnimator>(); } if (integrity == null) { integrity = GetComponent <Integrity>(); } if (directional == null) { directional = GetComponent <Directional>(); } if (currentState == null) { ChangeCurrentState(InitialState); } if (traitRequired == null) { traitRequired = currentState.TraitRequired; } if (!isWithoutSwitch) { switchState = InitialState == LightMountState.On; } }
public void IntegrityFails() { ReadData dataTest = new ReadData("beidpkcs11.dll"); Integrity integrityTest = new Integrity(); byte[] idFile = dataTest.GetIdFile(); byte[] idSignatureFile = dataTest.GetIdSignatureFile(); byte[] certificateRRN = null; Assert.False(integrityTest.Verify(idFile, idSignatureFile, certificateRRN)); }
void Awake() { cnt = GetComponent <CustomNetTransform>(); registerObj = GetComponent <RegisterObject>(); dirSprites = GetComponent <NPCDirectionalSprites>(); health = GetComponent <LivingHealthBehaviour>(); integrity = GetComponent <Integrity>(); agentParameters.onDemandDecision = true; }
private void Awake() { BlewUp = false; objectBehaviour = GetComponent <ObjectBehaviour>(); registerObject = GetComponent <RegisterObject>(); integrity = GetComponent <Integrity>(); reagentContainerScript = GetComponent <ReagentContainer>(); reagentContainerObjectInteractionScript = GetComponent <ReagentContainerObjectInteractionScript>(); integrity.OnWillDestroyServer.AddListener(WhenDestroyed); }
public void ValidityAuthenticationChain() { ReadData dataTest = new ReadData("beidpkcs11.dll"); Integrity integrityTest = new Integrity(); List<byte[]> caCerts = new List<byte[]>(); caCerts.Add(dataTest.GetCertificateCAFile()); Assert.True(integrityTest.CheckCertificateChain( caCerts, dataTest.GetCertificateAuthenticationFile())); }
public void IntegrityIdentityFile() { ReadData dataTest = new ReadData("beidpkcs11.dll"); Integrity integrityTest = new Integrity(); byte[] idFile = dataTest.GetIdFile(); byte[] idSignatureFile = dataTest.GetIdSignatureFile(); byte[] certificateRRN = dataTest.GetCertificateRNFile(); Assert.IsTrue(integrityTest.Verify(idFile, idSignatureFile, certificateRRN)); }
public void IntegrityIdentityFileWrongCertificate() { ReadData dataTest = new ReadData("beidpkcs11.dll"); Integrity integrityTest = new Integrity(); byte[] idFile = dataTest.GetIdFile(); byte[] idSignatureFile = dataTest.GetIdSignatureFile(); byte[] certificateRoot = dataTest.GetCertificateRootFile(); Assert.False(integrityTest.Verify(idFile, idSignatureFile, certificateRoot)); }
private void Awake() { if (!CustomNetworkManager.IsServer) { return; } integrity = GetComponent <Integrity>(); integrity.OnWillDestroyServer.AddListener(WhenDestroyed); }
public void ValidityAuthenticationChain() { ReadData dataTest = new ReadData("beidpkcs11D.dll"); Integrity integrityTest = new Integrity(); List <byte[]> caCerts = new List <byte[]>(); caCerts.Add(dataTest.GetCertificateCAFile()); Assert.True(integrityTest.CheckCertificateChain( caCerts, dataTest.GetCertificateAuthenticationFile())); }
private void Awake() { cnt = GetComponent <CustomNetTransform>(); registerObj = GetComponent <RegisterObject>(); objectBehaviour = GetComponent <ObjectBehaviour>(); directional = GetComponent <Directional>(); health = GetComponent <LivingHealthBehaviour>(); integrity = GetComponent <Integrity>(); OriginTile = GetComponent <RegisterTile>(); agentParameters.onDemandDecision = true; }
public static void SetActive(object gameObject, bool active) { Integrity.EnsureNotNull(gameObject); Integrity.EnsureGameObject(gameObject); var setActive = GameObjectType.GetMethod( Resources.UnityEngine.GameObjectSetActiveMethodName, BindingFlags.Public | BindingFlags.Instance ); setActive.Invoke(gameObject, new object[] { active }); }
private void Awake() { HackingProcessBase = GetComponent <HackingProcessBase>(); if (CustomNetworkManager.IsServer == false) { return; } integrity = GetComponent <Integrity>(); integrity.OnWillDestroyServer.AddListener(WhenDestroyed); }
private void Awake() { spriteRenderer = GetComponentInChildren <SpriteRenderer>(); APCConnectionHandler = GetComponent <APCPoweredDevice>(); power = GetComponent <APCPoweredDevice>(); registerTile = GetComponent <RegisterTile>(); integrity = GetComponent <Integrity>(); integrity.OnApplyDamage.AddListener(OnDamageReceived); audioSourceParameters = new AudioSourceParameters(Volume, 0, 0, 0, 1, Spread, MinSoundDistance, MaxSoundDistance, MixerType.Muffled, VolumeRolloffType.EaseInAndOut, false); }
private void Awake() { APCConnectionHandler = GetComponent <APCPoweredDevice>(); power = GetComponent <APCPoweredDevice>(); registerTile = GetComponent <RegisterTile>(); integrity = GetComponent <Integrity>(); integrity.OnApplyDamage.AddListener(OnDamageReceived); audioSourceParameters = new AudioSourceParameters(volume: Volume, spatialBlend: 1, spread: Spread, minDistance: MinSoundDistance, maxDistance: MaxSoundDistance, mixerType: MixerType.Muffled, volumeRolloffType: VolumeRolloffType.EaseInAndOut); }
public static void DetachSceneLoadedEventHandler() { Integrity.EnsureNotNull(PreviousSceneLoadedAttachTarget); Integrity.EnsureNotNull(SceneLoadedEventHandlerDelegate); var ev = SceneManagerType.GetEvent( Resources.UnityEngine.SceneLoadedEventName, BindingFlags.Public | BindingFlags.Static ); ev.RemoveEventHandler(PreviousSceneLoadedAttachTarget, SceneLoadedEventHandlerDelegate); }
public void IntegrityAddressFile() { ReadData dataTest = new ReadData("beidpkcs11.dll"); Integrity integrityTest = new Integrity(); byte[] addressFile = trimRight(dataTest.GetAddressFile()); byte[] idSignatureFile = dataTest.GetIdSignatureFile(); byte[] concatFiles = new byte[addressFile.Length + idSignatureFile.Length]; Array.Copy(addressFile, 0, concatFiles, 0, addressFile.Length); Array.Copy(idSignatureFile, 0, concatFiles, addressFile.Length, idSignatureFile.Length); byte[] addressSignatureFile = dataTest.GetAddressSignatureFile(); byte[] certificateRRN = dataTest.GetCertificateRNFile(); Assert.True(integrityTest.Verify(concatFiles, addressSignatureFile, certificateRRN)); }
public void SignSignature() { // Sign Sign signTest = new Sign("beidpkcs11.dll"); byte[] testdata = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; byte[] signeddata = signTest.DoSign(testdata, "Signature"); Assert.IsNotNull(signeddata); // Verification ReadData dataTest = new ReadData("beidpkcs11.dll"); Integrity integrityTest = new Integrity(); Assert.False(integrityTest.Verify(testdata, signeddata, dataTest.GetCertificateAuthenticationFile())); Assert.True(integrityTest.Verify(testdata, signeddata, dataTest.GetCertificateSignatureFile())); }
protected void SetErrorMessage(BaseValidator validator, Integrity.NameOccupiedException ex) { Trace.Write(ex.ToString()); string message = string.Format("An item named '{0}' already exists below '{1}'", ex.SourceItem.Name, ex.DestinationItem.Name); SetErrorMessage(validator, message); }
protected void SetErrorMessage(BaseValidator validator, Integrity.DestinationOnOrBelowItselfException ex) { Trace.Write(ex.ToString()); string message = string.Format("Cannot move an item to a destination onto or below itself", ex.SourceItem.Name, ex.DestinationItem.Name); SetErrorMessage(validator, message); }