コード例 #1
0
        public LoginPage()
        {
            storeService = DependencyService.Get <ICredentialsService>();
            InitializeComponent();

            // BindingContext = new LoginPageViewModel();
        }
コード例 #2
0
		public LoginPageCS ()
		{
			storeService = DependencyService.Get<ICredentialsService> ();

			usernameEntry = new Entry {
				Placeholder = "username"
			};
			passwordEntry = new Entry {
				IsPassword = true
			};
			messageLabel = new Label ();
			var loginButton = new Button {
				Text = "Login"
			};
			loginButton.Clicked += OnLoginButtonClicked;

			Title = "Login Page";
			Content = new StackLayout { 
				VerticalOptions = LayoutOptions.StartAndExpand,
				Children = {
					new Label { Text = "Username" },
					usernameEntry,
					new Label { Text = "Password" },
					passwordEntry,
					loginButton,
					messageLabel
				}
			};
		}
コード例 #3
0
        public loginXaml()
        {
            InitializeComponent();

            storeService = DependencyService.Get <ICredentialsService>();
            NavigationPage.SetHasNavigationBar(this, true);

            LoginText.Text     = "Welcome to League Summoners!\nSelect the region and search your summoner name!";
            searchImage.Source = "NaughtyTeemo.png";

            search.SearchButtonPressed += async(sender, e) =>
            {
                var summonerName = search.Text.Replace(" ", "");
                var summoner     = await App.api.GetSummonerAsync(region, summonerName);

                var doCredentialsExist = storeService.DoCredentialsExist();
                if (!doCredentialsExist)
                {
                    storeService.SaveCredentials(summoner.Name, summoner.Region.ToString(), summoner.Id.ToString());
                }

                //NavigationPage.SetHasNavigationBar(this, false);
                Application.Current.MainPage = new TabbedPages(summoner, region);
                await Navigation.PopToRootAsync();
            };

            search.ScopeChanged += (sender, e) =>
            {
                region = App.regFromString(search.SelectedScopeText);
            };
        }
コード例 #4
0
 public CafeModule(ISettingsService settings, ICredentialsService credentialsService, IFrameworkReflector frameworkReflector, HelpBuilder helpBuilder)
 {
     _settings           = settings;
     _credentialsService = credentialsService;
     _frameworkReflector = frameworkReflector;
     _helpBuilder        = helpBuilder;
 }
コード例 #5
0
 public LoginService(IRestService restService, IGitApiProvider gitApiProvider,
     ICredentialsService credentialsService)
 {
     _restService = restService;
     _gitApiProvider = gitApiProvider;
     _credentialsService = credentialsService;
 }
コード例 #6
0
        public LoginPageCS()
        {
            storeService = DependencyService.Get <ICredentialsService> ();

            usernameEntry = new Entry {
                Placeholder = "username"
            };
            passwordEntry = new Entry {
                IsPassword = true
            };
            messageLabel = new Label();
            var loginButton = new Button {
                Text = "Login"
            };

            loginButton.Clicked += OnLoginButtonClicked;

            Title   = "Login Page";
            Content = new StackLayout {
                VerticalOptions = LayoutOptions.StartAndExpand,
                Children        =
                {
                    new Label {
                        Text = "Username"
                    },
                    usernameEntry,
                    new Label {
                        Text = "Password"
                    },
                    passwordEntry,
                    loginButton,
                    messageLabel
                }
            };
        }
コード例 #7
0
 public ManageController(ITwoFactorAuthService twoFactorAuthService, IManageDataService manageDataService, IManageUserService manageUserService,
                         ICredentialsService credentialsService)
 {
     _twoFactorAuthService = twoFactorAuthService;
     _manageDataService    = manageDataService;
     _manageUserService    = manageUserService;
     _credentialsService   = credentialsService;
 }
コード例 #8
0
        public BacklogService()
        {
            _credentialsService = DependencyService.Get <ICredentialsService>();

            // set up the http client
            _client = new HttpClient();
            _client.DefaultRequestHeaders.Add("Accept", "application/json");
        }
