예제 #1
0
        private double handChangeTime = 2; //seconds to wait for hand change

        public KinectManager(IDrawingBoard board)
        {
            this.board = board;
            filter     = new KinectJointFilter(0.5f, 0.5f, 0.5f, 0.05f, 0.04f);
            //filter = new KinectJointFilter(0.7f, 0.3f, 1f, 1f, 1f);
            StartKinect();
        }
예제 #2
0
        public void DoAction(IDrawingBoard board, IGraphEvent graphEvt)
        {
            frmProps frm = this.props as frmProps;

            this.ActivityValue  = frm.PropertyResult;
            lblDescription.Text = frm.Description;
        }
        public void PreLoadDescription(IDrawingBoard board)
        {
            if (lblDescription == null)
            {
                lblDescription      = new Label();
                lblDescription.Tag  = "";
                lblDescription.Text = "";
                lblDescription.Size = new Size(60, 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();
            }
        }
예제 #4
0
 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;
 }
예제 #5
0
 public KinectManager(IDrawingBoard board)
 {
     this.board = board;
     filter = new KinectJointFilter(0.5f, 0.5f, 0.5f, 0.05f, 0.04f);
     //filter = new KinectJointFilter(0.7f, 0.3f, 1f, 1f, 1f);
     StartKinect();
 }
 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["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["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["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;
 }
예제 #10
0
        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 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;
        }
예제 #15
0
        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;
        }
예제 #16
0
        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 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;
        }
예제 #18
0
        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 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();
            }
        }
예제 #20
0
 public static void Initialize(IDrawingBoard _board)
 {
     board = _board;
 }
예제 #21
0
 public void DoAction(IDrawingBoard board, IGraphEvent graphEvt)
 {
     lblDescription.Text = ((frmProps)props).Description;
 }
 public void DoAction(IDrawingBoard board, IGraphEvent graphEvt)
 {
     lblDescription.Text         = ((frmProps)props).Description;
     this.mapValue["hangupcode"] = ((frmProps)props).HangupCode;
 }
예제 #23
0
 public TestSuite(IDrawingBoard board, DataSource source)
 {
     this.source = source;
     this.board  = board;
     UserID      = Logger.CurrentLogger.NewUser();
 }
예제 #24
0
 public TestSuite(IDrawingBoard board, DataSource source)
 {
     this.source = source;
     this.board = board;
     UserID = Logger.CurrentLogger.NewUser();
 }
예제 #25
0
 public void DoAction(IDrawingBoard board, IGraphEvent graphEvt)
 {
     lblDescription.Text       = ((frmProps)props).Description;
     this.mapValue["password"] = ((frmProps)props).Password;
 }
 public void DoAction(IDrawingBoard board, IGraphEvent graphEvt)
 {
     throw new NotImplementedException();
 }
 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)
        {
            Dictionary <string, TempNode> mapResult = PropertyResult;

            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.NodeValue = val.Value.NodeValue;
                    node.DocID     = strDocID;
                    //board.AddControl(node.Label);
                    Add(node);
                    GraphContainer.Instance.Nodes[val.Value.NodeName] = node;
                    //AdjustNodePosition();
                }
                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();
                        //AdjustNodePosition();
                    }
                    break;
                }
            }

            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["invalidmsg"]    = ((frmProps)props).InvalidMessage;
            this.mapValue["noinputmsg"]    = ((frmProps)props).NoInputMessage;
            this.mapValue["globaltimeout"] = ((frmProps)props).GlobalTimeout;
            this.mapValue["globalinvalid"] = ((frmProps)props).GlobalInvalid;

            graphEvt.ReDraw();
        }
예제 #29
0
 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)
        {
            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)
 {
     lblDescription.Text  = ((frmProps)props).Description;
     this.mapValue["agi"] = Convert.ToString(((frmProps)props).AGI);
 }
예제 #32
0
 public void DoAction(IDrawingBoard board, IGraphEvent graphEvt)
 {
     lblDescription.Text  = ((frmProps)props).Description;
     this.mapValue["ext"] = ((frmProps)props).Extension;
 }
 public void DoAction(IDrawingBoard board, IGraphEvent graphEvt)
 {
     lblDescription.Text      = ((frmProps)props).Description;
     this.mapValue["mailbox"] = ((frmProps)props).Mailbox;
     this.mapValue["option"]  = ((frmProps)props).Options;
 }