internal override void SetStateId(string stateId) { base.SetStateId(stateId); // need to update any CallSubDialogs that call this List <Shadow> list = PathMaker.LookupShadowsByShapeType(ShapeTypes.CallSubDialog); foreach (Shadow shadow in list) { CallSubDialogShadow csdShadow = shadow as CallSubDialogShadow; csdShadow.OnSubDialogStateIdChanged(shape.get_UniqueID((short)VisUniqueIDArgs.visGetOrMakeGUID)); } }
internal static void LoadSubDialogListBox(ListBox listBox, string currentValue) { List <ComboBoxItem> list = new List <ComboBoxItem>(); List <Shadow> shadowList = PathMaker.LookupShadowsByShapeType(ShapeTypes.SubDialog); shadowList.Sort(Common.StateIdShadowSorterAlphaNumerical); foreach (Shadow shadow in shadowList) { SubDialogShadow subDialogShadow = shadow as SubDialogShadow; list.Add(new ComboBoxItem(subDialogShadow.GetStateId(), subDialogShadow.GetUniqueId())); } listBox.DataSource = list; listBox.DisplayMember = ComboBoxItem.DisplayMemberName; listBox.ValueMember = ComboBoxItem.ValueMemberName; listBox.SelectedValue = currentValue; }
internal List <ReturnPair> GetReturnPairs() { // find all the call sub dialogs that reference this one // find all their input and outputs and make a table from that List <Shadow> shadowList = PathMaker.LookupShadowsByShapeType(ShapeTypes.CallSubDialog); List <ReturnPair> returnPairs = new List <ReturnPair>(); List <String> alreadyDone = new List <String>(); foreach (Shadow s in shadowList) { CallSubDialogShadow shadow = s as CallSubDialogShadow; if (shadow.GetSubDialogUID() == shape.get_UniqueID((short)VisUniqueIDArgs.visGetOrMakeGUID)) { List <Shadow> inputs = shadow.GetInputs(); List <Shadow> outputs = shadow.GetOutputs(); foreach (Shadow input in inputs) { foreach (Shadow output in outputs) { String key = input.GetGotoName() + output.GetGotoName(); if (!alreadyDone.Contains(key)) { returnPairs.Add(new ReturnPair(input, output)); alreadyDone.Add(key); } } } } } return(returnPairs); }