Exemple #1
0
 public UploadAvatarPresenter()
 {
     _userSession =new UserSession();
     _profileRepository = new ProfileRepository();
     _redirector = new Redirector();
     _alertService = new AlertService();
 }
Exemple #2
0
 public AlertController(
     IAlertService alertService,
     IAlertReportService alertReportService)
 {
     _alertService       = alertService;
     _alertReportService = alertReportService;
 }
 public CreateNoteViewModel()
 {
     Photos            = new ObservableCollection <PhotoViewModel>();
     _alertService     = DependencyService.Get <IAlertService>();
     CreateNoteCommand = new Command <Task>(async task => await CreateNoteCommandExecute());
     PickPhotoCommand  = new Command <PlatformDocument>(async document => await PickPhotoCommandExecute(document));
 }
        /// <summary>
        /// Generates an alert message with an expiration time.
        /// </summary>
        /// <param name="category">An alert category</param>
        /// <param name="level">Alert level</param>
        /// <param name="source">Name of the source where the alert is raised</param>
        /// <param name="alertCode">Alert type code</param>
        /// <param name="contextData">The user-defined application context data</param>
        /// <param name="expirationTime">Expiration time for the alert</param>
        /// <param name="message">The alert message or formatted message.</param>
        /// <param name="args">Paramaters used in the alert message, when specified.</param>
        public static void Alert(AlertCategory category, AlertLevel level, String source,
                                 int alertCode, object contextData, TimeSpan expirationTime,
                                 String message, params object[] args)
        {
            Platform.CheckForNullReference(source, "source");
            Platform.CheckForNullReference(message, "message");
            IAlertService service = Platform.GetService <IAlertService>();

            if (service != null)
            {
                AlertSource src = new AlertSource(source, ServerInstanceId)
                {
                    Host = ServerInstanceId
                };
                Alert alert = new Alert
                {
                    Category       = category,
                    Level          = level,
                    Code           = alertCode,
                    ExpirationTime = Platform.Time.Add(expirationTime),
                    Source         = src,
                    Message        = String.Format(message, args),
                    ContextData    = contextData
                };

                service.GenerateAlert(alert);
            }
        }
Exemple #5
0
 public GenerateOrderbookService(
     IOrderbooksService orderbooksService,
     IDisabledOrderbooksService disabledOrderbooksService,
     IOutdatedOrderbooksService outdatedOrderbooksService,
     IOutliersOrderbooksService outliersOrderbooksService,
     IRepeatedProblemsOrderbooksService repeatedProblemsOrderbooksService,
     IExtPricesSettingsService extPricesSettingsService,
     IAlertService alertService,
     IPrimaryExchangeService primaryExchangeService,
     ITransformOrderbookService transformOrderbookService,
     IBestPricesService bestPricesService,
     ILog log,
     ITelemetryService telemetryService,
     ITestingHelperService testingHelperService,
     IStopTradesService stopTradesService,
     ISystem system,
     IAggregateOrderbookService aggregateOrderbookService)
 {
     _orderbooksService                 = orderbooksService;
     _disabledOrderbooksService         = disabledOrderbooksService;
     _outdatedOrderbooksService         = outdatedOrderbooksService;
     _outliersOrderbooksService         = outliersOrderbooksService;
     _repeatedProblemsOrderbooksService = repeatedProblemsOrderbooksService;
     _extPricesSettingsService          = extPricesSettingsService;
     _alertService              = alertService;
     _primaryExchangeService    = primaryExchangeService;
     _transformOrderbookService = transformOrderbookService;
     _bestPricesService         = bestPricesService;
     _log = log;
     _telemetryService     = telemetryService;
     _testingHelperService = testingHelperService;
     _stopTradesService    = stopTradesService;
     _system = system;
     _aggregateOrderbookService = aggregateOrderbookService;
 }
 public SettingsRootService(ISettingsStorageService settingsStorageService,
                            ISettingsValidationService settingsValidationService, IAlertService alertService)
 {
     _settingsStorageService    = settingsStorageService;
     _settingsValidationService = settingsValidationService;
     _alertService = alertService;
 }
