// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { window = new UIWindow (UIScreen.MainScreen.Bounds); var accountManager = new DBAccountManager (key: "t3ow4tvu36zlh5s", secret: "w4nmqlk5ul1uiw8"); DBAccountManager.SetSharedManager (accountManager); settingsController = new SettingsController (accountManager); var initialControllers = new List<UIViewController>(); initialControllers.Add (settingsController); var account = accountManager.LinkedAccount; if (account != null) { var fileSystem = new DBFilesystem (account); var folderController = new FolderListController (fileSystem, DBPath.Root); initialControllers.Add (folderController); } navController = new UINavigationController (); navController.ViewControllers = initialControllers.ToArray (); window.RootViewController = navController; window.BackgroundColor = UIColor.White; window.MakeKeyAndVisible (); return true; }
public DropboxStorageImplementation () { string DropboxSyncKey = "YOUR_SYNC_KEY"; string DropboxSyncSecret = "YOUR_SECRET"; var manager = new DBAccountManager (DropboxSyncKey, DropboxSyncSecret); DBAccountManager.SharedManager = manager; }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { var manager = new DBAccountManager (DropboxSyncKey, DropboxSyncSecret); DBAccountManager.SharedManager = manager; // create a new window instance based on the screen size window = new UIWindow (UIScreen.MainScreen.Bounds); window.RootViewController = new UINavigationController (new PlaygroundViewController ()); Task.Factory.StartNew (() => { this.BeginInvokeOnMainThread (() => { var account = DBAccountManager.SharedManager.LinkedAccount; if (account != null) { SetupDropbox (); } else manager.LinkFromController (window.RootViewController); }); }); // make the window visible window.MakeKeyAndVisible (); app.ApplicationSupportsShakeToEdit = true; return true; }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { var manager = new DBAccountManager(DropboxSyncKey, DropboxSyncSecret); DBAccountManager.SharedManager = manager; Xamarin.Forms.Forms.Init(); // create a new window instance based on the screen size window = new UIWindow(UIScreen.MainScreen.Bounds); Task.Factory.StartNew(() => { this.BeginInvokeOnMainThread(() => { var account = DBAccountManager.SharedManager.LinkedAccount; if (account != null) { var filesystem = new DBFilesystem(account); DBFilesystem.SharedFilesystem = filesystem; SetupDropbox(); } else { manager.LinkFromController(window.RootViewController); } }); }); // If you have defined a root view controller, set it here: window.RootViewController = RacePickerPage.Create(DropboxDatabase.Shared).CreateViewController();; // make the window visible window.MakeKeyAndVisible(); return(true); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { window = new UIWindow(UIScreen.MainScreen.Bounds); var accountManager = new DBAccountManager(key: "t3ow4tvu36zlh5s", secret: "w4nmqlk5ul1uiw8"); DBAccountManager.SetSharedManager(accountManager); settingsController = new SettingsController(accountManager); var initialControllers = new List <UIViewController>(); initialControllers.Add(settingsController); var account = accountManager.LinkedAccount; if (account != null) { var fileSystem = new DBFilesystem(account); var folderController = new FolderListController(fileSystem, DBPath.Root); initialControllers.Add(folderController); } navController = new UINavigationController(); navController.ViewControllers = initialControllers.ToArray(); window.RootViewController = navController; window.BackgroundColor = UIColor.White; window.MakeKeyAndVisible(); return(true); }
void BootstrapDropbox() { // Setup Dropbox. Account = DBAccountManager.GetInstance(ApplicationContext, DropboxSyncKey, DropboxSyncSecret); Account.LinkedAccountChanged += (sender, e) => { if (e.P1.IsLinked) { Log("Account.LinkedAccountChanged", "Now linked to {0}", e.P1 != null ? e.P1.AccountInfo != null ? e.P1.AccountInfo.DisplayName : "nobody" : "null"); } else { Log("Account.LinkedAccountChanged", "Now unlinked from {0}", e.P1 != null ? e.P1.AccountInfo != null ? e.P1.AccountInfo.DisplayName : "nobody" : "null"); Account.StartLink(this, (int)RequestCode.LinkToDropboxRequest); return; } Account = e.P0; StartApp(e.P1); }; // TODO: Restart auth flow. if (!Account.HasLinkedAccount) { Account.StartLink(this, (int)RequestCode.LinkToDropboxRequest); } else { StartApp(); } }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { var manager = new DBAccountManager(DropboxSyncKey, DropboxSyncSecret); DBAccountManager.SharedManager = manager; window = new UIWindow(UIScreen.MainScreen.Bounds); viewController = new DropboxPaintViewController(); window.RootViewController = viewController; Task.Factory.StartNew(() => { this.BeginInvokeOnMainThread(() => { var account = DBAccountManager.SharedManager.LinkedAccount; if (account != null) { SetupDropbox(); } else { manager.LinkFromController(window.RootViewController); } }); }); window.MakeKeyAndVisible(); return(true); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { var manager = new DBAccountManager (DropboxSyncKey, DropboxSyncSecret); DBAccountManager.SharedManager = manager; Xamarin.Forms.Forms.Init(); // create a new window instance based on the screen size window = new UIWindow(UIScreen.MainScreen.Bounds); Task.Factory.StartNew (() => { this.BeginInvokeOnMainThread (() => { var account = DBAccountManager.SharedManager.LinkedAccount; if (account != null) { var filesystem = new DBFilesystem (account); DBFilesystem.SharedFilesystem = filesystem; SetupDropbox (); } else manager.LinkFromController (window.RootViewController); }); }); // If you have defined a root view controller, set it here: window.RootViewController = RacePickerPage.Create(DropboxDatabase.Shared).CreateViewController();; // make the window visible window.MakeKeyAndVisible (); return true; }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { _splitViewController = new TimingSplitViewController (); _splashViewController = new SplashDialogViewController (); _splashViewController.Changed += (string arg1, string arg2) => { _splitViewController.Initialise(arg1, arg2); window.RootViewController = _splitViewController; }; // create a new window instance based on the screen size window = new UIWindow (UIScreen.MainScreen.Bounds) { RootViewController = _splashViewController}; // make the window visible window.MakeKeyAndVisible (); // The account manager stores all the account info. Create this when your app launches var manager = new DBAccountManager (DropboxSyncKey, DropboxSyncSecret); DBAccountManager.SharedManager = manager; var account = manager.LinkedAccount; if (account != null) { var filesystem = new DBFilesystem (account); DBFilesystem.SharedFilesystem = filesystem; } else DBAccountManager.SharedManager.LinkFromController(_splitViewController); return true; }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { var manager = new DBAccountManager(DropboxSyncKey, DropboxSyncSecret); DBAccountManager.SharedManager = manager; // create a new window instance based on the screen size window = new UIWindow(UIScreen.MainScreen.Bounds); window.RootViewController = new UINavigationController(new PlaygroundViewController()); Task.Factory.StartNew(() => { this.BeginInvokeOnMainThread(() => { var account = DBAccountManager.SharedManager.LinkedAccount; if (account != null) { SetupDropbox(); } else { manager.LinkFromController(window.RootViewController); } }); }); // make the window visible window.MakeKeyAndVisible(); app.ApplicationSupportsShakeToEdit = true; return(true); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { UINavigationBar.Appearance.TintColor = UIColor.FromRGB (29, 131, 219); window = new UIWindow (UIScreen.MainScreen.Bounds); window.BackgroundColor = UIColor.White; window.Bounds = UIScreen.MainScreen.Bounds; var u = new TaskListScreen(); navController = new UINavigationController(); navController.PushViewController (u, false); window.RootViewController = navController; window.MakeKeyAndVisible (); // DROPBOX STUFF // The account manager stores all the account info. Create this when your app launches var manager = new DBAccountManager (DropboxSyncKey, DropboxSyncSecret); DBAccountManager.SharedManager = manager; var account = manager.LinkedAccount; if (account != null) { SetupDropbox (); } else manager.LinkFromController (window.RootViewController); //-- return true; }
public DropboxStorageImplementation() { string DropboxSyncKey = "YOUR_SYNC_KEY"; string DropboxSyncSecret = "YOUR_SECRET"; var manager = new DBAccountManager(DropboxSyncKey, DropboxSyncSecret); DBAccountManager.SharedManager = manager; }
public SettingsController(DBAccountManager manager) : base(UITableViewStyle.Grouped) { Manager = manager; Title = "Settings"; Manager.AddObserver(this, (account) => { AccountUpdated(account); }); TableView.Source = new SettingsControllerSource(this); }
public SettingsController(DBAccountManager manager) : base(UITableViewStyle.Grouped) { Manager = manager; Title = "Settings"; Manager.AddObserver (this, (account) => { AccountUpdated (account); }); TableView.Source = new SettingsControllerSource (this); }
DBDatastore DropboxDatastore; //VARAIBLE DE ADMINISTRACION DE NUESTRA DATASTORE //INICIA LA CONEXION CON NUESTRA CUENTA DE DROPBOX void IniciaConexionCuentaDropBox() { // INICIALIZAMOS NUESTRA VARIABLE ACCOUNT PASANDOLE LAS LLAVES QUE SE CREARON AL MOMENTO DE CREAR NUESTRA // APP EN EL PANEL DE DROPBOX CONSOLE Account = DBAccountManager.GetInstance(ApplicationContext, DropboxSyncKey, DropboxSyncSecret); //VERIFICAMOS SI LA CUENTA ESTA EN LINEA if (!Account.HasLinkedAccount) { //SI NO ESTA EN LINEA LLAMAMOS LA ACTIVIDAD DE INICIO DE SESION DE DROPBOX Account.StartLink(this, (int)RequestCode.LinkToDropboxRequest); } }
public DropboxFileSystemProvider (string key, string secret) { fss = new List<DropboxFileSystem> (); var manager = new DBAccountManager (key, secret); DBAccountManager.SharedManager = manager; var account = manager.LinkedAccount; if (account != null && account.Linked) { var dbfs = new DBFilesystem (account); var fs = new DropboxFileSystem (account, dbfs); fss.Add (fs); DBFilesystem.SharedFilesystem = dbfs; } }
public DropboxFileSystemProvider(string key, string secret) { fss = new List <DropboxFileSystem> (); var manager = new DBAccountManager(key, secret); DBAccountManager.SharedManager = manager; var account = manager.LinkedAccount; if (account != null && account.Linked) { var dbfs = new DBFilesystem(account); var fs = new DropboxFileSystem(account, dbfs); fss.Add(fs); DBFilesystem.SharedFilesystem = dbfs; } }
public void Init(string appKey, string appSecret) { _dropboxSyncKey = appKey; _dropboxSyncSecret = appSecret; var activity = Helper.GetCurrentActivity(); Account = DBAccountManager.GetInstance(activity.ApplicationContext, _dropboxSyncKey, _dropboxSyncSecret); Account.LinkedAccountChanged -= LinkedAccountChanged; Account.LinkedAccountChanged += LinkedAccountChanged; // TODO: Restart auth flow. if (!Account.HasLinkedAccount) { Account.StartLink(activity, (int)RequestCode.LinkToDropboxRequest); } else { StartApp(); } }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { // The account manager stores all the account info. Create this when your app launches var manager = new DBAccountManager (DropboxSyncKey, DropboxSyncSecret); DBAccountManager.SharedManager = manager; var account = manager.LinkedAccount; if (account != null) { var filesystem = new DBFilesystem (account); DBFilesystem.SharedFilesystem = filesystem; } window = new UIWindow (UIScreen.MainScreen.Bounds); viewController = new CameraSyncViewController (); UINavigationController rootController = new UINavigationController (viewController); window.RootViewController = rootController; window.MakeKeyAndVisible (); return true; }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { // The account manager stores all the account info. Create this when your app launches var accountMgr = new DBAccountManager (key: appKey, secret: appSecret); DBAccountManager.SetSharedManager (accountMgr); var account = accountMgr.LinkedAccount; if (account != null) { var filesystem = new DBFilesystem (account); DBFilesystem.SetSharedFilesystem (filesystem); } window = new UIWindow (UIScreen.MainScreen.Bounds); loginController = new DVCLogin (); navController = new UINavigationController (loginController); window.RootViewController = navController; window.MakeKeyAndVisible (); return true; }
public void Init(string appKey, string appSecret) { _dropboxSyncKey = appKey; _dropboxSyncSecret = appSecret; var manager = new DBAccountManager(_dropboxSyncKey, _dropboxSyncSecret); DBAccountManager.SharedManager = manager; var account = DBAccountManager.SharedManager.LinkedAccount; if (account != null) { StartApp(account); } else { var window = UIApplication.SharedApplication.KeyWindow; manager.LinkFromController(window.RootViewController); } throw new NotImplementedException(); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { UINavigationBar.Appearance.TintColor = UIColor.FromRGB(29, 131, 219); window = new UIWindow(UIScreen.MainScreen.Bounds); window.BackgroundColor = UIColor.White; window.Bounds = UIScreen.MainScreen.Bounds; var u = new TaskListScreen(); navController = new UINavigationController(); navController.PushViewController(u, false); window.RootViewController = navController; window.MakeKeyAndVisible(); // DROPBOX STUFF // The account manager stores all the account info. Create this when your app launches var manager = new DBAccountManager(DropboxSyncKey, DropboxSyncSecret); DBAccountManager.SharedManager = manager; var account = manager.LinkedAccount; if (account != null) { SetupDropbox(); } else { manager.LinkFromController(window.RootViewController); } //-- return(true); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { _splitViewController = new TimingSplitViewController(); _splashViewController = new SplashDialogViewController(); _splashViewController.Changed += (string arg1, string arg2) => { _splitViewController.Initialise(arg1, arg2); window.RootViewController = _splitViewController; }; // create a new window instance based on the screen size window = new UIWindow(UIScreen.MainScreen.Bounds) { RootViewController = _splashViewController }; // make the window visible window.MakeKeyAndVisible(); // The account manager stores all the account info. Create this when your app launches var manager = new DBAccountManager(DropboxSyncKey, DropboxSyncSecret); DBAccountManager.SharedManager = manager; var account = manager.LinkedAccount; if (account != null) { var filesystem = new DBFilesystem(account); DBFilesystem.SharedFilesystem = filesystem; } else { DBAccountManager.SharedManager.LinkFromController(_splitViewController); } return(true); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { // The account manager stores all the account info. Create this when your app launches var accountMgr = new DBAccountManager(key: appKey, secret: appSecret); DBAccountManager.SharedManager = accountMgr; var account = accountMgr.LinkedAccount; if (account != null) { var filesystem = new DBFilesystem(account); DBFilesystem.SharedFilesystem = filesystem; } window = new UIWindow(UIScreen.MainScreen.Bounds); loginController = new DVCLogin(); navController = new UINavigationController(loginController); window.RootViewController = navController; window.MakeKeyAndVisible(); return(true); }
DBDatastore DropboxDatastore;//VARAIBLE DE ADMINISTRACION DE NUESTRA DATASTORE //INICIA LA CONEXION CON NUESTRA CUENTA DE DROPBOX void IniciaConexionCuentaDropBox () { // INICIALIZAMOS NUESTRA VARIABLE ACCOUNT PASANDOLE LAS LLAVES QUE SE CREARON AL MOMENTO DE CREAR NUESTRA // APP EN EL PANEL DE DROPBOX CONSOLE Account = DBAccountManager.GetInstance (ApplicationContext, DropboxSyncKey, DropboxSyncSecret); //VERIFICAMOS SI LA CUENTA ESTA EN LINEA if (!Account.HasLinkedAccount) { //SI NO ESTA EN LINEA LLAMAMOS LA ACTIVIDAD DE INICIO DE SESION DE DROPBOX Account.StartLink (this, (int)RequestCode.LinkToDropboxRequest); }else { //REALIZAMOS LA BUSQUEDA DEL CONTACTO SELECCIONADO BuscaContacto (id); } }
private void Initialize() { _watchedFiles = new List<DBFile>(); var manager = new DBAccountManager(_dropboxAppKey, _dropboxAppSecret); DBAccountManager.SharedManager = manager; // Check if user is logged in var account = DBAccountManager.SharedManager.LinkedAccount; if (account == null) return; // if (_store != null && _store.Open) // return; // // DBError error = null; // _store = DBDatastore.OpenDefaultStoreForAccount(account, out error); // if(error != null) // throw new Exception(error.Description); _fileSystem = new DBFilesystem(account); DBFilesystem.SharedFilesystem = _fileSystem; // _fileSystem.AddObserverForPathAndChildren(_fileSystem, new DBPath("/Devices"), () => { // Console.WriteLine("iOSDropboxService - FileSystem - Data changed!"); //// if(OnCloudDataChanged != null) //// OnCloudDataChanged(string.Empty); // }); // _store.AddObserver (_store, () => { // Console.WriteLine("SyncCloudViewController - DBDatastore - Data changed!"); // if (_store.Status.HasFlag(DBDatastoreStatus.Incoming)) { // // Handle the updated data // Console.WriteLine("SyncCloudViewController - DBDatastore - Incoming data!"); // try // { // DBError error2 = null; // var changes = _store.Sync(error2); // if(error2 != null) // throw new Exception(error2.Description); // // if (!changes.ContainsKey(new NSString("stuff"))) // return; // // var records = (NSSet)changes["stuff"]; // foreach(var record in records) // { // var theRecord = (DBRecord)record; // var timestamp = theRecord.ObjectForKey("timestamp"); // var deviceType = theRecord.ObjectForKey("deviceType"); // var deviceName = theRecord.ObjectForKey("deviceName"); // //lblValue.Text = string.Format("{0} {1} {2}", deviceType, deviceName, timestamp); // } // } // catch (Exception ex) // { // Console.WriteLine("SyncCloudActivity - OnDatastoreStatusChange exception: {0}", ex); // //lblValue.Text = string.Format("Error: {0}", ex); // } // } // }); }