当前位置: 首页>>代码示例>>C#>>正文


C# IVisualizerObjectProvider.ReplaceObject方法代码示例

本文整理汇总了C#中IVisualizerObjectProvider.ReplaceObject方法的典型用法代码示例。如果您正苦于以下问题:C# IVisualizerObjectProvider.ReplaceObject方法的具体用法?C# IVisualizerObjectProvider.ReplaceObject怎么用?C# IVisualizerObjectProvider.ReplaceObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IVisualizerObjectProvider的用法示例。


在下文中一共展示了IVisualizerObjectProvider.ReplaceObject方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Show

        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            string modifiedXml = Visualizer.ShowModal_LoadXmlFromString(objectProvider.GetObject().ToString(), objectProvider.IsObjectReplaceable, true);

            if (Visualizer.ReplaceObject())
            {
                StringReader sr = new StringReader(modifiedXml);
                objectProvider.ReplaceObject(sr.ReadToEnd());
                sr.Close();
            }
        }
开发者ID:zippy1981,项目名称:XmlVisualizerv2,代码行数:11,代码来源:DebugVisualizer.cs

示例2: Show

        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            object data = (object)objectProvider.GetObject();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            using(StoreBrowser storeBrowser = new StoreBrowser()) {
                storeBrowser.Store = data as FileStore;
                storeBrowser.ShowDialog();

                if(objectProvider.IsObjectReplaceable) {
                    objectProvider.ReplaceObject(storeBrowser.Store);
                }
            }
        }
开发者ID:gratianlup,项目名称:SecureDelete,代码行数:15,代码来源:FileStoreVisualizer.cs

示例3: Show

        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            if (windowService != null)
            {
                if (objectProvider != null)
                {
                    var obj = objectProvider.GetObject() as QueryData;

                    if (obj !=null)
                    {

                        var form = new EfVisualizerForm();
                        if (!string.IsNullOrEmpty(obj.ExceptionMessage))
                        {
                            form.SetDebugText(string.Format("Error:{0}{1}", Environment.NewLine, obj.ExceptionMessage));
                        }
                        else
                        {
                            form.SetDebugText(obj.SQLCommand);
                        }
                        DialogResult dialogResult = windowService.ShowDialog(form);
                        bool flag;
                        if (!objectProvider.IsObjectReplaceable)
                            {
                                flag = true;
                            }
                            else
                            {
                                flag = dialogResult != DialogResult.OK;
                            }
                            if (!flag)
                            {
                                objectProvider.ReplaceObject(obj);
                            }

                    }

                }
                else
                {
                    throw new ArgumentNullException("objectProvider");
                }
            }
            else
            {
                throw new ArgumentNullException("windowService");
            }
        }
开发者ID:scottjustin5000,项目名称:Visualizers,代码行数:48,代码来源:EfContextVisualizer.cs

示例4: Show

        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            //make sure the object is the correct type
            var objectToVisualise = objectProvider.GetObject() as DemoObject;

            //Show the visualiser
            var form = new DemoObjectVisualiserForm(objectToVisualise);
            windowService.ShowDialog(form);

            //If the object is replaceable, update the colour
            if (objectProvider.IsObjectReplaceable)
            {
                objectToVisualise.Colour = form.colourBox.BackColor;
                objectProvider.ReplaceObject(objectToVisualise);
            }
        }
开发者ID:orangutanboy,项目名称:DebuggerVisualiserDemo,代码行数:16,代码来源:DemoObjectVisualiserForm.cs

示例5: Show

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

                    // 値の変更を元データのCvMatに反映
                    if (objectProvider.IsObjectReplaceable)
                    {
                        objectProvider.ReplaceObject(form.ModifiedProxy);
                    }
                }
            }
        }
开发者ID:0sv,项目名称:opencvsharp,代码行数:22,代码来源:CvMatDebuggerVisualizer.cs

示例6: Show

        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            if (windowService == null)
                throw new ArgumentNullException("windowService");
            if (objectProvider == null)
                throw new ArgumentNullException("objectProvider");

            // TODO: 取得要顯示其視覺化檢視的物件。
            //       將 objectProvider.GetObject() 的結果轉型為
            //       要視覺化的物件型別。
            Image data = (Image)objectProvider.GetObject();

            // TODO: 顯示您的物件檢視。
            //       以自己的自訂表單或控制項取代 displayForm。
            using (var displayForm = new ImageEffectsView(data))
            {
                // displayForm.Text = data.ToString();
                if (windowService.ShowDialog(displayForm) != DialogResult.OK) return;
                if (!objectProvider.IsObjectReplaceable) return;
                IImageEffectsView view = displayForm;
                objectProvider.ReplaceObject(view.ResultImage);
                // objectProvider.TransferObject(view.ResultImage);
            }
        }
开发者ID:Dason1986,项目名称:Lib,代码行数:24,代码来源:ImageEffectsVisualizer.cs

示例7: Show

        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            if (windowService == null)
                throw new ArgumentNullException("windowService");
            if (objectProvider == null)
                throw new ArgumentNullException("objectProvider");

            DataTable dt = objectProvider.GetObject() as DataTable;

            if (dt != null)
            {
                using (FormMainDataSet main = new FormMainDataSet())
                {
                    main.Init(dt, objectProvider.IsObjectReplaceable, "DataView Visualizer");

                    DialogResult dr = windowService.ShowDialog(main);

                    if (objectProvider.IsObjectReplaceable && dr == DialogResult.OK)
                        objectProvider.ReplaceObject(dt);
                }
            }
        }
开发者ID:vfrank66,项目名称:DbVisualizer,代码行数:22,代码来源:DSVisualizer.cs


注:本文中的IVisualizerObjectProvider.ReplaceObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。