Ejemplo n.º 1
0
        public override void OnPlaybackFinished(double percentCompleted)
        {
            base.OnPlaybackFinished(percentCompleted);

            station.PlayCount++;
            station.Save();
        }
Ejemplo n.º 2
0
        public override ResponseType Run()
        {
            Dialog.ShowAll();

            ResponseType response = (ResponseType)Dialog.Run();

            if (response == ResponseType.Ok)
            {
                string      name = SourceName;
                StationType type = Type;
                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 ();
                    }
                });
            }

            return(response);
        }