UGrokItApi.UgiDefaultConfigurationUi Class Reference

Overview

Default implementation of IUgiConfigurationDelegate, default UI for housekeeping functions.

Class Methods

static void HideUI (object o)
 Hide an alert More...
 
static void UpdateAlert (object o, string message)
 Hide an alert More...
 
static object ShowOk (string title, string message, string okButtonTitle="", Action okDelegate=null)
 Show an alert dialog with ok button More...
 
static object ShowOkCancel (string title, string message, Action okDelegate, string okButtonTitle="", string cancelButtonTitle="", Action cancelDelegate=null)
 Show an alert dialog with ok and cancel buttons More...
 
static object ShowChoices (string[] choices, int initialSelectedIndex, string title, string actionButtonTitle, bool canCancel, Action< int, string > actionDelegate, Action< int, string, Action > confirmationDelegate=null, Action cancelDelegate=null)
 Show UI to choose from a list of choices More...
 
static void ShowWaiting (string message, Action cancelDelegate=null)
 Show a waiting alert More...
 
static void UpdateWaiting (string message)
 Updat the message in a waiting alert More...
 
static void HideWaiting ()
 Hide the waiting alert More...
 

Instance Methods

 UgiDefaultConfigurationUi ()
 Constructor More...
 
void CheckSampleRates (Action del)
 Check to see if the incoming and outgoing sample rates match More...
 
void PromptForFirmwareUpdate (UgiFirmwareUpdateInfo info, Action updateDelegate, Action cancelDelegate, Action postponeDelegate)
 A firmware update is available. Prompt the user for whether to update. If the app does not want to update now, return NO call the Ugi method repromptForAutomaticFirmwareUpdateIfAvailable at some point. More...
 
void NotifyFirmwareUpdateErrorLoadingUpdate (Action del)
 Notify the user that there was an error loading the firmware update More...
 
void DisplayFirmwareUpdateProgress (Action cancelDelegate)
 Display progress notification about the firmware update More...
 
void UpdateFirmwareUpdateProgress (int amountDone, int amountTotal, bool canCancel)
 Update the progress notification about the firmware update More...
 
void NotifyFirmwareUpdateSuccess (int seconds, Action del)
 Notify the user the firmware update completed successfully More...
 
void NotifyFirmwareUpdateFailure (bool mustRetry, Action retryDelegate, Action cancelDelegate)
 Notify the user that the firmware update failed More...
 
void AbortFirmwareUpdateInteraction ()
 Abort firmware update (Grokker has been disconnected) More...
 
void AfterFirmwareUpdate (bool updated)
 Firmware update sequence has finished More...
 
void StartBackgroundAction (IUgiConfigurationDelegate_WaitingCauses cause)
 Notification that a background action is starting. Display a "waiting" alert More...
 
void FinishBackgroundAction ()
 Notification that a background action finished More...
 

Properties

bool SendGrokkerSerialNumber [get, set]
 true if the Grokker serial number should ever be sent to the U Grok It server More...
 
bool UseHeadphoneAudioDevice [get, set]
 If true, try to use the headphone audio device instead of the default device, and use the plugged/unplugged state of the headphone audio device to know whether a Grokker is connected. The default is FALSE. More...
 
bool DoAutomaticFirmwareUpdate [get, set]
 See whether automatic firmware update checks will be run More...
 
- Properties inherited from UGrokItApi.IUgiConfigurationDelegate
bool SendGrokkerSerialNumber [get, set]
 true if the Grokker serial number should ever be sent to the U Grok It server More...
 
bool UseHeadphoneAudioDevice [get, set]
 If true, try to use the headphone audio device instead of the default device, and use the plugged/unplugged state of the headphone audio device to know whether a Grokker is connected. The default is TRUE. More...
 
bool DoAutomaticFirmwareUpdate [get, set]
 true to run automatic firmware update checks More...
 

Instance Method Documentation

void UGrokItApi.UgiDefaultConfigurationUi.CheckSampleRates ( Action  del)
inline

Check to see if the incoming and outgoing sample rates match

Parameters
delDelegate to execute after completed

Implements UGrokItApi.IUgiConfigurationDelegate.

void UGrokItApi.UgiDefaultConfigurationUi.PromptForFirmwareUpdate ( UgiFirmwareUpdateInfo  info,
Action  updateDelegate,
Action  cancelDelegate,
Action  postponeDelegate 
)
inline

A firmware update is available. Prompt the user for whether to update. If the app does not want to update now, return NO call the Ugi method repromptForAutomaticFirmwareUpdateIfAvailable at some point.

Parameters
infoInformation about the firmware update that is available
updateDelegateDelegate to execute to do the update
cancelDelegateDelegate to execute if the user cancels
postponeDelegateDelegate to to postpone until later

Implements UGrokItApi.IUgiConfigurationDelegate.

void UGrokItApi.UgiDefaultConfigurationUi.NotifyFirmwareUpdateErrorLoadingUpdate ( Action  del)
inline

Notify the user that there was an error loading the firmware update

Parameters
delDelegate to execute after notification

Implements UGrokItApi.IUgiConfigurationDelegate.

void UGrokItApi.UgiDefaultConfigurationUi.DisplayFirmwareUpdateProgress ( Action  cancelDelegate)
inline

Display progress notification about the firmware update

Parameters
cancelDelegateDelegate to execute if the user cancels

Implements UGrokItApi.IUgiConfigurationDelegate.

void UGrokItApi.UgiDefaultConfigurationUi.UpdateFirmwareUpdateProgress ( int  amountDone,
int  amountTotal,
bool  canCancel 
)
inline

Update the progress notification about the firmware update

