public DonateServerCommand(IDonationManager donationManager, IHttpContextReader httpContextReader,
                            INotifier notifier, IHubManager <NotifierHub> hubManager, IRewardReferrerSystem rewardReferrerSystem,
                            IMapper mapper)
 {
     this.donationManager      = donationManager;
     this.httpContextReader    = httpContextReader;
     this.notifier             = notifier;
     this.hubManager           = hubManager;
     this.rewardReferrerSystem = rewardReferrerSystem;
     this.mapper = mapper;
 }
        public frmNewDonate(IPersonDonationManager personDonationManager,
                            IDonationManager donationManager,
                            IPersonManager personManager,
                            IFamilyManager familyManager)
        {
            _personDonationManager = personDonationManager;
            _donationManager       = donationManager;
            _personManager         = personManager;
            _familyManager         = familyManager;

            InitializeComponent();
        }
Esempio n. 3
0
        public ShellViewModel(
            IWindowManager windowManager,
            ISyncthingManager syncthingManager,
            IApplicationState application,
            IConfigurationProvider configurationProvider,
            ConsoleViewModel console,
            ViewerViewModel viewer,
            BarAlertsViewModel barAlerts,
            Func <SettingsViewModel> settingsViewModelFactory,
            Func <AboutViewModel> aboutViewModelFactory,
            Func <ConflictResolutionViewModel> confictResolutionViewModelFactory,
            IProcessStartProvider processStartProvider,
            IDonationManager donationManager)
        {
            this.windowManager         = windowManager;
            this.syncthingManager      = syncthingManager;
            this.application           = application;
            this.configurationProvider = configurationProvider;
            this.Console   = console;
            this.Viewer    = viewer;
            this.BarAlerts = barAlerts;
            this.settingsViewModelFactory          = settingsViewModelFactory;
            this.aboutViewModelFactory             = aboutViewModelFactory;
            this.confictResolutionViewModelFactory = confictResolutionViewModelFactory;
            this.processStartProvider = processStartProvider;
            this.DonationManager      = donationManager;

            var configuration = this.configurationProvider.Load();

            this.Console.ConductWith(this);
            this.Viewer.ConductWith(this);
            this.BarAlerts.ConductWith(this);

            this.syncthingManager.StateChanged           += (o, e) => this.SyncthingState = e.NewState;
            this.syncthingManager.ProcessExitedWithError += (o, e) => this.ShowExitedWithError();

            this.ConsoleHeight = configuration.SyncthingConsoleHeight;
            this.Bind(s => s.ConsoleHeight, (o, e) => this.configurationProvider.AtomicLoadAndSave(c => c.SyncthingConsoleHeight = e.NewValue));

            this.ShowConsole = configuration.SyncthingConsoleHeight > 0;
            this.Bind(s => s.ShowConsole, (o, e) =>
            {
                this.ConsoleHeight = e.NewValue ? Configuration.DefaultSyncthingConsoleHeight : 0.0;
            });

            this.Placement = configuration.WindowPlacement;
            this.Bind(s => s.Placement, (o, e) => this.configurationProvider.AtomicLoadAndSave(c => c.WindowPlacement = e.NewValue));
        }
Esempio n. 4
0
        public AboutViewModel(
            IWindowManager windowManager,
            ISyncthingManager syncthingManager,
            IUpdateManager updateManager,
            Func <ThirdPartyComponentsViewModel> thirdPartyComponentsViewModelFactory,
            IProcessStartProvider processStartProvider,
            IDonationManager donationManager)
        {
            this.windowManager    = windowManager;
            this.syncthingManager = syncthingManager;
            this.updateManager    = updateManager;
            this.thirdPartyComponentsViewModelFactory = thirdPartyComponentsViewModelFactory;
            this.processStartProvider = processStartProvider;
            this.DonationManager      = donationManager;

            this.Version     = Assembly.GetExecutingAssembly().GetName().Version.ToString(3);
            this.HomepageUrl = AppSettings.Instance.HomepageUrl;

            this.syncthingManager.DataLoaded += this.SyncthingDataLoaded;
            this.LoadSyncthingVersion();

            this.CheckForNewerVersionAsync();
        }
        public frmDonate(IDonationManager donationManager)
        {
            _donationManager = donationManager;

            InitializeComponent();
        }
Esempio n. 6
0
 public DonationsController()
 {
     _donationManager = new DonationManager();
 }
Esempio n. 7
0
 public void TestSetup()
 {
     _donationManager = new DonationManager(_donationAccessor);
 }
Esempio n. 8
0
 public void TestTearDown()
 {
     _donationManager  = null;
     _donationAccessor = null;
 }
Esempio n. 9
0
 public DonationsController(IDonationManager donationManager, IProjectManager projectManager, IUserManager userManager)
 {
     _donationManager = donationManager;
     _projectManager  = projectManager;
     _userManager     = userManager;
 }