/// <summary>
 /// Constructor
 /// </summary>        
 /// <param name="destinationView">The form within the project that will accept the packaged data</param>
 /// <param name="mergeType">Determines how to handle data merging during the import.</param>
 public ImportEncryptedDataPackageDialog(View destinationView, DataMergeType mergeType = DataMergeType.UpdateAndAppend)
 {
     InitializeComponent();
     this.destinationView = destinationView;
     destinationProject = this.destinationView.Project;
     Construct(mergeType);
 }
Exemple #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="destinationView">The form within the project that will accept the packaged data</param>
 /// <param name="mergeType">Determines how to handle data merging during the import.</param>
 public ImportEncryptedDataPackageDialog(View destinationView, DataMergeType mergeType = DataMergeType.UpdateAndAppend)
 {
     InitializeComponent();
     this.destinationView = destinationView;
     destinationProject   = this.destinationView.Project;
     Construct(mergeType);
 }
        private void Construct(DataMergeType mergeType)
        {
            config = Configuration.GetNewInstance();

            switch (mergeType)
            {
            case DataMergeType.UpdateAndAppend:
                this.cmbImportType.SelectedIndex = 0;
                break;

            case DataMergeType.UpdateOnly:
                this.cmbImportType.SelectedIndex = 1;
                break;

            case DataMergeType.AppendOnly:
                this.cmbImportType.SelectedIndex = 2;
                break;
            }
        }
        /// <summary>
        /// Constructor
        /// </summary>        
        /// <param name="destinationView">The form that will accept the data</param>
        /// <param name="packagePath">The package to be imported</param>
        /// <param name="mergeType">Determines how to handle data merging during the import.</param>
        public ImportEncryptedDataPackageDialog(View destinationView, string packagePath, DataMergeType mergeType = DataMergeType.UpdateAndAppend)
        {
            InitializeComponent();
            this.destinationView = destinationView;
            destinationProject = this.destinationView.Project;

            if (System.IO.File.Exists(packagePath))
            {
                checkboxBatchImport.Checked = false;
                txtPackageFile.Text = packagePath;
            }
            else if (System.IO.Directory.Exists(packagePath))
            {
                checkboxBatchImport.Checked = true;
                txtPackageFile.Text = packagePath;
            }
            else
            {
                throw new System.IO.FileNotFoundException(ImportExportSharedStrings.ERROR_PACKAGE_DOESNT_EXIST, packagePath);
            }

            Construct(mergeType);
        }
        private void Construct(DataMergeType mergeType)
        {
            config = Configuration.GetNewInstance();

            switch (mergeType)
            {
                case DataMergeType.UpdateAndAppend:
                    this.cmbImportType.SelectedIndex = 0;
                    break;
                case DataMergeType.UpdateOnly:
                    this.cmbImportType.SelectedIndex = 1;
                    break;
                case DataMergeType.AppendOnly:
                    this.cmbImportType.SelectedIndex = 2;
                    break;
            }
        }
Exemple #6
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="destinationView">The form that will accept the data</param>
        /// <param name="packagePath">The package to be imported</param>
        /// <param name="mergeType">Determines how to handle data merging during the import.</param>
        public ImportEncryptedDataPackageDialog(View destinationView, string packagePath, DataMergeType mergeType = DataMergeType.UpdateAndAppend)
        {
            InitializeComponent();
            this.destinationView = destinationView;
            destinationProject   = this.destinationView.Project;

            if (System.IO.File.Exists(packagePath))
            {
                checkboxBatchImport.Checked = false;
                txtPackageFile.Text         = packagePath;
            }
            else if (System.IO.Directory.Exists(packagePath))
            {
                checkboxBatchImport.Checked = true;
                txtPackageFile.Text         = packagePath;
            }
            else
            {
                throw new System.IO.FileNotFoundException(ImportExportSharedStrings.ERROR_PACKAGE_DOESNT_EXIST, packagePath);
            }

            Construct(mergeType);
        }