Ejemplo n.º 1
0
 public AlbumArtLoader(Athena.IoC.Container container, MemoryStream defaultStream)
 {
     _container = container;
     _defaultStream = defaultStream;
     _model = container.Resolve<AmpacheModel>();
     _model.PropertyChanged += Handle_modelPropertyChanged;
     LoadAlbumImage();
 }
Ejemplo n.º 2
0
 public void Connected(Athena.IoC.Container container)
 {
     _model = container.Resolve<AmpacheModel>();
     if(!_uiActions.ContainsKey(AmpacheModel.ALBUM_ART_STREAM))
     {
         _uiActions.Add(AmpacheModel.ALBUM_ART_STREAM, UpdateArt);
         RunOnUiThread(() => UpdateArt());
     }
     if(!_uiActions.ContainsKey(AmpacheModel.NEXT_REQUESTED))
     {
         _uiActions.Add(AmpacheModel.NEXT_REQUESTED, UpdateNextButton);
         RunOnUiThread(() => UpdateNextButton());
     }
     if(!_uiActions.ContainsKey(AmpacheModel.PREVIOUS_REQUESTED))
     {
         _uiActions.Add(AmpacheModel.PREVIOUS_REQUESTED, UpdatePreviousButton);
         RunOnUiThread(() => UpdatePreviousButton());
     }
     if(!_uiActions.ContainsKey(AmpacheModel.SHUFFELING))
     {
         _uiActions.Add(AmpacheModel.SHUFFELING, UpdateShuffleButton);
         RunOnUiThread(() => UpdateShuffleButton());
     }
     if(!_uiActions.ContainsKey(AmpacheModel.PLAY_PAUSE_REQUESTED))
     {
         _uiActions.Add(AmpacheModel.PLAY_PAUSE_REQUESTED, UpdatePlayPauseButton);
         RunOnUiThread(() => UpdatePlayPauseButton());
     }
     if(!_uiActions.ContainsKey(AmpacheModel.USER_MESSAGE))
     {
         _uiActions.Add(AmpacheModel.USER_MESSAGE, DisplayMessage);
     }
     _model.PropertyChanged += Handle_modelPropertyChanged;
     _model.PropertyChanged += ModelDisposed;
     ImageButton btn = FindViewById<ImageButton>(Resource.Id.imgPlayingNext);
     if(btn != null)
     {
         btn.Click += HandleNextClick;
     }
     btn = FindViewById<ImageButton>(Resource.Id.imgPlayingPrevious);
     if(btn != null)
     {
         btn.Click += HandlePreviousClick;
     }
     btn = FindViewById<ImageButton>(Resource.Id.imgPlayingPlayPause);
     if(btn != null)
     {
         btn.Click += HandlePlayClick;
     }
     btn = FindViewById<ImageButton>(Resource.Id.imgPlayingShuffle);
     if(btn != null)
     {
         btn.Click += HandleShuffleClick;
     }
     OnModelLoaded();
 }
Ejemplo n.º 3
0
 public void Connected(Athena.IoC.Container container)
 {
     _model = container.Resolve<AmpacheModel>();
     var tmp = _config ?? _model.Configuration;
     FindViewById<EditText>(Resource.Id.txtConfigUrl).Text = tmp.ServerUrl;
     FindViewById<EditText>(Resource.Id.txtConfigUser).Text = tmp.User;
     FindViewById<EditText>(Resource.Id.txtPasswordConfig).Text = tmp.Password;
     FindViewById<CompoundButton>(Resource.Id.chkSeeking).Checked = tmp.AllowSeeking;
     FindViewById<CompoundButton>(Resource.Id.chkArtCache).Checked = tmp.CacheArt;
 }
Ejemplo n.º 4
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     base.Start();
 }
 public AmpacheSelectionFactory(Athena.IoC.Container container)
 {
     _container = container;
 }
Ejemplo n.º 6
0
 public BackgroundHandle(UserConfiguration config, string art, AmpacheSelectionFactory factory, AmpacheModel model, Athena.IoC.Container container)
     : this(config, art, model, container)
 {
     _factory = factory;
 }
Ejemplo n.º 7
0
 public BackgroundHandle(UserConfiguration config, string art, AmpacheModel model, Athena.IoC.Container container)
     : this(config, art)
 {
     _model = model;
     _container = container;
 }
Ejemplo n.º 8
0
 public Binder(Athena.IoC.Container container)
 {
     Container = container;
 }
Ejemplo n.º 9
0
 public void RegisterAthena(Athena athena)
 {
     this.athena = athena;
 }