5.1. SMCloudServices¶
Provides the function of SMCS service
Method
Name
Contents
It displays a view of the Star Micronics Cloud registration.
Checks whether the application is registered with the Star Micronics Cloud.
Event
Name
Contents
Occurs when a view of Star Micronics Cloud registration is closed.
5.1.1. ShowRegistrationViewAsync¶
It displays a view of the Star Micronics Cloud registration.
Declaration
public async static void ShowRegistrationViewAsync()
Parameter
None
Return value
None
Examples
private void RegistrationText_Tapped(object sender, TappedRoutedEventArgs e) { SMCloudServices.SMCloudServices.ShowRegistrationViewAsync(); }
Refer to AllReceiptSamplePage.xaml.cs.
5.1.2. IsRegisteredInnerAsync¶
Checks whether the application is registered with the Star Micronics Cloud.
Declaration
public static IAsyncOperation<bool> IsRegisteredAsync()
Parameter
None
Return value
Contents Type Resulttrue … Registeredfalse … Unregisteredbool
Examples
protected override async void OnNavigatedTo(NavigationEventArgs e) { bool isRegistered = await SMCloudServices.SMCloudServices.IsRegisteredAsync(); }
Refer to AllReceiptSamplePage.xaml.cs.
5.1.3. RegisteredEvent¶
Occurs when a view of Star Micronics Cloud registration is closed.
Declaration
public static event EventHandler<bool> RegisterdEvent
Examples
protected override async void OnNavigatedTo(NavigationEventArgs e) { SMCloudServices.SMCloudServices.RegisterdEvent += SMCloudServices_RegisterdEvent; SMCloudServices.SMCloudServices.ShowRegistrationViewAsync(); } private void SMCloudServices_RegisterdEvent(object sender, bool isRegistered) { // The presence of registration to Star Micronics Cloud is stored in the second parameter. }
Refer to AllReceiptSamplePage.xaml.cs.