public void Checkin() { try { _checkout.Relinquish(); DisplayState.Exit(); } catch (DistributorRequestException) { DisplayState.NotifyUser("There has been an issue contacting your distributor server. Please try again. If the problem persists, please contact your system administrator."); } catch (Exception exc) { DisplayState.NotifyUser(exc.Message); } }
public void Load() { try { IAvailableCheckout[] checkoutContextAvailableNow = CheckoutContext.AvailableNow(); AvailableCheckouts = new ObservableCollection <IAvailableCheckout>(checkoutContextAvailableNow); } catch (DistributorRequestException) { DisplayState.NotifyUser("There has been an issue contacting your distributor server. Please try again. If the problem persists, please contact your system administrator."); } catch (DistributorIntegrityException) { DisplayState.NotifyUser("We have detected an integrity issue with your distributor server. Please contact your system administrator."); } catch (NoDistributorException) { DisplayState.NotifyUser("There is no distributor server configured. Please configure a server in the configuration dialog."); } }
void Acquire() { if ( SpAgent.Configuration.DistributorBaseUri == null ) { DisplayState.NotifyUser( "There is no distributor server configured. Please configure a server in the configuration dialog." ); return; } try { // Acquire the first available set SpAgent.Distributed.Acquire( x => x.First() ); if ( SpAgent.Distributed.Features.Count == 0 ) DisplayState.NotifyUser( "No features were available. Please check your Licensing Status." ); } catch ( DistributorRequestException ) { DisplayState.NotifyUser( "There has been an issue contacting your distributor server. Please try again. If the problem persists, please contact your system administrator." ); } catch ( DistributorIntegrityException ) { DisplayState.NotifyUser( "We have detected an integrity issue with your distributor server. Please contact your system administrator." ); } }
public void AcquireCheckout() { try { SelectedAvailableCheckout.Acquire(AcquireCheckoutUntil); DisplayState.Navigate(new CurrentCheckoutPage()); } catch (NoLongerAvailableException) { DisplayState.NotifyUser("The requested checkout is no longer available. Please refresh the list above and select another available chekcout."); } catch (DistributorRequestException) { DisplayState.NotifyUser("There has been an issue contacting your distributor server. Please try again. If the problem persists, please contact your system administrator."); } catch (DistributorIntegrityException) { DisplayState.NotifyUser("We have detected an integrity issue with your distributor server. Please contact your system administrator."); } catch (Exception exc) { DisplayState.NotifyUser("Error: " + exc.Message); } }
void Feature2() { DisplayState.NotifyUser("Feature 2 accessed successfully"); }