/// <summary> /// Initializes a new instance of the <see cref="LocationDialog"/> class. /// </summary> /// <param name="locationDialogFactory">The location dialog factory service.</param> /// <param name="resourceManager">The location resource manager.</param> internal LocationDialog( ILocationDialogFactory locationDialogFactory, IFavoritesManager favoritesManager, LocationResourceManager resourceManager = null) : base(resourceManager) { SetField.NotNull(out this.locationDialogFactory, nameof(locationDialogFactory), locationDialogFactory); SetField.NotNull(out this.favoritesManager, nameof(favoritesManager), favoritesManager); }
public TimetableViewModel(Stops station, Routes route, int?direction, IDataProvider dataProvider, IFavoritesManager favoritesManager) { Station = station; Route = route; _direction = direction; _dataProvider = dataProvider; _favoritesManager = favoritesManager; }
private FavoritesDummyForm(IServiceProvider provider) { _serviceManager = new ServiceManager(provider); _favManager = provider.GetRequiredService <IFavoritesManager>(); InitializeComponent(); FillImages(); CustomInitializeComponent(); _serviceManager.Publish <IFavoritesDummyFormService>(new FavoritesDummyFormService(this)); _contextMenuGenerator = new StripMenuGenerator(_serviceManager, _contextMenuStrip, "Favorites.ContextMenu"); }
private FavoritesDummyForm(IServiceProvider provider) { _serviceManager = new ServiceContainer(provider); _favManager = provider.GetRequiredService<IFavoritesManager>(); InitializeComponent(); FillImages(); CustomInitializeComponent(); _serviceManager.Publish<IFavoritesDummyFormService>(new FavoritesDummyFormService(this)); _contextMenuGenerator = new StripMenuGenerator(_serviceManager, _contextMenuStrip, "Favorites.ContextMenu"); }
public StateObject([NotNull] IServiceProvider serviceProvider, [NotNull]string filename) { if (serviceProvider == null) throw new ArgumentNullException("serviceProvider"); if (filename == null) throw new ArgumentNullException("filename"); _serviceProvider = serviceProvider; _favManager = serviceProvider.GetRequiredService<IFavoritesManager>(); _filename = filename; }
public static bool TryGetFavoritesPlugin(this PanaceaServices core, out IFavoritesManager plugin) { plugin = null; var favorites = core.PluginLoader.GetPlugins <IFavoritesPlugin>().FirstOrDefault(); if (favorites == null) { return(false); } plugin = favorites.GetManager(); return(true); }
internal EditFavoriteLocationDialog( ILocationDialogFactory locationDialogFactory, IFavoritesManager favoritesManager, string favoriteName, Location favoriteLocation, LocationResourceManager resourceManager) : base(resourceManager) { SetField.NotNull(out this.locationDialogFactory, nameof(locationDialogFactory), locationDialogFactory); SetField.NotNull(out this.favoritesManager, nameof(favoritesManager), favoritesManager); SetField.NotNull(out this.favoriteName, nameof(favoriteName), favoriteName); SetField.NotNull(out this.favoriteLocation, nameof(favoriteLocation), favoriteLocation); }
public StateObject([NotNull] IServiceProvider serviceProvider, [NotNull] string filename) { if (serviceProvider == null) { throw new ArgumentNullException("serviceProvider"); } if (filename == null) { throw new ArgumentNullException("filename"); } _serviceProvider = serviceProvider; _favManager = serviceProvider.GetRequiredService <IFavoritesManager>(); _filename = filename; }
public FavoriteLocationRetrieverDialog( bool supportsKeyboard, IFavoritesManager favoritesManager, ILocationDialogFactory locationDialogFactory, ILocationCardBuilder cardBuilder, IGeoSpatialService geoSpatialService, LocationOptions options, LocationRequiredFields requiredFields, LocationResourceManager resourceManager) : base(geoSpatialService, options, requiredFields, resourceManager) { SetField.NotNull(out this.favoritesManager, nameof(favoritesManager), favoritesManager); SetField.NotNull(out this.locationDialogFactory, nameof(locationDialogFactory), locationDialogFactory); SetField.NotNull(out this.cardBuilder, nameof(cardBuilder), cardBuilder); this.supportsKeyboard = supportsKeyboard; }
public FavoritesSelectFolderForm( IServiceProvider provider, FavoritesFolder folders, bool newItem) { _favManager = provider.GetRequiredService<IFavoritesManager>(); InitializeComponent(); if (!newItem) { _comment.Visible = false; _commentLabel.Visible = false; } _folderView.SmallImageList = FavoritesDummyForm.Instance.TreeImages; if (folders.ShowLinks) folders.ShowLinks = false; _folderView.Nodes = folders; }
public FavoritesSelectFolderForm( IServiceProvider provider, FavoritesFolder folders, bool newItem) { _favManager = provider.GetRequiredService <IFavoritesManager>(); InitializeComponent(); if (!newItem) { _comment.Visible = false; _commentLabel.Visible = false; } _folderView.SmallImageList = FavoritesDummyForm.Instance.TreeImages; if (folders.ShowLinks) { folders.ShowLinks = false; } _folderView.Nodes = folders; }
public FavoritesViewModel(IFavoritesManager favoritesManager, IDataProvider dataProvider) { _favoritesManager = favoritesManager; _dataProvider = dataProvider; }
public FavoritesCommandTarget(IServiceProvider serviceProvider) : base(serviceProvider) { _favManager = serviceProvider.GetRequiredService <IFavoritesManager>(); }
internal AddFavoriteLocationDialog(IFavoritesManager favoritesManager, Location location, LocationResourceManager resourceManager) : base(resourceManager) { SetField.NotNull(out this.favoritesManager, nameof(favoritesManager), favoritesManager); SetField.NotNull(out this.location, nameof(location), location); }
public FavoritesCommandTarget(IServiceProvider serviceProvider) : base(serviceProvider) { _favManager = serviceProvider.GetRequiredService<IFavoritesManager>(); }