0

Web サービスで請求書の数を取得するアプリを開発し、2 分ごとにタイル通知で更新されます。請求書番号は、scheduledAgent.cs の count 変数で更新されます。何か案が?

メインページ内

ServiceReference1.WebServiceSoapClient test = new ServiceReference1.WebServiceSoapClient();

test.ReadTotalOutstandingInvoiceCompleted += new EventHandler<ServiceReference1.ReadTotalOutstandingInvoiceCompletedEventArgs>(serviceClient);

test.ReadTotalOutstandingInvoiceAsync();


private void serviceClient(object sender, ReadTotalOutstandingInvoiceCompletedEventArgs e)
{
     try
     {
         PeriodicTask p = new PeriodicTask("jj");

         p.Description = "Don't push the red button";

         ScheduledActionService.Add(p);

         ScheduledActionService.LaunchForTest(p.Name, TimeSpan.FromSeconds(10));
     }

     catch(Exception ex)
     {

     }
}

ScheduledAgent.cs 内

 protected override void OnInvoke(ScheduledTask task)
    {
         //TODO: Add code to perform your task in background
         ShellTile t = ShellTile.ActiveTiles.First();

         StandardTileData d = new StandardTileData()
         {
             Title = "asdasdad",

             BackTitle = "cxvxvxvxcv",

             Count = 42,

             BackBackgroundImage = new Uri("dog.jpg", UriKind.Relative),

             BackgroundImage = new Uri("untitled.png", UriKind.Relative)
         };
             t.Update(d);

             NotifyComplete();

    }
4

0 に答える 0