コード例 #1
0
        private async void StartSession()
        {
            object lPtrSourceNode = null;
            var    sourceControl  = await CaptureManager.createSourceControlAsync();

            var sessionControl = await CaptureManager.createSessionControlAsync();

            _EVROutputAdapter = new EVROutputAdapter(Instance, _HWND);

            if (sessionControl != null && sessionControl != null && _EVROutputAdapter.Node != null)
            {
                Session = null;

                lPtrSourceNode = await sourceControl.createSourceNodeWithDownStreamConnectionAsync(_SymbolicLink,
                                                                                                   _StreamIndex,
                                                                                                   _MediaTypeIndex,
                                                                                                   _EVROutputAdapter.Node);

                Session = await sessionControl.createSessionAsync(new object[]
                {
                    lPtrSourceNode
                });

                if (Session != null)
                {
                    await Session.registerUpdateStateDelegateAsync(HandleSessionStateChanged);

                    await Session.startSessionAsync(0, Guid.Empty);
                }
            }
        }
コード例 #2
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                mCaptureManager = new CaptureManager("CaptureManager.dll");
            }
            catch (System.Exception)
            {
                try
                {
                    mCaptureManager = new CaptureManager();
                }
                catch (System.Exception)
                {
                }
            }

            if (mCaptureManager == null)
            {
                return;
            }

            mISourceControl = await mCaptureManager.createSourceControlAsync();

            string lxmldoc = await mCaptureManager.getCollectionOfSourcesAsync();

            if (string.IsNullOrEmpty(lxmldoc))
            {
                return;
            }
        }
コード例 #3
0
 public CaptureActor(Actor self, Actor target)
     : base(self, target, EnterBehaviour.Exit)
 {
     actor         = target;
     manager       = self.Trait <CaptureManager>();
     targetManager = target.Trait <CaptureManager>();
 }
コード例 #4
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {

            try
            {
                mCaptureManager = new CaptureManager("CaptureManager.dll");
            }
            catch (System.Exception exc)
            {
                try
                {
                    mCaptureManager = new CaptureManager();
                }
                catch (System.Exception exc1)
                {

                }
            }

            if (mCaptureManager == null)
                return;

            mISourceControl = await mCaptureManager.createSourceControlAsync();

        }
コード例 #5
0
        public MainWindow()
        {
            InitializeComponent();

            try
            {
                mCaptureManager = new CaptureManager("CaptureManager.dll");
            }
            catch (System.Exception exc)
            {
                try
                {
                    mCaptureManager = new CaptureManager();
                }
                catch (System.Exception exc1)
                {
                }
            }

            if (mCaptureManager == null)
            {
                return;
            }

            mISourceControl = mCaptureManager.createSourceControl();

            string lxmldoc = "";

            mCaptureManager.getCollectionOfSources(ref lxmldoc);

            if (string.IsNullOrEmpty(lxmldoc))
            {
                return;
            }
        }
コード例 #6
0
        public void start()
        {
            mPipeProcessor = new PipeProcessor(
                "Client" + _ConnectionSignature,
                "Server" + _ConnectionSignature);

            _IEVRStreamControl = CaptureManager.createEVRStreamControl();

            mPipeProcessor.MessageDelegateEvent += mPipeProcessor_MessageDelegateEvent;

            mPipeProcessor.send("Initilized");

            mStartEvent.WaitOne();

            StartSession();

            mCloseEvent.WaitOne();

            if (Session != null)
            {
                Session.stopSession();

                Session.closeSession();
            }

            mPipeProcessor.closeConnection();
        }
コード例 #7
0
        public MainWindow()
        {
            InitializeComponent();

            try
            {
                mCaptureManager = new CaptureManager("CaptureManager.dll");
            }
            catch (System.Exception exc)
            {
                try
                {
                    mCaptureManager = new CaptureManager();
                }
                catch (System.Exception exc1)
                {
                }
            }

            if (mCaptureManager == null)
            {
                return;
            }

            mISourceControl = mCaptureManager.createSourceControl();
        }
