public void VisitControlIndex(ControlIndex index) { currentNode = rootNode.GetOrCreateControlStackNode(collector, index.CallLevel); processIndexName(index); processIndexPath(index); processAlias(index); }
/// <inheritdoc /> public override void AddLocalLevel() { CopyStackContext context = new CopyStackContext(localLevel); context.WriteableVariables.SetUnknownIndex(VariableIndex.CreateUnknown(localLevel)); context.WriteableControllVariables.SetUnknownIndex(ControlIndex.CreateUnknown(localLevel)); memoryStack.Add(context); localLevel++; }
/// <inheritdoc /> public override void AddStackLevel(int level) { IWriteableStackContext context = Factories.StructuralContainersFactories.StackContextFactory.CreateWriteableStackContext(level); context.WriteableVariables.SetUnknownIndex(VariableIndex.CreateUnknown(level)); context.WriteableControllVariables.SetUnknownIndex(ControlIndex.CreateUnknown(level)); NewIndex(context.WriteableVariables.UnknownIndex); NewIndex(context.WriteableControllVariables.UnknownIndex); memoryStack.Add(level, context); }
/// <inheritdoc /> public void VisitControlIndex(ControlIndex index) { MemoryIndexTreeStackContext stackContext = getStackLevel(index); if (index.MemoryRoot.IsAny) { addToRoot(index, stackContext.ControlsTreeRoot.GetOrCreateAny()); } else { addToRoot(index, stackContext.ControlsTreeRoot.GetOrCreateChild(index.MemoryRoot.Name)); } }
public static DirectionIndex ParseDirectionIndex(this ControlIndex control) { switch (control) { case ControlIndex.LeftTrigger: case ControlIndex.LeftStick: return(DirectionIndex.Left); case ControlIndex.RightTrigger: case ControlIndex.RightStick: return(DirectionIndex.Right); default: return(DirectionIndex.None); } }
/// <summary> /// Processes the controls. /// </summary> /// <param name="stackLevel">The stack level.</param> /// <param name="node">The node.</param> private void processControls(int stackLevel, CollectorNode node) { if (node.HasUndefinedChildren) { IWriteableIndexContainer writeableVariableContainer = Structure.GetWriteableStackContext(stackLevel).WriteableControllVariables; foreach (var newChild in node.UndefinedChildren) { string childName = newChild.Item1; MemoryCollectorNode childNode = newChild.Item2; MemoryIndex index = ControlIndex.Create(childName, stackLevel); childNode.TargetIndex = index; writeableVariableContainer.AddIndex(childName, index); } } enqueueChildNodes(node); }
private void PropertyChangeConfirm_Click(object sender, EventArgs e) { switch (ControlIndex.ToString().Split(',')[0].Split('.')[1]) { case "mButtonStart": //MessageBox.Show("mButton_Start"); mButtonStart ButtonStart = (mButtonStart)ControlIndex; ButtonStart.DelayTime = int.Parse(this.PropertyTextBoxArray[0].Text); break; default: MessageBox.Show(ControlIndex.ToString().Split(',')[0].Split('.')[1]); break; } for (int i = 0; i < 10; i++) { this.PropertyLabelArray[i].Hide(); this.PropertyTextBoxArray[i].Hide(); } }
public static ControlType ParseControlType(this ControlIndex control) { switch (control) { case ControlIndex.A: case ControlIndex.B: case ControlIndex.X: case ControlIndex.Y: return(ControlType.Face); case ControlIndex.DPadUp: case ControlIndex.DPadDown: case ControlIndex.DPadLeft: case ControlIndex.DPadRight: return(ControlType.DPad); case ControlIndex.LeftShoulder: case ControlIndex.RightShoulder: return(ControlType.Shoulder); case ControlIndex.LeftTrigger: case ControlIndex.RightTrigger: return(ControlType.Trigger); case ControlIndex.Start: case ControlIndex.Back: case ControlIndex.Guide: return(ControlType.Option); case ControlIndex.LeftThumb: case ControlIndex.RightThumb: return(ControlType.Thumb); case ControlIndex.LeftStick: case ControlIndex.RightStick: return(ControlType.Stick); default: return(ControlType.None); } }
/// <inheritdoc /> public MemoryIndex createMemoryIndex(string name) { return(ControlIndex.Create(name, stackLevel)); }
public Control(ControlIndex pIndex) { index = pIndex; }
public Stick(ControlIndex pIndex) : base(pIndex) { }
public Trigger(ControlIndex pIndex) : base(pIndex) { }
public DirectionalControl(ControlIndex pIndex) : base(pIndex) { directionIndex = index.ParseDirectionIndex(); }
public DPad(ControlIndex pIndex) : base(pIndex) { }