Beispiel #1
0
        protected override void OnCreate(Bundle bundle)
        {
            platformSpecificHandler = new PlatformSpecificHandler();

            platformSpecificHandler.StorageInterface = new AndroidStorage();
            platformSpecificHandler.ViewHandler      = new AndroidViewHandler();
            platformSpecificHandler.ToastManager     = new AndroidToastManager();
            platformSpecificHandler.FileReader       = new AndroidFileReader();



            handler    = new AnimalAdjectiveHandler(platformSpecificHandler);
            favourites = new FavouritesManager(platformSpecificHandler);

            this.sharedGeneralGUIHandler   = new SharedGeneralGUIHandler(platformSpecificHandler);
            this.sharedFavouriteGUIHandler = new SharedFavouritesGUIHandler(platformSpecificHandler, sharedGeneralGUIHandler);
            this.sharedHomeGUIHandler      = new SharedHomeGUIHandler(platformSpecificHandler, sharedGeneralGUIHandler);

            base.OnCreate(bundle);

            this.ActionBar.NavigationMode = ActionBarNavigationMode.Tabs;

            this.AddTab("", Resource.Drawable.ic_action_play, new HomeFragment(handler, favourites, sharedGeneralGUIHandler, sharedHomeGUIHandler));
            this.AddTab("", Resource.Drawable.ic_action_favorite2, new FavouritesFragment(handler, favourites, sharedGeneralGUIHandler, sharedFavouriteGUIHandler));
            this.AddTab("", Resource.Drawable.ic_action_settings, new SettingsFragment());

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
        }
 public AnimalAdjectiveHandler(PlatformSpecificHandler platformHandler)
 {
     this._platformHandler = platformHandler;
     animalAdjectives      = new List <CombinedAnimalAdjective>();
 }
 public FavouritesManager(PlatformSpecificHandler platformHandler)
 {
     this.storage    = platformHandler.StorageInterface;
     this.fileReader = platformHandler.FileReader;
     favourites      = this.GetStoredString();
 }
 public SharedGeneralGUIHandler(PlatformSpecificHandler handler)
 {
     platformHandler = handler;
 }
		public CombinedAnimalAdjective (PlatformSpecificHandler platformInterface)
		{
			_wordComponents = new WordComponent[2];
			_wordComponents [0] = new Adjective (platformInterface.FileReader);
			_wordComponents [1] = new Animal (platformInterface.FileReader);
		}
 public SharedHomeGUIHandler(PlatformSpecificHandler handler, SharedGeneralGUIHandler sharedGUIHandler)
 {
     platformHandler   = handler;
     _sharedGUIHandler = sharedGUIHandler;
 }
 public SharedFavouritesGUIHandler(PlatformSpecificHandler handler, SharedGeneralGUIHandler generalGUIHandler)
 {
     platformHandler         = handler;
     this._generalGUIHandler = generalGUIHandler;
 }