protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            // 送られてくるはずのCvMatProxyを受け取る
            using (CvMatProxy proxy = objectProvider.GetObject() as CvMatProxy)
            {
                if (proxy == null)
                {
                    throw new ArgumentException();
                }
                using (CvMatViewer form = new CvMatViewer(proxy))
                {
                    // 行列データ表示用フォームを開く
                    windowService.ShowDialog(form);

                    // 値の変更を元データのCvMatに反映
                    if (objectProvider.IsObjectReplaceable)
                    {
                        objectProvider.ReplaceObject(form.ModifiedProxy);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            // 送られてくるはずのCvMatProxyを受け取る
            using (CvMatProxy proxy = objectProvider.GetObject() as CvMatProxy)
            {
                if (proxy == null)
                {
                    throw new ArgumentException();
                }
                using (CvMatViewer form = new CvMatViewer(proxy))
                {
                    // 行列データ表示用フォームを開く
                    windowService.ShowDialog(form);

                    // 値の変更を元データのCvMatに反映
                    if (objectProvider.IsObjectReplaceable)
                    {
                        objectProvider.ReplaceObject(form.ModifiedProxy);
                    }
                }
            }
        }