5.1. SMCloudServices

Provides the function of SMCS service

  • Event

    Name

    Contents

    RegisteredEvent

    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.

../_images/StarMicronicsCloud_Regist_1.png
  • 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
    Result
    true … Registered
    false … Unregistered
    bool
  • 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.