コード例 #1
0
        public async void OnMetadataClick()
        {
            try
            {
                //Static_method.ShowLoadingDialog(false);
                UserDialogs.Instance.ShowLoading("Downloading.....");
                await Task.Delay(100);

                var status = generalMethod.GetMetadataService('M');
                UserDialogs.Instance.HideLoading();

                if (status == true)
                {
                    UserDialogs.Instance.Toast("Successful Download Meta Data !");
                    CrossSettings.Current.AddOrUpdateValue("StatusMetaData", true);
                    StatusMetaData = true;
                }
                else
                {
                    UserDialogs.Instance.Toast("Fail Download Meta Data !");
                    CrossSettings.Current.AddOrUpdateValue("StatusMetaData", false);
                    StatusMetaData = false;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                UserDialogs.Instance.Toast(ex.Message);
            }
            finally
            {
                UserDialogs.Instance.HideLoading();
            }
        }