Exemple #7
0
 public RewardCategoriesViewModel(IMvxNavigationService navigationService, IAlertService alertService, IPlatformAssetService assetService, ILocalNotificationService localNotificationService, IMvxMessenger messanger) : base(navigationService, alertService, assetService, localNotificationService, messanger)
 {
     BackButtonHidden = false;
     _refreshCommand  = new MvxAsyncCommand(Refresh);
     _onRewardCategorySelectedCommand = new MvxAsyncCommand <RewardItemModel>(OnRewardCategorySelected);
     PlaceholderModel = LocalPlaceholderHelper.GetRewardsPlacehplder();
 }
Exemple #8
0
 public DataQualityAlertsJob(
     IAlertService alertService,
     IDataQualityRepository dataQualityRepository)
 {
     _alertService          = alertService;
     _dataQualityRepository = dataQualityRepository;
 }
Exemple #9
0
 public JobController(IJobDAO jobDAO, IUserSession userSession, IAccountPermissionDAO accountPermissionDAO, IAlertService alertService)
 {
     this.jobDAO               = jobDAO;
     this.userSession          = userSession;
     this.accountPermissionDAO = accountPermissionDAO;
     this.alertService         = alertService;
 }
Exemple #10
0
 protected BaseViewModel(INavService navService, IDataStore <MealLog, ActivityLog> dataStore, ICloudStoreService cloudStoreService, IAlertService alertService)
 {
     NavService        = navService;
     DataStore         = dataStore;
     CloudStoreService = cloudStoreService;
     AlertService      = alertService;
 }
Exemple #11
0
 protected BaseViewModel(INavService navService, IDataStore <MealLog, ActivityLog> dataStore, IAuthenticationService authenticationService, IAlertService alertService)
 {
     NavService            = navService;
     DataStore             = dataStore;
     AuthenticationService = authenticationService;
     AlertService          = alertService;
 }
Exemple #12
0
 public PostController(IPostService postService, IThreadService threadService, IUserService userService, IAlertService alertService)
 {
     _postService   = postService;
     _threadService = threadService;
     _userService   = userService;
     _alertService  = alertService;
 }
Exemple #13
0
 protected ViewModelBase(
     IMvxNavigationService navigationService,
     IAlertService alertService
     ) : base(navigationService, alertService)
 {
     /* Required constructor */
 }
Exemple #14
0
 public AlertWorker(
     IConfigurationService configurationService,
     IAlertService alertService)
 {
     _configurationService = configurationService;
     _alertService         = alertService;
 }
Exemple #15
0
        public HomeViewModel(IUserDialogs userDialogs, IParentService parentService,
                             IMvxMessenger mvxMessenger, AppHelper appHelper, IAlertService alertService) : base(userDialogs, mvxMessenger, appHelper)
        {
            _parentService = parentService;
            _alertService  = alertService;

            RefreshCommand = ReactiveCommand.CreateFromObservable <Unit, PageModel>((param) =>
            {
                RefreshBindings();

                return(Observable.Zip(
                           _parentService.GetProfileInformation(),
                           _parentService.GetChildren().OnErrorResumeNext(Observable.Return(new List <SonEntity>())),
                           _alertService.GetLastAlertsForSelfParent().OnErrorResumeNext(Observable.Return(new AlertsPageEntity())),
                           (ParentEntity, SonEntities, AlertsPageEntity) => new PageModel()
                {
                    SelfParent = ParentEntity,
                    SonEntities = SonEntities,
                    AlertsPage = AlertsPageEntity
                }));
            });

            RefreshCommand.Subscribe(OnPageModelLoadedHandler);

            RefreshCommand.IsExecuting.Subscribe((IsLoading) => IsBusy = IsLoading);

            RefreshCommand.ThrownExceptions.Subscribe(HandleExceptions);
        }