コード例 #8
0
        private void StartSession()
        {
            object          lPtrSourceNode = null;
            ISourceControl  sourceControl  = CaptureManager.createSourceControl();
            ISessionControl sessionControl = CaptureManager.createSessionControl();

            _EVROutputAdapter = new EVROutputAdapter(Instance, _HWND);

            if (sessionControl != null && sessionControl != null && _EVROutputAdapter.Node != null)
            {
                Session = null;

                sourceControl.createSourceNode(_SymbolicLink,
                                               _StreamIndex,
                                               _MediaTypeIndex,
                                               _EVROutputAdapter.Node,
                                               out lPtrSourceNode);

                Session = sessionControl.createSession(new object[]
                {
                    lPtrSourceNode
                });

                if (Session != null)
                {
                    Session.registerUpdateStateDelegate(HandleSessionStateChanged);
                    Session.startSession(0, Guid.Empty);
                }
            }
        }
コード例 #9
0
        protected override bool TryStartEnter(Actor self, Actor targetActor)
        {
            if (enterActor != targetActor)
            {
                enterActor          = targetActor;
                enterCaptureManager = targetActor.TraitOrDefault <CaptureManager>();
            }

            // Make sure we can still capture the target before entering
            // (but not before, because this may stop the actor in the middle of nowhere)
            if (enterCaptureManager == null || !enterCaptureManager.CanBeTargetedBy(enterActor, self, manager))
            {
                Cancel(self, true);
                return(false);
            }

            // StartCapture returns false when a capture delay is enabled
            // We wait until it returns true before allowing entering the target
            Captures captures;

            if (!manager.StartCapture(self, enterActor, enterCaptureManager, out captures))
            {
                return(false);
            }

            if (!captures.Info.ConsumedByCapture)
            {
                // Immediately capture without entering or disposing the actor
                DoCapture(self, captures);
                Cancel(self, true);
                return(false);
            }

            return(true);
        }
コード例 #10
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_scan);

            swichLight = FindViewById <Button>(Resource.Id.btn_switch);
            mDBV       = FindViewById <DecoratedBarcodeView>(Resource.Id.dbv_custom);
            mDBV.SetTorchListener(this);
            if (!HasFlash())
            {
                swichLight.Visibility = ViewStates.Gone;
            }
            swichLight.Click += (sender, e) =>
            {
                if (isLightOn)
                {
                    mDBV.SetTorchOff();
                }
                else
                {
                    mDBV.SetTorchOn();
                }
            };

            captureManager = new CaptureManager(this, mDBV);
            captureManager.InitializeFromIntent(Intent, savedInstanceState);
            captureManager.Decode();
        }
コード例 #11
0
        void Init()
        {
            // There is no instance until now.
            captureManager = new CaptureManager(udMap);
            welcomeWindow  = new View.WelcomeWindow();
            welcomeWindow.Show();
            Thread t = new Thread(new ThreadStart(() =>
            {
                //如果用户按的足够快,先按了exit,那么会先执行Exit,后执行captureManager.InitAndStart() !!! This is a bug, but it will not trigger unless user is really really fast !!!.
                if (!captureManager.InitAndStart())
                {
                    Dispatcher.InvokeAsync(new Action(() =>
                    {
                        MessageBox.Show("WinPcap is one dependency of NetSpeedMonitor.\nYou can visit https://www.winpcap.org/ to install this software.\nAnd make sure WinPcap is properly installed on the local machine. \n\n[NetSpeedMonitor]");
                        Process.Start("https://www.winpcap.org/");
                        Shutdown();
                    }));
                }
                else
                {
                    Dispatcher.InvokeAsync(new Action(() =>
                    {
                        InitViewAndNeedClosedResourcees();
                        welcomeWindow.ReduceAndClose(new Point(mainWindow.Left + mainWindow.Width / 2, mainWindow.Top + mainWindow.Height / 2));
                    }));
                }
            }));

            t.Start();
            //if(VersionHelper.IsWindows10OrGreater())
            //    PinAllVirtualDesktop();
        }
