예제 #1
0
        /// <summary>
        /// Sets the provider type to represent.
        /// </summary>
        public void SetProvider(ApiProviderType provider)
        {
            this.provider         = provider;
            iconSprite.SpriteName = Model.GetProviderIcon(provider);

            RefreshFocus();
        }
예제 #2
0
        /// <summary>
        /// Event called when the last login api setting has been changed.
        /// </summary>
        private void OnLastLoginApiChange(ApiProviderType type)
        {
            currentProvider.Value = Api.GetProvider(type);

            DisposeAuthRequest(false);
            DisposeMeRequest(false);
        }
예제 #3
0
 /// <summary>
 /// Event called on api provider change.
 /// </summary>
 private void OnProviderChange(ApiProviderType provider) => RefreshStatus();
예제 #4
0
 /// <summary>
 /// Returns the sprite name of the api provider icon.
 /// </summary>
 public string GetProviderIcon(ApiProviderType type)
 {
     return(Api.GetProvider(type).IconName);
 }
예제 #5
0
 /// <summary>
 /// Selects the API provider to use.
 /// </summary>
 public void SelectApi(ApiProviderType type)
 {
     GameConfiguration.LastLoginApi.Value = type;
     GameConfiguration.Save();
 }
예제 #6
0
 public IApiProvider GetProvider(ApiProviderType type) => providers[type];