Exemplo n.º 1
0
        private void NextStep(object sender, RoutedEventArgs e)
        {
            IAssemblingAction action = GetNextBlock(testSequence.WorkingSpace.Robot, testSequence.WorkingSpace);

            if (action != null)
            {
                testSequence.Actions.Add(action);
                testSequence.ExecuteNext();
            }
            action = PutNextBlock(testSequence.WorkingSpace.Robot, testSequence.WorkingSpace);
            if (action != null)
            {
                testSequence.Actions.Add(action);
                testSequence.ExecuteNext();
            }

            timeText.Text = testSequence.ExecutionTime.TotalSeconds.ToString();

            WorkspaceDrawer drawer = new WorkspaceDrawer(400, 400, Color.White)
            {
                WorkspaceSize = new SizeF(1000, 1000),
                FrameColor    = Color.Gray,
                ColorTable    = testTable
            };

            drawer.Draw(testSequence.WorkingSpace, new PointF(200, 200));

            UpdateImage(drawer.Drawing);
        }
Exemplo n.º 2
0
 public void ExecuteNext()
 {
     if (NextAction < Actions.Count)
     {
         IAssemblingAction action = Actions[NextAction];
         ExecutionTime = action.Execute(ExecutionTime);
         NextAction++;
     }
 }