コード例 #12
0
        private void SelectHardwareAndStreamProfile()
        {
            SelectedIntelRealSenseCamera = CameraService.GetIntelRealSenseSR300();
            if (SelectedIntelRealSenseCamera == null)
            {
                throw new Exception("Intel RealSense Camera not connected!");
            }

            SelectedResolution_ColorDepth_FrameRateCombination = CameraService.GetResolution_ColorDepth_FrameRateCombination(SelectedIntelRealSenseCamera);
            if (SelectedResolution_ColorDepth_FrameRateCombination == null)
            {
                throw new Exception("Resolution_ColorDepth_FrameRateCombination not supported");
            }

            SenseManager   = Session.CreateSenseManager();
            CaptureManager = SenseManager.captureManager;
            CaptureManager.FilterByDeviceInfo(SelectedIntelRealSenseCamera.Device.deviceInfo);

            var streamFrofileSet = new PXCMCapture.Device.StreamProfileSet
            {
                color =
                {
                    frameRate = SelectedResolution_ColorDepth_FrameRateCombination.FrameRate,
                    imageInfo =
                    {
                        format = SelectedResolution_ColorDepth_FrameRateCombination.PixelFormat,
                        height = SelectedResolution_ColorDepth_FrameRateCombination.Height,
                        width  = SelectedResolution_ColorDepth_FrameRateCombination.Width
                    }
                }
            };

            CaptureManager.FilterByStreamProfiles(streamFrofileSet);
        }
コード例 #13
0
        public MainWindow()
        {
            InitializeComponent();

            m_Positioner.mCallback += m_Positioner_mCallback;

            try
            {
                mCaptureManager = new CaptureManager("CaptureManager.dll");
            }
            catch (System.Exception)
            {
                try
                {
                    mCaptureManager = new CaptureManager();
                }
                catch (System.Exception)
                {
                }
            }

            if (mCaptureManager == null)
            {
                return;
            }
        }
コード例 #14
0
ファイル: MenusManager.cs プロジェクト: enzo-bonnot/ARDrawing
 // Start is called before the first frame update
 void Start()
 {
     mainMenu.SetActive(true);
     objectsMenu.SetActive(false);
     paintMenu.SetActive(false);
     captureManager = mainMenu.GetComponent <CaptureManager>();
 }
コード例 #15
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            CaptureManager lCaptureManager = null;

            try
            {
                lCaptureManager = new CaptureManager("CaptureManager.dll");
            }
            catch (System.Exception)
            {
                try
                {
                    lCaptureManager = new CaptureManager();
                }
                catch (System.Exception)
                {
                }
            }

            if (lCaptureManager == null)
            {
                return;
            }

            XmlDataProvider lXmlDataProvider = (XmlDataProvider)this.Resources["XmlLogProvider"];

            if (lXmlDataProvider == null)
            {
                return;
            }

            System.Xml.XmlDocument doc = new System.Xml.XmlDocument();

            string lxmldoc = "";

            lxmldoc = await lCaptureManager.getCollectionOfSourcesAsync();

            if (string.IsNullOrWhiteSpace(lxmldoc))
            {
                return;
            }

            doc.LoadXml(lxmldoc);

            var lDeviceLinkNodeList = doc.SelectNodes("Sources/Source/Source.Attributes/Attribute[@Name='CM_DEVICE_LINK']/SingleValue/@Value");

            List <string> lDeviceLinkList = new List <string>();

            for (int i = 0; i < lDeviceLinkNodeList.Count; i++)
            {
                if (!lDeviceLinkList.Contains(lDeviceLinkNodeList.Item(i).Value))
                {
                    lDeviceLinkList.Add(lDeviceLinkNodeList.Item(i).Value);
                }
            }

            lXmlDataProvider.Document = doc;
        }
コード例 #16
0
        public MainWindow()
        {
            InitializeComponent();

            try
            {
                mCaptureManager = new CaptureManager("CaptureManager.dll");
            }
            catch (System.Exception exc)
            {
                try
                {
                    mCaptureManager = new CaptureManager();
                }
                catch (System.Exception exc1)
                {
                }
            }

            if (mCaptureManager == null)
            {
                return;
            }

            XmlDataProvider lXmlDataProvider = (XmlDataProvider)this.Resources["XmlLogProvider"];

            if (lXmlDataProvider == null)
            {
                return;
            }

            System.Xml.XmlDocument doc = new System.Xml.XmlDocument();

            string lxmldoc = "";

            mCaptureManager.getCollectionOfSources(ref lxmldoc);

            if (string.IsNullOrEmpty(lxmldoc))
            {
                return;
            }

            doc.LoadXml(lxmldoc);

            lXmlDataProvider.Document = doc;

            mTimer.Interval = new TimeSpan(100000);

            mWebCamParametrsTab.AddHandler(Slider.ValueChangedEvent, new RoutedEventHandler(mParametrSlider_ValueChanged));

            mWebCamParametrsTab.AddHandler(CheckBox.CheckedEvent, new RoutedEventHandler(mParametrSlider_Checked));

            mWebCamParametrsTab.AddHandler(CheckBox.UncheckedEvent, new RoutedEventHandler(mParametrSlider_Checked));

            mTimer.Tick += mTimer_Tick;
        }
