private void save(StepStruct s) { s.namspace = tbNamespace.Text; s.name = tbClassName.Text; s.upperCase = chkUpperCase.Checked; s.fnumber = s.NumbersList[cbNumberType.SelectedIndex].Key; }
private void initializeStep(int idStp) { StepStruct currentStep = steps[idStp]; List <ConsequenceStruct> consequences = currentStep.consequences; foreach (ConsequenceStruct cons in consequences) { initializeConsequence(cons); } if (!endNode) { if (currentStep.conditions.Count != 0) { List <ConditionStruct> conditions = currentStep.conditions; foreach (ConditionStruct cond in conditions) { initializeCondition(cond); } } GameObject.Find("TaskName").GetComponent <UnityEngine.UI.Text>().text = currentStep.nameStep; GameObject.Find("TaskDescription").GetComponent <UnityEngine.UI.Text>().text = currentStep.descriptionStep; } }
private void render(StepStruct s) { tbNamespace.Text = s.namspace; tbClassName.Text = s.name; chkUpperCase.Checked = s.upperCase; cbNumberType.Items.Clear(); if (manager.StepGen.gtype == GenType.CSharpStruct) { cbNumberType.Enabled = false; // support only System.Version s.fnumber = StepStruct.NumberType.SystemVersion; } else { cbNumberType.Enabled = true; if (manager.StepGen.gtype == GenType.CppStruct) { s.fnumber = StepStruct.NumberType.NativeStruct; // to start with native } } cbNumberType.Items.AddRange(s.NumbersList.Select(i => i.Value).ToArray()); cbNumberType.SelectedIndex = s.NumbersList.FindIndex(i => i.Key == s.fnumber); }