public NewAccountViewController (AppDelegateIPhone appDel, UINavigationController vc) : base("NewAccountViewController", null)
		{
			_AppDel = appDel;
			_vc = vc;
			
			this.root = CreateRoot ();
		}
		public AuthentificationViewController (AppDelegateIPhone appDel, UINavigationController vc) 
			: base("AuthentificationViewController", null)
		{
			_AppDel = appDel;
			_vc = vc;
			
			this.root = CreateRoot ();
		}
Beispiel #3
0
		public MSPNavigationController (AppDelegateIPhone appDel)
		{			
			//NavigationBar.TintColor = UIColor.Red;
			NavigationBarHidden = true;
			
			
			_AppDel = appDel;
		}
Beispiel #4
0
		// This method is invoked when the application has loaded its UI and its ready to run
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			//ThreadPool.QueueUserWorkItem(el => UIImageUtils.AddImagesToSimulator());
			AIphone = this;
			ImageLoader.DefaultLoader = new ImageLoader(200, 4194304 * 5);
			
			DBActivServ = new DBActiviesService();
			
			FacebookServ = new FacebookService();
			UsersServ = new UsersService();
			ImgServ = new ImagesService();
			FlwServ = new FollowersService();
			KeywServ = new KeywordsService();
			LikesServ = new LikesService();
			CommentServ = new CommentsService();
			ActivServ = new ActivitiesService();
			ReportServ = new ReportService();
			ShareServ = new ShareService();
			InstagramServ = new InstagramService();
			
			InitializeWindow ();
			
//			ServicePointManager.ServerCertificateValidationCallback = (sender, cert, chain, ssl) => 
//			{
//				return true;
//			};
			
			var mainDB = Database.Main;
			try
			{
				LastUserLogged lastUser = Database.Main.Table<LastUserLogged>().LastOrDefault();
				if (lastUser != null)
				{
					MainUser = mainDB.Get<User>(lastUser.UserId);
				}
				
				if (MainUser != null)
				{
					_welcomePage = new UIImageView(Graphics.GetImgResource("pagedegarde"));
					_welcomePage.Tag = 666;
					window.AddSubview(_welcomePage);
					
					ShowRealLoading(window, "Logging in ...", "", 
					()=>
					{											
						//InstagramServ.GetPopular();
						AuthSequence(MainUser);
					});
				}
				else
				{					
					InitLoginPage();
				}
			}
			catch (Exception ex)
			{
				Util.LogException("FinishedLaunching", ex);
			}
						
			window.MakeKeyAndVisible ();			
			
			return true;
		}
		private Image GetPhoto(AppDelegateIPhone AppDel, ref string jpgstr)
		{			
			if (Description != null)
				Description.FetchValue();
			
			string desc = null;
			if (Description != null && !string.IsNullOrWhiteSpace(Description.Value))
				desc = Description.Value;
			
			var image = new Image() 
			{
				Name = desc, 
				UserId = AppDel.MainUser.Id,
				Longitude = PhotoLocation.Coordinate.Longitude,
				Latitude = PhotoLocation.Coordinate.Latitude,
				Time = DateTime.UtcNow,
			};
			
			var err = new NSError(new NSString("Photo"), 1);				
			jpgstr = Path.Combine(ImageStore.TmpDir, string.Format("{0}.jpg", image.Id));
			int level = Util.Defaults.IntForKey ("sizeCompression");
			
			var size = _image.Size;
			float maxWidth = 640;
			switch (level){
			case 0:
				maxWidth = 640;
				break;
			case 1:
				maxWidth = 1024;
				break;
			default:
				maxWidth = size.Width;
				break;
			}
			
			if (size.Width > maxWidth || size.Height > maxWidth)
				_image = GraphicsII.Scale (_image, new SizeF (maxWidth, maxWidth*size.Height/size.Width));				
			
			_image.AsJPEG((float)0.7).Save(jpgstr, true, out err);
			
			return image;
		}
Beispiel #6
0
		public WelcomePage(AppDelegateIPhone appDel) :this()
		{
			_AppDel = appDel;
		}
Beispiel #7
0
		public LoginPageGarde (AppDelegateIPhone appDel) : base("LoginPageGarde", null)
		{
			_AppDel = appDel;
		}
		public AlbumDetailsViewController(UINavigationController nav, AppDelegateIPhone appDel, Albums album) :this()
		{
			Nav = nav;
			_AppDel = appDel;
			this.album = album;
		}