/// <summary>
        /// Sample : Showing AllRceipts registration view.
        /// </summary>
        public static void ShowAllReceiptsRegistrationView()
        {
            // Check is your device is registered.
            bool isAlreadyRegistered = CheckIsDeviceRegisteredInStarCloudServices();

            if (!isAlreadyRegistered) // Not registered
            {
                // Specify the file path to save the registration information. (XML format)
                string path = SetRegistrationConfigFilePath();

                if (path == null)
                {
                    return;
                }

                // Please be sure to set registration config path first.
                SMCloudServices.SetRegistrationConfigFilePath(path);
            }

            // Specify owner window. (option)
            Window ownerWindow = Util.GetMainWindow();

            SMCloudServices.ShowRegistrationView(ownerWindow);

            // If without owner window, use below method.
            // SMCloudServices.ShowRegistrationView();
        }
        public AllReceiptsInfoManager()
        {
            if (SharedInformationManager.AllReceiptsInfoManager == null)
            {
                RestorePreviousSettings();
            }
            else
            {
                CopyProperty(SharedInformationManager.AllReceiptsInfoManager);
            }

            SharedInformationManager.AllReceiptsInfoManager = this;

            string filePath = Properties.Settings.Default.AllReceiptsRegistrationFilePath;

            SMCloudServices.SetRegistrationConfigFilePath(filePath);

            try
            {
                isRegistered = SMCloudServices.IsRegistered();
            }
            catch (InvalidOperationException)
            {
                isRegistered = false;
            }
        }
        public static void SetAllReceiptsRegistrationFilePath(string filePath)
        {
            SMCloudServices.SetRegistrationConfigFilePath(filePath);

            Properties.Settings.Default.AllReceiptsRegistrationFilePath = filePath;

            Properties.Settings.Default.Save();
        }
        /// <summary>
        /// Sample : Checking is your device is registered in StarCloudServices.
        /// </summary>
        private static bool CheckIsDeviceRegisteredInStarCloudServices()
        {
            // Specify your AllReceipts config path.
            string filePath = Properties.Settings.Default.AllReceiptsRegistrationFilePath;

            if (filePath.Equals(""))
            {
                return(false);
            }

            SMCloudServices.SetRegistrationConfigFilePath(filePath);

            return(SMCloudServices.IsRegistered());
        }