private void playbutton_Click(object sender, EventArgs e)
        {
            if (scenario == null)
            {
                return;
            }

            OutputPanel.Instance.LogEvent("- Playback of scenario started", true);
            this.playbutton.Enabled = false;
            this.recbutton.Enabled  = false;
            this.statuslabel.Text   = "Playing...";
            this.status             = Status.Playing;

            if (scenario.action == Scenarios.DobAction.Sequence)
            {
                playTimer.Interval = 10000;
                playTimer.Enabled  = true;
                playIterator       = new Sate.Scenarios.ScenarioTools.ScenarioIterator(scenario);
                PlaybackAction();
            }
        }
        //-------------------------------------------------------
        // Playback, running in a seperate thread
        //-------------------------------------------------------
        private void PlaybackAction()
        {
            if (playIterator == null)
            {
                return;
            }
            if (!playIterator.HasNext())
            {
                playIterator = null;
                stopbutton_Click(null, null);
                return;
            }

            Scenarios.Action a = playIterator.Next();

            switch (a.action)
            {
            case Scenarios.DobAction.Connect:
                PlaybackConnect(a);
                break;

            case Scenarios.DobAction.Disconnect:
                PlaybackDisconnect(a);
                break;

            case Scenarios.DobAction.Register:
                PlaybackRegister(a);
                break;

            case Scenarios.DobAction.Unregister:
                PlaybackUnregister(a);
                break;

            case Scenarios.DobAction.Subscribe:
                PlaybackSubscribe(a);
                break;

            case Scenarios.DobAction.Unsubscribe:
                PlaybackUnsubscribe(a);
                break;

            case Sate.Scenarios.DobAction.SubscribeRegistration:
                PlaybackSubscribeRegistration(a);
                break;

            case Sate.Scenarios.DobAction.UnsubscribeRegistration:
                PlaybackUnsubscribeRegistration(a);
                break;

            case Scenarios.DobAction.SetChangesEntity:
                PlaybackSetChangesEntity(a);
                break;

            case Scenarios.DobAction.SetAllEntity:
                PlaybackSetAllEntity(a);
                break;

            case Scenarios.DobAction.DeleteEntity:
                PlaybackDeleteEntity(a);
                break;

            case Scenarios.DobAction.CreateRequest:
                PlaybackCreateRequest(a);
                break;

            case Scenarios.DobAction.UpdateRequest:
                PlaybackUpdateRequest(a);
                break;

            case Scenarios.DobAction.DeleteRequest:
                PlaybackDeleteRequest(a);
                break;

            case Scenarios.DobAction.ServiceRequest:
                PlaybackServiceRequest(a);
                break;

            case Scenarios.DobAction.SendMessage:
                PlaybackSendMessage(a);
                break;
            }

            if (a.instStepUp)
            {
                a.StepUpInstance();
            }

            playTimer.Interval = a.delay;
        }