public ProjectService(IParserService parserService, IStatusBarService statusBarService, IFileTypeMethodFactory fileTypeMethodFactory) { _parserService = parserService; _statusBarService = statusBarService; fileTypeMethodFactory.RegisterFileType(ProjectExtension, OpenProject); }
private void InitializeUi() { IFileTypeMethodFactory fileTypeMethodFactory = DependencyFactory.Resolve <IFileTypeMethodFactory>(); fileTypeMethodFactory.RegisterFileType(".asm", path => DocumentWindows.TextEditor.OpenDocument(path) != null); fileTypeMethodFactory.RegisterFileType(".z80", path => DocumentWindows.TextEditor.OpenDocument(path) != null); fileTypeMethodFactory.RegisterFileType(".inc", path => DocumentWindows.TextEditor.OpenDocument(path) != null); fileTypeMethodFactory.RegisterFileType(".bmp", path => ImageViewer.OpenImage(path) != null); fileTypeMethodFactory.RegisterFileType(".png", path => ImageViewer.OpenImage(path) != null); fileTypeMethodFactory.RegisterDefaultHandler(path => DocumentWindows.TextEditor.OpenDocument(path) != null); _dockingService.LoadConfig(GetContentFromPersistString); _toolBarService.RegisterToolbar(DebugToolBarName, new DebugToolBar()); _toolBarService.RegisterToolbar(MainToolBarName, new MainToolBar()); _menuService.RegisterMenu(MainMenuName, new MainMenuStrip()); }
public OpenFileAction(params FilePath[] fileNames) { _fileNames = fileNames; _fileTypeMethodFactory = DependencyFactory.Resolve <IFileTypeMethodFactory>(); }