コード例 #9
0
        public AccountService()
        {
            // don't need to do this thanks to prism!
            _credentialsService = DependencyService.Get <ICredentialsService>();

            // set up the http client
            _client = new HttpClient();
            _client.DefaultRequestHeaders.Add("Accept", "application/json");
        }
コード例 #10
0
        public static async Task <Credentials> GetCredential(ICredentialsService credentialsService, ulong userId, string id, CancellationToken ct)
        {
            if (!Guid.TryParse(id, out var guid))
            {
                throw new IncorrectParametersCommandException("Invalid ID format. Use `credential list` in a Direct Message to view all your saved credentials and their IDs.");
            }

            return(await GetCredential(credentialsService, userId, guid, ct));
        }
コード例 #11
0
 public RemoteDesktopConnectionService(IServiceProvider serviceProvider)
 {
     this.jobService           = serviceProvider.GetService <IJobService>();
     this.remoteDesktopService = serviceProvider.GetService <IRemoteDesktopService>();
     this.tunnelBrokerService  = serviceProvider.GetService <ITunnelBrokerService>();
     this.settingsEditor       = serviceProvider.GetService <ISettingsEditor>();
     this.credentialsService   = serviceProvider.GetService <ICredentialsService>();
     this.taskDialog           = serviceProvider.GetService <ITaskDialog>();
 }
コード例 #12
0
        public AccountController(ILoginService loginService, IEmailService emailService, IAddUserService addUserService, ICredentialsService credentialsService,
                                 IOptionsSnapshot <IdentityUIEndpoints> identityManagmentEndpoints)
        {
            _loginService       = loginService;
            _emailService       = emailService;
            _addUserService     = addUserService;
            _credentialsService = credentialsService;

            _identityManagementEndpoints = identityManagmentEndpoints.Value;
        }
コード例 #13
0
        public Routes(
            ICredentialsService credentialsService,
            IWellService wellService,
            IWellboreService wellboreService,
            ILogObjectService logObjectService,
            IMessageObjectService messageObjectService,
            IRigService rigService,
            ITrajectoryService trajectoryService,
            IJobService jobService,
            IRiskService riskService,
            IMudLogService mudLogService,
            IDocumentRepository <Server, Guid> witsmlServerRepository)
        {
            this.credentialsService     = credentialsService;
            this.wellService            = wellService;
            this.wellboreService        = wellboreService;
            this.logObjectService       = logObjectService;
            this.messageObjectService   = messageObjectService;
            this.rigService             = rigService;
            this.trajectoryService      = trajectoryService;
            this.jobService             = jobService;
            this.riskService            = riskService;
            this.mudLogService          = mudLogService;
            this.witsmlServerRepository = witsmlServerRepository;

            Get("/api/witsml-servers", GetWitsmlServers);
            Post("/api/witsml-servers", CreateWitsmlServer);
            Patch("/api/witsml-servers/{witsmlServerId}", UpdateWitsmlServer);
            Delete("/api/witsml-servers/{witsmlServerId}", DeleteWitsmlServer);

            Get("/api/wells", GetAllWells);
            Get("/api/wells/{wellUid}", GetWell);
            Get("/api/wells/{wellUid}/wellbores/{wellboreUid}", GetWellbore);
            Get("/api/wells/{wellUid}/wellbores/{wellboreUid}/messages", GetMessagesForWellbore);
            Get("/api/wells/{wellUid}/wellbores/{wellboreUid}/messages/{messageUid}", GetMessage);
            Get("/api/wells/{wellUid}/wellbores/{wellboreUid}/logs/{logUid}", GetLog);
            Get("/api/wells/{wellUid}/wellbores/{wellboreUid}/logs", GetLogsForWellbore);
            Get("/api/wells/{wellUid}/wellbores/{wellboreUid}/logs/{logUid}/logcurveinfo", GetLogCurveInfo);
            Get("/api/wells/{wellUid}/wellbores/{wellboreUid}/logs/{logUid}/logdata", GetLogData);
            Get("/api/wells/{wellUid}/wellbores/{wellboreUid}/rigs", GetRigsForWellbore);
            Get("/api/wells/{wellUid}/wellbores/{wellboreUid}/rigs/{rigUid}", GetRig);
            Get("/api/wells/{wellUid}/wellbores/{wellboreUid}/trajectories", GetTrajectories);
            Get("/api/wells/{wellUid}/wellbores/{wellboreUid}/trajectories/{trajectoryUid}/trajectorystations", GetTrajectoryStations);
            Get("/api/wells/{wellUid}/wellbores/{wellboreUid}/risks", GetRisksForWellbore);
            Get("/api/wells/{wellUid}/wellbores/{wellboreUid}/mudlogs", GetMudLogsForWellbore);
            Get("/api/wells/{wellUid}/wellbores/{wellboreUid}/mudlogs/{mudlogUid}", GetMudLog);

            //Get Requests exceeding the URL limit
            Post("/api/wells/{wellUid}/wellbores/{wellboreUid}/logs/{logUid}/logdata", GetLargeLogData);

            Post("/api/jobs/{jobType}", CreateJob);
            Post("/api/credentials/authorize", Authorize);
        }
