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); } } } }
/// <summary> /// Shows the specified window service. /// </summary> /// <param name="windowService">The window service.</param> /// <param name="objectProvider">The object provider.</param> protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) { ColorPalette newPalette = DebuggerHelper.DebugPalette(SerializationHelper.DeserializeColorPalette(objectProvider.GetData()), objectProvider.IsObjectReplaceable); if (objectProvider.IsObjectReplaceable && newPalette != null) { objectProvider.ReplaceObject(new ColorPaletteReference(newPalette)); } }
/// <summary> /// Shows the specified window service. /// </summary> /// <param name="windowService">The window service.</param> /// <param name="objectProvider">The object provider.</param> protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) { using (ImageInfo imageInfo = SerializationHelper.DeserializeImageInfo(objectProvider.GetData())) { ImageReference replacementObject = DebuggerHelper.DebugBitmap(imageInfo, objectProvider.IsObjectReplaceable); if (objectProvider.IsObjectReplaceable && replacementObject != null) { objectProvider.ReplaceObject(replacementObject); } } }
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(); } }
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); } } }
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"); } }
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); } }
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) { var matrix = (Matrix)objectProvider.GetObject(); using (var form = new MatrixVisualizerForm(matrix)) { form.ShowDialog(); try { matrix = form.GetMatrix(); objectProvider.ReplaceObject(matrix); } catch { } } }
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"); } }
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); } } } }
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); } } } }
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); } }
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); } } }