public GuiActionsHandler(OsuFileIo osuFileIo, ICollectionEditor collectionEditor, IUserDialogs userDialogs, IMainFormView mainFormView, MainFormPresenter mainFormPresenter, ILoginFormView loginForm)
        {
            _sidePanelActionsHandler = new SidePanelActionsHandler(osuFileIo, collectionEditor, userDialogs, mainFormView, this, mainFormPresenter, loginForm);

            _beatmapListingActionsHandler = new BeatmapListingActionsHandler(collectionEditor, userDialogs, loginForm, osuFileIo);
            _beatmapListingActionsHandler.Bind(mainFormPresenter.BeatmapListingModel);
        }
 public CollectionEditor(ICollectionEditor collectionEditor, ICollectionNameValidator collectionNameValidator,
                         ICollectionAddRenameForm collectionAddRenameForm, MapCacher mapCacher)
 {
     _collectionEditor        = collectionEditor;
     _collectionNameValidator = collectionNameValidator;
     _collectionAddRenameForm = collectionAddRenameForm;
     _mapCacher = mapCacher;
 }
        public GuiActionsHandler(OsuFileIo osuFileIo, ICollectionEditor collectionEditor, IUserDialogs userDialogs, IMainFormView mainFormView, MainFormPresenter mainFormPresenter, ILoginFormView loginForm)
        {
            _mainFormView           = mainFormView;
            SidePanelActionsHandler = new SidePanelActionsHandler(osuFileIo, collectionEditor, userDialogs, mainFormView, this, mainFormPresenter, loginForm);

            _beatmapListingActionsHandler = new BeatmapListingActionsHandler(collectionEditor, userDialogs, loginForm, osuFileIo);
            _beatmapListingActionsHandler.Bind(mainFormPresenter.BeatmapListingModel);

            Initalizer.CollectionsManager.LoadedCollections.CollectionChanged += LoadedCollectionsOnCollectionChanged;
        }
示例#4
0
        public SidePanelActionsHandler(OsuFileIo osuFileIo, ICollectionEditor collectionEditor, IUserDialogs userDialogs, IMainFormView mainForm, IBeatmapListingBindingProvider beatmapListingBindingProvider, MainFormPresenter mainFormPresenter, ILoginFormView loginForm)
        {
            _osuFileIo        = osuFileIo;
            _collectionEditor = collectionEditor;
            _userDialogs      = userDialogs;
            _mainForm         = mainForm;
            _beatmapListingBindingProvider = beatmapListingBindingProvider;
            _mainFormPresenter             = mainFormPresenter;
            _loginForm           = loginForm;
            _collectionGenerator = new CollectionsApiGenerator(Initalizer.OsuFileIo.LoadedMaps);

            BindMainFormActions();
        }
        public BeatmapListingActionsHandler(ICollectionEditor collectionEditor, IUserDialogs userDialogs, ILoginFormView loginForm, OsuFileIo osuFileIo)
        {
            _collectionEditor = collectionEditor;
            _userDialogs      = userDialogs;
            _loginForm        = loginForm;
            _osuFileIo        = osuFileIo;

            _beatmapOperationHandlers = new Dictionary <BeatmapListingAction, Action <object> >
            {
                { BeatmapListingAction.CopyBeatmapsAsText, CopyBeatmapsAsText },
                { BeatmapListingAction.CopyBeatmapsAsUrls, CopyBeatmapsAsUrls },
                { BeatmapListingAction.DeleteBeatmapsFromCollection, DeleteBeatmapsFromCollection },
                { BeatmapListingAction.DownloadBeatmapsManaged, DownloadBeatmapsManaged },
                { BeatmapListingAction.DownloadBeatmaps, DownloadBeatmaps },
                { BeatmapListingAction.OpenBeatmapPages, OpenBeatmapPages },
                { BeatmapListingAction.OpenBeatmapFolder, OpenBeatmapFolder }
            };
        }
示例#6
0
        public void Bind(ICollectionEditor editor)
        {
            InternalDispose();

            _internalEditor = editor;
            if (editor == null)
            {
                return;
            }

            addButton.Bind(editor.AddCommand);
            removeButton.Bind(editor.RemoveCommand);
            cloneButton.Bind(editor.CloneCommand);
            moveUpButton.Bind(editor.MoveUpCommand);
            moveDownButton.Bind(editor.MoveDownCommand);
            clearButton.Bind(editor.ClearCommand);
            importButton.Bind(editor.ImportCommand);
            exportButton.Bind(editor.ExportCommand);

            OnEditorPropertyChanged(_internalEditor, Core.Properties.NullPropertyChanged);
            editor.PropertyChanged += OnEditorPropertyChanged;
        }
示例#7
0
 public CollectionListingModel(Collections collections, ICollectionEditor collectionEditor)
 {
     _collectionEditor = collectionEditor;
     SetCollections(collections);
 }
 public MainFormModel(ICollectionEditor collectionEditor, IUserDialogs userDialogs)
 {
     UserDialogs      = userDialogs;
     CollectionEditor = collectionEditor;
 }
 public void Init(ICollectionEditor editor)
 {
     _attachedEditor = editor;
     RefreshValues();
     UpdateButtons();
 }