本文整理汇总了C#中Epi.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# Epi.ShowDialog方法的具体用法?C# Epi.ShowDialog怎么用?C# Epi.ShowDialog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Epi
的用法示例。
在下文中一共展示了Epi.ShowDialog方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DesignAndProcessCommand
/// <summary>
/// Method for calling process command
/// </summary>
/// <param name="dlg">Dialog to design and process command</param>
private void DesignAndProcessCommand(Epi.Windows.Analysis.Dialogs.CommandDesignDialog dlg)
{
#region Input Validation
if (dlg == null)
{
throw new System.ArgumentNullException("dlg");
}
#endregion Input Validation
try
{
DialogResult result = dlg.ShowDialog();
if (result == DialogResult.OK)
{
//Some dialogs may not generate a command. No need to process command if command text is empty.
if (!string.IsNullOrEmpty(dlg.CommandText))
{
if (CommandGenerated != null)
{
Epi.Windows.Analysis.Forms.CommandProcessingMode Mode = (Epi.Windows.Analysis.Forms.CommandProcessingMode) dlg.ProcessingMode;
CommandGenerated(dlg.CommandText, Mode);
}
}
dlg.Close();
}
} //try
finally
{
//fix defect 279
if (this.tvCommands.SelectedNode.Parent != null)
{
tvCommands.SelectedNode = this.tvCommands.SelectedNode.Parent;
}
else
{
throw new System.ArgumentNullException("Parent node is null");
}
// dcs0 TODO - I don't think this should be here
//programEditor.SavePGM(Files.LastPgm);
}//finally
}
示例2: ShowCommandDesignDialog
private string ShowCommandDesignDialog(Epi.Windows.Analysis.Dialogs.CommandDesignDialog dialog)
{
DialogResult result = dialog.ShowDialog();
if (result == DialogResult.OK)
{
return (dialog.CommandText + Environment.NewLine);
}
return string.Empty;
}