Ejemplo n.º 1
0
        void scanner_RawFrameIn(object sender, Scanner.RawFrameEventArgs e)
        {
            if (SequenceRecording && e.FrameID % SequenceInterval == 0)
            {
                string path = WorkingDirectory + '\\' + SequenceLabel + '_' + SequenceCounter.ToString("D5");
                switch (e.FrameType)
                {
                case Scanner.FrameTypes.Depth:
                    SetSequenceCounter(SequenceCounter + 1);
                    path += ".rwd";
                    break;

                case Scanner.FrameTypes.Color:
                    path += ".rwc";
                    break;
                }
                SequenceTasks.Enqueue(new SequenceTask()
                {
                    Data     = e.Data,
                    FileName = path
                });

                for (int i = 0; i < SaveAREs.Length; i++)
                {
                    SaveAREs[i].Set();
                }
            }
        }
Ejemplo n.º 2
0
    private string FormatPhaseLine()
    {
        StringBuilder builder = new StringBuilder("Quests:");

        // Format of line:
        // Quests:A>n,T>d|B>n,T>d|C>n,T>d
        for (int i = 0; i < _ambassador.SequenceCounters.Count; i++)
        {
            SequenceCounter current = _ambassador.SequenceCounters[i];
            if (DebugMode)
            {
                Debug.Log("Serializing Sequence Counter #" + i + Environment.NewLine
                          + current.ToString());
            }

            builder.Append(current.Name);
            builder.Append(">");
            builder.Append(current.Phase);
            builder.Append(",");
            builder.Append(current.QuestTitle);
            builder.Append(">");
            builder.Append(current.QuestDetails);

            if (i < _ambassador.SequenceCounters.Count - 1)
            {
                builder.Append("|");
            }
        }

        if (DebugMode)
        {
            Debug.Log("Resulting phsae line:" + builder.ToString());
        }

        return(builder.ToString());
    }