Exemple #16
0
 public CommentsPresenter()
 {
     _commentRepository = new CommentRepository();
     _webContext = new WebContext();
     _userSession = new UserSession();
     _alertService = new AlertService();
 }
        public TextPromptPopupPage(string title, string description, string okButtonText = null, string cancelButtonText = null, bool allowCancel = true, bool allowPaste = false, bool allowNullOrEmptyString = false)
        {
            InitializeComponent();

            this.allowCancel            = allowCancel;
            this.allowNullOrEmptyString = allowNullOrEmptyString;

            alertService = DependencyService.Get <IAlertService>();
            localization = DependencyService.Get <ILocalization>();

            TitleLabel.Text       = title;
            DescriptionLabel.Text = description;

            if (okButtonText.NotNullNotEmpty())
            {
                OkButton.Text = okButtonText;
            }

            if (cancelButtonText.NotNullNotEmpty())
            {
                CancelButton.Text = cancelButtonText;
            }

            if (!allowCancel)
            {
                CancelButton.IsVisible = CancelButton.IsEnabled = false;
            }

            PasteFromClipboard.IsEnabled = PasteFromClipboard.IsVisible = allowPaste;
        }
Exemple #18
0
        public CadastroClienteViewModel()
        {
            this._alertService      = DependencyService.Get <IAlertService>();
            this._navigationService = DependencyService.Get <INavigationService>();

            this.CadastrarCommand = new Command(this.Cadastrar);
        }
Exemple #19
0
 public UploadAvatarPresenter()
 {
     _userSession       = new UserSession();
     _profileRepository = new ProfileRepository();
     _redirector        = new Redirector();
     _alertService      = new AlertService();
 }
Exemple #20
0
 public FacebookViewModel(IMvxNavigationService navigationService, IAlertService alertService, IPlatformAssetService assetService, ILocalNotificationService localNotificationService, IMvxMessenger messanger, IFacebookShareService facebookService) : base(navigationService, alertService, assetService, localNotificationService, messanger)
 {
     _facebookService        = facebookService;
     SubmitButtonImage       = _assetService.ChallengesFacebookButton;
     TopMarginToCompleteView = true;
     IsBusy = true;
 }
 public BasePointsViewModel(IMvxNavigationService navigationService, IAlertService alertService, IPlatformAssetService assetService, ILocalNotificationService localNotificationService, IMvxMessenger messanger = null) : base(navigationService, alertService, assetService, localNotificationService, messanger)
 {
     InitVM();
     Refresh();
     ScoreImage      = _assetService.IconScoreTransactions;
     FirstInitialize = true;
 }
Exemple #22
0
 /// <summary>
 /// Stores log data in a SQL Server database
 /// </summary>
 public SqlLogStore(
     IOptionsMonitor <QueryLoggerSettings> settings,
     IAlertService alertService)
 {
     _settings     = settings;
     _alertService = alertService;
 }
 public MyPartysViewModel(IDataService dataSevice, IAlertService alertService)
 {
     _dataService = dataSevice;
     _dataService.SelectedPartiesUpdated += DataServiceOnSelectedPartiesUpdated;
     _alertService = alertService;
     MyParties     = _dataService.SelectedPartys;
 }
        public ProfilePresenter()
        {
            _redirector = ObjectFactory.GetInstance<IRedirector>();
            _userSession = ObjectFactory.GetInstance<IUserSession>();
            if (!_userSession.LoggedIn || _userSession.CurrentUser == null)
                _redirector.GoToAccountLoginPage();

            _alertService = ObjectFactory.GetInstance<IAlertService>();
            _webContext = ObjectFactory.GetInstance<IWebContext>();
            _accountService = ObjectFactory.GetInstance<IAccountService>();
            _privacyService = ObjectFactory.GetInstance<IPrivacyService>();
            _account = _userSession.CurrentUser;

            if (_webContext.AccountID > 0 && _webContext.AccountID != _userSession.CurrentUser.AccountID)
            {
                _accountBeingViewed = _accountService.GetAccountByID(_webContext.AccountID);
                _accountBeingViewed.Profile = Profile.GetProfileByAccountID(_webContext.AccountID);
            }
            else
            {
                _accountBeingViewed = _userSession.CurrentUser;
                _accountBeingViewed.Profile = Profile.GetProfileByAccountID(_userSession.CurrentUser.AccountID);
            }
            if (_accountBeingViewed == null)
                _redirector.GoToAccountLoginPage();
            if (_accountBeingViewed.Profile != null && _accountBeingViewed.Profile.ProfileID > 0)
                _privacyFlags = PrivacyFlag.GetPrivacyFlagsByProfileID(_accountBeingViewed.Profile.ProfileID);
            else
                _redirector.GoToHomePage();

        }
 public SearchFriendUserControlViewModel()
 {
     _friendRequestRepository = DependencyService.Get <IFriendRequestRepository>();
     _alertService            = DependencyService.Get <IAlertService>();
     _identityService         = DependencyService.Get <IIdentityService>();
     _usersManageService      = DependencyService.Get <IUsersManageService>();
 }
 public ConnectionManager(
     ICloseApplicationManager applicationManager,
     IAlertService alertService)
 {
     _applicationManager = applicationManager;
     _alertService       = alertService;
 }
