Exemple #1
0
        private void ShowVideoForm(string title)
        {
            if (testForm == null || testForm.IsDisposed)
            {
                testForm = new VideoForm
                {
                    StartPosition = FormStartPosition.CenterParent,
                    Width         = 1280,
                    Height        = 720,

                    Text = title,
                };

                imageProvider = new D3DImageRenderer();
                var reciver = remoteClient.VideoReceiver;

                imageProvider.Setup(reciver.sharedTexture);
                imageProvider.Start();

                var video = testForm.userControl11;
                video.DataContext = imageProvider;

                testForm.FormClosed += TestForm_FormClosed;
            }


            testForm.Visible = true;
        }
Exemple #2
0
        private void CloseVideoForm()
        {
            if (testForm != null && !testForm.IsDisposed)
            {
                testForm.UnlinkInputManager();

                testForm.Close();
                testForm.FormClosed -= TestForm_FormClosed;
                testForm             = null;
            }
        }