Advertisement
Guest User

Untitled

a guest
Oct 12th, 2011
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.81 KB | None | 0 0
  1. [Application(Label = "@string/ApplicationName", Icon = "@drawable/icon")]
  2.     public class ApplicationState : Android.App.Application
  3.     {
  4.         public ApplicationState()
  5.         {
  6.         }
  7.  
  8.         private YooManager yooManager;
  9.  
  10.         public YooManager YooManager
  11.         {
  12.             get
  13.             {
  14.                 if (this.yooManager == null)
  15.                     this.yooManager = new YooManager();
  16.                 return this.yooManager;
  17.             }
  18.             set { this.yooManager = value; }
  19.         }
  20.  
  21.         private YooBik.YooView currentYooView;
  22.  
  23.         public YooBik.YooView CurrentYooView
  24.         {
  25.             get
  26.             {
  27.                 if (this.currentYooView == null)
  28.                 {
  29.                     //yooManager = new YooManager();
  30.                     this.currentYooView = new YooBik.YooView(YooManager.Manager);
  31.                     this.currentYooView.Metadata.ChangeMetadata("GameId", ClientData.GetInstance().CurrentGameId);
  32.                     this.currentYooView.Metadata.ChangeMetadata("UserId", ClientData.GetInstance().CurrentUserId);
  33.                     YooManager.Manager.AddView(this.currentYooView);
  34.                     this.connectYooView();
  35.                 }
  36.                 return this.currentYooView;
  37.             }
  38.             set { this.currentYooView = value; }
  39.         }
  40.  
  41.         /// <summary>
  42.         /// Connects views by registering to dedicated yooView events.
  43.         /// </summary>
  44.         private void connectYooView()
  45.         {
  46.             this.CurrentYooView.Added += delegate(object sender, ObservableDictArgs<Guid, IYooLet> args)
  47.             {
  48.             };
  49.  
  50.             this.CurrentYooView.Removed += delegate(object sender, ObservableDictArgs<Guid, IYooLet> args)
  51.             {
  52.             };
  53.         }
  54.  
  55.        
  56.     }
  57.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement