Import() public method

Collect the parameters and import
public Import ( ) : bool
return bool
Esempio n. 1
0
        /// <summary>
        /// Import
        /// </summary>
        /// <param name="data"></param>
        private static DialogResult Import(ImportData data)
        {
            String returnFilename = String.Empty;
            DialogResult result = ShowOpenDialog(data, ref returnFilename);
            if (result != DialogResult.Cancel)
            {
                data.ImportFileFullName = returnFilename;
                if (!data.Import())
                {
                    TaskDialog.Show("Import", "Cannot import " + Path.GetFileName(data.ImportFileFullName) +
                        " in current settings.", TaskDialogCommonButtons.Ok);
                }
            }

            return result;
        }
Esempio n. 2
0
        /// <summary>
        /// Import
        /// </summary>
        /// <param name="data"></param>
        private static DialogResult Import(ImportData data)
        {
            String returnFilename = String.Empty;
            DialogResult result = ShowOpenDialog(data, ref returnFilename);
            if (result != DialogResult.Cancel)
            {
                data.ImportFileFullName = returnFilename;
                if (!data.Import())
                {
                    MessageBox.Show("Cannot import " + Path.GetFileName(data.ImportFileFullName) +
                        " in current settings.", "Import", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }

            return result;
        }