public SynchronizeFeedsWizard(FeedSourceType selectedFeedSource)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.Icon = Properties.Resources.Add;

            // form location management:
            _windowSerializer = new WindowSerializer(this);
            _windowSerializer.SaveOnlyLocation  = true;
            _windowSerializer.SaveNoWindowState = true;

            // to get notified, if the inet connection state changes:
            _internetService = IoC.Resolve <IInternetService>();
            if (_internetService != null)
            {
                _internetService.InternetConnectionStateChange += OnInternetServiceInternetConnectionStateChange;
                //radioFacebookReview.Enabled = _internetService.InternetAccessAllowed && !_internetService.InternetConnectionOffline;
            }

            this.wizard.SelectedPage = this.pageStartImport;

            if (selectedFeedSource != FeedSourceType.DirectAccess && selectedFeedSource != FeedSourceType.Unknown)
            {
                this.SelectedFeedSource = selectedFeedSource;
            }
        }
示例#2
0
 public ArticleSearchResultsViewModel(IArticleService articleService,
                                      INavigationService navigationService, IDialogService dialogService, IInternetService internetService)
 {
     _articleService    = articleService;
     _navigationService = navigationService;
     _dialogService     = dialogService;
     _internetService   = internetService;
 }
示例#3
0
 public ArticleSearchViewModel(IFacetService facetService,
                               INavigationService navigationService, IDialogService dialogService, IInternetService internetService)
 {
     _facetService      = facetService;
     _navigationService = navigationService;
     _dialogService     = dialogService;
     _internetService   = internetService;
     PopulateGenderList();
 }
示例#4
0
 public BotLogicController(ISpeechController speechController, IModuleController moduleController, IApplicationService applicationService, IDateTimeService dateTimeService,
                           IInternetService internetService, IWeatherService weatherService)
 {
     _moduleController   = moduleController;
     _speechController   = speechController;
     _applicationService = applicationService;
     _dateTimeService    = dateTimeService;
     _internetService    = internetService;
     _weatherService     = weatherService;
 }
示例#5
0
        public MainViewModel(
            ICommodityService commodityService,
            INavigationService navigationService,
            IInternetService internetService,
            IDialogService dialogService)
        {
            _dialogService     = dialogService;
            _internetService   = internetService;
            _navigationService = navigationService;
            _commodityService  = commodityService;

            CommodityItems = new ObservableCollection <CommodityItem>();
        }
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
                if (_internetService != null)
                {
                    _internetService.InternetConnectionStateChange -= OnInternetServiceInternetConnectionStateChange;
                    _internetService = null;
                }
            }

            base.Dispose(disposing);
        }
示例#7
0
        public MainViewModel(IInternetService internetService, ISettingsStore settingsStore)
        {
            hostName = GetHostName();

            TestResults = new ObservableCollection <TestResult>();

            this.internetService = internetService;
            this.settingsStore   = settingsStore;

            StartTestingCommand = new RelayCommand(StartTesting);

            StopTestingCommand = new RelayCommand(StopTesting);

            TestNowCommand = new RelayCommand(TestNow);

            DownloadUrl = "http://members.optusnet.com.au/optusost2/pinball_9mb.jpg";
        }
        public CommodityViewModel(
            ICommodityService commodityService,
            IUnitService unitService,
            IBarcodeScannerService barcodeScannerService,
            INavigationService navigationService,
            IInternetService internetService,
            IDialogService dialogService)
        {
            _dialogService         = dialogService;
            _internetService       = internetService;
            _navigationService     = navigationService;
            _commodityService      = commodityService;
            _unitService           = unitService;
            _barcodeScannerService = barcodeScannerService;

            AddValidations();
        }
示例#9
0
        public House(
            IElectricityService electricityService,
            IWaterService waterService,
            IInternetService internetService,
            ICleaningService cleaningService,
            ISanitationService sanitationService)
        {
            this.electricityService = electricityService;
            this.waterService       = waterService;
            this.internetService    = internetService;
            this.cleaningService    = cleaningService;
            this.sanitationService  = sanitationService;

            services = new Dictionary <HouseService, IHouseHoldService>();

            this.services.Add(HouseService.Electricity, this.electricityService);
            this.services.Add(HouseService.Water, this.waterService);
            this.services.Add(HouseService.Internet, this.internetService);
            this.services.Add(HouseService.Cleaning, this.cleaningService);
            this.services.Add(HouseService.Sanitation, this.sanitationService);
        }
示例#10
0
        public string sendData(string identityNo, string Id)
        {
            try
            {
                var myBinding        = new BasicHttpBinding();
                var myEndpoint       = new EndpointAddress("http://192.168.1.222:5778/InternetService/SetFingerPrint");
                var myChannelFactory = new ChannelFactory <IInternetService>(myBinding, myEndpoint);

                IInternetService client = null;

                client = myChannelFactory.CreateChannel();
                var result = client.SetFingerPrint(identityNo, Id, "123456");
                ((ICommunicationObject)client).Close();
                return(result);
            }

            catch (Exception e)
            {
                return("ERROR!");
            }
        }
