本文整理汇总了C#中IDialogVisualizerService.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# IDialogVisualizerService.ShowDialog方法的具体用法?C# IDialogVisualizerService.ShowDialog怎么用?C# IDialogVisualizerService.ShowDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDialogVisualizerService
的用法示例。
在下文中一共展示了IDialogVisualizerService.ShowDialog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Show
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
{
if (windowService != null)
{
if (objectProvider != null)
{
var obj = objectProvider.GetObject() as QueryData;
// flag1 = obj == null;
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);
}
}
else
{
throw new ArgumentNullException("objectProvider");
}
}
else
{
throw new ArgumentNullException("windowService");
}
}
示例2: Show
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
{
try
{
if (windowService == null)
{
throw new ArgumentNullException("windowService");
}
if (objectProvider == null)
{
throw new ArgumentNullException("objectProvider");
}
object data = (object)objectProvider.GetObject();
System.Data.DataSet ds = data as System.Data.DataSet;
if (ds == null)
{
throw new ArgumentException("Only DataSets can be visualized with the ExtendedDataSetVisualizer");
}
using (ExtendedDataSetVisualizerWin win = new ExtendedDataSetVisualizerWin(ds))
{
windowService.ShowDialog(win);
}
}
catch (System.Exception rExc)
{
MessageBox.Show(rExc.Message);
}
}
示例3: Show
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
{
try
{
var obj = objectProvider.GetData();
var modelNode = new M2ModelDialogDebuggerVisualizerService().DeserializeDataFromStream<ModelNode>(obj);
var form = new Form
{
ClientSize = new Size(800, 600),
FormBorderStyle = FormBorderStyle.FixedToolWindow,
};
var treeView = new TreeView();
treeView.Parent = form;
treeView.Dock = DockStyle.Fill;
InitNodes(treeView.Nodes, modelNode);
treeView.ExpandAll();
windowService.ShowDialog(form);
}
catch (Exception e)
{
// TODO
throw;
}
}
示例4: 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() 的結果轉型為
// 要視覺化的物件型別。
var data = (Image)objectProvider.GetObject();
// TODO: 顯示您的物件檢視。
// 以自己的自訂表單或控制項取代 displayForm。
using (Form displayForm = new Form
{
Text = string.Format("Width: {0}, Height: {1} Format:{2}", data.Width, data.Height, data.PixelFormat),
ClientSize = new Size(data.Width, data.Height),
FormBorderStyle = FormBorderStyle.FixedToolWindow,
StartPosition = FormStartPosition.CenterScreen,
}
)
{
PictureBox box = new PictureBox { Image = data, Dock = DockStyle.Fill };
displayForm.Controls.Add(box);
windowService.ShowDialog(displayForm);
}
}
示例5: Show
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
{
var image = (Bitmap) objectProvider.GetObject();
var dialogTitle = String.Format("Width: {0}, Height: {1}, Format: {2}",
image.Width, image.Height, image.PixelFormat);
var form = new Form
{
Text = dialogTitle,
ClientSize = new Size(image.Width, image.Height),
FormBorderStyle = FormBorderStyle.FixedToolWindow,
};
var pictureBox = new PictureBox
{
Image = image,
Dock = DockStyle.Fill,
Parent = form,
};
pictureBox.MouseMove += (s, a) =>
{
form.Text = String.Format("{0}, RGB({1})={2}",
dialogTitle, a.Location, image.GetPixel(a.Location.X, a.Location.Y));
};
windowService.ShowDialog(form);
}
示例6: Show
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider provider)
{
using (Form form1 = new Form())
{
form1.Paint += new PaintEventHandler(form1_Paint);
form1.Text = "Font Visualizer";
font = (Font)provider.GetObject();
form1.StartPosition = FormStartPosition.WindowsDefaultLocation;
form1.SizeGripStyle = SizeGripStyle.Auto;
form1.ShowInTaskbar = false;
form1.ShowIcon = false;
Graphics formGraphics = form1.CreateGraphics();
var size = formGraphics.MeasureString(font.Name, font);
form1.Width = (int)size.Width + 100;
form1.Height = (int)size.Height + 100;
windowService.ShowDialog(form1);
}
}
示例7: Show
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
{
SerializedProxy data = (SerializedProxy)objectProvider.GetObject ();
//MessageBox.Show(data.ProxyType.FullName);
AopProxyVisualizerForm form = new AopProxyVisualizerForm();
form.Proxy = data;
windowService.ShowDialog(form);
}
示例8: Show
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
{
var frm = new FrmImage();
var img = objectProvider.GetObject() as Image;
if (img == null) return;
frm.Picture = img;
windowService.ShowDialog(frm);
}
示例9: Show
/// <summary>
/// 表示
/// </summary>
/// <param name="windowService"></param>
/// <param name="objectProvider"></param>
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
{
using (MatrixVisualizerForm displayForm = new MatrixVisualizerForm())
{
displayForm.SetMatrix(objectProvider.GetObject() as KrdLab.Lisys.Matrix);
windowService.ShowDialog(displayForm);
}
}
示例10: Show
protected override void Show( IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider )
{
Image image = (Image)objectProvider.GetObject();
using( ViewImageDialog dialog = new ViewImageDialog() )
{
dialog.Image = image;
windowService.ShowDialog( dialog );
}
}
示例11: Show
override protected void Show( IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider )
{
BestCS.Math.Histogram histogram = ( BestCS.Math.Histogram) objectProvider.GetObject( );
HistogramView histogramView = new HistogramView( );
histogramView.SetHistogram( histogram );
windowService.ShowDialog( histogramView );
}
示例12: Show
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
{
tgEntityCollectionBase data = (tgEntityCollectionBase)objectProvider.GetObject();
using (esVisualizerForm displayForm = new esVisualizerForm(data))
{
windowService.ShowDialog(displayForm);
}
}
示例13: Show
override protected void Show( IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider )
{
Image image = (Image) objectProvider.GetObject( );
ImageView imageViewer = new ImageView( );
imageViewer.SetImage( image );
windowService.ShowDialog( imageViewer );
}
示例14: Show
/// <summary/>
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) {
ObjectProvider = objectProvider;
RootProxy = BplRootProxyQuery.Invoke(this).Result;
var sourcePath = BplSourcePathQuery.Invoke(this).Result;
SourceProxy = sourcePath.RetrieveProxy(this);
var form = new BplVisualizerForm(this);
windowService.ShowDialog(form);
}
示例15: Show
protected override void Show(
IDialogVisualizerService windowService,
IVisualizerObjectProvider objectProvider)
{
using (var visualizer = new MockVisualizerForm(objectProvider.GetObject()))
{
windowService.ShowDialog(visualizer);
}
}