本文整理汇总了C#中System.Windows.Forms.OpenFileDialog.get_FileName方法的典型用法代码示例。如果您正苦于以下问题:C# OpenFileDialog.get_FileName方法的具体用法?C# OpenFileDialog.get_FileName怎么用?C# OpenFileDialog.get_FileName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.OpenFileDialog
的用法示例。
在下文中一共展示了OpenFileDialog.get_FileName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: bBC_Click
private void bBC_Click(object sender, System.EventArgs e)
{
System.Windows.Forms.OpenFileDialog dialog = new System.Windows.Forms.OpenFileDialog();
dialog.set_Filter("DBF|*.dbf");
dialog.set_Title("Загрузить рассчитанные компенсации");
dialog.set_RestoreDirectory(true);
if ((dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) && (dialog.get_FileName() != ""))
{
Mappers.ExportMapper.Load_BenefitOwnerEDK(dialog.get_FileName(), this.cbClearOld.get_Checked());
}
}
示例2: MergeDBF_Electroseti_Click
private void MergeDBF_Electroseti_Click(object sender, System.EventArgs e)
{
if (this.ValidatePeriod(this.datePeriodElectroseti))
{
System.Windows.Forms.OpenFileDialog dialog = new System.Windows.Forms.OpenFileDialog();
dialog.set_CheckFileExists(true);
dialog.set_Multiselect(false);
dialog.set_Title("Файл, с которым искать расхождения");
System.Windows.Forms.FolderBrowserDialog dialog2 = new System.Windows.Forms.FolderBrowserDialog();
dialog2.set_Description("Директория для файлов выгрузки");
if ((dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) && (dialog2.ShowDialog() == System.Windows.Forms.DialogResult.OK))
{
Mappers.ExportMapper.MergeDBF_Electroseti(this.datePeriodElectroseti.DateBegin.Date, this.datePeriodElectroseti.DateEnd.Date, dialog.get_FileName(), dialog2.get_SelectedPath());
}
}
}