public BookmarkController( BookmarkManagerContext context, IBookmarkService bookmarkService) { _context = context; _bookmarkService = bookmarkService; }
public MozillaBookmarkProfile(string name, IBookmarkService bookmarkService) { _bookmarkservice = bookmarkService; _profileName = name; _lastCookiesFileTime = DateTime.MinValue; _cookies = new HashMap(100); }
public MainViewModel(ISnackbarMessageQueue messageQueue, Interfaces.ILog log, IBookmarkService bookmarkService, [ImportMany] IEnumerable <ExportFactory <IPageViewModel, IPageViewModelMetadata> > viewModels, [ImportMany] IEnumerable <Lazy <IPageView, IPageViewMetadata> > views, DialogHelpViewModel helpViewModel) { _log = log; _pageFactories = viewModels.ToDictionary(vm => vm.Metadata.Context, vm => (ExportFactory <IPageViewModel>)vm); _bookmarkService = bookmarkService; MessageQueue = messageQueue; Pages = new ObservableCollection <Model.Context>(views.Where(p => p.Metadata.Context != null).OrderBy(p => p.Metadata.Index).Select(p => (Model.Context)Activator.CreateInstance(p.Metadata.Context))); Bookmarks = new ObservableCollection <Context>(_bookmarkService.Bookmarks); Tabs = new ObservableCollection <IPageViewModel>(); UseDarkColorScheme = Properties.Settings.Default.DarkColorScheme; OpenInNewTab = Properties.Settings.Default.OpenInNewTab; OpenTabCommand = new DelegateCommand <Context>(CreateTab); ReplaceTabCommand = new DelegateCommand <Context>(ReplaceTab); CloseTabCommand = new DelegateCommand <PageViewModel>(CloseTab, t => Tabs.Count > 1); ReindexCommand = new DelegateCommand(() => _log.Update(null, CancellationToken.None)); OpenCommand = new DelegateCommand <string[]>(Open); EditCommand = new DelegateCommand <SearchContext>(_bookmarkService.Edit, c => !c.IsFromRepository); DeleteCommand = new DelegateCommand <SearchContext>(_bookmarkService.Remove, c => !c.IsFromRepository); SaveCommand = new DelegateCommand(() => _bookmarkService.Save((SearchContext)CurrentTab.Context), () => CurrentTab is IPageViewModel page && page.Context is SearchContext); ManageBookmarksCommand = new DelegateCommand(_bookmarkService.Manage); SelectBookmarkRepositoryCommand = new DelegateCommand(SelectBookmarkRepository); ClearBookmarkRepositoryCommand = new DelegateCommand(ClearBookmarkRepository, () => !string.IsNullOrEmpty(Properties.Settings.Default.BookmarkRepositoryFile)); ShowHelpCommand = new DelegateCommand(() => DialogHost.Show(helpViewModel)); // update the bookmark list when the service updates _bookmarkService.CollectionChanged += (s, e) => { Bookmarks.Clear(); Bookmarks.AddRange(_bookmarkService.Bookmarks); }; // create the initial tab CreateTab((Context)Pages.First().Clone()); }
public BookmarkController(IBookmarkService bookmarkService, ILogger <BookmarkController> logger, ICacheManager cacheManager, UserManager <User> userManager, IRoadieSettings roadieSettings) : base(cacheManager, roadieSettings, userManager) { Logger = logger; BookmarkService = bookmarkService; }
/// <summary> /// Constructor /// </summary> /// <param name="userProvider">The user provider service</param> /// <param name="service">The bookmarks service</param> public BookmarksController(IUserProvider userProvider, IBookmarkService service) { Contract.Requires(userProvider != null, "The user provider must not be null."); Contract.Requires(service != null, "The bookmarks service must not be null."); this.userProvider = userProvider; this.service = service; }
public BookmarkController(IBookmarkService bookmarkService, ILoggerFactory logger, ICacheManager cacheManager, UserManager <ApplicationUser> userManager, IRoadieSettings roadieSettings) : base(cacheManager, roadieSettings, userManager) { this.Logger = logger.CreateLogger("RoadieApi.Controllers.BookmarkController"); this.BookmarkService = bookmarkService; }
public ApiBookmarksController( IBookmarkService bookmarkService, ICategoryService categoryService) { _bookmarkService = bookmarkService; _categoryService = categoryService; }
public FetcherController( ILogger <FetcherController> logger, IBookmarkService bookmarkService) { _logger = logger; _bookmarkService = bookmarkService; }
public ChanceCommandProcessor(LineService lineService , IBookmarkService bookmarkService , IRandomNumberService randomNumberService) : base(Keyword.Chance, lineService) { _lineService = lineService; _bookmarkService = bookmarkService; _randomNumberService = randomNumberService; }
public TeacherController(IMarkService markService, IUserService userService, IBookmarkService bookmarkService) { this.markService = markService; this.userService = userService; this.bookmarkService = bookmarkService; }
public CheckFlagCommandProcessor(IFlagAccessor flagAccessor , LineService lineService , IBookmarkService bookmarkService ) : base(Keyword.CheckFlag, lineService) { _flagAccessor = flagAccessor; _lineService = lineService; _bookmarkService = bookmarkService; }
public PreOrderController(IBookService bookService, IChapterService chapterService, IRecommendService recommendService, IUsersService usersService, IBookmarkService bookmarkService, IOrderService orderService) { _bookService = bookService; _chapterService = chapterService; _recommendService = recommendService; _usersService = usersService; _bookmarkService = bookmarkService; _orderService = orderService; }
public CallCommandProcessor(IScriptAccessor scriptAccessor , LineService lineService , IPathsAccessor pathsAccessor , IBookmarkService bookmarkService) : base(Keyword.Call, lineService) { _lineService = lineService; _scriptAccessor = scriptAccessor; _pathsAccessor = pathsAccessor; _bookmarkService = bookmarkService; }
public DecideOrgasmCommandProcessor(LineService lineService , IRandomNumberService randomNumberService , IBookmarkService bookmarkService , ISettingsAccessor settingsAccessor ) : base(Keyword.DecideOrgasm, lineService) { _randomNumberService = randomNumberService; _bookmarkService = bookmarkService; _settingsAccessor = settingsAccessor; }
public ChapterController(IBookService bookService, IChapterService chapterService, IRecommendService recommendService, IBookmarkService bookmarkService, IExtendChapterService extendChapterService, IADService adService, IOrderService orderService) { _bookService = bookService; _chapterService = chapterService; _recommendService = recommendService; _bookmarkService = bookmarkService; _extendChapterService = extendChapterService; _adService = adService; _orderService = orderService; }
public LabelService(IRoadieSettings configuration, IHttpEncoder httpEncoder, IHttpContext httpContext, IRoadieDbContext context, ICacheManager cacheManager, ILogger <LabelService> logger, IBookmarkService bookmarkService) : base(configuration, httpEncoder, context, cacheManager, logger, httpContext) { BookmarkService = bookmarkService; }
public DetailsViewModel(IArticlesService articles, IBookmarkService bookmarksService) { this.articles = articles; this.bookmarksService = bookmarksService; this.Bookmark = new RelayCommand(async () => { this.IsLoading = true; this.IsBookmarked = await this.bookmarksService.ToggleBookmarkAsync(this.Article.Id); this.IsLoading = false; }); }
public PlaylistService(IRoadieSettings configuration, IHttpEncoder httpEncoder, IHttpContext httpContext, data.IRoadieDbContext dbContext, ICacheManager cacheManager, ILogger <PlaylistService> logger, IBookmarkService bookmarkService) : base(configuration, httpEncoder, dbContext, cacheManager, logger, httpContext) { this.BookmarkService = bookmarkService; }
public IfCommandProcessor(LineService lineService , IBookmarkService bookmarkService , IConditionalObjectLogic conditionalObjectLogic , IVariableAccessor variableAccessor , IVocabularyProcessor sessionVocabularyProcessor ) : base(Keyword.If, lineService) { _bookmarkService = bookmarkService; _conditionalObjectLogic = conditionalObjectLogic; _variableAccessor = variableAccessor; _sessionVocabularyProcessor = sessionVocabularyProcessor; }
public BookController(IBookService bookService, IHotSearchWordService hotSearchWordService, IRecommendService recommendService, IBookmarkService bookmarkService, IPresentService presentService, IChapterService chapterService, ICommentService commentService, IPackageService packageService, IOrderService orderService) { _bookService = bookService; _hotSearchWordService = hotSearchWordService; _recommendService = recommendService; _bookmarkService = bookmarkService; _presentService = presentService; _chapterService = chapterService; _commentService = commentService; _packageService = packageService; _orderService = orderService; }
public void Execute(IActionContext context) { IResourceList resources = context.SelectedResources; if (resources.Count > 1) { if (MessageBox.Show(Core.MainWindow, "Are you sure you want to delete selected weblinks and/or folders?", "Delete Bookmarks", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { return; } } for (int i = 0; i < resources.Count; ++i) { IResource res = context.SelectedResources[i]; if (res.Type != "Folder" && res.Type != "Weblink") { res = res.GetLinkProp("Source"); } if (res != null && (res.Type == "Folder" || res.Type == "Weblink")) { if (resources.Count == 1) { if (res.Type != "Folder" || res.DisplayName != "New Folder") { if (MessageBox.Show(Core.MainWindow, "Are you sure you want to delete '" + res.DisplayName + "'?", "Delete Bookmark", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { return; } } } IBookmarkService bookmarkService = (IBookmarkService)Core.PluginLoader.GetPluginService(typeof(IBookmarkService)); IBookmarkProfile profile = bookmarkService.GetOwnerProfile(res); string error = null; if (profile != null && profile.CanDelete(res, out error)) { profile.Delete(res); } if (res.Type == "Folder") { bookmarkService.DeleteFolder(res); } else { bookmarkService.DeleteBookmark(res); } } } }
public BookmarkConsumer(ICapPublisher capPublisher, IHttpClientFactory httpClientFactory, IBlobProvider blobProvider, IPostService postService, IBookmarkService bookmarkService) { _capPublisher = capPublisher; _blobProvider = blobProvider; _postService = postService; _bookmarkService = bookmarkService; _httpClient = httpClientFactory.CreateClient(); }
public AnimeController( IAnimeService animeService, IBookmarkService bookmarkService, IEpisodeService episodeService, IMapper mapper ) { _animeService = animeService; _bookmarkService = bookmarkService; _episodeService = episodeService; _mapper = mapper; }
public LabelService(IRoadieSettings configuration, IHttpEncoder httpEncoder, IHttpContext httpContext, data.IRoadieDbContext context, ICacheManager cacheManager, ILogger <LabelService> logger, ICollectionService collectionService, IPlaylistService playlistService, IBookmarkService bookmarkService) : base(configuration, httpEncoder, context, cacheManager, logger, httpContext) { this.BookmarkService = bookmarkService; }
public TrackService(IRoadieSettings configuration, IHttpEncoder httpEncoder, IHttpContext httpContext, data.IRoadieDbContext dbContext, ICacheManager cacheManager, ILogger <TrackService> logger, IBookmarkService bookmarkService, IAdminService adminService) : base(configuration, httpEncoder, dbContext, cacheManager, logger, httpContext) { this.BookmarkService = bookmarkService; this.AdminService = adminService; }
internal static void SetImportPropertiesOfProfiles() { IBookmarkService service = (IBookmarkService)Core.PluginLoader.GetPluginService(typeof(IBookmarkService)); string[] profiles = Core.SettingStore.ReadString("Favorites", "MozillaProfile").ToLower().Split(';'); foreach (IBookmarkProfile prf in service.Profiles) { MozillaBookmarkProfile mprf = prf as MozillaBookmarkProfile; if (mprf != null) { mprf.ImportAllowed = Array.IndexOf(profiles, mprf._profileName.ToLower()) >= 0; } } }
private static void OnlineUpdateMozillaProfiles() { MozillaBookmarkProfile.SetImportPropertiesOfProfiles(); IBookmarkService service = (IBookmarkService)Core.PluginLoader.GetPluginService(typeof(IBookmarkService)); foreach (IBookmarkProfile profile in service.Profiles) { MozillaBookmarkProfile mozillaPrf = profile as MozillaBookmarkProfile; if (mozillaPrf != null) { Core.ResourceAP.RunUniqueJob(new MethodInvoker(profile.StartImport)); } } }
private void NewFolder() { IBookmarkService bookmarkService = (IBookmarkService)Core.PluginLoader.GetPluginService(typeof(IBookmarkService)); IResource newFolder = bookmarkService.FindOrCreateFolder(_parentFolder, "New Folder"); IBookmarkProfile profile = bookmarkService.GetOwnerProfile(newFolder); string error = null; if (profile != null && profile.CanCreate(newFolder, out error)) { profile.Create(newFolder); } Core.WorkspaceManager.AddToActiveWorkspaceRecursive(newFolder); Core.UIManager.QueueUIJob(new ResourceDelegate(FavoritesPlugin._favoritesTreePane.SelectResource), newFolder); Core.UIManager.QueueUIJob(new ResourceDelegate(FavoritesPlugin._favoritesTreePane.EditResourceLabel), newFolder); }
public AddFavoriteForm(IResource parent) { _parent = parent; _bookmarkService = (IBookmarkService)Core.PluginLoader.GetPluginService(typeof(IBookmarkService)); InitializeComponent(); this.Icon = Core.UIManager.ApplicationIcon; if ((_nameBox.Visible) && (_nameBox.Enabled)) { _nameBox.Focus(); } _createInCombo.AddResourceHierarchy(_bookmarkService.BookmarksRoot, "Folder", FavoritesPlugin._propParent, new AcceptResourceDelegate(AcceptFolder)); foreach (IBookmarkProfile profile in _bookmarkService.Profiles) { IResource root = _bookmarkService.GetProfileRoot(profile); string error; if (!_createInCombo.Items.Contains(root) && profile.CanCreate(root, out error)) { _createInCombo.AddResourceHierarchy(root, "Folder", FavoritesPlugin._propParent, 1); } } _createInCombo.SelectedItem = parent; _unitBox.SelectedIndex = 0; RestoreSettings(); string defaultUrl = null; IDataObject dataObj = Clipboard.GetDataObject(); if (dataObj != null) { defaultUrl = (string)dataObj.GetData(typeof(string)); if (defaultUrl != null && defaultUrl.Length > 0) { try { new Uri(defaultUrl); } catch { defaultUrl = "http://"; } } } _URLBox.Text = (defaultUrl == null || defaultUrl.Length == 0) ? string.Empty : defaultUrl; _URLBox.SelectionStart = _URLBox.Text.Length; Height = MaximumSize.Height; }
public ListViewModel(IDataService dataService, IBookmarkService bookmarkService, INavigationService navigationService, IGeolocationProvider geolocationProvider) { this.dataService = dataService; this.bookmarkService = bookmarkService; this.navigationService = navigationService; this.geolocationProvider = geolocationProvider; this.BestCafes = new ObservableCollection <CafeSummaryViewModel>(); this.NearbyCafes = new ObservableCollection <CafeSummaryViewModel>(); this.BookmarkedCafes = new ObservableCollection <CafeSummaryViewModel>(); this.ShowMap = new RelayCommand(this.OnShowMapExecuted); #if DEBUG if (this.IsInDesignMode) { this.OnNavigatedTo(); } #endif }
private RemoteAnnotateForm(IResource weblink) { InitializeComponent(); RestoreSettings(); Icon = FavoritesPlugin.LoadIconFromAssembly("categorize_annotate.ico"); _weblink = weblink; InitializeContent(); IBookmarkService service = (IBookmarkService)Core.PluginLoader.GetPluginService(typeof(IBookmarkService)); IBookmarkProfile profile = service.GetOwnerProfile(_weblink); string error; if (profile == null || profile.CanCreate(_weblink, out error)) { _nameBox.ReadOnly = false; _nameBox.BorderStyle = BorderStyle.Fixed3D; _nameBox.Font = new Font(_nameBox.Font, FontStyle.Regular); } }
public BookmarkController( IBookmarkService bookmarkService ) { this.bookmarkService = bookmarkService; }
public BookmarksController(IBookmarkService bookmarkService) { _bookmarkService = bookmarkService; }
public BookmarksViewModel(IBookmarkService bookmarkService, IArticlesService service) : base(service) { this.bookmarkService = bookmarkService; this.Title = "Ihre Leseliste"; }