예제 #1
0
 public void LogOutAsync(object userArgs)
 {
     if (this.IsLoggedIn)
     {
         Html2XmlDownload dl = new Html2XmlDownload();
         dl.Settings.Account        = this;
         dl.Settings.DownloadStream = false;
         dl.Settings.Url            = "http://login.yahoo.com/config/login?logout=1&.direct=2&.done=&.src=&.intl=us&.lang=en-US";
         dl.AsyncDownloadCompleted += this.LogOutAsync_Completed;
         dl.DownloadAsync(userArgs);
     }
 }
예제 #2
0
        public void AddPortfolioItemAsync(string portfolioID, string itemID, object userArgs)
        {
            Html2XmlDownload html = new Html2XmlDownload();

            html.Settings.Account        = this;
            html.Settings.Url            = string.Format("http://finance.yahoo.com/portfolio/add_symbols?portfolio_id={0}&portfolio_view_id=v1&quotes={1}", portfolioID, itemID);
            html.AsyncDownloadCompleted += this.AddPortfolioItem_Completed;
            html.DownloadAsync(new AddPfItemAsyncArgs(userArgs)
            {
                PortfolioID = portfolioID
            });
        }
예제 #3
0
 public void UploadAsync(WebFormDownloadSettings settings, object userArgs)
 {
     AsyncArgs args = new AsyncArgs(userArgs) { Settings = settings };
     if (settings.Account.Crumb == string.Empty)
     {
         Html2XmlDownload html = new Html2XmlDownload();
         html.Settings.Account = settings.Account;
         html.Settings.Url = settings.Url;
         html.AsyncDownloadCompleted += this.html_DownloadAsyncCompleted;
         html.DownloadAsync(args);
     }
     else
     {
         this.UploadAsync2(args);
     }
 }
예제 #4
0
 public void LogOutAsync(object userArgs)
 {
     if (this.IsLoggedIn)
     {
         Html2XmlDownload dl = new Html2XmlDownload();
         dl.Settings.Account = this;
         dl.Settings.DownloadStream = false;
         dl.Settings.Url = "http://login.yahoo.com/config/login?logout=1&.direct=2&.done=&.src=&.intl=us&.lang=en-US";
         dl.AsyncDownloadCompleted += this.LogOutAsync_Completed;
         dl.DownloadAsync(userArgs);
     }
 }
 public void AddPortfolioItemAsync(string portfolioID, string itemID, object userArgs)
 {
     Html2XmlDownload html = new Html2XmlDownload();
     html.Settings.Account = this;
     html.Settings.Url = string.Format("http://finance.yahoo.com/portfolio/add_symbols?portfolio_id={0}&portfolio_view_id=v1&quotes={1}", portfolioID, itemID);
     html.AsyncDownloadCompleted += this.AddPortfolioItem_Completed;
     html.DownloadAsync(new AddPfItemAsyncArgs(userArgs) { PortfolioID = portfolioID });
 }