コード例 #17
0
        protected internal virtual void captureZbufferImage()
        {
            GeContext context = VideoEngine.Instance.Context;
            int       width   = context.zbw;
            int       height  = Modules.sceDisplayModule.HeightFb;
            int       address = getTextureAddress(zbp, 0, 0, zbw, depthBufferPixelFormat);
            Buffer    buffer  = Memory.Instance.getBuffer(address, width * height * pspsharp.graphics.RE.IRenderingEngine_Fields.sizeOfTextureType[depthBufferPixelFormat]);

            CaptureManager.captureImage(address, 0, buffer, width, height, width, depthBufferPixelFormat, false, 0, false, false);
        }
コード例 #18
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                mCaptureManager = new CaptureManager("CaptureManager.dll");
            }
            catch (System.Exception)
            {
                try
                {
                    mCaptureManager = new CaptureManager();
                }
                catch (System.Exception)
                {
                }
            }


            if (mCaptureManager == null)
            {
                return;
            }

            XmlDataProvider lXmlDataProvider = (XmlDataProvider)this.Resources["XmlLogProvider"];

            if (lXmlDataProvider == null)
            {
                return;
            }

            System.Xml.XmlDocument doc = new System.Xml.XmlDocument();

            string lxmldoc = "";

            lxmldoc = await mCaptureManager.getCollectionOfSourcesAsync();

            if (string.IsNullOrEmpty(lxmldoc))
            {
                return;
            }

            doc.LoadXml(lxmldoc);

            lXmlDataProvider.Document = doc;

            mTimer.Interval = new TimeSpan(0, 0, 0, 0, 25);

            mWebCamParametrsTab.AddHandler(Slider.ValueChangedEvent, new RoutedEventHandler(mParametrSlider_ValueChanged));

            mWebCamParametrsTab.AddHandler(CheckBox.CheckedEvent, new RoutedEventHandler(mParametrSlider_Checked));

            mWebCamParametrsTab.AddHandler(CheckBox.UncheckedEvent, new RoutedEventHandler(mParametrSlider_Checked));

            mTimer.Tick += mTimer_Tick;
        }
コード例 #19
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            WSAData dummy = new WSAData();

            m_socketAccessable = NativeMethods.WSAStartup(0x0202, ref dummy) == 0;


            try
            {
                ThreadPool.SetMinThreads(15, 10);

                mCaptureManager = new CaptureManager("CaptureManager.dll");
            }
            catch (System.Exception exc)
            {
                try
                {
                    mCaptureManager = new CaptureManager();
                }
                catch (System.Exception exc1)
                {
                }
            }

            if (mCaptureManager == null)
            {
                return;
            }

            XmlDataProvider lXmlDataProvider = (XmlDataProvider)this.Resources["XmlLogProvider"];

            if (lXmlDataProvider == null)
            {
                return;
            }

            System.Xml.XmlDocument doc = new System.Xml.XmlDocument();

            string lxmldoc = await mCaptureManager.getCollectionOfSourcesAsync();

            if (string.IsNullOrEmpty(lxmldoc))
            {
                return;
            }

            doc.LoadXml(lxmldoc);

            lXmlDataProvider.Document = doc;


            mIEVRStreamControl = await mCaptureManager.createEVRStreamControlAsync();

            mSourceControl = await mCaptureManager.createSourceControlAsync();
        }
コード例 #20
0
        public MainWindow()
        {
            InitializeComponent();

            try
            {
                ThreadPool.SetMinThreads(15, 10);

                mCaptureManager = new CaptureManager("CaptureManager.dll");
            }
            catch (System.Exception exc)
            {
                try
                {
                    mCaptureManager = new CaptureManager();
                }
                catch (System.Exception exc1)
                {
                }
            }

            if (mCaptureManager == null)
            {
                return;
            }

            XmlDataProvider lXmlDataProvider = (XmlDataProvider)this.Resources["XmlLogProvider"];

            if (lXmlDataProvider == null)
            {
                return;
            }

            System.Xml.XmlDocument doc = new System.Xml.XmlDocument();

            string lxmldoc = "";

            mCaptureManager.getCollectionOfSources(ref lxmldoc);

            if (string.IsNullOrEmpty(lxmldoc))
            {
                return;
            }

            doc.LoadXml(lxmldoc);

            lXmlDataProvider.Document = doc;


            mIEVRStreamControl = mCaptureManager.createEVRStreamControl();

            mSourceControl = mCaptureManager.createSourceControl();
        }