示例#11
0
        public ApplicationService(ILogger <ApplicationService> logger, ITimeService timeService,
                                  IWindowService windowService, DateAndTimeFormat dateAndTimeFormat, WindowConfiguration windowConfiguration,
                                  ApplicationConfiguration applicationConfiguration, IStopwatchService stopwatchService, IHostApplicationLifetime hostApplicationLifetime,
                                  IStorageService storageService, INicService nicService, IInternetService internetService)
        {
            _logger                   = logger;
            _timeService              = timeService;
            _windowService            = windowService;
            _dateAndTimeFormat        = dateAndTimeFormat;
            _windowConfiguration      = windowConfiguration;
            _applicationConfiguration = applicationConfiguration;
            _stopwatchService         = stopwatchService;
            _hostApplicationLifetime  = hostApplicationLifetime;
            _storageService           = storageService;
            _nicService               = nicService;
            _internetService          = internetService;

            _internetService.InternetConnectionAvailable += _internetService_InternetConnectionAvailable;

            _hostApplicationLifetime.ApplicationStopping.Register(() =>
            {
                if (_applicationConfiguration.CountSystemRunningTime)
                {
                    _stopwatchService.StopTimer();
                }

                if (_applicationConfiguration.CountNetworkActivity)
                {
                    _nicService.StopNicsMonitoring();
                }

                _storageService.EditData();

                _logger.LogDebug("Shutting down application");
                _logger.LogDebug(new string('-', 100));
            });
        }
示例#12
0
        public ViewModelLocator()
        {
            _container = new UnityContainer();

            // ViewModels
            _container.RegisterType <MainViewModel>();
            _container.RegisterType <CircuitListViewModel>();
            _container.RegisterType <CircuitDetailViewModel>();
            _container.RegisterType <DriverListViewModel>();
            _container.RegisterType <DriverDetailViewModel>();
            _container.RegisterType <StandingsViewModel>();

            // Servicios
            _container.RegisterType <INavigationService, NavigationService>();

            IInternetService internetService = DependencyService.Get <IInternetService>();

            _container.RegisterInstance(internetService);

            _container.RegisterType <IDriverService, DriverService>();
            _container.RegisterType <IStandingService, StandingService>();
            _container.RegisterType <IRaceService, RaceService>();
            _container.RegisterType <ICircuitService, CircuitService>();
        }
示例#13
0
        /// <summary>
        /// Constructor
        /// </summary>
        public VMBase()
        {
            _internetService = (App.Current.Resources["ViewModelLocator"] as ViewModelLocatorService).ResolveService<IInternetService>();

            _internetService.InternetAvailabilityChanged += _internetService_InternetAvailabilityChanged;
        }
示例#14
0
 public MainViewModel(INavigationService navigationService, IRaceService raceService, IInternetService internetService)
 {
     _navigationService = navigationService;
     _raceService = raceService;
     _internetService = internetService;
 }
示例#15
0
 public TorrentService(IInternetService internetService)
 {
     _internetService = internetService;
 }
    public HTMLResponse GetDataFromInternet(string url, IInternetService internetService)
    {
        Connection con = internetService.AddInternet();

        return(con.GetContentFromURL(url));
    }
        public MainWindowViewModel(IUnityContainer container, IEpisodeRepository episodeRepository, ITorrentService torrentService, IEventAggregator eventAggregator, IServerRepository serverRepository, ITvShowDatabase tvShowDatabaseService, ITvShowRepository tvShowRepository, IMessageService messageService, IInternetService internetService)
        {
            this._container             = container;
            this._episodeRepository     = episodeRepository;
            this._torrentService        = torrentService;
            this._eventAggregator       = eventAggregator;
            this._serverRepository      = serverRepository;
            this._tvShowDatabaseService = tvShowDatabaseService;
            this._tvShowRepository      = tvShowRepository;
            this._messageService        = messageService;
            this._internetService       = internetService;

            this.SearchCommand                  = new DelegateCommand <object>(this.Execute_Search);
            this.StartDownloadCommand           = new DelegateCommand <object>(this.Execute_StartDownloadCommand);
            this.LoadedCommand                  = new DelegateCommand <Episode>(this.Execute_LoadedCommand);
            this.ExitCommand                    = new DelegateCommand <object>(this.Execute_ExitCommand);
            this.UpdateCommand                  = new DelegateCommand <object>(this.Execute_UpdateCommand);
            this.MarkEpisodeAsDownloadedCommand = new DelegateCommand <object>(this.Execute_MarkEpisodeAsDownloadedCommand);
            this.DeleteEpisodeCommand           = new DelegateCommand <object>(this.Execute_DeleteEpisodeCommand);
            this.GroupByCommand                 = new DelegateCommand <string>(this.Execute_GroupByCommand);
            this.EditEpisodeCommand             = new DelegateCommand <EpisodeDTO>(this.Execute_EditEpisodeCommand);
            this.SearchFilesCommand             = new DelegateCommand <object>(this.Execute_SearchFilesCommand);
            this.Episodes = new ObservableCollection <EpisodeDTO>();
            this.InitializeEpisodesViewSource();

            this.SearchAndDownloadButtonLabel = "Search Torrents";
            this.SearchAndDownloadButtonImage = "/images/TorrentIcon128x128.png";
        }
示例#18
0
        /// <summary>
        /// Constructor
        /// </summary>
        public VMBase()
        {
            _internetService = (App.Current.Resources["ViewModelLocator"] as ViewModelLocatorService).ResolveService <IInternetService>();

            _internetService.InternetAvailabilityChanged += _internetService_InternetAvailabilityChanged;
        }
示例#19
0
 public MainViewModel(INavigationService navigationService, IRaceService raceService, IInternetService internetService)
 {
     _navigationService = navigationService;
     _raceService       = raceService;
     _internetService   = internetService;
 }
示例#20
0
 public InternetController(IInternetService internet)
 {
     _internet = internet;
 }