예제 #1
0
 public ProjectService(IParserService parserService, IStatusBarService statusBarService,
                       IFileTypeMethodFactory fileTypeMethodFactory)
 {
     _parserService    = parserService;
     _statusBarService = statusBarService;
     fileTypeMethodFactory.RegisterFileType(ProjectExtension, OpenProject);
 }
예제 #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());
        }
예제 #3
0
 public OpenFileAction(params FilePath[] fileNames)
 {
     _fileNames             = fileNames;
     _fileTypeMethodFactory = DependencyFactory.Resolve <IFileTypeMethodFactory>();
 }