public override bool Apply(bool disposeController)
        {
            bool result;

            result = _dataSourceOptionsController.Apply(disposeController);
            if (!result)
            {
                return(result);
            }

            result = _processOptionsController.Apply(disposeController);
            if (!result)
            {
                return(result);
            }

            if (null != _processDataController)
            {
                result = _processDataController.Apply(disposeController);
                if (!result)
                {
                    return(result);
                }
            }

            SuccessfullyApplied?.Invoke();
            return(ApplyEnd(true, disposeController));
        }
        public override bool Apply(bool disposeController)
        {
            _doc = _fileNames.Select(x => (string)x.Tag).ToArray();

            SuccessfullyApplied?.Invoke();
            return(ApplyEnd(true, disposeController));
        }
        public override bool Apply(bool disposeController)
        {
            bool result;

            result = _commonImportOptionsController.Apply(false);
            if (!result)
            {
                return(result);
            }
            else
            {
                _doc.ImportOptions = (Altaxo.Data.IDataSourceImportOptions)_commonImportOptionsController.ModelObject;
            }

            result = _specificImportOptionsController.Apply(false);
            if (!result)
            {
                Current.Gui.ErrorMessageBox("Error in script. Please edit the script to remove the error");
                return(result);
            }
            else
            {
                _doc.ImportScript = (FileImportScript)_specificImportOptionsController.ModelObject; // AsciiImportOptions is cloned in property set
            }
            result = _specificImportSourceController.Apply(false);
            if (!result)
            {
                return(result);
            }
            else
            {
                _doc.SourceFileNames = (IEnumerable <string>)_specificImportSourceController.ModelObject; // AsciiImportOptions is cloned in property set
            }
            if (disposeController)
            {
                _commonImportOptionsController.Dispose();
                _specificImportOptionsController.Dispose();
                _specificImportSourceController.Dispose();
            }

            SuccessfullyApplied?.Invoke();

            return(ApplyEnd(true, disposeController));
        }
Exemple #4
0
        public override bool Apply(bool disposeController)
        {
            bool result;

            result = _commonImportOptionsController.Apply(false);
            if (!result)
            {
                return(result);
            }
            else
            {
                _doc.ImportOptions = (Altaxo.Data.IDataSourceImportOptions)_commonImportOptionsController.ModelObject;
            }

            result = _specificImportOptionsController.Apply(false);
            if (!result)
            {
                return(result);
            }
            else
            {
                _doc.AsciiImportOptions = (AsciiImportOptions)_specificImportOptionsController.ModelObject; // AsciiImportOptions is cloned in property set
            }
            result = _specificImportSourceController.Apply(false);
            if (!result)
            {
                return(result);
            }
            else
            {
                _doc.SourceFileNames = (IEnumerable <string>)_specificImportSourceController.ModelObject; // AsciiImportOptions is cloned in property set
            }
            if (disposeController)
            {
                _commonImportOptionsController.Dispose();
                _specificImportOptionsController.Dispose();
                _specificImportSourceController.Dispose();
            }

            SuccessfullyApplied?.Invoke();
            return(ApplyEnd(true, disposeController));
        }