コード例 #14
0
 public App()
 {
     CredentialsService = new CredentialsService();
     if (CredentialsService.DoCredentialsExist())
     {
         MainPage = new NavigationPage(new HomePage());
     }
     else
     {
         MainPage = new NavigationPage(new LoginPage());
     }
 }
コード例 #15
0
        public AccountController(ILoginService loginService, IEmailConfirmationService emailConfirmationService,
                                 IAddUserService addUserService, ICredentialsService credentialsService, IAccountDataService accountDataService,
                                 ITwoFactorAuthService twoFactorAuthService, IOptionsSnapshot <IdentityUIEndpoints> identityUIEndpoints)
        {
            _loginService             = loginService;
            _emailConfirmationService = emailConfirmationService;
            _addUserService           = addUserService;
            _credentialsService       = credentialsService;
            _accountDataService       = accountDataService;
            _twoFactorAuthService     = twoFactorAuthService;

            _identityUIEndpoints = identityUIEndpoints.Value;
        }
コード例 #16
0
        public static async Task <Credentials> GetCredential(ICredentialsService credentialsService, ulong userId, Guid guid, CancellationToken ct)
        {
            var credentials = await credentialsService.ReadAsync(userId, ct);

            var credential = credentials?.Credentials.FirstOrDefault(x => x.Id == guid);

            if (credential == null)
            {
                throw new IncorrectParametersCommandException("You don't have a credential saved with this ID. Use `credential add` in a Direct Message to add a credential.");
            }

            return(credential);
        }
コード例 #17
0
 public AuthenticationController(
     ISettingsManager settingManager,
     ISessionService sessionService,
     IEventAggregator eventAggregator,
     ICredentialsService credentialsService,
     IWebviewUserSettingsService IWebviewUserSettingsService)
 {
     _settingsManager            = settingManager;
     _sessionService             = sessionService;
     _eventAggregator            = eventAggregator;
     _credentialsService         = credentialsService;
     _webviewUserSettingsService = IWebviewUserSettingsService;
 }
コード例 #18
0
ファイル: DaumCafeService.cs プロジェクト: yebafan/DustyBot
 public DaumCafeService(
     BaseSocketClient client,
     ISettingsService settings,
     ICredentialsService credentialsService,
     ILogger <DaumCafeService> logger,
     ITimerAwaiter timerAwaiter,
     IServiceProvider services)
     : base(UpdateFrequency, timerAwaiter, services, logger, UpdateFrequency)
 {
     _settings           = settings;
     _credentialsService = credentialsService;
     _logger             = logger;
     _client             = client;
 }
コード例 #19
0
        public LoginPageViewModel(Page page)
        {
            page.Title = "Login Page";

            credentialsService = DependencyService.Get <ICredentialsService> ();

            TriggerAuthCommand = new Command(async() => await TouchIdBtnTapped());

            SetupOnDeviceCommand = new Command(async() => await SetupOnDeviceBtnTapped());

            page.Appearing += async(object sender, EventArgs e) => {
                await OnAppearing(sender, e);
            };
        }
