本文整理汇总了C#中Microsoft.WindowsAPICodePack.Dialogs.CommonOpenFileDialog.SetCommonFormProperties方法的典型用法代码示例。如果您正苦于以下问题:C# CommonOpenFileDialog.SetCommonFormProperties方法的具体用法?C# CommonOpenFileDialog.SetCommonFormProperties怎么用?C# CommonOpenFileDialog.SetCommonFormProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.WindowsAPICodePack.Dialogs.CommonOpenFileDialog
的用法示例。
在下文中一共展示了CommonOpenFileDialog.SetCommonFormProperties方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Run
public bool Run (AddFileDialogData data)
{
var parent = data.TransientFor ?? MessageService.RootWindow;
var dialog = new CommonOpenFileDialog ();
dialog.SetCommonFormProperties (data);
var buildActionCombo = new CommonFileDialogComboBox ();
var group = new CommonFileDialogGroupBox ("overridebuildaction", "Override build action:");
buildActionCombo.Items.Add (new CommonFileDialogComboBoxItem (GettextCatalog.GetString ("Default")));
foreach (var ba in data.BuildActions) {
if (ba == "--")
continue;
buildActionCombo.Items.Add (new CommonFileDialogComboBoxItem (ba));
}
buildActionCombo.SelectedIndex = 0;
group.Items.Add (buildActionCombo);
dialog.Controls.Add (group);
if (!GdkWin32.RunModalWin32Dialog (dialog, parent))
return false;
dialog.GetCommonFormProperties (data);
var idx = buildActionCombo.SelectedIndex;
if (idx > 0)
data.OverrideAction = buildActionCombo.Items [idx].Text;
return true;
}