Esempio n. 1
0
 public Importer(IImportDataTableToDataRepositoryMapper dataRepositoryMapper, IReadOnlyList <ColumnInfo> columnInfos, IImporterTask importerTask, IDialogCreator dialogCreator)
 {
     _dataRepositoryMapper = dataRepositoryMapper;
     _columnInfos          = columnInfos;
     _importerTask         = importerTask;
     _dialogCreator        = dialogCreator;
 }
Esempio n. 2
0
 public ImportDataTableControl(ISimpleChartPresenter presenter, IImportDataTableToDataRepositoryMapper mapper, IImportDataTableGridPresenter gridPresenter, IImporterTask importerTask)
 {
     _presenter = presenter;
     _presenter.LogLinSelectionEnabled = true;
     _mapper        = mapper;
     _gridPresenter = gridPresenter;
     _importerTask  = importerTask;
     _gridPresenter.CopyMetaDataColumnControlEvent += onCopyMetaDataColumnControl;
     _gridPresenter.SetUnitEvent += onSetUnitClick;
 }
 public ImporterView(IColumnInfosToImportDataTableMapper importMapper, IImportDataTableToDataRepositoryMapper dataRepositoryMapper, IImageListRetriever imageListRetriever,
                     IDialogCreator dialogCreator, IImporterTask importerTask, IColumnCaptionHelper columnCaptionHelper)
 {
     _importMapper         = importMapper;
     _dataRepositoryMapper = dataRepositoryMapper;
     _imageListRetriever   = imageListRetriever;
     _dialogCreator        = dialogCreator;
     _importerTask         = importerTask;
     _columnCaptionHelper  = columnCaptionHelper;
     InitializeComponent();
 }
        private void cleanMemory()
        {
            _namingView = null;
            if (_openSourceFileControl != null)
            {
                _openSourceFileControl.OnOpenSourceFile -= openSourceFileEvent;
                _openSourceFileControl = null;
            }

            if (_imports != null)
            {
                foreach (ImportDataTable table in _imports.Tables)
                {
                    table.MetaData?.Dispose();
                    table.Dispose();
                }
                _imports.Dispose();
            }
            if (_importDataTable != null)
            {
                _importDataTable.MetaData?.Dispose();
                _importDataTable.Dispose();
            }

            CleanUpHelper.ReleaseEvents(_dataSetControl);
            _dataSetControl?.Dispose();
            CleanUpHelper.ReleaseEvents(_sourceFilePreviewControl);
            _sourceFilePreviewControl?.Dispose();
            CleanUpHelper.ReleaseControls(Controls);
            Controls.Clear();

            _imports = null;
            _openSourceFileControl    = null;
            _sourceFilePreviewControl = null;
            _columnMappingControl     = null;
            _dataSetControl           = null;
            _importDataTable          = null;
            _importer             = null;
            _presenter            = null;
            _dataRepositoryMapper = null;
            _importMapper         = null;
            _columnInfos          = null;

            cleanColumnMappingControls();
            _columnMappingControls?.Clear();
            _columnMappingControls = null;

            columnMappingControlPanel.Controls.Clear();
        }
Esempio n. 5
0
        public ImporterPresenter(
            IImporterView view,
            IImportDataTableToDataRepositoryMapper repositoryMapper,
            INamingPatternPresenter namingPatternPresenter,
            IDialogCreator dialogCreator,
            IExcelPreviewPresenter excelPreviewPresenter,
            IRepositoryNamingTask repositoryNamingTask,
            INamingPatternToRepositoryNameMapper namingPatternToRepositoryNameMapper)
            : base(view)
        {
            _repositoryMapper       = repositoryMapper;
            _excelPreviewPresenter  = excelPreviewPresenter;
            _namingPatternPresenter = namingPatternPresenter;
            _view.SetNamingView(_namingPatternPresenter.View);
            _dialogCreator = dialogCreator;
            _namingTask    = repositoryNamingTask;
            _namingPatternToRepositoryNameMapper = namingPatternToRepositoryNameMapper;

            _subPresenterManager.Add(_excelPreviewPresenter);
            _subPresenterManager.Add(_namingPatternPresenter);
        }