本文整理汇总了C#中DataSource.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# DataSource.ShowDialog方法的具体用法?C# DataSource.ShowDialog怎么用?C# DataSource.ShowDialog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataSource
的用法示例。
在下文中一共展示了DataSource.ShowDialog方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: toolBarSCUEmulator_ButtonClick
private void toolBarSCUEmulator_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
{
if( e.Button == toolBarButtonStoreImages)
{
DataSource dataType = new DataSource();
if(dataType.ShowDialog()== DialogResult.OK)
{
switch(dataType.GetDataSouceMode())
{
case 0:
menuItemExportDir_Click( sender, null );
break;
case 1:
menuItemExportFiles_Click( sender, null );
break;
case 2:
menuItemExportDICOMDIR_Click( sender, null );
break;
default:
menuItemExportFiles_Click( sender, null );
break;
}
}
}
else if( e.Button == toolBarButtonStoreCommit)
{
menuItemStorageCommit_Click( sender, null );
toolBarButtonResult.Enabled = true;
}
else if( e.Button == toolBarButtonError)
{
this.dvtkWebBrowserSCUEmulator.FindNextText("Error:", true, true);
}
else if( e.Button == toolBarButtonWarning)
{
this.dvtkWebBrowserSCUEmulator.FindNextText("Warning:", true, true);
}
else if( e.Button == toolBarButtonLeft)
{
this.dvtkWebBrowserSCUEmulator.Back();
}
else if( e.Button == toolBarButtonRight)
{
this.dvtkWebBrowserSCUEmulator.Forward();
}
else if( e.Button == toolBarButtonStop)
{
toolBarButtonStop.Enabled = false;
isStopped = true;
this.threadManager.Stop();
}
else if( e.Button == toolBarButtonAbort)
{
//toolBarButtonAbort.Enabled = false;
toolBarButtonResult.Enabled = false;
//Abort the export
try
{
//If Abort export button is clicked while export is in progress, we are stopping
//background thread and scuDicomThread
if (backgroundWorkerSCU.IsBusy)
{
if (backgroundWorkerSCU.CancellationPending)
{
MessageBox.Show("Aborting Export...Please Wait...", "Busy", MessageBoxButtons.OK, MessageBoxIcon.Hand);
}
else
{
backgroundWorkerSCU.CancelAsync();
this.threadManager.Stop();
this.Cursor = Cursors.WaitCursor;
this.overviewThread.WaitForCompletionChildThreads();
isStopped = true;
this.Cursor = Cursors.Default;
userControlActivityLogging.AddWriteActionToQueue("Stopped : ", "User aborted export", Color.Red);
}
}
}
catch (Exception ex)
{
MessageBox.Show( "Couldn't Abort the export:" + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else if (e.Button == toolBarButtonResult)
{
toolBarButtonResult.Enabled = false;
if ((!tabControlStorageSCU.Controls.Contains(tabPageResults)))
{
tabControlStorageSCU.Controls.Add(tabPageResults);
}
if (!isStopped)
{
lock (lockObject)
{
this.threadManager.Stop();
allThreadsFinished = true;
//.........这里部分代码省略.........