public void Init(FlythroughPlugin plugin)
        {
            mPlugin = plugin;

            mTickListener = new Action<int>(mContainer_Tick);

            mPlugin.LengthChange += mContainer_LengthChange;
            mPlugin.UnPaused += mContainer_UnPaused;
            mPlugin.OnPaused += mContainer_OnPaused;
            mPlugin.SequenceFinished += mContainer_SequenceFinished;
            mPlugin.FlythroughLoaded += mContainer_FlythroughLoaded;
            mPlugin.FlythroughLoading += mContainer_FlythroughLoading;

            synchBoxCheck.Checked = mPlugin.SynchStreams;

            Disposed += new EventHandler(FlythroughPanel_Disposed);
            HandleCreated += new EventHandler(FlythroughPanel_HandleCreated);

            autoStepCheck.Checked = mPlugin.AutoStep;
            loopCheck.Checked = mPlugin.Loop;
            speedLabel.Text = "Speed: " + mPlugin.Speed;
            //speedScroll.Value = (float) mPlugin.Speed;

            mStartEvt = new ComboEvent(mPlugin);
            mStartEvt.Name = "Begin";
            eventsList.Items.Add(mStartEvt);
            mCurrentPanel = startPanel;
        }
Example #2
0
        public void Init(FlythroughPlugin plugin)
        {
            mPlugin = plugin;

            mTickListener = new Action <int>(mContainer_Tick);

            mPlugin.LengthChange      += mContainer_LengthChange;
            mPlugin.UnPaused          += mContainer_UnPaused;
            mPlugin.OnPaused          += mContainer_OnPaused;
            mPlugin.SequenceFinished  += mContainer_SequenceFinished;
            mPlugin.FlythroughLoaded  += mContainer_FlythroughLoaded;
            mPlugin.FlythroughLoading += mContainer_FlythroughLoading;

            synchBoxCheck.Checked = mPlugin.SynchStreams;

            Disposed      += new EventHandler(FlythroughPanel_Disposed);
            HandleCreated += new EventHandler(FlythroughPanel_HandleCreated);

            autoStepCheck.Checked = mPlugin.AutoStep;
            loopCheck.Checked     = mPlugin.Loop;
            speedLabel.Text       = "Speed: " + mPlugin.Speed;
            //speedScroll.Value = (float) mPlugin.Speed;

            mStartEvt      = new ComboEvent(mPlugin);
            mStartEvt.Name = "Begin";
            eventsList.Items.Add(mStartEvt);
            mCurrentPanel = startPanel;
        }
Example #3
0
 public FlythroughState(string name, OverlayPlugin manager, string flythrough)
     : base(name, manager)
 {
     mFlythrough = flythrough;
     mInput = manager.Core.GetPlugin<FlythroughPlugin>();
     mStepListener = new Action<int>(mInput_StepStarted);
 }
        public FlythroughEndTrigger(OverlayPlugin overlayPlugin, XmlNode node)
            : base(node)
        {
            if (!overlayPlugin.Core.HasPlugin<FlythroughPlugin>()) {
                Logger.Warn("Unable to instantiate FlythroughEndTrigger FlythroughPlugin is not registered.");
                return;
            }

            mFlythroughEndListener = new EventHandler(mPlugin_SequenceFinished);
            mPlugin = overlayPlugin.Core.GetPlugin<FlythroughPlugin>();
        }
