public Node(Label l, IGraphEvent ge, bool allowDrop, bool allowDraw) { parent = ge; nodeName = l.Tag.ToString(); lblNode = l; //lblNode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; //lblNode.AutoSize = false; lblNode.Size = new Size(nodeWidth, nodeHeight); //labelMouseUp = new MouseEventHandler(lblNode_MouseUp); //labelMouseDown = new MouseEventHandler(lblNode_MouseDown); //labelMouseMove = new MouseEventHandler(lblNode_MouseMove); //labelMouseEnter = new EventHandler(lblNode_MouseEnter); //labelMouseLeave = new EventHandler(lblNode_MouseLeave); //lblNode.MouseUp += labelMouseUp; //lblNode.MouseDown += labelMouseDown; //lblNode.MouseMove += labelMouseMove; //lblNode.MouseEnter += labelMouseEnter; //lblNode.MouseLeave += labelMouseLeave; this.allowDrop = allowDrop; this.allowDraw = allowDraw; this.labelsToolTip = new System.Windows.Forms.ToolTip(); labelsToolTip.IsBalloon = true; }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { lblDescription.Text = ((frmProps)props).Description; this.mapValue["wait"] = Convert.ToString(((frmProps)props).Wait); this.mapValue["dialto"] = ((frmProps)props).DialTo; this.mapValue["options"] = ((frmProps)props).Options; }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { frmProps frm = this.props as frmProps; this.ActivityValue = frm.PropertyResult; lblDescription.Text = frm.Description; }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { lblDescription.Text = ((frmProps)props).Description; this.mapValue["variable1"] = Convert.ToString(((frmProps)props).Variable1); this.mapValue["operator"] = Convert.ToString(((frmProps)props).Operator); this.mapValue["variable2"] = Convert.ToString(((frmProps)props).Variable2); }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { lblDescription.Text = ((frmProps)props).Description; this.mapValue["timerange"] = Convert.ToString(((frmProps)props).TimeRange); this.mapValue["dow"] = Convert.ToString(((frmProps)props).DateOfWeek); this.mapValue["dom"] = Convert.ToString(((frmProps)props).DateOfMonth); this.mapValue["month"] = Convert.ToString(((frmProps)props).Months); }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { lblDescription.Text = ((frmProps)props).Description; this.mapValue["var"] = Convert.ToString(((frmProps)props).Variable); this.mapValue["result"] = Convert.ToString(((frmProps)props).Result); this.mapValue["offset"] = Convert.ToString(((frmProps)props).Offset); this.mapValue["length"] = Convert.ToString(((frmProps)props).Length); }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { lblDescription.Text = ((frmProps)props).Description; this.mapValue["silent"] = Convert.ToString(((frmProps)props).Silent); this.mapValue["duration"] = Convert.ToString(((frmProps)props).Duration); this.mapValue["filename"] = ((frmProps)props).FileName; this.mapValue["options"] = ((frmProps)props).Options; this.mapValue["format"] = ((frmProps)props).Format; }
public void PreLoadIcon(IDrawingBoard board, IGraphEvent graphEvt, Point pos) { Node node = GraphContainer.Instance.CreateNode(board, graphEvt, System.Guid.NewGuid().ToString(), "Done", false, true); node.NodeValue = "Done"; this.Add(node); base.PreLoadIcon(board, graphEvt, pos); }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { lblDescription.Text = ((frmProps)props).Description; this.mapValue["maxdigit"] = Convert.ToString(((frmProps)props).MaxDigit); this.mapValue["retry"] = Convert.ToString(((frmProps)props).MaxRetry); this.mapValue["silent"] = Convert.ToString(((frmProps)props).MaxSilent); this.mapValue["entrymsg"] = ((frmProps)props).EntryMessage; this.mapValue["options"] = ((frmProps)props).Options; this.mapValue["variable"] = ((frmProps)props).Variable; }
public Node CreateNode(IDrawingBoard board, IGraphEvent lpThis, string strNodeName, string strNodeText, bool allowDrop, bool allowDraw) { Label l = new Label(); l.Tag = strNodeName; Node node = new Node(l, lpThis, allowDrop, allowDraw); node.Text = strNodeText; return(node); }
public override IGraphEvent GetNextEvent() { IGraphEvent NextEvent = base.GetNextEvent(); /* if(NextEvent == null) * { * NextEvent = DialogueManager.GetActiveInstance().GetNextEventAfterCurrentDialogue(FindNextOutputLink()); * }*/ return(NextEvent); }
public virtual IGraphEvent GetNextEvent() { IGraphEvent NextEvent = null; EntityLink <EntityType> NextLink = FindNextValidOutputLink(); if (NextLink != null) { NextEvent = NextLink.GetEventAndTriggerLink(); } return(NextEvent); }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { Dictionary <string, TempNode> mapResult = PropertyResult; Dictionary <string, TempNode> .Enumerator en = mapResult.GetEnumerator(); this.mapValue["var"] = ((frmProps)props).Var; while (en.MoveNext()) { KeyValuePair <string, TempNode> val = en.Current; switch (val.Value.Status) { case 0: //unchange break; case 1: //new node { Node node = GraphContainer.Instance.CreateNode(board, graphEvt, val.Value.NodeName, val.Value.NodeText, false, true); node.NodeValue = val.Value.NodeValue; node.DocID = strDocID; Add(node); GraphContainer.Instance.Nodes[val.Value.NodeName] = node; } break; case 2: //update node Node updateNode = Find(val.Value.NodeName); if (updateNode != null) { updateNode.Text = val.Value.NodeText; updateNode.NodeValue = val.Value.NodeValue; } break; case 3: //delete node Node removeNode = Remove(val.Value.NodeName); if (removeNode != null) { //board.RemoveControl(removeNode.Label); GraphContainer.Instance.Nodes.Remove(val.Value.NodeName); GraphContainer.Instance.NodeRelationship.Remove(removeNode); removeNode.Remove(); } break; } } lblDescription.Text = ((frmProps)props).Description; graphEvt.ReDraw(); }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { lblDescription.Text = ((frmProps)props).Description; this.mapValue["bridge"] = Convert.ToString(((frmProps)props).BridgeOnly); this.mapValue["append"] = Convert.ToString(((frmProps)props).AppendFile); this.mapValue["spokevolume"] = Convert.ToString(((frmProps)props).SpokeVolume); this.mapValue["heardvolume"] = Convert.ToString(((frmProps)props).HeardVolume); this.mapValue["overallvolume"] = Convert.ToString(((frmProps)props).OverallVolume); this.mapValue["filename"] = ((frmProps)props).FileName; this.mapValue["cmd"] = ((frmProps)props).Command; this.mapValue["ext"] = ((frmProps)props).Extension; }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { frmProps frm = this.props as frmProps; IActivity dest = null; Dictionary <string, TempNode> mapResult = PropertyResult; Dictionary <string, IActivity> mapActivity = ActivityResult; Dictionary <string, TempNode> .Enumerator en = mapResult.GetEnumerator(); while (en.MoveNext()) { KeyValuePair <string, TempNode> val = en.Current; switch (val.Value.Status) { case 0: //unchange break; case 1: //new node { Node node = GraphContainer.Instance.CreateNode(board, graphEvt, val.Value.NodeName, val.Value.NodeText, false, true); node.DocID = strDocID; node.NodeValue = val.Value.NodeText; //board.AddControl(node.Label); Add(node); GraphContainer.Instance.Nodes[val.Value.NodeName] = node; //AdjustNodePosition(); } break; case 2: //update node break; case 3: //delete node Node removeNode = Remove(val.Value.NodeName); if (removeNode != null) { //board.RemoveControl(removeNode.Label); GraphContainer.Instance.Nodes.Remove(val.Value.NodeName); GraphContainer.Instance.NodeRelationship.Remove(removeNode); removeNode.Remove(); //AdjustNodePosition(); } break; } } graphEvt.ReDraw(); return; }
public void PreLoadIcon(IDrawingBoard board, IGraphEvent graphEvt, Point pos) { string strExt = GraphContainer.Instance.Extension; //Node node = GraphContainer.Instance.CreateNode(board, graphEvt, System.Guid.NewGuid().ToString(), "Start", false, true); //node.NodeValue = "Done"; Node node = GraphContainer.Instance.CreateNode(board, graphEvt, System.Guid.NewGuid().ToString(), strExt, false, true); node.NodeValue = strExt; this.Add(node); base.PreLoadIcon(board, graphEvt, pos); }
public virtual void StartTest(string TestName) { if (RunningTestName != TestName) { RunningTestName = TestName; CurrentTest = MonsterTest.LoadMonsterTest(TestName); } CurrentTestEvent = CurrentTest.GetStartingEvent(); if (CurrentTestEvent == null) { CurrentTest.TestSucceeded(); } }
public virtual void StartTest(string TestName) { if(RunningTestName != TestName) { RunningTestName = TestName; CurrentTest = MonsterTest.LoadMonsterTest(TestName); } CurrentTestEvent = CurrentTest.GetStartingEvent(); if(CurrentTestEvent == null) { CurrentTest.TestSucceeded(); } }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { frmProps frm = this.props as frmProps; IActivity dest = null; if (!frm.RemoveRelationship) { Dictionary <string, IActivity> .Enumerator ee = frm.Result.GetEnumerator(); while (ee.MoveNext()) { KeyValuePair <string, IActivity> pair = ee.Current; dest = pair.Value; break; } if (dest != null) { Node n1 = this.Nodes[0] as Node; Node n2 = dest.EntryNode; Node n3 = this.Nodes[1] as Node; n1.LineNode = new Point(0, 0); n2.LineNode = new Point(0, 0); GraphContainer.Instance.NodeRelationship[n1] = n2; n1.Text = n2.Text; this.mapValue["extension"] = Convert.ToString(((frmProps)props).Extension); this.mapValue["gotolabel"] = Convert.ToString(((frmProps)props).GotoLabel); n3.Text = this.mapValue["gotolabel"]; } } else { Node n1 = this.Nodes[0] as Node; Node n3 = this.Nodes[1] as Node; GraphContainer.Instance.NodeRelationship.Remove(n1); n1.Text = ""; n3.Text = ""; this.mapValue["gotolabel"] = ""; } lblDescription.Text = ((frmProps)props).Description; }
public void PreLoadIcon(IDrawingBoard board, IGraphEvent graphEvt, Point pos) { Node node = GraphContainer.Instance.CreateNode(board, graphEvt, System.Guid.NewGuid().ToString(), "ANSWER", false, true); //board.AddControl(node.Label); node.NodeValue = "ANSWER"; this.Add(node); node = GraphContainer.Instance.CreateNode(board, graphEvt, System.Guid.NewGuid().ToString(), "NOANSWER", false, true); //board.AddControl(node.Label); node.NodeValue = "NOANSWER"; this.Add(node); node = GraphContainer.Instance.CreateNode(board, graphEvt, System.Guid.NewGuid().ToString(), "BUSY", false, true); //board.AddControl(node.Label); node.NodeValue = "BUSY"; this.Add(node); node = GraphContainer.Instance.CreateNode(board, graphEvt, System.Guid.NewGuid().ToString(), "CANCEL", false, true); //board.AddControl(node.Label); node.NodeValue = "CANCEL"; this.Add(node); node = GraphContainer.Instance.CreateNode(board, graphEvt, System.Guid.NewGuid().ToString(), "DONTCALL", false, true); //board.AddControl(node.Label); node.NodeValue = "DONTCALL"; this.Add(node); node = GraphContainer.Instance.CreateNode(board, graphEvt, System.Guid.NewGuid().ToString(), "TORTURE", false, true); //board.AddControl(node.Label); node.NodeValue = "TORTURE"; this.Add(node); node = GraphContainer.Instance.CreateNode(board, graphEvt, System.Guid.NewGuid().ToString(), "CONGESTION", false, true); //board.AddControl(node.Label); node.NodeValue = "CONGESTION"; this.Add(node); node = GraphContainer.Instance.CreateNode(board, graphEvt, System.Guid.NewGuid().ToString(), "CHANUNAVAIL", false, true); //board.AddControl(node.Label); node.NodeValue = "CHANUNAVAIL"; this.Add(node); base.PreLoadIcon(board, graphEvt, pos); }
public Node(Label l, IGraphEvent ge, bool allowDrop) { parent = ge; nodeName = l.Tag.ToString(); lblNode = l; lblNode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; lblNode.AutoSize = false; lblNode.Size = new Size(nodeWidth, nodeHeight); labelMouseUp = new MouseEventHandler(lblNode_MouseUp); labelMouseDown = new MouseEventHandler(lblNode_MouseDown); labelMouseMove = new MouseEventHandler(lblNode_MouseMove); lblNode.MouseUp += labelMouseUp; lblNode.MouseDown += labelMouseDown; lblNode.MouseMove += labelMouseMove; this.allowDrop = allowDrop; }
public override IGraphEvent GetNextEvent() { IGraphEvent NextEvent = null; /* if(RandomlyChosenOutput != -1 && OutputEvents.Count > RandomlyChosenOutput && OutputEvents[RandomlyChosenOutput].LinkedEntities.Count > 0) * { * EntityLink<ConversationBase> ValidLink = OutputEvents[RandomlyChosenOutput].GetValidLink(); * * if(ValidLink != null) * { * NextEvent = ValidLink.GetEventAndTriggerLink(); * } * } * * if(NextEvent == null) * { * NextEvent = base.GetNextEvent(); * }*/ return(NextEvent); }
public void PreLoadIcon(IDrawingBoard board, IGraphEvent graphEvt, Point pos) { this.Position = board.PointToClient(pos.X, pos.Y); this.Width = 50; this.Height = 50; Node node = GraphContainer.Instance.CreateNode(board, graphEvt, System.Guid.NewGuid().ToString(), strActivityName, true, false); //board.AddControl(node.Label); this.AddEntryNode(node); node.Activity = this as object; //mapNodes[lblEntry.Tag.ToString()] = node; //_points.Add(s); //Create description lblDescription = new Label(); lblDescription.Tag = ""; lblDescription.Text = strActivityName; lblDescription.Size = new Size(80, 14); //board.AddControl(lblDescription); //lblDescription.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; //lblDescription.AutoSize = true; //lblDescription.Show(); if (lblFakeLabel == null) { lblFakeLabel = new System.Windows.Forms.Label(); lblFakeLabel.Visible = false; lblFakeLabel.AutoSize = false; lblFakeLabel.BorderStyle = BorderStyle.None; lblFakeLabel.Size = new Size(1, 1); lblFakeLabel.Text = "FakeFakeFake"; board.AddControl(lblFakeLabel); lblFakeLabel.Show(); } }
public virtual bool RunTests() { bool bHasEventToExecute = CurrentTestEvent != null; while(bHasEventToExecute && CurrentTestEvent != null) { bool bStillRunning = CurrentTestEvent.ExecuteEvent(); if(bStillRunning) { bHasEventToExecute = false; } else { IGraphEvent PreviousEvent = CurrentTestEvent; bHasEventToExecute = CurrentTestEvent.IsNextEventImmediate(); CurrentTestEvent = CurrentTestEvent.GetNextEvent(); } } return CurrentTestEvent == null; }
public virtual bool RunTests() { bool bHasEventToExecute = CurrentTestEvent != null; while (bHasEventToExecute && CurrentTestEvent != null) { bool bStillRunning = CurrentTestEvent.ExecuteEvent(); if (bStillRunning) { bHasEventToExecute = false; } else { IGraphEvent PreviousEvent = CurrentTestEvent; bHasEventToExecute = CurrentTestEvent.IsNextEventImmediate(); CurrentTestEvent = CurrentTestEvent.GetNextEvent(); } } return(CurrentTestEvent == null); }
public override IGraphEvent GetNextEvent() { IGraphEvent NextEvent = null; int OutputIndex = GetOutputIndex(); if (OutputIndex != -1 && OutputEvents.Count > OutputIndex && OutputEvents[OutputIndex].LinkedEntities.Count > 0) { EntityLink <MonsterTestBase> ValidLink = OutputEvents[OutputIndex].GetValidLink(); if (ValidLink != null) { NextEvent = ValidLink.GetEventAndTriggerLink(); } } if (NextEvent == null) { NextEvent = base.GetNextEvent(); } return(NextEvent); }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { frmProps frm = this.props as frmProps; IActivity dest = null; Dictionary <string, TempNode> mapResult = PropertyResult; Dictionary <string, IActivity> mapActivity = ActivityResult; Dictionary <string, TempNode> .Enumerator en = mapResult.GetEnumerator(); Dictionary <string, IActivity> .Enumerator ea = mapActivity.GetEnumerator(); if (!frm.RemoveRelationship) { while (ea.MoveNext()) { KeyValuePair <string, IActivity> pair = ea.Current; dest = pair.Value; break; } if (dest != null) { Node n1 = this.primaryNode; Node n2 = dest.EntryNode; n1.LineNode = new Point(0, 0); n2.LineNode = new Point(0, 0); GraphContainer.Instance.NodeRelationship[n1] = n2; n1.Text = n2.Text; } } else { Node n1 = this.primaryNode; GraphContainer.Instance.NodeRelationship.Remove(n1); n1.Text = ""; } while (en.MoveNext()) { KeyValuePair <string, TempNode> val = en.Current; if (val.Value.NodeName != primaryNode.NodeName) { switch (val.Value.Status) { case 0: //unchange break; case 1: //new node { Node node = GraphContainer.Instance.CreateNode(board, graphEvt, val.Value.NodeName, val.Value.NodeText, false, true); node.DocID = strDocID; node.NodeValue = val.Value.NodeText; //board.AddControl(node.Label); Add(node); GraphContainer.Instance.Nodes[val.Value.NodeName] = node; //AdjustNodePosition(); } break; case 2: //update node break; case 3: //delete node Node removeNode = Remove(val.Value.NodeName); if (removeNode != null) { //board.RemoveControl(removeNode.Label); GraphContainer.Instance.Nodes.Remove(val.Value.NodeName); GraphContainer.Instance.NodeRelationship.Remove(removeNode); removeNode.Remove(); //AdjustNodePosition(); } break; } } } lblDescription.Text = ((frmProps)props).Description; this.mapValue["arguments"] = ((frmProps)props).Arguments; graphEvt.ReDraw(); }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { this.mapValue["language"] = Convert.ToString(((frmProps)props).Language); lblDescription.Text = ((frmProps)props).Description; }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { lblDescription.Text = ((frmProps)props).Description; this.mapValue["msgs"] = Convert.ToString(((frmProps)props).Messages); this.mapValue["dtmf"] = Convert.ToString(((frmProps)props).DTMF); }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { throw new NotImplementedException(); }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { lblDescription.Text = ((frmProps)props).Description; this.mapValue["hangupcode"] = ((frmProps)props).HangupCode; }
public void DoAction(IDrawingBoard board, IGraphEvent graphEvt) { lblDescription.Text = ((frmProps)props).Description; }