コード例 #21
0
        public void NoTab_PerformScreenCapture_TakesScreenShot()
        {
            this.ConfigureSettings();
            var       expectedFiles = this.GetFilesCountInCaptureDirectory() + 1;
            var       tabControl    = new TabControl.TabControl();
            IFavorite favorite      = new Mock <IFavorite>().Object;

            CaptureManager.PerformScreenCapture(tabControl, favorite);
            var actualFiles = this.GetFilesCountInCaptureDirectory();

            Assert.AreEqual(expectedFiles, actualFiles, "Screen capture should create new file in capture direcotry.");
        }
コード例 #22
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
         return;
     }
 }
コード例 #23
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                mCaptureManager = new CaptureManager("CaptureManager.dll");
            }
            catch (System.Exception exc)
            {
                try
                {
                    mCaptureManager = new CaptureManager();
                }
                catch (System.Exception exc1)
                {
                }
            }

            if (mCaptureManager == null)
            {
                return;
            }

            XmlDataProvider lXmlDataProvider = (XmlDataProvider)this.Resources["XmlLogProvider"];

            if (lXmlDataProvider == null)
            {
                return;
            }

            System.Xml.XmlDocument doc = new System.Xml.XmlDocument();

            string lxmldoc = await mCaptureManager.getCollectionOfSourcesAsync();

            if (string.IsNullOrEmpty(lxmldoc))
            {
                return;
            }

            doc.LoadXml(lxmldoc);

            lXmlDataProvider.Document = doc;



            mEVRStreamFiltersTabItem.AddHandler(Slider.ValueChangedEvent, new RoutedEventHandler(mEVRStreamFilterSlider_ValueChanged));

            mEVRStreamFiltersTabItem.AddHandler(CheckBox.CheckedEvent, new RoutedEventHandler(mEVRStreamFilterSlider_Checked));

            mEVRStreamFiltersTabItem.AddHandler(CheckBox.UncheckedEvent, new RoutedEventHandler(mEVRStreamFilterSlider_Checked));

            mEVRStreamOutputFeaturesTabItem.AddHandler(Slider.ValueChangedEvent, new RoutedEventHandler(mEVRStreamOutputFeaturesSlider_ValueChanged));
        }
コード例 #24
0
    void Start()
    {
        m_StatusManager      = FindObjectOfType <StatusManager>();
        m_AzureFaceDetection = FindObjectOfType <AzureFaceDetection>();
        m_CaptureManager     = FindObjectOfType <CaptureManager>();
        m_DetectionManager   = GetComponent <DetectionManager>();

        m_PhotosToRegister = new List <Texture2D>();
        m_AzureFaceDetection.OnFacesAddedToPerson += Train;

        m_AzureFaceDetection.OnTrainingSuccess  = null;
        m_AzureFaceDetection.OnTrainingSuccess += DetectAgain;
    }
コード例 #25
0
 // Initialize Capture Manager
 void InitializeCaptureManager()
 {
     captureManager = senseManager.CaptureManager;
     if (captureManager == null)
     {
         Debug.Log(TAG + "Capture Manager Initialize Failure!");
     }
     else
     {
         Debug.Log(TAG + "Capture Manager Initialize Successful");
         LoadCapture();
     }
 }
コード例 #26
0
        protected override void TickInner(Actor self, Target target, bool targetIsDeadOrHiddenActor)
        {
            if (target.Type == TargetType.Actor && enterActor != target.Actor)
            {
                enterActor          = target.Actor;
                enterCaptureManager = target.Actor.TraitOrDefault <CaptureManager>();
            }

            if (!targetIsDeadOrHiddenActor && target.Type != TargetType.FrozenActor &&
                (enterCaptureManager == null || !enterCaptureManager.CanBeTargetedBy(enterActor, self, manager)))
            {
                Cancel(self, true);
            }
        }