Exemple #27
0
        public ListarClientesViewModel()
        {
            this._alertService      = DependencyService.Get <IAlertService>();
            this._navigationService = DependencyService.Get <INavigationService>();

            this.AdicionarClientesCommand = new Command(this.AdicionarClientes);

            ListaClientes = new ObservableCollection <ClienteFoto>();

            Load = true;

            // atualiza a lista
            MessagingCenter.Subscribe <ListarClientesViewModel>(this, "LoadLista", (sender) =>
            {
                Debug.WriteLine("Atualizar Lista de Clientes");

                foreach (ClienteFoto cliente in lista)
                {
                    // adiciona o cliente
                    this.ListaClientes.Add(cliente);
                }

                Load = false;
            });

            // carrega a lista da api
            carregarLista();
        }
 public AlertController(IAlertService alertService, IDemoExample demoExample, IGraphServiceProvider graphServiceProvider, IMemoryCacheHelper memoryCacheHelper)
 {
     _alertService         = alertService;
     _demoExample          = demoExample;
     _memoryCacheHelper    = memoryCacheHelper;
     _graphServiceProvider = graphServiceProvider;
 }
 public DevicesController(ITimeSeriesProvider influxDb, IDeviceService deviceService,
                          IAlertService alertService, IDataParser dataParser)
 {
     this.influxDb      = influxDb ?? throw new ArgumentNullException(nameof(influxDb));
     this.alertService  = alertService ?? throw new ArgumentNullException(nameof(alertService));
     this.deviceService = deviceService ?? throw new ArgumentNullException(nameof(deviceService));
     this.dataParser    = dataParser ?? throw new ArgumentNullException(nameof(dataParser));
 }
Exemple #30
0
 public ZipCodesViewModel(
     IMvxNavigationService navigationService,
     IAlertService alertService,
     IZipCodesRepository zipCodesRepository
     ) : base(navigationService, alertService)
 {
     ZipCodesRepository = zipCodesRepository ?? throw new ArgumentNullException(nameof(zipCodesRepository));
 }
Exemple #31
0
 public UpdateViewModel(
     IMvxNavigationService navigationService,
     IAlertService alertService,
     IUpdateService updateService
     ) : base(navigationService, alertService)
 {
     UpdateService = updateService ?? throw new ArgumentNullException(nameof(updateService));
 }
Exemple #32
0
 public ViewModelBase(
     IMvxNavigationService navigationService,
     IAlertService alertService
     )
 {
     NavigationService = navigationService ?? throw new ArgumentNullException(nameof(navigationService));
     AlertService      = alertService ?? throw new ArgumentNullException(nameof(alertService));
 }
Exemple #33
0
 public MainMyVehiclePageViewModel(INavigationService navigationService, IAlertService alertService)
 {
     _navigationService = navigationService;
     _alertService      = alertService;
     //VehicleViewCommand = new DelegateCommand<Vehicle>(VehicleView);
     //VehicleSelectCommand = new DelegateCommand<Vehicle>(VehicleSelect);
     ContactDriverCommand = new DelegateCommand <Vehicle>(ContactDriver);
 }