コード例 #20
0
ファイル: SiteHub.cs プロジェクト: sanfran627/ReactSample
 public SiteHub(
     IOptions <AppSettings> settings = null
     , IDataManager d        = null
     , ICredentialsService c = null
     , IActionProcessor a    = null
     , ITokenService t       = null
     )
 {
     this.Settings           = settings.Value;
     this.DataManager        = d;
     this.CredentialsManager = c;
     this.ActionProcessor    = a;
     this.TokenManager       = t;
 }
コード例 #21
0
		public LoginPageViewModel (Page page)
		{
			page.Title = "Login Page";

			credentialsService = DependencyService.Get<ICredentialsService> ();

			TriggerAuthCommand = new Command (async () => await TouchIdBtnTapped ());

			SetupOnDeviceCommand = new Command (async () => await SetupOnDeviceBtnTapped ());

			page.Appearing += async (object sender, EventArgs e) => {
				await OnAppearing (sender, e);
			};
		}
コード例 #22
0
        public MapTransferService(IMapStorageService storage, ICredentialsService creds)
        {
            MapStorage = storage;
            CredentialsProvider = creds;

            using (IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication())
            {
                if (!isoStore.DirectoryExists("Maps"))
                {
                    isoStore.CreateDirectory("Maps");
                }
            }

            GetMapsListCompletedObservable = Observable.FromEventPattern<GetMapListFilterCompletedEventArgs>(d => MapService.GetMapListFilterCompleted += d, d => MapService.GetMapListFilterCompleted -= d);
            GetMapUrlCompletedObservable = Observable.FromEventPattern<GetMapUrlCompletedEventArgs>(d => MapService.GetMapUrlCompleted += d, d => MapService.GetMapUrlCompleted -= d);
            GetXmlUrlCompletedObservable = Observable.FromEventPattern<GetXmlUrlCompletedEventArgs>(d => MapService.GetXmlUrlCompleted += d, d => MapService.GetXmlUrlCompleted -= d);
        }
コード例 #23
0
ファイル: App.xaml.cs プロジェクト: abdel/ProfessionalJournal
        public App()
        {
            InitializeComponent();

            DependencyService.Register <JournalDataStore>();
            DependencyService.Register <EntryDataStore>();

            CredentialsService = new CredentialsService();
            if (CredentialsService.DoCredentialsExist())
            {
                MainPage = new NavigationPage(new JournalsPage());
            }
            else
            {
                MainPage = new NavigationPage(new LoginPage());
            }
        }
コード例 #24
0
        public RefreshVocabularyVM(
            ICredentialsService Credentials,
            Func<IRefreshVocabularyTask> refreshVocabluaryTaskFactory,
            IMessageBus Messenger
            ) {
            this.OnActivation()
                .SelectMany(_ => Credentials.CurrentCredentials().Where(cred => cred != null).FirstAsync())
                .TakeUntil(this.OnDeactivation())
                .Subscribe(login => {
                    var refreshTask = refreshVocabluaryTaskFactory();
                    refreshTask.Start(login)
                        .Subscribe(_ => { }, () => {
                            Messenger.SendMessage<EventMessage>(EventMessage.Default, MessageContracts.REFRESH);
                            Messenger.SendMessage<Page>(Page.Home);
                        });
                });

        }
コード例 #25
0
        public CheckCredentialsCommand(
            ICredentialsService credentialService,
            IBlue10AsyncClient blue10,
            IInOutService utilities,
            ILogger <CheckCredentialsCommand> logger) :
            base("check", "checks if you can connect to blue10 ")
        {
            _credentialService = credentialService;
            _blue10            = blue10;
            _utilities         = utilities;
            _logger            = logger;

            Add(new Option <string?>(new[] { "-q", "--query" }, () => null, "A query used to filter out results. NOTE: Dependant on output format. If output is 'json', this is a JMESPath query to filter results. https://jmespath.org/. If output is 'xml', this is an XPATH string. https://www.w3schools.com/xml/xpath_intro.asp"));
            Add(new Option <EFormatType>(new[] { "-f", "--format" }, () => EFormatType.JSON, "Output format."));
            Add(new Option <FileInfo?>(new[] { "-o", "--output" }, () => null, "Enter path to write output of this command to file. Default output is console only"));

            Handler = CommandHandler.Create <string, EFormatType, FileInfo?>(CheckConnection);
        }
