public void LoadVitals() { LoadXML("VitalData.xml", _vData); if (_vData.ToString() != "") { //use a referenced UserData here, deserialize from saved string vitalContainerData = (VitalContainer)DeserializeObject(_vData, "VitalData.xml"); } }
private void Start() { // Where we want to save and load to and from - persistant data path at Assets/... _FileLocation = Application.dataPath; //_FileName = "SaveData.xml"; graphData = GameObject.Find("Cursor").GetComponent <PointPlotter>(); // we need soemthing to store the information into vitalContainerData = new VitalContainer(); drugContainerData = new DrugContainer(); uiManager = GetComponent <UIManager>(); PopulateGraphFields(); }
public void UpdateYAxisDD(VitalContainer _vitalData) { yAxisDropdown = GameObject.Find("yAxisDD").GetComponent <Dropdown>(); yAxisDropdown.ClearOptions(); List <string> vitalNames = new List <string>(); foreach (VitalContainer.VitalData vitalData in _vitalData._vitalDat) { vitalNames.Add(vitalData.name.Trim()); } yAxisDropdown.AddOptions(vitalNames); }
public void UpdateVitalInputFields(VitalContainer _vitalData) { List <Dropdown.OptionData> menuOptions = vitalDropDown.GetComponent <Dropdown>().options; foreach (VitalContainer.VitalData vitalData in _vitalData._vitalDat) { if (menuOptions[vitalDropDown.value].text == vitalData.name.Trim()) { vitalName.text = vitalData.name.Trim(); vitalInfo.text = vitalData.info.Trim(); vitalMinStatus.text = vitalData.minStatus.Trim(); vitalMaxStatus.text = vitalData.maxStatus.Trim(); vitalUnits.text = vitalData.units.Trim(); } } }