Exemplo n.º 1
0
 public MainWindow(
     CefBrowserHandler browser,
     IDatabaseItemDao databaseItemDao,
     IDatabaseItemStatDao databaseItemStatDao,
     IPlayerItemDao playerItemDao,
     IAzurePartitionDao azurePartitionDao,
     IDatabaseSettingDao databaseSettingDao,
     IBuddyItemDao buddyItemDao,
     IBuddySubscriptionDao buddySubscriptionDao,
     IRecipeItemDao recipeItemDao,
     IItemSkillDao itemSkillDao,
     IItemTagDao itemTagDao,
     ParsingService parsingService,
     AugmentationItemRepo augmentationItemRepo,
     SettingsService settingsService,
     GrimDawnDetector grimDawnDetector,
     IItemCollectionDao itemCollectionRepo
     )
 {
     _cefBrowserHandler = browser;
     InitializeComponent();
     FormClosing            += MainWindow_FormClosing;
     _automaticUpdateChecker = new AutomaticUpdateChecker(settingsService);
     _settingsController     = new SettingsController(settingsService);
     _dynamicPacker          = new DynamicPacker(databaseItemStatDao);
     _databaseItemDao        = databaseItemDao;
     _databaseItemStatDao    = databaseItemStatDao;
     _playerItemDao          = playerItemDao;
     _azurePartitionDao      = azurePartitionDao;
     _databaseSettingDao     = databaseSettingDao;
     _buddyItemDao           = buddyItemDao;
     _buddySubscriptionDao   = buddySubscriptionDao;
     _recipeParser           = new RecipeParser(recipeItemDao);
     _itemSkillDao           = itemSkillDao;
     _itemTagDao             = itemTagDao;
     _parsingService         = parsingService;
     _augmentationItemRepo   = augmentationItemRepo;
     _userFeedbackService    = new UserFeedbackService(_cefBrowserHandler);
     _settingsService        = settingsService;
     _grimDawnDetector       = grimDawnDetector;
     _itemCollectionRepo     = itemCollectionRepo;
 }
Exemplo n.º 2
0
        public MainWindow(
            ServiceProvider serviceProvider,
            CefBrowserHandler browser,
            ParsingService parsingService
            )
        {
            this._serviceProvider = serviceProvider;
            _cefBrowserHandler    = browser;
            InitializeComponent();
            FormClosing += MainWindow_FormClosing;

            _minimizeToTrayHandler = new MinimizeToTrayHandler(this, notifyIcon1, serviceProvider.Get <SettingsService>());

            var settingsService = _serviceProvider.Get <SettingsService>();

            _automaticUpdateChecker = new AutomaticUpdateChecker(settingsService);
            _settingsController     = new SettingsController(settingsService);
            _dynamicPacker          = new DynamicPacker(serviceProvider.Get <IDatabaseItemStatDao>());
            _recipeParser           = new RecipeParser(serviceProvider.Get <IRecipeItemDao>());
            _parsingService         = parsingService;
            _userFeedbackService    = new UserFeedbackService(_cefBrowserHandler);
        }
Exemplo n.º 3
0
        public SettingsWindow(
            CefBrowserHandler cefBrowserHandler,
            TooltipHelper tooltipHelper,
            Action itemViewUpdateTrigger,
            IPlayerItemDao playerItemDao,
            GDTransferFile[] modFilter,
            TransferStashService transferStashService,
            TransferStashService2 transferStashService2,
            LanguagePackPicker languagePackPicker,
            SettingsService settings, GrimDawnDetector grimDawnDetector, DarkMode darkModeToggler, AutomaticUpdateChecker automaticUpdateChecker)
        {
            InitializeComponent();
            _controller                 = new SettingsController(settings);
            this._cefBrowserHandler     = cefBrowserHandler;
            this._tooltipHelper         = tooltipHelper;
            this._itemViewUpdateTrigger = itemViewUpdateTrigger;
            this._playerItemDao         = playerItemDao;
            this._modFilter             = modFilter;
            this._transferStashService  = transferStashService;
            this._transferStashService2 = transferStashService2;
            _languagePackPicker         = languagePackPicker;
            _settings               = settings;
            _grimDawnDetector       = grimDawnDetector;
            _darkModeToggler        = darkModeToggler;
            _automaticUpdateChecker = automaticUpdateChecker;

            _controller.BindCheckbox(cbMinimizeToTray);

            _controller.BindCheckbox(cbTransferAnyMod);
            _controller.BindCheckbox(cbSecureTransfers);
            _controller.BindCheckbox(cbShowRecipesAsItems);
            _controller.BindCheckbox(cbHideSkills);
            _controller.LoadDefaults();

            // TODO: Write out the settingscontroller and add logic for updating showskills config

            linkCheckForUpdates.Visible = Environment.Is64BitOperatingSystem;
            pbAutomaticUpdates.Visible  = Environment.Is64BitOperatingSystem;
        }