public void CommitRockSync( ) { // Everything worked, so store all our values RockURL = TempRockUrl; RockAuthorizationKey = TempAuthKey; MaritalStatus = TempMaritalStatus; SchoolGrades = TempSchoolGrades; FamilyMemberChildGroupRole = TempChildRole; FamilyMemberAdultGroupRole = TempAdultRole; FirstTimeVisitAttrib = TempFirstTimeVisit; CanCheckInGroupRole = TempCanCheckInRole; AllowedCheckInByRole = TempAllowedCheckInByRole; ConfigurationTemplates = TempConfigurationTemplates; SetCampuses(TempCampuses); // permenantly update the api values. RockApi.SetRockURL(RockURL); RockApi.SetAuthorizationKey(RockAuthorizationKey); // stamp the version as well. Version = CURRENT_VERSION; }
public RockNetworkManager( ) { RockApi.SetRockURL(Config.GeneralConfig.RockBaseUrl); RockApi.SetAuthorizationKey(App.Shared.SecuredValues.RockMobileAppAuthorizationKey); // make sure our built in news items have their images in the cache RockLaunchData.Instance.TryCacheEmbeddedNewsImages( ); Requesting = false; }
void Start( ) { RockApi.SetRockURL(Config.Instance.RockURL); RockApi.SetAuthorizationKey(Config.Instance.RockAuthorizationKey); // get the initial config (this is where we call the new Update) Config.Instance.UpdateCurrentConfigurationDefinedValue( delegate(bool result) { // failure or not, hide the connection UI ProgressIndicator.Hidden = true; ProgressIndicator.HidesWhenStopped = true; ProgressIndicator.StopAnimating( ); ConnectingLabel.Hidden = true; if (result) { // we're good to move on. // first hide the FirstRun (in case it was showing) if (FirstRunViewController != null) { FirstRunViewController.DismissViewController(true, null); } ApplyCurrentConfigSettings( ); // add the container, so that when we're done with the login it will already be there. PushViewController(ContainerViewController, false); DisplayLoginScreen(false); } else { // display an error and return them to the first run screen. DisplayFirstRun( ); } }); }
public void TryBindToRockServer(string rockUrl, string authKey, OnComplete onComplete) { TempRockUrl = rockUrl; TempAuthKey = authKey; // this will let us use the url temporarily RockApi.SetRockURL(rockUrl); RockApi.SetAuthorizationKey(authKey); // get the config templates GetConfigTemplates( // capute the result callback delegate(bool result) { // restore the original URLs, so that they only update // if Commit is called. RockApi.SetRockURL(RockURL); RockApi.SetAuthorizationKey(RockAuthorizationKey); // now notify the original caller onComplete(result); }); }