コード例 #26
0
        public MainViewModel(IZoomService zoomService, ICredentialsService credentialsService)
        {
            Title = "zoom-custom-ui-wpf";

            _credentialsService = credentialsService;
            UserName            = _credentialsService.GetUserName();
            MeetingNumber       = _credentialsService.GetMeetingNumber();
            Password            = _credentialsService.GetPassword();

            _zoomService = zoomService;
            _zoomService.InitializedChanged   += ZoomServiceOnInitializedChanged;
            _zoomService.MeetingStatusChanged += ZoomServiceOnMeetingStatusChanged;

            // Running async code from constructor
            // Thanks Stephen Cleary and his Nito.Mvvm.Async library
            // https://blog.stephencleary.com/2013/01/async-oop-2-constructors.html
            InitializationNotifier = NotifyTask.Create(InitializationAsync());
        }
コード例 #27
0
        public WitsmlClientProvider(
            IConfiguration configuration,
            IHttpContextAccessor httpContextAccessor,
            ICredentialsService credentialsService,
            IOptions <WitsmlClientCapabilities> witsmlClientCapabilities)
        {
            if (httpContextAccessor.HttpContext == null || httpContextAccessor.HttpContext.Request.Headers["Authorization"].Count == 0)
            {
                return;
            }

            clientCapabilities = witsmlClientCapabilities.Value;

            var headers   = httpContextAccessor.HttpContext.Request.Headers;
            var serverUrl = headers[WitsmlServerUrlHeader];
            var witsmlServerAccessNeeded = !string.IsNullOrEmpty(serverUrl);

            if (!witsmlServerAccessNeeded)
            {
                return;
            }

            var credentials = ExtractCredentialsFromHeader(headers);

            //This provider will unintentionally be invoked also on initial authentication requests. Doing this to let the authentication route be triggered.
            var isEncrypted = credentialsService.VerifyIsEncrypted(credentials[0]);

            if (!isEncrypted)
            {
                return;
            }

            var logQueries = StringHelpers.ToBoolean(configuration["LogQueries"]);

            witsmlClient = new WitsmlClient(serverUrl, credentials[0].Username, credentialsService.Decrypt(credentials[0]), clientCapabilities, null, logQueries);

            var sourceServerUrl = headers[WitsmlSourceServerUrlHeader];

            if (string.IsNullOrEmpty(sourceServerUrl) && credentials.Count == 1)
            {
                return;
            }
            witsmlSourceClient = new WitsmlClient(sourceServerUrl, credentials[1].Username, credentialsService.Decrypt(credentials[1]), clientCapabilities, null, logQueries);
        }
コード例 #28
0
ファイル: App.xaml.cs プロジェクト: gakcorp/IMEG_mobile_cross
        public App()
        {
            CredentialsService = new CredentialsService();
            InitializeComponent();

            if (CredentialsService.DoCredentialsExist())
            {
                MainPage = new NavigationPage(new MainPage());
            }
            else
            {
                MainPage = new NavigationPage(new LoginPage());
            }

            /*
             * if (Device.RuntimePlatform == Device.iOS)
             *  MainPage = new MainPage();
             *
             * else
             *  MainPage = new NavigationPage(new MainPage());*/
        }
コード例 #29
0
 private async Task <bool> IsGrantedPermissionToGenerateCredentials(
     ICredentialsService credentialsService,
     InstanceLocator instanceLocator)
 {
     //
     // The call can fail if the session expired, but it's not worth/
     // reasonable to move the call into a job. Therefore, catch
     // the reauth error and fail open so that the re-auth error
     // can be handled during the connection or password reset
     // attempt.
     //
     try
     {
         return(await credentialsService
                .IsGrantedPermissionToGenerateCredentials(instanceLocator)
                .ConfigureAwait(true));
     }
     catch (Exception e) when(e.IsReauthError())
     {
         return(true);
     }
 }