Exemple #34
0
 public PostPresenter()
 {
     _blogRepository = ObjectFactory.GetInstance<IBlogRepository>();
     _webContext = ObjectFactory.GetInstance<IWebContext>();
     _userSession = ObjectFactory.GetInstance<IUserSession>();
     _redirector = ObjectFactory.GetInstance<IRedirector>();
     _alertService = ObjectFactory.GetInstance<IAlertService>();
 }
 public UserProfilePresenter()
 {
     _alertService = new AlertService();
     _profileService = new ProfileService();
     _userSession = new UserSession();
     _webContext = new WebContext();
     _accountService = new AccountService();
 }
Exemple #36
0
 public UploadAvatarPresenter()
 {
     _userSession =new UserSession();
     _profileRepository = new ProfileRepository();
     _redirector = new Redirector();
     _alertService = new AlertService();
     _webcontext = new WebContext();
     _for = new FolderRepository();
 }
Exemple #37
0
 public PostForumPostPresenter()
 {
     _postRepository = new BoardPostRepository();
     _forumRepository = new BoardForumRepository();
     _categoryRepository = new BoardCategoryRepository();
     _redirector = new Redirector();
     _webContext = new WebContext();
     _alertService =new AlertService();
     _groupRepository = new GroupRepository();
 }
        public AlertsViewModel()
        {
            _messenger = Mvx.Resolve<IMvxMessenger>();
            _service = Mvx.Resolve<IAlertService>();
            _fileService = Mvx.Resolve<IMvxFileStore>();
            _localDbService = Mvx.Resolve<ILocalDataService>();
            //			NetworkConnectionHelper = Mvx.Resolve<IConnectivity> ();
            _messenger.Subscribe<FollowsChanged>( async x => await ExecuteRefreshCommand(), MvxReference.Strong);

        }
Exemple #39
0
        public Email()
        {
            _configuration = ObjectFactory.GetInstance<IConfiguration>();
            _alertService = ObjectFactory.GetInstance<IAlertService>();
            _userSession = ObjectFactory.GetInstance<IUserSession>();
            _emailService = ObjectFactory.GetInstance<IEmailService>();
            

            TO_EMAIL_ADDRESS = _configuration.ToEmailAddress;
            FROM_EMAIL_ADDRESS = _configuration.FromEmailAddress;
        }
Exemple #40
0
 public UserProfilePresenter()
 {
     _alertService = new AlertService();
     _profileService = new ProfileService();
     _userSession = new UserSession();
     _webContext = new WebContext();
     _accountService = new AccountService();
     _redirector = new Redirector();
     _privacyService = new PrivacyService();
     _friendService = new FriendService();
     _StatusUpdateService = new StatusUpdateService();
 }
        public DefaultPresenter()
        {
            _redirector = ObjectFactory.GetInstance<IRedirector>();
            _userSession = ObjectFactory.GetInstance<IUserSession>();
            if (!_userSession.LoggedIn || _userSession.CurrentUser == null)
                _redirector.GoToAccountLoginPage();

            _alertService = ObjectFactory.GetInstance<IAlertService>();
            _webContext = ObjectFactory.GetInstance<IWebContext>();
            _accountService = ObjectFactory.GetInstance<IAccountService>();
            _privacyService = ObjectFactory.GetInstance<IPrivacyService>();
            if (_webContext.AccountID > 0 && _webContext.AccountID != _userSession.CurrentUser.AccountID)
                _accountBeingViewed = _accountService.GetAccountByID(_webContext.AccountID);
            else
                _accountBeingViewed = _userSession.CurrentUser;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            _userSession = ObjectFactory.GetInstance<IUserSession>();
            _redirector = ObjectFactory.GetInstance<IRedirector>();
            if (!_userSession.LoggedIn || _userSession.CurrentUser == null)
                _redirector.GoToAccountLoginPage();
            //check profile of current user
            Profile profiles = Profile.GetProfileByAccountID(_userSession.CurrentUser.AccountID);
            //if (profiles == null)
            //    _redirector.GoToProfilesManageProfile();

            if (txtusernam != null)
                txtusernam.InnerHtml = _userSession.CurrentUser.FirstName + " " + _userSession.CurrentUser.LastName;
            

            _navigation = ObjectFactory.GetInstance<INavigation>();
            _alertService = ObjectFactory.GetInstance<IAlertService>();

            //repPrimaryNav.DataSource = _navigation.PrimaryNodes();
            //repPrimaryNav.DataBind();

            if (_navigation.CurrentNode != null)
            {
                if (_navigation.CurrentNode["PageTitle"] != null &&
                    !String.IsNullOrEmpty(_navigation.CurrentNode["PageTitle"]))
                {
                    //lblPageTitle.Text = _navigation.CurrentNode["PageTitle"].ToString();
                    Page.Title = _navigation.CurrentNode["PageTitle"].ToString();
                }
                else
                {
                    //lblPageTitle.Text = _navigation.CurrentNode.Title;
                    Page.Title = _navigation.CurrentNode.Title;
                }
            }

            //if (_userSession.CurrentUser != null)
            //{
            //    LoadStatus();
            //    pnlStatusUpdate.Visible = true;
            //}
            //else
            //    pnlStatusUpdate.Visible = false;
        }