コード例 #27
0
 // Start is called before the first frame update
 void Start()
 {
     // Check that all managers are present
     m_AzureManager       = FindObjectOfType <AzureManager>();
     m_AzureFaceDetection = FindObjectOfType <AzureFaceDetection>();
     m_CaptureManager     = FindObjectOfType <CaptureManager>();
     if (m_AzureFaceDetection == null || m_AzureManager == null || m_CaptureManager == null)
     {
         Debug.Log(Constants.MANAGERS_NOT_PRESENT);
     }
     else
     {
         Initialize();
     }
 }
コード例 #28
0
    private void Init()
    {
        captureDataSetter = GameObject.Find("CapturedataSetter").GetComponent <CapturedataSetter>();

        this.csvPath                     = captureDataSetter.csvPath;
        this.captureLength               = captureDataSetter.captureLength;
        this.captureFrame                = captureDataSetter.captureFrame;
        this.captureWidth                = captureDataSetter.captureWidth;
        this.captureHeight               = captureDataSetter.captureHeight;
        this.timeWarp_predict_path       = captureDataSetter.TimeWarp_predict_path;
        this.timeWarp_nonPredict_path    = captureDataSetter.TimeWarp_nonPredict_path;
        this.nonTimeWarp_predict_path    = captureDataSetter.NonTimeWarp_predict_path;
        this.nonTimeWarp_nonPredict_path = captureDataSetter.NonTimeWarp_nonPredict_path;

        if (timeWarp_predict_path == string.Empty || nonTimeWarp_predict_path == string.Empty ||
            timeWarp_nonPredict_path == string.Empty || nonTimeWarp_nonPredict_path == string.Empty)
        {
            DefaltPathSetting();
        }

        for (int i = 0; i < 2; i++)
        {
            playbackCameras[i] = transform.GetChild(i).GetComponent <Camera>();
            playbackCameras[i] = transform.GetChild(i).GetComponent <Camera>();
        }

        Time.captureFramerate = captureFrame;

        data = CSVReader.Read(csvPath);

        GameObject captureModule = Instantiate(Resources.Load("CaptureModule") as GameObject);

        head              = GameObject.Find("HeadModel");
        captureManger     = GameObject.Find("TimeWarpingCamera").GetComponent <CaptureManager>();
        timeWarpingCamera = GameObject.Find("TimeWarpingCamera").GetComponent <Camera>();
        anchor            = GameObject.Find("Anchor");
        leftTexture       = GameObject.Find("LeftTargetTexture");
        rightTexture      = GameObject.Find("RightTargetTexture");

        PlayerSettings.defaultScreenWidth  = captureWidth;
        PlayerSettings.defaultScreenHeight = captureHeight;

        SetGameviewSize(gameviewSizeTypes["StandAlone"]);

        captureModule.transform.position = new Vector3(100, 0, 0);
        leftTexture.transform.position   = new Vector3(99.5f, 0, 0.866f);
        rightTexture.transform.position  = new Vector3(100.5f, 0, 0.866f);
    }
コード例 #29
0
        public MainWindow()
        {
            InitializeComponent();

            try
            {
                mCaptureManager = new CaptureManager("CaptureManager.dll");
            }
            catch (System.Exception)
            {
                try
                {
                    mCaptureManager = new CaptureManager();
                }
                catch (System.Exception)
                {
                }
            }

            if (mCaptureManager == null)
            {
                return;
            }

            XmlDataProvider lXmlDataProvider = (XmlDataProvider)this.Resources["XmlSourceProvider"];

            if (lXmlDataProvider == null)
            {
                return;
            }

            System.Xml.XmlDocument doc = new System.Xml.XmlDocument();

            string lxmldoc = "";

            mCaptureManager.getCollectionOfSources(ref lxmldoc);

            if (string.IsNullOrEmpty(lxmldoc))
            {
                return;
            }

            doc.LoadXml(lxmldoc);

            lXmlDataProvider.Document = doc;
        }
コード例 #30
0
 private async void Window_Loaded(object sender, RoutedEventArgs e)
 {
     try
     {
         mCaptureManager = new CaptureManager("CaptureManager.dll");
     }
     catch (System.Exception exc)
     {
         try
         {
             mCaptureManager = new CaptureManager();
         }
         catch (System.Exception exc1)
         {
         }
     }
 }