コード例 #30
0
        public DiversityServiceClient(ICredentialsService Credentials, IKeyMappingService Mapping)
        {            
            this.Mapping = Mapping;
            this.Credentials = Credentials;

            Credentials.CurrentCredentials().Where(c => c != null).Subscribe(c => _CurrentCredentials = c);

            GetUserInfoCompleted = Observable.FromEventPattern<GetUserInfoCompletedEventArgs>(h => _svc.GetUserInfoCompleted += h, h => _svc.GetUserInfoCompleted -= h);
            GetRepositoriesCompleted = Observable.FromEventPattern<GetRepositoriesCompletedEventArgs>(h => _svc.GetRepositoriesCompleted += h, h => _svc.GetRepositoriesCompleted -= h);
            GetPropertiesForUserCompleted = Observable.FromEventPattern<GetPropertiesForUserCompletedEventArgs>(h => _svc.GetPropertiesForUserCompleted += h, h => _svc.GetPropertiesForUserCompleted -= h);
            GetProjectsForUserCompleted = Observable.FromEventPattern<GetProjectsForUserCompletedEventArgs>(h => _svc.GetProjectsForUserCompleted += h, h => _svc.GetProjectsForUserCompleted -= h);
            GetStandardVocabularyCompleted = Observable.FromEventPattern<GetStandardVocabularyCompletedEventArgs>(d => _svc.GetStandardVocabularyCompleted += d, d => _svc.GetStandardVocabularyCompleted -= d);
            GetAnalysesForProjectCompleted = Observable.FromEventPattern<GetAnalysesForProjectCompletedEventArgs>(d => _svc.GetAnalysesForProjectCompleted += d, d => _svc.GetAnalysesForProjectCompleted -= d);
            GetAnalysisResultsForProjectCompleted = Observable.FromEventPattern<GetAnalysisResultsForProjectCompletedEventArgs>( d => _svc.GetAnalysisResultsForProjectCompleted += d, d => _svc.GetAnalysisResultsForProjectCompleted -= d);
            GetAnalysisTaxonomicGroupsForProjectCompleted = Observable.FromEventPattern<GetAnalysisTaxonomicGroupsForProjectCompletedEventArgs>(d => _svc.GetAnalysisTaxonomicGroupsForProjectCompleted += d, d => _svc.GetAnalysisTaxonomicGroupsForProjectCompleted -= d);

            GetTaxonListsForUser = Observable.FromEventPattern<GetTaxonListsForUserCompletedEventArgs>( d => _svc.GetTaxonListsForUserCompleted += d, d => _svc.GetTaxonListsForUserCompleted -= d);
            DownloadTaxonList = Observable.FromEventPattern<DownloadTaxonListCompletedEventArgs>( d => _svc.DownloadTaxonListCompleted += d, d => _svc.DownloadTaxonListCompleted -= d);
            GetQualificationsCompleted = Observable.FromEventPattern<GetQualificationsCompletedEventArgs>( d => _svc.GetQualificationsCompleted += d, d => _svc.GetQualificationsCompleted -= d);

            InsertMMOCompleted = Observable.FromEventPattern<AsyncCompletedEventArgs>(h => _svc.InsertMMOCompleted += h, h => _svc.InsertMMOCompleted -= h);
            InsertESCompleted = Observable.FromEventPattern<InsertEventSeriesCompletedEventArgs>(h => _svc.InsertEventSeriesCompleted += h, h => _svc.InsertEventSeriesCompleted -= h);
            InsertEVCompleted = Observable.FromEventPattern<InsertEventCompletedEventArgs>(h => _svc.InsertEventCompleted += h, h => _svc.InsertEventCompleted -= h);
            InsertSPCompleted = Observable.FromEventPattern<InsertSpecimenCompletedEventArgs>(h => _svc.InsertSpecimenCompleted += h, h => _svc.InsertSpecimenCompleted -= h);
            InsertIUCompleted = Observable.FromEventPattern<InsertIdentificationUnitCompletedEventArgs>(h => _svc.InsertIdentificationUnitCompleted += h, h => _svc.InsertIdentificationUnitCompleted -= h);

            UploadMultimediaCompleted = Observable.FromEventPattern<SubmitCompletedEventArgs>(h => _multimedia.SubmitCompleted += h, h => _multimedia.SubmitCompleted -= h);

            EventSeriesByIDCompleted = Observable.FromEventPattern<EventSeriesByIDCompletedEventArgs>(h => _svc.EventSeriesByIDCompleted += h, h => _svc.EventSeriesByIDCompleted -= h);
            LocalizationsForSeriesCompleted = Observable.FromEventPattern<LocalizationsForSeriesCompletedEventArgs>(h => _svc.LocalizationsForSeriesCompleted += h, h => _svc.LocalizationsForSeriesCompleted -= h);
            EventsByLocalityCompleted = Observable.FromEventPattern<EventsByLocalityCompletedEventArgs>(h => _svc.EventsByLocalityCompleted += h, h => _svc.EventsByLocalityCompleted -= h);
            PropertiesForEventCompleted = Observable.FromEventPattern<PropertiesForEventCompletedEventArgs>(h => _svc.PropertiesForEventCompleted += h, h => _svc.PropertiesForEventCompleted -= h);
            SpecimenForEventCompleted = Observable.FromEventPattern<SpecimenForEventCompletedEventArgs>(h => _svc.SpecimenForEventCompleted += h, h => _svc.SpecimenForEventCompleted -= h);
            UnitsForSpecimenCompleted = Observable.FromEventPattern<UnitsForSpecimenCompletedEventArgs>(h => _svc.UnitsForSpecimenCompleted += h, h => _svc.UnitsForSpecimenCompleted -= h);
            SubUnitsForIUCompleted = Observable.FromEventPattern<SubUnitsForIUCompletedEventArgs>(h => _svc.SubUnitsForIUCompleted += h, h => _svc.SubUnitsForIUCompleted -= h);
            AnalysesForIUCompleted = Observable.FromEventPattern<AnalysesForIUCompletedEventArgs>(h => _svc.AnalysesForIUCompleted += h, h => _svc.AnalysesForIUCompleted -= h);
        }
