Example #1
0
        /// <summary>
        /// Search thread
        /// </summary>
        /// <param name="data">ID</param>
        private void ThreadFunc_Search(object[] data)
        {
            ThreadResultNotify mothed = new ThreadResultNotify(SearchResult);

            //search album
            Album aAlbum = TidalTool.GetAlbum(data[0].ToString(), false, Enum.GetName(typeof(Quality), Para.Config.Quality));

            this.Dispatcher.Invoke(mothed, "Album", aAlbum);
            return;
        }
        /// <summary>
        /// Login thread
        /// </summary>
        /// <param name="data">username and password</param>
        private void ThreadFunc_LogIn(object[] data)
        {
            Account aAccount = new Account();

            AIGS.Common.Property aProperty = (AIGS.Common.Property)data[0];
            bool bCheck = aAccount.LogIn(aProperty.Key.ToString(), aProperty.Value.ToString());

            ThreadResultNotify mothed = new ThreadResultNotify(LogInResult);

            this.Dispatcher.Invoke(mothed, aAccount);
            return;
        }