public FileTreeObject(WorkpadManager workpadManager, SendToList sendToList, IFileExport fileExport, BackgroundDataBlockScanner backgroundDataBlockScanner)
        {
            _workpadManager             = workpadManager;
            _sendToList                 = sendToList;
            _fileExport                 = fileExport;
            _backgroundDataBlockScanner = backgroundDataBlockScanner;
            _backgroundDataBlockScanner.RunWorkerCompleted += BackgroundDataBlockScanner_RunWorkerCompleted;
            _backgroundDataBlockScanner.ProgressChanged    += BackgroundDataBlockScanner_ProgressChanged;

            HexWorkshopAvailable = sendToList.HexWorkshopAvailable();

            this.DataSourceChanged          += FileTree_DataSourceChanged;
            this.FocusRowChanged            += FileTree_FocusRowChanged;
            this.SaveAsSingleFile           += FileTree_SaveAsSingleFile;
            this.SaveAsContiguousFile       += FileTree_SaveAsContiguousFile;
            this.SaveAsSeparateFiles        += FileTree_SaveAsSeparateFiles;
            this.ExportToXml                += FileTree_ExportToXml;
            this.GotoOffsetInHexWorkshop    += FileTree_GotoOffsetInHexWorkshop;
            this.GotoEndOffsetInHexWorkshop += FileTree_GotoEndOffsetInHexWorkshop;
        }
Exemple #2
0
        public HeaderTree(WorkpadManager workpadManager, SendToList sendToList, IFileExport fileExport, IDetectorFormatter detectorFormatter, Creator <IInputFile, IProject, string> createInputFile)
        {
            _workpadManager    = workpadManager;
            _sendToList        = sendToList;
            _fileExport        = fileExport;
            _detectorFormatter = detectorFormatter;
            _createInputFile   = createInputFile;
            _selections        = new Dictionary <HeaderSelectionType, ISelection>();

            foreach (HeaderSelectionType selectionType in Enum.GetValues(typeof(HeaderSelectionType)))
            {
                _selections[selectionType] = new Selection(this, selectionType);
            }

            InitializeComponent();

            Init();

            InitializeDataBindings();
        }