コード例 #31
0
ファイル: App.xaml.cs プロジェクト: DeveloppeurPheidi/Ipheidi
 /// <summary>
 /// Initiates the services.
 /// </summary>
 private void InitializeServices()
 {
     try
     {
         Battery             = DependencyService.Get <IBattery>();
         NetworkManager      = DependencyService.Get <INetworkService>();
         ContactManager      = DependencyService.Get <IContactService>();
         CookieManager       = DependencyService.Get <ICookieService>();
         CredentialsManager  = DependencyService.Get <ICredentialsService>();
         NativeUtilities     = DependencyService.Get <INativeUtilities>();
         LocationService     = DependencyService.Get <ILocationService>();
         NotificationManager = DependencyService.Get <INotificationService>();
         FileHelper          = DependencyService.Get <IFileHelper>();
         ImageHelper         = DependencyService.Get <IImageHelper>();
         LocalizationManager = DependencyService.Get <ILocalization>();
         ThreadHelper.Initialize(Environment.CurrentManagedThreadId);
         SettingHelper = DependencyService.Get <ISettingHelper>();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(ಠ_ಠ);
         Debug.WriteLine(e.Message);
     }
 }
コード例 #32
0
ファイル: LoginPage.cs プロジェクト: echo000/TestProject2
        public LoginPage()
        {
            var label = new Label {
                Text = "Search for your profile name"
            };

            storeService = DependencyService.Get <ICredentialsService>();

            NavigationPage.SetHasNavigationBar(this, true);

            searchBar = new CustomSearchBar {
                Placeholder = "Search Summoner"
            };

            searchBar.SearchButtonPressed += async(sender, e) =>
            {
                var summonerName = searchBar.Text.Replace(" ", "");
                var summoner     = await App.api.GetSummonerAsync(region, summonerName);

                var doCredentialsExist = storeService.DoCredentialsExist();
                if (!doCredentialsExist)
                {
                    storeService.SaveCredentials(summoner.Name, summoner.Region.ToString(), summoner.Id.ToString());
                }

                //NavigationPage.SetHasNavigationBar(this, false);
                Application.Current.MainPage = new TabbedPages(summoner, summoner.Region);
                await Navigation.PopToRootAsync();
            };

            picker       = new Picker();
            picker.Title = "Region";

            picker.Items.Add(Region.euw.ToString().ToUpper());
            picker.Items.Add(Region.eune.ToString().ToUpper());
            picker.Items.Add(Region.na.ToString().ToUpper());
            picker.Items.Add(Region.kr.ToString().ToUpper());
            picker.Items.Add(Region.br.ToString().ToUpper());
            picker.Items.Add(Region.lan.ToString().ToUpper());
            picker.Items.Add(Region.las.ToString().ToUpper());
            picker.Items.Add(Region.oce.ToString().ToUpper());
            picker.Items.Add(Region.ru.ToString().ToUpper());
            picker.Items.Add(Region.tr.ToString().ToUpper());

            picker.SelectedIndex = 0;

            picker.SelectedIndexChanged += (sender, args) =>
            {
                switch (picker.SelectedIndex)
                {
                case 0:
                    region = Region.euw;
                    break;

                case 1:
                    region = Region.eune;
                    break;

                case 2:
                    region = Region.na;
                    break;

                case 3:
                    region = Region.kr;
                    break;

                case 4:
                    region = Region.br;
                    break;

                case 5:
                    region = Region.lan;
                    break;

                case 6:
                    region = Region.las;
                    break;

                case 7:
                    region = Region.oce;
                    break;

                case 8:
                    region = Region.ru;
                    break;

                case 9:
                    region = Region.tr;
                    break;
                }
            };

            Content = new StackLayout
            {
                Children =
                {
                    searchBar,
                    picker,
                    label
                }
            };
        }
