Esempio n. 1
0
 public ProjectService(IParserService parserService, IStatusBarService statusBarService,
                       IFileTypeMethodFactory fileTypeMethodFactory)
 {
     _parserService    = parserService;
     _statusBarService = statusBarService;
     fileTypeMethodFactory.RegisterFileType(ProjectExtension, OpenProject);
 }
Esempio n. 2
0
        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());
        }