Exemple #1
0
        public void GetVideoBitmapTest()
        {
            string[] files = Directory.GetFiles("C:\\KStudioRepo", "*.xef");
            using (KStudioClient client = KStudio.CreateClient()) {
                client.ConnectToService();
                using (KStudioPlayback playback = client.CreatePlayback(files[0])) {
                    playback.Start();
                    VideoStream stream = VideoStream.Instance;
                    Assert.IsNotNull(stream);

                    while (playback.State == KStudioPlaybackState.Playing)
                    {
                        System.Threading.Thread.Sleep(500);
                        VFrame frame = (VFrame)stream.GetFrame();
                        if (frame == null)
                        {
                            continue;
                        }
                        WriteableBitmap bmp = frame.GetBitmap();
                        Assert.IsNotNull(bmp);
                    }

                    Assert.AreNotEqual(playback.State, KStudioPlaybackState.Error);
                }
            }
        }
Exemple #2
0
    public override void Do()
    {
        VFrame frame = Edit.use.tile.GetAnimation(animationIndex).GetFrame(frameIndex);

        oldDuration = frame.GetDuration();

        frame.SetDuration(duration);
    }
Exemple #3
0
 public string ProfileInformationShort()
 {
     return(string.Format("{0} {1} Version: {2} Timer0: {3} - {4} VCount: {5} VFrame: {6} GxStat: {7}",
                          DSType.ToString().Replace('_', ' '), MAC_Address.ToString("X"),
                          Language + " " + Version,
                          Timer0Min.ToString("X"), Timer0Max.ToString("X"), VCount.ToString("X"),
                          VFrame.ToString("X"), GxStat.ToString("X")));
 }
Exemple #4
0
    public int AddFrame(int animationIndex, VFrame frame)
    {
        VAnimation anim = animations[animationIndex];

        anim.AddFrame(frame);
        for (int layer = 0; layer < GetLayerCount(); layer++)
        {
            chunks.Add(new VTileChunk(layer, animationIndex, anim.GetFrameCount() - 1, width, height, depth));
        }
        SetDirty();
        return(anim.GetFrameCount() - 1);
    }
Exemple #5
0
 public void InsertFrame(int animationIndex, int frameIndex, VFrame frame)
 {
     foreach (VChunk chunk in chunks)
     {
         if (chunk.GetAnimationIndex() == animationIndex && chunk.GetFrameIndex() >= frameIndex)
         {
             chunk.SetFrameIndex(chunk.GetFrameIndex() + 1);
         }
         animations[animationIndex].InsertFrame(frameIndex, frame);
         for (int layer = 0; layer < GetLayerCount(); layer++)
         {
             chunks.Add(new VTileChunk(layer, animationIndex, frameIndex, width, height, depth));
         }
     }
     SetDirty();
 }
Exemple #6
0
    public override bool IsNoOp()
    {
        VFrame frame = Edit.use.tile.GetAnimation(animationIndex).GetFrame(frameIndex);

        return(duration == frame.GetDuration());
    }
Exemple #7
0
 public void InsertFrame(int index, VFrame frame)
 {
     frames.Insert(index, frame);
     SetDirty();
 }
Exemple #8
0
 public int AddFrame(VFrame frame)
 {
     frames.Add(frame);
     SetDirty();
     return(frames.Count - 1);
 }
Exemple #9
0
 public string ProfileInformation()
 {
     return
         (string.Format(
              "{0} {1} Version: {2} ID: {3} SID: {4} Timer0: {5} - {6} VCount: {7} VFrame: {8} GxStat: {9} Keypresses: {10}",
              DSType.ToString().Replace('_', ' '), MAC_Address.ToString("X"),
              Language + " " + Version, ID, SID,
              Timer0Min.ToString("X"), Timer0Max.ToString("X"), VCount.ToString("X"), VFrame.ToString("X"),
              GxStat.ToString("X"), KeyString) + (SkipLR ? " (Skip L\\R)" : ""));
 }
Exemple #10
0
 public void Navigate(Type type, object e) => VFrame.Navigate(type, e);