Parameters
amountDoneAmmount of the firmware update that is done
amountTotalAmmount of the firmware update total
canCanceltrue if the user can cancel at this point

Implements UGrokItApi.IUgiConfigurationDelegate.

void UGrokItApi.UgiDefaultConfigurationUi.NotifyFirmwareUpdateSuccess ( int  seconds,
Action  del 
)
inline

Notify the user the firmware update completed successfully

Parameters
secondsNumber of seconds that the update took
delDelegate to execute after notification

Implements UGrokItApi.IUgiConfigurationDelegate.

void UGrokItApi.UgiDefaultConfigurationUi.NotifyFirmwareUpdateFailure ( bool  mustRetry,
Action  retryDelegate,
Action  cancelDelegate 
)
inline

Notify the user that the firmware update failed

Parameters
mustRetrytrue if the user must retry (do not present a Cancel option)
retryDelegateDelegate to execute to retry the update 9nil if the update cannot be retried)
cancelDelegateDelegate to execute if the user cancels

Implements UGrokItApi.IUgiConfigurationDelegate.

void UGrokItApi.UgiDefaultConfigurationUi.AbortFirmwareUpdateInteraction ( )
inline

Abort firmware update (Grokker has been disconnected)

Implements UGrokItApi.IUgiConfigurationDelegate.

void UGrokItApi.UgiDefaultConfigurationUi.AfterFirmwareUpdate ( bool  updated)
inline

Firmware update sequence has finished

Parameters
updated

Implements UGrokItApi.IUgiConfigurationDelegate.

void UGrokItApi.UgiDefaultConfigurationUi.StartBackgroundAction ( IUgiConfigurationDelegate_WaitingCauses  cause)
inline

Notification that a background action is starting. Display a "waiting" alert

Parameters
causeAction that is about to start

Implements UGrokItApi.IUgiConfigurationDelegate.

void UGrokItApi.UgiDefaultConfigurationUi.FinishBackgroundAction ( )
inline

Notification that a background action finished

Implements UGrokItApi.IUgiConfigurationDelegate.

static void UGrokItApi.UgiDefaultConfigurationUi.HideUI ( object  o)
inlinestatic

Hide an alert

Parameters
oToken for alert to hide
static void UGrokItApi.UgiDefaultConfigurationUi.UpdateAlert ( object  o,
string  message 
)
inlinestatic

Hide an alert

Parameters
oToken for alert to hide
messageText for the body of the alert dialog
static object UGrokItApi.UgiDefaultConfigurationUi.ShowOk ( string  title,
string  message,
string  okButtonTitle = "",
Action  okDelegate = null 
)
inlinestatic

Show an alert dialog with ok button

Returns
Token for the alert dialog
Parameters
titleTitle for the alert
messageText for the body of the alert
okButtonTitleText for the "ok" button, or "" for the defualt, or null for no ok button
okDelegateCode to execute for "ok"
static object UGrokItApi.UgiDefaultConfigurationUi.ShowOkCancel ( string  title,
string  message,
Action  okDelegate,
string  okButtonTitle = "",
string  cancelButtonTitle = "",
Action  cancelDelegate = null 
)
inlinestatic

Show an alert dialog with ok and cancel buttons

Returns
Token for the alert dialog
Parameters
titleTitle for the alert
messageText for the body of the alert
okDelegateCode to execute for "ok"
okButtonTitleText for the "ok" button, or "" for the defualt, or null for no ok button
cancelButtonTitleText for the "cancel" button, or "" for the defualt, or null for no cancel button
cancelDelegateCode to execute for "cancel"
static object UGrokItApi.UgiDefaultConfigurationUi.ShowChoices ( string[]  choices,
int  initialSelectedIndex,
string  title,
string  actionButtonTitle,
bool  canCancel,
Action< int, string >  actionDelegate,
Action< int, string, Action >  confirmationDelegate = null,
Action  cancelDelegate = null 
)
inlinestatic

Show UI to choose from a list of choices

Returns
Token for the UI
Parameters
choicesChoices to choose from
initialSelectedIndexChoice to select initially
titleTitle for the alert
actionButtonTitleText for the "ok" button, or "" for the defualt, or null for no ok button
canCanceltrue if the user can cancel
actionDelegateCode to execute if the user makes a choice
confirmationDelegateCode to execute to confirm the choice, or null of no confirmation
cancelDelegateCode to execute for "cancel"
static void UGrokItApi.UgiDefaultConfigurationUi.ShowWaiting ( string  message,
Action  cancelDelegate = null 
)
inlinestatic

Show a waiting alert

Parameters
messageMessage
cancelDelegateCode to execute if the user cancels. If null then no cancel button is shown
static void UGrokItApi.UgiDefaultConfigurationUi.UpdateWaiting ( string  message)
inlinestatic

Updat the message in a waiting alert

Parameters
messageNew message
static void UGrokItApi.UgiDefaultConfigurationUi.HideWaiting ( )
inlinestatic

Hide the waiting alert

Property Documentation

bool UGrokItApi.UgiDefaultConfigurationUi.SendGrokkerSerialNumber
getset

true if the Grokker serial number should ever be sent to the U Grok It server

bool UGrokItApi.UgiDefaultConfigurationUi.UseHeadphoneAudioDevice
getset

If true, try to use the headphone audio device instead of the default device, and use the plugged/unplugged state of the headphone audio device to know whether a Grokker is connected. The default is FALSE.

bool UGrokItApi.UgiDefaultConfigurationUi.DoAutomaticFirmwareUpdate
getset

See whether automatic firmware update checks will be run

Returns
true to run automatic firmware update checks

Constructor & Destructor Documentation

UGrokItApi.UgiDefaultConfigurationUi.UgiDefaultConfigurationUi ( )
inline

Constructor