コード例 #33
0
        public LoginPage()
        {
            InitializeComponent();

            storeService = DependencyService.Get <ICredentialsService> ();
        }
コード例 #34
0
 public LegacyLoginViewModel(ICredentialsService credentials, IAuthenticationService authentication, IApplicationNavigationService navigation)
 {
     _credentials    = credentials;
     _authentication = authentication;
     _navigation     = navigation;
 }
コード例 #35
0
ファイル: CredientalStore.cs プロジェクト: travo12/GameCode
 public CredentialStore()
 {
     CredientialService = DependencyService.Get<ICredentialsService>();
 }
コード例 #36
0
 public TeamServicesClient(ICredentialsService credentialsService)
 {
     this.credentialsService = credentialsService;
 }
コード例 #37
0
 public GitHubRestRequest(ICredentialsService credentialsService)
 {
     _credentialsService = credentialsService;
 }
コード例 #38
0
ファイル: LoginPage.xaml.cs プロジェクト: 4lenz1/recipes
		public LoginPage ()
		{
			InitializeComponent ();

			storeService = DependencyService.Get<ICredentialsService> ();
		}
コード例 #39
0
ファイル: LoginViewModel.cs プロジェクト: nigel-sampson/talks
 public LoginViewModel(ICredentialsService credentials, IAuthenticationService authentication, IApplicationNavigationService navigation)
 {
     this.credentials = credentials;
     this.authentication = authentication;
     this.navigation = navigation;
 }
コード例 #40
0
 public CredentialsController(CoturnConfiguration coturnConfiguration, ICredentialsService credentialsService)
 {
     _coturnConfiguration = coturnConfiguration;
     _credentialsService  = credentialsService;
 }
コード例 #41
0
 public GitHubApiProvider(ICredentialsService credentialsService)
 {
     _credentialsService = credentialsService;
 }
コード例 #42
0
ファイル: EmailService.cs プロジェクト: TGebreyes/trackyt.net
 public EmailService(ICredentialsService credentials)
 {
     _credentials = credentials;
 }