public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); var editFormTextSettings = source as ASPxSmartGridViewEditFormTextSettings; if (editFormTextSettings == null) { return; } CommandUpdate = editFormTextSettings.CommandUpdate; CommandUpdateWidth = editFormTextSettings.CommandUpdateWidth; PopupEditFormCaption = editFormTextSettings.PopupEditFormCaption; PopupEditFormCaptionWidth = editFormTextSettings.PopupEditFormCaptionWidth; } finally { EndUpdate(); } }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); var textSettings = source as ASPxSmartGridViewTextSettings; if (textSettings == null) { return; } GroupItemCountFormat = textSettings.GroupItemCountFormat; NullGroupDisplayText = textSettings.NullGroupDisplayText; GroupDisplayTextFormat = textSettings.GroupDisplayTextFormat; ConfirmEditFormWindowUnload = textSettings.ConfirmEditFormWindowUnload; SearchResultsSummary = textSettings.SearchResultsSummary; SearchResultsEmptyDetails = textSettings.SearchResultsEmptyDetails; SourceElementNotFound = textSettings.SourceElementNotFound; CallbackTargetNotFound = textSettings.CallbackTargetNotFound; InitNewRow.Assign(textSettings.InitNewRow); StartRowEditing.Assign(textSettings.StartRowEditing); } finally { EndUpdate(); } }
public override void Assign(PropertiesBase source) { base.Assign(source); var smartTableLayoutSettings = source as SmartDataViewTableLayoutSettings; if (smartTableLayoutSettings == null) { return; } ShowInline = smartTableLayoutSettings.ShowInline; }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); var behaviorSettings = source as ASPxSmartGridViewBehaviorSettings; if (behaviorSettings == null) return; ConfirmEditFormWindowUnload = behaviorSettings.ConfirmEditFormWindowUnload; } finally { EndUpdate(); } }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); var smartListBoxProperties = source as SmartListBoxProperties; if (smartListBoxProperties == null) return; DisplayAll = smartListBoxProperties.DisplayAll; DisplayItemCount = smartListBoxProperties.DisplayItemCount; } finally { this.EndUpdate(); } }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); var expandCollapseAllButtonsSettings = source as ASPxSmartGridViewExpandCollapseAllButtonsSettings; if (expandCollapseAllButtonsSettings == null) return; ExpandAllButton.Assign(expandCollapseAllButtonsSettings.ExpandAllButton); ButtonSeparator.Assign(expandCollapseAllButtonsSettings.ButtonSeparator); CollapseAllButton.Assign(expandCollapseAllButtonsSettings.CollapseAllButton); } finally { EndUpdate(); } }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); var commandButtonSeparatorSettings = source as ASPxSmartGridViewCommandButtonSeparatorSettings; if (commandButtonSeparatorSettings == null) return; SeparatorType = commandButtonSeparatorSettings.SeparatorType; Text = commandButtonSeparatorSettings.Text; Image.Assign(commandButtonSeparatorSettings.Image); } finally { EndUpdate(); } }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); var simpleDataViewItemProperties = source as SimpleDataViewItemProperties; if (simpleDataViewItemProperties == null) return; Image.Assign(simpleDataViewItemProperties.Image); Text = simpleDataViewItemProperties.Text; ToolTip = simpleDataViewItemProperties.ToolTip; } finally { EndUpdate(); } }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); var smartListBoxProperties = source as SmartListBoxProperties; if (smartListBoxProperties == null) { return; } DisplayAll = smartListBoxProperties.DisplayAll; DisplayItemCount = smartListBoxProperties.DisplayItemCount; } finally { this.EndUpdate(); } }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); var behaviorSettings = source as ASPxSmartGridViewBehaviorSettings; if (behaviorSettings == null) { return; } ConfirmEditFormWindowUnload = behaviorSettings.ConfirmEditFormWindowUnload; } finally { EndUpdate(); } }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); if (source is ASPxGridViewCommandButtonSettings) { Source.Assign(source); } var smartCommandButtonSettings = source as ASPxSmartGridViewCommandButtonSettings; if (smartCommandButtonSettings == null) { return; } UpdateButton.Assign(smartCommandButtonSettings.UpdateButton); CancelButton.Assign(smartCommandButtonSettings.CancelButton); NewButton.Assign(smartCommandButtonSettings.NewButton); EditButton.Assign(smartCommandButtonSettings.EditButton); ViewButton.Assign(smartCommandButtonSettings.ViewButton); DeleteButton.Assign(smartCommandButtonSettings.DeleteButton); SelectButton.Assign(smartCommandButtonSettings.SelectButton); ApplyFilterButton.Assign(smartCommandButtonSettings.ApplyFilterButton); ClearFilterButton.Assign(smartCommandButtonSettings.ClearFilterButton); ExpandCollapseAllButtons.Assign(smartCommandButtonSettings.ExpandCollapseAllButtons); } finally { EndUpdate(); } }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); var simpleDataViewItemProperties = source as SimpleDataViewItemProperties; if (simpleDataViewItemProperties == null) { return; } Image.Assign(simpleDataViewItemProperties.Image); Text = simpleDataViewItemProperties.Text; ToolTip = simpleDataViewItemProperties.ToolTip; } finally { EndUpdate(); } }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); var expandCollapseAllButtonsSettings = source as ASPxSmartGridViewExpandCollapseAllButtonsSettings; if (expandCollapseAllButtonsSettings == null) { return; } ExpandAllButton.Assign(expandCollapseAllButtonsSettings.ExpandAllButton); ButtonSeparator.Assign(expandCollapseAllButtonsSettings.ButtonSeparator); CollapseAllButton.Assign(expandCollapseAllButtonsSettings.CollapseAllButton); } finally { EndUpdate(); } }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); var commandButtonSettings = source as ASPxSmartGridViewECCommandButtonSettings; if (commandButtonSettings == null) { return; } ButtonType = commandButtonSettings.ButtonType; Text = commandButtonSettings.Text; Image.Assign(commandButtonSettings.Image); } finally { EndUpdate(); } }
// Update is called once per frame void Update() { //if player presses e (scan button) if (Input.GetKeyDown(KeyCode.E)) { //if the scan box is already up, we turn it off instead if (scanBackgroundImage.enabled == false) { //fire raycast from center of the camera/screen Ray ray = cam.ViewportPointToRay(new Vector3(0.5F, 0.5F, 0)); RaycastHit hit; //if the raycast hit something (with a mesh renderer) if (Physics.Raycast(ray, out hit)) { //reference to the target GameObject target = hit.transform.gameObject; //everything properties - all objects will have this PropertiesBase properties = target.GetComponent <PropertiesBase>(); if (properties == null) { scanBackgroundImage.enabled = false; scanText.enabled = false; return; } //turn on the gui scanBackgroundImage.enabled = true; scanText.enabled = true; //master string all of the information will populate string output = ""; //the string is populated with different information based on what properties it has string creator = properties.creator; string species = properties.species; Mobility mobility = properties.mobility; Defense defense = properties.defense; Size size = properties.size; List <Special> special = properties.special; output = $"Creator: {creator}\n" + $"Species: {species}\n" + $"Mobility: {mobility}\n" + $"Defence: {defense}\n" + $"Size: {size}\n"; foreach (Special s in special) { output += s.ToString() + "\n"; } PropertiesNonAnimal nonAnimalProperties = target.GetComponent <PropertiesNonAnimal>(); PropertiesAnimal animalProperties = target.GetComponent <PropertiesAnimal>(); if (nonAnimalProperties != null) { //nonanimal properties Tangibility tangibility = nonAnimalProperties.tangibility; output += $"Tangibility: {tangibility.ToString()} \n"; } else if (animalProperties != null) { //animal properties Diet diet = animalProperties.diet; Activity activity = animalProperties.activity; Strength strength = animalProperties.strength; Speed speed = animalProperties.speed; output += $"Diet: {diet}\n" + $"Activity: {activity}\n" + $"Strength: {strength}\n" + $"Speed: {speed}\n"; } //assign the string to the text output scanText.text = output; } else { scanBackgroundImage.enabled = false; scanText.enabled = false; } } else { //didn't hit anything or want to stop scanning - turn the gui off scanBackgroundImage.enabled = false; scanText.enabled = false; // print("I'm looking at nothing!"); } } //if player presses escape, also turn the gui off if (Input.GetKeyDown(KeyCode.Escape)) { scanBackgroundImage.enabled = false; scanText.enabled = false; } }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); if (source is ASPxGridViewCommandButtonSettings) { Source.Assign(source); } var smartCommandButtonSettings = source as ASPxSmartGridViewCommandButtonSettings; if (smartCommandButtonSettings == null) return; UpdateButton.Assign(smartCommandButtonSettings.UpdateButton); CancelButton.Assign(smartCommandButtonSettings.CancelButton); NewButton.Assign(smartCommandButtonSettings.NewButton); EditButton.Assign(smartCommandButtonSettings.EditButton); ViewButton.Assign(smartCommandButtonSettings.ViewButton); DeleteButton.Assign(smartCommandButtonSettings.DeleteButton); SelectButton.Assign(smartCommandButtonSettings.SelectButton); ApplyFilterButton.Assign(smartCommandButtonSettings.ApplyFilterButton); ClearFilterButton.Assign(smartCommandButtonSettings.ClearFilterButton); ExpandCollapseAllButtons.Assign(smartCommandButtonSettings.ExpandCollapseAllButtons); } finally { EndUpdate(); } }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); var textSettings = source as ASPxSmartGridViewTextSettings; if (textSettings == null) return; GroupItemCountFormat = textSettings.GroupItemCountFormat; NullGroupDisplayText = textSettings.NullGroupDisplayText; GroupDisplayTextFormat = textSettings.GroupDisplayTextFormat; ConfirmEditFormWindowUnload = textSettings.ConfirmEditFormWindowUnload; SearchResultsSummary = textSettings.SearchResultsSummary; SearchResultsEmptyDetails = textSettings.SearchResultsEmptyDetails; SourceElementNotFound = textSettings.SourceElementNotFound; CallbackTargetNotFound = textSettings.CallbackTargetNotFound; InitNewRow.Assign(textSettings.InitNewRow); StartRowEditing.Assign(textSettings.StartRowEditing); } finally { EndUpdate(); } }
public override void Assign(PropertiesBase source) { BeginUpdate(); try { base.Assign(source); var editFormTextSettings = source as ASPxSmartGridViewEditFormTextSettings; if (editFormTextSettings == null) return; CommandUpdate = editFormTextSettings.CommandUpdate; CommandUpdateWidth = editFormTextSettings.CommandUpdateWidth; PopupEditFormCaption = editFormTextSettings.PopupEditFormCaption; PopupEditFormCaptionWidth = editFormTextSettings.PopupEditFormCaptionWidth; } finally { EndUpdate(); } }
public override void Assign(PropertiesBase source) { base.Assign(source); var smartTableLayoutSettings = source as SmartDataViewTableLayoutSettings; if (smartTableLayoutSettings == null) return; ShowInline = smartTableLayoutSettings.ShowInline; }