Пример #1
0
 public BaseViewModel(INetEase netEase, INetwork network, IDialog dialog)
 {
     this.netEase   = netEase;
     this.network   = network;
     this.dialog    = dialog;
     this.MenuItems = new List <MenuItem>();
 }
Пример #2
0
        public MainViewModel(INetEase netEase, INetwork network, IDialog dialog, IPersist persist)
            : base(netEase, network, dialog)
        {
            this.persist = persist;
            string username = this.persist.GetString("Username");

            if (!string.IsNullOrEmpty(username))
            {
                this.HeaderMenuText = "Welcome \n" + username;
                var loginMenuItem = this.MenuItems.FirstOrDefault(p => p.Image == "res:login");
                if (loginMenuItem != null)
                {
                    loginMenuItem.Image     = "res:listmenu";
                    loginMenuItem.Title     = Texts.MenuMyPL;
                    loginMenuItem.ViewModel = typeof(LoginViewModel);
                }
            }
            else
            {
                this.HeaderMenuText = "Fildo \nSearch Music and download it!";
            }

            if (!this.NoInternet)
            {
                this.Init();
            }
        }
Пример #3
0
        public ConfigurationViewModel(INetEase netEase, INetwork network, IDialog dialog)
            : base(netEase, network, dialog)
        {
            this.Cultures = new List <string>();
            this.Cultures.Add(string.Empty);
            this.Cultures.Add("Español");
            this.Cultures.Add("English");
            this.Cultures.Add("Català");
            this.Cultures.Add("Français");
            this.Cultures.Add("Deutsch");
            this.Cultures.Add("Italiano");
            this.Cultures.Add("Português");

            this.Proxies = new List <string>();
            this.Proxies.Add(Texts.NoProxy);

            this.Proxies.Add("http://117.177.250.149:82");
            this.Proxies.Add("http://117.177.250.149:83");
            this.Proxies.Add("http://117.177.250.149:84");
            this.Proxies.Add("http://117.177.250.149:86");

            this.Proxies.Add("http://117.177.250.148:85");
            this.Proxies.Add("http://117.177.250.148:86");

            this.Proxies.Add("http://117.177.250.147:85");
            this.Proxies.Add("http://117.177.250.147:84");
            this.Proxies.Add("http://117.177.250.147:83");
            this.Proxies.Add("http://117.177.250.147:82");

            this.Proxies.Add("http://117.177.250.146:86");
            this.Proxies.Add("http://117.177.250.146:85");
            this.Proxies.Add("http://117.177.250.147:84");
            this.Proxies.Add("http://117.177.250.147:83");
            this.Proxies.Add("http://117.177.250.147:82");
        }
Пример #4
0
 public Player(INetEase netEase)
 {
     BackgroundStreamingService.QueueChanged += this.BackgroundStreamingService_QueueChanged;
     this.netEase = netEase;
     //mediaPlayerServiceIntent = new Intent(Android.App.Application.Context, typeof(BackgroundStreamingService));
     //mediaPlayerServiceConnection = new MediaPlayerServiceConnection(this);
     //Android.App.Application.Context.BindService(mediaPlayerServiceIntent, mediaPlayerServiceConnection, Bind.AutoCreate);
 }
Пример #5
0
        public DownloadViewModel(INetEase netEase, INetwork network, IDownloadQueue downloadQueue, IDialog dialog)
            : base(netEase, network, dialog)
        {
            this.downloadQueue = downloadQueue;
            this.downloads     = this.downloadQueue.GetAll();

            this.downloadQueue.QueueChanged += this.DownloadQueue_QueueChanged;
        }
Пример #6
0
 public TopArtistsViewModel(INetEase netEase, INetwork network, IDialog dialog)
     : base(netEase, network, dialog)
 {
     if (!this.NoInternet)
     {
         this.Init();
     }
 }
Пример #7
0
 public LyricViewModel(INetEase netEase, INetwork network, IPlayer player, IDialog dialog)
     : base(netEase, network, dialog)
 {
     /*this.downloadQueue = downloadQueue;
      * this.downloads = this.downloadQueue.GetAll();
      * this.downloadQueue.QueueChanged += DownloadQueue_QueueChanged;*/
     this.player = player;
     this.player.QueueChanged += this.Player_QueueChanged;
     this.RaisePropertyChanged(() => this.Songs);
 }
Пример #8
0
 public DownloadQueue(IDownloader downloader, INetEase netEase)
 {
     this.downloader = downloader;
     this.netEase    = netEase;
     this.queue      = new ObservableCollection <Download>();
     this.queue.CollectionChanged    += this.Queue_CollectionChanged;
     this.downloader.ProgressChanged += this.Downloader_ProgressChanged;
     this.downloader.Downloaded      += this.Downloader_Downloaded;
     this.isDownloading = false;
 }
Пример #9
0
 public SearchResultViewModel(
     INetEase netEase,
     INetwork network,
     IDialog dialog,
     IPlayer player,
     IDownloadQueue downloaderQueue)
     : base(netEase, network, dialog)
 {
     this.player          = player;
     this.downloaderQueue = downloaderQueue;
 }
Пример #10
0
        public ListSongViewModel(IUserDialogs userDialog, INetEase netEase, IDownloadQueue downloadQueue, IPlayer player, INetwork network, IDialog dialog)
            : base(netEase, network, dialog)
        {
            this.userDialog    = userDialog;
            this.downloadAll   = false;
            this.downloadQueue = downloadQueue;
            this.player        = player;

            this.player.ProgressChanged -= this.Player_ProgressChanged;
            this.player.ProgressChanged += this.Player_ProgressChanged;
            this.player.SongFinished    -= this.Player_SongFinished;
            this.player.SongFinished    += this.Player_SongFinished;
            this.historyItems            = new List <SongListInitItem>();
        }
Пример #11
0
 public ListViewModel(INetEase netEase, INetwork network, IDialog dialog)
     : base(netEase, network, dialog)
 {
 }
Пример #12
0
 public Downloader(INetEase netEase)
 {
     this.netEase = netEase;
 }
Пример #13
0
 public InfoViewModel(INetEase netEase, INetwork network, IPlayer player, IDialog dialog)
     : base(netEase, network, dialog)
 {
 }
Пример #14
0
 public ImportNeteaseViewModel(INetEase netEase, INetwork network, IDialog dialog)
     : base(netEase, network, dialog)
 {
 }