Example #5
0
        public FlythroughEndTrigger(OverlayPlugin overlayPlugin, XmlNode node)
            : base(node)
        {
            if (!overlayPlugin.Core.HasPlugin <FlythroughPlugin>())
            {
                Logger.Warn("Unable to instantiate FlythroughEndTrigger FlythroughPlugin is not registered.");
                return;
            }

            mFlythroughEndListener = new EventHandler(mPlugin_SequenceFinished);
            mPlugin = overlayPlugin.Core.GetPlugin <FlythroughPlugin>();
        }
        public FlythroughState(OverlayPlugin manager, XmlNode node, IMediaPlayer player)
            : base(GetName(node, "flythrough state"), manager, node, false)
        {
            mStepListener = new Action<int>(mInput_StepStarted);

            mInput = manager.Core.GetPlugin<FlythroughPlugin>();
            bool displaySubtitles = GetBool(node, false, "DisplaySubtitles");
            mFlythrough = GetString(node, null, "File");
            mAutoStepping = GetBool(node, true, "AutoStep");
            mLoop = GetBool(node, true, "Loop");

            if (mFlythrough == null)
                throw new ArgumentException("Unable to load flythrough state. No flythrough file specified.");

            mPlayer = player;
            if (mPlayer != null)
                mDefaultWindow = Manager[0];

            if (displaySubtitles) {
                mSubtitlesText = Manager.MakeText(node.SelectSingleNode("child::SubtitleText"));
                mSubtitlesFont = Manager.MakeText(node.SelectSingleNode("child::SubtitleText"));
            }

            XmlNode stepTextNode = node.SelectSingleNode("child::StepText");
            if (stepTextNode != null)
                mStepText = Manager.MakeText(stepTextNode);

            //mInput.CurrentEventChange += new Action<FlythroughEvent<Camera>,FlythroughEvent<Camera>>(mInput_CurrentEventChange);
            int subtitleTimeout = GetInt(node, 20, "SubtitleTimeout");

            XmlNode stepsRoot = node.SelectSingleNode("child::Steps");
            if (stepsRoot != null) {
                foreach (XmlNode child in stepsRoot.ChildNodes) {
                    if (child is XmlElement) {
                        Step step = new Step(this, child, mSubtitlesText, subtitleTimeout, mPlayer);
                        mSteps.Add(step.StepNum, step);
                    }
                }
            }

            if (displaySubtitles)
                AddFeature(mSubtitlesText);
            if (mStepText != null)
                AddFeature(mStepText);

            XmlNode triggersRoot = node.SelectSingleNode("child::Triggers");
            if (triggersRoot != null) {
                foreach (XmlNode child in triggersRoot.ChildNodes)
                    AddStepTrigger(manager.GetTrigger(child, "flythrough step", null));
            }
        }
Example #7
0
        public FPSRecorderState(OverlayPlugin manager, XmlNode node)
            : base(GetName(node, "initialising FPSRecorder state"), manager, node)
        {
            mFolder     = Path.GetFullPath(GetString(node, "FPS", "Folder"));
            mFlythrough = GetString(node, "Flythroughs/Expriment.xml", "Flythrough");

            if (manager.Core.HasPlugin <FlythroughPlugin>())
            {
                mFlythroughPlugin = manager.Core.GetPlugin <FlythroughPlugin>();
            }
            else
            {
                Logger.Warn("Unable to initialise FPSRecorder, flythroughPlugin not bound.");
            }
        }
 public FlythroughPanel(FlythroughPlugin container)
     : this()
 {
     Init(container);
 }
Example #9
0
 public FlythroughPanel(FlythroughPlugin container)
     : this()
 {
     Init(container);
 }
Example #10
0
        public FlythroughState(OverlayPlugin manager, XmlNode node, IMediaPlayer player)
            : base(GetName(node, "flythrough state"), manager, node, false)
        {
            mStepListener = new Action <int>(mInput_StepStarted);

            mInput = manager.Core.GetPlugin <FlythroughPlugin>();
            bool displaySubtitles = GetBool(node, false, "DisplaySubtitles");

            mFlythrough   = GetString(node, null, "File");
            mAutoStepping = GetBool(node, true, "AutoStep");
            mLoop         = GetBool(node, true, "Loop");

            if (mFlythrough == null)
            {
                throw new ArgumentException("Unable to load flythrough state. No flythrough file specified.");
            }

            mPlayer = player;
            if (mPlayer != null)
            {
                mDefaultWindow = Manager[0];
            }

            if (displaySubtitles)
            {
                mSubtitlesText = Manager.MakeText(node.SelectSingleNode("child::SubtitleText"));
                mSubtitlesFont = Manager.MakeText(node.SelectSingleNode("child::SubtitleText"));
            }

            XmlNode stepTextNode = node.SelectSingleNode("child::StepText");

            if (stepTextNode != null)
            {
                mStepText = Manager.MakeText(stepTextNode);
            }

            //mInput.CurrentEventChange += new Action<FlythroughEvent<Camera>,FlythroughEvent<Camera>>(mInput_CurrentEventChange);
            int subtitleTimeout = GetInt(node, 20, "SubtitleTimeout");

            XmlNode stepsRoot = node.SelectSingleNode("child::Steps");

            if (stepsRoot != null)
            {
                foreach (XmlNode child in stepsRoot.ChildNodes)
                {
                    if (child is XmlElement)
                    {
                        Step step = new Step(this, child, mSubtitlesText, subtitleTimeout, mPlayer);
                        mSteps.Add(step.StepNum, step);
                    }
                }
            }

            if (displaySubtitles)
            {
                AddFeature(mSubtitlesText);
            }
            if (mStepText != null)
            {
                AddFeature(mStepText);
            }

            XmlNode triggersRoot = node.SelectSingleNode("child::Triggers");

            if (triggersRoot != null)
            {
                foreach (XmlNode child in triggersRoot.ChildNodes)
                {
                    AddStepTrigger(manager.GetTrigger(child, "flythrough step", null));
                }
            }
        }