Exemple #1
0
        protected override void OnResponse(ResponseType response)
        {
            if (response == ResponseType.Ok)
            {
                string      name = SourceName;
                StationType type = StationType.FindByLabel(type_combo.ActiveText);
                string      arg  = Arg;

                ThreadAssist.Spawn(delegate {
                    if (source == null)
                    {
                        source = new StationSource(lastfm, name, type.Name, arg);
                        lastfm.AddChildSource(source);
                        //LastFMPlugin.Instance.Source.AddChildSource (source);
                        //ServiceManager.SourceManager.AddSource (source);
                    }
                    else
                    {
                        source.Rename(name);
                        source.Type = type;
                        source.Arg  = arg;
                        source.Save();
                        //source.Refresh ();
                    }
                });
            }
        }
Exemple #2
0
        public override void OnPlaybackFinished(double percentCompleted)
        {
            base.OnPlaybackFinished(percentCompleted);

            station.PlayCount++;
            station.Save();
        }