Exemple #43
0
        private void Init()
        {
            _userProfileDAO = new GenericDAO<UserProfile>();
               _gameStockConfig = new StockGameConfiguration();
               _orderDAO = new GenericDAO<Order>();
               _instrumentDAO = new GenericDAO<Instrument>();
               _instrumentHistoryDAO = new GenericDAO<InstrumentHistory>();
               _alertDAO = new GenericDAO<Alert>();
               _instrumentRepository = new InstrumentRepository(_instrumentDAO, _instrumentHistoryDAO);
               _orderRepository = new OrderRepository(_orderDAO,_instrumentDAO);
               _alertRepository = new AlertRepository(_alertDAO, _instrumentDAO);
               _ldapService = new FakeLdapService(_gameStockConfig);
               _ldapService.Init();

               _notificationtDAO = new GenericDAO<Notification>();
               _notificationRepository = new NotificationRepository(_notificationtDAO);
               _notificationManager = new NotificationManager(_notificationRepository);
               _alertManager = new AlertManager(_notificationManager, _alertRepository);
               _userManager = new UserManager(_userProfileDAO, _ldapService);

               _alertService = new AlertService(_orderRepository, _instrumentRepository, _alertRepository, _alertManager);
        }
Exemple #44
0
 public AppBootstrap(IAlertService alertService)
 {
     _alertService = alertService;
 }
 public DefaultPresenter()
 {
     _alertService = ObjectFactory.GetInstance<IAlertService>();
     _userSession = ObjectFactory.GetInstance<IUserSession>();
 }
 public AlertController(ISessionData sessionData, IAlertService alertService)
     : base(sessionData) {
     _alertService = alertService;
 }
 public UploadAvatarPresenter()
 {
     _userSession = ObjectFactory.GetInstance<IUserSession>();
     _redirector = ObjectFactory.GetInstance<IRedirector>();
     _alertService = ObjectFactory.GetInstance<IAlertService>();
 }
Exemple #48
0
 public FriendService()
 {
     _alertService = ObjectFactory.GetInstance<IAlertService>();
 }
Exemple #49
0
 public StatusUpdateService()
 {
     _statusRepository = new StatusUpdateRepository();
     _alertService = new AlertService();
     _privacyService = new PrivacyService();
 }
Exemple #50
0
 public PostPresenter()
 {
     _alertService = ObjectFactory.GetInstance<IAlertService>();
     _webContext = ObjectFactory.GetInstance<IWebContext>();
 }
Exemple #51
0
 //private IConfiguration _configuration;
 public ProfileRepository()
 {
     conn = new Connection();
     _alertService = new AlertService();
 }